tserialport.h

00001 /****************************************************************************
00002 ** $Id: tserialport.h,v 1.5 2006/06/21 12:04:17 red75 Exp $
00003 **
00004 ** Trade equipment common portable library project
00005 **
00006 ** Copyright (C) 1999-2006 Leader InfoTech.  All rights reserved.
00007 **
00008 ** This file is part of the Library of the Ananas
00009 ** automation accounting system.
00010 **
00011 ** This file may be distributed and/or modified under the terms of the
00012 ** GNU General Public License version 2 as published by the Free Software
00013 ** Foundation and appearing in the file LICENSE.GPL included in the
00014 ** packaging of this file.
00015 **
00016 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00017 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00018 **
00019 ** See http://www.leaderit.ru/ or email sales@leaderit.ru
00020 **
00021 ** Contact org@leaderit.ru if any conditions of this licensing are
00022 ** not clear to you.
00023 **
00024 **********************************************************************/
00025 
00026 /*
00027 
00028         TSerialPort v.1.1b
00029 
00031 
00032         Multiplatform Serial Port Extension
00033         based on Wayne Roth's QExtSerialPort
00034 
00035         (c) Racheengel 2004-2005
00036 
00037 */
00038 
00039 #ifndef _TSERIALPORT_H_
00040 #define _TSERIALPORT_H_
00041 
00042 #include <qobject.h>
00043 #include <qvaluelist.h>
00044 #include <qstringlist.h>
00045 #include <qcstring.h>
00046 #include <qextserialport.h>
00047 #include <teglobal.h>
00048 
00049 #ifdef _WINDOWS
00050 #define _TTY_WIN_
00051 #endif
00052 #ifdef WIN32
00053 #define _TTY_WIN_
00054 #endif
00055 
00056 class LIB_EXPORT TSerialPort : public QextSerialPort
00057 {
00058     typedef QextSerialPort superclass;
00059 public:
00060         TSerialPort(const QString &portName = QString::null, const PortSettings *settings = 0);
00061         virtual ~TSerialPort();
00062 
00063         bool    setupPort(const QString &portName = QString::null, const PortSettings *settings = 0);
00064         void    getPortSettings(QString *portName = 0, PortSettings *settings = 0);
00065 
00066 //      virtual bool open(int mode=0);
00067         Q_ULONG customBaudRate();
00068         void setCustomBaudRate( Q_ULONG baudrate );
00069         
00070         virtual void setBaudRate(BaudRateType);
00071         
00072         virtual bool open(int mode=0);
00073         
00074         static const QStringList&       portList() { return m_ports; }
00075         static const QStringList&       generatePortList();
00076   static QString portName(int iPortNum);
00077   static QValueList<int> generatePortNumberList();
00078 
00079 protected:
00080         static QStringList m_ports;
00081         Q_ULONG vBaudRate;
00082 };
00083 
00084 #endif

Документация по Общая библиотека для работы с торговым оборудованием.. Последние изменения: Sun Jul 2 23:37:24 2006. Создано системой  doxygen 1.4.7