diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:52:55 +0000 |
commit | 5f5ee2367157176ed223b86343eb0a9e4022e020 (patch) | |
tree | 6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /ksim/monitors/lm_sensors | |
parent | 4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff) | |
download | tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors/lm_sensors')
-rw-r--r-- | ksim/monitors/lm_sensors/ksimsensors.cpp | 30 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/ksimsensors.h | 8 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/ksimsensorsiface.h | 4 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/sensorbase.cpp | 70 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/sensorbase.h | 56 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/sensorsconfig.cpp | 102 | ||||
-rw-r--r-- | ksim/monitors/lm_sensors/sensorsconfig.h | 16 |
7 files changed, 143 insertions, 143 deletions
diff --git a/ksim/monitors/lm_sensors/ksimsensors.cpp b/ksim/monitors/lm_sensors/ksimsensors.cpp index e63f5cf..eb2614f 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.cpp +++ b/ksim/monitors/lm_sensors/ksimsensors.cpp @@ -27,7 +27,7 @@ #include <kaboutdata.h> #include <kconfig.h> -#include <qlayout.h> +#include <tqlayout.h> #include <label.h> #include <themetypes.h> @@ -58,7 +58,7 @@ KSim::PluginPage *PluginModule::createConfigPage(const char *className) void PluginModule::showAbout() { - QString version = kapp->aboutData()->version(); + TQString version = kapp->aboutData()->version(); KAboutData aboutData(instanceName(), I18N_NOOP("KSim Sensors Plugin"), version.latin1(), @@ -75,10 +75,10 @@ SensorsView::SensorsView(KSim::PluginObject *parent, const char *name) : DCOPObject("sensors"), KSim::PluginView(parent, name) { config()->setGroup("Sensors"); - (new QVBoxLayout(this))->setAutoAdd(true); + (new TQVBoxLayout(this))->setAutoAdd(true); - connect(SensorBase::self(), SIGNAL(updateSensors(const SensorList &)), - this, SLOT(updateSensors(const SensorList &))); + connect(SensorBase::self(), TQT_SIGNAL(updateSensors(const SensorList &)), + this, TQT_SLOT(updateSensors(const SensorList &))); insertSensors(); } @@ -95,8 +95,8 @@ void SensorsView::reparseConfig() SensorBase::self()->setDisplayFahrenheit(displayFahrenheit); SensorBase::self()->setUpdateSpeed(updateVal * 1000); - QString label; - QStringList names; + TQString label; + TQStringList names; SensorItemList sensorItemList; const SensorList &list = SensorBase::self()->sensorsList(); @@ -104,7 +104,7 @@ void SensorsView::reparseConfig() for (it = list.begin(); it != list.end(); ++it) { config()->setGroup("Sensors"); label = (*it).sensorType() + "/" + (*it).sensorName(); - names = QStringList::split(':', config()->readEntry(label)); + names = TQStringList::split(':', config()->readEntry(label)); if (names[0] == "1") sensorItemList.append(SensorItem((*it).sensorId(), names[1])); } @@ -122,8 +122,8 @@ void SensorsView::insertSensors(bool createList) const SensorList &list = SensorBase::self()->sensorsList(); if (createList) { - QString label; - QStringList names; + TQString label; + TQStringList names; config()->setGroup("Sensors"); bool displayFahrenheit = config()->readBoolEntry("displayFahrenheit", false); @@ -134,7 +134,7 @@ void SensorsView::insertSensors(bool createList) SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { label = (*it).sensorType() + "/" + (*it).sensorName(); - names = QStringList::split(':', config()->readEntry(label)); + names = TQStringList::split(':', config()->readEntry(label)); if (names[0] == "1") m_sensorItemList.append(SensorItem((*it).sensorId(), names[1])); } @@ -167,12 +167,12 @@ void SensorsView::updateSensors(const SensorList &sensorList) } } -QString SensorsView::sensorValue(const QString &sensor, - const QString &label1) +TQString SensorsView::sensorValue(const TQString &sensor, + const TQString &label1) { const SensorList &list = SensorBase::self()->sensorsList(); config()->setGroup("Sensors"); - QStringList names = QStringList::split(':', + TQStringList names = TQStringList::split(':', config()->readEntry(sensor + "/" + label1)); if (names[0] == "0" || list.isEmpty()) @@ -181,7 +181,7 @@ QString SensorsView::sensorValue(const QString &sensor, SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { if (sensor == (*it).sensorType() && label1 == (*it).sensorName()) { - return names[1] + QString(": ") + (*it).sensorValue() + (*it).sensorUnit(); + return names[1] + TQString(": ") + (*it).sensorValue() + (*it).sensorUnit(); } } diff --git a/ksim/monitors/lm_sensors/ksimsensors.h b/ksim/monitors/lm_sensors/ksimsensors.h index 8446931..a8a0482 100644 --- a/ksim/monitors/lm_sensors/ksimsensors.h +++ b/ksim/monitors/lm_sensors/ksimsensors.h @@ -53,7 +53,7 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface ~SensorsView(); virtual void reparseConfig(); - virtual QString sensorValue(const QString &, const QString &); + virtual TQString sensorValue(const TQString &, const TQString &); private slots: void updateSensors(const SensorList &); @@ -65,7 +65,7 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface { public: SensorItem() : id(-1), label(0) {} - SensorItem(int i, const QString &na) + SensorItem(int i, const TQString &na) : id(i), name(na), label(0) {} ~SensorItem() { delete label; } @@ -81,11 +81,11 @@ class SensorsView : public KSim::PluginView, public KSimSensorsIface } int id; - QString name; + TQString name; KSim::Label *label; }; - typedef QValueList<SensorItem> SensorItemList; + typedef TQValueList<SensorItem> SensorItemList; SensorItemList m_sensorItemList; }; #endif diff --git a/ksim/monitors/lm_sensors/ksimsensorsiface.h b/ksim/monitors/lm_sensors/ksimsensorsiface.h index 4bd50ce..4ee0d13 100644 --- a/ksim/monitors/lm_sensors/ksimsensorsiface.h +++ b/ksim/monitors/lm_sensors/ksimsensorsiface.h @@ -26,8 +26,8 @@ class KSimSensorsIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual QString sensorValue(const QString &sensorType, - const QString &sensorName) = 0; + virtual TQString sensorValue(const TQString &sensorType, + const TQString &sensorName) = 0; }; #endif // KSIMSENSORSIFACE_H diff --git a/ksim/monitors/lm_sensors/sensorbase.cpp b/ksim/monitors/lm_sensors/sensorbase.cpp index 9ccb247..a0b82c5 100644 --- a/ksim/monitors/lm_sensors/sensorbase.cpp +++ b/ksim/monitors/lm_sensors/sensorbase.cpp @@ -23,14 +23,14 @@ #include <kdebug.h> #include <klocale.h> -#include <qglobal.h> +#include <tqglobal.h> #include <klibloader.h> #include <kstandarddirs.h> #include <kconfig.h> -#include <qtimer.h> -#include <qfile.h> -#include <qregexp.h> +#include <tqtimer.h> +#include <tqfile.h> +#include <tqregexp.h> #include <stdio.h> @@ -50,16 +50,16 @@ SensorBase *SensorBase::self() return m_self; } -SensorBase::SensorBase() : QObject() +SensorBase::SensorBase() : TQObject() { KSim::Config::config()->setGroup("Sensors"); - QCString sensorsName("libsensors.so"); + TQCString sensorsName("libsensors.so"); - QStringList sensorLocations = KSim::Config::config()->readListEntry("sensorLocations"); + TQStringList sensorLocations = KSim::Config::config()->readListEntry("sensorLocations"); - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for (it = sensorLocations.begin(); it != sensorLocations.end(); ++it) { - if (QFile::exists((*it).local8Bit() + sensorsName)) { + if (TQFile::exists((*it).local8Bit() + sensorsName)) { m_libLocation = (*it).local8Bit() + sensorsName; break; } @@ -75,8 +75,8 @@ SensorBase::SensorBase() : QObject() m_hasNVControl = XNVCTRLQueryExtension(qt_xdisplay(), &eventBase, &errorBase) == True; } - m_updateTimer = new QTimer(this); - connect(m_updateTimer, SIGNAL(timeout()), SLOT(update())); + m_updateTimer = new TQTimer(this); + connect(m_updateTimer, TQT_SIGNAL(timeout()), TQT_SLOT(update())); } SensorBase::~SensorBase() @@ -120,13 +120,13 @@ void SensorBase::update() m_label(*chip, sFeature->number, &name); m_feature(*chip, sFeature->number, &value); - float returnValue = formatValue(QString::fromUtf8(name), float(value)); - QString label = formatString(QString::fromUtf8(name), returnValue); - QString chipset = chipsetString(chip); + float returnValue = formatValue(TQString::fromUtf8(name), float(value)); + TQString label = formatString(TQString::fromUtf8(name), returnValue); + TQString chipset = chipsetString(chip); m_sensorList.append(SensorInfo(currentSensor++, label, - QString::fromUtf8(name), QString::fromUtf8(chip->prefix), - chipset, sensorType(QString::fromLatin1(name)))); + TQString::fromUtf8(name), TQString::fromUtf8(chip->prefix), + chipset, sensorType(TQString::fromLatin1(name)))); } } } @@ -134,15 +134,15 @@ void SensorBase::update() if (m_hasNVControl) { int temp = 0; if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_GPU_CORE_TEMPERATURE, &temp)) { - QString name = QString::fromLatin1("GPU Temp"); - m_sensorList.append(SensorInfo(currentSensor++, QString::number(temp), - name, QString::null, QString::null, sensorType(name))); + TQString name = TQString::fromLatin1("GPU Temp"); + m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), + name, TQString::null, TQString::null, sensorType(name))); } if (XNVCTRLQueryAttribute(qt_xdisplay(), qt_xscreen(), 0 /* not used? */, NV_CTRL_AMBIENT_TEMPERATURE, &temp)) { - QString name = QString::fromLatin1("GPU Ambient Temp"); - m_sensorList.append(SensorInfo(currentSensor++, QString::number(temp), - name, QString::null, QString::null, sensorType(name))); + TQString name = TQString::fromLatin1("GPU Ambient Temp"); + m_sensorList.append(SensorInfo(currentSensor++, TQString::number(temp), + name, TQString::null, TQString::null, sensorType(name))); } } @@ -210,34 +210,34 @@ bool SensorBase::init() return true; } -QString SensorBase::sensorType(const QString &name) +TQString SensorBase::sensorType(const TQString &name) { if (name.findRev("fan", -1, false) != -1) return i18n("Rounds per minute", " RPM"); if (name.findRev("temp", -1, false) != -1) if (SensorBase::fahrenheit()) - return QString::fromLatin1("°F"); + return TQString::fromLatin1("°F"); else - return QString::fromLatin1("°C"); + return TQString::fromLatin1("°C"); - if (name.findRev(QRegExp("[^\\+]?[^\\-]?V$")) != -1) + if (name.findRev(TQRegExp("[^\\+]?[^\\-]?V$")) != -1) return i18n("Volt", "V"); - return QString::null; + return TQString::null; } -QString SensorBase::chipsetString(const ChipName *c) +TQString SensorBase::chipsetString(const ChipName *c) { - QString data = QString::fromUtf8(c->prefix); + TQString data = TQString::fromUtf8(c->prefix); if (c->bus == BusISA) - return QString().sprintf("%s-isa-%04x", data.utf8().data(), c->addr); + return TQString().sprintf("%s-isa-%04x", data.utf8().data(), c->addr); - return QString().sprintf("%s-i2c-%d-%02x", data.utf8().data(), c->bus, c->addr); + return TQString().sprintf("%s-i2c-%d-%02x", data.utf8().data(), c->bus, c->addr); } -float SensorBase::formatValue(const QString &label, float value) +float SensorBase::formatValue(const TQString &label, float value) { if (label.findRev("temp", -1, false) != -1) return toFahrenheit(value); @@ -245,10 +245,10 @@ float SensorBase::formatValue(const QString &label, float value) return value; } -QString SensorBase::formatString(const QString &label, float value) +TQString SensorBase::formatString(const TQString &label, float value) { if (label.findRev("fan", -1, false) != -1) - return QString::number(value); + return TQString::number(value); - return QString::number(value,'f',2); + return TQString::number(value,'f',2); } diff --git a/ksim/monitors/lm_sensors/sensorbase.h b/ksim/monitors/lm_sensors/sensorbase.h index c819d48..083cfd8 100644 --- a/ksim/monitors/lm_sensors/sensorbase.h +++ b/ksim/monitors/lm_sensors/sensorbase.h @@ -20,9 +20,9 @@ #ifndef SENSORBASE_H #define SENSORBASE_H -#include <qobject.h> -#include <qvaluelist.h> -#include <qcstring.h> +#include <tqobject.h> +#include <tqvaluelist.h> +#include <tqcstring.h> class QTimer; class KLibrary; @@ -32,11 +32,11 @@ class SensorInfo public: SensorInfo() {} SensorInfo(int id, - const QString &sensorValue, - const QString &sensorName, - const QString &sensorType, - const QString &chipsetName, - const QString &sensorUnit) + const TQString &sensorValue, + const TQString &sensorName, + const TQString &sensorType, + const TQString &chipsetName, + const TQString &sensorUnit) : m_id(id), m_sensor(sensorValue), m_sensorName(sensorName), m_sensorType(sensorType), @@ -50,41 +50,41 @@ class SensorInfo /** * @return the current value, eg: 5000 */ - const QString &sensorValue() const { return m_sensor; } + const TQString &sensorValue() const { return m_sensor; } /** * @return the sensor name, eg: temp1, fan2 */ - const QString &sensorName() const { return m_sensorName; } + const TQString &sensorName() const { return m_sensorName; } /** * @return the sensor type name, eg: w83782d */ - const QString &sensorType() const { return m_sensorType; } + const TQString &sensorType() const { return m_sensorType; } /** * @return the chipset name, eg: w83782d-i2c-0-2d */ - const QString &chipsetName() const { return m_chipsetName; } + const TQString &chipsetName() const { return m_chipsetName; } /** * @return the unit name, eg: RPM, °C or °F if display fahrenheit is enabled */ - const QString &sensorUnit() const { return m_sensorUnit; } + const TQString &sensorUnit() const { return m_sensorUnit; } private: int m_id; - QString m_sensor; - QString m_sensorName; - QString m_sensorType; - QString m_chipsetName; - QString m_sensorUnit; + TQString m_sensor; + TQString m_sensorName; + TQString m_sensorType; + TQString m_chipsetName; + TQString m_sensorUnit; }; -class SensorList : public QValueList<SensorInfo> +class SensorList : public TQValueList<SensorInfo> { public: SensorList() {} SensorList(const SensorList &sensorList) - : QValueList<SensorInfo>(sensorList) {} - SensorList(const QValueList<SensorInfo> &sensorList) - : QValueList<SensorInfo>(sensorList) {} + : TQValueList<SensorInfo>(sensorList) {} + SensorList(const TQValueList<SensorInfo> &sensorList) + : TQValueList<SensorInfo>(sensorList) {} SensorList(const SensorInfo &sensor) { append(sensor); } }; @@ -144,15 +144,15 @@ class SensorBase : public QObject bool init(); float toFahrenheit(float value); - QString sensorType(const QString &name); - QString chipsetString(const ChipName *c); - float formatValue(const QString &label, float value); - QString formatString(const QString &label, float value); + TQString sensorType(const TQString &name); + TQString chipsetString(const ChipName *c); + float formatValue(const TQString &label, float value); + TQString formatString(const TQString &label, float value); SensorList m_sensorList; - QTimer *m_updateTimer; + TQTimer *m_updateTimer; KLibrary *m_library; - QCString m_libLocation; + TQCString m_libLocation; bool m_loaded; bool m_fahrenheit; diff --git a/ksim/monitors/lm_sensors/sensorsconfig.cpp b/ksim/monitors/lm_sensors/sensorsconfig.cpp index 6e2b4b3..2ab1235 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.cpp +++ b/ksim/monitors/lm_sensors/sensorsconfig.cpp @@ -29,21 +29,21 @@ #include <kdebug.h> #include <kinputdialog.h> -#include <qtimer.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcheckbox.h> -#include <qcursor.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> +#include <tqtimer.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqcursor.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> class SensorViewItem : public QCheckListItem { public: - SensorViewItem(QListView *parent, const QString &text1, - const QString &text2, const QString &text3, - const QString &text4) - : QCheckListItem(parent, text1, CheckBox) + SensorViewItem(TQListView *parent, const TQString &text1, + const TQString &text2, const TQString &text3, + const TQString &text4) + : TQCheckListItem(parent, text1, CheckBox) { setText(1, text2); setText(2, text3); @@ -54,7 +54,7 @@ class SensorViewItem : public QCheckListItem SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) : KSim::PluginPage(parent, name) { - m_layout = new QGridLayout(this); + m_layout = new TQGridLayout(this); m_layout->setSpacing(6); m_neverShown = true; @@ -67,36 +67,36 @@ SensorsConfig::SensorsConfig(KSim::PluginObject *parent, const char *name) m_sensorView->setColumnWidth(1, 60); m_sensorView->setColumnWidth(2, 80); m_sensorView->setAllColumnsShowFocus(true); - connect(m_sensorView, SIGNAL(contextMenu(KListView *, - QListViewItem *, const QPoint &)), this, SLOT(menu(KListView *, - QListViewItem *, const QPoint &))); + connect(m_sensorView, TQT_SIGNAL(contextMenu(KListView *, + TQListViewItem *, const TQPoint &)), this, TQT_SLOT(menu(KListView *, + TQListViewItem *, const TQPoint &))); - connect( m_sensorView, SIGNAL( doubleClicked( QListViewItem * ) ), - SLOT( modify( QListViewItem * ) ) ); + connect( m_sensorView, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + TQT_SLOT( modify( TQListViewItem * ) ) ); m_layout->addMultiCellWidget(m_sensorView, 1, 1, 0, 3); - m_modify = new QPushButton( this ); + m_modify = new TQPushButton( this ); m_modify->setText( i18n( "Modify..." ) ); - connect( m_modify, SIGNAL( clicked() ), SLOT( modify() ) ); + connect( m_modify, TQT_SIGNAL( clicked() ), TQT_SLOT( modify() ) ); m_layout->addMultiCellWidget( m_modify, 2, 2, 3, 3 ); - m_fahrenBox = new QCheckBox(i18n("Display Fahrenheit"), this); + m_fahrenBox = new TQCheckBox(i18n("Display Fahrenheit"), this); m_layout->addMultiCellWidget(m_fahrenBox, 3, 3, 0, 3); - m_updateLabel = new QLabel(this); + m_updateLabel = new TQLabel(this); m_updateLabel->setText(i18n("Update interval:")); - m_updateLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, - QSizePolicy::Fixed)); + m_updateLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(m_updateLabel, 4, 4, 0, 0); m_sensorSlider = new KIntSpinBox(this); m_layout->addMultiCellWidget(m_sensorSlider, 4, 4, 1, 1); - QLabel *intervalLabel = new QLabel(this); + TQLabel *intervalLabel = new TQLabel(this); intervalLabel->setText(i18n("seconds")); - intervalLabel->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, - QSizePolicy::Fixed)); + intervalLabel->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, + TQSizePolicy::Fixed)); m_layout->addMultiCellWidget(intervalLabel, 4, 4, 2, 2); } @@ -110,10 +110,10 @@ void SensorsConfig::saveConfig() config()->writeEntry("sensorUpdateValue", m_sensorSlider->value()); config()->writeEntry("displayFahrenheit", m_fahrenBox->isChecked()); - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) { + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) { config()->setGroup("Sensors"); config()->writeEntry(it.current()->text(2), - QString::number(static_cast<QCheckListItem *>(it.current())->isOn()) + TQString::number(static_cast<TQCheckListItem *>(it.current())->isOn()) + ":" + it.current()->text(1)); } } @@ -124,25 +124,25 @@ void SensorsConfig::readConfig() m_fahrenBox->setChecked(config()->readBoolEntry("displayFahrenheit", false)); m_sensorSlider->setValue(config()->readNumEntry("sensorUpdateValue", 15)); - QStringList names; - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) { + TQStringList names; + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) { config()->setGroup("Sensors"); - names = QStringList::split(":", config()->readEntry(it.current()->text(2), "0:")); + names = TQStringList::split(":", config()->readEntry(it.current()->text(2), "0:")); if (!names[1].isNull()) it.current()->setText(1, names[1]); - static_cast<QCheckListItem *>(it.current())->setOn(names[0].toInt()); + static_cast<TQCheckListItem *>(it.current())->setOn(names[0].toInt()); } } -void SensorsConfig::menu(KListView *, QListViewItem *, const QPoint &) +void SensorsConfig::menu(KListView *, TQListViewItem *, const TQPoint &) { - m_popupMenu = new QPopupMenu(this); + m_popupMenu = new TQPopupMenu(this); m_popupMenu->insertItem(i18n("Select All"), 1); m_popupMenu->insertItem(i18n("Unselect All"), 2); m_popupMenu->insertItem(i18n("Invert Selection"), 3); - switch (m_popupMenu->exec(QCursor::pos())) { + switch (m_popupMenu->exec(TQCursor::pos())) { case 1: selectAll(); break; @@ -159,20 +159,20 @@ void SensorsConfig::menu(KListView *, QListViewItem *, const QPoint &) void SensorsConfig::selectAll() { - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) - static_cast<QCheckListItem *>(it.current())->setOn(true); + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) + static_cast<TQCheckListItem *>(it.current())->setOn(true); } void SensorsConfig::unSelectAll() { - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) - static_cast<QCheckListItem *>(it.current())->setOn(false); + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) + static_cast<TQCheckListItem *>(it.current())->setOn(false); } void SensorsConfig::invertSelect() { - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) { - QCheckListItem *item = static_cast<QCheckListItem *>(it.current()); + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) { + TQCheckListItem *item = static_cast<TQCheckListItem *>(it.current()); if (item->isOn()) item->setOn(false); else @@ -185,8 +185,8 @@ void SensorsConfig::initSensors() const SensorList &sensorList = SensorBase::self()->sensorsList(); int i = 0; - QString label; - QStringList sensorInfo; + TQString label; + TQStringList sensorInfo; SensorList::ConstIterator it; for (it = sensorList.begin(); it != sensorList.end(); ++it) { label.sprintf("%02i", ++i); @@ -195,23 +195,23 @@ void SensorsConfig::initSensors() (*it).sensorValue() + (*it).sensorUnit()); } - QStringList names; - for (QListViewItemIterator it(m_sensorView); it.current(); ++it) { + TQStringList names; + for (TQListViewItemIterator it(m_sensorView); it.current(); ++it) { config()->setGroup("Sensors"); - names = QStringList::split(":", config()->readEntry(it.current()->text(2), "0:")); + names = TQStringList::split(":", config()->readEntry(it.current()->text(2), "0:")); if (!names[1].isNull()) it.current()->setText(1, names[1]); - static_cast<QCheckListItem *>(it.current())->setOn(names[0].toInt()); + static_cast<TQCheckListItem *>(it.current())->setOn(names[0].toInt()); } } -void SensorsConfig::modify( QListViewItem * item ) +void SensorsConfig::modify( TQListViewItem * item ) { if ( !item ) return; bool ok = false; - QString text = KInputDialog::getText( i18n( "Modify Sensor Label" ), i18n( "Sensor label:" ), + TQString text = KInputDialog::getText( i18n( "Modify Sensor Label" ), i18n( "Sensor label:" ), item->text( 1 ), &ok, this ); if ( ok ) @@ -223,7 +223,7 @@ void SensorsConfig::modify() modify( m_sensorView->selectedItem() ); } -void SensorsConfig::showEvent(QShowEvent *) +void SensorsConfig::showEvent(TQShowEvent *) { if (m_neverShown) { initSensors(); @@ -233,7 +233,7 @@ void SensorsConfig::showEvent(QShowEvent *) const SensorList &list = SensorBase::self()->sensorsList(); SensorList::ConstIterator it; for (it = list.begin(); it != list.end(); ++it) { - QListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1); + TQListViewItem *item = m_sensorView->findItem((*it).sensorName(), 1); if (item) item->setText(3, (*it).sensorValue() + (*it).sensorUnit()); } diff --git a/ksim/monitors/lm_sensors/sensorsconfig.h b/ksim/monitors/lm_sensors/sensorsconfig.h index 28d656e..60410f4 100644 --- a/ksim/monitors/lm_sensors/sensorsconfig.h +++ b/ksim/monitors/lm_sensors/sensorsconfig.h @@ -44,26 +44,26 @@ class SensorsConfig : public KSim::PluginPage void readConfig(); private slots: - void menu(KListView *, QListViewItem *, const QPoint &); + void menu(KListView *, TQListViewItem *, const TQPoint &); void initSensors(); void selectAll(); void unSelectAll(); void invertSelect(); - void modify( QListViewItem * ); + void modify( TQListViewItem * ); void modify(); protected: - void showEvent(QShowEvent *); + void showEvent(TQShowEvent *); private: bool m_neverShown; - QLabel *m_updateLabel; + TQLabel *m_updateLabel; KIntSpinBox *m_sensorSlider; KListView *m_sensorView; - QCheckBox *m_fahrenBox; - QGridLayout *m_layout; - QPopupMenu *m_popupMenu; - QPushButton * m_modify; + TQCheckBox *m_fahrenBox; + TQGridLayout *m_layout; + TQPopupMenu *m_popupMenu; + TQPushButton * m_modify; }; #endif |