summaryrefslogtreecommitdiffstats
path: root/klaptopdaemon
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /klaptopdaemon
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klaptopdaemon')
-rw-r--r--klaptopdaemon/acpi.cpp88
-rw-r--r--klaptopdaemon/acpi.h18
-rw-r--r--klaptopdaemon/apm.cpp80
-rw-r--r--klaptopdaemon/apm.h12
-rw-r--r--klaptopdaemon/battery.cpp118
-rw-r--r--klaptopdaemon/battery.h32
-rw-r--r--klaptopdaemon/buttons.cpp178
-rw-r--r--klaptopdaemon/buttons.h34
-rw-r--r--klaptopdaemon/daemon_state.cpp14
-rw-r--r--klaptopdaemon/daemon_state.h32
-rw-r--r--klaptopdaemon/daemondock.cpp160
-rw-r--r--klaptopdaemon/daemondock.h14
-rw-r--r--klaptopdaemon/kpcmcia.cpp48
-rw-r--r--klaptopdaemon/kpcmcia.h30
-rw-r--r--klaptopdaemon/kpcmciainfo.cpp74
-rw-r--r--klaptopdaemon/kpcmciainfo.h58
-rw-r--r--klaptopdaemon/krichtextlabel.cpp42
-rw-r--r--klaptopdaemon/krichtextlabel.h18
-rw-r--r--klaptopdaemon/laptop_daemon.cpp62
-rw-r--r--klaptopdaemon/laptop_daemon.h44
-rw-r--r--klaptopdaemon/main.cpp54
-rw-r--r--klaptopdaemon/main.h8
-rw-r--r--klaptopdaemon/pcmcia.cpp20
-rw-r--r--klaptopdaemon/pcmcia.h24
-rw-r--r--klaptopdaemon/portable.cpp336
-rw-r--r--klaptopdaemon/portable.h26
-rw-r--r--klaptopdaemon/power.cpp222
-rw-r--r--klaptopdaemon/power.h42
-rw-r--r--klaptopdaemon/profile.cpp148
-rw-r--r--klaptopdaemon/profile.h14
-rw-r--r--klaptopdaemon/sony.cpp48
-rw-r--r--klaptopdaemon/sony.h10
-rw-r--r--klaptopdaemon/wake_laptop.cpp4
-rw-r--r--klaptopdaemon/warning.cpp210
-rw-r--r--klaptopdaemon/warning.h52
-rw-r--r--klaptopdaemon/xautolock.cc6
-rw-r--r--klaptopdaemon/xautolock.h4
37 files changed, 1192 insertions, 1192 deletions
diff --git a/klaptopdaemon/acpi.cpp b/klaptopdaemon/acpi.cpp
index 843b8cb..94bb124 100644
--- a/klaptopdaemon/acpi.cpp
+++ b/klaptopdaemon/acpi.cpp
@@ -40,33 +40,33 @@
#include <kprocess.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhgroupbox.h>
-#include <qgrid.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqgrid.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-AcpiConfig::AcpiConfig (QWidget * parent, const char *name)
+AcpiConfig::AcpiConfig (TQWidget * parent, const char *name)
: KCModule(parent, name)
{
KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages
config = new KConfig("kcmlaptoprc");
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *tmp_label = new QLabel( i18n("This panel provides information about your system's ACPI implementation "
+ TQLabel *tmp_label = new TQLabel( i18n("This panel provides information about your system's ACPI implementation "
"and lets you have access to some of the extra features provided by ACPI"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- tmp_label = new QLabel( i18n("NOTE: the Linux ACPI implementation is still a 'work in progress'. "
+ tmp_label = new TQLabel( i18n("NOTE: the Linux ACPI implementation is still a 'work in progress'. "
"Some features, in particular suspend and hibernate are not yet available "
"under 2.4 - and under 2.5 some particular ACPI implementations are still "
"unstable, these check boxes let you only enable the things that work reliably. "
@@ -76,37 +76,37 @@ AcpiConfig::AcpiConfig (QWidget * parent, const char *name)
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- tmp_label = new QLabel( i18n("Some changes made on this page may require you to quit the laptop panel "
+ tmp_label = new TQLabel( i18n("Some changes made on this page may require you to quit the laptop panel "
"and start it again to take effect"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
bool can_enable = laptop_portable::has_acpi(1); // is helper ready
- enableStandby = new QCheckBox( i18n("Enable standby"), this );
+ enableStandby = new TQCheckBox( i18n("Enable standby"), this );
top_layout->addWidget( enableStandby );
- QToolTip::add( enableStandby, i18n( "If checked this box enables transitions to the 'standby' state - a temporary powered down state" ) );
+ TQToolTip::add( enableStandby, i18n( "If checked this box enables transitions to the 'standby' state - a temporary powered down state" ) );
enableStandby->setEnabled(can_enable);
- connect( enableStandby, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableStandby, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- enableSuspend = new QCheckBox( i18n("Enable &suspend"), this );
+ enableSuspend = new TQCheckBox( i18n("Enable &suspend"), this );
top_layout->addWidget( enableSuspend );
- QToolTip::add( enableSuspend, i18n( "If checked this box enables transitions to the 'suspend' state - a semi-powered down state, sometimes called 'suspend-to-ram'" ) );
+ TQToolTip::add( enableSuspend, i18n( "If checked this box enables transitions to the 'suspend' state - a semi-powered down state, sometimes called 'suspend-to-ram'" ) );
enableSuspend->setEnabled(can_enable);
- connect( enableSuspend, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableSuspend, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- QHBoxLayout *ll = new QHBoxLayout();
- enableHibernate = new QCheckBox( i18n("Enable &hibernate"), this );
+ TQHBoxLayout *ll = new TQHBoxLayout();
+ enableHibernate = new TQCheckBox( i18n("Enable &hibernate"), this );
ll->addWidget( enableHibernate );
- QToolTip::add( enableHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state - a powered down state, sometimes called 'suspend-to-disk'" ) );
+ TQToolTip::add( enableHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state - a powered down state, sometimes called 'suspend-to-disk'" ) );
enableHibernate->setEnabled(can_enable);
- connect( enableHibernate, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableHibernate, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
if (laptop_portable::has_software_suspend()) {
ll->addStretch(1);
- enableSoftwareSuspendHibernate = new QCheckBox( i18n("Use software suspend for hibernate"), this );
+ enableSoftwareSuspendHibernate = new TQCheckBox( i18n("Use software suspend for hibernate"), this );
ll->addWidget( enableSoftwareSuspendHibernate );
- QToolTip::add( enableSoftwareSuspendHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state - a powered down state, sometimes called 'suspend-to-disk' - the kernel 'Software Suspend' mechanism will be used instead of using ACPI directly" ) );
+ TQToolTip::add( enableSoftwareSuspendHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state - a powered down state, sometimes called 'suspend-to-disk' - the kernel 'Software Suspend' mechanism will be used instead of using ACPI directly" ) );
enableSoftwareSuspendHibernate->setEnabled(laptop_portable::has_software_suspend(2));
- connect( enableSoftwareSuspendHibernate, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableSoftwareSuspendHibernate, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
} else {
enableSoftwareSuspendHibernate = 0;
}
@@ -114,19 +114,19 @@ AcpiConfig::AcpiConfig (QWidget * parent, const char *name)
top_layout->addLayout(ll);
- enablePerformance = new QCheckBox( i18n("Enable &performance profiles"), this );
+ enablePerformance = new TQCheckBox( i18n("Enable &performance profiles"), this );
top_layout->addWidget( enablePerformance );
- QToolTip::add( enablePerformance, i18n( "If checked this box enables access to ACPI performance profiles - usually OK in 2.4 and later" ) );
+ TQToolTip::add( enablePerformance, i18n( "If checked this box enables access to ACPI performance profiles - usually OK in 2.4 and later" ) );
enablePerformance->setEnabled(can_enable);
- connect( enablePerformance, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enablePerformance, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- enableThrottle = new QCheckBox( i18n("Enable &CPU throttling"), this );
+ enableThrottle = new TQCheckBox( i18n("Enable &CPU throttling"), this );
top_layout->addWidget( enableThrottle );
- QToolTip::add( enableThrottle, i18n( "If checked this box enables access to ACPI throttle speed changes - usually OK in 2.4 and later" ) );
+ TQToolTip::add( enableThrottle, i18n( "If checked this box enables access to ACPI throttle speed changes - usually OK in 2.4 and later" ) );
enableThrottle->setEnabled(can_enable);
- connect( enableThrottle, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableThrottle, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- tmp_label = new QLabel(i18n("If the above boxes are disabled then there is no 'helper' "
+ tmp_label = new TQLabel(i18n("If the above boxes are disabled then there is no 'helper' "
"application set up to help change ACPI states, there are two "
"ways you can enable this application, either make the file "
"/proc/acpi/sleep writeable by anyone every time your system boots "
@@ -134,10 +134,10 @@ AcpiConfig::AcpiConfig (QWidget * parent, const char *name)
"set-uid root"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- ll = new QHBoxLayout();
- QPushButton *setupButton = new QPushButton(i18n("Setup Helper Application"), this);
- connect( setupButton, SIGNAL(clicked()), this, SLOT(setupHelper()) );
- QToolTip::add( setupButton, i18n( "This button can be used to enable the ACPI helper application" ) );
+ ll = new TQHBoxLayout();
+ TQPushButton *setupButton = new TQPushButton(i18n("Setup Helper Application"), this);
+ connect( setupButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper()) );
+ TQToolTip::add( setupButton, i18n( "This button can be used to enable the ACPI helper application" ) );
ll->addStretch(2);
ll->addWidget(setupButton);
ll->addStretch(8);
@@ -145,7 +145,7 @@ AcpiConfig::AcpiConfig (QWidget * parent, const char *name)
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
load();
@@ -158,15 +158,15 @@ AcpiConfig::~AcpiConfig()
#include "checkcrc.h"
#include "crcresult.h"
-#include <qfile.h>
+#include <tqfile.h>
void AcpiConfig::setupHelper()
{
unsigned long len, crc;
- QString helper = KStandardDirs::findExe("klaptop_acpi_helper");
- checkcrc(QFile::encodeName(helper), len, crc);
+ TQString helper = KStandardDirs::findExe("klaptop_acpi_helper");
+ checkcrc(TQFile::encodeName(helper), len, crc);
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password "
@@ -263,7 +263,7 @@ void AcpiConfig::configChanged()
}
-QString AcpiConfig::quickHelp() const
+TQString AcpiConfig::quickHelp() const
{
return i18n("<h1>ACPI Setup</h1>This module allows you to configure ACPI for your system");
}
diff --git a/klaptopdaemon/acpi.h b/klaptopdaemon/acpi.h
index a6a77cb..d463ef5 100644
--- a/klaptopdaemon/acpi.h
+++ b/klaptopdaemon/acpi.h
@@ -26,7 +26,7 @@
#define __ACPICONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSpinBox;
@@ -41,7 +41,7 @@ class AcpiConfig : public KCModule
{
Q_OBJECT
public:
- AcpiConfig( QWidget *parent=0, const char* name=0);
+ AcpiConfig( TQWidget *parent=0, const char* name=0);
~AcpiConfig( );
void save( void );
@@ -49,7 +49,7 @@ public:
void load( bool useDefaults );
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -59,12 +59,12 @@ private slots:
private:
KConfig *config;
- QCheckBox *enableHibernate;
- QCheckBox *enableSuspend;
- QCheckBox *enableStandby;
- QCheckBox *enablePerformance;
- QCheckBox *enableThrottle;
- QCheckBox *enableSoftwareSuspendHibernate;
+ TQCheckBox *enableHibernate;
+ TQCheckBox *enableSuspend;
+ TQCheckBox *enableStandby;
+ TQCheckBox *enablePerformance;
+ TQCheckBox *enableThrottle;
+ TQCheckBox *enableSoftwareSuspendHibernate;
bool enablestandby, enablesuspend, enablehibernate, enableperformance, enablethrottle, enablesoftwaresuspend;
};
diff --git a/klaptopdaemon/apm.cpp b/klaptopdaemon/apm.cpp
index ab25010..397bbb6 100644
--- a/klaptopdaemon/apm.cpp
+++ b/klaptopdaemon/apm.cpp
@@ -41,32 +41,32 @@
#include <kprocess.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-ApmConfig::ApmConfig (QWidget * parent, const char *name)
+ApmConfig::ApmConfig (TQWidget * parent, const char *name)
: KCModule(parent, name)
{
KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages
config = new KConfig("kcmlaptoprc");
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *tmp_label = new QLabel( i18n("This panel lets you configure your APM system and lets "
+ TQLabel *tmp_label = new TQLabel( i18n("This panel lets you configure your APM system and lets "
"you have access to some of the extra features provided by it"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- tmp_label = new QLabel( i18n("NOTE: some APM implementations have buggy suspend/standby "
+ tmp_label = new TQLabel( i18n("NOTE: some APM implementations have buggy suspend/standby "
"implementations. You should test these features very gingerly - save "
"all your work, check them on and try a suspend/standby from "
"the popup menu on the battery icon in the panel if it fails to come "
@@ -74,28 +74,28 @@ ApmConfig::ApmConfig (QWidget * parent, const char *name)
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- tmp_label = new QLabel( i18n("Some changes made on this page may require you to quit the laptop panel "
+ tmp_label = new TQLabel( i18n("Some changes made on this page may require you to quit the laptop panel "
"and start it again to take effect"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
bool can_enable = laptop_portable::has_apm(1); // is helper ready
- enableStandby = new QCheckBox( i18n("Enable standby"), this );
+ enableStandby = new TQCheckBox( i18n("Enable standby"), this );
top_layout->addWidget( enableStandby );
- QToolTip::add( enableStandby, i18n( "If checked this box enables transitions to the 'standby' state - a temporary powered down state" ) );
+ TQToolTip::add( enableStandby, i18n( "If checked this box enables transitions to the 'standby' state - a temporary powered down state" ) );
enableStandby->setEnabled(can_enable);
- connect( enableStandby, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableStandby, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- enableSuspend = new QCheckBox( i18n("Enable &suspend"), this );
+ enableSuspend = new TQCheckBox( i18n("Enable &suspend"), this );
top_layout->addWidget( enableSuspend );
- QToolTip::add( enableSuspend, i18n( "If checked this box enables transitions to the 'suspend' state - a semi-powered down state, sometimes called 'suspend-to-ram'" ) );
+ TQToolTip::add( enableSuspend, i18n( "If checked this box enables transitions to the 'suspend' state - a semi-powered down state, sometimes called 'suspend-to-ram'" ) );
enableSuspend->setEnabled(can_enable);
- connect( enableSuspend, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableSuspend, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
apm_name = "/usr/bin/apm";
if (::access(apm_name, F_OK) != 0 && ::access("/usr/sbin/apm", F_OK) == 0)
apm_name = "/usr/sbin/apm";
- tmp_label = new QLabel(i18n("If the above boxes are disabled then there is no 'helper' "
+ tmp_label = new TQLabel(i18n("If the above boxes are disabled then there is no 'helper' "
"application set up to help change APM states, there are two "
"ways you can enable this application, either make the file "
"/proc/apm writeable by anyone every time your system boots "
@@ -103,35 +103,35 @@ ApmConfig::ApmConfig (QWidget * parent, const char *name)
"set-uid root").arg(apm_name), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- QHBoxLayout *ll = new QHBoxLayout(top_layout);
- QPushButton *setupButton = new QPushButton(i18n("Setup Helper Application"), this);
- connect( setupButton, SIGNAL(clicked()), this, SLOT(setupHelper()) );
- QToolTip::add( setupButton, i18n( "This button can be used to enable the APM helper application" ) );
+ TQHBoxLayout *ll = new TQHBoxLayout(top_layout);
+ TQPushButton *setupButton = new TQPushButton(i18n("Setup Helper Application"), this);
+ connect( setupButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper()) );
+ TQToolTip::add( setupButton, i18n( "This button can be used to enable the APM helper application" ) );
ll->addStretch(2);
ll->addWidget(setupButton);
ll->addStretch(8);
if (laptop_portable::has_software_suspend()) {
- tmp_label = new QLabel( i18n("Your system seems to have 'Software Suspend' installed, this can "
+ tmp_label = new TQLabel( i18n("Your system seems to have 'Software Suspend' installed, this can "
"be used to hibernate or 'suspend to disk' your system if you want "
"to use this for hibernation check the box below"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- enableSoftwareSuspendHibernate = new QCheckBox( i18n("Enable software suspend for hibernate"), this );
+ enableSoftwareSuspendHibernate = new TQCheckBox( i18n("Enable software suspend for hibernate"), this );
top_layout->addWidget( enableSoftwareSuspendHibernate );
- QToolTip::add( enableSoftwareSuspendHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state using the 'Software Suspend' mechanism" ) );
+ TQToolTip::add( enableSoftwareSuspendHibernate, i18n( "If checked this box enables transitions to the 'hibernate' state using the 'Software Suspend' mechanism" ) );
enableSoftwareSuspendHibernate->setEnabled(laptop_portable::has_software_suspend(2));
- connect( enableSoftwareSuspendHibernate, SIGNAL(clicked()), this, SLOT(configChanged()) );
- tmp_label = new QLabel( i18n("If the above box is disabled then you need to be logged in "
+ connect( enableSoftwareSuspendHibernate, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
+ tmp_label = new TQLabel( i18n("If the above box is disabled then you need to be logged in "
"as root or need a helper application to invoke the Software "
"Suspend utility - KDE provides a utility to do this, if you "
"wish to use it you must make it set-uid root, the button "
"below will do this for you"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- ll = new QHBoxLayout(this);
- QPushButton *setupSSButton = new QPushButton(i18n("Setup SS Helper Application"), this);
- connect( setupSSButton, SIGNAL(clicked()), this, SLOT(setupHelper2()) );
- QToolTip::add( setupSSButton, i18n( "This button can be used to enable the Software Suspend helper application" ) );
+ ll = new TQHBoxLayout(this);
+ TQPushButton *setupSSButton = new TQPushButton(i18n("Setup SS Helper Application"), this);
+ connect( setupSSButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper2()) );
+ TQToolTip::add( setupSSButton, i18n( "This button can be used to enable the Software Suspend helper application" ) );
ll->addStretch(2);
ll->addWidget(setupSSButton);
ll->addStretch(8);
@@ -141,7 +141,7 @@ ApmConfig::ApmConfig (QWidget * parent, const char *name)
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
load();
@@ -154,7 +154,7 @@ ApmConfig::~ApmConfig()
void ApmConfig::setupHelper()
{
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password "
@@ -166,11 +166,11 @@ void ApmConfig::setupHelper()
proc << kdesu;
proc << "-u";
proc << "root";
- proc << QString("dpkg-statoverride --update --add root root 6755 ")+apm_name;
+ proc << TQString("dpkg-statoverride --update --add root root 6755 ")+apm_name;
proc.start(KProcess::Block); // run it sync so has_apm below sees the results
}
} else {
- KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").arg(QString(apm_name)),
+ KMessageBox::sorry(0, i18n("%1 cannot be enabled because kdesu cannot be found. Please make sure that it is installed correctly.").arg(TQString(apm_name)),
i18n("KLaptopDaemon"));
}
laptop_portable::apm_set_mask(enablestandby, enablesuspend);
@@ -185,10 +185,10 @@ void ApmConfig::setupHelper()
void ApmConfig::setupHelper2() // we use the acpi helper to do software suspend
{
unsigned long len, crc;
- QString helper = KStandardDirs::findExe("klaptop_acpi_helper");
+ TQString helper = KStandardDirs::findExe("klaptop_acpi_helper");
checkcrc(helper.latin1(), len, crc);
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password "
@@ -266,7 +266,7 @@ void ApmConfig::configChanged()
}
-QString ApmConfig::quickHelp() const
+TQString ApmConfig::quickHelp() const
{
return i18n("<h1>APM Setup</h1>This module allows you to configure APM for your system");
}
diff --git a/klaptopdaemon/apm.h b/klaptopdaemon/apm.h
index a2213e9..c58e60f 100644
--- a/klaptopdaemon/apm.h
+++ b/klaptopdaemon/apm.h
@@ -26,7 +26,7 @@
#define __APMCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSpinBox;
@@ -41,7 +41,7 @@ class ApmConfig : public KCModule
{
Q_OBJECT
public:
- ApmConfig( QWidget *parent=0, const char* name=0);
+ ApmConfig( TQWidget *parent=0, const char* name=0);
~ApmConfig( );
void save( void );
@@ -49,7 +49,7 @@ public:
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -60,9 +60,9 @@ private slots:
private:
KConfig *config;
- QCheckBox *enableSuspend;
- QCheckBox *enableStandby;
- QCheckBox *enableSoftwareSuspendHibernate;
+ TQCheckBox *enableSuspend;
+ TQCheckBox *enableStandby;
+ TQCheckBox *enableSoftwareSuspendHibernate;
bool enablestandby, enablesuspend, enablesoftwaresuspend;
const char *apm_name;
};
diff --git a/klaptopdaemon/battery.cpp b/klaptopdaemon/battery.cpp
index ef43890..0c337d7 100644
--- a/klaptopdaemon/battery.cpp
+++ b/klaptopdaemon/battery.cpp
@@ -39,19 +39,19 @@
#include <krichtextlabel.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qhgroupbox.h>
-#include <qgrid.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqhgroupbox.h>
+#include <tqgrid.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-BatteryConfig::BatteryConfig (QWidget * parent, const char *name)
+BatteryConfig::BatteryConfig (TQWidget * parent, const char *name)
: KCModule(parent, name),
editPoll(0),
iconloader(0),
@@ -65,30 +65,30 @@ BatteryConfig::BatteryConfig (QWidget * parent, const char *name)
config = new KConfig("kcmlaptoprc");
instance = new KInstance("klaptopdaemon");
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
// do we show the monitor
- runMonitor = new QCheckBox( i18n("&Show battery monitor"), this );
+ runMonitor = new TQCheckBox( i18n("&Show battery monitor"), this );
top_layout->addWidget( runMonitor );
- QToolTip::add( runMonitor, i18n( "This box enables the battery state icon in the panel" ) );
- connect( runMonitor, SIGNAL(clicked()), this, SLOT(configChanged()) );
- connect( runMonitor, SIGNAL(clicked()), this, SLOT(runMonitorChanged()) );
+ TQToolTip::add( runMonitor, i18n( "This box enables the battery state icon in the panel" ) );
+ connect( runMonitor, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
+ connect( runMonitor, TQT_SIGNAL(clicked()), this, TQT_SLOT(runMonitorChanged()) );
// show also the battery level percentage
- showLevel = new QCheckBox( i18n("Show battery level percentage"), this );
+ showLevel = new TQCheckBox( i18n("Show battery level percentage"), this );
top_layout->addWidget( showLevel );
- QToolTip::add( showLevel, i18n( "This box enables a text message near the battery state icon containing battery level percentage" ) );
- connect( showLevel, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ TQToolTip::add( showLevel, i18n( "This box enables a text message near the battery state icon containing battery level percentage" ) );
+ connect( showLevel, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- notifyMe = new QCheckBox( i18n("&Notify me whenever my battery becomes fully charged"), this );
+ notifyMe = new TQCheckBox( i18n("&Notify me whenever my battery becomes fully charged"), this );
top_layout->addWidget( notifyMe );
- QToolTip::add( notifyMe, i18n( "This box enables a dialog box that pops up when your battery becomes fully charged" ) );
- connect( notifyMe, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ TQToolTip::add( notifyMe, i18n( "This box enables a dialog box that pops up when your battery becomes fully charged" ) );
+ connect( notifyMe, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- blankSaver = new QCheckBox( i18n("&Use a blank screen saver when running on battery"), this );
+ blankSaver = new TQCheckBox( i18n("&Use a blank screen saver when running on battery"), this );
top_layout->addWidget( blankSaver );
- connect( blankSaver, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( blankSaver, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
if (!apm) {
top_layout->addWidget( laptop_portable::no_power_management_explanation(this) );
@@ -96,72 +96,72 @@ BatteryConfig::BatteryConfig (QWidget * parent, const char *name)
iconloader = new KIconLoader("klaptopdaemon");
// the poll time (in seconds)
- QHBox *hb = new QHBox( this );
+ TQHBox *hb = new TQHBox( this );
hb->setSpacing( KDialog::spacingHint() );
top_layout->addWidget( hb );
- QLabel* poll_label = new QLabel( i18n("&Check status every:"), hb );
- editPoll = new QSpinBox( 1, 3600, 1, hb ); // min,max,step
- QToolTip::add( editPoll, i18n( "Choose how responsive the laptop software will be when it checks the battery status" ) );
+ TQLabel* poll_label = new TQLabel( i18n("&Check status every:"), hb );
+ editPoll = new TQSpinBox( 1, 3600, 1, hb ); // min,max,step
+ TQToolTip::add( editPoll, i18n( "Choose how responsive the laptop software will be when it checks the battery status" ) );
editPoll->setSuffix( i18n("keep short, unit in spinbox", "sec") );
poll_label->setBuddy( editPoll );
- connect( editPoll, SIGNAL(valueChanged(int)),
- this, SLOT(configChanged()) );
- QWidget* spacer = new QWidget( hb );
+ connect( editPoll, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(configChanged()) );
+ TQWidget* spacer = new TQWidget( hb );
hb->setStretchFactor( spacer, 1 );
// group box to hold the icons together
- QVGroupBox* icons_groupbox = new QVGroupBox( i18n("Select Battery Icons"), this );
+ TQVGroupBox* icons_groupbox = new TQVGroupBox( i18n("Select Battery Icons"), this );
icons_groupbox->layout()->setSpacing( KDialog::spacingHint() );
top_layout->addWidget( icons_groupbox, 0, Qt::AlignLeft );
// layout to hold the icons inside the groupbox
- QGrid *icon_grid = new QGrid( 3 /*cols*/, icons_groupbox );
+ TQGrid *icon_grid = new TQGrid( 3 /*cols*/, icons_groupbox );
icon_grid->setSpacing( KDialog::spacingHint() );
buttonNoBattery = new KIconButton( iconloader, icon_grid );
buttonNoCharge = new KIconButton( iconloader, icon_grid );
buttonCharge = new KIconButton( iconloader, icon_grid );
- (void)new QLabel( buttonNoBattery, i18n("No &battery"), icon_grid);
- (void)new QLabel( buttonNoCharge, i18n("&Not charging"), icon_grid);
- (void)new QLabel( buttonCharge, i18n("Char&ging"), icon_grid);
+ (void)new TQLabel( buttonNoBattery, i18n("No &battery"), icon_grid);
+ (void)new TQLabel( buttonNoCharge, i18n("&Not charging"), icon_grid);
+ (void)new TQLabel( buttonCharge, i18n("Char&ging"), icon_grid);
buttonNoBattery->setIconType( KIcon::NoGroup, KIcon::Any, 1);
buttonNoCharge->setIconType( KIcon::NoGroup, KIcon::Any, 1);
buttonCharge->setIconType( KIcon::NoGroup, KIcon::Any, 1);
- connect(buttonNoBattery, SIGNAL(iconChanged(QString)), this, SLOT(iconChanged()));
- connect(buttonNoCharge, SIGNAL(iconChanged(QString)), this, SLOT(iconChanged()));
- connect(buttonCharge, SIGNAL(iconChanged(QString)), this, SLOT(configChanged()));
+ connect(buttonNoBattery, TQT_SIGNAL(iconChanged(TQString)), this, TQT_SLOT(iconChanged()));
+ connect(buttonNoCharge, TQT_SIGNAL(iconChanged(TQString)), this, TQT_SLOT(iconChanged()));
+ connect(buttonCharge, TQT_SIGNAL(iconChanged(TQString)), this, TQT_SLOT(configChanged()));
int num_batteries;
- QStringList battery_names, battery_states, battery_values;
+ TQStringList battery_names, battery_states, battery_values;
laptop_portable::get_battery_status(num_batteries, battery_names, battery_states, battery_values);
if (num_batteries > 0) {
- QHBoxLayout *hl = new QHBoxLayout();
+ TQHBoxLayout *hl = new TQHBoxLayout();
top_layout->addLayout(hl);
- QHGroupBox *hb = new QHGroupBox(i18n("Current Battery Status"), this);
+ TQHGroupBox *hb = new TQHGroupBox(i18n("Current Battery Status"), this);
for (int i = 0; i < num_batteries; i++) {
- QWidget *wp;
+ TQWidget *wp;
if (num_batteries == 1) {
- wp = new QWidget(hb);
+ wp = new TQWidget(hb);
} else {
- wp = new QVGroupBox(battery_names[i], hb);
+ wp = new TQVGroupBox(battery_names[i], hb);
}
- QVBoxLayout *vb = new QVBoxLayout(wp);
+ TQVBoxLayout *vb = new TQVBoxLayout(wp);
- QLabel *l;
+ TQLabel *l;
- l = new QLabel(wp); // icon indicating state
+ l = new TQLabel(wp); // icon indicating state
vb->addWidget(l);
batt_label_1.append(l);
- l = new QLabel(QString(""), wp);
+ l = new TQLabel(TQString(""), wp);
vb->addWidget(l);
batt_label_2.append(l);
- l = new QLabel(QString(""), wp);
+ l = new TQLabel(TQString(""), wp);
vb->addWidget(l);
batt_label_3.append(l);
}
@@ -171,14 +171,14 @@ BatteryConfig::BatteryConfig (QWidget * parent, const char *name)
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- QLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").replace("\n"," "), this);
+ TQLabel* explain = new KRichTextLabel( i18n("This panel controls whether the battery status monitor\nappears in the system tray and what it looks like.").replace("\n"," "), this);
top_layout->addWidget(explain, 0);
laptop_portable::extra_config(this, config, top_layout);
}
top_layout->addStretch(1);
- startMonitor = new QPushButton( i18n("&Start Battery Monitor"), this);
- connect(startMonitor, SIGNAL(clicked()), this, SLOT(slotStartMonitor()));
+ startMonitor = new TQPushButton( i18n("&Start Battery Monitor"), this);
+ connect(startMonitor, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStartMonitor()));
top_layout->addWidget( startMonitor, 0, Qt::AlignRight );
load();
@@ -271,7 +271,7 @@ void BatteryConfig::configChanged()
}
-QString BatteryConfig::quickHelp() const
+TQString BatteryConfig::quickHelp() const
{
return i18n("<h1>Laptop Battery</h1>This module allows you to monitor "
"your batteries. To make use of this module, you must have power management system software "
@@ -283,14 +283,14 @@ void BatteryConfig::slotStartMonitor()
{
wake_laptop_daemon();
if (!enablemonitor) {
- KMessageBox::information(0, i18n("<qt>The battery monitor has been started, but the tray icon is currently disabled. You can make it appear by selecting the <b>Show battery monitor</b> entry on this page and applying your changes.</qt>"), QString::null, "howToEnableMonitor");
+ KMessageBox::information(0, i18n("<qt>The battery monitor has been started, but the tray icon is currently disabled. You can make it appear by selecting the <b>Show battery monitor</b> entry on this page and applying your changes.</qt>"), TQString::null, "howToEnableMonitor");
}
}
void
-BatteryConfig::ConvertIcon(int percent, QPixmap &pm, QPixmap &result)
+BatteryConfig::ConvertIcon(int percent, TQPixmap &pm, TQPixmap &result)
{
- QImage image = pm.convertToImage();
+ TQImage image = pm.convertToImage();
int w = image.width();
int h = image.height();
@@ -347,12 +347,12 @@ void
BatteryConfig::BatteryStateUpdate()
{
int num_batteries;
- QStringList battery_names, battery_states, battery_values;
+ TQStringList battery_names, battery_states, battery_values;
laptop_portable::get_battery_status(num_batteries, battery_names, battery_states, battery_values);
if (num_batteries > 0) {
for (int i = 0; i < num_batteries; i++) {
if (battery_states[i] == "yes") {
- QPixmap result;
+ TQPixmap result;
ConvertIcon(battery_values[i].toInt(), battery_pm, result);
batt_label_1.at(i)->setPixmap(result);
@@ -380,7 +380,7 @@ void BatteryConfig::iconChanged()
BatteryStateUpdate();
}
-void BatteryConfig::timerEvent(QTimerEvent *)
+void BatteryConfig::timerEvent(TQTimerEvent *)
{
BatteryStateUpdate();
}
diff --git a/klaptopdaemon/battery.h b/klaptopdaemon/battery.h
index 3e484ef..a914b57 100644
--- a/klaptopdaemon/battery.h
+++ b/klaptopdaemon/battery.h
@@ -28,9 +28,9 @@
#define __BATTERYCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
class QWidget;
class QSpinBox;
@@ -46,7 +46,7 @@ class BatteryConfig : public KCModule
{
Q_OBJECT
public:
- BatteryConfig( QWidget *parent=0, const char* name=0);
+ BatteryConfig( TQWidget *parent=0, const char* name=0);
~BatteryConfig( );
void save( void );
@@ -54,7 +54,7 @@ public:
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -65,15 +65,15 @@ private slots:
void BatteryStateUpdate();
private:
- void timerEvent(QTimerEvent *);
- void ConvertIcon(int percent, QPixmap &pm, QPixmap &result);
+ void timerEvent(TQTimerEvent *);
+ void ConvertIcon(int percent, TQPixmap &pm, TQPixmap &result);
KConfig *config;
- QSpinBox* editPoll;
- QCheckBox* runMonitor;
- QCheckBox* showLevel;
- QCheckBox* notifyMe;
- QCheckBox* blankSaver;
+ TQSpinBox* editPoll;
+ TQCheckBox* runMonitor;
+ TQCheckBox* showLevel;
+ TQCheckBox* notifyMe;
+ TQCheckBox* blankSaver;
bool enablemonitor;
bool showlevel;
bool enablequitmenu;
@@ -85,13 +85,13 @@ private:
KIconButton *buttonNoBattery;
KIconButton *buttonNoCharge;
KIconButton *buttonCharge;
- QString nobattery, nochargebattery, chargebattery;
- QPushButton *startMonitor;
+ TQString nobattery, nochargebattery, chargebattery;
+ TQPushButton *startMonitor;
bool apm;
int poll_time;
- QPtrList<QLabel> batt_label_1, batt_label_2, batt_label_3;
- QPixmap battery_pm, battery_nopm;
+ TQPtrList<TQLabel> batt_label_1, batt_label_2, batt_label_3;
+ TQPixmap battery_pm, battery_nopm;
KInstance *instance;
};
diff --git a/klaptopdaemon/buttons.cpp b/klaptopdaemon/buttons.cpp
index f9ccce4..3c05359 100644
--- a/klaptopdaemon/buttons.cpp
+++ b/klaptopdaemon/buttons.cpp
@@ -34,17 +34,17 @@
#include <kapplication.h>
#include <kcombobox.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-ButtonsConfig::ButtonsConfig (QWidget * parent, const char *name)
+ButtonsConfig::ButtonsConfig (TQWidget * parent, const char *name)
: KCModule(parent, name),
lidBox(0),
lidStandby(0),
@@ -82,16 +82,16 @@ ButtonsConfig::ButtonsConfig (QWidget * parent, const char *name)
apm = laptop_portable::has_power_management();
config = new KConfig("kcmlaptoprc");
int can_brightness = laptop_portable::has_brightness();
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool *active_list;
bool has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
- QStringList performance_list;
+ TQStringList performance_list;
int current_performance;
bool has_performance = laptop_portable::get_system_performance(0, current_performance, performance_list, active_list);
if (!apm && !can_brightness && !has_throttle && !has_performance) {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
KActiveLabel* explain = laptop_portable::no_power_management_explanation(this);
@@ -106,170 +106,170 @@ ButtonsConfig::ButtonsConfig (QWidget * parent, const char *name)
if (!can_standby && !can_suspend && !can_hibernate && !can_brightness && !has_throttle && !has_performance)
apm = 0;
if (!apm) {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
- QLabel* explain = laptop_portable::how_to_do_suspend_resume(this);
+ TQLabel* explain = laptop_portable::how_to_do_suspend_resume(this);
top_layout->addWidget(explain);
top_layout->addStretch(1);
} else {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
- QHBoxLayout *hlay = new QHBoxLayout( top_layout );
+ TQHBoxLayout *hlay = new TQHBoxLayout( top_layout );
if (laptop_portable::has_button(laptop_portable::LidButton)) {
- lidBox = new QVButtonGroup(i18n("Lid Switch Closed"), this);
+ lidBox = new TQVButtonGroup(i18n("Lid Switch Closed"), this);
lidBox->layout()->setSpacing( KDialog::spacingHint() );
- QToolTip::add( lidBox, i18n( "Select which actions will occur when the laptop's lid is closed" ) );
+ TQToolTip::add( lidBox, i18n( "Select which actions will occur when the laptop's lid is closed" ) );
hlay->addWidget( lidBox );
if (can_standby) {
- lidStandby = new QRadioButton(i18n("Standb&y"), lidBox);
- QToolTip::add( lidStandby, i18n( "Causes the laptop to move into the standby temporary low-power state" ) );
+ lidStandby = new TQRadioButton(i18n("Standb&y"), lidBox);
+ TQToolTip::add( lidStandby, i18n( "Causes the laptop to move into the standby temporary low-power state" ) );
}
if (can_suspend) {
- lidSuspend = new QRadioButton(i18n("&Suspend"), lidBox);
- QToolTip::add( lidSuspend, i18n( "Causes the laptop to move into the suspend 'save-to-ram' state" ) );
+ lidSuspend = new TQRadioButton(i18n("&Suspend"), lidBox);
+ TQToolTip::add( lidSuspend, i18n( "Causes the laptop to move into the suspend 'save-to-ram' state" ) );
}
if (can_hibernate) {
- lidHibernate = new QRadioButton(i18n("H&ibernate"), lidBox);
- QToolTip::add( lidHibernate, i18n( "Causes the laptop to move into the hibernate 'save-to-disk' state" ) );
+ lidHibernate = new TQRadioButton(i18n("H&ibernate"), lidBox);
+ TQToolTip::add( lidHibernate, i18n( "Causes the laptop to move into the hibernate 'save-to-disk' state" ) );
}
if (can_shutdown) {
- lidShutdown = new QRadioButton(i18n("System power off"), lidBox);
- QToolTip::add( lidShutdown, i18n( "Causes the laptop to power down" ) );
+ lidShutdown = new TQRadioButton(i18n("System power off"), lidBox);
+ TQToolTip::add( lidShutdown, i18n( "Causes the laptop to power down" ) );
}
if (can_logout) {
- lidLogout = new QRadioButton(i18n("Logout"), lidBox);
- QToolTip::add( lidShutdown, i18n( "Causes you to be logged out" ) );
+ lidLogout = new TQRadioButton(i18n("Logout"), lidBox);
+ TQToolTip::add( lidShutdown, i18n( "Causes you to be logged out" ) );
}
if (can_suspend||can_standby||can_hibernate||can_shutdown||can_logout)
- lidOff = new QRadioButton(i18n("&Off"), lidBox);
+ lidOff = new TQRadioButton(i18n("&Off"), lidBox);
if (can_brightness) {
- lidBrightness = new QCheckBox(i18n("Brightness"), lidBox);
- QToolTip::add( lidBrightness, i18n( "Causes the back panel brightness to be set" ) );
- QWidget *wp = new QWidget(lidBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- xl->addWidget(new QLabel("-", wp));
- lidValBrightness = new QSlider(0, 255, 16, 255, Qt::Horizontal, wp);
+ lidBrightness = new TQCheckBox(i18n("Brightness"), lidBox);
+ TQToolTip::add( lidBrightness, i18n( "Causes the back panel brightness to be set" ) );
+ TQWidget *wp = new TQWidget(lidBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ xl->addWidget(new TQLabel("-", wp));
+ lidValBrightness = new TQSlider(0, 255, 16, 255, Qt::Horizontal, wp);
lidValBrightness->setEnabled(0);
- QToolTip::add( lidValBrightness, i18n( "How bright the back panel will be set to" ) );
- connect (lidValBrightness, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
+ TQToolTip::add( lidValBrightness, i18n( "How bright the back panel will be set to" ) );
+ connect (lidValBrightness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(lidValBrightness);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
}
if (has_performance) {
- lidPerformance = new QCheckBox(i18n("System performance"), lidBox);
- QToolTip::add( lidPerformance, i18n( "Causes the performance profile to be changed" ) );
+ lidPerformance = new TQCheckBox(i18n("System performance"), lidBox);
+ TQToolTip::add( lidPerformance, i18n( "Causes the performance profile to be changed" ) );
- QWidget *wp = new QWidget(lidBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(lidBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
lidValPerformance = new KComboBox(0, wp);
- QToolTip::add( lidValPerformance, i18n( "The performance profile to switch to" ) );
+ TQToolTip::add( lidValPerformance, i18n( "The performance profile to switch to" ) );
lidValPerformance->insertStringList(performance_list);
lidValPerformance->setEnabled(0);
- connect (lidValPerformance, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ connect (lidValPerformance, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(lidValPerformance);
xl->addStretch(1);
}
if (has_throttle) {
- lidThrottle = new QCheckBox(i18n("CPU throttle"), lidBox);
- QToolTip::add( lidThrottle, i18n( "Causes the CPU to be throttled back" ) );
+ lidThrottle = new TQCheckBox(i18n("CPU throttle"), lidBox);
+ TQToolTip::add( lidThrottle, i18n( "Causes the CPU to be throttled back" ) );
- QWidget *wp = new QWidget(lidBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(lidBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
lidValThrottle = new KComboBox(0, wp);
- QToolTip::add( lidValThrottle, i18n( "How much to throttle back the CPU" ) );
+ TQToolTip::add( lidValThrottle, i18n( "How much to throttle back the CPU" ) );
lidValThrottle->insertStringList(throttle_list);
lidValThrottle->setEnabled(0);
- connect (lidValThrottle, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ connect (lidValThrottle, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(lidValThrottle);
xl->addStretch(1);
}
- connect(lidBox, SIGNAL(clicked(int)), this, SLOT(configChanged()));
+ connect(lidBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(configChanged()));
}
if (laptop_portable::has_button(laptop_portable::PowerButton)) {
- powerBox = new QVButtonGroup(i18n("Power Switch Pressed"), this);
+ powerBox = new TQVButtonGroup(i18n("Power Switch Pressed"), this);
powerBox->layout()->setSpacing( KDialog::spacingHint() );
- QToolTip::add( powerBox, i18n( "Select which actions will occur when the laptop's power button is pressed" ) );
+ TQToolTip::add( powerBox, i18n( "Select which actions will occur when the laptop's power button is pressed" ) );
hlay->addWidget( powerBox );
if (can_standby) {
- powerStandby = new QRadioButton(i18n("Sta&ndby"), powerBox);
- QToolTip::add( powerStandby, i18n( "Causes the laptop to move into the standby temporary low-power state" ) );
+ powerStandby = new TQRadioButton(i18n("Sta&ndby"), powerBox);
+ TQToolTip::add( powerStandby, i18n( "Causes the laptop to move into the standby temporary low-power state" ) );
}
if (can_suspend) {
- powerSuspend = new QRadioButton(i18n("S&uspend"), powerBox);
- QToolTip::add( powerSuspend, i18n( "Causes the laptop to move into the suspend 'save-to-ram' state" ) );
+ powerSuspend = new TQRadioButton(i18n("S&uspend"), powerBox);
+ TQToolTip::add( powerSuspend, i18n( "Causes the laptop to move into the suspend 'save-to-ram' state" ) );
}
if (can_hibernate) {
- powerHibernate = new QRadioButton(i18n("Hi&bernate"), powerBox);
- QToolTip::add( powerHibernate, i18n( "Causes the laptop to move into the hibernate 'save-to-disk' state" ) );
+ powerHibernate = new TQRadioButton(i18n("Hi&bernate"), powerBox);
+ TQToolTip::add( powerHibernate, i18n( "Causes the laptop to move into the hibernate 'save-to-disk' state" ) );
}
if (can_shutdown) {
- powerShutdown = new QRadioButton(i18n("System power off"), powerBox);
- QToolTip::add( powerShutdown, i18n( "Causes the laptop to power down" ) );
+ powerShutdown = new TQRadioButton(i18n("System power off"), powerBox);
+ TQToolTip::add( powerShutdown, i18n( "Causes the laptop to power down" ) );
}
if (can_logout) {
- powerLogout = new QRadioButton(i18n("Logout"), powerBox);
- QToolTip::add( powerShutdown, i18n( "Causes you to be logged out" ) );
+ powerLogout = new TQRadioButton(i18n("Logout"), powerBox);
+ TQToolTip::add( powerShutdown, i18n( "Causes you to be logged out" ) );
}
if (can_suspend||can_standby||can_hibernate||can_shutdown||can_logout)
- powerOff = new QRadioButton(i18n("O&ff"), powerBox);
+ powerOff = new TQRadioButton(i18n("O&ff"), powerBox);
if (can_brightness) {
- powerBrightness = new QCheckBox(i18n("Brightness"), powerBox);
- QToolTip::add( powerBrightness, i18n( "Causes the back panel brightness to be set" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- xl->addWidget(new QLabel("-", wp));
- powerValBrightness = new QSlider(0, 255, 16, 255, Qt::Horizontal, wp);
- QToolTip::add( powerValBrightness, i18n( "How bright the back panel will be set to" ) );
+ powerBrightness = new TQCheckBox(i18n("Brightness"), powerBox);
+ TQToolTip::add( powerBrightness, i18n( "Causes the back panel brightness to be set" ) );
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ xl->addWidget(new TQLabel("-", wp));
+ powerValBrightness = new TQSlider(0, 255, 16, 255, Qt::Horizontal, wp);
+ TQToolTip::add( powerValBrightness, i18n( "How bright the back panel will be set to" ) );
powerValBrightness->setEnabled(0);
- connect (powerValBrightness, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
+ connect (powerValBrightness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(powerValBrightness);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
}
if (has_performance) {
- powerPerformance = new QCheckBox(i18n("System performance"), powerBox);
- QToolTip::add( powerPerformance, i18n( "Causes the performance profile to be changed" ) );
+ powerPerformance = new TQCheckBox(i18n("System performance"), powerBox);
+ TQToolTip::add( powerPerformance, i18n( "Causes the performance profile to be changed" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
powerValPerformance = new KComboBox(0, wp);
- QToolTip::add( powerValPerformance, i18n( "The performance profile to switch to" ) );
+ TQToolTip::add( powerValPerformance, i18n( "The performance profile to switch to" ) );
powerValPerformance->insertStringList(performance_list);
powerValPerformance->setEnabled(0);
- connect (powerValPerformance, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ connect (powerValPerformance, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(powerValPerformance);
xl->addStretch(1);
}
if (has_throttle) {
- powerThrottle = new QCheckBox(i18n("CPU throttle"), powerBox);
- QToolTip::add( powerThrottle, i18n( "Causes the CPU to be throttled back" ) );
+ powerThrottle = new TQCheckBox(i18n("CPU throttle"), powerBox);
+ TQToolTip::add( powerThrottle, i18n( "Causes the CPU to be throttled back" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
powerValThrottle = new KComboBox(0, wp);
- QToolTip::add( powerValThrottle, i18n( "How much to throttle back the CPU" ) );
+ TQToolTip::add( powerValThrottle, i18n( "How much to throttle back the CPU" ) );
powerValThrottle->insertStringList(throttle_list);
powerValThrottle->setEnabled(0);
- connect (powerValThrottle, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ connect (powerValThrottle, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(powerValThrottle);
xl->addStretch(1);
}
- connect(powerBox, SIGNAL(clicked(int)), this, SLOT(configChanged()));
+ connect(powerBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(configChanged()));
}
hlay->addStretch(1);
- QLabel* explain = new QLabel(i18n("This panel enables actions that are triggered when the lid closure switch "
+ TQLabel* explain = new TQLabel(i18n("This panel enables actions that are triggered when the lid closure switch "
"or power switch on your laptop is pressed. Some laptops may already "
"automatically do things like this, if you cannot disable them in your BIOS "
"you probably should not enable anything in this panel."), this);
@@ -278,7 +278,7 @@ ButtonsConfig::ButtonsConfig (QWidget * parent, const char *name)
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight );
}
}
@@ -609,7 +609,7 @@ void ButtonsConfig::configChanged()
}
-QString ButtonsConfig::quickHelp() const
+TQString ButtonsConfig::quickHelp() const
{
return i18n("<h1>Laptop Power Control</h1>This module allows you to "
"configure the power switch or lid closure switch on your laptop "
diff --git a/klaptopdaemon/buttons.h b/klaptopdaemon/buttons.h
index 5abd088..f142a58 100644
--- a/klaptopdaemon/buttons.h
+++ b/klaptopdaemon/buttons.h
@@ -26,7 +26,7 @@
#define __BUTTONSCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSlider;
@@ -41,14 +41,14 @@ class ButtonsConfig : public KCModule
{
Q_OBJECT
public:
- ButtonsConfig( QWidget *parent=0, const char* name=0);
+ ButtonsConfig( TQWidget *parent=0, const char* name=0);
~ButtonsConfig();
void save( void );
void load();
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -61,28 +61,28 @@ private:
int getLid();
void setPower( int, int );
- QButtonGroup *lidBox;
- QRadioButton *lidStandby, *lidSuspend, *lidOff, *lidHibernate, *lidShutdown, *lidLogout;
- QCheckBox *lidBrightness;
- QSlider *lidValBrightness;
- QCheckBox *lidThrottle;
+ TQButtonGroup *lidBox;
+ TQRadioButton *lidStandby, *lidSuspend, *lidOff, *lidHibernate, *lidShutdown, *lidLogout;
+ TQCheckBox *lidBrightness;
+ TQSlider *lidValBrightness;
+ TQCheckBox *lidThrottle;
KComboBox *lidValThrottle;
- QCheckBox *lidPerformance;
+ TQCheckBox *lidPerformance;
KComboBox *lidValPerformance;
- QButtonGroup *powerBox;
- QRadioButton *powerStandby, *powerSuspend, *powerOff, *powerHibernate, *powerShutdown, *powerLogout;
- QCheckBox *powerBrightness;
- QSlider *powerValBrightness;
- QCheckBox *powerThrottle;
+ TQButtonGroup *powerBox;
+ TQRadioButton *powerStandby, *powerSuspend, *powerOff, *powerHibernate, *powerShutdown, *powerLogout;
+ TQCheckBox *powerBrightness;
+ TQSlider *powerValBrightness;
+ TQCheckBox *powerThrottle;
KComboBox *powerValThrottle;
- QCheckBox *powerPerformance;
+ TQCheckBox *powerPerformance;
KComboBox *powerValPerformance;
int power_bright_val, lid_bright_val;
bool lid_bright_enabled, power_bright_enabled;
bool lid_throttle_enabled, power_throttle_enabled;
- QString lid_throttle_val, power_throttle_val;
+ TQString lid_throttle_val, power_throttle_val;
bool lid_performance_enabled, power_performance_enabled;
- QString lid_performance_val, power_performance_val;
+ TQString lid_performance_val, power_performance_val;
KConfig *config;
int power, lid, apm;
diff --git a/klaptopdaemon/daemon_state.cpp b/klaptopdaemon/daemon_state.cpp
index 5ca0d28..49d4ade 100644
--- a/klaptopdaemon/daemon_state.cpp
+++ b/klaptopdaemon/daemon_state.cpp
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <fcntl.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <klocale.h>
@@ -41,8 +41,8 @@
#include <sys/ioctl.h>
#include <kmessagebox.h>
#include <dcopclient.h>
-#include <qsocketnotifier.h>
-#include <qcursor.h>
+#include <tqsocketnotifier.h>
+#include <tqcursor.h>
#include <unistd.h>
@@ -52,11 +52,11 @@ daemon_state::daemon_state()
{
exists = laptop_portable::has_power_management();
has_brightness = laptop_portable::has_brightness();
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
has_performance = laptop_portable::get_system_performance(0, current_profile, profile_list, active_list);
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
@@ -96,11 +96,11 @@ void daemon_state::load()
exists = laptop_portable::has_power_management();
has_brightness = laptop_portable::has_brightness();
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
has_performance = laptop_portable::get_system_performance(0, current_profile, profile_list, active_list);
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
diff --git a/klaptopdaemon/daemon_state.h b/klaptopdaemon/daemon_state.h
index 6da4e73..3a0e4b3 100644
--- a/klaptopdaemon/daemon_state.h
+++ b/klaptopdaemon/daemon_state.h
@@ -22,13 +22,13 @@
*/
-#include <qdir.h>
+#include <tqdir.h>
#include <unistd.h>
#include <time.h>
-#include <qmovie.h>
-#include <qptrlist.h>
-#include <qfileinfo.h>
-#include <qimage.h>
+#include <tqmovie.h>
+#include <tqptrlist.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
#include <kdelibs_export.h>
class KDE_EXPORT daemon_state
@@ -44,9 +44,9 @@ public:
bool has_performance;
bool has_throttle;
- QString noBatteryIcon;
- QString chargeIcon;
- QString noChargeIcon;
+ TQString noBatteryIcon;
+ TQString chargeIcon;
+ TQString noChargeIcon;
//
// power out actions
@@ -71,9 +71,9 @@ public:
bool logout[2];
bool shutdown[2];
bool runCommand[2];
- QString runCommandPath[2];
+ TQString runCommandPath[2];
bool playSound[2];
- QString playSoundPath[2];
+ TQString playSoundPath[2];
bool notify[2];
bool do_suspend[2];
bool do_hibernate[2];
@@ -112,12 +112,12 @@ public:
// performance
bool performance_pon, performance_poff;
- QString performance_val_on, performance_val_off;
+ TQString performance_val_on, performance_val_off;
// throttle
bool throttle_pon, throttle_poff;
- QString throttle_val_on, throttle_val_off;
+ TQString throttle_val_on, throttle_val_off;
// button triggered stuff
int button_lid;
@@ -128,12 +128,12 @@ public:
int button_power_bright_val;
bool button_lid_performance_enabled;
bool button_power_performance_enabled;
- QString button_lid_performance_val;
- QString button_power_performance_val;
+ TQString button_lid_performance_val;
+ TQString button_power_performance_val;
bool button_lid_throttle_enabled;
bool button_power_throttle_enabled;
- QString button_lid_throttle_val;
- QString button_power_throttle_val;
+ TQString button_lid_throttle_val;
+ TQString button_power_throttle_val;
bool enable_lid_button;
bool enable_power_button;
diff --git a/klaptopdaemon/daemondock.cpp b/klaptopdaemon/daemondock.cpp
index fb1336a..a49f312 100644
--- a/klaptopdaemon/daemondock.cpp
+++ b/klaptopdaemon/daemondock.cpp
@@ -24,9 +24,9 @@
#include <stdio.h>
#include <stdlib.h>
-#include <qcursor.h>
+#include <tqcursor.h>
-#include <qslider.h>
+#include <tqslider.h>
#include <klocale.h>
#include <kpopupmenu.h>
#include <dcopclient.h>
@@ -41,10 +41,10 @@
#include <kconfig.h>
#include <kglobalsettings.h>
#include <kmessagebox.h>
-#include <qvbox.h>
-#include <qstringlist.h>
-#include <qbitmap.h>
-#include <qpainter.h>
+#include <tqvbox.h>
+#include <tqstringlist.h>
+#include <tqbitmap.h>
+#include <tqpainter.h>
#include <kiconeffect.h>
extern void wake_laptop_daemon();
@@ -73,48 +73,48 @@ laptop_dock::SetupPopup()
int can_standby = laptop_portable::has_standby();
int can_suspend = laptop_portable::has_suspend();
int can_hibernate = laptop_portable::has_hibernation();
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
bool has_performance = laptop_portable::get_system_performance(0, current_profile, profile_list, active_list);
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
- rightPopup->insertItem(SmallIcon("configure"), i18n("&Configure KLaptop..."), this, SLOT(invokeSetup()));
+ rightPopup->insertItem(SmallIcon("configure"), i18n("&Configure KLaptop..."), this, TQT_SLOT(invokeSetup()));
if (has_brightness)
- rightPopup->insertItem(i18n("Screen Brightness..."), this, SLOT(invokeBrightness()));
+ rightPopup->insertItem(i18n("Screen Brightness..."), this, TQT_SLOT(invokeBrightness()));
if (has_performance) {
- performance_popup = new QPopupMenu(0, "performance");
+ performance_popup = new TQPopupMenu(0, "performance");
performance_popup->setCheckable(1);
rightPopup->insertItem(i18n("Performance Profile..."), performance_popup);
- connect( performance_popup, SIGNAL( activated( int ) ), this, SLOT( activate_performance( int ) ) );
- connect( performance_popup, SIGNAL( aboutToShow() ), this, SLOT( fill_performance() ) );
+ connect( performance_popup, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( activate_performance( int ) ) );
+ connect( performance_popup, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fill_performance() ) );
} else {
performance_popup = 0;
}
if (has_throttle) {
- throttle_popup = new QPopupMenu(0, "throttle");
+ throttle_popup = new TQPopupMenu(0, "throttle");
throttle_popup->setCheckable(1);
rightPopup->insertItem(i18n("CPU Throttling..."), throttle_popup);
- connect( throttle_popup, SIGNAL( activated( int ) ), this, SLOT( activate_throttle( int ) ) );
- connect( throttle_popup, SIGNAL( aboutToShow() ), this, SLOT( fill_throttle() ) );
+ connect( throttle_popup, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( activate_throttle( int ) ) );
+ connect( throttle_popup, TQT_SIGNAL( aboutToShow() ), this, TQT_SLOT( fill_throttle() ) );
} else {
throttle_popup = 0;
}
if (can_standby || can_suspend || can_hibernate) {
rightPopup->insertSeparator();
- if (can_standby) rightPopup->insertItem(i18n("Standby..."), this, SLOT(invokeStandby()));
- // if (can_suspend) rightPopup->insertItem(i18n("&Lock && Suspend..."), this, SLOT(invokeLockSuspend()));
- if (can_suspend) rightPopup->insertItem(i18n("&Suspend..."), this, SLOT(invokeLockSuspend()));
- // if (can_hibernate) rightPopup->insertItem(i18n("&Lock && Hibernate..."), this, SLOT(invokeLockHibernation()));
- if (can_hibernate) rightPopup->insertItem(i18n("&Hibernate..."), this, SLOT(invokeLockHibernation()));
+ if (can_standby) rightPopup->insertItem(i18n("Standby..."), this, TQT_SLOT(invokeStandby()));
+ // if (can_suspend) rightPopup->insertItem(i18n("&Lock && Suspend..."), this, TQT_SLOT(invokeLockSuspend()));
+ if (can_suspend) rightPopup->insertItem(i18n("&Suspend..."), this, TQT_SLOT(invokeLockSuspend()));
+ // if (can_hibernate) rightPopup->insertItem(i18n("&Lock && Hibernate..."), this, TQT_SLOT(invokeLockHibernation()));
+ if (can_hibernate) rightPopup->insertItem(i18n("&Hibernate..."), this, TQT_SLOT(invokeLockHibernation()));
}
rightPopup->insertSeparator();
- rightPopup->insertItem(i18n("&Hide Monitor"), this, SLOT(slotHide()));
- rightPopup->insertItem(SmallIcon("exit"), KStdGuiItem::quit().text(), this, SLOT(slotQuit()));
+ rightPopup->insertItem(i18n("&Hide Monitor"), this, TQT_SLOT(slotHide()));
+ rightPopup->insertItem(SmallIcon("exit"), KStdGuiItem::quit().text(), this, TQT_SLOT(slotQuit()));
}
laptop_dock::~laptop_dock()
@@ -139,13 +139,13 @@ laptop_dock::fill_throttle()
{
throttle_popup->clear();
int current;
- QStringList list;
+ TQStringList list;
bool *active_list;
bool has_throttle = laptop_portable::get_system_throttling(1, current, list, active_list);
if (!has_throttle && !list.empty())
return;
int n=0;
- for (QValueListIterator<QString> i = list.begin();i != list.end();i++) {
+ for (TQValueListIterator<TQString> i = list.begin();i != list.end();i++) {
throttle_popup->insertItem(*i, n);
throttle_popup->setItemEnabled(n, active_list[n]);
n++;
@@ -164,13 +164,13 @@ laptop_dock::fill_performance()
{
performance_popup->clear();
int current;
- QStringList list;
+ TQStringList list;
bool *active_list;
bool has_performance = laptop_portable::get_system_performance(1, current, list, active_list);
if (!has_performance && !list.empty())
return;
int n=0;
- for (QValueListIterator<QString> i = list.begin();i != list.end();i++) {
+ for (TQValueListIterator<TQString> i = list.begin();i != list.end();i++) {
performance_popup->insertItem(*i, n);
performance_popup->setItemEnabled(n, active_list[n]);
n++;
@@ -195,24 +195,24 @@ laptop_dock::invokeBrightness()
brightness = 255;
if (brightness_widget == 0) {
- brightness_widget = new QVBox(0L, "Brightness", WStyle_Customize | WType_Popup);
- brightness_widget->setFrameStyle(QFrame::PopupPanel);
+ brightness_widget = new TQVBox(0L, "Brightness", WStyle_Customize | WType_Popup);
+ brightness_widget->setFrameStyle(TQFrame::PopupPanel);
brightness_widget->setMargin(KDialog::marginHint());
- brightness_slider = new QSlider(0, 255, 16, 255-brightness, Qt::Vertical, brightness_widget, 0);
+ brightness_slider = new TQSlider(0, 255, 16, 255-brightness, Qt::Vertical, brightness_widget, 0);
brightness_slider->setMinimumHeight(40);
brightness_slider->setMinimumWidth(15);
- connect(brightness_slider, SIGNAL(valueChanged(int)), this, SLOT(invokeBrightnessSlider(int)));
+ connect(brightness_slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(invokeBrightnessSlider(int)));
brightness_widget->resize(brightness_widget->sizeHint());
} else {
brightness_slider->setValue(255-brightness);
}
if (!brightness_widget->isVisible()) {
- QRect desktop = KGlobalSettings::desktopGeometry(this);
+ TQRect desktop = KGlobalSettings::desktopGeometry(this);
int sw = desktop.width();
int sh = desktop.height();
int sx = desktop.x();
int sy = desktop.y();
- QPoint pos = QCursor::pos();
+ TQPoint pos = TQCursor::pos();
int x = pos.x();
int y = pos.y();
y -= brightness_widget->geometry().height();
@@ -233,7 +233,7 @@ laptop_dock::invokeBrightness()
void laptop_dock::slotGoRoot(int /*id*/) {
#ifdef NOTDEF
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password "
@@ -251,8 +251,8 @@ void laptop_dock::slotGoRoot(int /*id*/) {
*_rootProcess << "root";
//*_rootProcess << "--nonewdcop";
*_rootProcess << KStandardDirs::findExe("klaptopdaemon");
- connect(_rootProcess, SIGNAL(processExited(KProcess*)),
- this, SLOT(rootExited(KProcess*)));
+ connect(_rootProcess, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(rootExited(KProcess*)));
_rootProcess->start(KProcess::NotifyOnExit);
// We should disable this menu item here now.
}
@@ -268,7 +268,7 @@ void laptop_dock::slotGoRoot(int /*id*/) {
void laptop_dock::slotHide() {
- int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to hide the battery monitor? Your battery will still be monitored in the background."), QString::null, i18n("Hide Monitor"), i18n("Do Not Hide"), "hideConfirm");
+ int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to hide the battery monitor? Your battery will still be monitored in the background."), TQString::null, i18n("Hide Monitor"), i18n("Do Not Hide"), "hideConfirm");
if (confirm != KMessageBox::Yes)
return;
@@ -286,12 +286,12 @@ void laptop_dock::slotHide() {
void laptop_dock::slotQuit() {
- int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to quit the battery monitor?"), QString::null, KStdGuiItem::quit(), KStdGuiItem::cancel(), "quitConfirm");
+ int confirm = KMessageBox::questionYesNo(0, i18n("Are you sure you want to quit the battery monitor?"), TQString::null, KStdGuiItem::quit(), KStdGuiItem::cancel(), "quitConfirm");
if (confirm != KMessageBox::Yes)
return;
- confirm = KMessageBox::questionYesNo(0, i18n("Do you wish to disable the battery monitor from starting in the future?"), QString::null, i18n("Disable"), i18n("Keep Enabled"), "restartMonitor");
+ confirm = KMessageBox::questionYesNo(0, i18n("Do you wish to disable the battery monitor from starting in the future?"), TQString::null, i18n("Disable"), i18n("Keep Enabled"), "restartMonitor");
if (confirm == KMessageBox::Yes) {
// just tell ourselves to hide the battery
@@ -360,19 +360,19 @@ KPCMCIAInfo *f = new KPCMCIAInfo(_pcmcia);
f->showTab(_displayActions[id]->num());
}
-void laptop_dock::mousePressEvent( QMouseEvent *event )
+void laptop_dock::mousePressEvent( TQMouseEvent *event )
{
if(event->button() == LeftButton) {
- QPopupMenu *popup = new QPopupMenu(0, "popup");
+ TQPopupMenu *popup = new TQPopupMenu(0, "popup");
if (!pdaemon->exists()) {
popup->insertItem(i18n("Power Manager Not Found"));
} else {
- QString tmp;
+ TQString tmp;
if (pdaemon->val >= 0) {
if (pdaemon->left >= 0) {
- QString num3;
+ TQString num3;
num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0');
tmp = i18n("%1:%2 hours left").arg(pdaemon->left/60).arg(num3);
@@ -399,7 +399,7 @@ void laptop_dock::mousePressEvent( QMouseEvent *event )
* - show the cpu profile and current frequency
*/
if (laptop_portable::has_cpufreq()) {
- QString speed = laptop_portable::cpu_frequency();
+ TQString speed = laptop_portable::cpu_frequency();
if (!speed.isEmpty()) {
popup->insertSeparator();
popup->insertItem(i18n("CPU: %1").arg(speed));
@@ -410,7 +410,7 @@ void laptop_dock::mousePressEvent( QMouseEvent *event )
* ADD the PCMCIA entries here
*/
if (_pcmcia && _pcmcia->haveCardServices()) {
- QString slotname = i18n("Slot %1"); // up here so we only construct it once
+ TQString slotname = i18n("Slot %1"); // up here so we only construct it once
int id;
popup->insertSeparator();
_ejectActions.clear();
@@ -419,30 +419,30 @@ void laptop_dock::mousePressEvent( QMouseEvent *event )
_suspendActions.clear();
_resumeActions.clear();
_displayActions.clear();
- id = popup->insertItem(i18n("Card Slots..."), this, SLOT(slotDisplayAction(int)));
+ id = popup->insertItem(i18n("Card Slots..."), this, TQT_SLOT(slotDisplayAction(int)));
_displayActions.insert(id, _pcmcia->getCard(0));
for (int i = 0; i < _pcmcia->getCardCount(); i++) {
KPCMCIACard *thiscard;
thiscard = _pcmcia->getCard(i);
if (thiscard && (thiscard->present())) {
- QPopupMenu *thisSub = new QPopupMenu(popup, thiscard->name().latin1());
- id = thisSub->insertItem(i18n("Details..."), this, SLOT(slotDisplayAction(int)));
+ TQPopupMenu *thisSub = new TQPopupMenu(popup, thiscard->name().latin1());
+ id = thisSub->insertItem(i18n("Details..."), this, TQT_SLOT(slotDisplayAction(int)));
_displayActions.insert(id, thiscard);
// add the actions
- QPopupMenu *actionsSub = new QPopupMenu(thisSub, "actions");
- id = actionsSub->insertItem(i18n("Eject"), this, SLOT(slotEjectAction(int)));
+ TQPopupMenu *actionsSub = new TQPopupMenu(thisSub, "actions");
+ id = actionsSub->insertItem(i18n("Eject"), this, TQT_SLOT(slotEjectAction(int)));
actionsSub->setItemEnabled(id, !(thiscard->status() & CARD_STATUS_BUSY));
_ejectActions.insert(id, thiscard);
- id = actionsSub->insertItem(i18n("Suspend"), this, SLOT(slotSuspendAction(int)));
+ id = actionsSub->insertItem(i18n("Suspend"), this, TQT_SLOT(slotSuspendAction(int)));
actionsSub->setItemEnabled(id, !(thiscard->status() & (CARD_STATUS_SUSPEND|CARD_STATUS_BUSY)));
_suspendActions.insert(id, thiscard);
- id = actionsSub->insertItem(i18n("Resume"), this, SLOT(slotResumeAction(int)));
+ id = actionsSub->insertItem(i18n("Resume"), this, TQT_SLOT(slotResumeAction(int)));
actionsSub->setItemEnabled(id, (thiscard->status() & CARD_STATUS_SUSPEND));
_resumeActions.insert(id, thiscard);
- id = actionsSub->insertItem(i18n("Reset"), this, SLOT(slotResetAction(int)));
+ id = actionsSub->insertItem(i18n("Reset"), this, TQT_SLOT(slotResetAction(int)));
_resetActions.insert(id, thiscard);
- id = actionsSub->insertItem(i18n("Insert"), this, SLOT(slotInsertAction(int)));
+ id = actionsSub->insertItem(i18n("Insert"), this, TQT_SLOT(slotInsertAction(int)));
_insertActions.insert(id, thiscard);
actionsSub->setItemEnabled(id, !(thiscard->status() & (CARD_STATUS_READY|CARD_STATUS_SUSPEND)));
thisSub->insertItem(i18n("Actions"), actionsSub);
@@ -463,11 +463,11 @@ void laptop_dock::mousePressEvent( QMouseEvent *event )
popup->insertItem(i18n("Enable PCMCIA"));
}
- popup->popup(QCursor::pos());
+ popup->popup(TQCursor::pos());
}
}
-void laptop_dock::mouseReleaseEvent( QMouseEvent *e )
+void laptop_dock::mouseReleaseEvent( TQMouseEvent *e )
{
if ( !rect().contains( e->pos() ) )
return;
@@ -489,7 +489,7 @@ void laptop_dock::mouseReleaseEvent( QMouseEvent *e )
break;
}
}
-void laptop_dock::showEvent( QShowEvent * )
+void laptop_dock::showEvent( TQShowEvent * )
{
}
@@ -537,7 +537,7 @@ laptop_dock::reload_icon()
{
// we will try to deduce the pixmap (or gif) name now. it will
// vary depending on the dock and power
- QString pixmap_name;
+ TQString pixmap_name;
if (!pdaemon->exists())
pixmap_name = pdaemon->noBatteryIcon();
@@ -567,9 +567,9 @@ void laptop_dock::displayPixmap()
// at this point, we have the file to display. so display it
- QImage image = pm.convertToImage();
- const QBitmap *bmmask = pm.mask();
- QImage mask;
+ TQImage image = pm.convertToImage();
+ const TQBitmap *bmmask = pm.mask();
+ TQImage mask;
if (bmmask)
mask = bmmask->convertToImage();
@@ -623,8 +623,8 @@ void laptop_dock::displayPixmap()
}
quit:
- QString tmp;
- QString levelString;
+ TQString tmp;
+ TQString levelString;
if (!pdaemon->exists()) {
tmp = i18n("Laptop power management not available");
@@ -637,7 +637,7 @@ quit:
} else if (pdaemon->val >= 0) {
levelString.sprintf ("%i%%", pdaemon->val);
if (pdaemon->left >= 0) {
- QString num3;
+ TQString num3;
num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0');
tmp = i18n("Plugged in - %1% charged (%2:%3 hours left)")
@@ -654,7 +654,7 @@ quit:
if (pdaemon->val >= 0) {
levelString.sprintf ("%i%%", pdaemon->val);
if (pdaemon->left >= 0) {
- QString num3;
+ TQString num3;
num3.setNum(pdaemon->left%60);
num3 = num3.rightJustify(2, '0');
tmp = i18n("Running on batteries - %1% charged (%2:%3 hours left)")
@@ -690,13 +690,13 @@ quit:
int oldPixmapWidth = image.size().width();
int oldPixmapHeight = image.size().height();
- QFont percentageFont = KGlobalSettings::generalFont();
+ TQFont percentageFont = KGlobalSettings::generalFont();
percentageFont.setBold(true);
// decrease the size of the font for the number of unread messages if the
// number doesn't fit into the available space
float percentageFontSize = percentageFont.pointSizeFloat();
- QFontMetrics qfm( percentageFont );
+ TQFontMetrics qfm( percentageFont );
int width = qfm.width( levelString );
if( width > oldPixmapWidth )
{
@@ -710,38 +710,38 @@ quit:
// reason text that is drawn on a transparent pixmap is invisible
// (apparently the alpha channel isn't changed when the text is drawn).
// Therefore I have to draw the text on a solid background and then remove
- // the background by making it transparent with QPixmap::setMask. This
+ // the background by making it transparent with TQPixmap::setMask. This
// involves the slow createHeuristicMask() function (from the API docs:
- // "This function is slow because it involves transformation to a QImage,
- // non-trivial computations and a transformation back to a QBitmap."). Then
- // I have to convert the resulting QPixmap to a QImage in order to overlay
+ // "This function is slow because it involves transformation to a TQImage,
+ // non-trivial computations and a transformation back to a TQBitmap."). Then
+ // I have to convert the resulting TQPixmap to a TQImage in order to overlay
// the light KMail icon with the number (because KIconEffect::overlay only
- // works with QImage). Finally the resulting QImage has to be converted
- // back to a QPixmap.
+ // works with TQImage). Finally the resulting TQImage has to be converted
+ // back to a TQPixmap.
// That's a lot of work for overlaying the KMail icon with the number of
// unread messages, but every other approach I tried failed miserably.
// IK, 2003-09-22
- QPixmap percentagePixmap( oldPixmapWidth, oldPixmapHeight );
+ TQPixmap percentagePixmap( oldPixmapWidth, oldPixmapHeight );
percentagePixmap.fill( Qt::white );
- QPainter p( &percentagePixmap );
+ TQPainter p( &percentagePixmap );
p.setFont( percentageFont );
p.setPen( Qt::black );
p.drawText( percentagePixmap.rect(), Qt::AlignCenter, levelString );
percentagePixmap.setMask( percentagePixmap.createHeuristicMask() );
- QImage percentageImage = percentagePixmap.convertToImage();
+ TQImage percentageImage = percentagePixmap.convertToImage();
// Overlay the light KMail icon with the number image
- QImage iconWithPercentageImage = image.copy();
+ TQImage iconWithPercentageImage = image.copy();
KIconEffect::overlay( iconWithPercentageImage, percentageImage );
- QPixmap iconWithPercentage;
+ TQPixmap iconWithPercentage;
iconWithPercentage.convertFromImage( iconWithPercentageImage );
setPixmap( iconWithPercentage );
}
else
{
- QPixmap q;
+ TQPixmap q;
q.convertFromImage(image);
if (bmmask)
q.setMask(*bmmask);
@@ -749,7 +749,7 @@ quit:
}
adjustSize();
- QToolTip::add(this, tmp);
+ TQToolTip::add(this, tmp);
}
#include "daemondock.moc"
diff --git a/klaptopdaemon/daemondock.h b/klaptopdaemon/daemondock.h
index 7577ffd..8064886 100644
--- a/klaptopdaemon/daemondock.h
+++ b/klaptopdaemon/daemondock.h
@@ -36,7 +36,7 @@ class QVBox;
class QSlider;
class KPopupMenu;
-#include <qmap.h>
+#include <tqmap.h>
class laptop_dock : public KSystemTray {
@@ -47,9 +47,9 @@ public:
~laptop_dock();
void displayPixmap();
- void mousePressEvent( QMouseEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void showEvent( QShowEvent * );
+ void mousePressEvent( TQMouseEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void showEvent( TQShowEvent * );
void reload_icon();
inline void setPCMCIA(KPCMCIA *p) { _pcmcia = p; }
@@ -86,14 +86,14 @@ private slots:
private:
int brightness;
- QVBox *brightness_widget;
- QSlider *brightness_slider;
+ TQVBox *brightness_widget;
+ TQSlider *brightness_slider;
laptop_daemon *pdaemon;
QPixmap pm;
QPopupMenu *performance_popup, *throttle_popup;
int current_code;
KPCMCIA *_pcmcia;
- QMap<int,KPCMCIACard *> _ejectActions,
+ TQMap<int,KPCMCIACard *> _ejectActions,
_suspendActions,
_resumeActions,
_resetActions,
diff --git a/klaptopdaemon/kpcmcia.cpp b/klaptopdaemon/kpcmcia.cpp
index 9dec605..50d7b4c 100644
--- a/klaptopdaemon/kpcmcia.cpp
+++ b/klaptopdaemon/kpcmcia.cpp
@@ -23,9 +23,9 @@
* kardinfo Copyright 1999, Mirko Sucker <mirko.sucker@unibw-hamburg.de>
*/
-#include <qtimer.h>
-#include <qfile.h>
-#include <qregexp.h>
+#include <tqtimer.h>
+#include <tqfile.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kinstance.h>
@@ -169,13 +169,13 @@ tv.tv_sec = 0; tv.tv_usec = 0;
* Read in the stab file.
*/
if (!stat(_stabPath.latin1(), &sb) && sb.st_mtime >= _last) {
- QFile f(_stabPath.latin1());
+ TQFile f(_stabPath.latin1());
if (f.open(IO_ReadOnly)) {
- QTextStream ts(&f);
+ TQTextStream ts(&f);
bool foundit = false;
- QString _thisreg = "^Socket %1: ";
- QRegExp thisreg ( _thisreg.arg(_num) );
+ TQString _thisreg = "^Socket %1: ";
+ TQRegExp thisreg ( _thisreg.arg(_num) );
if (flock(f.handle(), LOCK_SH)) return updated;
@@ -183,7 +183,7 @@ tv.tv_sec = 0; tv.tv_usec = 0;
// find the card
while(!foundit) {
- QString s;
+ TQString s;
if (ts.eof()) break;
s = ts.readLine();
if (s.contains(thisreg)) {
@@ -196,27 +196,27 @@ tv.tv_sec = 0; tv.tv_usec = 0;
// read it in
if (foundit && !ts.eof()) { // FIXME: ts.eof() is a bad error!!
- QString s = ts.readLine();
+ TQString s = ts.readLine();
int end;
s.simplifyWhiteSpace();
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_type = s;
_type.truncate(end);
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_module = s;
_module.truncate(end);
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
s = s.remove(0, end+1);
- end = s.find(QRegExp("[ \r\t\n]"));
+ end = s.find(TQRegExp("[ \r\t\n]"));
_device = s;
_device.truncate(end);
s = s.remove(0, end+1);
@@ -366,9 +366,9 @@ KPCMCIA::KPCMCIA(int maxSlots, const char *stabpath) : _maxSlots(maxSlots),
_refreshSpeed = 750;
_haveCardServices = false;
-_timer = new QTimer(this);
-connect(_timer, SIGNAL(timeout()), this, SLOT(updateCardInfo()));
-_cards = new QMemArray<KPCMCIACard *>(_maxSlots+1);
+_timer = new TQTimer(this);
+connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateCardInfo()));
+_cards = new TQMemArray<KPCMCIACard *>(_maxSlots+1);
_cardCnt = 0;
@@ -496,19 +496,19 @@ bool KPCMCIA::haveCardServices() {
#ifdef __linux__
static int lookupDevice(const char *x) {
-QFile df("/proc/devices");
-QString thisreg;
+TQFile df("/proc/devices");
+TQString thisreg;
thisreg = "^[0-9]+ %1$";
thisreg = thisreg.arg(x);
if (df.open(IO_ReadOnly)) {
- QTextStream t(&df);
- QString s;
+ TQTextStream t(&df);
+ TQString s;
while (!t.eof()) {
s = t.readLine();
- if (s.contains(QRegExp(thisreg))) {
+ if (s.contains(TQRegExp(thisreg))) {
int n = (s.left(3).stripWhiteSpace()).toInt();
df.close();
return n;
@@ -520,8 +520,8 @@ return -1;
}
static int openDevice(dev_t dev) {
-QString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName());
-QString ext = "_socket%1";
+TQString tmp_path = locateLocal("tmp", KGlobal::instance()->instanceName());
+TQString ext = "_socket%1";
tmp_path += ext.arg((int)dev);
diff --git a/klaptopdaemon/kpcmcia.h b/klaptopdaemon/kpcmcia.h
index c821926..4e55ca6 100644
--- a/klaptopdaemon/kpcmcia.h
+++ b/klaptopdaemon/kpcmcia.h
@@ -25,7 +25,7 @@
class QTimer;
class KPCMCIA;
-#include <qmemarray.h>
+#include <tqmemarray.h>
#include <sys/types.h>
@@ -45,12 +45,12 @@ protected:
int _fd;
int _interrupt;
- QString _device, _ports;
- QString _module;
- QString _cardname;
- QString _type;
+ TQString _device, _ports;
+ TQString _module;
+ TQString _cardname;
+ TQString _type;
int _vcc, _vpp, _vpp2;
- QString _stabPath;
+ TQString _stabPath;
int _iotype;
int _inttype;
int _cfgbase;
@@ -141,27 +141,27 @@ public:
/**
* Return the card name
*/
- inline QString& name() { return _cardname; }
+ inline TQString& name() { return _cardname; }
/**
* Return the port range
*/
- inline QString& ports() { return _ports; }
+ inline TQString& ports() { return _ports; }
/**
* Return the device name
*/
- inline QString& device() { return _device; }
+ inline TQString& device() { return _device; }
/**
* Return the device type (ie network, modem, etc)
*/
- inline QString& type() { return _type; }
+ inline TQString& type() { return _type; }
/**
* Return the driver (module) name
*/
- inline QString& driver() { return _module; }
+ inline TQString& driver() { return _module; }
/**
* Refresh the card information - return < 0 on error.
@@ -176,7 +176,7 @@ private:
-class KPCMCIA : public QObject {
+class KPCMCIA : public TQObject {
Q_OBJECT
public:
@@ -198,12 +198,12 @@ public slots:
private:
int _refreshSpeed;
- QTimer *_timer;
- QMemArray<KPCMCIACard *> *_cards;
+ TQTimer *_timer;
+ TQMemArray<KPCMCIACard *> *_cards;
int _cardCnt;
bool _haveCardServices;
int _maxSlots;
- QString _stabPath;
+ TQString _stabPath;
};
diff --git a/klaptopdaemon/kpcmciainfo.cpp b/klaptopdaemon/kpcmciainfo.cpp
index 82da914..3e91f2d 100644
--- a/klaptopdaemon/kpcmciainfo.cpp
+++ b/klaptopdaemon/kpcmciainfo.cpp
@@ -21,9 +21,9 @@
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qtimer.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqtimer.h>
#include <kstatusbar.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -36,14 +36,14 @@
#include "kpcmciainfo.h"
-KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, QWidget *parent, const char *name)
+KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *parent, const char *name)
: KDialog(parent, name, false), _pcmcia(pcmcia) {
setMinimumSize(300,400);
- _mainGrid = new QGridLayout(this, 9, 5);
+ _mainGrid = new TQGridLayout(this, 9, 5);
- _mainTab = new QTabWidget(this);
+ _mainTab = new TQTabWidget(this);
_mainGrid->addMultiCellWidget(_mainTab, 0, 6, 0, 4);
_mainGrid->setRowStretch(0, 1);
_mainGrid->setRowStretch(1, 1);
@@ -60,7 +60,7 @@ KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, QWidget *parent, const char *name)
_mainTab->resize(KDialog::sizeHint());
resize(KDialog::sizeHint());
- connect(_pcmcia, SIGNAL(cardUpdated(int)), this, SLOT(updateCard(int)));
+ connect(_pcmcia, TQT_SIGNAL(cardUpdated(int)), this, TQT_SLOT(updateCard(int)));
_sb = new KStatusBar(this);
_sb->insertItem(i18n("Ready."), 0, 1, true);
@@ -68,12 +68,12 @@ KPCMCIAInfo::KPCMCIAInfo(KPCMCIA *pcmcia, QWidget *parent, const char *name)
_mainGrid->addMultiCellWidget(_sb, 8, 8, 0, 4);
_mainGrid->setRowStretch(8, 0);
- _updateButton = new QPushButton(i18n("&Update"), this);
+ _updateButton = new TQPushButton(i18n("&Update"), this);
_mainGrid->addWidget(_updateButton, 7, 3);
- connect(_updateButton, SIGNAL(pressed()), this, SLOT(update()));
+ connect(_updateButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(update()));
_closeButton = new KPushButton(KStdGuiItem::close(), this);
_mainGrid->addWidget(_closeButton, 7, 4);
- connect(_closeButton, SIGNAL(pressed()), this, SLOT(slotClose()));
+ connect(_closeButton, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotClose()));
_mainGrid->setRowStretch(7, 0);
show();
@@ -96,15 +96,15 @@ void KPCMCIAInfo::slotResetStatus() {
}
-void KPCMCIAInfo::statusNotice(const QString& text, int life) {
+void KPCMCIAInfo::statusNotice(const TQString& text, int life) {
_sb->changeItem(text, 0);
if (life > 0)
- QTimer::singleShot(life, this, SLOT(slotResetStatus()));
+ TQTimer::singleShot(life, this, TQT_SLOT(slotResetStatus()));
}
-void KPCMCIAInfo::slotTabSetStatus(const QString& text) {
+void KPCMCIAInfo::slotTabSetStatus(const TQString& text) {
statusNotice(text);
}
@@ -131,10 +131,10 @@ void KPCMCIAInfo::prepareCards() {
}
for (int i = 0; i < _pcmcia->getCardCount(); i++) {
- QString tabname = i18n("Card Slot %1");
+ TQString tabname = i18n("Card Slot %1");
KPCMCIAInfoPage *tp = new KPCMCIAInfoPage(_pcmcia->getCard(i), _mainTab);
- connect(this, SIGNAL(updateNow()), tp, SLOT(update()));
- connect(tp, SIGNAL(setStatusBar(const QString&)), this, SLOT(slotTabSetStatus(const QString&)));
+ connect(this, TQT_SIGNAL(updateNow()), tp, TQT_SLOT(update()));
+ connect(tp, TQT_SIGNAL(setStatusBar(const TQString&)), this, TQT_SLOT(slotTabSetStatus(const TQString&)));
tp->resize(_mainTab->sizeHint());
_mainTab->addTab(tp, tabname.arg(i+1));
_pages.insert(i, tp);
@@ -149,42 +149,42 @@ void KPCMCIAInfo::prepareCards() {
///////////////////////////////////////////////////////////////////////////
-KPCMCIAInfoPage::KPCMCIAInfoPage(KPCMCIACard *card, QWidget *parent, const char *name)
- : QFrame(parent, name), _card(card) {
- _mainGrid = new QGridLayout(this, 10, 10);
+KPCMCIAInfoPage::KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *parent, const char *name)
+ : TQFrame(parent, name), _card(card) {
+ _mainGrid = new TQGridLayout(this, 10, 10);
if (!_card) {
// display an error
} else {
- _card_name = new QLabel(this);
+ _card_name = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_name, 0, 0, 0, 5);
- _card_type = new QLabel(this);
+ _card_type = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_type, 0, 0, 6, 9);
- _card_driver = new QLabel(this);
+ _card_driver = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_driver, 1, 1, 0, 4);
- _card_irq = new QLabel(this);
+ _card_irq = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_irq, 2, 2, 0, 3);
- _card_io = new QLabel(this);
+ _card_io = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_io, 3, 3, 0, 6);
- _card_dev = new QLabel(this);
+ _card_dev = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_dev, 4, 4, 0, 4);
- _card_vcc = new QLabel(this);
+ _card_vcc = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_vcc, 5, 5, 0, 2);
- _card_vpp = new QLabel(this);
+ _card_vpp = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_vpp, 5, 5, 5, 9);
- _card_bus = new QLabel(this);
+ _card_bus = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_bus, 6, 6, 0, 4);
- _card_cfgbase = new QLabel(this);
+ _card_cfgbase = new TQLabel(this);
_mainGrid->addMultiCellWidget(_card_cfgbase, 6, 6, 5, 9);
- _card_ej_ins = new QPushButton(i18n("&Eject"), this);
- _card_sus_res = new QPushButton(i18n("&Suspend"), this);
- _card_reset = new QPushButton(i18n("&Reset"), this);
+ _card_ej_ins = new TQPushButton(i18n("&Eject"), this);
+ _card_sus_res = new TQPushButton(i18n("&Suspend"), this);
+ _card_reset = new TQPushButton(i18n("&Reset"), this);
_mainGrid->addWidget(_card_ej_ins, 9, 5);
_mainGrid->addWidget(_card_sus_res, 9, 6);
_mainGrid->addWidget(_card_reset, 9, 7);
- connect(_card_reset, SIGNAL(pressed()), this, SLOT(slotResetCard()));
- connect(_card_sus_res, SIGNAL(pressed()), this, SLOT(slotSuspendResume()));
- connect(_card_ej_ins, SIGNAL(pressed()), this, SLOT(slotInsertEject()));
+ connect(_card_reset, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotResetCard()));
+ connect(_card_sus_res, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotSuspendResume()));
+ connect(_card_ej_ins, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotInsertEject()));
update();
}
@@ -231,7 +231,7 @@ void KPCMCIAInfoPage::slotSuspendResume() {
void KPCMCIAInfoPage::update() {
if (_card) {
- QString tmp;
+ TQString tmp;
_card_name->setText(_card->name());
_card_name->resize(_card_name->sizeHint());
tmp = i18n("Card type: %1 ");
@@ -241,7 +241,7 @@ void KPCMCIAInfoPage::update() {
_card_driver->setText(tmp.arg(_card->driver()));
_card_driver->resize(_card_driver->sizeHint());
tmp = i18n("IRQ: %1%2");
- QString tmp2;
+ TQString tmp2;
switch (_card->intType()) {
case 1:
tmp2 = i18n(" (used for memory)");
diff --git a/klaptopdaemon/kpcmciainfo.h b/klaptopdaemon/kpcmciainfo.h
index 0cc7cea..f345c19 100644
--- a/klaptopdaemon/kpcmciainfo.h
+++ b/klaptopdaemon/kpcmciainfo.h
@@ -24,7 +24,7 @@
#define _KPCMCIAINFO_H
#include <kdialog.h>
-#include <qframe.h>
+#include <tqframe.h>
class KPCMCIA;
class KPCMCIACard;
@@ -35,37 +35,37 @@ class QGridLayout;
class QPushButton;
class KPushButton;
-#include <qmap.h>
+#include <tqmap.h>
class KPCMCIAInfo : public KDialog {
Q_OBJECT
public:
- KPCMCIAInfo(KPCMCIA *pcmcia, QWidget *parent = NULL, const char *name = 0);
+ KPCMCIAInfo(KPCMCIA *pcmcia, TQWidget *parent = NULL, const char *name = 0);
virtual ~KPCMCIAInfo();
void showTab(int num);
- void statusNotice(const QString& text, int life = 1500);
+ void statusNotice(const TQString& text, int life = 1500);
public slots:
void slotClose();
void update();
void updateCard(int num);
void slotResetStatus();
- void slotTabSetStatus(const QString& text);
+ void slotTabSetStatus(const TQString& text);
signals:
void updateNow();
private:
- QFrame *_mainFrame;
- QTabWidget *_mainTab;
- QGridLayout *_mainGrid;
+ TQFrame *_mainFrame;
+ TQTabWidget *_mainTab;
+ TQGridLayout *_mainGrid;
KPCMCIA *_pcmcia;
- QMap<int,KPCMCIAInfoPage*> _pages;
+ TQMap<int,KPCMCIAInfoPage*> _pages;
KStatusBar *_sb;
KPushButton *_closeButton;
- QPushButton *_updateButton;
+ TQPushButton *_updateButton;
void prepareCards();
@@ -75,10 +75,10 @@ private:
class QLabel;
-class KPCMCIAInfoPage : public QFrame {
+class KPCMCIAInfoPage : public TQFrame {
Q_OBJECT
public:
- KPCMCIAInfoPage(KPCMCIACard *card, QWidget *parent = NULL, const char *name = 0);
+ KPCMCIAInfoPage(KPCMCIACard *card, TQWidget *parent = NULL, const char *name = 0);
virtual ~KPCMCIAInfoPage();
public slots:
@@ -88,27 +88,27 @@ public slots:
void slotSuspendResume();
signals:
- void setStatusBar(const QString&);
+ void setStatusBar(const TQString&);
private:
KPCMCIACard *_card;
- QGridLayout *_mainGrid;
-
- QLabel *_card_name;
- QLabel *_card_type;
- QLabel *_card_irq;
- QLabel *_card_io;
- QLabel *_card_dev;
- QLabel *_card_driver;
- QLabel *_card_vcc;
- QLabel *_card_vpp;
- QLabel *_card_cfgbase;
- QLabel *_card_bus;
-
- QPushButton *_card_ej_ins;
- QPushButton *_card_sus_res;
- QPushButton *_card_reset;
+ TQGridLayout *_mainGrid;
+
+ TQLabel *_card_name;
+ TQLabel *_card_type;
+ TQLabel *_card_irq;
+ TQLabel *_card_io;
+ TQLabel *_card_dev;
+ TQLabel *_card_driver;
+ TQLabel *_card_vcc;
+ TQLabel *_card_vpp;
+ TQLabel *_card_cfgbase;
+ TQLabel *_card_bus;
+
+ TQPushButton *_card_ej_ins;
+ TQPushButton *_card_sus_res;
+ TQPushButton *_card_reset;
};
diff --git a/klaptopdaemon/krichtextlabel.cpp b/klaptopdaemon/krichtextlabel.cpp
index 458ade6..089635d 100644
--- a/klaptopdaemon/krichtextlabel.cpp
+++ b/klaptopdaemon/krichtextlabel.cpp
@@ -18,35 +18,35 @@
#include "krichtextlabel.h"
-#include <qtooltip.h>
-#include <qstylesheet.h>
-#include <qsimplerichtext.h>
+#include <tqtooltip.h>
+#include <tqstylesheet.h>
+#include <tqsimplerichtext.h>
#include <kglobalsettings.h>
-static QString qrichtextify( const QString& text )
+static TQString qrichtextify( const TQString& text )
{
if ( text.isEmpty() || text[0] == '<' )
return text;
- QStringList lines = QStringList::split('\n', text);
- for(QStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
+ TQStringList lines = TQStringList::split('\n', text);
+ for(TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it)
{
- *it = QStyleSheet::convertFromPlainText( *it, QStyleSheetItem::WhiteSpaceNormal );
+ *it = TQStyleSheet::convertFromPlainText( *it, TQStyleSheetItem::WhiteSpaceNormal );
}
- return lines.join(QString::null);
+ return lines.join(TQString::null);
}
-KRichTextLabel::KRichTextLabel( const QString &text , QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( const TQString &text , TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
setText(text);
}
-KRichTextLabel::KRichTextLabel( QWidget *parent, const char *name )
- : QLabel ( parent, name ) {
+KRichTextLabel::KRichTextLabel( TQWidget *parent, const char *name )
+ : TQLabel ( parent, name ) {
m_defaultWidth = QMIN(400, KGlobalSettings::desktopGeometry(this).width()*2/5);
setAlignment( Qt::WordBreak );
}
@@ -57,17 +57,17 @@ void KRichTextLabel::setDefaultWidth(int defaultWidth)
updateGeometry();
}
-QSizePolicy KRichTextLabel::sizePolicy() const
+TQSizePolicy KRichTextLabel::sizePolicy() const
{
- return QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum, false);
+ return TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum, false);
}
-QSize KRichTextLabel::minimumSizeHint() const
+TQSize KRichTextLabel::minimumSizeHint() const
{
- QString qt_text = qrichtextify( text() );
+ TQString qt_text = qrichtextify( text() );
int pref_width = 0;
int pref_height = 0;
- QSimpleRichText rt(qt_text, font());
+ TQSimpleRichText rt(qt_text, font());
pref_width = m_defaultWidth;
rt.setWidth(pref_width);
int used_width = rt.widthUsed();
@@ -94,16 +94,16 @@ QSize KRichTextLabel::minimumSizeHint() const
pref_width = used_width;
}
- return QSize(pref_width, rt.height());
+ return TQSize(pref_width, rt.height());
}
-QSize KRichTextLabel::sizeHint() const
+TQSize KRichTextLabel::sizeHint() const
{
return minimumSizeHint();
}
-void KRichTextLabel::setText( const QString &text ) {
- QLabel::setText(text);
+void KRichTextLabel::setText( const TQString &text ) {
+ TQLabel::setText(text);
}
void KRichTextLabel::virtual_hook( int, void* )
diff --git a/klaptopdaemon/krichtextlabel.h b/klaptopdaemon/krichtextlabel.h
index e03fe25..40ead03 100644
--- a/klaptopdaemon/krichtextlabel.h
+++ b/klaptopdaemon/krichtextlabel.h
@@ -19,12 +19,12 @@
#ifndef KRICHTEXTLABEL_H
#define KRICHTEXTLABEL_H
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kdelibs_export.h>
/**
- * @short A replacement for QLabel that supports richtext and proper layout management
+ * @short A replacement for TQLabel that supports richtext and proper layout management
*
* @author Waldo Bastian <bastian@kde.org>
*/
@@ -32,25 +32,25 @@
/*
* QLabel
*/
-class KDEUI_EXPORT KRichTextLabel : public QLabel {
+class KDEUI_EXPORT KRichTextLabel : public TQLabel {
Q_OBJECT
public:
/**
* Default constructor.
*/
- KRichTextLabel( QWidget *parent, const char *name = 0 );
- KRichTextLabel( const QString &text, QWidget *parent, const char *name = 0 );
+ KRichTextLabel( TQWidget *parent, const char *name = 0 );
+ KRichTextLabel( const TQString &text, TQWidget *parent, const char *name = 0 );
int defaultWidth() const { return m_defaultWidth; }
void setDefaultWidth(int defaultWidth);
- virtual QSize minimumSizeHint() const;
- virtual QSize sizeHint() const;
- QSizePolicy sizePolicy() const;
+ virtual TQSize minimumSizeHint() const;
+ virtual TQSize sizeHint() const;
+ TQSizePolicy sizePolicy() const;
public slots:
- void setText( const QString & );
+ void setText( const TQString & );
protected:
int m_defaultWidth;
diff --git a/klaptopdaemon/laptop_daemon.cpp b/klaptopdaemon/laptop_daemon.cpp
index 43ac53f..5b710c5 100644
--- a/klaptopdaemon/laptop_daemon.cpp
+++ b/klaptopdaemon/laptop_daemon.cpp
@@ -29,7 +29,7 @@
#include <stdlib.h>
#include <fcntl.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kconfig.h>
#include <klocale.h>
@@ -43,30 +43,30 @@
#include <kmessagebox.h>
#include <kpassivepopup.h>
#include <dcopclient.h>
-#include <qsocketnotifier.h>
-#include <qcursor.h>
+#include <tqsocketnotifier.h>
+#include <tqcursor.h>
#include <unistd.h>
#include <sys/time.h>
extern "C"
{
- KDE_EXPORT KDEDModule *create_klaptopdaemon(const QCString& name) {
+ KDE_EXPORT KDEDModule *create_klaptopdaemon(const TQCString& name) {
return new laptop_daemon(name);
}
}
-class XWidget: public QWidget {
+class XWidget: public TQWidget {
public:
- XWidget(laptop_daemon *p):QWidget(0) { pd = p; }
+ XWidget(laptop_daemon *p):TQWidget(0) { pd = p; }
private:
bool x11Event(XEvent *event);
laptop_daemon *pd;
};
bool XWidget::x11Event(XEvent *event) { return pd->x11Event(event); }
-laptop_daemon::laptop_daemon(const QCString& obj): KDEDModule(obj)
+laptop_daemon::laptop_daemon(const TQCString& obj): KDEDModule(obj)
{
xwidget = new XWidget(this);
xwidget->hide();
@@ -100,7 +100,7 @@ laptop_daemon::laptop_daemon(const QCString& obj): KDEDModule(obj)
sony_notifier = 0;
knownFullyCharged = 0;
sony_disp = 0;
- connect(this, SIGNAL(signal_checkBattery()), SLOT(checkBatteryNow()));
+ connect(this, TQT_SIGNAL(signal_checkBattery()), TQT_SLOT(checkBatteryNow()));
//hasAudio = (audioServer.serverStatus() == 0) ? true : false;
@@ -113,8 +113,8 @@ laptop_daemon::laptop_daemon(const QCString& obj): KDEDModule(obj)
else _pcmcia = NULL;
if (_pcmcia)
- connect(_pcmcia, SIGNAL(cardUpdated(int)), this, SLOT(updatePCMCIA(int)));
- connect( &autoLock, SIGNAL(timeout()), this, SLOT(timerDone()) );
+ connect(_pcmcia, TQT_SIGNAL(cardUpdated(int)), this, TQT_SLOT(updatePCMCIA(int)));
+ connect( &autoLock, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) );
}
@@ -295,10 +295,10 @@ void laptop_daemon::restart()
if (s.sony_enablescrollbar||s.sony_middleemulation) {
if (sony_notifier == 0) {
- sony_notifier = new QSocketNotifier( sony_fd, QSocketNotifier::Read, this );
+ sony_notifier = new TQSocketNotifier( sony_fd, TQSocketNotifier::Read, this );
if (sony_notifier)
- QObject::connect( sony_notifier, SIGNAL(activated(int)),
- this, SLOT(sonyDataReceived()) );
+ TQObject::connect( sony_notifier, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(sonyDataReceived()) );
}
} else {
if (sony_notifier) {
@@ -311,8 +311,8 @@ void laptop_daemon::restart()
void laptop_daemon::setBlankSaver(bool blanked)
{
- QByteArray ba;
- QDataStream ds(ba, IO_WriteOnly);
+ TQByteArray ba;
+ TQDataStream ds(ba, IO_WriteOnly);
ds << bool(blanked);
// can't use kapp->dcopClient() because it breaks KUniqueApplication
DCOPClient c;
@@ -356,7 +356,7 @@ void laptop_daemon::timerDone()
if ((powered?s.power_performance_enabled[0]:s.power_performance_enabled[1])) {
need_wait = 1;
if (!saved_performance) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_performance(1, current_profile, profile_list, active_list)) {
@@ -369,7 +369,7 @@ void laptop_daemon::timerDone()
if ((powered?s.power_throttle_enabled[0]:s.power_throttle_enabled[1])) {
need_wait = 1;
if (!saved_throttle) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_throttling(1, current_profile, profile_list, active_list)) {
@@ -384,17 +384,17 @@ void laptop_daemon::timerDone()
// (many of the above things cause unexpected time discontinuities)
//
if (need_wait) {
- wakepos.setX(QCursor::pos().x());
- wakepos.setY(QCursor::pos().y());
+ wakepos.setX(TQCursor::pos().x());
+ wakepos.setY(TQCursor::pos().y());
if (!wake_timer) {
- wake_timer = new QTimer(this);
- connect(wake_timer, SIGNAL(timeout()), this, SLOT(WakeCheck()));
+ wake_timer = new TQTimer(this);
+ connect(wake_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(WakeCheck()));
wake_timer->start(1*1000, 1);
}
} else {
if (!backoffTimer) {
- backoffTimer = new QTimer(this);
- connect(backoffTimer, SIGNAL(timeout()), this, SLOT(BackoffRestart()));
+ backoffTimer = new TQTimer(this);
+ connect(backoffTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(BackoffRestart()));
backoffTimer->start(60*1000, 1);
}
}
@@ -422,7 +422,7 @@ laptop_daemon::WakeCheck()
wake_timer = 0;
return;
}
- if (wakepos.x() != QCursor::pos().x() || wakepos.y() != QCursor::pos().y()) {
+ if (wakepos.x() != TQCursor::pos().x() || wakepos.y() != TQCursor::pos().y()) {
wake_timer->stop();
delete wake_timer;
wake_timer = 0;
@@ -720,7 +720,7 @@ void laptop_daemon::setPollInterval(const int interval)
}
}
-void laptop_daemon::timerEvent(QTimerEvent *)
+void laptop_daemon::timerEvent(TQTimerEvent *)
{
emit(signal_checkBattery());
}
@@ -926,12 +926,12 @@ void laptop_daemon::SetBrightness(bool blank, int v)
laptop_portable::set_brightness(blank, v);
}
-void laptop_daemon::SetThrottle(QString v)
+void laptop_daemon::SetThrottle(TQString v)
{
laptop_portable::set_system_throttling(v);
}
-void laptop_daemon::SetPerformance(QString v)
+void laptop_daemon::SetPerformance(TQString v)
{
laptop_portable::set_system_performance(v);
}
@@ -963,7 +963,7 @@ laptop_daemon::ButtonThreadInternals()
}
if (s.button_lid_performance_enabled) {
if (!button_saved_performance) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_performance(1, current_profile, profile_list, active_list)) {
@@ -975,7 +975,7 @@ laptop_daemon::ButtonThreadInternals()
}
if (s.button_lid_throttle_enabled) {
if (!button_saved_throttle) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_throttling(1, current_profile, profile_list, active_list)) {
@@ -1040,7 +1040,7 @@ laptop_daemon::ButtonThreadInternals()
}
if (s.button_power_performance_enabled) {
if (!button_saved_performance) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_performance(1, current_profile, profile_list, active_list)) {
@@ -1052,7 +1052,7 @@ laptop_daemon::ButtonThreadInternals()
}
if (s.button_power_throttle_enabled) {
if (!button_saved_throttle) {
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
if (laptop_portable::get_system_throttling(1, current_profile, profile_list, active_list)) {
diff --git a/klaptopdaemon/laptop_daemon.h b/klaptopdaemon/laptop_daemon.h
index b1537e1..7617a0d 100644
--- a/klaptopdaemon/laptop_daemon.h
+++ b/klaptopdaemon/laptop_daemon.h
@@ -25,28 +25,28 @@
#include "daemon_state.h"
-#include <qdir.h>
+#include <tqdir.h>
#include <unistd.h>
#include <time.h>
-#include <qmovie.h>
-#include <qptrlist.h>
-#include <qfileinfo.h>
-#include <qimage.h>
+#include <tqmovie.h>
+#include <tqptrlist.h>
+#include <tqfileinfo.h>
+#include <tqimage.h>
#include <kiconloader.h>
#include <kprocess.h>
//#include <kaudio.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <X11/Xlib.h>
#include <X11/extensions/XTest.h>
-#include <qsocketnotifier.h>
+#include <tqsocketnotifier.h>
#include <kdebug.h>
-#include <qthread.h>
+#include <tqthread.h>
#include "kpcmcia.h"
@@ -58,7 +58,7 @@
class laptop_daemon;
class XWidget;
-class ButtonThread : public QThread {
+class ButtonThread : public TQThread {
public:
ButtonThread() { quitting = 0; }
void sethandle(laptop_daemon *h) { handle = h; }
@@ -76,13 +76,13 @@ class laptop_daemon: public KDEDModule
Q_OBJECT
K_DCOP
public:
- laptop_daemon(const QCString& obj);
+ laptop_daemon(const TQCString& obj);
~laptop_daemon();
void setPollInterval(const int poll=60);
void SetBrightness(bool blank, int v); // routine to do it
int GetBrightness() { return brightness; }
- void SetThrottle(QString v);
- void SetPerformance(QString v);
+ void SetThrottle(TQString v);
+ void SetPerformance(TQString v);
void ButtonThreadInternals();
k_dcop:
void restart();
@@ -90,7 +90,7 @@ k_dcop:
signals:
void signal_checkBattery();
protected:
- void timerEvent(QTimerEvent *);
+ void timerEvent(TQTimerEvent *);
protected slots:
void checkBatteryNow();
void timerDone();
@@ -125,9 +125,9 @@ public:
int left;
bool x11Event(XEvent *event);
bool exists() { return s.exists; }
- QString noBatteryIcon() { return s.noBatteryIcon; }
- QString chargeIcon() { return s.chargeIcon; }
- QString noChargeIcon() { return s.noChargeIcon; }
+ TQString noBatteryIcon() { return s.noBatteryIcon; }
+ TQString chargeIcon() { return s.chargeIcon; }
+ TQString noChargeIcon() { return s.noChargeIcon; }
protected:
int triggered[2];
@@ -147,7 +147,7 @@ protected:
int sony_fd; // file desc form open /dev/sonypi
Display *sony_disp; // X display
- QSocketNotifier *sony_notifier; // how we know data is waiting
+ TQSocketNotifier *sony_notifier; // how we know data is waiting
// brightness
@@ -165,19 +165,19 @@ protected:
bool need_wait; // undo sleep stuff
bool saved_brightness, saved_throttle, saved_performance;
int saved_brightness_val;
- QString saved_performance_val, saved_throttle_val;
- QTimer *wake_timer; // the timer for the above running
+ TQString saved_performance_val, saved_throttle_val;
+ TQTimer *wake_timer; // the timer for the above running
QPoint wakepos; // the mouse pos at the beginning of time
void WakeUpAuto();
- QTimer *backoffTimer; // backoff
+ TQTimer *backoffTimer; // backoff
bool power_button_off; // imagined state of the power button
bool button_bright_saved; // saved button state
int button_bright_val;
bool button_saved_performance;
- QString button_saved_performance_val;
+ TQString button_saved_performance_val;
bool button_saved_throttle;
- QString button_saved_throttle_val;
+ TQString button_saved_throttle_val;
daemon_state s; // saved daemon state from config file
diff --git a/klaptopdaemon/main.cpp b/klaptopdaemon/main.cpp
index 9dc0419..ca30218 100644
--- a/klaptopdaemon/main.cpp
+++ b/klaptopdaemon/main.cpp
@@ -26,7 +26,7 @@
#include <kprocess.h>
#include <kconfig.h>
#include <kglobal.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <unistd.h>
#include <fcntl.h>
@@ -48,44 +48,44 @@ extern void wake_laptop_daemon();
extern "C"
{
- KDE_EXPORT KCModule *create_pcmcia(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_pcmcia(TQWidget *parent, const char *)
{
return new PcmciaConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_bwarning(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_bwarning(TQWidget *parent, const char *)
{
return new WarningConfig(0, parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_cwarning(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_cwarning(TQWidget *parent, const char *)
{
return new WarningConfig(1, parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_battery(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_battery(TQWidget *parent, const char *)
{
return new BatteryConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_power(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_power(TQWidget *parent, const char *)
{
return new PowerConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_acpi(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_acpi(TQWidget *parent, const char *)
{
return new AcpiConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_apm(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_apm(TQWidget *parent, const char *)
{
return new ApmConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_Profile(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_Profile(TQWidget *parent, const char *)
{
return new ProfileConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_sony(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_sony(TQWidget *parent, const char *)
{
return new SonyConfig(parent, "kcmlaptop");
}
- KDE_EXPORT KCModule *create_buttons(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_buttons(TQWidget *parent, const char *)
{
return new ButtonsConfig(parent, "kcmlaptop");
}
@@ -111,7 +111,7 @@ extern "C"
wake_laptop_daemon();
}
- KDE_EXPORT KCModule *create_laptop(QWidget *parent, const char *)
+ KDE_EXPORT KCModule *create_laptop(TQWidget *parent, const char *)
{
return new LaptopModule(parent, "kcmlaptop");
}
@@ -124,7 +124,7 @@ extern "C"
-LaptopModule::LaptopModule(QWidget *parent, const char *)
+LaptopModule::LaptopModule(TQWidget *parent, const char *)
: KCModule(parent, "kcmlaptop")
{
{ // export ACPI options
@@ -147,58 +147,58 @@ LaptopModule::LaptopModule(QWidget *parent, const char *)
enablehibernate = config.readBoolEntry("EnableHibernate", false);
laptop_portable::software_suspend_set_mask(enablehibernate);
}
- QVBoxLayout *layout = new QVBoxLayout(this);
- tab = new QTabWidget(this);
+ TQVBoxLayout *layout = new TQVBoxLayout(this);
+ tab = new TQTabWidget(this);
layout->addWidget(tab);
battery = new BatteryConfig(parent, "kcmlaptop");
tab->addTab(battery, i18n("&Battery"));
- connect(battery, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(battery, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
power = new PowerConfig(parent, "kcmlaptop");
tab->addTab(power, i18n("&Power Control"));
- connect(power, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(power, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
warning = new WarningConfig(0, parent, "kcmlaptop");
tab->addTab(warning, i18n("Low Battery &Warning"));
- connect(warning, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(warning, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
critical = new WarningConfig(1, parent, "kcmlaptop");
tab->addTab(critical, i18n("Low Battery &Critical"));
- connect(critical, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(critical, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
- QStringList profile_list;
+ TQStringList profile_list;
int current_profile;
bool *active_list;
bool has_profile = laptop_portable::get_system_performance(0, current_profile, profile_list, active_list);
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool has_throttling = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
if (laptop_portable::has_brightness() || has_profile || has_throttling) {
profile = new ProfileConfig(parent, "kcmlaptop");
tab->addTab(profile, i18n("Default Power Profiles"));
- connect(profile, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(profile, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
} else {
profile = 0;
}
if (laptop_portable::has_button(laptop_portable::LidButton) || laptop_portable::has_button(laptop_portable::PowerButton)) {
buttons = new ButtonsConfig(parent, "kcmlaptop");
tab->addTab(buttons, i18n("Button Actions"));
- connect(buttons, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(buttons, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
} else {
buttons = 0;
}
if (laptop_portable::has_acpi()) {
acpi = new AcpiConfig(parent, "kcmlaptop");
tab->addTab(acpi, i18n("&ACPI Config"));
- connect(acpi, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(acpi, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
} else {
acpi = 0;
}
if (laptop_portable::has_apm()) {
apm = new ApmConfig(parent, "kcmlaptop");
tab->addTab(apm, i18n("&APM Config"));
- connect(apm, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(apm, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
} else {
apm = 0;
}
@@ -215,7 +215,7 @@ LaptopModule::LaptopModule(QWidget *parent, const char *)
if (do_sony) {
sony = new SonyConfig(parent, "kcmlaptop");
tab->addTab(sony, i18n("&Sony Laptop Config"));
- connect(sony, SIGNAL(changed(bool)), this, SLOT(moduleChanged(bool)));
+ connect(sony, TQT_SIGNAL(changed(bool)), this, TQT_SLOT(moduleChanged(bool)));
} else {
sony = 0;
}
@@ -287,7 +287,7 @@ void LaptopModule::defaults()
buttons->defaults();
}
-QString LaptopModule::quickHelp() const
+TQString LaptopModule::quickHelp() const
{
return i18n("<h1>Laptop Battery</h1>This module allows you to monitor "
"your batteries. To make use of this module, you must have power management software "
diff --git a/klaptopdaemon/main.h b/klaptopdaemon/main.h
index 81d6e41..c944817 100644
--- a/klaptopdaemon/main.h
+++ b/klaptopdaemon/main.h
@@ -26,7 +26,7 @@
#define __MAIN_H__
-#include <qtabwidget.h>
+#include <tqtabwidget.h>
#include <kcmodule.h>
@@ -47,12 +47,12 @@ class LaptopModule : public KCModule
public:
- LaptopModule(QWidget *parent, const char *name);
+ LaptopModule(TQWidget *parent, const char *name);
void load();
void save();
void defaults();
- QString quickHelp() const;
+ TQString quickHelp() const;
@@ -63,7 +63,7 @@ protected slots:
private:
- QTabWidget *tab;
+ TQTabWidget *tab;
WarningConfig *warning;
WarningConfig *critical;
diff --git a/klaptopdaemon/pcmcia.cpp b/klaptopdaemon/pcmcia.cpp
index ed17789..af6b6dc 100644
--- a/klaptopdaemon/pcmcia.cpp
+++ b/klaptopdaemon/pcmcia.cpp
@@ -26,8 +26,8 @@
#include <sys/stat.h>
#include <stdlib.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <klocale.h>
@@ -37,7 +37,7 @@
#include "portable.h"
#include "version.h"
-PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name)
+PcmciaConfig::PcmciaConfig (TQWidget * parent, const char *name)
: KCModule(parent, name)
{
KAboutData *about =
@@ -56,8 +56,8 @@ PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name)
label1_text = laptop_portable::pcmcia_info(3, this);
- QVBoxLayout *top_layout = new QVBoxLayout(this, 15, 5);
- QGridLayout *top_grid = new QGridLayout(2, 2);
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, 15, 5);
+ TQGridLayout *top_grid = new TQGridLayout(2, 2);
top_layout->addLayout(top_grid);
top_grid->setColStretch(0, 0);
@@ -78,12 +78,12 @@ PcmciaConfig::PcmciaConfig (QWidget * parent, const char *name)
top_layout->addStretch(1);
- QHBoxLayout *v1 = new QHBoxLayout;
+ TQHBoxLayout *v1 = new QHBoxLayout;
top_layout->addLayout(v1, 0);
v1->addStretch(1);
- QString s1 = LAPTOP_VERSION;
- QString s2 = i18n("Version: ")+s1;
- QLabel* vers = new QLabel(s2, this);
+ TQString s1 = LAPTOP_VERSION;
+ TQString s2 = i18n("Version: ")+s1;
+ TQLabel* vers = new TQLabel(s2, this);
vers->setMinimumSize(vers->sizeHint());
v1->addWidget(vers, 0);
@@ -113,7 +113,7 @@ void PcmciaConfig::changed()
}
-QString PcmciaConfig::quickHelp() const
+TQString PcmciaConfig::quickHelp() const
{
return i18n("<h1>PCMCIA Config</h1>This module shows information about "
"the PCMCIA cards in your system, if there are PCMCIA cards.");
diff --git a/klaptopdaemon/pcmcia.h b/klaptopdaemon/pcmcia.h
index e163742..f9579f9 100644
--- a/klaptopdaemon/pcmcia.h
+++ b/klaptopdaemon/pcmcia.h
@@ -25,12 +25,12 @@
#ifndef __PCMCIACONFIG_H__
#define __PCMCIACONFIG_H__
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
-#include <qlcdnumber.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
+#include <tqlcdnumber.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
#include <kapplication.h>
#include <knuminput.h>
@@ -42,13 +42,13 @@ class PcmciaConfig : public KCModule
{
Q_OBJECT
public:
- PcmciaConfig( QWidget *parent=0, const char* name=0);
+ PcmciaConfig( TQWidget *parent=0, const char* name=0);
void save( void );
void load();
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -58,10 +58,10 @@ private slots:
private:
void GetSettings( void );
- QLabel *label0;
- QLabel *label1;
- QLabel *label0_text;
- QLabel *label1_text;
+ TQLabel *label0;
+ TQLabel *label1;
+ TQLabel *label0_text;
+ TQLabel *label1_text;
};
diff --git a/klaptopdaemon/portable.cpp b/klaptopdaemon/portable.cpp
index ac9ac16..f1b28fa 100644
--- a/klaptopdaemon/portable.cpp
+++ b/klaptopdaemon/portable.cpp
@@ -78,18 +78,18 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <dirent.h>
-#include <qpushbutton.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qstringlist.h>
-#include <qstring.h>
-#include <qobject.h>
-#include <qregexp.h>
-#include <qiodevice.h>
-#include <qlayout.h>
-#include <qvgroupbox.h>
-#include <qvaluevector.h>
+#include <tqpushbutton.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqstringlist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqregexp.h>
+#include <tqiodevice.h>
+#include <tqlayout.h>
+#include <tqvgroupbox.h>
+#include <tqvaluevector.h>
#include <kactivelabel.h>
#include <kconfig.h>
@@ -176,14 +176,14 @@ pmu_read(apm_info *ap)
{
int bcnt = 0;
memset(ap, 0, sizeof(apm_info));
- QFile f("/proc/pmu/info");
+ TQFile f("/proc/pmu/info");
if (!f.exists() || !f.open(IO_ReadOnly))
return 1;
while (!f.atEnd()) {
- QString l;
+ TQString l;
f.readLine(l, 500);
- QStringList ll = QStringList::split(':', l, false);
+ TQStringList ll = TQStringList::split(':', l, false);
if (ll[0].stripWhiteSpace() == "AC Power") {
ap->ac_line_status = ll[1].stripWhiteSpace().toInt();
//kdDebug() << "line status " << ap->ac_line_status << endl;
@@ -199,14 +199,14 @@ pmu_read(apm_info *ap)
int timerem = 0;
int maxcharge = 0;
for (int i = 0; i < bcnt; i++) {
- QFile bf(QString("/proc/pmu/battery_%1").arg(i));
+ TQFile bf(TQString("/proc/pmu/battery_%1").arg(i));
if (!bf.exists() || !bf.open(IO_ReadOnly))
continue;
while(!bf.atEnd()) {
- QString l;
+ TQString l;
bf.readLine(l, 500);
- QStringList ll = QStringList::split(':', l, false);
+ TQStringList ll = TQStringList::split(':', l, false);
if (ll[0].stripWhiteSpace() == "charge") {
charge += ll[1].stripWhiteSpace().toInt();
//kdDebug() << "charge: " << charge << endl;
@@ -238,12 +238,12 @@ struct acpi_battery_info {
int cap_low;
int remaining;
int rate;
- QString name;
- QString state_file;
- QString info_file;
+ TQString name;
+ TQString state_file;
+ TQString info_file;
};
-static QValueVector<acpi_battery_info> acpi_batteries;
+static TQValueVector<acpi_battery_info> acpi_batteries;
static int acpi_last_known=0;
static int last_seed=1; // increment this to force revaluation
@@ -321,8 +321,8 @@ readit:
}
static void acpi_read_batteries() {
- QString buff;
- QFile *f;
+ TQString buff;
+ TQFile *f;
static int test_count = 0;
bool skip = false;
@@ -330,11 +330,11 @@ static void acpi_read_batteries() {
acpi_battery_info& bat = acpi_batteries[i];
bool present = false;
if ((test_count==0 || acpi_last_known != last_seed) && !bat.info_file.isNull()) {
- f = new QFile(bat.info_file);
+ f = new TQFile(bat.info_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
if (buff.contains("design capacity low:", false)) {
- QRegExp rx("(\\d*)\\D*$");
+ TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap_low = rx.cap(1).toInt();
if (bat.cap_low < 0)
@@ -342,7 +342,7 @@ static void acpi_read_batteries() {
continue;
}
if (buff.contains("last full capacity:", false)) {
- QRegExp rx("(\\d*)\\D*$");
+ TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.cap = rx.cap(1).toInt();
continue;
@@ -360,11 +360,11 @@ static void acpi_read_batteries() {
delete config;
}
if (!bat.state_file.isNull()) {
- f = new QFile(bat.state_file);
+ f = new TQFile(bat.state_file);
if (f && f->exists() && f->open(IO_ReadOnly)) {
while(f->readLine(buff,1024) > 0) {
if (buff.contains("present rate:", false)) {
- QRegExp rx("(\\d*)\\D*$");
+ TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.rate = rx.cap(1).toInt();
if (bat.rate < 0)
@@ -373,7 +373,7 @@ static void acpi_read_batteries() {
continue;
}
if (buff.contains("remaining capacity:", false)) {
- QRegExp rx("(\\d*)\\D*$");
+ TQRegExp rx("(\\d*)\\D*$");
rx.search(buff);
bat.remaining = rx.cap(1).toInt();
bat.remaining -= bat.cap_low;
@@ -558,7 +558,7 @@ has_pmu()
return val;
init = 1;
val = 1;
- if (!QDir("/proc/pmu").exists()) {
+ if (!TQDir("/proc/pmu").exists()) {
val = 0;
}
return val;
@@ -637,8 +637,8 @@ has_acpi_power()
if (acpi_ac_status() >= 0)
acpi_ac_ok = 1;
- QDir battdir("/proc/acpi/battery");
- battdir.setFilter(QDir::Dirs);
+ TQDir battdir("/proc/acpi/battery");
+ battdir.setFilter(TQDir::Dirs);
if(!battdir.isReadable())
return(val = 0);
for(uint i = 0; !battdir[i].isNull(); ++i) {
@@ -646,9 +646,9 @@ has_acpi_power()
continue;
bool ok = 0;
acpi_battery_info bat = {0,0,0,0,0,0,0,0,0};
- QString base = battdir.path() + "/" + battdir[i] + "/";
- QString name(base + "state");
- QFileInfo f(name);
+ TQString base = battdir.path() + "/" + battdir[i] + "/";
+ TQString name(base + "state");
+ TQFileInfo f(name);
if(f.isReadable()) {
bat.state_file = name;
ok = true;
@@ -689,16 +689,16 @@ has_acpi_sleep(int state)
known = last_seed;
mask = 0;
- QFile p("/sys/power/state");
- QFile f("/proc/acpi/sleep");
+ TQFile p("/sys/power/state");
+ TQFile f("/proc/acpi/sleep");
if (p.exists() && p.open(IO_ReadOnly)) {
- QString l;
- QTextStream t(&p);
+ TQString l;
+ TQTextStream t(&p);
l = t.readLine();
- QStringList ll = QStringList::split(' ',l,false);
- for (QValueListIterator<QString> i = ll.begin(); i!=ll.end(); i++) {
- QString s = *i;
+ TQStringList ll = TQStringList::split(' ',l,false);
+ for (TQValueListIterator<TQString> i = ll.begin(); i!=ll.end(); i++) {
+ TQString s = *i;
if (s.compare("standby")==0)
mask |= (1<<1);
@@ -710,12 +710,12 @@ has_acpi_sleep(int state)
p.close();
}
else if (f.exists() && f.open(IO_ReadOnly)) {
- QString l;
- QTextStream t(&f);
+ TQString l;
+ TQTextStream t(&f);
l = t.readLine();
- QStringList ll = QStringList::split(' ',l,false);
- for (QValueListIterator<QString> i = ll.begin(); i!=ll.end(); i++) {
- QString s = *i;
+ TQStringList ll = TQStringList::split(' ',l,false);
+ for (TQValueListIterator<TQString> i = ll.begin(); i!=ll.end(); i++) {
+ TQString s = *i;
if (s[0] == 'S') {
int c = s[1].digitValue();
if (c >= 0 && c <= 9)
@@ -939,7 +939,7 @@ int laptop_portable::has_hibernation()
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
if (access("/proc/acpi", F_OK) == 0) { // probably has default kernel ACPI installed
KActiveLabel* explain = new KActiveLabel(i18n("Your computer seems to have a partial ACPI installation. ACPI was probably enabled, but some of the sub-options were not - you need to enable at least 'AC Adaptor' and 'Control Method Battery' and then rebuild your kernel."), parent);
@@ -954,23 +954,23 @@ KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
if (::has_apm()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- QLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also "
+ TQLabel* note = new KRichTextLabel(i18n("\nIf you make /usr/bin/apm setuid then you will also "
"be able to choose 'suspend' and 'standby' in the above "
"dialog - check out the help button below to find out "
- "how to do this").replace("\n", QString::null), parent);
+ "how to do this").replace("\n", TQString::null), parent);
return(note);
}
if (::has_acpi()) {
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- QLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", QString::null), parent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYou may need to enable ACPI suspend/resume in the ACPI panel").replace("\n", TQString::null), parent);
return(note);
}
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
- QLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", QString::null), parent);
+ TQLabel* note = new KRichTextLabel(i18n("\nYour system does not support suspend/standby").replace("\n", TQString::null), parent);
return(note);
}
@@ -1040,20 +1040,20 @@ void get_pcmcia_info()
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-QLabel *laptop_portable::pcmcia_info(int x, QWidget *parent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
if (x == 0)
get_pcmcia_info();
if (!present) {
if (x == 1)
- return(new QLabel(i18n("No PCMCIA controller detected"), parent));
- return(new QLabel(i18n(""), parent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
} else {
switch (x) {
- case 0: return(new QLabel(i18n("Card 0:"), parent));
- case 1: return(new QLabel(tmp0, parent));
- case 2: return(new QLabel(i18n("Card 1:"), parent));
- default:return(new QLabel(tmp1, parent));
+ case 0: return(new TQLabel(i18n("Card 0:"), parent));
+ case 1: return(new TQLabel(tmp0, parent));
+ case 2: return(new TQLabel(i18n("Card 1:"), parent));
+ default:return(new TQLabel(tmp1, parent));
}
}
}
@@ -1162,18 +1162,18 @@ void laptop_portable::invoke_hibernation()
}
void
-laptop_portable::extra_config(QWidget *wp, KConfig *, QVBoxLayout *top_layout)
+laptop_portable::extra_config(TQWidget *wp, KConfig *, TQVBoxLayout *top_layout)
{
if (laptop_portable::has_apm(1) || laptop_portable::has_acpi(1))
return;
if (laptop_portable::has_apm(0)) {
- QLabel* explain = new KRichTextLabel( i18n("Your system has APM installed but may not be able to use all "
+ TQLabel* explain = new KRichTextLabel( i18n("Your system has APM installed but may not be able to use all "
"of its features without further setup - look in the 'APM Config' "
"tab for information about setting up APM for suspend and resume"), wp);
top_layout->addWidget(explain, 0);
}
if (laptop_portable::has_acpi(0)) {
- QLabel* explain = new KRichTextLabel( i18n("Your system has ACPI installed but may not be able to use all "
+ TQLabel* explain = new KRichTextLabel( i18n("Your system has ACPI installed but may not be able to use all "
"of its features without further setup - look in the 'ACPI Config' "
"tab for information about setting up ACPI for suspend and resume"), wp);
top_layout->addWidget(explain, 0);
@@ -1205,7 +1205,7 @@ struct power_result laptop_portable::poll_battery_state()
}
void
-laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStringList &state, QStringList &values)
+laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values)
{
struct power_result r;
@@ -1226,7 +1226,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
for(unsigned int i = 0; i < acpi_batteries.count(); ++i) {
acpi_battery_info& bat = acpi_batteries[i];
names.append(bat.name);
- values.append(QString("%1").arg(bat.percentage));
+ values.append(TQString("%1").arg(bat.percentage));
state.append(bat.present ? "yes" : "no");
}
return;
@@ -1238,7 +1238,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
r = poll_battery_state();
names.append("BAT1");
state.append("yes");
- QString s;
+ TQString s;
s.setNum(r.percentage);
values.append(s);
}
@@ -1247,7 +1247,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
//
// returns the current system load average, -1 if none
//
-static QFile lav_file;
+static TQFile lav_file;
static bool lav_inited=0;
static bool lav_openok=0;
@@ -1273,10 +1273,10 @@ float laptop_portable::get_load_average()
if (!::has_lav())
return(-1);
lav_file.open( IO_ReadOnly );
- QString l;
+ TQString l;
lav_file.readLine(l, 500);
lav_file.close();
- QStringList ll = QStringList::split(' ', l, false);
+ TQStringList ll = TQStringList::split(' ', l, false);
l = ll[0];
bool ok;
float f = l.toFloat(&ok);
@@ -1300,17 +1300,17 @@ int laptop_portable::has_cpufreq() {
}
-QString laptop_portable::cpu_frequency() {
- QString rc;
- QFile cf("/proc/cpufreq");
+TQString laptop_portable::cpu_frequency() {
+ TQString rc;
+ TQFile cf("/proc/cpufreq");
bool haveProfile = false;
if (cf.exists() && cf.open(IO_ReadOnly)) {
while (!cf.atEnd()) {
- QString l;
+ TQString l;
cf.readLine(l, 500);
if (l.left(3) == "CPU") {
- QStringList ll = QStringList::split(' ', l, false);
+ TQStringList ll = TQStringList::split(' ', l, false);
rc = ll.last();
haveProfile = true;
break;
@@ -1319,13 +1319,13 @@ QString laptop_portable::cpu_frequency() {
}
if (haveProfile) {
- QFile ci("/proc/cpuinfo");
+ TQFile ci("/proc/cpuinfo");
if (ci.exists() && ci.open(IO_ReadOnly)) {
while (!ci.atEnd()) {
- QString l;
+ TQString l;
ci.readLine(l, 500);
- QStringList ll =
- QStringList::split(':',l,false);
+ TQStringList ll =
+ TQStringList::split(':',l,false);
if (ll.count() != 2)
continue;
if (ll.first().stripWhiteSpace()
@@ -1334,7 +1334,7 @@ QString laptop_portable::cpu_frequency() {
break;
} else if (ll.first().stripWhiteSpace()
== "clock") {
- rc = QString("%1 (%2)").arg(ll.last().stripWhiteSpace()).arg(rc);
+ rc = TQString("%1 (%2)").arg(ll.last().stripWhiteSpace()).arg(rc);
break;
}
}
@@ -1358,7 +1358,7 @@ acpi_helper_ok(bool type)
known[type] = last_seed;
known_res[type] = 0;
struct stat sb;
- QString str = KStandardDirs::findExe("klaptop_acpi_helper");
+ TQString str = KStandardDirs::findExe("klaptop_acpi_helper");
if (str.isNull() || str.isEmpty())
return(0);
@@ -1401,7 +1401,7 @@ apm_helper_ok(bool type)
known[type] = last_seed;
known_res[type] = 0;
struct stat sb;
- QString str = "/usr/bin/apm";
+ TQString str = "/usr/bin/apm";
if (str.isNull() || str.isEmpty())
return(0);
if (stat(str.latin1(), &sb) < 0)
@@ -1508,15 +1508,15 @@ laptop_portable::get_brightness() // return a val 0-255, or -1 if you can't
#define MAP_SIZE 20
static int acpi_performance_map[MAP_SIZE]; // hidden acpi state map
static bool acpi_performance_enable[MAP_SIZE];
-static QStringList performance_list;
-static QString acpi_performance_cpu;
+static TQStringList performance_list;
+static TQString acpi_performance_cpu;
static int acpi_throttle_map[MAP_SIZE];
static bool acpi_throttle_enable[MAP_SIZE];
-static QStringList throttle_list;
-static QString acpi_throttle_cpu;
+static TQStringList throttle_list;
+static TQString acpi_throttle_cpu;
static bool
-get_acpi_list(char p, int *map, const char *dev, QStringList &list, int &index, QString &cpu, bool get_enable, bool *enable_list)
+get_acpi_list(char p, int *map, const char *dev, TQStringList &list, int &index, TQString &cpu, bool get_enable, bool *enable_list)
{
DIR *dfd;
struct dirent *dp;
@@ -1531,19 +1531,19 @@ get_acpi_list(char p, int *map, const char *dev, QStringList &list, int &index,
if (strcmp(dp->d_name, ".") == 0 ||
strcmp(dp->d_name, "..") == 0)
continue;
- QString name("/proc/acpi/processor/");
+ TQString name("/proc/acpi/processor/");
name += dp->d_name;
name += dev;
if (!(::access(name.latin1(), R_OK|W_OK)==0 && ::acpi_helper_ok(1)) &&
!(::access(name.latin1(), R_OK)==0 && ::acpi_helper_ok(0)))
continue;
- QFile f(name);
+ TQFile f(name);
if (f.exists() && f.open(IO_ReadOnly)) {
while (!f.atEnd() && i < MAP_SIZE) {
- QString l;
+ TQString l;
f.readLine(l, 500);
- QStringList ll = QStringList::split(':',l,false);
- QString tag = ll[0].stripWhiteSpace();
+ TQStringList ll = TQStringList::split(':',l,false);
+ TQString tag = ll[0].stripWhiteSpace();
bool is_this = tag[0] == '*';
if (is_this) {
if (tag[1] != p)
@@ -1574,14 +1574,14 @@ get_acpi_list(char p, int *map, const char *dev, QStringList &list, int &index,
// get the limit info if asked for
//
if (get_enable) {
- name = QString("/proc/acpi/processor/")+dp->d_name+"/limit";
+ name = TQString("/proc/acpi/processor/")+dp->d_name+"/limit";
f.setName(name);
if (f.exists() && f.open(IO_ReadOnly)) {
while (!f.atEnd() && i < MAP_SIZE) {
- QString l;
+ TQString l;
f.readLine(l, 500);
if (l.contains("active limit", false)) {
- QRegExp rx(QString("%1(\\d+)").arg(p));
+ TQRegExp rx(TQString("%1(\\d+)").arg(p));
if (rx.search(l) >= 0) {
bool ok;
int min = rx.cap(1).toInt(&ok);
@@ -1610,15 +1610,15 @@ get_acpi_list(char p, int *map, const char *dev, QStringList &list, int &index,
#define CPUFREQ_25 2
#define CPUFREQ_SYSFS 3
-static QString cpufreq_cpu = "";
-static QString cpufreq_minmax_frequency[2];
+static TQString cpufreq_cpu = "";
+static TQString cpufreq_minmax_frequency[2];
// get CPUFreq scaling policies via the sysfs interface
-static int get_cpufreq_sysfs_state(QStringList &states, int &current, const QString cpu) {
- QString cur, buffer;
+static int get_cpufreq_sysfs_state(TQStringList &states, int &current, const TQString cpu) {
+ TQString cur, buffer;
// read current scaling policy
- QFile f("/sys/devices/system/cpu/" + cpu + "/cpufreq/scaling_governor");
+ TQFile f("/sys/devices/system/cpu/" + cpu + "/cpufreq/scaling_governor");
if(!f.exists() || !f.open(IO_ReadOnly) || f.atEnd())
return CPUFREQ_NONE;
f.readLine(buffer, 256);
@@ -1633,7 +1633,7 @@ static int get_cpufreq_sysfs_state(QStringList &states, int &current, const QStr
int count = 0;
if(!f.atEnd()) {
f.readLine(buffer, 1024);
- QStringList l = QStringList::split(' ', buffer.stripWhiteSpace(), false);
+ TQStringList l = TQStringList::split(' ', buffer.stripWhiteSpace(), false);
for(unsigned int i = 0; i < l.size(); ++i, ++count) {
states.append(l[i].stripWhiteSpace());
if(states[i] == cur)
@@ -1649,16 +1649,16 @@ static int get_cpufreq_sysfs_state(QStringList &states, int &current, const QStr
// sample output of cat /proc/cpufreq:
// minimum CPU frequency - maximum CPU frequency - policy
// CPU 0 700000 kHz ( 70 %) - 1000000 kHz (100 %) - powersave
-static int get_cpufreq_25_state(QStringList &states, int &current) {
+static int get_cpufreq_25_state(TQStringList &states, int &current) {
current = -1;
states.clear();
- QFile f("/proc/cpufreq");
+ TQFile f("/proc/cpufreq");
if (f.exists() && f.open(IO_ReadOnly)) {
while (!f.atEnd()) {
- QString l;
+ TQString l;
f.readLine(l, 1024);
- QRegExp rx("CPU.*\\d+.*(\\d+).*-.*(\\d+).*-\\W*(\\w*)");
+ TQRegExp rx("CPU.*\\d+.*(\\d+).*-.*(\\d+).*-\\W*(\\w*)");
if (rx.search(l) >= 0) {
cpufreq_minmax_frequency[0] = rx.cap(1);
cpufreq_minmax_frequency[1] = rx.cap(2);
@@ -1684,12 +1684,12 @@ static int get_cpufreq_25_state(QStringList &states, int &current) {
// get CPUFreq scaling policies via the 2.4 /proc interface
// The old interface doesn't support policies yet, we only get the min and max frequency,
// so we use these as performance states.
-static int get_cpufreq_24_state(QStringList &states, int &current, const QString cpu) {
- QString buffer, cur;
+static int get_cpufreq_24_state(TQStringList &states, int &current, const TQString cpu) {
+ TQString buffer, cur;
states.clear();
// current frequency
- QFile f("/proc/sys/cpu/" + cpu + "/speed");
+ TQFile f("/proc/sys/cpu/" + cpu + "/speed");
if(!f.exists() || !f.open(IO_ReadOnly) || f.atEnd())
return CPUFREQ_NONE;
f.readLine(buffer, 16);
@@ -1716,7 +1716,7 @@ static int get_cpufreq_24_state(QStringList &states, int &current, const QString
// check for CPUFreq support and get a list of all available scaling policies
// this method doesn't support multiple CPU's (neither does get_acpi_list() above),
// but this shouldn't be a problem on notebooks...
-static int get_cpufreq_state(bool force, QStringList &states, int &current) {
+static int get_cpufreq_state(bool force, TQStringList &states, int &current) {
static int known = -1;
// check wether we already know which interface to use
@@ -1737,8 +1737,8 @@ static int get_cpufreq_state(bool force, QStringList &states, int &current) {
}
// look for the CPUFreq sysfs interface first
- QDir dir("/sys/devices/system/cpu");
- dir.setFilter(QDir::Dirs);
+ TQDir dir("/sys/devices/system/cpu");
+ dir.setFilter(TQDir::Dirs);
if(dir.isReadable()) {
for(unsigned int i = 0; !dir[i].isNull(); ++i) {
if(dir[i] == "." || dir[i] == "..")
@@ -1755,7 +1755,7 @@ static int get_cpufreq_state(bool force, QStringList &states, int &current) {
// last chance: the /proc interface from the 2.4 kernel series
dir.setPath("/proc/sys/cpu");
- dir.setFilter(QDir::Dirs);
+ dir.setFilter(TQDir::Dirs);
if(dir.isReadable()) {
for(unsigned int i = 0; !dir[i].isNull(); ++i) {
if(dir[i] == "." || dir[i] == "..")
@@ -1771,7 +1771,7 @@ static int get_cpufreq_state(bool force, QStringList &states, int &current) {
}
bool
-laptop_portable::get_system_performance(bool force, int &current, QStringList &s, bool *&active) // do something to help get system profiles from places like ACPI
+laptop_portable::get_system_performance(bool force, int &current, TQStringList &s, bool *&active) // do something to help get system profiles from places like ACPI
{
if(!acpi_performance_enabled)
return false;
@@ -1804,7 +1804,7 @@ laptop_portable::get_system_performance(bool force, int &current, QStringList &s
}
bool
-laptop_portable::get_system_throttling(bool force, int &current, QStringList &s, bool *&active) // do something to help get system throttling data from places like ACPI
+laptop_portable::get_system_throttling(bool force, int &current, TQStringList &s, bool *&active) // do something to help get system throttling data from places like ACPI
{
static int known=0;
static int index=0;
@@ -1828,7 +1828,7 @@ laptop_portable::get_system_throttling(bool force, int &current, QStringList &s,
}
void
-laptop_portable::set_system_performance(QString val) // val = string given by get_system_performance above
+laptop_portable::set_system_performance(TQString val) // val = string given by get_system_performance above
{
if(!acpi_performance_enabled)
return;
@@ -1847,7 +1847,7 @@ laptop_portable::set_system_performance(QString val) // val = string given by ge
if((result = get_cpufreq_state(false, performance_list, current))) {
if(performance_list[current] == val)
return;
- QString tmp;
+ TQString tmp;
switch(result) {
case CPUFREQ_SYSFS:
invoke_acpi_helper("--cpufreq-sysfs", cpufreq_cpu.latin1(), val.latin1());
@@ -1867,7 +1867,7 @@ laptop_portable::set_system_performance(QString val) // val = string given by ge
}
void
-laptop_portable::set_system_throttling(QString val) // val = string given by get_system_throttle above
+laptop_portable::set_system_throttling(TQString val) // val = string given by get_system_throttle above
{
if (::has_acpi()) {
char tmp[20];
@@ -1883,10 +1883,10 @@ laptop_portable::set_system_throttling(QString val) // val = string given by get
return;
}
-static QString acpi_power_name, acpi_lid_name; // names of paths to ACPI lid states
+static TQString acpi_power_name, acpi_lid_name; // names of paths to ACPI lid states
static bool
-acpi_check_button(const char *prefix, QString &result)
+acpi_check_button(const char *prefix, TQString &result)
{
DIR *dfd;
struct dirent *dp;
@@ -1898,16 +1898,16 @@ acpi_check_button(const char *prefix, QString &result)
if (strcmp(dp->d_name, ".") == 0 ||
strcmp(dp->d_name, "..") == 0)
continue;
- QString name(prefix);
+ TQString name(prefix);
name += "/";
name += dp->d_name;
name += "/state";
if (::access(name.latin1(), R_OK)!=0)
continue;
- QFile f(name);
+ TQFile f(name);
if (f.exists() && f.open(IO_ReadOnly)) {
while (!f.atEnd()) {
- QString l;
+ TQString l;
f.readLine(l, 500);
if (l.contains("state:")) {
result = name;
@@ -1959,7 +1959,7 @@ bool
laptop_portable::get_button(LaptopButton l) // true if a button is pressed
{
if (::has_acpi()) {
- QString name;
+ TQString name;
switch (l) {
case LidButton:
name = acpi_lid_name;
@@ -1971,12 +1971,12 @@ laptop_portable::get_button(LaptopButton l) // true if a button is pressed
break;
}
if (!name.isEmpty()) {
- QFile f(name);
+ TQFile f(name);
if (f.exists() && f.open(IO_ReadOnly)) {
while (!f.atEnd()) {
- QString l;
+ TQString l;
f.readLine(l, 500);
- QStringList ll = QStringList::split(':',l,false);
+ TQStringList ll = TQStringList::split(':',l,false);
if (ll[0].stripWhiteSpace() == "state") {
if (ll[1].stripWhiteSpace() == "open") {
f.close();
@@ -2015,8 +2015,8 @@ laptop_portable::get_button(LaptopButton l) // true if a button is pressed
#include <stdlib.h>
#include <machine/apm_bios.h>
#include <sys/stat.h>
-#include <qpushbutton.h>
-#include <qobject.h>
+#include <tqpushbutton.h>
+#include <tqobject.h>
#include <kactivelabel.h>
#include <kprocess.h>
@@ -2139,7 +2139,7 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
int fd;
KActiveLabel *explain;
@@ -2172,9 +2172,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
- QLabel* note = new QLabel(" ", parent);
+ TQLabel* note = new TQLabel(" ", parent);
return(note);
}
@@ -2183,11 +2183,11 @@ QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-QLabel *laptop_portable::pcmcia_info(int x, QWidget *parent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
if (x == 0)
- return(new QLabel(i18n("No PCMCIA controller detected"), parent));
- return(new QLabel(i18n(""), parent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
// puts us into standby mode
@@ -2267,7 +2267,7 @@ laptop_portable::apm_set_mask(bool , bool )
// adds extra widgets to the battery panel
//
void
-laptop_portable::extra_config(QWidget * /*parent*/, KConfig * /*config*/, QVBoxLayout * /*layout*/)
+laptop_portable::extra_config(TQWidget * /*parent*/, KConfig * /*config*/, TQVBoxLayout * /*layout*/)
{
// INSERT HERE
}
@@ -2323,7 +2323,7 @@ int laptop_portable::has_cpufreq() {
return 0;
}
-QString laptop_portable::cpu_frequency() {
+TQString laptop_portable::cpu_frequency() {
// INSERT HERE
return "";
}
@@ -2349,7 +2349,7 @@ laptop_portable::get_brightness()
}
bool
-laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool *&) // do something to help get system profiles from places like ACPI
+laptop_portable::get_system_performance(bool, int &current, TQStringList &s, bool *&) // do something to help get system profiles from places like ACPI
{
// INSERT HERE
current = 0;
@@ -2358,7 +2358,7 @@ laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool
}
bool
-laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
+laptop_portable::get_system_throttling(bool, int &current, TQStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
{
// INSERT HERE
current = 0;
@@ -2367,13 +2367,13 @@ laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool
}
void
-laptop_portable::set_system_performance(QString)
+laptop_portable::set_system_performance(TQString)
{
// INSERT HERE
}
void
-laptop_portable::set_system_throttling(QString)
+laptop_portable::set_system_throttling(TQString)
{
// INSERT HERE
}
@@ -2393,7 +2393,7 @@ laptop_portable::get_button(LaptopButton) // true if a button is pressed
}
void
-laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStringList &state, QStringList &values) // get multiple battery status
+laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values) // get multiple battery status
{
struct power_result r;
@@ -2411,7 +2411,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
r = poll_battery_state();
names.append("BAT1");
state.append("yes");
- QString s;
+ TQString s;
s.setNum(r.percentage);
values.append(s);
}
@@ -2544,7 +2544,7 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
int fd;
KActiveLabel *explain;
@@ -2577,10 +2577,10 @@ KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
// INSERT HERE
- QLabel* note = new QLabel(" ", parent);
+ TQLabel* note = new TQLabel(" ", parent);
return(note);
}
@@ -2588,12 +2588,12 @@ QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-QLabel *laptop_portable::pcmcia_info(int x, QWidget *parent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
// INSERT HERE
if (x == 0)
- return(new QLabel(i18n("No PCMCIA controller detected"), parent));
- return(new QLabel(i18n(""), parent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
@@ -2710,7 +2710,7 @@ int laptop_portable::has_cpufreq() {
return 0;
}
-QString laptop_portable::cpu_frequency() {
+TQString laptop_portable::cpu_frequency() {
// INSERT HERE
return "";
}
@@ -2736,7 +2736,7 @@ laptop_portable::get_brightness()
}
bool
-laptop_portable::get_system_throttling(bool, int &current, QStringList &s) // do something to help get system throttling data from places like ACPI
+laptop_portable::get_system_throttling(bool, int &current, TQStringList &s) // do something to help get system throttling data from places like ACPI
{
// INSERT HERE
current = 0;
@@ -2745,13 +2745,13 @@ laptop_portable::get_system_throttling(bool, int &current, QStringList &s) //
}
void
-laptop_portable::set_system_performance(QString)
+laptop_portable::set_system_performance(TQString)
{
// INSERT HERE
}
void
-laptop_portable::set_system_throttling(QString)
+laptop_portable::set_system_throttling(TQString)
{
// INSERT HERE
}
@@ -2771,7 +2771,7 @@ laptop_portable::get_button(LaptopButton) // true if a button is pressed
}
void
-laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStringList &state, QStringList &values) // get multiple battery status
+laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values) // get multiple battery status
{
struct power_result r;
@@ -2789,7 +2789,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
r = poll_battery_state();
names.append("BAT1");
state.append("yes");
- QString s;
+ TQString s;
s.setNum(r.percentage);
values.append(s);
}
@@ -2861,7 +2861,7 @@ int laptop_portable::has_hibernation()
// explain to the user what they need to do if has_power_management() returned 0
// to get any software they lack
//
-KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
+KActiveLabel *laptop_portable::no_power_management_explanation(TQWidget *parent)
{
KActiveLabel* explain = new KActiveLabel(i18n("Your computer or operating system is not supported by the current version of the\nKDE laptop control panels. If you want help porting these panels to work with it\nplease contact paul@taniwha.com."), parent);
// INSERT HERE
@@ -2871,9 +2871,9 @@ KActiveLabel *laptop_portable::no_power_management_explanation(QWidget *parent)
//
// explain to the user what they need to do to get suspend/resume to work from user mode
//
-QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
+TQLabel *laptop_portable::how_to_do_suspend_resume(TQWidget *parent)
{
- QLabel* note = new QLabel(" ", parent);
+ TQLabel* note = new TQLabel(" ", parent);
// INSERT HERE
return(note);
}
@@ -2883,12 +2883,12 @@ QLabel *laptop_portable::how_to_do_suspend_resume(QWidget *parent)
// pcmcia support - this will be replaced by better - pcmcia support being worked on by
// others
//
-QLabel *laptop_portable::pcmcia_info(int x, QWidget *parent)
+TQLabel *laptop_portable::pcmcia_info(int x, TQWidget *parent)
{
// INSERT HERE
if (x == 0)
- return(new QLabel(i18n("No PCMCIA controller detected"), parent));
- return(new QLabel(i18n(""), parent));
+ return(new TQLabel(i18n("No PCMCIA controller detected"), parent));
+ return(new TQLabel(i18n(""), parent));
}
//
// puts us into standby mode
@@ -2945,7 +2945,7 @@ int laptop_portable::has_apm(int)
// adds extra widgets to the battery panel
//
void
-laptop_portable::extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout)
+laptop_portable::extra_config(TQWidget *parent, KConfig *config, TQVBoxLayout *layout)
{
// INSERT HERE
}
@@ -2980,7 +2980,7 @@ int laptop_portable::has_cpufreq() {
return 0;
}
-QString laptop_portable::cpu_frequency() {
+TQString laptop_portable::cpu_frequency() {
// INSERT HERE
return "";
}
@@ -3006,7 +3006,7 @@ laptop_portable::get_brightness()
}
bool
-laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool *&) // do something to help get system profiles from places like ACPI
+laptop_portable::get_system_performance(bool, int &current, TQStringList &s, bool *&) // do something to help get system profiles from places like ACPI
{
// INSERT HERE
current = 0;
@@ -3015,7 +3015,7 @@ laptop_portable::get_system_performance(bool, int &current, QStringList &s, bool
}
bool
-laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
+laptop_portable::get_system_throttling(bool, int &current, TQStringList &s, bool *&) // do something to help get system throttling data from places like ACPI
{
// INSERT HERE
current = 0;
@@ -3024,13 +3024,13 @@ laptop_portable::get_system_throttling(bool, int &current, QStringList &s, bool
}
void
-laptop_portable::set_system_performance(QString)
+laptop_portable::set_system_performance(TQString)
{
// INSERT HERE
}
void
-laptop_portable::set_system_throttling(QString)
+laptop_portable::set_system_throttling(TQString)
{
// INSERT HERE
}
@@ -3050,7 +3050,7 @@ laptop_portable::get_button(LaptopButton) // true if a button is pressed
}
void
-laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStringList &state, QStringList &values) // get multiple battery status
+laptop_portable::get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values) // get multiple battery status
{
struct power_result r;
@@ -3068,7 +3068,7 @@ laptop_portable::get_battery_status(int &num_batteries, QStringList &names, QStr
r = poll_battery_state();
names.append("BAT1");
state.append("yes");
- QString s;
+ TQString s;
s.setNum(r.percentage);
values.append(s);
}
diff --git a/klaptopdaemon/portable.h b/klaptopdaemon/portable.h
index 62d325c..a9fa703 100644
--- a/klaptopdaemon/portable.h
+++ b/klaptopdaemon/portable.h
@@ -1,8 +1,8 @@
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kactivelabel.h>
#include <kconfig.h>
-#include <qvgroupbox.h>
-#include <qstringlist.h>
+#include <tqvgroupbox.h>
+#include <tqstringlist.h>
#ifndef PORTABLE_H
#define PORTABLE_H
@@ -71,10 +71,10 @@ public:
static int has_brightness(); // returns 1 if this computer can set tyhe back panel brightness
static void set_brightness(bool blank, int val); // val = 0-255 255 brightest, 0 means dimmest (if !blank it must be still visible),
static int get_brightness(); // returns 0-255 brightness, -1 if you can't
- static QString cpu_frequency(); // Returns the cpu freq.
- static KActiveLabel *no_power_management_explanation(QWidget *parent);
- static QLabel *how_to_do_suspend_resume(QWidget *parent);
- static QLabel *pcmcia_info(int x, QWidget *parent);
+ static TQString cpu_frequency(); // Returns the cpu freq.
+ static KActiveLabel *no_power_management_explanation(TQWidget *parent);
+ static TQLabel *how_to_do_suspend_resume(TQWidget *parent);
+ static TQLabel *pcmcia_info(int x, TQWidget *parent);
/**
* Put this computer into standby mode.
@@ -95,10 +95,10 @@ public:
static void invoke_hibernation();
static struct power_result poll_battery_state();
- static void get_battery_status(int &num_batteries, QStringList &names, QStringList &state, QStringList &values); // get multiple battery status
+ static void get_battery_status(int &num_batteries, TQStringList &names, TQStringList &state, TQStringList &values); // get multiple battery status
static bool has_lav(); // true if the following returns a valid value
static float get_load_average(); // current short term load average
- static void extra_config(QWidget *parent, KConfig *config, QVBoxLayout *layout);
+ static void extra_config(TQWidget *parent, KConfig *config, TQVBoxLayout *layout);
static void acpi_set_mask(bool standby, bool suspend, bool hibernate, bool perf, bool throttle);
static void apm_set_mask(bool standby, bool suspend);
static void software_suspend_set_mask(bool hibernate);
@@ -112,14 +112,14 @@ public:
* limits).
* @return True if this system provides performance profiles.
*/
- static bool get_system_performance(bool force, int &current, QStringList &s, bool *&active);
+ static bool get_system_performance(bool force, int &current, TQStringList &s, bool *&active);
/**
* Set performance profile.
* @param val - Name of the performance profile as provided by
* get_system_performance().
*/
- static void set_system_performance(QString val);
+ static void set_system_performance(TQString val);
/**
* Get a list of available throttling levels.
@@ -130,14 +130,14 @@ public:
* for ACPI limits).
* @return True if this system provides throttling levels.
*/
- static bool get_system_throttling(bool force, int &current, QStringList &s, bool *&active);
+ static bool get_system_throttling(bool force, int &current, TQStringList &s, bool *&active);
/**
* Set throttling level.
* @param val - Name of the throttling level as provided by
* get_system_throttling().
*/
- static void set_system_throttling(QString val);
+ static void set_system_throttling(TQString val);
enum LaptopButton {LidButton=0, PowerButton};
static bool has_button(LaptopButton p); // true if we have support for a particular button
diff --git a/klaptopdaemon/power.cpp b/klaptopdaemon/power.cpp
index 2477cee..dadf654 100644
--- a/klaptopdaemon/power.cpp
+++ b/klaptopdaemon/power.cpp
@@ -35,17 +35,17 @@
#include <kcombobox.h>
#include <knuminput.h>
-#include <qlayout.h>
-#include <qvbuttongroup.h>
-#include <qspinbox.h>
-#include <qradiobutton.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqvbuttongroup.h>
+#include <tqspinbox.h>
+#include <tqradiobutton.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-PowerConfig::PowerConfig (QWidget * parent, const char *name)
+PowerConfig::PowerConfig (TQWidget * parent, const char *name)
: KCModule(parent, name),
nopowerBox(0),
nopowerStandby(0),
@@ -84,16 +84,16 @@ PowerConfig::PowerConfig (QWidget * parent, const char *name)
apm = laptop_portable::has_power_management();
config = new KConfig("kcmlaptoprc");
int can_brightness = laptop_portable::has_brightness();
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool *active_list;
bool has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
- QStringList performance_list;
+ TQStringList performance_list;
int current_performance;
bool has_performance = laptop_portable::get_system_performance(0, current_performance, performance_list, active_list);
if (!apm && !can_brightness && !has_throttle && !has_performance) {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
KActiveLabel* explain = laptop_portable::no_power_management_explanation(this);
@@ -108,200 +108,200 @@ PowerConfig::PowerConfig (QWidget * parent, const char *name)
if (!can_standby && !can_suspend && !can_hibernate && !can_brightness && !has_throttle && !has_performance)
apm = 0;
if (!apm) {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
- QLabel* explain = laptop_portable::how_to_do_suspend_resume(this);
+ TQLabel* explain = laptop_portable::how_to_do_suspend_resume(this);
top_layout->addWidget(explain);
top_layout->addStretch(1);
} else {
- QVBoxLayout *top_layout = new QVBoxLayout(this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint());
- QHBoxLayout *hlay = new QHBoxLayout( top_layout );
+ TQHBoxLayout *hlay = new TQHBoxLayout( top_layout );
- nopowerBox = new QVButtonGroup(i18n("Not Powered"), this);
- QToolTip::add( nopowerBox, i18n( "Options in this box apply when the laptop is unplugged from the wall and has been idle for a while" ) );
+ nopowerBox = new TQVButtonGroup(i18n("Not Powered"), this);
+ TQToolTip::add( nopowerBox, i18n( "Options in this box apply when the laptop is unplugged from the wall and has been idle for a while" ) );
nopowerBox->layout()->setSpacing( KDialog::spacingHint() );
hlay->addWidget( nopowerBox );
if (can_standby) {
- nopowerStandby = new QRadioButton(i18n("Standb&y"), nopowerBox);
- QToolTip::add( nopowerStandby, i18n( "Causes the laptop to change to a standby temporary-low power state" ) );
+ nopowerStandby = new TQRadioButton(i18n("Standb&y"), nopowerBox);
+ TQToolTip::add( nopowerStandby, i18n( "Causes the laptop to change to a standby temporary-low power state" ) );
}
if (can_suspend) {
- nopowerSuspend = new QRadioButton(i18n("&Suspend"), nopowerBox);
- QToolTip::add( nopowerSuspend, i18n( "Causes the laptop to change to a suspend 'save-to-ram' state" ) );
+ nopowerSuspend = new TQRadioButton(i18n("&Suspend"), nopowerBox);
+ TQToolTip::add( nopowerSuspend, i18n( "Causes the laptop to change to a suspend 'save-to-ram' state" ) );
}
if (can_hibernate) {
- nopowerHibernate = new QRadioButton(i18n("H&ibernate"), nopowerBox);
- QToolTip::add( nopowerHibernate, i18n( "Causes the laptop to change to a hibernate 'save-to-disk' state" ) );
+ nopowerHibernate = new TQRadioButton(i18n("H&ibernate"), nopowerBox);
+ TQToolTip::add( nopowerHibernate, i18n( "Causes the laptop to change to a hibernate 'save-to-disk' state" ) );
}
if (can_suspend||can_standby||can_hibernate)
- nopowerOff = new QRadioButton(i18n("None"), nopowerBox);
+ nopowerOff = new TQRadioButton(i18n("None"), nopowerBox);
if (can_brightness) {
- nopowerBrightness = new QCheckBox(i18n("Brightness"), nopowerBox);
- QToolTip::add( nopowerBrightness, i18n( "Enables changing the laptop's back panel brightness" ) );
- QWidget *wp = new QWidget(nopowerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- xl->addWidget(new QLabel("-", wp));
- nopowerValBrightness = new QSlider(0, 255, 16, 255, Qt::Horizontal, wp);
- QToolTip::add( nopowerValBrightness, i18n( "How bright to change the back panel" ) );
+ nopowerBrightness = new TQCheckBox(i18n("Brightness"), nopowerBox);
+ TQToolTip::add( nopowerBrightness, i18n( "Enables changing the laptop's back panel brightness" ) );
+ TQWidget *wp = new TQWidget(nopowerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ xl->addWidget(new TQLabel("-", wp));
+ nopowerValBrightness = new TQSlider(0, 255, 16, 255, Qt::Horizontal, wp);
+ TQToolTip::add( nopowerValBrightness, i18n( "How bright to change the back panel" ) );
nopowerValBrightness->setEnabled(0);
- connect(nopowerValBrightness, SIGNAL(valueChanged(int)), this, SLOT(changed()));
- connect(nopowerBrightness, SIGNAL(toggled(bool)), nopowerValBrightness, SLOT(setEnabled(bool)));
+ connect(nopowerValBrightness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
+ connect(nopowerBrightness, TQT_SIGNAL(toggled(bool)), nopowerValBrightness, TQT_SLOT(setEnabled(bool)));
xl->addWidget(nopowerValBrightness);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
}
if (has_performance) {
- nopowerPerformance = new QCheckBox(i18n("System performance"), nopowerBox);
- QToolTip::add( nopowerPerformance, i18n( "Enables changing the laptop's performance profile" ) );
+ nopowerPerformance = new TQCheckBox(i18n("System performance"), nopowerBox);
+ TQToolTip::add( nopowerPerformance, i18n( "Enables changing the laptop's performance profile" ) );
- QWidget *wp = new QWidget(nopowerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(nopowerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
nopowerValPerformance = new KComboBox(0, wp);
- QToolTip::add( nopowerValPerformance, i18n( "Which profile to change it to" ) );
+ TQToolTip::add( nopowerValPerformance, i18n( "Which profile to change it to" ) );
nopowerValPerformance->insertStringList(performance_list);
nopowerValPerformance->setEnabled(0);
- connect(nopowerValPerformance, SIGNAL(activated(int)), this, SLOT(changed()));
- connect(nopowerPerformance, SIGNAL(toggled(bool)), nopowerValPerformance, SLOT(setEnabled(bool)));
+ connect(nopowerValPerformance, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()));
+ connect(nopowerPerformance, TQT_SIGNAL(toggled(bool)), nopowerValPerformance, TQT_SLOT(setEnabled(bool)));
xl->addWidget(nopowerValPerformance);
xl->addStretch(1);
}
if (has_throttle) {
- nopowerThrottle = new QCheckBox(i18n("CPU throttle"), nopowerBox);
- QToolTip::add( nopowerThrottle, i18n( "Enables throttling the laptop's CPU" ) );
+ nopowerThrottle = new TQCheckBox(i18n("CPU throttle"), nopowerBox);
+ TQToolTip::add( nopowerThrottle, i18n( "Enables throttling the laptop's CPU" ) );
- QWidget *wp = new QWidget(nopowerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(nopowerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
nopowerValThrottle = new KComboBox(0, wp);
- QToolTip::add( nopowerValThrottle, i18n( "How much to throttle the laptop's CPU" ) );
+ TQToolTip::add( nopowerValThrottle, i18n( "How much to throttle the laptop's CPU" ) );
nopowerValThrottle->insertStringList(throttle_list);
nopowerValThrottle->setEnabled(0);
- connect(nopowerValThrottle, SIGNAL(activated(int)), this, SLOT(changed()));
- connect(nopowerThrottle, SIGNAL(toggled(bool)), nopowerValThrottle, SLOT(setEnabled(bool)));
+ connect(nopowerValThrottle, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()));
+ connect(nopowerThrottle, TQT_SIGNAL(toggled(bool)), nopowerValThrottle, TQT_SLOT(setEnabled(bool)));
xl->addWidget(nopowerValThrottle);
xl->addStretch(1);
}
- connect(nopowerBox, SIGNAL(clicked(int)), this, SLOT(changed()));
+ connect(nopowerBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(changed()));
bool can_lav = laptop_portable::has_lav();
- QHBox *hbox;
+ TQHBox *hbox;
if (can_lav) {
- hbox = new QHBox( nopowerBox );
- noenablelav = new QCheckBox(i18n("Don't act if LAV is >"), hbox);
- connect(noenablelav, SIGNAL(clicked()), this, SLOT(changed()));
+ hbox = new TQHBox( nopowerBox );
+ noenablelav = new TQCheckBox(i18n("Don't act if LAV is >"), hbox);
+ connect(noenablelav, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
noeditlav = new KDoubleSpinBox(0.0, 10.0, 0.0, 0.1, 1, hbox);
- QToolTip::add( noeditlav, i18n( "If enabled and the system load average is greater than this value none of the above options will be applied" ) );
- connect(noeditlav, SIGNAL(valueChanged(double)), this, SLOT(changed()));
- connect(noenablelav, SIGNAL(toggled(bool)), noeditlav, SLOT(setEnabled(bool)));
+ TQToolTip::add( noeditlav, i18n( "If enabled and the system load average is greater than this value none of the above options will be applied" ) );
+ connect(noeditlav, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(changed()));
+ connect(noenablelav, TQT_SIGNAL(toggled(bool)), noeditlav, TQT_SLOT(setEnabled(bool)));
}
- hbox = new QHBox( nopowerBox );
- QLabel* noedlabel = new QLabel(i18n("&Wait for:"), hbox);
- noeditwait = new QSpinBox( 1, 60*24 /*1 day*/, 1, hbox );
- QToolTip::add( noeditwait, i18n( "How long the computer has to be idle before these values take effect" ) );
+ hbox = new TQHBox( nopowerBox );
+ TQLabel* noedlabel = new TQLabel(i18n("&Wait for:"), hbox);
+ noeditwait = new TQSpinBox( 1, 60*24 /*1 day*/, 1, hbox );
+ TQToolTip::add( noeditwait, i18n( "How long the computer has to be idle before these values take effect" ) );
noeditwait->setSuffix( i18n("keep short, unit in spinbox", "min") );
noedlabel->setBuddy( noeditwait );
hbox->setStretchFactor( noeditwait, 1 );
- connect( noeditwait, SIGNAL(valueChanged(int)), this, SLOT(changed()));
+ connect( noeditwait, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
///////////////////////////////////////////////////////////////
- powerBox = new QVButtonGroup(i18n("Powered"), this);
+ powerBox = new TQVButtonGroup(i18n("Powered"), this);
powerBox->layout()->setSpacing( KDialog::spacingHint() );
- QToolTip::add( powerBox, i18n( "Options in this box apply when the laptop is plugged into the wall and has been idle for a while" ) );
+ TQToolTip::add( powerBox, i18n( "Options in this box apply when the laptop is plugged into the wall and has been idle for a while" ) );
hlay->addWidget( powerBox );
if (can_standby) {
- powerStandby = new QRadioButton(i18n("Sta&ndby"), powerBox);
- QToolTip::add( powerStandby, i18n( "Causes the laptop to change to a standby temporary-low power state" ) );
+ powerStandby = new TQRadioButton(i18n("Sta&ndby"), powerBox);
+ TQToolTip::add( powerStandby, i18n( "Causes the laptop to change to a standby temporary-low power state" ) );
}
if (can_suspend) {
- powerSuspend = new QRadioButton(i18n("S&uspend"), powerBox);
- QToolTip::add( powerSuspend, i18n( "Causes the laptop to change to a suspend 'save-to-ram' state" ) );
+ powerSuspend = new TQRadioButton(i18n("S&uspend"), powerBox);
+ TQToolTip::add( powerSuspend, i18n( "Causes the laptop to change to a suspend 'save-to-ram' state" ) );
}
if (can_hibernate) {
- powerHibernate = new QRadioButton(i18n("Hi&bernate"), powerBox);
- QToolTip::add( powerHibernate, i18n( "Causes the laptop to change to a hibernate 'save-to-disk' state" ) );
+ powerHibernate = new TQRadioButton(i18n("Hi&bernate"), powerBox);
+ TQToolTip::add( powerHibernate, i18n( "Causes the laptop to change to a hibernate 'save-to-disk' state" ) );
}
if (can_suspend||can_standby||can_hibernate)
- powerOff = new QRadioButton(i18n("None"), powerBox);
+ powerOff = new TQRadioButton(i18n("None"), powerBox);
if (can_brightness) {
- powerBrightness = new QCheckBox(i18n("Brightness"), powerBox);
- QToolTip::add( powerBrightness, i18n( "Enables changing the laptop's back panel brightness" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- xl->addWidget(new QLabel("-", wp));
- powerValBrightness = new QSlider(0, 255, 16, 255, Qt::Horizontal, wp);
- QToolTip::add( powerValBrightness, i18n( "How bright to change the back panel" ) );
+ powerBrightness = new TQCheckBox(i18n("Brightness"), powerBox);
+ TQToolTip::add( powerBrightness, i18n( "Enables changing the laptop's back panel brightness" ) );
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ xl->addWidget(new TQLabel("-", wp));
+ powerValBrightness = new TQSlider(0, 255, 16, 255, Qt::Horizontal, wp);
+ TQToolTip::add( powerValBrightness, i18n( "How bright to change the back panel" ) );
powerValBrightness->setEnabled(0);
- connect(powerValBrightness, SIGNAL(valueChanged(int)), this, SLOT(changed()));
- connect(powerBrightness, SIGNAL(toggled(bool)), powerValBrightness, SLOT(setEnabled(bool)));
+ connect(powerValBrightness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
+ connect(powerBrightness, TQT_SIGNAL(toggled(bool)), powerValBrightness, TQT_SLOT(setEnabled(bool)));
xl->addWidget(powerValBrightness);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
}
if (has_performance) {
- powerPerformance = new QCheckBox(i18n("System performance"), powerBox);
- QToolTip::add( powerPerformance, i18n( "Enables changing the laptop's performance profile" ) );
+ powerPerformance = new TQCheckBox(i18n("System performance"), powerBox);
+ TQToolTip::add( powerPerformance, i18n( "Enables changing the laptop's performance profile" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
powerValPerformance = new KComboBox(0, wp);
- QToolTip::add( powerValPerformance, i18n( "Which profile to change it to" ) );
+ TQToolTip::add( powerValPerformance, i18n( "Which profile to change it to" ) );
powerValPerformance->insertStringList(performance_list);
powerValPerformance->setEnabled(0);
- connect(powerValPerformance, SIGNAL(activated(int)), this, SLOT(changed()));
- connect(powerPerformance, SIGNAL(toggled(bool)), powerValPerformance, SLOT(setEnabled(bool)));
+ connect(powerValPerformance, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()));
+ connect(powerPerformance, TQT_SIGNAL(toggled(bool)), powerValPerformance, TQT_SLOT(setEnabled(bool)));
xl->addWidget(powerValPerformance);
xl->addStretch(1);
}
if (has_throttle) {
- powerThrottle = new QCheckBox(i18n("CPU throttle"), powerBox);
- QToolTip::add( powerThrottle, i18n( "Enables throttling the laptop's CPU" ) );
+ powerThrottle = new TQCheckBox(i18n("CPU throttle"), powerBox);
+ TQToolTip::add( powerThrottle, i18n( "Enables throttling the laptop's CPU" ) );
- QWidget *wp = new QWidget(powerBox);
- QHBoxLayout *xl = new QHBoxLayout( wp);
+ TQWidget *wp = new TQWidget(powerBox);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
powerValThrottle = new KComboBox(0, wp);
- QToolTip::add( powerValThrottle, i18n( "How much to throttle the laptop's CPU" ) );
+ TQToolTip::add( powerValThrottle, i18n( "How much to throttle the laptop's CPU" ) );
powerValThrottle->insertStringList(throttle_list);
powerValThrottle->setEnabled(0);
- connect(powerValThrottle, SIGNAL(activated(int)), this, SLOT(changed()));
- connect(powerThrottle, SIGNAL(toggled(bool)), powerValThrottle, SLOT(setEnabled(bool)));
+ connect(powerValThrottle, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changed()));
+ connect(powerThrottle, TQT_SIGNAL(toggled(bool)), powerValThrottle, TQT_SLOT(setEnabled(bool)));
xl->addWidget(powerValThrottle);
xl->addStretch(1);
}
- connect(powerBox, SIGNAL(clicked(int)), this, SLOT(changed()));
+ connect(powerBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(changed()));
if (can_lav) {
- hbox = new QHBox( powerBox );
- enablelav = new QCheckBox(i18n("Don't act if LAV is >"), hbox);
- connect( enablelav, SIGNAL(clicked()), this, SLOT(changed()));
+ hbox = new TQHBox( powerBox );
+ enablelav = new TQCheckBox(i18n("Don't act if LAV is >"), hbox);
+ connect( enablelav, TQT_SIGNAL(clicked()), this, TQT_SLOT(changed()));
editlav = new KDoubleSpinBox(0.0, 10.0, 0.0, 0.1, 1, hbox);
- QToolTip::add( editlav, i18n( "If enabled and the system load average is greater than this value none of the above options will be applied" ) );
- connect( editlav, SIGNAL(valueChanged(double)), this, SLOT(changed()));
- connect( enablelav, SIGNAL(toggled(bool)), editlav, SLOT(setEnabled(bool)) );
+ TQToolTip::add( editlav, i18n( "If enabled and the system load average is greater than this value none of the above options will be applied" ) );
+ connect( editlav, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(changed()));
+ connect( enablelav, TQT_SIGNAL(toggled(bool)), editlav, TQT_SLOT(setEnabled(bool)) );
}
- hbox = new QHBox( powerBox );
- QLabel* edlabel = new QLabel(i18n("Wai&t for:"), hbox);
- editwait = new QSpinBox( 1, 60*24 /*1 day*/, 1, hbox );
- QToolTip::add( editwait, i18n( "How long the computer has to be idle before these values take effect" ) );
+ hbox = new TQHBox( powerBox );
+ TQLabel* edlabel = new TQLabel(i18n("Wai&t for:"), hbox);
+ editwait = new TQSpinBox( 1, 60*24 /*1 day*/, 1, hbox );
+ TQToolTip::add( editwait, i18n( "How long the computer has to be idle before these values take effect" ) );
editwait->setSuffix( i18n("keep short, unit in spinbox", "min") );
edlabel->setBuddy( editwait );
hbox->setStretchFactor( editwait, 1 );
- connect( editwait, SIGNAL(valueChanged(int)), this, SLOT(changed()));
+ connect( editwait, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(changed()));
hlay->addStretch(1);
- QLabel* explain = new QLabel(i18n("This panel configures the behavior of the automatic power-down feature - "
+ TQLabel* explain = new TQLabel(i18n("This panel configures the behavior of the automatic power-down feature - "
"it works as a sort of extreme screen saver. You can configure different "
"timeouts and types of behavior depending on whether or not your laptop is "
"plugged in to the mains supply."), this );
@@ -309,7 +309,7 @@ PowerConfig::PowerConfig (QWidget * parent, const char *name)
top_layout->addWidget(explain);
if (can_standby) {
- QLabel* explain3 = new QLabel(i18n("Different laptops may respond to 'standby' in different ways - in many "
+ TQLabel* explain3 = new TQLabel(i18n("Different laptops may respond to 'standby' in different ways - in many "
"it is only a temporary state and may not be useful for you."), this);
explain3->setAlignment( Qt::WordBreak );
top_layout->addWidget(explain3, 0, Qt::AlignLeft);
@@ -317,7 +317,7 @@ PowerConfig::PowerConfig (QWidget * parent, const char *name)
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this ), 0, Qt::AlignRight );
}
}
@@ -576,7 +576,7 @@ void PowerConfig::setPower(int p, int np)
}
-QString PowerConfig::quickHelp() const
+TQString PowerConfig::quickHelp() const
{
return i18n("<h1>Laptop Power Control</h1>This module allows you to "
"control the power settings of your laptop and set timouts that will trigger "
diff --git a/klaptopdaemon/power.h b/klaptopdaemon/power.h
index 0d9d624..359ffdf 100644
--- a/klaptopdaemon/power.h
+++ b/klaptopdaemon/power.h
@@ -26,7 +26,7 @@
#define __POWERCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSlider;
@@ -42,14 +42,14 @@ class PowerConfig : public KCModule
{
Q_OBJECT
public:
- PowerConfig( QWidget *parent=0, const char* name=0);
+ PowerConfig( TQWidget *parent=0, const char* name=0);
~PowerConfig();
void save( void );
void load();
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private:
@@ -58,37 +58,37 @@ private:
int getNoPower();
void setPower( int, int );
- QButtonGroup *nopowerBox;
- QRadioButton *nopowerStandby, *nopowerSuspend, *nopowerOff, *nopowerHibernate;
- QCheckBox *nopowerBrightness;
- QSlider *nopowerValBrightness;
- QCheckBox *nopowerThrottle;
+ TQButtonGroup *nopowerBox;
+ TQRadioButton *nopowerStandby, *nopowerSuspend, *nopowerOff, *nopowerHibernate;
+ TQCheckBox *nopowerBrightness;
+ TQSlider *nopowerValBrightness;
+ TQCheckBox *nopowerThrottle;
KComboBox *nopowerValThrottle;
- QCheckBox *nopowerPerformance;
+ TQCheckBox *nopowerPerformance;
KComboBox *nopowerValPerformance;
- QButtonGroup *powerBox;
- QRadioButton *powerStandby, *powerSuspend, *powerOff, *powerHibernate;
- QCheckBox *powerBrightness;
- QSlider *powerValBrightness;
- QCheckBox *powerThrottle;
+ TQButtonGroup *powerBox;
+ TQRadioButton *powerStandby, *powerSuspend, *powerOff, *powerHibernate;
+ TQCheckBox *powerBrightness;
+ TQSlider *powerValBrightness;
+ TQCheckBox *powerThrottle;
KComboBox *powerValThrottle;
- QCheckBox *powerPerformance;
+ TQCheckBox *powerPerformance;
KComboBox *powerValPerformance;
- QSpinBox *noeditwait;
- QSpinBox *editwait;
- QCheckBox *enablelav;
- QCheckBox *noenablelav;
+ TQSpinBox *noeditwait;
+ TQSpinBox *editwait;
+ TQCheckBox *enablelav;
+ TQCheckBox *noenablelav;
KDoubleSpinBox *noeditlav;
KDoubleSpinBox *editlav;
int edit_wait, noedit_wait;
int power_bright_val, nopower_bright_val;
bool nopower_bright_enabled, power_bright_enabled;
bool nopower_throttle_enabled, power_throttle_enabled;
- QString nopower_throttle_val, power_throttle_val;
+ TQString nopower_throttle_val, power_throttle_val;
bool nopower_performance_enabled, power_performance_enabled;
bool lav_enabled, nolav_enabled;
float edit_lav, noedit_lav;
- QString nopower_performance_val, power_performance_val;
+ TQString nopower_performance_val, power_performance_val;
KConfig *config;
int power, nopower, apm;
diff --git a/klaptopdaemon/profile.cpp b/klaptopdaemon/profile.cpp
index a6285cb..db3cfde 100644
--- a/klaptopdaemon/profile.cpp
+++ b/klaptopdaemon/profile.cpp
@@ -41,26 +41,26 @@
#include <kcombobox.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
+ProfileConfig::ProfileConfig(TQWidget * parent, const char *name)
: KCModule(parent, name)
{
- QStringList performance_list;
+ TQStringList performance_list;
int current_performance;
bool *active_list;
bool has_performance = laptop_portable::get_system_performance(0, current_performance, performance_list, active_list);
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
@@ -68,28 +68,28 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
config = new KConfig("kcmlaptoprc");
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
- QHBoxLayout *ll = new QHBoxLayout();
+ TQHBoxLayout *ll = new TQHBoxLayout();
- QVGroupBox *gb = new QVGroupBox(i18n("Not Powered"), this);
- QToolTip::add( gb, i18n( "Items in this box take effect whenever the laptop is unplugged from the wall" ) );
+ TQVGroupBox *gb = new TQVGroupBox(i18n("Not Powered"), this);
+ TQToolTip::add( gb, i18n( "Items in this box take effect whenever the laptop is unplugged from the wall" ) );
if (laptop_portable::has_brightness()) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- poff = new QCheckBox(i18n("Back panel brightness"), wp);
- QToolTip::add( poff, i18n( "Enables the changing of the back panel brightness" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ poff = new TQCheckBox(i18n("Back panel brightness"), wp);
+ TQToolTip::add( poff, i18n( "Enables the changing of the back panel brightness" ) );
xl->addWidget(poff);
- connect (poff, SIGNAL(toggled(bool)), this, SLOT(poff_changed(bool)));
+ connect (poff, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(poff_changed(bool)));
- xl->addWidget(new QLabel("-", wp));
- soff = new QSlider(0, 255, 16, 160, Qt::Horizontal, wp);
+ xl->addWidget(new TQLabel("-", wp));
+ soff = new TQSlider(0, 255, 16, 160, Qt::Horizontal, wp);
soff->setEnabled(0);
- QToolTip::add( soff, i18n( "How bright it should be when it is changed" ) );
- connect (soff, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
+ TQToolTip::add( soff, i18n( "How bright it should be when it is changed" ) );
+ connect (soff, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(soff);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
} else {
poff = 0;
@@ -97,18 +97,18 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
}
if (has_performance) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- performance_off = new QCheckBox(i18n("System performance"), wp);
- QToolTip::add( performance_off, i18n( "Enables the changing of the system performance profile" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ performance_off = new TQCheckBox(i18n("System performance"), wp);
+ TQToolTip::add( performance_off, i18n( "Enables the changing of the system performance profile" ) );
xl->addWidget(performance_off);
- connect (performance_off, SIGNAL(toggled(bool)), this, SLOT(performance_off_changed(bool)));
+ connect (performance_off, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(performance_off_changed(bool)));
performance_val_off = new KComboBox(0, wp);
- QToolTip::add( performance_val_off, i18n( "The new system performance profile to change to" ) );
+ TQToolTip::add( performance_val_off, i18n( "The new system performance profile to change to" ) );
performance_val_off->insertStringList(performance_list);
performance_val_off->setEnabled(0);
- connect (performance_val_off, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ connect (performance_val_off, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(performance_val_off);
xl->addStretch(1);
} else {
@@ -116,18 +116,18 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
performance_val_off = 0;
}
if (has_throttle) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- throttle_off = new QCheckBox(i18n("CPU throttling"), wp);
- QToolTip::add( throttle_off, i18n( "Enables the throttling of the CPU performance" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ throttle_off = new TQCheckBox(i18n("CPU throttling"), wp);
+ TQToolTip::add( throttle_off, i18n( "Enables the throttling of the CPU performance" ) );
xl->addWidget(throttle_off);
- connect (throttle_off, SIGNAL(toggled(bool)), this, SLOT(throttle_off_changed(bool)));
+ connect (throttle_off, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(throttle_off_changed(bool)));
throttle_val_off = new KComboBox(0, wp);
throttle_val_off->insertStringList(throttle_list);
throttle_val_off->setEnabled(0);
- QToolTip::add( throttle_val_off, i18n( "How much to throttle the CPU by" ) );
- connect (throttle_val_off, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ TQToolTip::add( throttle_val_off, i18n( "How much to throttle the CPU by" ) );
+ connect (throttle_val_off, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(throttle_val_off);
xl->addStretch(1);
} else {
@@ -137,41 +137,41 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
ll->addWidget(gb);
- gb = new QVGroupBox(i18n("Powered"), this);
- QToolTip::add( gb, i18n( "Items in this box take effect whenever the laptop is plugged into the wall" ) );
+ gb = new TQVGroupBox(i18n("Powered"), this);
+ TQToolTip::add( gb, i18n( "Items in this box take effect whenever the laptop is plugged into the wall" ) );
if (laptop_portable::has_brightness()) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- pon = new QCheckBox(i18n("Back panel brightness"), wp);
- QToolTip::add( pon, i18n( "Enables the changing of the back panel brightness" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ pon = new TQCheckBox(i18n("Back panel brightness"), wp);
+ TQToolTip::add( pon, i18n( "Enables the changing of the back panel brightness" ) );
xl->addWidget(pon);
- connect (pon, SIGNAL(toggled(bool)), this, SLOT(pon_changed(bool)));
+ connect (pon, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(pon_changed(bool)));
- xl->addWidget(new QLabel("-", wp));
- son = new QSlider(0, 255, 16, 255, Qt::Horizontal, wp);
+ xl->addWidget(new TQLabel("-", wp));
+ son = new TQSlider(0, 255, 16, 255, Qt::Horizontal, wp);
son->setEnabled(0);
- QToolTip::add( son, i18n( "How bright it should be when it is changed" ) );
- connect (son, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
+ TQToolTip::add( son, i18n( "How bright it should be when it is changed" ) );
+ connect (son, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(son);
- xl->addWidget(new QLabel("+", wp));
+ xl->addWidget(new TQLabel("+", wp));
xl->addStretch(1);
} else {
pon = 0;
son = 0;
}
if (has_performance) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- performance_on = new QCheckBox(i18n("System performance"), wp);
- QToolTip::add( performance_on, i18n( "Enables the changing of the system performance profile" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ performance_on = new TQCheckBox(i18n("System performance"), wp);
+ TQToolTip::add( performance_on, i18n( "Enables the changing of the system performance profile" ) );
xl->addWidget(performance_on);
- connect (performance_on, SIGNAL(toggled(bool)), this, SLOT(performance_on_changed(bool)));
+ connect (performance_on, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(performance_on_changed(bool)));
performance_val_on = new KComboBox(0, wp);
performance_val_on->insertStringList(performance_list);
performance_val_on->setEnabled(0);
- QToolTip::add( performance_val_on, i18n( "The new system performance profile to change to" ) );
- connect (performance_val_on, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ TQToolTip::add( performance_val_on, i18n( "The new system performance profile to change to" ) );
+ connect (performance_val_on, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(performance_val_on);
xl->addStretch(1);
} else {
@@ -179,18 +179,18 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
performance_val_on = 0;
}
if (has_throttle) {
- QWidget *wp = new QWidget(gb);
- QHBoxLayout *xl = new QHBoxLayout( wp);
- throttle_on = new QCheckBox(i18n("CPU throttle"), wp);
- QToolTip::add( throttle_on, i18n( "Enables the throttling of the CPU performance" ) );
+ TQWidget *wp = new TQWidget(gb);
+ TQHBoxLayout *xl = new TQHBoxLayout( wp);
+ throttle_on = new TQCheckBox(i18n("CPU throttle"), wp);
+ TQToolTip::add( throttle_on, i18n( "Enables the throttling of the CPU performance" ) );
xl->addWidget(throttle_on);
- connect (throttle_on, SIGNAL(toggled(bool)), this, SLOT(throttle_on_changed(bool)));
+ connect (throttle_on, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(throttle_on_changed(bool)));
throttle_val_on = new KComboBox(0, wp);
throttle_val_on->insertStringList(throttle_list);
throttle_val_on->setEnabled(0);
- QToolTip::add( throttle_val_on, i18n( "How much to throttle the CPU by" ) );
- connect (throttle_val_on, SIGNAL(activated(int)), this, SLOT(configChanged()));
+ TQToolTip::add( throttle_val_on, i18n( "How much to throttle the CPU by" ) );
+ connect (throttle_val_on, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
xl->addWidget(throttle_val_on);
xl->addStretch(1);
} else {
@@ -202,18 +202,18 @@ ProfileConfig::ProfileConfig(QWidget * parent, const char *name)
ll->addStretch(1);
top_layout->addLayout(ll);
- QLabel *tmp_label = new QLabel(i18n("This panel allows you to set default values for system attributes "
+ TQLabel *tmp_label = new TQLabel(i18n("This panel allows you to set default values for system attributes "
"so that they change when the laptop is plugged in to the wall or "
"running on batteries."), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
- tmp_label = new QLabel(i18n("You can also set options for these values that will be set by low battery "
+ tmp_label = new TQLabel(i18n("You can also set options for these values that will be set by low battery "
"conditions, or system inactivity in the other panels"), this );
tmp_label->setAlignment( Qt::WordBreak );
top_layout->addWidget( tmp_label );
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
load();
@@ -330,7 +330,7 @@ void ProfileConfig::load(bool useDefaults)
v = 0;
}
if (performance_val_on) {
- QString s = config->readEntry("PerformanceOnLevel", "");
+ TQString s = config->readEntry("PerformanceOnLevel", "");
int ind = 0;
for (int i = 0; i < performance_val_on->count(); i++)
if (performance_val_on->text(i) == s) {
@@ -347,7 +347,7 @@ void ProfileConfig::load(bool useDefaults)
v = 0;
}
if (performance_val_off) {
- QString s = config->readEntry("PerformanceOffLevel", "");
+ TQString s = config->readEntry("PerformanceOffLevel", "");
int ind = 0;
for (int i = 0; i < performance_val_off->count(); i++)
if (performance_val_off->text(i) == s) {
@@ -364,7 +364,7 @@ void ProfileConfig::load(bool useDefaults)
v = 0;
}
if (throttle_val_on) {
- QString s = config->readEntry("ThrottleOnLevel", "");
+ TQString s = config->readEntry("ThrottleOnLevel", "");
int ind = 0;
for (int i = 0; i < throttle_val_on->count(); i++)
if (throttle_val_on->text(i) == s) {
@@ -381,7 +381,7 @@ void ProfileConfig::load(bool useDefaults)
v = 0;
}
if (throttle_val_off) {
- QString s = config->readEntry("ThrottleOffLevel", "");
+ TQString s = config->readEntry("ThrottleOffLevel", "");
int ind = 0;
for (int i = 0; i < throttle_val_off->count(); i++)
if (throttle_val_off->text(i) == s) {
@@ -406,7 +406,7 @@ void ProfileConfig::configChanged()
}
-QString ProfileConfig::quickHelp() const
+TQString ProfileConfig::quickHelp() const
{
return i18n("<h1>Laptop Power Profile Setup</h1>This module allows you to configure default values for static laptop "
"system attributes that will change when the laptop is plugged in or unplugged from the wall.");
diff --git a/klaptopdaemon/profile.h b/klaptopdaemon/profile.h
index a9a81be..914725a 100644
--- a/klaptopdaemon/profile.h
+++ b/klaptopdaemon/profile.h
@@ -26,7 +26,7 @@
#define __BRIGHTNESSCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSpinBox;
@@ -43,7 +43,7 @@ class ProfileConfig : public KCModule
{
Q_OBJECT
public:
- ProfileConfig( QWidget *parent=0, const char* name=0);
+ ProfileConfig( TQWidget *parent=0, const char* name=0);
~ProfileConfig( );
void save( void );
@@ -51,7 +51,7 @@ public:
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -68,11 +68,11 @@ private slots:
private:
KConfig *config;
- QCheckBox *pon, *performance_on, *throttle_on;
- QSlider *son;
+ TQCheckBox *pon, *performance_on, *throttle_on;
+ TQSlider *son;
KComboBox *performance_val_on, *throttle_val_on;
- QCheckBox *poff, *performance_off, *throttle_off;
- QSlider *soff;
+ TQCheckBox *poff, *performance_off, *throttle_off;
+ TQSlider *soff;
KComboBox *performance_val_off, *throttle_val_off;
diff --git a/klaptopdaemon/sony.cpp b/klaptopdaemon/sony.cpp
index 8183f21..b97b05e 100644
--- a/klaptopdaemon/sony.cpp
+++ b/klaptopdaemon/sony.cpp
@@ -43,26 +43,26 @@
#include <krichtextlabel.h>
// other Qt headers:
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qvgroupbox.h>
-#include <qgrid.h>
-#include <qpushbutton.h>
-#include <qslider.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqvgroupbox.h>
+#include <tqgrid.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-SonyConfig::SonyConfig(QWidget * parent, const char *name)
+SonyConfig::SonyConfig(TQWidget * parent, const char *name)
: KCModule(parent, name)
{
KGlobal::locale()->insertCatalogue("klaptopdaemon"); // For translation of klaptopdaemon messages
config = new KConfig("kcmlaptoprc");
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
@@ -70,15 +70,15 @@ SonyConfig::SonyConfig(QWidget * parent, const char *name)
"'sonypi' device for your laptop - you should not enable the options below if you\nalso "
"use the 'sonypid' program in your system").replace("\n", " "), this));
- enableScrollBar = new QCheckBox( i18n("Enable &scroll bar"), this );
- QToolTip::add( enableScrollBar, i18n( "When checked this box enables the scrollbar so that it works under KDE" ) );
+ enableScrollBar = new TQCheckBox( i18n("Enable &scroll bar"), this );
+ TQToolTip::add( enableScrollBar, i18n( "When checked this box enables the scrollbar so that it works under KDE" ) );
top_layout->addWidget( enableScrollBar );
- connect( enableScrollBar, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableScrollBar, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
- enableMiddleEmulation = new QCheckBox( i18n("&Emulate middle mouse button with scroll bar press"), this );
- QToolTip::add( enableMiddleEmulation, i18n( "When checked this box enables pressing the scroll bar to act in the same way as pressing the middle button on a 3 button mouse" ) );
+ enableMiddleEmulation = new TQCheckBox( i18n("&Emulate middle mouse button with scroll bar press"), this );
+ TQToolTip::add( enableMiddleEmulation, i18n( "When checked this box enables pressing the scroll bar to act in the same way as pressing the middle button on a 3 button mouse" ) );
top_layout->addWidget( enableMiddleEmulation );
- connect( enableMiddleEmulation, SIGNAL(clicked()), this, SLOT(configChanged()) );
+ connect( enableMiddleEmulation, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()) );
if (::access("/dev/sonypi", R_OK) != 0) {
enableMiddleEmulation->setEnabled(0);
@@ -87,10 +87,10 @@ SonyConfig::SonyConfig(QWidget * parent, const char *name)
// TODO: remove linefeed from string, can't do it right now coz we have a string freeze
top_layout->addWidget(new KRichTextLabel(i18n("The /dev/sonypi is not accessable, if you wish to use the above features its\n"
"protections need to be changed. Clicking on the button below will change them\n").replace("\n", " "), this));
- QHBoxLayout *ll = new QHBoxLayout();
- QPushButton *setupButton = new QPushButton(i18n("Setup /dev/sonypi"), this);
- connect( setupButton, SIGNAL(clicked()), this, SLOT(setupHelper()) );
- QToolTip::add( setupButton, i18n( "This button can be used to enable the sony specific features" ) );
+ TQHBoxLayout *ll = new TQHBoxLayout();
+ TQPushButton *setupButton = new TQPushButton(i18n("Setup /dev/sonypi"), this);
+ connect( setupButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(setupHelper()) );
+ TQToolTip::add( setupButton, i18n( "This button can be used to enable the sony specific features" ) );
ll->addStretch(2);
ll->addWidget(setupButton);
ll->addStretch(8);
@@ -99,7 +99,7 @@ SonyConfig::SonyConfig(QWidget * parent, const char *name)
top_layout->addStretch(1);
- top_layout->addWidget( new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
+ top_layout->addWidget( new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this), 0, Qt::AlignRight );
load();
@@ -107,7 +107,7 @@ SonyConfig::SonyConfig(QWidget * parent, const char *name)
void SonyConfig::setupHelper()
{
- QString kdesu = KStandardDirs::findExe("kdesu");
+ TQString kdesu = KStandardDirs::findExe("kdesu");
if (!kdesu.isEmpty()) {
int rc = KMessageBox::warningContinueCancel(0,
i18n("You will need to supply a root password "
@@ -182,7 +182,7 @@ void SonyConfig::configChanged()
}
-QString SonyConfig::quickHelp() const
+TQString SonyConfig::quickHelp() const
{
return i18n("<h1>Sony Laptop Hardware Setup</h1>This module allows you to configure "
"some Sony laptop hardware for your system");
diff --git a/klaptopdaemon/sony.h b/klaptopdaemon/sony.h
index ab31065..172798a 100644
--- a/klaptopdaemon/sony.h
+++ b/klaptopdaemon/sony.h
@@ -26,7 +26,7 @@
#define __SONYCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class QSpinBox;
@@ -42,7 +42,7 @@ class SonyConfig : public KCModule
{
Q_OBJECT
public:
- SonyConfig( QWidget *parent=0, const char* name=0);
+ SonyConfig( TQWidget *parent=0, const char* name=0);
~SonyConfig( );
void save( void );
@@ -50,7 +50,7 @@ public:
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
@@ -61,9 +61,9 @@ private slots:
private:
KConfig *config;
- QCheckBox *enableScrollBar;
+ TQCheckBox *enableScrollBar;
bool enablescrollbar;
- QCheckBox *enableMiddleEmulation;
+ TQCheckBox *enableMiddleEmulation;
bool middleemulation;
};
diff --git a/klaptopdaemon/wake_laptop.cpp b/klaptopdaemon/wake_laptop.cpp
index 6b2a2b9..8902be8 100644
--- a/klaptopdaemon/wake_laptop.cpp
+++ b/klaptopdaemon/wake_laptop.cpp
@@ -33,7 +33,7 @@ wake_laptop_daemon()
if (!dclient || (!dclient->isAttached() && !dclient->attach()))
return;
- QByteArray data;
- QDataStream arg( data, IO_WriteOnly );
+ TQByteArray data;
+ TQDataStream arg( data, IO_WriteOnly );
(void) dclient->send( "kded", "klaptopdaemon", "restart()", data );
}
diff --git a/klaptopdaemon/warning.cpp b/klaptopdaemon/warning.cpp
index 29944e0..c098718 100644
--- a/klaptopdaemon/warning.cpp
+++ b/klaptopdaemon/warning.cpp
@@ -33,18 +33,18 @@
#include <kapplication.h>
#include <kcombobox.h>
-#include <qlayout.h>
-#include <qcheckbox.h>
-#include <qspinbox.h>
-#include <qslider.h>
-#include <qhbox.h>
-#include <qvbuttongroup.h>
-#include <qradiobutton.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqcheckbox.h>
+#include <tqspinbox.h>
+#include <tqslider.h>
+#include <tqhbox.h>
+#include <tqvbuttongroup.h>
+#include <tqradiobutton.h>
+#include <tqtooltip.h>
extern void wake_laptop_daemon();
-WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
+WarningConfig::WarningConfig (int t, TQWidget * parent, const char *name)
: KCModule(parent, name),
checkSuspend(0),
checkStandby(0),
@@ -59,7 +59,7 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
my_load(0);
if (!apm) {
- QVBoxLayout *top_layout = new QVBoxLayout( this, KDialog::marginHint(),
+ TQVBoxLayout *top_layout = new TQVBoxLayout( this, KDialog::marginHint(),
KDialog::spacingHint() );
KActiveLabel* explain = laptop_portable::no_power_management_explanation(this);
@@ -67,7 +67,7 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
top_layout->addStretch(1);
} else {
- QGridLayout *grid = new QGridLayout( this, 11, 2, /* rows x cols */
+ TQGridLayout *grid = new TQGridLayout( this, 11, 2, /* rows x cols */
KDialog::marginHint(),
KDialog::spacingHint() );
grid->setColStretch( 1, 1 );
@@ -75,87 +75,87 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
int curRow = 0;
// setup the trigger stuff:
if (type) {
- checkCriticalTime = new QCheckBox( i18n("Critical &trigger:"), this );
- checkCriticalPercent = new QCheckBox( i18n("Critical &trigger:"), this );
- editCriticalTime = new QSpinBox(1, 60*24, 1, this);
+ checkCriticalTime = new TQCheckBox( i18n("Critical &trigger:"), this );
+ checkCriticalPercent = new TQCheckBox( i18n("Critical &trigger:"), this );
+ editCriticalTime = new TQSpinBox(1, 60*24, 1, this);
editCriticalTime->setSuffix(i18n("keep short, unit in spinbox", "min"));
- QToolTip::add(editCriticalTime, i18n("When this amount of battery life is left the actions below will be triggered"));
- editCriticalPercent = new QSpinBox(1, 100, 1, this);
+ TQToolTip::add(editCriticalTime, i18n("When this amount of battery life is left the actions below will be triggered"));
+ editCriticalPercent = new TQSpinBox(1, 100, 1, this);
editCriticalPercent->setSuffix(i18n("keep short, unit in spinbox", "%"));
- QToolTip::add(editCriticalPercent, i18n("When this amount of battery life is left the actions below will be triggered"));
+ TQToolTip::add(editCriticalPercent, i18n("When this amount of battery life is left the actions below will be triggered"));
grid->addWidget(checkCriticalTime, curRow, 0);
grid->addWidget(editCriticalTime, curRow++, Qt::AlignLeft);
grid->addWidget(checkCriticalPercent, curRow, 0);
grid->addWidget(editCriticalPercent, curRow++, Qt::AlignLeft);
- connect(editCriticalTime, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(editCriticalPercent, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(checkCriticalTime, SIGNAL(toggled(bool)), this, SLOT(configChanged()));
- connect(checkCriticalPercent, SIGNAL(toggled(bool)), this, SLOT(configChanged()));
- connect(checkCriticalTime, SIGNAL(toggled(bool)), this, SLOT(checkCriticalTimeChanged(bool)));
- connect(checkCriticalPercent, SIGNAL(toggled(bool)), this, SLOT(checkCriticalPercentChanged(bool)));
+ connect(editCriticalTime, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(editCriticalPercent, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(checkCriticalTime, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
+ connect(checkCriticalPercent, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
+ connect(checkCriticalTime, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkCriticalTimeChanged(bool)));
+ connect(checkCriticalPercent, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkCriticalPercentChanged(bool)));
} else {
- checkLowTime = new QCheckBox( i18n("Low &trigger:"), this );
- checkLowPercent = new QCheckBox( i18n("Low &trigger:"), this );
- editLowTime = new QSpinBox(1, 60*24, 1, this);
+ checkLowTime = new TQCheckBox( i18n("Low &trigger:"), this );
+ checkLowPercent = new TQCheckBox( i18n("Low &trigger:"), this );
+ editLowTime = new TQSpinBox(1, 60*24, 1, this);
editLowTime->setSuffix(i18n("keep short, unit in spinbox", "min"));
- QToolTip::add(editLowTime, i18n("When this amount of battery life is left the actions below will be triggered"));
- editLowPercent = new QSpinBox(1, 100, 1, this);
+ TQToolTip::add(editLowTime, i18n("When this amount of battery life is left the actions below will be triggered"));
+ editLowPercent = new TQSpinBox(1, 100, 1, this);
editLowPercent->setSuffix(i18n("keep short, unit in spinbox", "%"));
- QToolTip::add(editLowPercent, i18n("When this amount of battery life is left the actions below will be triggered"));
+ TQToolTip::add(editLowPercent, i18n("When this amount of battery life is left the actions below will be triggered"));
grid->addWidget(checkLowTime, curRow, 0);
grid->addWidget(editLowTime, curRow++, Qt::AlignLeft);
grid->addWidget(checkLowPercent, curRow, 0);
grid->addWidget(editLowPercent, curRow++, Qt::AlignLeft);
- connect(editLowTime, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(editLowPercent, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
- connect(checkLowTime, SIGNAL(toggled(bool)), this, SLOT(configChanged()));
- connect(checkLowPercent, SIGNAL(toggled(bool)), this, SLOT(configChanged()));
- connect(checkLowTime, SIGNAL(toggled(bool)), this, SLOT(checkLowTimeChanged(bool)));
- connect(checkLowPercent, SIGNAL(toggled(bool)), this, SLOT(checkLowPercentChanged(bool)));
+ connect(editLowTime, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(editLowPercent, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
+ connect(checkLowTime, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
+ connect(checkLowPercent, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(configChanged()));
+ connect(checkLowTime, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkLowTimeChanged(bool)));
+ connect(checkLowPercent, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(checkLowPercentChanged(bool)));
}
// setup the Run Command stuff
- checkRunCommand = new QCheckBox(i18n("Run &command:"), this);
+ checkRunCommand = new TQCheckBox(i18n("Run &command:"), this);
grid->addWidget(checkRunCommand, curRow, 0);
editRunCommand = new KURLRequester( this );
editRunCommand->setEnabled(false);
- connect( checkRunCommand, SIGNAL(toggled(bool)),
- editRunCommand, SLOT(setEnabled(bool)) );
- connect( checkRunCommand, SIGNAL(clicked()),
- this, SLOT(configChanged()) );
- connect( editRunCommand, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
+ connect( checkRunCommand, TQT_SIGNAL(toggled(bool)),
+ editRunCommand, TQT_SLOT(setEnabled(bool)) );
+ connect( checkRunCommand, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()) );
+ connect( editRunCommand, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
grid->addWidget(editRunCommand, curRow++, 1);
- QToolTip::add( editRunCommand, i18n( "This command will be run when the battery gets low" ) );
+ TQToolTip::add( editRunCommand, i18n( "This command will be run when the battery gets low" ) );
// setup the Play Sound stuff
- checkPlaySound = new QCheckBox(i18n("&Play sound:"), this);
+ checkPlaySound = new TQCheckBox(i18n("&Play sound:"), this);
grid->addWidget(checkPlaySound, curRow, 0);
editPlaySound = new KURLRequester( this );
editPlaySound->setEnabled(false);
- connect( checkPlaySound, SIGNAL(toggled(bool)),
- editPlaySound, SLOT(setEnabled(bool)) );
- connect( checkPlaySound, SIGNAL(clicked()),
- this, SLOT(configChanged()) );
- connect( editPlaySound, SIGNAL(textChanged(const QString&)),
- this, SLOT(configChanged()) );
+ connect( checkPlaySound, TQT_SIGNAL(toggled(bool)),
+ editPlaySound, TQT_SLOT(setEnabled(bool)) );
+ connect( checkPlaySound, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(configChanged()) );
+ connect( editPlaySound, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(configChanged()) );
grid->addWidget(editPlaySound, curRow++, 1);
- QToolTip::add( editPlaySound, i18n( "This sound will play when the battery gets low" ) );
+ TQToolTip::add( editPlaySound, i18n( "This sound will play when the battery gets low" ) );
// setup the System Sound stuff
- checkBeep = new QCheckBox(i18n("System &beep"), this);
+ checkBeep = new TQCheckBox(i18n("System &beep"), this);
grid->addWidget(checkBeep, curRow++, 0);
- connect(checkBeep, SIGNAL(clicked()), this, SLOT(configChanged()));
- QToolTip::add( checkBeep, i18n( "The system will beep if this is enabled" ) );
+ connect(checkBeep, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
+ TQToolTip::add( checkBeep, i18n( "The system will beep if this is enabled" ) );
- checkNotify = new QCheckBox(i18n("&Notify"), this);
+ checkNotify = new TQCheckBox(i18n("&Notify"), this);
grid->addWidget(checkNotify, curRow++, 0);
- connect(checkNotify, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(checkNotify, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
int can_suspend = laptop_portable::has_suspend();
int can_standby = laptop_portable::has_standby();
@@ -163,43 +163,43 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
int can_brightness = laptop_portable::has_brightness();
if (can_brightness) {
- checkBrightness = new QCheckBox(i18n("Panel b&rightness"), this);
+ checkBrightness = new TQCheckBox(i18n("Panel b&rightness"), this);
checkBrightness->setMinimumSize(checkBrightness->sizeHint());
- QToolTip::add( checkBrightness, i18n( "If enabled the back panel brightness will change" ) );
+ TQToolTip::add( checkBrightness, i18n( "If enabled the back panel brightness will change" ) );
grid->addWidget(checkBrightness, curRow, 0);
- connect(checkBrightness, SIGNAL(toggled(bool)), this, SLOT(brightness_changed(bool)));
- QHBoxLayout *v = new QHBoxLayout();
- v->addWidget(new QLabel("-", this));
- valueBrightness = new QSlider(0, 255, 16, 160, Qt::Horizontal, this);
- QToolTip::add( valueBrightness, i18n( "How bright or dim to make the back panel" ) );
+ connect(checkBrightness, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(brightness_changed(bool)));
+ TQHBoxLayout *v = new TQHBoxLayout();
+ v->addWidget(new TQLabel("-", this));
+ valueBrightness = new TQSlider(0, 255, 16, 160, Qt::Horizontal, this);
+ TQToolTip::add( valueBrightness, i18n( "How bright or dim to make the back panel" ) );
valueBrightness->setMaximumWidth(70);
v->addWidget(valueBrightness);
- v->addWidget(new QLabel("+", this));
+ v->addWidget(new TQLabel("+", this));
v->addStretch(1);
grid->addLayout(v, curRow, 1);
valueBrightness->setEnabled(0);
- connect(valueBrightness, SIGNAL(valueChanged(int)), this, SLOT(configChanged()));
+ connect(valueBrightness, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(configChanged()));
++curRow;
} else {
checkBrightness = 0;
valueBrightness = 0;
}
- QStringList performance_list;
+ TQStringList performance_list;
int current_performance;
bool *active_list;
bool has_performance = laptop_portable::get_system_performance(0, current_performance, performance_list, active_list);
if (has_performance) {
- performance = new QCheckBox(i18n("System performance"), this);
- QToolTip::add( performance, i18n( "If enabled the laptop's power performance profile will change" ) );
+ performance = new TQCheckBox(i18n("System performance"), this);
+ TQToolTip::add( performance, i18n( "If enabled the laptop's power performance profile will change" ) );
grid->addWidget(performance, curRow, 0);
- connect (performance, SIGNAL(toggled(bool)), this, SLOT(performance_changed(bool)));
+ connect (performance, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(performance_changed(bool)));
- QHBoxLayout *v = new QHBoxLayout();
+ TQHBoxLayout *v = new TQHBoxLayout();
performance_val = new KComboBox(0, this);
performance_val->insertStringList(performance_list);
performance_val->setEnabled(0);
- connect (performance_val, SIGNAL(activated(int)), this, SLOT(configChanged()));
- QToolTip::add( performance_val, i18n( "The performance profile to change to" ) );
+ connect (performance_val, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
+ TQToolTip::add( performance_val, i18n( "The performance profile to change to" ) );
v->addWidget(performance_val);
v->addStretch(1);
grid->addLayout(v, curRow, 1);
@@ -208,21 +208,21 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
performance = 0;
performance_val = 0;
}
- QStringList throttle_list;
+ TQStringList throttle_list;
int current_throttle;
bool has_throttle = laptop_portable::get_system_throttling(0, current_throttle, throttle_list, active_list);
if (has_throttle) {
- throttle = new QCheckBox(i18n("CPU throttling"), this);
- QToolTip::add( throttle, i18n( "If enabled the CPU performance will be throttled" ) );
+ throttle = new TQCheckBox(i18n("CPU throttling"), this);
+ TQToolTip::add( throttle, i18n( "If enabled the CPU performance will be throttled" ) );
grid->addWidget(throttle, curRow, 0);
- connect (throttle, SIGNAL(toggled(bool)), this, SLOT(throttle_changed(bool)));
+ connect (throttle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(throttle_changed(bool)));
- QHBoxLayout *v = new QHBoxLayout();
+ TQHBoxLayout *v = new TQHBoxLayout();
throttle_val = new KComboBox(0, this);
throttle_val->insertStringList(throttle_list);
throttle_val->setEnabled(0);
- connect (throttle_val, SIGNAL(activated(int)), this, SLOT(configChanged()));
- QToolTip::add( throttle_val, i18n( "How much to throttle the CPU performance by" ) );
+ connect (throttle_val, TQT_SIGNAL(activated(int)), this, TQT_SLOT(configChanged()));
+ TQToolTip::add( throttle_val, i18n( "How much to throttle the CPU performance by" ) );
v->addWidget(throttle_val);
v->addStretch(1);
grid->addLayout(v, curRow, 1);
@@ -234,47 +234,47 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
- QVButtonGroup *b = new QVButtonGroup(i18n("System State Change"), this);
- QToolTip::add( b, i18n( "You may choose one of the following to occur when the battery gets low" ) );
+ TQVButtonGroup *b = new TQVButtonGroup(i18n("System State Change"), this);
+ TQToolTip::add( b, i18n( "You may choose one of the following to occur when the battery gets low" ) );
b->layout()->setSpacing( KDialog::spacingHint() );
if (can_standby) {
- checkStandby = new QRadioButton(i18n("Standb&y"), b);
- QToolTip::add( checkStandby, i18n( "Move the system into the standby state - a temporary lower power state" ) );
+ checkStandby = new TQRadioButton(i18n("Standb&y"), b);
+ TQToolTip::add( checkStandby, i18n( "Move the system into the standby state - a temporary lower power state" ) );
checkStandby->setMinimumSize(checkStandby->sizeHint());
- connect(checkStandby, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(checkStandby, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
}
if (can_suspend) {
- checkSuspend = new QRadioButton(i18n("&Suspend"), b);
- QToolTip::add( checkSuspend, i18n( "Move the system into the suspend state - also known as 'save-to-ram'" ) );
+ checkSuspend = new TQRadioButton(i18n("&Suspend"), b);
+ TQToolTip::add( checkSuspend, i18n( "Move the system into the suspend state - also known as 'save-to-ram'" ) );
checkSuspend->setMinimumSize(checkSuspend->sizeHint());
- connect(checkSuspend, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(checkSuspend, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
}
if (can_hibernate) {
- checkHibernate = new QRadioButton(i18n("H&ibernate"), b);
- QToolTip::add( checkHibernate, i18n( "Move the system into the hibernate state - also known as 'save-to-disk'" ) );
+ checkHibernate = new TQRadioButton(i18n("H&ibernate"), b);
+ TQToolTip::add( checkHibernate, i18n( "Move the system into the hibernate state - also known as 'save-to-disk'" ) );
checkHibernate->setMinimumSize(checkHibernate->sizeHint());
- connect(checkHibernate, SIGNAL(clicked()), this, SLOT(configChanged()));
+ connect(checkHibernate, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
}
// setup the logout option
- checkLogout = new QRadioButton(i18n("&Logout"), b);
- connect(checkLogout, SIGNAL(clicked()), this, SLOT(configChanged()));
+ checkLogout = new TQRadioButton(i18n("&Logout"), b);
+ connect(checkLogout, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
// setup the shutdown option
- checkShutdown = new QRadioButton(i18n("System power off"), b);
- QToolTip::add( checkShutdown, i18n( "Power the laptop off" ) );
- connect(checkShutdown, SIGNAL(clicked()), this, SLOT(configChanged()));
+ checkShutdown = new TQRadioButton(i18n("System power off"), b);
+ TQToolTip::add( checkShutdown, i18n( "Power the laptop off" ) );
+ connect(checkShutdown, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
- checkNone = new QRadioButton(i18n("&None"), b);
- connect(checkNone, SIGNAL(clicked()), this, SLOT(configChanged()));
+ checkNone = new TQRadioButton(i18n("&None"), b);
+ connect(checkNone, TQT_SIGNAL(clicked()), this, TQT_SLOT(configChanged()));
grid->addMultiCellWidget(b, curRow, curRow, 0, 1, Qt::AlignLeft|Qt::AlignTop);
curRow++;
- QLabel* explain;
+ TQLabel* explain;
if (type) {
- explain = new QLabel(i18n("This panel controls how and when you receive warnings that your battery power is going to run out VERY VERY soon."), this);
+ explain = new TQLabel(i18n("This panel controls how and when you receive warnings that your battery power is going to run out VERY VERY soon."), this);
} else {
- explain = new QLabel(i18n("This panel controls how and when you receive warnings that your battery power is about to run out"), this);
+ explain = new TQLabel(i18n("This panel controls how and when you receive warnings that your battery power is about to run out"), this);
}
explain->setAlignment( Qt::WordBreak );
grid->addMultiCellWidget(explain, curRow, curRow, 0, 1);
@@ -282,13 +282,13 @@ WarningConfig::WarningConfig (int t, QWidget * parent, const char *name)
if (!can_suspend && !can_standby && !can_hibernate) {
// display help text:
- QLabel* note = laptop_portable::how_to_do_suspend_resume(this);
+ TQLabel* note = laptop_portable::how_to_do_suspend_resume(this);
grid->addMultiCellWidget(note, curRow, curRow, 0, 1);
++curRow;
}
grid->setRowStretch(curRow++, 1);
- grid->addWidget(new QLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this),
+ grid->addWidget(new TQLabel( i18n("Version: %1").arg(LAPTOP_VERSION), this),
curRow, 1, Qt::AlignRight);
}
@@ -560,7 +560,7 @@ void WarningConfig::enablePlaySound(bool enable)
void WarningConfig::browseRunCommand()
{
- KURL url = KFileDialog::getOpenURL(QString::null, QString::null, this );
+ KURL url = KFileDialog::getOpenURL(TQString::null, TQString::null, this );
if( url.isEmpty() )
return;
@@ -577,7 +577,7 @@ void WarningConfig::browseRunCommand()
void WarningConfig::browsePlaySound()
{
- KURL url = KFileDialog::getOpenURL(QString::null, QString::null, this );
+ KURL url = KFileDialog::getOpenURL(TQString::null, TQString::null, this );
if( url.isEmpty() )
return;
@@ -593,7 +593,7 @@ void WarningConfig::browsePlaySound()
}
#endif
-QString WarningConfig::quickHelp() const
+TQString WarningConfig::quickHelp() const
{
return i18n("<h1>Low battery Warning</h1>This module allows you to "
"set an alarm in case your battery's charge is about to run out.");
diff --git a/klaptopdaemon/warning.h b/klaptopdaemon/warning.h
index 3eb1b04..cdab7ee 100644
--- a/klaptopdaemon/warning.h
+++ b/klaptopdaemon/warning.h
@@ -27,7 +27,7 @@
#define __WARNINGCONFIG_H__
#include <kcmodule.h>
-#include <qstring.h>
+#include <tqstring.h>
class QWidget;
class KConfig;
@@ -42,14 +42,14 @@ class WarningConfig : public KCModule
{
Q_OBJECT
public:
- WarningConfig(int x, QWidget *parent=0, const char* name=0);
+ WarningConfig(int x, TQWidget *parent=0, const char* name=0);
~WarningConfig();
void save( void );
void load();
void load(bool useDefaults);
void defaults();
- virtual QString quickHelp() const;
+ virtual TQString quickHelp() const;
private slots:
void configChanged();
@@ -68,36 +68,36 @@ private:
KURLRequester* editRunCommand;
KURLRequester* editPlaySound;
- QCheckBox* checkLowTime;
- QCheckBox* checkLowPercent;
- QCheckBox* checkCriticalTime;
- QCheckBox* checkCriticalPercent;
- QSpinBox* editLowTime;
- QSpinBox* editLowPercent;
- QSpinBox* editCriticalTime;
- QSpinBox* editCriticalPercent;
+ TQCheckBox* checkLowTime;
+ TQCheckBox* checkLowPercent;
+ TQCheckBox* checkCriticalTime;
+ TQCheckBox* checkCriticalPercent;
+ TQSpinBox* editLowTime;
+ TQSpinBox* editLowPercent;
+ TQSpinBox* editCriticalTime;
+ TQSpinBox* editCriticalPercent;
- QCheckBox *checkRunCommand;
- QCheckBox *checkPlaySound;
- QCheckBox *checkBeep;
- QCheckBox *checkNotify;
- QCheckBox *checkBrightness;
- QSlider *valueBrightness;
- QCheckBox *performance, *throttle;
+ TQCheckBox *checkRunCommand;
+ TQCheckBox *checkPlaySound;
+ TQCheckBox *checkBeep;
+ TQCheckBox *checkNotify;
+ TQCheckBox *checkBrightness;
+ TQSlider *valueBrightness;
+ TQCheckBox *performance, *throttle;
KComboBox *performance_val, *throttle_val;
- QRadioButton *checkNone;
- QRadioButton *checkShutdown;
- QRadioButton *checkLogout;
- QRadioButton *checkSuspend;
- QRadioButton *checkStandby;
- QRadioButton *checkHibernate;
+ TQRadioButton *checkNone;
+ TQRadioButton *checkShutdown;
+ TQRadioButton *checkLogout;
+ TQRadioButton *checkSuspend;
+ TQRadioButton *checkStandby;
+ TQRadioButton *checkHibernate;
bool apm, runcommand, playsound, beep, notify, do_suspend, do_standby, do_hibernate, logout, shutdown, do_brightness;
bool do_performance, do_throttle;
bool time_based_action_low, time_based_action_critical;
- QString val_performance, val_throttle;
+ TQString val_performance, val_throttle;
int val_brightness;
- QString runcommand_val, sound_val;
+ TQString runcommand_val, sound_val;
int low_val_time, low_val_percent, critical_val_time, critical_val_percent;
int have_time, type;
};
diff --git a/klaptopdaemon/xautolock.cc b/klaptopdaemon/xautolock.cc
index 4f856e1..630b175 100644
--- a/klaptopdaemon/xautolock.cc
+++ b/klaptopdaemon/xautolock.cc
@@ -165,7 +165,7 @@ void XAutoLock::setTrigger( time_t t )
//
// Process new windows and check the mouse.
//
-void XAutoLock::timerEvent(QTimerEvent *ev)
+void XAutoLock::timerEvent(TQTimerEvent *ev)
{
if (ev->timerId() != mTimerId)
{
@@ -246,14 +246,14 @@ bool XAutoLock::x11Event( XEvent* ev )
// don't futher process key events that were received only because XAutoLock wants them
if( ev->type == KeyPress && !ev->xkey.send_event
&& !xautolock_useXidle && !xautolock_useMit
- && !QWidget::find( ev->xkey.window ))
+ && !TQWidget::find( ev->xkey.window ))
return true;
return false;
}
bool XAutoLock::ignoreWindow( WId w )
{
- if( w != qt_xrootwin() && QWidget::find( w ))
+ if( w != qt_xrootwin() && TQWidget::find( w ))
return true;
return false;
}
diff --git a/klaptopdaemon/xautolock.h b/klaptopdaemon/xautolock.h
index aa618f2..35b5320 100644
--- a/klaptopdaemon/xautolock.h
+++ b/klaptopdaemon/xautolock.h
@@ -8,7 +8,7 @@
#ifndef __XAUTOLOCK_H__
#define __XAUTOLOCK_H__
-#include <qwidget.h>
+#include <tqwidget.h>
#include <X11/Xlib.h>
@@ -62,7 +62,7 @@ signals:
void timeout();
protected:
- virtual void timerEvent(QTimerEvent *ev);
+ virtual void timerEvent(TQTimerEvent *ev);
virtual bool x11Event( XEvent* );
protected: