summaryrefslogtreecommitdiffstats
path: root/src/common/port/serial.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 00:15:53 +0000
commit0aaa8e3fc8f8a1481333b564f0922277c8d8ad59 (patch)
treeb95c0ca86c4876dd139af376b9f4afd8917cf0cd /src/common/port/serial.h
parentb79a2c28534cf09987eeeba3077fff9236df182a (diff)
downloadpiklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.tar.gz
piklab-0aaa8e3fc8f8a1481333b564f0922277c8d8ad59.zip
TQt4 port piklab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/piklab@1238822 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/common/port/serial.h')
-rw-r--r--src/common/port/serial.h30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/common/port/serial.h b/src/common/port/serial.h
index b2911e6..9296068 100644
--- a/src/common/port/serial.h
+++ b/src/common/port/serial.h
@@ -37,21 +37,21 @@ public:
enum Property { NoProperty = 0, NeedDrain = 1, NeedFlush = 2, NeedBreak = 4,
Blocking = 8 };
- Q_DECLARE_FLAGS(Properties, Property)
+ TQ_DECLARE_FLAGS(Properties, Property)
- Serial(const QString &device, Properties properties, Log::Base &base);
+ Serial(const TQString &device, Properties properties, Log::Base &base);
virtual ~Serial() { close(); }
virtual Description description() const { return Description(PortType::Serial, _device); }
- static const QStringList &probedDeviceList();
- static IODirs probe(const QString &device);
+ static const TQStringList &probedDeviceList();
+ static IODirs probe(const TQString &device);
static bool isAvailable() { return true; }
enum InputFlag { NoInputFlag = 0, IgnoreBreak = 1, IgnoreParity = 2 };
- Q_DECLARE_FLAGS(InputFlags, InputFlag)
+ TQ_DECLARE_FLAGS(InputFlags, InputFlag)
enum ControlFlag { NoControlFlag = 0, ByteSize8 = 1, HardwareFlowControl = 2,
EnableReceiver = 4, IgnoreControlLines = 8 };
- Q_DECLARE_FLAGS(ControlFlags, ControlFlag)
+ TQ_DECLARE_FLAGS(ControlFlags, ControlFlag)
bool setMode(InputFlags inputFlags, ControlFlags controlFlags, Speed speed, uint readTimeout); // in ms
bool drain(uint timeout);
bool flush(uint timeout);
@@ -66,13 +66,13 @@ public:
static const SPinData PIN_DATA[Nb_Pins];
virtual bool setPinOn(uint pin, bool on, LogicType type);
virtual bool readPin(uint pin, LogicType type, bool &value);
- virtual QValueVector<PinData> pinData(IODir dir) const;
+ virtual TQValueVector<PinData> pinData(IODir dir) const;
virtual bool isGroundPin(uint pin) const;
virtual uint groundPin() const { return SG; }
virtual IODir ioDir(uint pin) const;
private:
- QString _device;
+ TQString _device;
Properties _properties;
#if defined(Q_OS_UNIX)
typedef int Handle;
@@ -93,20 +93,20 @@ private:
virtual void internalClose();
virtual bool internalSend(const char *data, uint size, uint timeout);
virtual bool internalReceive(uint size, char *data, uint timeout);
- virtual void setSystemError(const QString &message);
+ virtual void setSystemError(const TQString &message);
bool internalSetPinOn(Pin pin, bool on);
bool internalReadPin(Pin pin, LogicType type, bool &value);
static const Handle INVALID_HANDLE;
- static Handle openHandle(const QString &device, IODirs dirs);
+ static Handle openHandle(const TQString &device, IODirs dirs);
static void closeHandle(Handle handle);
- static QStringList *_list;
- static QStringList deviceList();
+ static TQStringList *_list;
+ static TQStringList deviceList();
static void setHardwareFlowControl(Parameters &parameters, bool on);
};
-Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::Properties)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::InputFlags)
-Q_DECLARE_OPERATORS_FOR_FLAGS(Serial::ControlFlags)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::Properties)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::InputFlags)
+TQ_DECLARE_OPERATORS_FOR_FLAGS(Serial::ControlFlags)
} // namespace