diff options
Diffstat (limited to 'src/sources/source.cpp')
-rw-r--r-- | src/sources/source.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/sources/source.cpp b/src/sources/source.cpp index 605537f..20885b0 100644 --- a/src/sources/source.cpp +++ b/src/sources/source.cpp @@ -20,16 +20,16 @@ #include "source.h" #include <math.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klocale.h> #include <kglobal.h> //#include "kdebug.h" -Source::Source(QWidget* inParent): +Source::Source(TQWidget* inParent): mID(""), mPosition(0), mName(""), @@ -46,7 +46,7 @@ Source::Source(QWidget* inParent): Source::~Source(){ } -const QString& Source::getID() const{ +const TQString& Source::getID() const{ return mID; } @@ -60,11 +60,11 @@ void Source::setPosition(int inPosition, KConfig* inKConfig){ inKConfig->writeEntry(mID + "_position", mPosition); } -const QString& Source::getName() const{ +const TQString& Source::getName() const{ return mName; } -const QString& Source::getDescription() const{ +const TQString& Source::getDescription() const{ return mDescription; } @@ -96,18 +96,18 @@ void Source::setMaybeEnabled(bool inMaybeEnabled){ } } -QWidget* Source::createPrefs(QWidget* inParent){ +TQWidget* Source::createPrefs(TQWidget* inParent){ if(!mSourcePrefs){ mSourcePrefs = new SourcePrefs(inParent, "sourceprefsui"); // disable nameCheckBox if taskbarCheckBox is disabled - connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mSourcePrefs->nameCheckBox, SLOT(setEnabled(bool))); + connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mSourcePrefs->nameCheckBox, TQT_SLOT(setEnabled(bool))); // add prefs widgets from sub classes createSubPrefs(mSourcePrefs); // add bottom vspacer - mSourcePrefs->layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding) ); + mSourcePrefs->tqlayout()->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding) ); updatePrefsGUI(); // fill the prefs gui } @@ -138,9 +138,9 @@ void Source::setPrefsWidgetsEnabled(bool isEnabled, bool isShownOnApplet){ mSourcePrefs->tooltipCheckBox->setEnabled(isEnabled); } -void Source::addPrefs(QWidget* inParent){ +void Source::addPrefs(TQWidget* inParent){ if(inParent != NULL) - mSourcePrefs->layout()->add(inParent); + mSourcePrefs->tqlayout()->add(inParent); } void Source::applyPrefs(){ @@ -194,27 +194,27 @@ void Source::loadPrefs(KConfig* inKConfig){ } // utility methods -QString Source::formatTemperature(const QString& temp) const { +TQString Source::formatTemperature(const TQString& temp) const { if(mIsMetric) { - return temp + QString::fromUtf8(" °C"); + return temp + TQString::fromUtf8(" °C"); } else { - return QString::number(celsiusToFahrenheit(temp.toInt())).append(QString::fromUtf8(" °F")); + return TQString::number(celsiusToFahrenheit(temp.toInt())).append(TQString::fromUtf8(" °F")); } } -QString Source::KHzinHumanReadable( uint value ) const{ +TQString Source::KHzinHumanReadable( uint value ) const{ if( value >= 1000000 ) - return QString::number( round(value/1000000.0, 1) ) + " GHz"; + return TQString::number( round(value/1000000.0, 1) ) + " GHz"; else if( value >= 1000 ) - return QString::number( round(value/1000.0, -1) ) + " MHz"; + return TQString::number( round(value/1000.0, -1) ) + " MHz"; else - return QString::number( value ) + " KHz"; + return TQString::number( value ) + " KHz"; } double Source::round(double inValue, int inDigits) const{ return floor(inValue * pow( 10, inDigits) + 0.5) * pow(10, -inDigits); } int Source::celsiusToFahrenheit(int inCelsius) const{ - return qRound(1.8 * inCelsius + 32); + return tqRound(1.8 * inCelsius + 32); } void Source::realizeWidget(){ |