summaryrefslogtreecommitdiffstats
path: root/src/sources
diff options
context:
space:
mode:
Diffstat (limited to 'src/sources')
-rw-r--r--src/sources/acpithermalsrc.cpp24
-rw-r--r--src/sources/acpithermalsrc.h12
-rw-r--r--src/sources/batterysrc.cpp10
-rw-r--r--src/sources/batterysrc.h14
-rw-r--r--src/sources/cpuinfofreqsrc.cpp14
-rw-r--r--src/sources/cpuinfofreqsrc.h12
-rw-r--r--src/sources/hddtempsrc.cpp48
-rw-r--r--src/sources/hddtempsrc.h14
-rw-r--r--src/sources/hwmonfansrc.cpp40
-rw-r--r--src/sources/hwmonfansrc.h12
-rw-r--r--src/sources/hwmonthermalsrc.cpp40
-rw-r--r--src/sources/hwmonthermalsrc.h12
-rw-r--r--src/sources/i8ksrc.cpp38
-rw-r--r--src/sources/i8ksrc.h14
-rw-r--r--src/sources/ibmacpifansrc.cpp14
-rw-r--r--src/sources/ibmacpifansrc.h12
-rw-r--r--src/sources/ibmacpithermalsrc.cpp28
-rw-r--r--src/sources/ibmacpithermalsrc.h14
-rw-r--r--src/sources/ibmhdaps.cpp24
-rw-r--r--src/sources/ibmhdaps.h12
-rw-r--r--src/sources/ibookg4thermalsrc.cpp20
-rw-r--r--src/sources/ibookg4thermalsrc.h12
-rw-r--r--src/sources/labelsource.cpp68
-rw-r--r--src/sources/labelsource.h22
-rw-r--r--src/sources/labelsourcePrefs.cpp92
-rw-r--r--src/sources/labelsourcePrefs.ui36
-rw-r--r--src/sources/nvidiathermalsrc.cpp46
-rw-r--r--src/sources/nvidiathermalsrc.h14
-rw-r--r--src/sources/omnibookthermalsrc.cpp18
-rw-r--r--src/sources/omnibookthermalsrc.h12
-rw-r--r--src/sources/source.cpp42
-rw-r--r--src/sources/source.h47
-rw-r--r--src/sources/sourceprefs.cpp48
-rw-r--r--src/sources/sourceprefs.ui24
-rw-r--r--src/sources/sysfreqsrc.cpp26
-rw-r--r--src/sources/sysfreqsrc.h12
-rw-r--r--src/sources/threadedtrigger.cpp14
-rw-r--r--src/sources/threadedtrigger.h18
-rw-r--r--src/sources/triggeredsource.cpp8
-rw-r--r--src/sources/triggeredsource.h17
-rw-r--r--src/sources/updateevent.cpp6
-rw-r--r--src/sources/updateevent.h14
-rw-r--r--src/sources/uptimesrc.cpp26
-rw-r--r--src/sources/uptimesrc.h16
44 files changed, 534 insertions, 532 deletions
diff --git a/src/sources/acpithermalsrc.cpp b/src/sources/acpithermalsrc.cpp
index fdc0260..f762d00 100644
--- a/src/sources/acpithermalsrc.cpp
+++ b/src/sources/acpithermalsrc.cpp
@@ -19,15 +19,15 @@
***************************************************************************/
#include "acpithermalsrc.h"
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <klocale.h>
-ACPIThermalSrc::ACPIThermalSrc(QWidget* inParent, const QFile& inSourceFile):
+ACPIThermalSrc::ACPIThermalSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
- mID = mSourceFile.name().section('/', -2, -2, QString::SectionSkipEmpty);
+ mID = mSourceFile.name().section('/', -2, -2, TQString::SectionSkipEmpty);
mName = mID;
mDescription = i18n("This source is provided by the Linux ACPI Thermal Zone driver.");
}
@@ -35,15 +35,15 @@ ACPIThermalSrc::ACPIThermalSrc(QWidget* inParent, const QFile& inSourceFile):
ACPIThermalSrc::~ACPIThermalSrc(){
}
-std::list<Source*>ACPIThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>ACPIThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QDir d( "/proc/acpi/thermal_zone" );
+ TQDir d( "/proc/acpi/thermal_zone" );
if( d.exists() ){
- d.setFilter( QDir::Dirs | QDir::NoSymLinks );
- d.setSorting( QDir::Name);
+ d.setFilter( TQDir::Dirs | TQDir::NoSymLinks );
+ d.setSorting( TQDir::Name);
for( unsigned int i = 0; i < d.count(); i++ ){
if((d[i] != ".") && (d[i] != "..")){
- QFile acpiFile(d.canonicalPath() + "/" + d[i] + "/temperature");
+ TQFile acpiFile(d.canonicalPath() + "/" + d[i] + "/temperature");
list.push_back(new ACPIThermalSrc(inParent, acpiFile));
}
}
@@ -51,10 +51,10 @@ std::list<Source*>ACPIThermalSrc::createInstances(QWidget* inParent){
return list;
}
-QString ACPIThermalSrc::fetchValue() {
- QString s = "n/a";
+TQString ACPIThermalSrc::fetchValue() {
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream(&mSourceFile);
+ TQTextStream textStream(&mSourceFile);
s = textStream.readLine();
mSourceFile.close();
s = s.remove("temperature:").stripWhiteSpace();
diff --git a/src/sources/acpithermalsrc.h b/src/sources/acpithermalsrc.h
index 1da73f5..949d8f6 100644
--- a/src/sources/acpithermalsrc.h
+++ b/src/sources/acpithermalsrc.h
@@ -22,7 +22,7 @@
#define ACPITHERMALSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -31,30 +31,30 @@
* @author Ken Werner
*/
class ACPIThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- ACPIThermalSrc(QWidget* inParent, const QFile& inSourceFile);
+ ACPIThermalSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~ACPIThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/batterysrc.cpp b/src/sources/batterysrc.cpp
index b8f73ac..a6d4ee8 100644
--- a/src/sources/batterysrc.cpp
+++ b/src/sources/batterysrc.cpp
@@ -33,7 +33,7 @@
} \
} while(0)
-BatterySrc::BatterySrc(QWidget* inParent, QString inUDI):
+BatterySrc::BatterySrc(TQWidget* inParent, TQString inUDI):
LabelSource(inParent),
mTrigger(this, 5000),
mUDI(inUDI),
@@ -70,7 +70,7 @@ BatterySrc::~BatterySrc(){
}
}
-std::list<Source*>BatterySrc::createInstances(QWidget* inParent){
+std::list<Source*>BatterySrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
LibHalContext* libHalContext;
@@ -117,8 +117,8 @@ std::list<Source*>BatterySrc::createInstances(QWidget* inParent){
return list;
}
-QString BatterySrc::fetchValue() {
- QString s = "n/a";
+TQString BatterySrc::fetchValue() {
+ TQString s = "n/a";
if(mLibHalContext != NULL){
int last_full = 0;
int current = 0;
@@ -135,7 +135,7 @@ QString BatterySrc::fetchValue() {
dbus_error_free(&mDBusError);
return s;
}
- s = QString::number(qRound((current * 100.0) / last_full)) + " %";
+ s = TQString::number(tqRound((current * 100.0) / last_full)) + " %";
}
return s;
}
diff --git a/src/sources/batterysrc.h b/src/sources/batterysrc.h
index e491fcc..399d18e 100644
--- a/src/sources/batterysrc.h
+++ b/src/sources/batterysrc.h
@@ -22,8 +22,8 @@
#define BATTERYSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
-#include <qstring.h>
+#include <tqfile.h>
+#include <tqstring.h>
#include <list>
#include <hal/libhal.h>
@@ -32,24 +32,24 @@
* @author Ken Werner
*/
class BatterySrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source
*/
- BatterySrc(QWidget* inParent, QString inUDI);
+ BatterySrc(TQWidget* inParent, TQString inUDI);
virtual ~BatterySrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
@@ -60,7 +60,7 @@ private:
/**
* The hal udi of that battery source
*/
- QString mUDI;
+ TQString mUDI;
/**
* The local hal context
diff --git a/src/sources/cpuinfofreqsrc.cpp b/src/sources/cpuinfofreqsrc.cpp
index 6227439..6b1b55d 100644
--- a/src/sources/cpuinfofreqsrc.cpp
+++ b/src/sources/cpuinfofreqsrc.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "cpuinfofreqsrc.h"
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <klocale.h>
-CpuinfoFreqSrc::CpuinfoFreqSrc(QWidget* inParent, const QFile& inSourceFile):
+CpuinfoFreqSrc::CpuinfoFreqSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
@@ -35,16 +35,16 @@ CpuinfoFreqSrc::CpuinfoFreqSrc(QWidget* inParent, const QFile& inSourceFile):
CpuinfoFreqSrc::~CpuinfoFreqSrc(){
}
-std::list<Source*>CpuinfoFreqSrc::createInstances(QWidget* inParent){
+std::list<Source*>CpuinfoFreqSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile cpuinfoFreqFile( "/proc/cpuinfo" );
+ TQFile cpuinfoFreqFile( "/proc/cpuinfo" );
if(cpuinfoFreqFile.open(IO_ReadOnly))
list.push_back(new CpuinfoFreqSrc(inParent, cpuinfoFreqFile));
return list;
}
-QString CpuinfoFreqSrc::fetchValue(){
- QString s = "n/a";
+TQString CpuinfoFreqSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
while( mSourceFile.readLine( s, 64 ) != -1 )
if( s.startsWith( "cpu MHz") )
diff --git a/src/sources/cpuinfofreqsrc.h b/src/sources/cpuinfofreqsrc.h
index da3f734..24c86b6 100644
--- a/src/sources/cpuinfofreqsrc.h
+++ b/src/sources/cpuinfofreqsrc.h
@@ -22,37 +22,37 @@
#define CPUINFOFREQSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
* CpuinfoFreqSrc reads temperature values from /proc/cpuinfo
*/
class CpuinfoFreqSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- CpuinfoFreqSrc(QWidget* inParent, const QFile& inSourceFile);
+ CpuinfoFreqSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~CpuinfoFreqSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/hddtempsrc.cpp b/src/sources/hddtempsrc.cpp
index eb0419e..b22a6c8 100644
--- a/src/sources/hddtempsrc.cpp
+++ b/src/sources/hddtempsrc.cpp
@@ -20,50 +20,50 @@
#include "hddtempsrc.h"
-#include <qsocketdevice.h>
-#include <qhostaddress.h>
-#include <qcstring.h>
+#include <tqsocketdevice.h>
+#include <tqhostaddress.h>
+#include <tqcstring.h>
#include <klocale.h>
//#include <kdebug.h>
-const Q_ULONG HDDTempSrc::BUFFERSIZE = 128;
-const Q_UINT32 HDDTempSrc::ADDRESS = (127<<24)|1;
-const Q_UINT16 HDDTempSrc::PORT = 7634;
+const TQ_ULONG HDDTempSrc::BUFFERSIZE = 128;
+const TQ_UINT32 HDDTempSrc::ADDRESS = (127<<24)|1;
+const TQ_UINT16 HDDTempSrc::PORT = 7634;
-HDDTempSrc::HDDTempSrc(QWidget* inParent, uint inIndex, const QString& inDevice, const QString& inModelName):
+HDDTempSrc::HDDTempSrc(TQWidget* inParent, uint inIndex, const TQString& inDevice, const TQString& inModelName):
LabelSource(inParent),
mIndex(inIndex),
mTrigger(this){
- mID = "HDDTemp" + QString().setNum(inIndex);
+ mID = "HDDTemp" + TQString().setNum(inIndex);
mName = mID;
- mDescription = i18n("This source is provided by hddtemp. (%1, %2)").arg(inDevice).arg(inModelName);
+ mDescription = i18n("This source is provided by hddtemp. (%1, %2)").tqarg(inDevice).tqarg(inModelName);
}
HDDTempSrc::~HDDTempSrc(){
}
-std::list<Source*>HDDTempSrc::createInstances(QWidget* inParent){
+std::list<Source*>HDDTempSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QSocketDevice sd;
+ TQSocketDevice sd;
sd.setBlocking(true);
if(sd.connect((ADDRESS), PORT)){
//kdDebug() << "hddtemp is availalble" << endl;
- QCString tmp(0);
- Q_LONG numBytes = 0;
- Q_LONG numTotalBytes = 0;
+ TQCString tmp(0);
+ TQ_LONG numBytes = 0;
+ TQ_LONG numTotalBytes = 0;
do{
tmp.resize(numTotalBytes+BUFFERSIZE);
numBytes = sd.readBlock(tmp.data()+numTotalBytes, BUFFERSIZE);
// numBytes could be -1 too in case of an error!
- numTotalBytes += QMAX(numBytes, 0);
+ numTotalBytes += TQMAX(numBytes, 0);
}while(numBytes>0);
sd.close();
tmp.resize(numTotalBytes+1);
//kdDebug() << "following data was read: " << tmp << endl;
// split the string
- QStringList sl = QStringList::split(tmp[0], tmp);
+ TQStringList sl = TQStringList::split(tmp[0], tmp);
// create the sources
if(sl.size() > 0 && sl.size()%4 == 0){
for(uint i = 0; i < sl.size(); i += 4)
@@ -74,23 +74,23 @@ std::list<Source*>HDDTempSrc::createInstances(QWidget* inParent){
return list;
}
-QString HDDTempSrc::fetchValue(){
- QString s = "n/a";
- QSocketDevice sd;
+TQString HDDTempSrc::fetchValue(){
+ TQString s = "n/a";
+ TQSocketDevice sd;
sd.setBlocking(true);
if(sd.connect((ADDRESS), PORT)){
- QCString tmp(0);
- Q_LONG numBytes = 0;
- Q_LONG numTotalBytes = 0;
+ TQCString tmp(0);
+ TQ_LONG numBytes = 0;
+ TQ_LONG numTotalBytes = 0;
do{
tmp.resize(numTotalBytes+BUFFERSIZE);
numBytes = sd.readBlock(tmp.data()+numTotalBytes, BUFFERSIZE);
// numBytes could be -1 too in case of an error!
- numTotalBytes += QMAX(numBytes, 0);
+ numTotalBytes += TQMAX(numBytes, 0);
}while(numBytes>0);
sd.close();
tmp.resize(numTotalBytes+1);
- QStringList sl = QStringList::split(tmp[0], tmp);
+ TQStringList sl = TQStringList::split(tmp[0], tmp);
if(sl.size() > 0 && sl.size()%4 == 0){
s = formatTemperature(sl[mIndex*4+2]);
}
diff --git a/src/sources/hddtempsrc.h b/src/sources/hddtempsrc.h
index 60d8151..a2513cf 100644
--- a/src/sources/hddtempsrc.h
+++ b/src/sources/hddtempsrc.h
@@ -28,40 +28,40 @@
* HDDTempSrc reads temperature of your harddisk provided by hddtemp
*/
class HDDTempSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
/**
* defines how many bytes are read at once from the network
*/
- static const Q_ULONG BUFFERSIZE;
+ static const TQ_ULONG BUFFERSIZE;
/**
* defines the address
*/
- static const Q_UINT32 ADDRESS;
+ static const TQ_UINT32 ADDRESS;
/**
* defines the port
*/
- static const Q_UINT16 PORT;
+ static const TQ_UINT16 PORT;
public:
/**
* Creates a new Source from the given File
*/
- HDDTempSrc(QWidget* inParent, uint inIndex, const QString& inDevice, const QString& inModelName);
+ HDDTempSrc(TQWidget* inParent, uint inIndex, const TQString& inDevice, const TQString& inModelName);
virtual ~HDDTempSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
uint mIndex;
diff --git a/src/sources/hwmonfansrc.cpp b/src/sources/hwmonfansrc.cpp
index 16dcd84..17f57ae 100644
--- a/src/sources/hwmonfansrc.cpp
+++ b/src/sources/hwmonfansrc.cpp
@@ -19,29 +19,29 @@
***************************************************************************/
#include "hwmonfansrc.h"
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <klocale.h>
-HwMonFanSrc::HwMonFanSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex):
+HwMonFanSrc::HwMonFanSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this, 3000){
//mName = "HwMon " + inSourceFile.name()[inSourceFile.name().length() - 7];
- mID = "hwmonFan" + QString::number(inIndex);
+ mID = "hwmonFan" + TQString::number(inIndex);
mName = mID;
- mDescription = i18n("This fan source is provided by hwmon. (%1)").arg(inSourceFile.name());
+ mDescription = i18n("This fan source is provided by hwmon. (%1)").tqarg(inSourceFile.name());
}
HwMonFanSrc::~HwMonFanSrc(){
}
-std::list<Source*>HwMonFanSrc::createInstances(QWidget* inParent){
+std::list<Source*>HwMonFanSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
// /sys/class/hwmon/hwmon*/device/fan*_input
- QDir d("/sys/class/hwmon/");
- QDir subd;
- QString device = "/device";
+ TQDir d("/sys/class/hwmon/");
+ TQDir subd;
+ TQString device = "/device";
// check the i2c interface if hwmon isn't available
// /sys/bus/i2c/devices/*/fan*_input
if(!d.exists()){
@@ -51,19 +51,19 @@ std::list<Source*>HwMonFanSrc::createInstances(QWidget* inParent){
if(d.exists()){
unsigned int index = 1;
- d.setFilter(QDir::Dirs);
- d.setSorting(QDir::Name);
+ d.setFilter(TQDir::Dirs);
+ d.setSorting(TQDir::Name);
for(unsigned int i = 0; i < d.count(); i++ ){
if((d[i] != ".") && (d[i] != "..")){
subd = d.canonicalPath() + "/" + d[i] + device;
- subd.setFilter(QDir::Files);
- subd.setSorting(QDir::Name);
+ subd.setFilter(TQDir::Files);
+ subd.setSorting(TQDir::Name);
for ( unsigned int j = 0; j < subd.count(); j++ ){
- if((subd[j] != ".") && (subd[j] != "..") && (QDir::match(subd.canonicalPath() + "/fan*_input", subd.canonicalPath() + "/" + subd[j]))){
- QFile f(subd.canonicalPath() + "/" + subd[j]);
+ if((subd[j] != ".") && (subd[j] != "..") && (TQDir::match(subd.canonicalPath() + "/fan*_input", subd.canonicalPath() + "/" + subd[j]))){
+ TQFile f(subd.canonicalPath() + "/" + subd[j]);
if(f.open(IO_ReadOnly)){
- QTextStream textStream( &f );
- QString s = textStream.readLine();
+ TQTextStream textStream( &f );
+ TQString s = textStream.readLine();
f.close();
if(!s.startsWith("-")){
list.push_back(new HwMonFanSrc(inParent, f, index));
@@ -78,10 +78,10 @@ std::list<Source*>HwMonFanSrc::createInstances(QWidget* inParent){
return list;
}
-QString HwMonFanSrc::fetchValue(){
- QString s = "n/a";
+TQString HwMonFanSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream( &mSourceFile );
+ TQTextStream textStream( &mSourceFile );
s = textStream.readLine().stripWhiteSpace();
mSourceFile.close();
s.append(" rpm");
diff --git a/src/sources/hwmonfansrc.h b/src/sources/hwmonfansrc.h
index 8f8396e..da0364c 100644
--- a/src/sources/hwmonfansrc.h
+++ b/src/sources/hwmonfansrc.h
@@ -22,7 +22,7 @@
#define HWMONFANSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -32,30 +32,30 @@
* see /usr/src/linux/Documentation/hwmon/sysfs-interface
*/
class HwMonFanSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- HwMonFanSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex);
+ HwMonFanSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex);
virtual ~HwMonFanSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/hwmonthermalsrc.cpp b/src/sources/hwmonthermalsrc.cpp
index 38ab38f..96af141 100644
--- a/src/sources/hwmonthermalsrc.cpp
+++ b/src/sources/hwmonthermalsrc.cpp
@@ -19,29 +19,29 @@
***************************************************************************/
#include "hwmonthermalsrc.h"
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <klocale.h>
-HwMonThermalSrc::HwMonThermalSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex):
+HwMonThermalSrc::HwMonThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this, 3000){
//mName = "HwMon " + inSourceFile.name()[inSourceFile.name().length() - 7];
- mID = "hwmon" + QString::number(inIndex);
+ mID = "hwmon" + TQString::number(inIndex);
mName = mID;
- mDescription = i18n("This thermal source is provided by hwmon. (%1)").arg(inSourceFile.name());
+ mDescription = i18n("This thermal source is provided by hwmon. (%1)").tqarg(inSourceFile.name());
}
HwMonThermalSrc::~HwMonThermalSrc(){
}
-std::list<Source*>HwMonThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>HwMonThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
// /sys/class/hwmon/*/device/temp*_input
- QDir d("/sys/class/hwmon/");
- QDir subd;
- QString device = "/device";
+ TQDir d("/sys/class/hwmon/");
+ TQDir subd;
+ TQString device = "/device";
// check the i2c interface if hwmon isn't available
// /sys/bus/i2c/devices/*/temp*_input
if(!d.exists()){
@@ -51,19 +51,19 @@ std::list<Source*>HwMonThermalSrc::createInstances(QWidget* inParent){
if(d.exists()){
unsigned int index = 1;
- d.setFilter(QDir::Dirs);
- d.setSorting(QDir::Name);
+ d.setFilter(TQDir::Dirs);
+ d.setSorting(TQDir::Name);
for(unsigned int i = 0; i < d.count(); i++ ){
if((d[i] != ".") && (d[i] != "..")){
subd = d.canonicalPath() + "/" + d[i] + device;
- subd.setFilter(QDir::Files);
- subd.setSorting(QDir::Name);
+ subd.setFilter(TQDir::Files);
+ subd.setSorting(TQDir::Name);
for(unsigned int j = 0; j < subd.count(); j++){
- if((subd[j] != ".") && (subd[j] != "..") && (QDir::match(subd.canonicalPath() + "/temp*_input", subd.canonicalPath() + "/" + subd[j]))){
- QFile f(subd.canonicalPath() + "/" + subd[j]);
+ if((subd[j] != ".") && (subd[j] != "..") && (TQDir::match(subd.canonicalPath() + "/temp*_input", subd.canonicalPath() + "/" + subd[j]))){
+ TQFile f(subd.canonicalPath() + "/" + subd[j]);
if(f.open(IO_ReadOnly)){
- QTextStream textStream( &f );
- QString s = textStream.readLine();
+ TQTextStream textStream( &f );
+ TQString s = textStream.readLine();
f.close();
if(!s.startsWith("-")){
list.push_back(new HwMonThermalSrc(inParent, f, index));
@@ -78,10 +78,10 @@ std::list<Source*>HwMonThermalSrc::createInstances(QWidget* inParent){
return list;
}
-QString HwMonThermalSrc::fetchValue(){
- QString s = "n/a";
+TQString HwMonThermalSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream( &mSourceFile );
+ TQTextStream textStream( &mSourceFile );
s = textStream.readLine();
mSourceFile.close();
s = s.stripWhiteSpace();
diff --git a/src/sources/hwmonthermalsrc.h b/src/sources/hwmonthermalsrc.h
index 8372745..494b036 100644
--- a/src/sources/hwmonthermalsrc.h
+++ b/src/sources/hwmonthermalsrc.h
@@ -22,7 +22,7 @@
#define HWMONTHERMALSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -32,30 +32,30 @@
* see /usr/src/linux/Documentation/hwmon/sysfs-interface
*/
class HwMonThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- HwMonThermalSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex);
+ HwMonThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex);
virtual ~HwMonThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
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);
}
}
diff --git a/src/sources/i8ksrc.h b/src/sources/i8ksrc.h
index 037e518..f298057 100644
--- a/src/sources/i8ksrc.h
+++ b/src/sources/i8ksrc.h
@@ -22,7 +22,7 @@
#define I8KSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -30,30 +30,30 @@
* which is provided by the i8k kernel module.
*/
class I8kSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- I8kSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex);
+ I8kSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex);
virtual ~I8kSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* Returns the name (such as CPU, GPU, ...) of the sensor according to a given index
*/
- static QString index2Name(unsigned int inIndex);
+ static TQString index2Name(unsigned int inIndex);
/**
* the index of the source in /proc/acpi/ibm/thermal
@@ -63,7 +63,7 @@ private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/ibmacpifansrc.cpp b/src/sources/ibmacpifansrc.cpp
index f2edf33..a311bda 100644
--- a/src/sources/ibmacpifansrc.cpp
+++ b/src/sources/ibmacpifansrc.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "ibmacpifansrc.h"
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <klocale.h>
-IBMACPIFanSrc::IBMACPIFanSrc(QWidget* inParent, const QFile& inSourceFile):
+IBMACPIFanSrc::IBMACPIFanSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
@@ -35,16 +35,16 @@ IBMACPIFanSrc::IBMACPIFanSrc(QWidget* inParent, const QFile& inSourceFile):
IBMACPIFanSrc::~IBMACPIFanSrc(){
}
-std::list<Source*>IBMACPIFanSrc::createInstances(QWidget* inParent){
+std::list<Source*>IBMACPIFanSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile ibmFile( "/proc/acpi/ibm/fan" );
+ TQFile ibmFile( "/proc/acpi/ibm/fan" );
if(ibmFile.open(IO_ReadOnly))
list.push_back(new IBMACPIFanSrc(inParent, ibmFile));
return list;
}
-QString IBMACPIFanSrc::fetchValue(){
- QString s = "n/a";
+TQString IBMACPIFanSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
while( mSourceFile.readLine( s, 64 ) != -1 )
if(s.startsWith("speed:"))
diff --git a/src/sources/ibmacpifansrc.h b/src/sources/ibmacpifansrc.h
index 7af22fc..95a38e0 100644
--- a/src/sources/ibmacpifansrc.h
+++ b/src/sources/ibmacpifansrc.h
@@ -22,7 +22,7 @@
#define IBMACPIFANSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -30,30 +30,30 @@
* which is provided by the ibm-acpi kernel module.
*/
class IBMACPIFanSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File and index
*/
- IBMACPIFanSrc(QWidget* inParent, const QFile& inSourceFile);
+ IBMACPIFanSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~IBMACPIFanSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
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);
}
}
diff --git a/src/sources/ibmacpithermalsrc.h b/src/sources/ibmacpithermalsrc.h
index 0ea937e..b01b170 100644
--- a/src/sources/ibmacpithermalsrc.h
+++ b/src/sources/ibmacpithermalsrc.h
@@ -22,7 +22,7 @@
#define IBMACPITHERMALSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -30,30 +30,30 @@
* which is provided by the ibm-acpi kernel module.
*/
class IBMACPIThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File and index
*/
- IBMACPIThermalSrc(QWidget* inParent, const QFile& inSourceFile, unsigned int inIndex);
+ IBMACPIThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, unsigned int inIndex);
virtual ~IBMACPIThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* Returns the name (such as CPU, GPU, ...) of the sensor according to a given index
*/
- static QString index2Name(unsigned int inIndex);
+ static TQString index2Name(unsigned int inIndex);
/**
* the index of the source in /proc/acpi/ibm/thermal
@@ -63,7 +63,7 @@ private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/ibmhdaps.cpp b/src/sources/ibmhdaps.cpp
index 05d945b..64d3d9a 100644
--- a/src/sources/ibmhdaps.cpp
+++ b/src/sources/ibmhdaps.cpp
@@ -19,15 +19,15 @@
***************************************************************************/
#include "ibmhdaps.h"
-#include <qtextstream.h>
-#include <qdir.h>
+#include <tqtextstream.h>
+#include <tqdir.h>
#include <klocale.h>
-IBMHDAPSSrc::IBMHDAPSSrc(QWidget* inParent, const QFile& inSourceFile):
+IBMHDAPSSrc::IBMHDAPSSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
- mID = "HDAPS" + mSourceFile.name().section( '/', -1, -1, QString::SectionSkipEmpty ).remove("temp");
+ mID = "HDAPS" + mSourceFile.name().section( '/', -1, -1, TQString::SectionSkipEmpty ).remove("temp");
mName = mID;
mDescription = i18n("This thermal source is provided by the IBM HDAPS driver.");
}
@@ -35,15 +35,15 @@ IBMHDAPSSrc::IBMHDAPSSrc(QWidget* inParent, const QFile& inSourceFile):
IBMHDAPSSrc::~IBMHDAPSSrc(){
}
-std::list<Source*>IBMHDAPSSrc::createInstances(QWidget* inParent){
+std::list<Source*>IBMHDAPSSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QDir hdapsDir( "/sys/bus/platform/drivers/hdaps/hdaps" );
+ TQDir hdapsDir( "/sys/bus/platform/drivers/hdaps/hdaps" );
if ( hdapsDir.exists() ){
- hdapsDir.setFilter( QDir::Files | QDir::NoSymLinks );
- hdapsDir.setSorting( QDir::Name);
+ hdapsDir.setFilter( TQDir::Files | TQDir::NoSymLinks );
+ hdapsDir.setSorting( TQDir::Name);
for ( unsigned int i = 0; i < hdapsDir.count(); i++ ){
if(hdapsDir[i].startsWith("temp")){
- QFile hdapsFile(hdapsDir.canonicalPath() + "/" + hdapsDir[i]);
+ TQFile hdapsFile(hdapsDir.canonicalPath() + "/" + hdapsDir[i]);
list.push_back(new IBMHDAPSSrc(inParent, hdapsFile));
}
}
@@ -51,10 +51,10 @@ std::list<Source*>IBMHDAPSSrc::createInstances(QWidget* inParent){
return list;
}
-QString IBMHDAPSSrc::fetchValue(){
- QString s = "n/a";
+TQString IBMHDAPSSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream( &mSourceFile );
+ TQTextStream textStream( &mSourceFile );
s = textStream.readLine().stripWhiteSpace();
mSourceFile.close();
s = formatTemperature(s);
diff --git a/src/sources/ibmhdaps.h b/src/sources/ibmhdaps.h
index d696f9f..2deaedf 100644
--- a/src/sources/ibmhdaps.h
+++ b/src/sources/ibmhdaps.h
@@ -22,7 +22,7 @@
#define IBMHDAPSSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -32,30 +32,30 @@
* @author Ken Werner
*/
class IBMHDAPSSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- IBMHDAPSSrc(QWidget* inParent, const QFile& inSourceFile);
+ IBMHDAPSSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~IBMHDAPSSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/ibookg4thermalsrc.cpp b/src/sources/ibookg4thermalsrc.cpp
index ba3a69a..54f5a91 100644
--- a/src/sources/ibookg4thermalsrc.cpp
+++ b/src/sources/ibookg4thermalsrc.cpp
@@ -20,10 +20,10 @@
***************************************************************************/
#include "ibookg4thermalsrc.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
-IbookG4ThermalSrc::IbookG4ThermalSrc(QWidget* inParent, const QFile& inSourceFile, const QString& inName):
+IbookG4ThermalSrc::IbookG4ThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, const TQString& inName):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
@@ -35,25 +35,25 @@ IbookG4ThermalSrc::IbookG4ThermalSrc(QWidget* inParent, const QFile& inSourceFil
IbookG4ThermalSrc::~IbookG4ThermalSrc(){
}
-std::list<Source*>IbookG4ThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>IbookG4ThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile ibookCPUFile("/sys/devices/temperatures/sensor1_temperature");
+ TQFile ibookCPUFile("/sys/devices/temperatures/sensor1_temperature");
if(ibookCPUFile.open(IO_ReadOnly)){
- list.push_back(new IbookG4ThermalSrc(inParent, ibookCPUFile, QString("CPU")));
+ list.push_back(new IbookG4ThermalSrc(inParent, ibookCPUFile, TQString("CPU")));
ibookCPUFile.close();
}
- QFile ibookGPUFile("/sys/devices/temperatures/sensor2_temperature");
+ TQFile ibookGPUFile("/sys/devices/temperatures/sensor2_temperature");
if(ibookGPUFile.open(IO_ReadOnly)){
- list.push_back(new IbookG4ThermalSrc(inParent, ibookGPUFile, QString("GPU")));
+ list.push_back(new IbookG4ThermalSrc(inParent, ibookGPUFile, TQString("GPU")));
ibookGPUFile.close();
}
return list;
}
-QString IbookG4ThermalSrc::fetchValue(){
- QString s = "n/a";
+TQString IbookG4ThermalSrc::fetchValue(){
+ TQString s = "n/a";
if(mSourceFile.open(IO_ReadOnly)){
- QTextStream textStream( &mSourceFile );
+ TQTextStream textStream( &mSourceFile );
s = textStream.readLine().stripWhiteSpace();
mSourceFile.close();
s= formatTemperature(s);
diff --git a/src/sources/ibookg4thermalsrc.h b/src/sources/ibookg4thermalsrc.h
index 36e8340..fe988d1 100644
--- a/src/sources/ibookg4thermalsrc.h
+++ b/src/sources/ibookg4thermalsrc.h
@@ -23,7 +23,7 @@
#define IBOOKG4THERMALSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -33,30 +33,30 @@
* It may work on other Apple machines as well (please let me know)
*/
class IbookG4ThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- IbookG4ThermalSrc(QWidget* inParent, const QFile& inSourceFile, const QString& inName);
+ IbookG4ThermalSrc(TQWidget* inParent, const TQFile& inSourceFile, const TQString& inName);
virtual ~IbookG4ThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/labelsource.cpp b/src/sources/labelsource.cpp
index a2e5026..d088cc7 100644
--- a/src/sources/labelsource.cpp
+++ b/src/sources/labelsource.cpp
@@ -19,16 +19,16 @@
***************************************************************************/
#include "labelsource.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <kfontrequester.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <klocale.h>
//#include "kdebug.h"
-LabelSource::LabelSource(QWidget* inParent):
+LabelSource::LabelSource(TQWidget* inParent):
TriggeredSource(inParent),
mParent(inParent),
mLabelSourcePrefs(NULL){
@@ -37,21 +37,21 @@ LabelSource::LabelSource(QWidget* inParent):
LabelSource::~LabelSource(){
}
-QWidget* LabelSource::getWidget(){
+TQWidget* LabelSource::getWidget(){
//kdDebug() << "LabelSource::getWidget called: " << mID << endl;
return mLabel;
}
-void LabelSource::createSubPrefs(QWidget* inParent){
+void LabelSource::createSubPrefs(TQWidget* inParent){
if(!mLabelSourcePrefs){
mLabelSourcePrefs = new LabelSourcePrefs(inParent, "labelsourceprefsui");
// disable nameCheckBox if taskbarCheckBox is disabled
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->colorLabel, SLOT(setEnabled(bool)));
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->colorButton, SLOT(setEnabled(bool)));
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->fontLabel, SLOT(setEnabled(bool)));
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->fontRequester, SLOT(setEnabled(bool)));
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->alignmentLabel, SLOT(setEnabled(bool)));
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mLabelSourcePrefs->alignmentComboBox, SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->colorLabel, TQT_SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->colorButton, TQT_SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->fontLabel, TQT_SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->fontRequester, TQT_SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->tqalignmentLabel, TQT_SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mLabelSourcePrefs->tqalignmentComboBox, TQT_SLOT(setEnabled(bool)));
addPrefs(mLabelSourcePrefs);
}
}
@@ -60,16 +60,16 @@ void LabelSource::updatePrefsGUI(){
TriggeredSource::updatePrefsGUI(); // update prefs of the super class
mLabelSourcePrefs->colorButton->setColor(mLabel->paletteForegroundColor());
mLabelSourcePrefs->fontRequester->setFont(mLabel->font());
- switch (mLabel->alignment()) {
- case Qt::AlignCenter:
- mLabelSourcePrefs->alignmentComboBox->setCurrentItem(1);
+ switch (mLabel->tqalignment()) {
+ case TQt::AlignCenter:
+ mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(1);
break;
- case Qt::AlignRight:
- mLabelSourcePrefs->alignmentComboBox->setCurrentItem(2);
+ case TQt::AlignRight:
+ mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(2);
break;
- default: // Qt::AlignLeft
+ default: // TQt::AlignLeft
break;
- mLabelSourcePrefs->alignmentComboBox->setCurrentItem(0);
+ mLabelSourcePrefs->tqalignmentComboBox->setCurrentItem(0);
}
}
@@ -80,22 +80,22 @@ void LabelSource::setPrefsWidgetsEnabled(bool isEnabled, bool isShownOnApplet){
mLabelSourcePrefs->colorButton->setEnabled(isEnabled && isShownOnApplet);
mLabelSourcePrefs->fontLabel->setEnabled(isEnabled && isShownOnApplet);
mLabelSourcePrefs->fontRequester->setEnabled(isEnabled && isShownOnApplet);
- mLabelSourcePrefs->alignmentLabel->setEnabled(isEnabled && isShownOnApplet);
- mLabelSourcePrefs->alignmentComboBox->setEnabled(isEnabled && isShownOnApplet);
+ mLabelSourcePrefs->tqalignmentLabel->setEnabled(isEnabled && isShownOnApplet);
+ mLabelSourcePrefs->tqalignmentComboBox->setEnabled(isEnabled && isShownOnApplet);
}
void LabelSource::applyPrefs(){
TriggeredSource::applyPrefs(); // call apply prefs of the super class
mLabel->setPaletteForegroundColor(mLabelSourcePrefs->colorButton->color());
mLabel->setFont(mLabelSourcePrefs->fontRequester->font());
- int alignID = mLabelSourcePrefs->alignmentComboBox->currentItem();
- Qt::AlignmentFlags align = Qt::AlignCenter;
+ int alignID = mLabelSourcePrefs->tqalignmentComboBox->currentItem();
+ TQt::AlignmentFlags align = TQt::AlignCenter;
if(alignID == 0){
- align = Qt::AlignLeft;
+ align = TQt::AlignLeft;
}else if(alignID == 2){
- align = Qt::AlignRight;
+ align = TQt::AlignRight;
}
- mLabel->setAlignment(align);
+ mLabel->tqsetAlignment(align);
updateLabel(mValue);
}
@@ -103,22 +103,22 @@ void LabelSource::savePrefs(KConfig* inKConfig){
TriggeredSource::savePrefs(inKConfig);
inKConfig->writeEntry(mID + "_color", mLabelSourcePrefs->colorButton->color());
inKConfig->writeEntry(mID + "_font", mLabelSourcePrefs->fontRequester->font());
- inKConfig->writeEntry(mID + "_align", mLabel->alignment());
+ inKConfig->writeEntry(mID + "_align", mLabel->tqalignment());
}
void LabelSource::loadPrefs(KConfig* inKConfig){
TriggeredSource::loadPrefs(inKConfig);
- QColor color = inKConfig->readColorEntry(mID + "_color");
+ TQColor color = inKConfig->readColorEntry(mID + "_color");
if(!color.isValid())
color.setRgb(0,0,0);
mLabel->setPaletteForegroundColor(color);
mLabel->setFont(inKConfig->readFontEntry(mID + "_font"));
- mLabel->setAlignment(inKConfig->readNumEntry(mID + "_align"));
+ mLabel->tqsetAlignment(inKConfig->readNumEntry(mID + "_align"));
}
-void LabelSource::updateLabel(const QString& inValue){
+void LabelSource::updateLabel(const TQString& inValue){
// update the label text
- QString text = (getName().isEmpty() || !showName()) ? inValue : getName() + ": " + inValue;
+ TQString text = (getName().isEmpty() || !showName()) ? inValue : getName() + ": " + inValue;
//kdDebug() << "updateLabel " << getName() << ", value: " << text << endl;
//if(mLabel->text() != text)
mLabel->setText(text);
@@ -127,7 +127,7 @@ void LabelSource::updateLabel(const QString& inValue){
void LabelSource::realizeWidget(){
Source::realizeWidget();
// the prefs dialog is created in the addPrefs method
- mLabel = new QLabel(i18n("n/a"), mParent);
- mLabel->setTextFormat(Qt::PlainText);
- connect(this, SIGNAL(valueUpdated(const QString&)), this, SLOT(updateLabel(const QString&)));
+ mLabel = new TQLabel(i18n("n/a"), mParent);
+ mLabel->setTextFormat(TQt::PlainText);
+ connect(this, TQT_SIGNAL(valueUpdated(const TQString&)), this, TQT_SLOT(updateLabel(const TQString&)));
}
diff --git a/src/sources/labelsource.h b/src/sources/labelsource.h
index 1a50ae0..1242524 100644
--- a/src/sources/labelsource.h
+++ b/src/sources/labelsource.h
@@ -24,26 +24,26 @@
#include "triggeredsource.h"
#include "labelsourcePrefs.h"
-class QLabel;
+class TQLabel;
/**
- * LabelSource displays its value on a configurable QLabel
+ * LabelSource displays its value on a configurable TQLabel
* @author Ken Werner
*/
class LabelSource : public TriggeredSource{
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new DefaultSource from the given File
*/
- LabelSource(QWidget* inParent);
+ LabelSource(TQWidget* inParent);
virtual ~LabelSource();
/**
* Returns the Label of this source that is displayed in the kicker
*/
- QWidget* getWidget();
+ TQWidget* getWidget();
/**
* fills the prefs gui with appropriate values
@@ -51,7 +51,7 @@ public:
virtual void updatePrefsGUI();
/**
- * realizes the widget. that means, create the QLabel.
+ * realizes the widget. that means, create the TQLabel.
*/
virtual void realizeWidget();
@@ -59,7 +59,7 @@ protected slots:
/**
* updates the label
*/
- virtual void updateLabel(const QString& inValue);
+ virtual void updateLabel(const TQString& inValue);
/**
* Applies the prefs
@@ -86,17 +86,17 @@ protected:
/**
* Allows subclasses adding their own preferences using the addPrefs method
*/
- virtual void createSubPrefs(QWidget* inParent);
+ virtual void createSubPrefs(TQWidget* inParent);
/**
* Displays the content of that source
*/
- QLabel* mLabel;
+ TQLabel* mLabel;
/**
- * the parent of the label we are going to create
+ * the tqparent of the label we are going to create
*/
- QWidget* mParent;
+ TQWidget* mParent;
private:
/**
diff --git a/src/sources/labelsourcePrefs.cpp b/src/sources/labelsourcePrefs.cpp
index fda5ea3..cd7eb47 100644
--- a/src/sources/labelsourcePrefs.cpp
+++ b/src/sources/labelsourcePrefs.cpp
@@ -11,72 +11,72 @@
#include "labelsourcePrefs.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qframe.h>
-#include <qlabel.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqframe.h>
+#include <tqlabel.h>
#include <kcolorbutton.h>
#include <kfontrequester.h>
-#include <qcombobox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*
- * Constructs a LabelSourcePrefs as a child of 'parent', with the
+ * Constructs a LabelSourcePrefs as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
-LabelSourcePrefs::LabelSourcePrefs( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+LabelSourcePrefs::LabelSourcePrefs( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "LabelSourcePrefs" );
- LabelSourcePrefsLayout = new QVBoxLayout( this, 0, 6, "LabelSourcePrefsLayout");
+ LabelSourcePrefsLayout = new TQVBoxLayout( this, 0, 6, "LabelSourcePrefsLayout");
- defaultSourcePrefsFrame = new QFrame( this, "defaultSourcePrefsFrame" );
- defaultSourcePrefsFrame->setFrameShape( QFrame::NoFrame );
- defaultSourcePrefsFrame->setFrameShadow( QFrame::Plain );
- defaultSourcePrefsFrameLayout = new QVBoxLayout( defaultSourcePrefsFrame, 0, 6, "defaultSourcePrefsFrameLayout");
+ defaultSourcePrefsFrame = new TQFrame( this, "defaultSourcePrefsFrame" );
+ defaultSourcePrefsFrame->setFrameShape( TQFrame::NoFrame );
+ defaultSourcePrefsFrame->setFrameShadow( TQFrame::Plain );
+ defaultSourcePrefsFrameLayout = new TQVBoxLayout( defaultSourcePrefsFrame, 0, 6, "defaultSourcePrefsFrameLayout");
- taskbartitleLabel = new QLabel( defaultSourcePrefsFrame, "taskbartitleLabel" );
- QFont taskbartitleLabel_font( taskbartitleLabel->font() );
+ taskbartitleLabel = new TQLabel( defaultSourcePrefsFrame, "taskbartitleLabel" );
+ TQFont taskbartitleLabel_font( taskbartitleLabel->font() );
taskbartitleLabel_font.setBold( TRUE );
taskbartitleLabel->setFont( taskbartitleLabel_font );
defaultSourcePrefsFrameLayout->addWidget( taskbartitleLabel );
- layout13 = new QHBoxLayout( 0, 0, 6, "layout13");
+ tqlayout13 = new TQHBoxLayout( 0, 0, 6, "tqlayout13");
- colorLabel = new QLabel( defaultSourcePrefsFrame, "colorLabel" );
- layout13->addWidget( colorLabel );
+ colorLabel = new TQLabel( defaultSourcePrefsFrame, "colorLabel" );
+ tqlayout13->addWidget( colorLabel );
colorButton = new KColorButton( defaultSourcePrefsFrame, "colorButton" );
- layout13->addWidget( colorButton );
- spacer1 = new QSpacerItem( 350, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout13->addItem( spacer1 );
- defaultSourcePrefsFrameLayout->addLayout( layout13 );
+ tqlayout13->addWidget( colorButton );
+ spacer1 = new TQSpacerItem( 350, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ tqlayout13->addItem( spacer1 );
+ defaultSourcePrefsFrameLayout->addLayout( tqlayout13 );
- layout17 = new QHBoxLayout( 0, 0, 6, "layout17");
+ tqlayout17 = new TQHBoxLayout( 0, 0, 6, "tqlayout17");
- fontLabel = new QLabel( defaultSourcePrefsFrame, "fontLabel" );
- layout17->addWidget( fontLabel );
+ fontLabel = new TQLabel( defaultSourcePrefsFrame, "fontLabel" );
+ tqlayout17->addWidget( fontLabel );
fontRequester = new KFontRequester( defaultSourcePrefsFrame, "fontRequester" );
- layout17->addWidget( fontRequester );
- defaultSourcePrefsFrameLayout->addLayout( layout17 );
+ tqlayout17->addWidget( fontRequester );
+ defaultSourcePrefsFrameLayout->addLayout( tqlayout17 );
- layout18 = new QHBoxLayout( 0, 0, 6, "layout18");
+ tqlayout18 = new TQHBoxLayout( 0, 0, 6, "tqlayout18");
- alignmentLabel = new QLabel( defaultSourcePrefsFrame, "alignmentLabel" );
- layout18->addWidget( alignmentLabel );
+ tqalignmentLabel = new TQLabel( defaultSourcePrefsFrame, "tqalignmentLabel" );
+ tqlayout18->addWidget( tqalignmentLabel );
- alignmentComboBox = new QComboBox( FALSE, defaultSourcePrefsFrame, "alignmentComboBox" );
- layout18->addWidget( alignmentComboBox );
- spacer2 = new QSpacerItem( 350, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
- layout18->addItem( spacer2 );
- defaultSourcePrefsFrameLayout->addLayout( layout18 );
+ tqalignmentComboBox = new TQComboBox( FALSE, defaultSourcePrefsFrame, "tqalignmentComboBox" );
+ tqlayout18->addWidget( tqalignmentComboBox );
+ spacer2 = new TQSpacerItem( 350, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
+ tqlayout18->addItem( spacer2 );
+ defaultSourcePrefsFrameLayout->addLayout( tqlayout18 );
LabelSourcePrefsLayout->addWidget( defaultSourcePrefsFrame );
languageChange();
- resize( QSize(299, 135).expandedTo(minimumSizeHint()) );
+ resize( TQSize(299, 135).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@@ -85,7 +85,7 @@ LabelSourcePrefs::LabelSourcePrefs( QWidget* parent, const char* name, WFlags fl
*/
LabelSourcePrefs::~LabelSourcePrefs()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
@@ -98,13 +98,13 @@ void LabelSourcePrefs::languageChange()
taskbartitleLabel->setText( tr2i18n( "<br>\n"
"Taskbar visual settings" ) );
colorLabel->setText( tr2i18n( "Foreground color:" ) );
- colorButton->setText( QString::null );
+ colorButton->setText( TQString() );
fontLabel->setText( tr2i18n( "Font:" ) );
- alignmentLabel->setText( tr2i18n( "Alignment:" ) );
- alignmentComboBox->clear();
- alignmentComboBox->insertItem( tr2i18n( "Left" ) );
- alignmentComboBox->insertItem( tr2i18n( "Center" ) );
- alignmentComboBox->insertItem( tr2i18n( "Right" ) );
+ tqalignmentLabel->setText( tr2i18n( "Alignment:" ) );
+ tqalignmentComboBox->clear();
+ tqalignmentComboBox->insertItem( tr2i18n( "Left" ) );
+ tqalignmentComboBox->insertItem( tr2i18n( "Center" ) );
+ tqalignmentComboBox->insertItem( tr2i18n( "Right" ) );
}
#include "labelsourcePrefs.moc"
diff --git a/src/sources/labelsourcePrefs.ui b/src/sources/labelsourcePrefs.ui
index c998dd4..28af1e4 100644
--- a/src/sources/labelsourcePrefs.ui
+++ b/src/sources/labelsourcePrefs.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LabelSourcePrefs</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>LabelSourcePrefs</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QFrame">
+ <widget class="TQFrame">
<property name="name">
<cstring>defaultSourcePrefsFrame</cstring>
</property>
@@ -39,7 +39,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>taskbartitleLabel</cstring>
</property>
@@ -53,15 +53,15 @@
Taskbar visual settings</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>colorLabel</cstring>
</property>
@@ -87,7 +87,7 @@ Taskbar visual settings</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>350</width>
<height>20</height>
@@ -96,15 +96,15 @@ Taskbar visual settings</string>
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>fontLabel</cstring>
</property>
@@ -119,23 +119,23 @@ Taskbar visual settings</string>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout18</cstring>
+ <cstring>tqlayout18</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
- <cstring>alignmentLabel</cstring>
+ <cstring>tqalignmentLabel</cstring>
</property>
<property name="text">
<string>Alignment:</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Left</string>
@@ -152,7 +152,7 @@ Taskbar visual settings</string>
</property>
</item>
<property name="name">
- <cstring>alignmentComboBox</cstring>
+ <cstring>tqalignmentComboBox</cstring>
</property>
</widget>
<spacer>
@@ -165,7 +165,7 @@ Taskbar visual settings</string>
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>350</width>
<height>20</height>
@@ -178,7 +178,7 @@ Taskbar visual settings</string>
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kcolorbutton.h</includehint>
<includehint>kfontrequester.h</includehint>
diff --git a/src/sources/nvidiathermalsrc.cpp b/src/sources/nvidiathermalsrc.cpp
index 000ece7..34fec06 100644
--- a/src/sources/nvidiathermalsrc.cpp
+++ b/src/sources/nvidiathermalsrc.cpp
@@ -19,39 +19,39 @@
***************************************************************************/
#include "nvidiathermalsrc.h"
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
#ifndef HAVE_NVCONTROL
#include <kprocio.h>
#else
- #include <qpaintdevice.h> // for the Device* pointer
+ #include <tqpaintdevice.h> // for the Device* pointer
// include the NVCtrl include stuff
#include <X11/Xlib.h>
- #include <fixx11h.h> // needed for Qt, to include X11 header
+ #include <fixx11h.h> // needed for TQt, to include X11 header
extern "C" {
#include <NVCtrlLib.h>
}
#endif
#ifndef HAVE_NVCONTROL
-NVidiaThermalSrc::NVidiaThermalSrc(QWidget* inParent, const QString& inID, const QString& inName):
+NVidiaThermalSrc::NVidiaThermalSrc(TQWidget* inParent, const TQString& inID, const TQString& inName):
LabelSource(inParent), mProcess(0) {
#else
-NVidiaThermalSrc::NVidiaThermalSrc(QWidget* inParent, const QString& inID, const QString& inName, unsigned int attrib):
+NVidiaThermalSrc::NVidiaThermalSrc(TQWidget* inParent, const TQString& inID, const TQString& inName, unsigned int attrib):
LabelSource(inParent), mAttrib(attrib) {
#endif
mID = inID;
mName = inName;
mDescription = i18n("This source is provided by the nVidia GPU card driver tools");
- mRefreshTimer = new QTimer(this, "default refresh handler" );
+ mRefreshTimer = new TQTimer(this, "default refresh handler" );
// connect the timer
- connect(mRefreshTimer, SIGNAL(timeout()), this, SLOT(fetchValue()));
- connect(this, SIGNAL(enabledChanged(bool, Source*)), this, SLOT(enable(bool)));
+ connect(mRefreshTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fetchValue()));
+ connect(this, TQT_SIGNAL(enabledChanged(bool, Source*)), this, TQT_SLOT(enable(bool)));
}
NVidiaThermalSrc::~NVidiaThermalSrc(){
@@ -60,7 +60,7 @@ NVidiaThermalSrc::~NVidiaThermalSrc(){
#endif
}
-std::list<Source*>NVidiaThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>NVidiaThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
#ifndef HAVE_NVCONTROL
// see if the path contains nvidia-settings. if yes,
@@ -77,18 +77,18 @@ std::list<Source*>NVidiaThermalSrc::createInstances(QWidget* inParent){
return list;
// now see what it printed...
- QString ln;
- QString pout;
+ TQString ln;
+ TQString pout;
while(proc.readln(ln) != -1)
pout+= ln + '\n';
- if(pout.contains("Attribute 'GPUCoreTemp'"))
+ if(pout.tqcontains("Attribute 'GPUCoreTemp'"))
list.push_back(new NVidiaThermalSrc(inParent, "GPUCoreTemp", "NVidiaCore"));
- if(pout.contains("Attribute 'GPUAmbientTemp'"))
+ if(pout.tqcontains("Attribute 'GPUAmbientTemp'"))
list.push_back(new NVidiaThermalSrc(inParent, "GPUAmbientTemp", "NVidiaAmbient"));
#else
int evt_base = 0, err_base = 0, temp;
- Display * dpy = QPaintDevice::x11AppDisplay();
+ Display * dpy = TQPaintDevice::x11AppDisplay();
// do we have the XNVCtrl extension loaded?
if(!XNVCTRLQueryExtension(dpy, &evt_base, &err_base))
@@ -122,14 +122,14 @@ void NVidiaThermalSrc::enable(bool inEnable){
void NVidiaThermalSrc::evaluateStdout(){
#ifndef HAVE_NVCONTROL
- QString val = i18n("n/a");
+ TQString val = i18n("n/a");
// now see what it printed...
- QString ln;
- QString pout;
+ TQString ln;
+ TQString pout;
while(mProcess->readln(ln) != -1)
pout+= ln + '\n';
- QRegExp regexp("Attribute\\s'" + mID + "'.*(\\d+)\\.");
+ TQRegExp regexp("Attribute\\s'" + mID + "'.*(\\d+)\\.");
if(regexp.search(pout) != -1)
val = formatTemperature(regexp.cap(1));
mValue = val;
@@ -144,13 +144,13 @@ void NVidiaThermalSrc::evaluateStdout(){
#ifndef HAVE_NVCONTROL
void NVidiaThermalSrc::createProcess() {
mProcess = new KProcIO;
- connect(mProcess, SIGNAL(processExited(KProcess*)), this, SLOT(evaluateStdout()));
+ connect(mProcess, TQT_SIGNAL(processExited(KProcess*)), this, TQT_SLOT(evaluateStdout()));
*mProcess << "nvidia-settings" << "-n"
<< "-q" << mID;
}
#endif
-QString NVidiaThermalSrc::fetchValue(){
+TQString NVidiaThermalSrc::fetchValue(){
#ifndef HAVE_NVCONTROL
if(!mProcess) {
createProcess();
@@ -163,9 +163,9 @@ QString NVidiaThermalSrc::fetchValue(){
return getValue();
#else
int temp;
- Display * dpy = QPaintDevice::x11AppDisplay();
+ Display * dpy = TQPaintDevice::x11AppDisplay();
if(XNVCTRLQueryAttribute (dpy, 0, 0, mAttrib, &temp))
- mValue = formatTemperature(QString::number(temp));
+ mValue = formatTemperature(TQString::number(temp));
else
mValue = "n/a";
emit valueUpdated(mValue); // calls updateLabel(mValue) of LabelSource
diff --git a/src/sources/nvidiathermalsrc.h b/src/sources/nvidiathermalsrc.h
index db2d0ab..ed66362 100644
--- a/src/sources/nvidiathermalsrc.h
+++ b/src/sources/nvidiathermalsrc.h
@@ -24,7 +24,7 @@
#include <config.h>
#include "labelsource.h"
#include <list>
-#include <qtimer.h>
+#include <tqtimer.h>
class KProcIO;
/**
@@ -32,27 +32,27 @@ class KProcIO;
* @author Ken Werner
*/
class NVidiaThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
#ifndef HAVE_NVCONTROL
- NVidiaThermalSrc(QWidget* inParent, const QString& inID, const QString& inName);
+ NVidiaThermalSrc(TQWidget* inParent, const TQString& inID, const TQString& inName);
#else
- NVidiaThermalSrc(QWidget* inParent, const QString& inID, const QString& inName, unsigned int attrib);
+ NVidiaThermalSrc(TQWidget* inParent, const TQString& inID, const TQString& inName, unsigned int attrib);
#endif
virtual ~NVidiaThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* runs the nvidia-settings command
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
protected slots:
/**
@@ -75,7 +75,7 @@ private:
/**
* The refresh timer
*/
- QTimer* mRefreshTimer;
+ TQTimer* mRefreshTimer;
private slots:
/**
diff --git a/src/sources/omnibookthermalsrc.cpp b/src/sources/omnibookthermalsrc.cpp
index a8a8203..11f8cd9 100644
--- a/src/sources/omnibookthermalsrc.cpp
+++ b/src/sources/omnibookthermalsrc.cpp
@@ -19,11 +19,11 @@
***************************************************************************/
#include "omnibookthermalsrc.h"
-#include <qtextstream.h>
-#include <qfile.h>
+#include <tqtextstream.h>
+#include <tqfile.h>
#include <klocale.h>
-OmnibookThermalSrc::OmnibookThermalSrc(QWidget* inParent, const QFile& inSourceFile):
+OmnibookThermalSrc::OmnibookThermalSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this){
@@ -35,22 +35,22 @@ OmnibookThermalSrc::OmnibookThermalSrc(QWidget* inParent, const QFile& inSourceF
OmnibookThermalSrc::~OmnibookThermalSrc(){
}
-std::list<Source*>OmnibookThermalSrc::createInstances(QWidget* inParent){
+std::list<Source*>OmnibookThermalSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile omiFile( "/proc/omnibook/temperature" );
+ TQFile omiFile( "/proc/omnibook/temperature" );
if(omiFile.open(IO_ReadOnly)){
list.push_back(new OmnibookThermalSrc(inParent, omiFile));
}
return list;
}
-QString OmnibookThermalSrc::fetchValue(){
- QString s = "n/a";
+TQString OmnibookThermalSrc::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, QString::SectionSkipEmpty).stripWhiteSpace();
+ s = s.section(':',-1,-1, TQString::SectionSkipEmpty).stripWhiteSpace();
s = formatTemperature(s.left(s.length()-1));
}
return s;
diff --git a/src/sources/omnibookthermalsrc.h b/src/sources/omnibookthermalsrc.h
index e4133ce..7e43f31 100644
--- a/src/sources/omnibookthermalsrc.h
+++ b/src/sources/omnibookthermalsrc.h
@@ -22,7 +22,7 @@
#define OMNIBOOKTHERMALSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -30,30 +30,30 @@
* which is provided by the omnibook kernel module.
*/
class OmnibookThermalSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- OmnibookThermalSrc(QWidget* inParent, const QFile& inSourceFile);
+ OmnibookThermalSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~OmnibookThermalSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/source.cpp b/src/sources/source.cpp
index 605537f..20885b0 100644
--- a/src/sources/source.cpp
+++ b/src/sources/source.cpp
@@ -20,16 +20,16 @@
#include "source.h"
#include <math.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kglobal.h>
//#include "kdebug.h"
-Source::Source(QWidget* inParent):
+Source::Source(TQWidget* inParent):
mID(""),
mPosition(0),
mName(""),
@@ -46,7 +46,7 @@ Source::Source(QWidget* inParent):
Source::~Source(){
}
-const QString& Source::getID() const{
+const TQString& Source::getID() const{
return mID;
}
@@ -60,11 +60,11 @@ void Source::setPosition(int inPosition, KConfig* inKConfig){
inKConfig->writeEntry(mID + "_position", mPosition);
}
-const QString& Source::getName() const{
+const TQString& Source::getName() const{
return mName;
}
-const QString& Source::getDescription() const{
+const TQString& Source::getDescription() const{
return mDescription;
}
@@ -96,18 +96,18 @@ void Source::setMaybeEnabled(bool inMaybeEnabled){
}
}
-QWidget* Source::createPrefs(QWidget* inParent){
+TQWidget* Source::createPrefs(TQWidget* inParent){
if(!mSourcePrefs){
mSourcePrefs = new SourcePrefs(inParent, "sourceprefsui");
// disable nameCheckBox if taskbarCheckBox is disabled
- connect(mSourcePrefs->taskbarCheckBox, SIGNAL(toggled(bool)), mSourcePrefs->nameCheckBox, SLOT(setEnabled(bool)));
+ connect(mSourcePrefs->taskbarCheckBox, TQT_SIGNAL(toggled(bool)), mSourcePrefs->nameCheckBox, TQT_SLOT(setEnabled(bool)));
// add prefs widgets from sub classes
createSubPrefs(mSourcePrefs);
// add bottom vspacer
- mSourcePrefs->layout()->addItem(new QSpacerItem(0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding) );
+ mSourcePrefs->tqlayout()->addItem(new TQSpacerItem(0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding) );
updatePrefsGUI(); // fill the prefs gui
}
@@ -138,9 +138,9 @@ void Source::setPrefsWidgetsEnabled(bool isEnabled, bool isShownOnApplet){
mSourcePrefs->tooltipCheckBox->setEnabled(isEnabled);
}
-void Source::addPrefs(QWidget* inParent){
+void Source::addPrefs(TQWidget* inParent){
if(inParent != NULL)
- mSourcePrefs->layout()->add(inParent);
+ mSourcePrefs->tqlayout()->add(inParent);
}
void Source::applyPrefs(){
@@ -194,27 +194,27 @@ void Source::loadPrefs(KConfig* inKConfig){
}
// utility methods
-QString Source::formatTemperature(const QString& temp) const {
+TQString Source::formatTemperature(const TQString& temp) const {
if(mIsMetric) {
- return temp + QString::fromUtf8(" °C");
+ return temp + TQString::fromUtf8(" °C");
} else {
- return QString::number(celsiusToFahrenheit(temp.toInt())).append(QString::fromUtf8(" °F"));
+ return TQString::number(celsiusToFahrenheit(temp.toInt())).append(TQString::fromUtf8(" °F"));
}
}
-QString Source::KHzinHumanReadable( uint value ) const{
+TQString Source::KHzinHumanReadable( uint value ) const{
if( value >= 1000000 )
- return QString::number( round(value/1000000.0, 1) ) + " GHz";
+ return TQString::number( round(value/1000000.0, 1) ) + " GHz";
else if( value >= 1000 )
- return QString::number( round(value/1000.0, -1) ) + " MHz";
+ return TQString::number( round(value/1000.0, -1) ) + " MHz";
else
- return QString::number( value ) + " KHz";
+ return TQString::number( value ) + " KHz";
}
double Source::round(double inValue, int inDigits) const{
return floor(inValue * pow( 10, inDigits) + 0.5) * pow(10, -inDigits);
}
int Source::celsiusToFahrenheit(int inCelsius) const{
- return qRound(1.8 * inCelsius + 32);
+ return tqRound(1.8 * inCelsius + 32);
}
void Source::realizeWidget(){
diff --git a/src/sources/source.h b/src/sources/source.h
index 6f72666..6ae53c5 100644
--- a/src/sources/source.h
+++ b/src/sources/source.h
@@ -20,51 +20,52 @@
#ifndef SOURCE_H
#define SOURCE_H
-#include <qstring.h>
+#include <tqstring.h>
#include "sourceprefs.h"
#include <kconfig.h>
// Forward Declarationss
-class QVBoxLayout;
+class TQVBoxLayout;
/**
* This abstract Source is the super class of all sources and provides just the basics.
* @author Ken Werner
*/
-class Source : public QObject {
- Q_OBJECT //macro which activates signals and slots (moc)
+class Source : public TQObject {
+ Q_OBJECT
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source
*/
- Source(QWidget* inParent);
+ Source(TQWidget* inParent);
virtual ~Source();
/**
* Returns the internal Name of this source
*/
- const QString& getID() const;
+ const TQString& getID() const;
/**
- * Returns the position of this source in the layout
+ * Returns the position of this source in the tqlayout
*/
int getPosition() const;
/**
- * Sets the position of this source in the layout
+ * Sets the position of this source in the tqlayout
*/
void setPosition(int inPosition, KConfig* inKConfig);
/**
* Returns the Name of this source
*/
- const QString& getName() const;
+ const TQString& getName() const;
/**
* Returns the Description of this source
*/
- const QString& getDescription() const;
+ const TQString& getDescription() const;
/**
* Returns true if this source is currently enabled otherwise false
@@ -89,17 +90,17 @@ public:
/**
* Returns the widget of this source that is displayed in the kicker
*/
- virtual QWidget* getWidget() = 0;
+ virtual TQWidget* getWidget() = 0;
/**
* Returns the formatted value of this source
*/
- virtual QString getValue() const = 0;
+ virtual TQString getValue() const = 0;
/**
* Creates the preference panel of this source and calls createSubPrefs
*/
- virtual QWidget* createPrefs(QWidget* inParent);
+ virtual TQWidget* createPrefs(TQWidget* inParent);
/**
* returnes the preference panel of this source
@@ -144,9 +145,9 @@ signals:
/**
* This signal is emitted whenever the enabled flag (mEnabled) of this source has changed
*/
- void enabledChanged(bool inEnabled, Source* inSource); // needed by kima.cpp to add sources to its layout
+ void enabledChanged(bool inEnabled, Source* inSource); // needed by kima.cpp to add sources to its tqlayout
/**
- * This signal is emitted whenever this Source should be added or removed from the display (layout) of the kicker applet
+ * This signal is emitted whenever this Source should be added or removed from the display (tqlayout) of the kicker applet
*/
void displaySource(bool inDisplay, Source* inSource);
@@ -154,12 +155,12 @@ protected:
/**
* This method can be overridden in sub classes to add specific the preference panels
*/
- virtual void addPrefs(QWidget* inParent);
+ virtual void addPrefs(TQWidget* inParent);
/**
* Allows subclasses adding their own preferences using the addPrefs method
*/
- virtual void createSubPrefs(QWidget* inParent) = 0;
+ virtual void createSubPrefs(TQWidget* inParent) = 0;
/**
* This method enables or disables various widgets of the preferences dialog depending on isEnabled and isShownOnApplet
@@ -176,19 +177,19 @@ protected:
* The ID of the source
* must be unique among the sources
*/
- QString mID;
+ TQString mID;
/**
- * The Position of the source in the layout
+ * The Position of the source in the tqlayout
*/
int mPosition;
/**
* The name of that source showed in the kicker
*/
- QString mName;
+ TQString mName;
/**
* The description of that source
*/
- QString mDescription;
+ TQString mDescription;
/**
* Indicates whether that source is enabled (showed on the kicker) or not
*/
@@ -221,11 +222,11 @@ protected:
* formats the given temperature into a string which has
* a degree sign / fahrenheit sign depending on the locale used.
*/
- QString formatTemperature(const QString& temp) const;
+ TQString formatTemperature(const TQString& temp) const;
/**
* Translates a given frequency in KHz to a human readable string
*/
- QString KHzinHumanReadable(uint value) const;
+ TQString KHzinHumanReadable(uint value) const;
/**
* Translates degree Celsius to degree Fahrenheit
*/
diff --git a/src/sources/sourceprefs.cpp b/src/sources/sourceprefs.cpp
index cabce8b..8639c93 100644
--- a/src/sources/sourceprefs.cpp
+++ b/src/sources/sourceprefs.cpp
@@ -11,55 +11,55 @@
#include "sourceprefs.h"
-#include <qvariant.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqvariant.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
/*
- * Constructs a SourcePrefs as a child of 'parent', with the
+ * Constructs a SourcePrefs as a child of 'tqparent', with the
* name 'name' and widget flags set to 'f'.
*/
-SourcePrefs::SourcePrefs( QWidget* parent, const char* name, WFlags fl )
- : QWidget( parent, name, fl )
+SourcePrefs::SourcePrefs( TQWidget* tqparent, const char* name, WFlags fl )
+ : TQWidget( tqparent, name, fl )
{
if ( !name )
setName( "SourcePrefs" );
- SourcePrefsLayout = new QVBoxLayout( this, 0, 6, "SourcePrefsLayout");
+ SourcePrefsLayout = new TQVBoxLayout( this, 0, 6, "SourcePrefsLayout");
- descriptionLabel = new QLabel( this, "descriptionLabel" );
+ descriptionLabel = new TQLabel( this, "descriptionLabel" );
SourcePrefsLayout->addWidget( descriptionLabel );
- hBoxLayout = new QHBoxLayout( 0, 0, 6, "hBoxLayout");
+ hBoxLayout = new TQHBoxLayout( 0, 0, 6, "hBoxLayout");
- nameLabel = new QLabel( this, "nameLabel" );
+ nameLabel = new TQLabel( this, "nameLabel" );
hBoxLayout->addWidget( nameLabel );
- nameLineEdit = new QLineEdit( this, "nameLineEdit" );
+ nameLineEdit = new TQLineEdit( this, "nameLineEdit" );
hBoxLayout->addWidget( nameLineEdit );
- spacer8 = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );
+ spacer8 = new TQSpacerItem( 20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum );
hBoxLayout->addItem( spacer8 );
SourcePrefsLayout->addLayout( hBoxLayout );
- taskbarCheckBox = new QCheckBox( this, "taskbarCheckBox" );
+ taskbarCheckBox = new TQCheckBox( this, "taskbarCheckBox" );
SourcePrefsLayout->addWidget( taskbarCheckBox );
- hBoxLayout2 = new QHBoxLayout( 0, 0, 6, "hBoxLayout2");
- spacer8_2 = new QSpacerItem( 20, 20, QSizePolicy::Fixed, QSizePolicy::Minimum );
+ hBoxLayout2 = new TQHBoxLayout( 0, 0, 6, "hBoxLayout2");
+ spacer8_2 = new TQSpacerItem( 20, 20, TQSizePolicy::Fixed, TQSizePolicy::Minimum );
hBoxLayout2->addItem( spacer8_2 );
- nameCheckBox = new QCheckBox( this, "nameCheckBox" );
+ nameCheckBox = new TQCheckBox( this, "nameCheckBox" );
hBoxLayout2->addWidget( nameCheckBox );
SourcePrefsLayout->addLayout( hBoxLayout2 );
- tooltipCheckBox = new QCheckBox( this, "tooltipCheckBox" );
+ tooltipCheckBox = new TQCheckBox( this, "tooltipCheckBox" );
SourcePrefsLayout->addWidget( tooltipCheckBox );
languageChange();
- resize( QSize(203, 127).expandedTo(minimumSizeHint()) );
+ resize( TQSize(203, 127).expandedTo(tqminimumSizeHint()) );
clearWState( WState_Polished );
}
@@ -68,7 +68,7 @@ SourcePrefs::SourcePrefs( QWidget* parent, const char* name, WFlags fl )
*/
SourcePrefs::~SourcePrefs()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*
diff --git a/src/sources/sourceprefs.ui b/src/sources/sourceprefs.ui
index 6d42984..5c69dfb 100644
--- a/src/sources/sourceprefs.ui
+++ b/src/sources/sourceprefs.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SourcePrefs</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SourcePrefs</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="margin">
<number>0</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>descriptionLabel</cstring>
</property>
@@ -30,7 +30,7 @@
<string>description</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>hBoxLayout</cstring>
</property>
@@ -38,7 +38,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>nameLabel</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>nameLineEdit</cstring>
</property>
@@ -61,7 +61,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -70,7 +70,7 @@
</spacer>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>taskbarCheckBox</cstring>
</property>
@@ -78,7 +78,7 @@
<string>Show this source in Taskbar</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>hBoxLayout2</cstring>
</property>
@@ -96,14 +96,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>nameCheckBox</cstring>
</property>
@@ -113,7 +113,7 @@
</widget>
</hbox>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>tooltipCheckBox</cstring>
</property>
@@ -123,5 +123,5 @@
</widget>
</vbox>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
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();
}
diff --git a/src/sources/sysfreqsrc.h b/src/sources/sysfreqsrc.h
index c2a9a60..66c250f 100644
--- a/src/sources/sysfreqsrc.h
+++ b/src/sources/sysfreqsrc.h
@@ -22,37 +22,37 @@
#define SYSFREQSRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
* SysFreqSrc reads frequency values from /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
*/
class SysFreqSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File
*/
- SysFreqSrc(QWidget* inParent, const QFile& inSourceFile);
+ SysFreqSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~SysFreqSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* triggers the fetchValue method
diff --git a/src/sources/threadedtrigger.cpp b/src/sources/threadedtrigger.cpp
index 11f07b5..5ea2998 100644
--- a/src/sources/threadedtrigger.cpp
+++ b/src/sources/threadedtrigger.cpp
@@ -19,7 +19,7 @@
***************************************************************************/
#include "threadedtrigger.h"
-#include <qapplication.h>
+#include <tqapplication.h>
//#include "kdebug.h"
@@ -28,7 +28,7 @@ ThreadedTrigger::ThreadedTrigger(TriggeredSource* inSource, unsigned long inRefr
mRefreshSleep(inRefreshSleep),
mRunning(false)
{
- connect(mSource, SIGNAL(enabledChanged(bool, Source*)), this, SLOT(enable(bool)));
+ connect(mSource, TQT_SIGNAL(enabledChanged(bool, Source*)), this, TQT_SLOT(enable(bool)));
}
ThreadedTrigger::~ThreadedTrigger(){
@@ -40,7 +40,7 @@ void ThreadedTrigger::enable(bool inEnable){
//kdDebug() << "start thread " << mSource->getName() << endl;
// start the thread
mRunning = true;
- this->start(QThread::LowPriority);
+ this->start(TQThread::LowPriority);
}else if(!inEnable && mRunning){ // stops the thread
//kdDebug() << "stop thread " << mSource->getName() << endl;
mRunning = false;
@@ -54,14 +54,14 @@ void ThreadedTrigger::enable(bool inEnable){
void ThreadedTrigger::run(){
mWaitMutex.lock();
while( mRunning ) {
- QString text = mSource->fetchValue();
- UpdateEvent* ue = new UpdateEvent(text); // Qt will delete the ue when done
- QApplication::postEvent(mSource, ue); // send the event to the TriggeredSource
+ TQString text = mSource->fetchValue();
+ UpdateEvent* ue = new UpdateEvent(text); // TQt will delete the ue when done
+ TQApplication::postEvent(mSource, ue); // send the event to the TriggeredSource
if(mWaitCond.wait(&mWaitMutex, mRefreshSleep))
break; // we were woken up
}
// if we are here, the mutex must be locked:
- // 1. QWaitCondition::wait locks it when it returns
+ // 1. TQWaitCondition::wait locks it when it returns
// 2. mWaitMutex is locked when we enter the loop
mWaitMutex.unlock(); // unlock it again
}
diff --git a/src/sources/threadedtrigger.h b/src/sources/threadedtrigger.h
index 8d84d5f..2978e6d 100644
--- a/src/sources/threadedtrigger.h
+++ b/src/sources/threadedtrigger.h
@@ -24,18 +24,18 @@
#include "source.h"
#include "updateevent.h"
#include "triggeredsource.h"
-#include <qwaitcondition.h>
-#include <qmutex.h>
-#include <qthread.h>
-#include <qevent.h>
-#include <qobject.h>
+#include <tqwaitcondition.h>
+#include <tqmutex.h>
+#include <tqthread.h>
+#include <tqevent.h>
+#include <tqobject.h>
/**
* ThreadedTrigger calls the fetchValue method of a source asynchronous using a thread
* @author Ken Werner
*/
-class ThreadedTrigger : public QObject, QThread{
- Q_OBJECT //macro which activates signals and slots (moc)
+class ThreadedTrigger : public TQObject, TQThread{
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new ThreadedTrigger
@@ -78,12 +78,12 @@ private:
* this is the condition, on which this thread sleeps
* mRefreshSleep milliseconds.
*/
- QWaitCondition mWaitCond;
+ TQWaitCondition mWaitCond;
/*
* this mutex ensures that the thread always sleeps on the
* condition, if we signal it.
*/
- QMutex mWaitMutex;
+ TQMutex mWaitMutex;
};
#endif //THREADEDTRIGGER_H
diff --git a/src/sources/triggeredsource.cpp b/src/sources/triggeredsource.cpp
index 88dde5e..c83b417 100644
--- a/src/sources/triggeredsource.cpp
+++ b/src/sources/triggeredsource.cpp
@@ -20,18 +20,18 @@
#include "triggeredsource.h"
#include "updateevent.h"
-#include <qapplication.h>
+#include <tqapplication.h>
//#include "kdebug.h"
-TriggeredSource::TriggeredSource(QWidget* inParent):
+TriggeredSource::TriggeredSource(TQWidget* inParent):
Source(inParent){
}
TriggeredSource::~TriggeredSource(){
}
-void TriggeredSource::customEvent(QCustomEvent* event){
+void TriggeredSource::customEvent(TQCustomEvent* event){
if(event->type() == UpdateEvent::TYPE ){
UpdateEvent* ue = static_cast<UpdateEvent*>(event);
// update mValue
@@ -43,6 +43,6 @@ void TriggeredSource::customEvent(QCustomEvent* event){
}
}
-QString TriggeredSource::getValue() const{
+TQString TriggeredSource::getValue() const{
return mValue;
}
diff --git a/src/sources/triggeredsource.h b/src/sources/triggeredsource.h
index 9beba25..aa32464 100644
--- a/src/sources/triggeredsource.h
+++ b/src/sources/triggeredsource.h
@@ -22,7 +22,7 @@
#define TRIGGEREDSOURCE_H
#include "source.h"
-#include <qevent.h>
+#include <tqevent.h>
/**
* TriggeredSource provides fetchValue and
@@ -30,12 +30,13 @@
* @author Ken Werner
*/
class TriggeredSource : public Source{
- Q_OBJECT //macro which activates signals and slots (moc)
+ Q_OBJECT
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new TriggeredSource
*/
- TriggeredSource(QWidget* inParent);
+ TriggeredSource(TQWidget* inParent);
virtual ~TriggeredSource();
@@ -44,29 +45,29 @@ public slots:
/**
* Returns the formatted value of this source
*/
- virtual QString getValue() const;
+ virtual TQString getValue() const;
/**
* Fetches and returns the value of this source
* This method might be called from a thread so don't call it directly
*/
- virtual QString fetchValue() = 0;
+ virtual TQString fetchValue() = 0;
signals:
/**
* This signal is emitted whenever the value of this source (mValue) is updated
*/
- void valueUpdated(const QString& inValue);
+ void valueUpdated(const TQString& inValue);
protected:
/**
* consumes the UpdateEvent
*/
- virtual void customEvent(QCustomEvent* event);
+ virtual void customEvent(TQCustomEvent* event);
/**
* the buffered value of this source
*/
- QString mValue;
+ TQString mValue;
};
#endif //TRIGGEREDSOURCE_H
diff --git a/src/sources/updateevent.cpp b/src/sources/updateevent.cpp
index f16f6b5..a45f5eb 100644
--- a/src/sources/updateevent.cpp
+++ b/src/sources/updateevent.cpp
@@ -20,10 +20,10 @@
#include "updateevent.h"
-UpdateEvent::UpdateEvent(const QString& inMessage):
- QCustomEvent(UpdateEvent::TYPE),
+UpdateEvent::UpdateEvent(const TQString& inMessage):
+ TQCustomEvent(UpdateEvent::TYPE),
mMessage(inMessage){
}
-const QString& UpdateEvent::getMessage() const{
+const TQString& UpdateEvent::getMessage() const{
return mMessage;
}
diff --git a/src/sources/updateevent.h b/src/sources/updateevent.h
index ae6ef24..5bca627 100644
--- a/src/sources/updateevent.h
+++ b/src/sources/updateevent.h
@@ -21,18 +21,18 @@
#ifndef UPDATEEVENT_H
#define UPDATEEVENT_H
-#include <qevent.h>
+#include <tqevent.h>
/**
- * UpdateEvent is a custom event to update the QObject of the ThreadedTrigger periodically
+ * UpdateEvent is a custom event to update the TQObject of the ThreadedTrigger periodically
*/
-class UpdateEvent: public QCustomEvent{
+class UpdateEvent: public TQCustomEvent{
public:
- UpdateEvent(const QString& inMessage);
- static const int TYPE = QEvent::User + 1;
- const QString& getMessage() const;
+ UpdateEvent(const TQString& inMessage);
+ static const int TYPE = TQEvent::User + 1;
+ const TQString& getMessage() const;
private:
- QString mMessage;
+ TQString mMessage;
};
#endif //UPDATEEVENT_H
diff --git a/src/sources/uptimesrc.cpp b/src/sources/uptimesrc.cpp
index fd392f5..cc9d0b5 100644
--- a/src/sources/uptimesrc.cpp
+++ b/src/sources/uptimesrc.cpp
@@ -19,10 +19,10 @@
***************************************************************************/
#include "uptimesrc.h"
-#include <qtextstream.h>
+#include <tqtextstream.h>
#include <klocale.h>
-UptimeSrc::UptimeSrc(QWidget* inParent, const QFile& inSourceFile):
+UptimeSrc::UptimeSrc(TQWidget* inParent, const TQFile& inSourceFile):
LabelSource(inParent),
mSourceFile(inSourceFile.name()),
mTrigger(this, 30000){ // 30 seconds
@@ -35,29 +35,29 @@ UptimeSrc::UptimeSrc(QWidget* inParent, const QFile& inSourceFile):
UptimeSrc::~UptimeSrc(){
}
-std::list<Source*>UptimeSrc::createInstances(QWidget* inParent){
+std::list<Source*>UptimeSrc::createInstances(TQWidget* inParent){
std::list<Source*> list;
- QFile uptimeFile("/proc/uptime" );
+ TQFile uptimeFile("/proc/uptime" );
if(uptimeFile.open(IO_ReadOnly))
list.push_back(new UptimeSrc(inParent, uptimeFile));
return list;
}
-QString UptimeSrc::fetchValue(){
- QString s = "n/a";
+TQString UptimeSrc::fetchValue(){
+ TQString s = "n/a";
int secs;
if(mSourceFile.open(IO_ReadOnly)) {
- QTextStream stream( &mSourceFile );
+ TQTextStream stream( &mSourceFile );
stream >> secs;
- //QString seconds = QString::number(secs % 60).rightJustify(2, '0');
- QString minutes = QString::number(secs / 60 % 60).rightJustify(2, '0');
- QString hours = QString::number(secs / 3600 % 24).rightJustify(2, '0');
- QString days = QString::number(secs / 86400);
+ //TQString seconds = TQString::number(secs % 60).rightJustify(2, '0');
+ TQString minutes = TQString::number(secs / 60 % 60).rightJustify(2, '0');
+ TQString hours = TQString::number(secs / 3600 % 24).rightJustify(2, '0');
+ TQString days = TQString::number(secs / 86400);
if(days != "0")
- s = mTimeFormatLong.arg(days).arg(hours).arg(minutes);
+ s = mTimeFormatLong.tqarg(days).tqarg(hours).tqarg(minutes);
else
- s = mTimeFormatShort.arg(hours).arg(minutes);
+ s = mTimeFormatShort.tqarg(hours).tqarg(minutes);
mSourceFile.close();
}
return s;
diff --git a/src/sources/uptimesrc.h b/src/sources/uptimesrc.h
index e92a521..677a602 100644
--- a/src/sources/uptimesrc.h
+++ b/src/sources/uptimesrc.h
@@ -22,7 +22,7 @@
#define UPTIMESRC_H
#include "labelsource.h"
#include "threadedtrigger.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <list>
/**
@@ -30,24 +30,24 @@
* which is provided by the ibm-acpi kernel module.
*/
class UptimeSrc : public LabelSource {
- Q_OBJECT //macro which activates signals and slots (moc)
+ TQ_OBJECT //macro which activates signals and slots (tqmoc)
public:
/**
* Creates a new Source from the given File and index
*/
- UptimeSrc(QWidget* inParent, const QFile& inSourceFile);
+ UptimeSrc(TQWidget* inParent, const TQFile& inSourceFile);
virtual ~UptimeSrc();
/**
* Creates instances of that Source (and returns pointers to them)
*/
- static std::list<Source*> createInstances(QWidget* inParent);
+ static std::list<Source*> createInstances(TQWidget* inParent);
/**
* Fetches and returns the value of this source
* This method is called from a thread so don't call it directly
*/
- virtual QString fetchValue();
+ virtual TQString fetchValue();
/**
@@ -58,13 +58,13 @@ private:
/**
* The file from which the value is read
*/
- QFile mSourceFile;
+ TQFile mSourceFile;
/**
* the format of the time display. short and long version
*/
- QString mTimeFormatShort;
- QString mTimeFormatLong;
+ TQString mTimeFormatShort;
+ TQString mTimeFormatLong;
/**
* triggers the fetchValue method