summaryrefslogtreecommitdiffstats
path: root/src/variant.cpp
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/variant.cpp
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/variant.cpp')
-rw-r--r--src/variant.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/variant.cpp b/src/variant.cpp
index 10422cd..940eb6e 100644
--- a/src/variant.cpp
+++ b/src/variant.cpp
@@ -15,7 +15,7 @@
#include <klocale.h>
Variant::Variant( Type::Value type )
- : QObject()
+ : TQObject()
{
m_type = type;
m_bSetDefault = false;
@@ -24,7 +24,7 @@ Variant::Variant( Type::Value type )
m_minValue = 1e-6;
m_maxValue = 1e9;
m_minAbsValue = 1e-6;
- m_colorScheme = ColorCombo::QtStandard;
+ m_colorScheme = ColorCombo::TQtStandard;
if ( type == Type::Color )
{
// this value is taken from ColorCombo and should ideally be put somewhere...
@@ -45,23 +45,23 @@ void Variant::setType( Type::Value type )
}
-void Variant::appendAllowed(QString string)
+void Variant::appendAllowed(TQString string)
{
- if ( !m_allowed.contains(string) ) {
+ if ( !m_allowed.tqcontains(string) ) {
m_allowed.append(string);
}
}
-void Variant::setAllowed(QStringList stringList)
+void Variant::setAllowed(TQStringList stringList)
{
// Ideally, we should check for duplicates in whatever is setting the
// allowed strings, but it is a lot easier and permanent to do it here
m_allowed.clear();
- const QStringList::iterator end = stringList.end();
- for ( QStringList::iterator it = stringList.begin(); it != end; ++it )
+ const TQStringList::iterator end = stringList.end();
+ for ( TQStringList::iterator it = stringList.begin(); it != end; ++it )
{
- if ( !m_allowed.contains(*it) ) {
+ if ( !m_allowed.tqcontains(*it) ) {
m_allowed.append(*it);
}
}
@@ -86,14 +86,14 @@ void Variant::setMaxValue( const double value )
}
}
-QString Variant::displayString() const
+TQString Variant::displayString() const
{
switch(type())
{
case Variant::Type::Double:
{
double numValue = m_value.toDouble();
- return QString::number( numValue / CNItem::getMultiplier(numValue) ) + " " + CNItem::getNumberMag(numValue) + m_unit;
+ return TQString::number( numValue / CNItem::getMultiplier(numValue) ) + " " + CNItem::getNumberMag(numValue) + m_unit;
}
case Variant::Type::Int:
@@ -107,7 +107,7 @@ QString Variant::displayString() const
}
}
-void Variant::setValue( const QVariant& val )
+void Variant::setValue( const TQVariant& val )
{
if (!m_bSetDefault)
setDefaultValue(val);
@@ -115,12 +115,12 @@ void Variant::setValue( const QVariant& val )
if ( m_value == val )
return;
- const QVariant old = m_value;
+ const TQVariant old = m_value;
m_value = val;
emit( valueChanged( val, old ) );
}
-void Variant::setDefaultValue( QVariant val )
+void Variant::setDefaultValue( TQVariant val )
{
m_defaultValue = val;
m_bSetDefault = true;