diff options
Diffstat (limited to 'src/variant.cpp')
-rw-r--r-- | src/variant.cpp | 26 |
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; |