summaryrefslogtreecommitdiffstats
path: root/src/microsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/microsettings.cpp')
-rw-r--r--src/microsettings.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/src/microsettings.cpp b/src/microsettings.cpp
index 4554dc9..6790582 100644
--- a/src/microsettings.cpp
+++ b/src/microsettings.cpp
@@ -18,20 +18,20 @@
VariableInfo::VariableInfo()
{
type = MicroSettings::vt_unknown;
- value = QVariant(0);
+ value = TQVariant(0);
initAtStart = false;
permanent = false;
}
-void VariableInfo::setValue( const QVariant & _value )
+void VariableInfo::setValue( const TQVariant & _value )
{
value = _value;
}
-QString VariableInfo::valueAsString() const
+TQString VariableInfo::valueAsString() const
{
- if ( value.canCast(QVariant::String) ) return value.toString();
- if ( value.canCast(QVariant::Int) ) return QString::number(value.toInt());
+ if ( value.canCast(TQVariant::String) ) return value.toString();
+ if ( value.canCast(TQVariant::Int) ) return TQString::number(value.toInt());
return "0";
}
//END class VariableInfo
@@ -40,14 +40,14 @@ QString VariableInfo::valueAsString() const
//BEGIN class PinSettings
PinSettings::PinSettings()
- : QObject()
+ : TQObject()
{
m_type = PinSettings::pt_input;
m_state = PinSettings::ps_off;
m_id = "pin";
}
-PinSettings::PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const QString &id, const QString &port )
+PinSettings::PinSettings( PinSettings::pin_type _type, PinSettings::pin_state _state, const TQString &id, const TQString &port )
{
m_type = _type;
m_state = _state;
@@ -81,12 +81,12 @@ MicroSettings::MicroSettings( MicroInfo * microInfo )
{
_microInfo = microInfo;
- QStringList portNames = _microInfo->package()->portNames();
- const QStringList::iterator portNamesEnd = portNames.end();
- for ( QStringList::iterator it = portNames.begin(); it != portNamesEnd; ++it )
+ TQStringList portNames = _microInfo->package()->portNames();
+ const TQStringList::iterator portNamesEnd = portNames.end();
+ for ( TQStringList::iterator it = portNames.begin(); it != portNamesEnd; ++it )
{
PinSettingsList portPins;
- QStringList pinIDs;
+ TQStringList pinIDs;
pinIDs = _microInfo->package()->pinIDs( PicPin::type_bidir | PicPin::type_open, *it );
pinIDs.sort();
const int numPins = pinIDs.size();
@@ -110,13 +110,13 @@ MicroSettings::~MicroSettings()
// delete m_variableList;
}
-void MicroSettings::setPinType( const QString &id, PinSettings::pin_type type )
+void MicroSettings::setPinType( const TQString &id, PinSettings::pin_type type )
{
PinSettings *pin = pinWithID(id);
if (pin) pin->setType(type);
}
-void MicroSettings::setPinState( const QString &id, PinSettings::pin_state state )
+void MicroSettings::setPinState( const TQString &id, PinSettings::pin_state state )
{
PinSettings *pin = pinWithID(id);
if (pin)
@@ -124,7 +124,7 @@ void MicroSettings::setPinState( const QString &id, PinSettings::pin_state state
}
-PinSettings* MicroSettings::pinWithID( const QString &id )
+PinSettings* MicroSettings::pinWithID( const TQString &id )
{
const PinSettingsList::iterator pinListEnd = m_pinSettingsList.end();
for ( PinSettingsList::iterator it = m_pinSettingsList.begin(); it != pinListEnd; ++it )
@@ -134,9 +134,9 @@ PinSettings* MicroSettings::pinWithID( const QString &id )
return 0L;
}
-int MicroSettings::portState( const QString &port )
+int MicroSettings::portState( const TQString &port )
{
- if ( microInfo()->package()->portNames().findIndex(port) == -1 ) return -1;
+ if ( microInfo()->package()->portNames().tqfindIndex(port) == -1 ) return -1;
int pinPower = 1;
int num = 0;
@@ -155,9 +155,9 @@ int MicroSettings::portState( const QString &port )
return num;
}
-int MicroSettings::portType( const QString &port )
+int MicroSettings::portType( const TQString &port )
{
- if ( microInfo()->package()->portNames().findIndex(port) == -1 ) return -1;
+ if ( microInfo()->package()->portNames().tqfindIndex(port) == -1 ) return -1;
int pinPower = 1;
int num = 0;
@@ -175,9 +175,9 @@ int MicroSettings::portType( const QString &port )
return num;
}
-void MicroSettings::setPortState( const QString &port, int state )
+void MicroSettings::setPortState( const TQString &port, int state )
{
- PortList::iterator plit = m_ports.find(port);
+ PortList::iterator plit = m_ports.tqfind(port);
if ( plit == m_ports.end() ) return;
const PinSettingsList::iterator plitEnd = plit.data().end();
@@ -190,9 +190,9 @@ void MicroSettings::setPortState( const QString &port, int state )
}
}
-void MicroSettings::setPortType( const QString &port, int type )
+void MicroSettings::setPortType( const TQString &port, int type )
{
- PortList::iterator plit = m_ports.find(port);
+ PortList::iterator plit = m_ports.tqfind(port);
if ( plit == m_ports.end() ) return;
const PinSettingsList::iterator plitEnd = plit.data().end();
@@ -243,18 +243,18 @@ void MicroSettings::restoreFromMicroData( const MicroData &microData )
}
}
- const QStringMap::const_iterator variableMapEnd = microData.variableMap.end();
- for ( QStringMap::const_iterator it = microData.variableMap.begin(); it != variableMapEnd; ++it )
+ const TQStringMap::const_iterator variableMapEnd = microData.variableMap.end();
+ for ( TQStringMap::const_iterator it = microData.variableMap.begin(); it != variableMapEnd; ++it )
{
setVariable( it.key(), it.data(), true );
}
}
-void MicroSettings::setVariable( const QString &name, QVariant value, bool permanent )
+void MicroSettings::setVariable( const TQString &name, TQVariant value, bool permanent )
{
if ( name.isNull() ) return;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() )
{
it.data().setValue(value);
@@ -272,9 +272,9 @@ void MicroSettings::setVariable( const QString &name, QVariant value, bool perma
}
-QStringList MicroSettings::variableNames()
+TQStringList MicroSettings::variableNames()
{
- QStringList list;
+ TQStringList list;
const VariableMap::iterator variableMapEnd = m_variableMap.end();
for ( VariableMap::iterator it = m_variableMap.begin(); it != variableMapEnd; ++it )
{
@@ -284,10 +284,10 @@ QStringList MicroSettings::variableNames()
}
-VariableInfo* MicroSettings::variableInfo( const QString &name )
+VariableInfo* MicroSettings::variableInfo( const TQString &name )
{
if ( name.isNull() ) return 0l;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() ) {
return &(it.data());
} else {
@@ -296,10 +296,10 @@ VariableInfo* MicroSettings::variableInfo( const QString &name )
}
-bool MicroSettings::deleteVariable( const QString &name )
+bool MicroSettings::deleteVariable( const TQString &name )
{
if ( name.isNull() ) return false;
- VariableMap::iterator it = m_variableMap.find(name);
+ VariableMap::iterator it = m_variableMap.tqfind(name);
if ( it != m_variableMap.end() )
{
m_variableMap.erase(it);
@@ -316,7 +316,7 @@ void MicroSettings::removeAllVariables()
}
-PinMapping MicroSettings::pinMapping( const QString & id ) const
+PinMapping MicroSettings::pinMapping( const TQString & id ) const
{
return m_pinMappings[id];
}