summaryrefslogtreecommitdiffstats
path: root/src/microsettings.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /src/microsettings.h
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/microsettings.h')
-rw-r--r--src/microsettings.h64
1 files changed, 33 insertions, 31 deletions
diff --git a/src/microsettings.h b/src/microsettings.h
index d960f10..5832e76 100644
--- a/src/microsettings.h
+++ b/src/microsettings.h
@@ -11,11 +11,11 @@
#ifndef MICROSETTINGS_H
#define MICROSETTINGS_H
-#include <qobject.h>
-#include <qvariant.h>
+#include <tqobject.h>
+#include <tqvariant.h>
-class QString;
-class QVariant;
+class TQString;
+class TQVariant;
class MicroData;
class MicroInfo;
@@ -25,13 +25,13 @@ public:
VariableInfo();
// Returns the value as a string
- QString valueAsString() const;
+ TQString valueAsString() const;
// MicroSettings::VariableType (don't rely on this just yet...)
int type;
// Sets the value
- void setValue( const QVariant & value );
+ void setValue( const TQVariant & value );
// If true, the variable will be initialised at the start of the FlowCode
// to the given value
@@ -42,20 +42,21 @@ public:
bool permanent;
private:
- QVariant value;
+ TQVariant value;
};
-typedef QMap< QString, VariableInfo > VariableMap; // Variable name, variable info
+typedef TQMap< TQString, VariableInfo > VariableMap; // Variable name, variable info
/**
@short Stores pic pin settings - type/state
@author David Saxton
*/
-class PinSettings : public QObject
+class PinSettings : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum pin_type
{
@@ -70,12 +71,12 @@ class PinSettings : public QObject
};
PinSettings();
- PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const QString &id, const QString &port );
+ PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const TQString &id, const TQString &port );
PinSettings::pin_type type() const { return m_type; }
PinSettings::pin_state state() const { return m_state; }
- QString id() const { return m_id; }
- QString port() const { return m_port; }
+ TQString id() const { return m_id; }
+ TQString port() const { return m_port; }
void setType( PinSettings::pin_type type );
void setState( PinSettings::pin_state state );
@@ -89,14 +90,14 @@ class PinSettings : public QObject
private:
PinSettings::pin_type m_type;
PinSettings::pin_state m_state;
- QString m_id;
- QString m_port;
+ TQString m_id;
+ TQString m_port;
};
-typedef QValueList<PinSettings*> PinSettingsList;
+typedef TQValueList<PinSettings*> PinSettingsList;
class PinMapping;
-typedef QMap< QString, PinMapping > PinMappingMap;
-typedef QMap< QString, PinSettingsList > PortList;
+typedef TQMap< TQString, PinMapping > PinMappingMap;
+typedef TQMap< TQString, PinSettingsList > PortList;
/**
This class stores PIC settings that are specific to the PIC program being devloped.
@@ -106,9 +107,10 @@ This is different from PIC info, which includes stuff such as PIC pin names
@short Stores Pic settings - pin settings
@author David Saxton
*/
-class MicroSettings : public QObject
+class MicroSettings : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
enum VariableType
{
@@ -131,55 +133,55 @@ public:
/**
* Set the pin with the given id to the given initial type (input/output)
*/
- void setPinType( const QString &id, PinSettings::pin_type type );
+ void setPinType( const TQString &id, PinSettings::pin_type type );
/**
* Set the pin with the given id to the given initial state (on/off)
*/
- void setPinState( const QString &id, PinSettings::pin_state state );
+ void setPinState( const TQString &id, PinSettings::pin_state state );
/**
* Returns a pointer to the PinSettings for the pin with the given id,
* or null if no such pin exists.
*/
- PinSettings* pinWithID( const QString &id );
+ PinSettings* pinWithID( const TQString &id );
/**
* Returns the initial port state (on/off) for the given port.
* Each pin state occupies one bit of the returned integer.
*/
- int portState( const QString &port );
+ int portState( const TQString &port );
/**
* Sets the port with the given name to the given state
*/
- void setPortState( const QString &port, int state );
+ void setPortState( const TQString &port, int state );
/**
* Sets the port with the given name to the given type
*/
- void setPortType( const QString &port, int type );
+ void setPortType( const TQString &port, int type );
/**
* Returns the initial port type (intput/output) for the given port.
* Each pin type occupies one bit of the returned integer.
*/
- int portType( const QString &port );
+ int portType( const TQString &port );
/**
* Sets the variable "name" to the initial value "value. If the variable
* already exists, its value will be changed. Else, the variable will be
* created.
*/
- void setVariable( const QString &name, QVariant value, bool permanent = true );
+ void setVariable( const TQString &name, TQVariant value, bool permanent = true );
/**
- * Returns the list of initial variables as a QStringList, just the names
+ * Returns the list of initial variables as a TQStringList, just the names
* without the values. Generated from the VariableMap m_variables.
*/
- QStringList variableNames();
+ TQStringList variableNames();
/**
* Returns a pointer to the variable info with the given name, or NULL
* if the variable is not found
*/
- VariableInfo *variableInfo( const QString &name );
+ VariableInfo *variableInfo( const TQString &name );
/**
* Deletes the variable with the given name, returns true if successul
* (i.e. a variable with that name existed), or false if not
*/
- bool deleteVariable( const QString &name );
+ bool deleteVariable( const TQString &name );
/**
* Removes all variables
*/
@@ -191,7 +193,7 @@ public:
/**
* Returns the pic pin mapping with the given id.
*/
- PinMapping pinMapping( const QString & id ) const;
+ PinMapping pinMapping( const TQString & id ) const;
/**
* Returns the list of different Pin Mappings;
*/