summaryrefslogtreecommitdiffstats
path: root/src/sources/ibmacpithermalsrc.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 20:48:23 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-04 20:48:23 +0000
commit383adc283801b6238d8acfc750890613a63f8060 (patch)
treeaf3a65389067c05263db2ef4551a541501422998 /src/sources/ibmacpithermalsrc.cpp
parentda7847adb43726079c7a4be1f06acbebe0bdde57 (diff)
downloadkima-383adc283801b6238d8acfc750890613a63f8060.tar.gz
kima-383adc283801b6238d8acfc750890613a63f8060.zip
TQt4 port kima
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kima@1239290 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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);
}
}