summaryrefslogtreecommitdiffstats
path: root/src/sources/i8ksrc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sources/i8ksrc.cpp')
-rw-r--r--src/sources/i8ksrc.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/sources/i8ksrc.cpp b/src/sources/i8ksrc.cpp
index 2123919..314a15a 100644
--- a/src/sources/i8ksrc.cpp
+++ b/src/sources/i8ksrc.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "i8ksrc.h"
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <klocale.h>
-I8kSrc::I8kSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex):
+I8kSrc::I8kSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex):
LabelSource(inParent),
mIndex(inIndex),
mSourceFile(inSourceFile.name()),
@@ -36,14 +36,14 @@ I8kSrc::I8kSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inInde
I8kSrc::~I8kSrc(){
}
-std::list<Source*>I8kSrc::createInstances(QWidget* inParent){
+std::list<Source*>I8kSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile i8kFile("/proc/i8k");
+ TQFile i8kFile("/proc/i8k");
if(i8kFile.open(IO_ReadOnly)){
- QTextStream textStream(&i8kFile);
- QString s = textStream.readLine();
+ TQTextStream textStream(&i8kFile);
+ TQString s = textStream.readLine();
i8kFile.close();
- QStringList entries = QStringList::split(' ', s);
+ TQStringList entries = TQStringList::split(' ', s);
if(entries.size() && entries[0] == "1.0"){ // support for version 1.0
// CPU temp
if(entries.size() >= 4 && !entries[3].startsWith("-"))
@@ -58,13 +58,13 @@ std::list<Source*>I8kSrc::createInstances(QWidget* inParent){
}
return list;
}
-QString I8kSrc::fetchValue(){
- QString s = "n/a";
+TQString I8kSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream(&mSourceFile);
+ TQTextStream textStream(&mSourceFile);
s = textStream.readLine();
mSourceFile.close();
- s = s.section(' ', mIndex, mIndex, QString::SectionSkipEmpty).stripWhiteSpace();
+ s = s.section(' ', mIndex, mIndex, TQString::SectionSkipEmpty).stripWhiteSpace();
switch(mIndex){
case 3: // CPU temperature (Celsius)
s = formatTemperature(s);
@@ -72,7 +72,7 @@ QString I8kSrc::fetchValue(){
case 6: // left fan rpm
case 7: // right fan rpm
if(s.length() > 1)
- s.truncate(s.length() - 1); //s = QString::number(s.toInt()/10);
+ s.truncate(s.length() - 1); //s = TQString::number(s.toInt()/10);
s.append(" rpm");
break;
default:
@@ -82,7 +82,7 @@ QString I8kSrc::fetchValue(){
return s;
}
-QString I8kSrc::index2Name(unsigned int inIndex){
+TQString I8kSrc::index2Name(unsigned int inIndex){
switch(inIndex){
case 0: // /proc/i8k format version
return "i8k Format Version";
@@ -93,19 +93,19 @@ QString I8kSrc::index2Name(unsigned int inIndex){
case 3: // CPU temperature (Celsius)
return "CPU";
case 4: // left fan status
- return "left Fan Status";
+ return "left Fan tqStatus";
case 5: // right fan status
- return "right Fan Status";
+ return "right Fan tqStatus";
case 6: // left fan rpm
return "left Fan";
case 7: // right fan rpm
return "right Fan";
case 8: // ac status
- return "AC Status";
+ return "AC tqStatus";
case 9: // buttons status
- return "Button Status";
+ return "Button tqStatus";
default:
- return "unknown" + QString().setNum(inIndex);
+ return "unknown" + TQString().setNum(inIndex);
}
}