summaryrefslogtreecommitdiffstats
path: root/src/sources/ibmacpithermalsrc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sources/ibmacpithermalsrc.cpp')
-rw-r--r--src/sources/ibmacpithermalsrc.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sources/ibmacpithermalsrc.cpp b/src/sources/ibmacpithermalsrc.cpp
index f19281c..770c885 100644
--- a/src/sources/ibmacpithermalsrc.cpp
+++ b/src/sources/ibmacpithermalsrc.cpp
@@ -19,13 +19,13 @@
***************************************************************************/
#include "ibmacpithermalsrc.h"
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <klocale.h>
//#include "hal/libhal.h"
// hal-get-property --udi /org/freedesktop/Hal/devices/computer --key system.product
-IBMACPIThermalSrc::IBMACPIThermalSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex):
+IBMACPIThermalSrc::IBMACPIThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex):
LabelSource(inParent),
mIndex(inIndex),
mSourceFile(inSourceFile.name()),
@@ -39,15 +39,15 @@ IBMACPIThermalSrc::IBMACPIThermalSrc(QWidget* inParent, const QFile& inSourceFil
IBMACPIThermalSrc::~IBMACPIThermalSrc(){
}
-std::list<Source*>IBMACPIThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>IBMACPIThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile ibmFile( "/proc/acpi/ibm/thermal" );
+ TQFile ibmFile( "/proc/acpi/ibm/thermal" );
if(ibmFile.open(IO_ReadOnly)){
- QTextStream textStream( &ibmFile );
- QString s = textStream.readLine();
+ TQTextStream textStream( &ibmFile );
+ TQString s = textStream.readLine();
ibmFile.close();
s = s.remove("temperatures:");
- QStringList entries = QStringList::split(' ' ,s);
+ TQStringList entries = TQStringList::split(' ' ,s);
for ( unsigned int i = 0; i < entries.size(); i++ ){
if(!entries[i].startsWith("-") && !entries[i].startsWith("0"))
list.push_back(new IBMACPIThermalSrc(inParent, ibmFile, i));
@@ -56,19 +56,19 @@ std::list<Source*>IBMACPIThermalSrc::createInstances(QWidget* inParent){
return list;
}
-QString IBMACPIThermalSrc::fetchValue(){
- QString s = "n/a";
+TQString IBMACPIThermalSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream( &mSourceFile );
+ TQTextStream textStream( &mSourceFile );
s = textStream.readLine();
mSourceFile.close();
- s = s.section(':', 1, 1).section(' ', mIndex, mIndex, QString::SectionSkipEmpty).stripWhiteSpace();
+ s = s.section(':', 1, 1).section(' ', mIndex, mIndex, TQString::SectionSkipEmpty).stripWhiteSpace();
s = formatTemperature(s);
}
return s;
}
-QString IBMACPIThermalSrc::index2Name(unsigned int inIndex){
+TQString IBMACPIThermalSrc::index2Name(unsigned int inIndex){
switch(inIndex){
case 0:
return "CPU";
@@ -83,6 +83,6 @@ QString IBMACPIThermalSrc::index2Name(unsigned int inIndex){
case 6:
return "Battery2";
default:
- return "ibmacpi" + QString().setNum(inIndex);
+ return "ibmacpi" + TQString().setNum(inIndex);
}
}