summaryrefslogtreecommitdiffstats
path: root/src/sources/sysfreqsrc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sources/sysfreqsrc.cpp')
-rw-r--r--src/sources/sysfreqsrc.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/sources/sysfreqsrc.cpp b/src/sources/sysfreqsrc.cpp
index 239f20b..a90c127 100644
--- a/src/sources/sysfreqsrc.cpp
+++ b/src/sources/sysfreqsrc.cpp
@@ -19,16 +19,16 @@
***************************************************************************/
#include "sysfreqsrc.h"
-#include <qtextstream.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <klocale.h>
-SysFreqSrc::SysFreqSrc(QWidget* inParent, const QFile& inSourceFile):
+SysFreqSrc::SysFreqSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
- mID = "cpufreq" + mSourceFile.name().section( '/', -3, -3, QString::SectionSkipEmpty ).remove("cpu");
+ mID = "cpufreq" + mSourceFile.name().section( '/', -3, -3, TQString::SectionSkipEmpty ).remove("cpu");
mName = mID;
mDescription = i18n("This source is provided by the Linux kernel cpufreq subsystem.");
}
@@ -36,16 +36,16 @@ SysFreqSrc::SysFreqSrc(QWidget* inParent, const QFile& inSourceFile):
SysFreqSrc::~SysFreqSrc(){
}
-std::list<Source*>SysFreqSrc::createInstances(QWidget* inParent){
+std::list<Source*>SysFreqSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QDir cpuDir( "/sys/devices/system/cpu" );
+ TQDir cpuDir( "/sys/devices/system/cpu" );
if ( cpuDir.exists() ){
- cpuDir.setFilter( QDir::Dirs | QDir::NoSymLinks );
- cpuDir.setSorting( QDir::Name);
+ cpuDir.setFilter( TQDir::Dirs | TQDir::NoSymLinks );
+ cpuDir.setSorting( TQDir::Name);
for ( unsigned int i = 0; i < cpuDir.count(); i++ ){
if(cpuDir[i].startsWith("cpu")){
- QFile sysFreqFile(cpuDir.canonicalPath() + "/" + cpuDir[i] + "/cpufreq/scaling_cur_freq");
+ TQFile sysFreqFile(cpuDir.canonicalPath() + "/" + cpuDir[i] + "/cpufreq/scaling_cur_freq");
if(sysFreqFile.open(IO_ReadOnly))
list.push_back(new SysFreqSrc(inParent, sysFreqFile));
}
@@ -54,10 +54,10 @@ std::list<Source*>SysFreqSrc::createInstances(QWidget* inParent){
return list;
}
-QString SysFreqSrc::fetchValue(){
- QString s = "n/a";
+TQString SysFreqSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream(&mSourceFile);
+ TQTextStream textStream(&mSourceFile);
s = KHzinHumanReadable(textStream.readLine().toUInt());
mSourceFile.close();
}