summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-16 23:01:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-04-16 23:01:29 +0000
commit4304e8d9dab8e20513e38e71b0debdf6937b630c (patch)
tree76a86f013a811449a5b5bfbbbb962e7db0bbcc6a /src
parentba24506b3bb46312d998468ad3c1a7f28058b2bd (diff)
downloadtdepowersave-4304e8d9dab8e20513e38e71b0debdf6937b630c.tar.gz
tdepowersave-4304e8d9dab8e20513e38e71b0debdf6937b630c.zip
Finish TQt4 port of kpowersave
This enables both Qt3 and Qt4 builds git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kpowersave@1228282 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am4
-rw-r--r--src/autodimm.cpp6
-rw-r--r--src/autodimm.h7
-rw-r--r--src/autosuspend.h1
-rw-r--r--src/blacklistedit_Dialog.ui48
-rw-r--r--src/blacklisteditdialog.cpp54
-rw-r--r--src/blacklisteditdialog.h17
-rw-r--r--src/configure.in.in2
-rw-r--r--src/configure_Dialog.ui332
-rw-r--r--src/configuredialog.cpp356
-rw-r--r--src/configuredialog.h43
-rw-r--r--src/countdown_Dialog.ui34
-rw-r--r--src/countdowndialog.cpp40
-rw-r--r--src/countdowndialog.h9
-rw-r--r--src/dbusHAL.cpp113
-rw-r--r--src/dbusHAL.h59
-rw-r--r--src/detailed_Dialog.ui120
-rw-r--r--src/detaileddialog.cpp96
-rw-r--r--src/detaileddialog.h23
-rw-r--r--src/dummy.cpp44
-rw-r--r--src/hardware.cpp136
-rw-r--r--src/hardware.h47
-rw-r--r--src/hardware_battery.cpp50
-rw-r--r--src/hardware_battery.h41
-rw-r--r--src/hardware_batteryCollection.cpp10
-rw-r--r--src/hardware_batteryCollection.h19
-rw-r--r--src/hardware_cpu.cpp50
-rw-r--r--src/hardware_cpu.h15
-rw-r--r--src/inactivity.cpp34
-rw-r--r--src/inactivity.h31
-rw-r--r--src/info_Dialog.ui42
-rw-r--r--src/infodialog.cpp28
-rw-r--r--src/infodialog.h11
-rw-r--r--src/kpowersave.cpp456
-rw-r--r--src/kpowersave.h83
-rw-r--r--src/kpowersave_debug.h6
-rw-r--r--src/log_viewer.ui24
-rw-r--r--src/logviewer.cpp36
-rw-r--r--src/logviewer.h5
-rw-r--r--src/pics/cr22-action-processor.pngbin1032 -> 1031 bytes
-rw-r--r--src/screen.cpp72
-rw-r--r--src/screen.h37
-rw-r--r--src/settings.cpp26
-rw-r--r--src/settings.h48
-rw-r--r--src/suspend_Dialog.ui26
-rw-r--r--src/suspenddialog.cpp26
-rw-r--r--src/suspenddialog.h7
47 files changed, 1396 insertions, 1378 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 9e85c65..091b8e6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -27,7 +27,7 @@ noinst_HEADERS = \
suspenddialog.h
-# let automoc handle all of the meta source files (moc)
+# let autotqmoc handle all of the meta source files (tqmoc)
METASOURCES = AUTO
KDE_ICON = kpowersave
@@ -93,7 +93,7 @@ shellrc_DATA = eventsrc
SUBDIRS = pics
messages:
$(EXTRACTRC) *ui eventsrc >> rc.cpp
- $(XGETTEXT) `find . -name \*.h -o -name \*.H -o -name \*.cpp -o -name \*.C` -o $(podir)/kpowersave.pot
+ $(XGETTEXT) `tqfind . -name \*.h -o -name \*.H -o -name \*.cpp -o -name \*.C` -o $(podir)/kpowersave.pot
rm -f rc.cpp
install-data-local:
diff --git a/src/autodimm.cpp b/src/autodimm.cpp
index 03dc0bc..4e2967f 100644
--- a/src/autodimm.cpp
+++ b/src/autodimm.cpp
@@ -32,8 +32,8 @@ autodimm::autodimm() : inactivity() {
lastIdleTime = 0;
- checkActivity = new QTimer( this );
- connect( checkActivity, SIGNAL(timeout()), this, SLOT(pollActivity()));
+ checkActivity = new TQTimer( this );
+ connect( checkActivity, TQT_SIGNAL(timeout()), this, TQT_SLOT(pollActivity()));
kdDebugFuncOut(trace);
}
@@ -61,7 +61,7 @@ void autodimm::startCheckForActivity() {
}
/*!
- * \b SLOT to call check if the user is active again.
+ * \b TQT_SLOT to call check if the user is active again.
*/
void autodimm::pollActivity() {
kdDebugFuncIn(trace);
diff --git a/src/autodimm.h b/src/autodimm.h
index ace1e08..161c776 100644
--- a/src/autodimm.h
+++ b/src/autodimm.h
@@ -38,6 +38,7 @@
class autodimm : public inactivity
{
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
@@ -56,19 +57,19 @@ private:
//! idle time from the last check
unsigned long lastIdleTime;
- //! QTimer intervall for the Timer to recheck for user activity
+ //! TQTimer intervall for the Timer to recheck for user activity
/*!
* The time intervall to recheck for the activity of the user.
* The timeslice is currently 1 sec.
*/
static const int RECHECK_INTERVALL = 1000;
- //! QTimer for check activity
+ //! TQTimer for check activity
/*!
* This timer is used to check if the user get active again.
* The timerinterval is defined trough \ref RECHECK_INTERVALL .
*/
- QTimer *checkActivity;
+ TQTimer *checkActivity;
private slots:
//! to poll X to get info if the user is active again
diff --git a/src/autosuspend.h b/src/autosuspend.h
index e537f34..4669df5 100644
--- a/src/autosuspend.h
+++ b/src/autosuspend.h
@@ -37,6 +37,7 @@
class autosuspend : public inactivity
{
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
diff --git a/src/blacklistedit_Dialog.ui b/src/blacklistedit_Dialog.ui
index 5a91bfc..18c9ce0 100644
--- a/src/blacklistedit_Dialog.ui
+++ b/src/blacklistedit_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>blacklistedit_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>blacklistedit_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -22,15 +22,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -47,7 +47,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="0" column="3">
+ <widget class="TQPushButton" row="0" column="3">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -79,7 +79,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>305</width>
<height>20</height>
@@ -88,7 +88,7 @@
</spacer>
</grid>
</widget>
- <widget class="QButtonGroup" row="0" column="0">
+ <widget class="TQButtonGroup" row="0" column="0">
<property name="name">
<cstring>bG_scheme</cstring>
</property>
@@ -107,12 +107,12 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLineEdit" row="0" column="0">
+ <widget class="TQLineEdit" row="0" column="0">
<property name="name">
<cstring>lE_blacklist</cstring>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="0" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_add</cstring>
</property>
@@ -120,7 +120,7 @@
<string>Add</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_remove</cstring>
</property>
@@ -131,7 +131,7 @@
<string></string>
</property>
</widget>
- <widget class="QListBox" row="0" column="3" rowspan="3" colspan="1">
+ <widget class="TQListBox" row="0" column="3" rowspan="3" colspan="1">
<property name="name">
<cstring>lB_blacklist</cstring>
</property>
@@ -143,7 +143,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>150</height>
@@ -160,7 +160,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>20</height>
@@ -177,14 +177,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>140</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>tLabel_info</cstring>
</property>
@@ -196,7 +196,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>220</width>
<height>110</height>
@@ -205,7 +205,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignBottom</set>
</property>
</widget>
@@ -246,7 +246,7 @@
</connection>
<connection>
<sender>lB_blacklist</sender>
- <signal>currentChanged(QListBoxItem*)</signal>
+ <signal>currentChanged(TQListBoxItem*)</signal>
<receiver>blacklistedit_Dialog</receiver>
<slot>lB_blacklist_currentChanged()</slot>
</connection>
@@ -259,17 +259,17 @@
<tabstop>pB_remove</tabstop>
<tabstop>lB_blacklist</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>buttonOk_released()</slot>
<slot>buttonCancel_released()</slot>
<slot>buttonApply_released()</slot>
<slot>pB_remove_released()</slot>
<slot>pB_add_released()</slot>
- <slot>lB_blacklist_selected( QListBoxItem * )</slot>
+ <slot>lB_blacklist_selected( TQListBoxItem * )</slot>
<slot>lE_blacklist_textChanged()</slot>
<slot>lB_blacklist_selected()</slot>
- <slot>lB_blacklist_currentChanged(QListBoxItem*)</slot>
+ <slot>lB_blacklist_currentChanged(TQListBoxItem*)</slot>
<slot>lB_blacklist_currentChanged()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/blacklisteditdialog.cpp b/src/blacklisteditdialog.cpp
index fb2ce80..02eda50 100644
--- a/src/blacklisteditdialog.cpp
+++ b/src/blacklisteditdialog.cpp
@@ -32,20 +32,20 @@
#include <kiconloader.h>
// QT headers:
-#include <qbuttongroup.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtooltip.h>
+#include <tqbuttongroup.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtooltip.h>
/*! This is the default constructor of class blacklistEditDialog . */
-blacklistEditDialog::blacklistEditDialog( QStringList blacklisted, QString captionName,
- bool initImport, QWidget *parent, const char *name)
- :blacklistedit_Dialog(parent, name, false, WDestructiveClose )
+blacklistEditDialog::blacklistEditDialog( TQStringList blacklisted, TQString captionName,
+ bool initImport, TQWidget *tqparent, const char *name)
+ :blacklistedit_Dialog(tqparent, name, false, WDestructiveClose )
{
blacklist = blacklisted;
@@ -61,22 +61,22 @@ blacklistEditDialog::blacklistEditDialog( QStringList blacklisted, QString capti
this->bG_scheme->setTitle(captionName);
else
this->bG_scheme->setTitle( i18n("Scheme: ") + captionName);
- this->setIcon(SmallIcon("configure", QIconSet::Automatic));
- buttonCancel->setIconSet(SmallIconSet("cancel", QIconSet::Automatic));
- buttonOk->setIconSet(SmallIconSet("ok", QIconSet::Automatic));
- pB_add->setIconSet(SmallIconSet("forward", QIconSet::Automatic));
- pB_remove->setIconSet(SmallIconSet("back", QIconSet::Automatic));
+ this->setIcon(SmallIcon("configure", TQIconSet::Automatic));
+ buttonCancel->setIconSet(SmallIconSet("cancel", TQIconSet::Automatic));
+ buttonOk->setIconSet(SmallIconSet("ok", TQIconSet::Automatic));
+ pB_add->setIconSet(SmallIconSet("forward", TQIconSet::Automatic));
+ pB_remove->setIconSet(SmallIconSet("back", TQIconSet::Automatic));
}
/*! This is the default destructor of class blacklistEditDialog . */
blacklistEditDialog::~blacklistEditDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*!
- * SLOT: called if the 'ok' button clicked. This SLOT emit
+ * SLOT: called if the 'ok' button clicked. This TQT_SLOT emit
* \ref config_finished() and close the dialog.
*/
void blacklistEditDialog::buttonOk_released() {
@@ -90,7 +90,7 @@ void blacklistEditDialog::buttonOk_released() {
/*!
- * SLOT: called if the 'cancel' button clicked. This SLOT close
+ * SLOT: called if the 'cancel' button clicked. This TQT_SLOT close
* the dialog.
*/
void blacklistEditDialog::buttonCancel_released(){
@@ -100,8 +100,8 @@ void blacklistEditDialog::buttonCancel_released(){
/*!
- * SLOT: called if the 'remove' button clicked. The SLOT try to remove
- * the selected item from the QListBox and the QStringList \ref blacklist .
+ * SLOT: called if the 'remove' button clicked. The TQT_SLOT try to remove
+ * the selected item from the TQListBox and the TQStringList \ref blacklist .
*/
void blacklistEditDialog::pB_remove_released(){
@@ -120,16 +120,16 @@ void blacklistEditDialog::pB_remove_released(){
/*!
- * SLOT: called if the 'add' button clicked. The SLOT try to add the string from
- * the QLineEdit lE_blacklist to the QListBox and the QStringList \ref blacklist .
+ * SLOT: called if the 'add' button clicked. The TQT_SLOT try to add the string from
+ * the TQLineEdit lE_blacklist to the TQListBox and the TQStringList \ref blacklist .
*/
void blacklistEditDialog::pB_add_released(){
- QString text = lE_blacklist->text();
+ TQString text = lE_blacklist->text();
// remove the whitespaces and check if text is empty
if(text.stripWhiteSpace() != "") {
// check if the entry is already present
- if(!lB_blacklist->findItem(text, Qt::ExactMatch)) {
+ if(!lB_blacklist->tqfindItem(text, TQt::ExactMatch)) {
lB_blacklist->insertItem(text);
lB_blacklist->sort();
blacklist.append(text);
@@ -151,7 +151,7 @@ void blacklistEditDialog::pB_add_released(){
/*!
- * SLOT: called if a item in the QListBox lB_blacklist is selected.
+ * SLOT: called if a item in the TQListBox lB_blacklist is selected.
* Here we enable the remove button pB_remove .
*/
void blacklistEditDialog::lB_blacklist_currentChanged(){
diff --git a/src/blacklisteditdialog.h b/src/blacklisteditdialog.h
index adbf559..57b2d4b 100644
--- a/src/blacklisteditdialog.h
+++ b/src/blacklisteditdialog.h
@@ -37,23 +37,24 @@
class blacklistEditDialog: public blacklistedit_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- blacklistEditDialog(QStringList blacklisted, QString captionName, bool initImport = false,
- QWidget *parent = 0, const char *name = 0);
+ blacklistEditDialog(TQStringList blacklisted, TQString captionName, bool initImport = false,
+ TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~blacklistEditDialog();
private:
- //! QStringList with the blacklisted processes
+ //! TQStringList with the blacklisted processes
/*!
- * This QStringList contains the given blacklisted processes
+ * This TQStringList contains the given blacklisted processes
* for edit. If the dialog changed, we change also this list.
*/
- QStringList blacklist;
+ TQStringList blacklist;
//! to tell if the blacklist was changed
/*!
@@ -76,7 +77,7 @@ private slots:
void pB_add_released();
//! called if a item of the listbox selected
void lB_blacklist_currentChanged();
- //! called if something input in the QLineEdit
+ //! called if something input in the TQLineEdit
void lE_blacklist_textChanged();
signals:
@@ -85,9 +86,9 @@ signals:
/*!
* This signal is emited if the configuration is finished
* and the blacklist was modified-
- * \return QStringList (the modified blacklist)
+ * \return TQStringList (the modified blacklist)
*/
- void config_finished( QStringList );
+ void config_finished( TQStringList );
};
diff --git a/src/configure.in.in b/src/configure.in.in
index 796c968..8beae17 100644
--- a/src/configure.in.in
+++ b/src/configure.in.in
@@ -5,5 +5,5 @@ AC_C_BIGENDIAN
AC_CHECK_KDEMAXPATHLEN
AC_PATH_QT
-AC_PATH_QT_MOC_UIC
+AC_PATH_QT_TQMOC_UIC
diff --git a/src/configure_Dialog.ui b/src/configure_Dialog.ui
index 0578501..9ba9cf1 100644
--- a/src/configure_Dialog.ui
+++ b/src/configure_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>configure_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>configure_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -30,15 +30,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="0" column="3">
+ <widget class="TQPushButton" row="0" column="3">
<property name="name">
<cstring>buttonApply</cstring>
</property>
@@ -52,7 +52,7 @@
<string></string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="0">
+ <widget class="TQPushButton" row="0" column="0">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -69,7 +69,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton" row="0" column="4">
+ <widget class="TQPushButton" row="0" column="4">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -101,14 +101,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>250</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="0" column="2">
+ <widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -127,7 +127,7 @@
</widget>
</grid>
</widget>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>tabWidget</cstring>
</property>
@@ -139,7 +139,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>screen_settings</cstring>
</property>
@@ -150,7 +150,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QToolBox" row="0" column="1">
+ <widget class="TQToolBox" row="0" column="1">
<property name="name">
<cstring>tB_scheme</cstring>
</property>
@@ -174,7 +174,7 @@
<property name="currentIndex">
<number>3</number>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>screensaver</cstring>
</property>
@@ -188,7 +188,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="4">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>cB_SpecificPM</cstring>
</property>
@@ -199,7 +199,7 @@
<string>Enable specific display power management</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="1">
+ <widget class="TQLabel" row="4" column="1">
<property name="name">
<cstring>tL_standbyAfter</cstring>
</property>
@@ -223,14 +223,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="2" column="1" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="2" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_blankScreen</cstring>
</property>
@@ -241,7 +241,7 @@
<string>Only blank the screen</string>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="1" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_disable_Ss</cstring>
</property>
@@ -252,7 +252,7 @@
<string>Disable screen saver</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>cB_specificSettings</cstring>
</property>
@@ -260,7 +260,7 @@
<string>Enable specific screensaver settings</string>
</property>
</widget>
- <widget class="QLabel" row="5" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="5" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>tL_suspendAfter</cstring>
</property>
@@ -284,14 +284,14 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>160</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="6" column="1" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="6" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>tL_powerOffAfter</cstring>
</property>
@@ -305,7 +305,7 @@
<cstring>sB_powerOff</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="7" column="1" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="7" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_disablePM</cstring>
</property>
@@ -316,7 +316,7 @@
<string>Disable display power management</string>
</property>
</widget>
- <widget class="QSpinBox" row="6" column="3">
+ <widget class="TQSpinBox" row="6" column="3">
<property name="name">
<cstring>sB_powerOff</cstring>
</property>
@@ -330,7 +330,7 @@
<number>120</number>
</property>
</widget>
- <widget class="QSpinBox" row="5" column="3">
+ <widget class="TQSpinBox" row="5" column="3">
<property name="name">
<cstring>sB_suspend</cstring>
</property>
@@ -344,7 +344,7 @@
<number>120</number>
</property>
</widget>
- <widget class="QSpinBox" row="4" column="3">
+ <widget class="TQSpinBox" row="4" column="3">
<property name="name">
<cstring>sB_standby</cstring>
</property>
@@ -360,7 +360,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>brightness</cstring>
</property>
@@ -374,7 +374,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>gB_Brightness</cstring>
</property>
@@ -398,14 +398,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="1" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="1" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_resetBrightness</cstring>
</property>
@@ -416,7 +416,7 @@
<string>Reset</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>tL_valueBrightness</cstring>
</property>
@@ -428,7 +428,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>40</width>
<height>30</height>
@@ -448,7 +448,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>231</width>
<height>31</height>
@@ -465,14 +465,14 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QSlider" row="0" column="0">
+ <widget class="TQSlider" row="0" column="0">
<property name="name">
<cstring>brightnessSlider</cstring>
</property>
@@ -506,7 +506,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="1" column="0">
+ <widget class="TQCheckBox" row="1" column="0">
<property name="name">
<cstring>cB_Brightness</cstring>
</property>
@@ -517,11 +517,11 @@
<string></string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>tL_brightness</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>50</height>
@@ -530,13 +530,13 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>autosuspend</cstring>
</property>
@@ -550,7 +550,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>cB_autoSuspend</cstring>
</property>
@@ -558,7 +558,7 @@
<string>Enable autosuspend</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<property name="name">
<cstring>cB_autoInactivity</cstring>
</property>
@@ -573,13 +573,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>100</width>
<height>20</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>20</height>
@@ -608,7 +608,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_Blacklist</cstring>
</property>
@@ -619,7 +619,7 @@
<string>Enable scheme-specific blacklist</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="2">
+ <widget class="TQLabel" row="2" column="2">
<property name="name">
<cstring>tL_autoInactivity_After</cstring>
</property>
@@ -637,14 +637,14 @@
<property name="text">
<string>after:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
<property name="buddy" stdset="0">
<cstring>sB_autoInactivity</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="3">
+ <widget class="TQSpinBox" row="2" column="3">
<property name="name">
<cstring>sB_autoInactivity</cstring>
</property>
@@ -663,7 +663,7 @@
<string> min</string>
</property>
</widget>
- <widget class="QPushButton" row="5" column="2" rowspan="1" colspan="2">
+ <widget class="TQPushButton" row="5" column="2" rowspan="1" colspan="2">
<property name="name">
<cstring>pB_editBlacklist</cstring>
</property>
@@ -684,7 +684,7 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>21</width>
<height>50</height>
@@ -701,14 +701,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>tL_autoInactivity_explain</cstring>
</property>
@@ -732,7 +732,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>page</cstring>
</property>
@@ -746,7 +746,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>cB_autoDimm</cstring>
</property>
@@ -776,7 +776,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QCheckBox" row="4" column="1" rowspan="1" colspan="5">
+ <widget class="TQCheckBox" row="4" column="1" rowspan="1" colspan="5">
<property name="name">
<cstring>cB_BlacklistDimm</cstring>
</property>
@@ -787,7 +787,7 @@
<string>Enable scheme-specific blacklist</string>
</property>
</widget>
- <widget class="QPushButton" row="5" column="3" rowspan="1" colspan="3">
+ <widget class="TQPushButton" row="5" column="3" rowspan="1" colspan="3">
<property name="name">
<cstring>pB_editBlacklistDimm</cstring>
</property>
@@ -798,7 +798,7 @@
<string>Edit Blacklist...</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="6">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="6">
<property name="name">
<cstring>tL_autoDimmExplain</cstring>
</property>
@@ -813,7 +813,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -836,14 +836,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="1">
+ <widget class="TQLabel" row="2" column="1">
<property name="name">
<cstring>tL_autoDimmAfter</cstring>
</property>
@@ -861,14 +861,14 @@
<property name="text">
<string>after:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignCenter</set>
</property>
<property name="buddy" stdset="0">
<cstring>sB_autoInactivity</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="5">
+ <widget class="TQSpinBox" row="2" column="5">
<property name="name">
<cstring>sB_autoDimmTo</cstring>
</property>
@@ -890,7 +890,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QLabel" row="2" column="3" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="2" column="3" rowspan="1" colspan="2">
<property name="name">
<cstring>tL_autoDimmTo</cstring>
</property>
@@ -919,14 +919,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QSpinBox" row="2" column="2">
+ <widget class="TQSpinBox" row="2" column="2">
<property name="name">
<cstring>sB_autoDimmTime</cstring>
</property>
@@ -941,7 +941,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>20</height>
@@ -953,7 +953,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>cpufreq</cstring>
</property>
@@ -967,7 +967,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox" row="0" column="2">
+ <widget class="TQComboBox" row="0" column="2">
<item>
<property name="text">
<string>Performance</string>
@@ -997,14 +997,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>170</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -1025,7 +1025,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -1034,7 +1034,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>misc</cstring>
</property>
@@ -1048,7 +1048,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>cB_disableNotifications</cstring>
</property>
@@ -1066,7 +1066,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>170</height>
@@ -1076,15 +1076,15 @@
</grid>
</widget>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>pB_deleteScheme</cstring>
</property>
@@ -1092,7 +1092,7 @@
<string>Delete</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>pB_newScheme</cstring>
</property>
@@ -1100,7 +1100,7 @@
<string>New</string>
</property>
</widget>
- <widget class="QListBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQListBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>listBox_schemes</cstring>
</property>
@@ -1112,7 +1112,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>110</width>
<height>0</height>
@@ -1123,7 +1123,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>TabPage</cstring>
</property>
@@ -1134,14 +1134,14 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QToolBox" row="0" column="0">
+ <widget class="TQToolBox" row="0" column="0">
<property name="name">
<cstring>tB_general</cstring>
</property>
<property name="currentIndex">
<number>4</number>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>g_bat</cstring>
</property>
@@ -1155,7 +1155,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="7">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="7">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -1167,7 +1167,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>75</width>
<height>0</height>
@@ -1179,15 +1179,15 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -1200,11 +1200,11 @@
<cstring>sB_batWarning</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1_2_2</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -1217,11 +1217,11 @@
<cstring>sB_batLow</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel1_2_3</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -1244,14 +1244,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>50</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="1" column="4">
+ <widget class="TQLabel" row="1" column="4">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -1262,7 +1262,7 @@
<cstring>cB_batWarning</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="4">
+ <widget class="TQLabel" row="2" column="4">
<property name="name">
<cstring>textLabel3_2</cstring>
</property>
@@ -1273,7 +1273,7 @@
<cstring>cB_batLow</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="4">
+ <widget class="TQLabel" row="3" column="4">
<property name="name">
<cstring>textLabel3_3</cstring>
</property>
@@ -1284,40 +1284,40 @@
<cstring>cB_batCritical</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="5">
+ <widget class="TQComboBox" row="1" column="5">
<property name="name">
<cstring>cB_batWarning</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QComboBox" row="2" column="5">
+ <widget class="TQComboBox" row="2" column="5">
<property name="name">
<cstring>cB_batLow</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QComboBox" row="3" column="5">
+ <widget class="TQComboBox" row="3" column="5">
<property name="name">
<cstring>cB_batCritical</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="6">
+ <widget class="TQSpinBox" row="2" column="6">
<property name="name">
<cstring>sB_batLowAction_value</cstring>
</property>
@@ -1336,7 +1336,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QSpinBox" row="3" column="6">
+ <widget class="TQSpinBox" row="3" column="6">
<property name="name">
<cstring>sB_batCritAction_value</cstring>
</property>
@@ -1355,7 +1355,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="2">
+ <widget class="TQSpinBox" row="1" column="2">
<property name="name">
<cstring>sB_batWarning</cstring>
</property>
@@ -1374,7 +1374,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QSpinBox" row="2" column="2">
+ <widget class="TQSpinBox" row="2" column="2">
<property name="name">
<cstring>sB_batLow</cstring>
</property>
@@ -1393,7 +1393,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QSpinBox" row="3" column="2">
+ <widget class="TQSpinBox" row="3" column="2">
<property name="name">
<cstring>sB_batCritical</cstring>
</property>
@@ -1412,7 +1412,7 @@
<number>100</number>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="6">
+ <widget class="TQSpinBox" row="1" column="6">
<property name="name">
<cstring>sB_batWarnAction_value</cstring>
</property>
@@ -1433,7 +1433,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>g_button</cstring>
</property>
@@ -1447,7 +1447,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>textLabel1_3_2</cstring>
</property>
@@ -1459,7 +1459,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>30</height>
@@ -1471,11 +1471,11 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel3_4_4</cstring>
</property>
@@ -1486,7 +1486,7 @@
<cstring>cB_S2DiskButton</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel3_4_3</cstring>
</property>
@@ -1497,7 +1497,7 @@
<cstring>cB_SleepButton</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel3_4_2</cstring>
</property>
@@ -1508,7 +1508,7 @@
<cstring>cB_LidcloseButton</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel3_4</cstring>
</property>
@@ -1529,7 +1529,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
@@ -1546,7 +1546,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
@@ -1563,7 +1563,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
@@ -1580,51 +1580,51 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>130</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QComboBox" row="3" column="2">
+ <widget class="TQComboBox" row="3" column="2">
<property name="name">
<cstring>cB_SleepButton</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QComboBox" row="2" column="2">
+ <widget class="TQComboBox" row="2" column="2">
<property name="name">
<cstring>cB_LidcloseButton</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QComboBox" row="1" column="2">
+ <widget class="TQComboBox" row="1" column="2">
<property name="name">
<cstring>cB_PowerButton</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>160</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QComboBox" row="4" column="2">
+ <widget class="TQComboBox" row="4" column="2">
<property name="name">
<cstring>cB_S2DiskButton</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>160</width>
<height>0</height>
@@ -1641,7 +1641,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -1650,7 +1650,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>g_schemes</cstring>
</property>
@@ -1664,7 +1664,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -1676,7 +1676,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -1688,11 +1688,11 @@
<property name="textFormat">
<enum>RichText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel2_2_2</cstring>
</property>
@@ -1703,11 +1703,11 @@
<cstring>cB_batteryScheme</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="2">
+ <widget class="TQComboBox" row="1" column="2">
<property name="name">
<cstring>cB_acScheme</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>175</width>
<height>0</height>
@@ -1724,7 +1724,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>110</width>
<height>20</height>
@@ -1741,25 +1741,25 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>110</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QComboBox" row="2" column="2">
+ <widget class="TQComboBox" row="2" column="2">
<property name="name">
<cstring>cB_batteryScheme</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>175</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -1780,7 +1780,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>75</height>
@@ -1789,7 +1789,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>g_lock</cstring>
</property>
@@ -1803,7 +1803,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_lockSuspend</cstring>
</property>
@@ -1811,7 +1811,7 @@
<string>Lock screen before suspend or standby</string>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<property name="name">
<cstring>comboB_lock</cstring>
</property>
@@ -1829,14 +1829,14 @@
<property name="sizeType">
<enum>Preferred</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>163</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>tL_lockWith</cstring>
</property>
@@ -1847,7 +1847,7 @@
<cstring>comboB_lock</cstring>
</property>
</widget>
- <widget class="QCheckBox" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>cB_lockLid</cstring>
</property>
@@ -1865,7 +1865,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>110</height>
@@ -1874,7 +1874,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>g_misc</cstring>
</property>
@@ -1888,7 +1888,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>groupBox_notify</cstring>
</property>
@@ -1907,7 +1907,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>pB_configNotify</cstring>
</property>
@@ -1925,7 +1925,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>21</height>
@@ -1942,7 +1942,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>21</height>
@@ -1951,7 +1951,7 @@
</spacer>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>groupBox7</cstring>
</property>
@@ -1962,7 +1962,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="1" column="1">
+ <widget class="TQCheckBox" row="1" column="1">
<property name="name">
<cstring>cB_autostart_neverAsk</cstring>
</property>
@@ -1970,7 +1970,7 @@
<string>Never ask me again on exit</string>
</property>
</widget>
- <widget class="QCheckBox" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>cB_autostart</cstring>
</property>
@@ -1988,7 +1988,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>20</height>
@@ -1997,7 +1997,7 @@
</spacer>
</grid>
</widget>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox7_2</cstring>
</property>
@@ -2016,7 +2016,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>pB_editAutosuspendGBlacklist</cstring>
</property>
@@ -2034,7 +2034,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>21</height>
@@ -2051,14 +2051,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>pB_editAutodimmGBlacklist</cstring>
</property>
@@ -2530,7 +2530,7 @@
<tabstop>cB_autostart_neverAsk</tabstop>
<tabstop>buttonHelp</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>buttonApply_clicked()</slot>
<slot>cB_specificSettings_toggled( bool )</slot>
<slot>cB_SpecificPM_toggled( bool )</slot>
@@ -2597,6 +2597,6 @@
<slot>pB_editAutosuspendGBlacklist_clicked()</slot>
<slot>pB_editAutodimmGBlacklist_clicked()</slot>
<slot>sB_autoDimmTime_valueChanged( int )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/configuredialog.cpp b/src/configuredialog.cpp
index a0e45ae..3c0387b 100644
--- a/src/configuredialog.cpp
+++ b/src/configuredialog.cpp
@@ -35,28 +35,28 @@
#include <kaccelmanager.h>
// QT - Headers
- #include <qcheckbox.h>
- #include <qcombobox.h>
- #include <qdialog.h>
- #include <qgroupbox.h>
- #include <qlabel.h>
- #include <qlineedit.h>
- #include <qlistbox.h>
- #include <qpushbutton.h>
- #include <qslider.h>
- #include <qspinbox.h>
- #include <qstringlist.h>
- #include <qtabwidget.h>
- #include <qtoolbox.h>
- #include <qtooltip.h>
- #include <qstring.h>
+ #include <tqcheckbox.h>
+ #include <tqcombobox.h>
+ #include <tqdialog.h>
+ #include <tqgroupbox.h>
+ #include <tqlabel.h>
+ #include <tqlineedit.h>
+ #include <tqlistbox.h>
+ #include <tqpushbutton.h>
+ #include <tqslider.h>
+ #include <tqspinbox.h>
+ #include <tqstringlist.h>
+ #include <tqtabwidget.h>
+ #include <tqtoolbox.h>
+ #include <tqtooltip.h>
+ #include <tqstring.h>
#include "configuredialog.h"
/*! This is the default constructor of the class ConfigureDialog. */
ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Settings *_settings,
- QWidget *parent, const char *name)
- :configure_Dialog(parent, name, false, WDestructiveClose )
+ TQWidget *tqparent, const char *name)
+ :configure_Dialog(tqparent, name, false, WDestructiveClose )
{
kdDebugFuncIn(trace);
@@ -65,7 +65,7 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
hwinfo = _hwinfo;
suspend = hwinfo->getSuspendSupport();
- QString session = getenv("DESKTOP_SESSION");
+ TQString session = getenv("DESKTOP_SESSION");
if(session.startsWith("gnome")) gnome_session = true;
else gnome_session = false;
@@ -103,10 +103,10 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
setInactivityBox();
selectScheme(settings->currentScheme);
- tL_valueBrightness->setFrameStyle(QFrame::Panel | QFrame::Sunken);
- tL_valueBrightness->setBackgroundMode(Qt::PaletteBase);
- tL_valueBrightness->setAlignment(Qt::AlignCenter);
- tL_valueBrightness->setFocusPolicy(NoFocus);
+ tL_valueBrightness->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
+ tL_valueBrightness->setBackgroundMode(TQt::PaletteBase);
+ tL_valueBrightness->tqsetAlignment(TQt::AlignCenter);
+ tL_valueBrightness->setFocusPolicy(TQ_NoFocus);
// hide Lid item if this is not a laptop
if (!hwinfo->isLaptop())
@@ -129,13 +129,13 @@ ConfigureDialog::ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Setti
/*! This is the default destructor of the class ConfigureDialog. */
ConfigureDialog::~ConfigureDialog(){
kdDebugFuncIn(trace);
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/* ---- START General setup SECTION ---- */
/*!
- * This used to fill the QListBox listBox_schemes and the scheme related QComboBoxes
+ * This used to fill the TQListBox listBox_schemes and the scheme related TQComboBoxes
* with the existing schemes.
*/
void ConfigureDialog::setSchemeList(){
@@ -145,30 +145,30 @@ void ConfigureDialog::setSchemeList(){
cB_acScheme->clear();
cB_batteryScheme->clear();
- for ( QStringList::Iterator it = schemes.begin(); it != schemes.end(); ++it ) {
+ for ( TQStringList::Iterator it = schemes.begin(); it != schemes.end(); ++it ) {
const char *_tmp = (*it).ascii();
if(_tmp == "Performance" || _tmp == i18n("Performance")) {
- listBox_schemes->insertItem(SmallIcon("scheme_power", QIconSet::Automatic), i18n(_tmp));
+ listBox_schemes->insertItem(SmallIcon("scheme_power", TQIconSet::Automatic), i18n(_tmp));
cB_acScheme->insertItem(i18n(_tmp));
cB_batteryScheme->insertItem(i18n(_tmp));
} else if(_tmp == "Powersave" || _tmp == i18n("Powersave")) {
- listBox_schemes->insertItem(SmallIcon("scheme_powersave", QIconSet::Automatic),
+ listBox_schemes->insertItem(SmallIcon("scheme_powersave", TQIconSet::Automatic),
i18n(_tmp));
cB_acScheme->insertItem(i18n(_tmp));
cB_batteryScheme->insertItem(i18n(_tmp));
} else if(_tmp == "Presentation" || _tmp == i18n("Presentation")){
- listBox_schemes->insertItem(SmallIcon("scheme_presentation", QIconSet::Automatic),
+ listBox_schemes->insertItem(SmallIcon("scheme_presentation", TQIconSet::Automatic),
i18n(_tmp));
cB_acScheme->insertItem(i18n(_tmp));
cB_batteryScheme->insertItem(i18n(_tmp));
} else if(_tmp == "Acoustic" || _tmp == i18n("Acoustic")) {
- listBox_schemes->insertItem(SmallIcon("scheme_acoustic", QIconSet::Automatic),
+ listBox_schemes->insertItem(SmallIcon("scheme_acoustic", TQIconSet::Automatic),
i18n(_tmp));
cB_acScheme->insertItem(i18n(_tmp));
cB_batteryScheme->insertItem(i18n(_tmp));
} else if(_tmp == "AdvancedPowersave" || _tmp == i18n("Advanced Powersave")) {
listBox_schemes->insertItem(SmallIcon("scheme_advanced_powersave",
- QIconSet::Automatic), i18n("Advanced Powersave"));
+ TQIconSet::Automatic), i18n("Advanced Powersave"));
cB_acScheme->insertItem(i18n("Advanced Powersave"));
cB_batteryScheme->insertItem(i18n("Advanced Powersave"));
} else {
@@ -198,14 +198,14 @@ void ConfigureDialog::getSchemeList(){
/*!
* This used to set the current scheme based on the name of the scheme
- * \param _scheme QString with the name of the scheme
+ * \param _scheme TQString with the name of the scheme
*/
-void ConfigureDialog::selectScheme (QString _scheme){
+void ConfigureDialog::selectScheme (TQString _scheme){
kdDebugFuncIn(trace);
// select the current scheme in the listbox
if(!_scheme.isEmpty()) {
- int pos = schemes.findIndex(_scheme);
+ int pos = schemes.tqfindIndex(_scheme);
if(pos > -1) {
listBox_schemes->setCurrentItem(pos);
currentScheme = pos;
@@ -226,37 +226,37 @@ void ConfigureDialog::setIcons(){
kdDebugFuncIn(trace);
/* set all Icons */
- this->setIcon(SmallIcon("kpowersave", QIconSet::Automatic));
- buttonApply->setIconSet(SmallIconSet("apply", QIconSet::Automatic));
- buttonCancel->setIconSet(SmallIconSet("cancel", QIconSet::Automatic));
- buttonOk->setIconSet(SmallIconSet("ok", QIconSet::Automatic));
- buttonHelp->setIconSet(SmallIconSet("help", QIconSet::Automatic));
-
- pB_editBlacklist->setIconSet(SmallIconSet("configure", QIconSet::Automatic));
- pB_editBlacklistDimm->setIconSet(SmallIconSet("configure", QIconSet::Automatic));
- pB_editAutosuspendGBlacklist->setIconSet(SmallIconSet("configure", QIconSet::Automatic));
- pB_editAutodimmGBlacklist->setIconSet(SmallIconSet("configure", QIconSet::Automatic));
-
- tB_scheme->setItemIconSet( 0 ,SmallIcon("kscreensaver", QIconSet::Automatic));
- tB_scheme->setItemIconSet( 1 ,SmallIcon("display", QIconSet::Automatic));
+ this->setIcon(SmallIcon("kpowersave", TQIconSet::Automatic));
+ buttonApply->setIconSet(SmallIconSet("apply", TQIconSet::Automatic));
+ buttonCancel->setIconSet(SmallIconSet("cancel", TQIconSet::Automatic));
+ buttonOk->setIconSet(SmallIconSet("ok", TQIconSet::Automatic));
+ buttonHelp->setIconSet(SmallIconSet("help", TQIconSet::Automatic));
+
+ pB_editBlacklist->setIconSet(SmallIconSet("configure", TQIconSet::Automatic));
+ pB_editBlacklistDimm->setIconSet(SmallIconSet("configure", TQIconSet::Automatic));
+ pB_editAutosuspendGBlacklist->setIconSet(SmallIconSet("configure", TQIconSet::Automatic));
+ pB_editAutodimmGBlacklist->setIconSet(SmallIconSet("configure", TQIconSet::Automatic));
+
+ tB_scheme->setItemIconSet( 0 ,SmallIcon("kscreensaver", TQIconSet::Automatic));
+ tB_scheme->setItemIconSet( 1 ,SmallIcon("display", TQIconSet::Automatic));
if(actions[0] == "Suspend to Disk")
- tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_disk", QIconSet::Automatic));
+ tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_disk", TQIconSet::Automatic));
else if(actions[0] == "Suspend to RAM")
- tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_ram", QIconSet::Automatic));
+ tB_scheme->setItemIconSet( 2 ,SmallIcon("suspend_to_ram", TQIconSet::Automatic));
else if(actions[0] == "Standby")
- tB_scheme->setItemIconSet( 2 ,SmallIcon("stand_by", QIconSet::Automatic));
+ tB_scheme->setItemIconSet( 2 ,SmallIcon("stand_by", TQIconSet::Automatic));
- tB_scheme->setItemIconSet( 3 ,SmallIcon("autodimm", QIconSet::Automatic));
- tB_scheme->setItemIconSet( 4 ,SmallIcon("processor", QIconSet::Automatic));
- tB_scheme->setItemIconSet( 5 ,SmallIcon("misc", QIconSet::Automatic));
+ tB_scheme->setItemIconSet( 3 ,SmallIcon("autodimm", TQIconSet::Automatic));
+ tB_scheme->setItemIconSet( 4 ,SmallIcon("processor", TQIconSet::Automatic));
+ tB_scheme->setItemIconSet( 5 ,SmallIcon("misc", TQIconSet::Automatic));
- tB_general->setItemIconSet( 0, SmallIcon( "scheme_powersave", QIconSet::Automatic));
- tB_general->setItemIconSet( 1, SmallIcon( "button", QIconSet::Automatic));
- tB_general->setItemIconSet( 2, SmallIcon( "scheme_power", QIconSet::Automatic));
- tB_general->setItemIconSet( 3, SmallIcon( "lock", QIconSet::Automatic));
- tB_general->setItemIconSet( 4, SmallIcon( "misc", QIconSet::Automatic));
- pB_configNotify->setIconSet(SmallIconSet("knotify", QIconSet::Automatic));
+ tB_general->setItemIconSet( 0, SmallIcon( "scheme_powersave", TQIconSet::Automatic));
+ tB_general->setItemIconSet( 1, SmallIcon( "button", TQIconSet::Automatic));
+ tB_general->setItemIconSet( 2, SmallIcon( "scheme_power", TQIconSet::Automatic));
+ tB_general->setItemIconSet( 3, SmallIcon( "lock", TQIconSet::Automatic));
+ tB_general->setItemIconSet( 4, SmallIcon( "misc", TQIconSet::Automatic));
+ pB_configNotify->setIconSet(SmallIconSet("knotify", TQIconSet::Automatic));
kdDebugFuncOut(trace);
}
@@ -267,36 +267,36 @@ void ConfigureDialog::setIcons(){
void ConfigureDialog::setTooltips(){
kdDebugFuncIn(trace);
- // QToolTip::setWakeUpDelay ( 1000 );
- QToolTip::add(cB_specificSettings, i18n("This enables specific screen saver settings. \n"
+ // TQToolTip::setWakeUpDelay ( 1000 );
+ TQToolTip::add(cB_specificSettings, i18n("This enables specific screen saver settings. \n"
"Note: If selected, the global screen saver settings are \n"
"overwritten while kpowersave runs."));
- QToolTip::add(cB_disable_Ss, i18n("This disables the screen saver. \n"
+ TQToolTip::add(cB_disable_Ss, i18n("This disables the screen saver. \n"
"Note: If selected, the global screen saver settings are \n"
"overwritten while kpowersave runs."));
- QToolTip::add(cB_blankScreen, i18n("This blanks the screen instead of using a specific screen saver. \n"
+ TQToolTip::add(cB_blankScreen, i18n("This blanks the screen instead of using a specific screen saver. \n"
"Note: This may work only with KScreensaver."));
- QToolTip::add(cB_SpecificPM, i18n("This enables specific DPMS settings. \n"
+ TQToolTip::add(cB_SpecificPM, i18n("This enables specific DPMS settings. \n"
"Note: If selected, the global DPMS settings are \n"
"overwritten while kpowersave runs."));
- QToolTip::add(cB_disablePM, i18n("This disables DPMS support."));
- QToolTip::add(cB_lockSuspend, i18n("If selected, the screen is locked on suspend or standby."));
- QToolTip::add(cB_lockLid, i18n("If selected, the screen is locked if the lid close event is triggered."));
+ TQToolTip::add(cB_disablePM, i18n("This disables DPMS support."));
+ TQToolTip::add(cB_lockSuspend, i18n("If selected, the screen is locked on suspend or standby."));
+ TQToolTip::add(cB_lockLid, i18n("If selected, the screen is locked if the lid close event is triggered."));
- QToolTip::add(cB_autoSuspend, i18n("Check this box to enable or disable automatic suspension of "
+ TQToolTip::add(cB_autoSuspend, i18n("Check this box to enable or disable automatic suspension of "
"the computer."));
- QToolTip::add(cB_autoInactivity, i18n("Activate this action if the user was inactive for the defined "
+ TQToolTip::add(cB_autoInactivity, i18n("Activate this action if the user was inactive for the defined "
"time \n(greater than 0 minutes). If empty, nothing happens."));
tB_scheme->setItemToolTip ( 0, i18n("All scheme-related screen saver and DPMS settings."));
tB_scheme->setItemToolTip ( 1, i18n("All scheme-related display brightness settings."));
tB_scheme->setItemToolTip ( 2, i18n("All scheme-related automatic suspend settings."));
- QToolTip::add(brightnessSlider, i18n("Here you can change the brightness of your display. \n"
+ TQToolTip::add(brightnessSlider, i18n("Here you can change the brightness of your display. \n"
"Use the slider to change the brightness directly for \n"
"testing. To reset back to previous level, please press \n"
"the 'Reset' button. "));
- QToolTip::add(pB_resetBrightness, i18n("Use this button to set back the slider and the "
+ TQToolTip::add(pB_resetBrightness, i18n("Use this button to set back the slider and the "
"display brightness."));
kdDebugFuncOut(trace);
@@ -307,12 +307,12 @@ void ConfigureDialog::setTooltips(){
* This is a workaround for the case if Yast translated the name of the
* scheme In this case is a new config section created and the old settings
* would be lost.
- * \param s_scheme QString with the 'current' name of the scheme
- * \return QString with the english name of the scheme
+ * \param s_scheme TQString with the 'current' name of the scheme
+ * \return TQString with the english name of the scheme
*/
-QString ConfigureDialog::getSchemeRealName(QString s_scheme) {
+TQString ConfigureDialog::getSchemeRealName(TQString s_scheme) {
kdDebugFuncIn(trace);
- QString ret = s_scheme;
+ TQString ret = s_scheme;
if( s_scheme == "Performance" || s_scheme == i18n("Performance"))
ret = "Performance";
@@ -331,14 +331,14 @@ QString ConfigureDialog::getSchemeRealName(QString s_scheme) {
* This function is used to read the settings from configfile and
* set the values to the related dialog elements.
* \param schemeID Integer value, represent the position of the
- * scheme in the QListBox and within the pdaemon-list.
+ * scheme in the TQListBox and within the pdaemon-list.
*/
void ConfigureDialog::setConfigToDialog( int schemeID ){
if (trace) kdDebug() << funcinfo << "IN , scheme: " << schemeID << endl;
initalised = false;
- QString s_scheme = getSchemeRealName(schemes[schemeID]);
+ TQString s_scheme = getSchemeRealName(schemes[schemeID]);
if (kconfig->hasGroup(s_scheme)){
settings->load_general_settings();
@@ -349,18 +349,18 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
!s_scheme.startsWith(settings->battery_scheme)) {
// enable delete button
pB_deleteScheme->setEnabled( true );
- QToolTip::add(pB_deleteScheme, i18n("Press this button to delete the "
+ TQToolTip::add(pB_deleteScheme, i18n("Press this button to delete the "
"selected scheme."));
} else {
// disable button
pB_deleteScheme->setEnabled( false );
- QToolTip::add(pB_deleteScheme, i18n("You can't delete the current AC "
+ TQToolTip::add(pB_deleteScheme, i18n("You can't delete the current AC "
"or battery scheme."));
}
} else {
// disable button, can't delete these scheme, they are default
pB_deleteScheme->setEnabled( false );
- QToolTip::add(pB_deleteScheme, i18n("You can't delete this default scheme."));
+ TQToolTip::add(pB_deleteScheme, i18n("You can't delete this default scheme."));
}
kconfig->setGroup(s_scheme);
@@ -449,9 +449,9 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
cB_disablePM_toggled(kconfig->readBoolEntry("disableDPMS",false));
// set autosuspend related settings
- QString _action = kconfig->readEntry("autoInactiveAction", "NULL");
+ TQString _action = kconfig->readEntry("autoInactiveAction", "NULL");
if( _action != "NULL") {
- int _index = actions.findIndex(_action);
+ int _index = actions.tqfindIndex(_action);
if( _index != -1) {
cB_autoInactivity->setCurrentItem( _index );
cB_autoInactivity_activated( _index );
@@ -473,7 +473,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
kconfig->setGroup("default-scheme");
_action = kconfig->readEntry("autoInactiveAction", "NULL");
if(_action != "NULL") {
- int _index = actions.findIndex(_action);
+ int _index = actions.tqfindIndex(_action);
if( _index != -1) {
cB_autoInactivity->setCurrentItem( _index );
tL_autoInactivity_After->setEnabled(true);
@@ -536,11 +536,11 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
int i_brightnessPercent = kconfig->readNumEntry("brightnessPercent", -1);
if(i_brightnessPercent >= 0) {
brightnessSlider->setValue(i_brightnessPercent);
- tL_valueBrightness->setText(QString::number(i_brightnessPercent) + " %");
+ tL_valueBrightness->setText(TQString::number(i_brightnessPercent) + " %");
}
else {
brightnessSlider->setValue(100);
- tL_valueBrightness->setText(QString::number(100)+ " %");
+ tL_valueBrightness->setText(TQString::number(100)+ " %");
}
tL_brightness->setText(i18n("Your hardware supports to change the brightness. The "
@@ -602,7 +602,7 @@ void ConfigureDialog::setConfigToDialog( int schemeID ){
}
if (hwinfo->supportCPUFreq()) {
- QString cpuFreqPolicy = kconfig->readEntry("cpuFreqPolicy");
+ TQString cpuFreqPolicy = kconfig->readEntry("cpuFreqPolicy");
if (cpuFreqPolicy.isEmpty()) {
// load value from default-scheme
@@ -659,7 +659,7 @@ void ConfigureDialog::setGeneralSettings() {
cB_autostart->setChecked(kconfig->readBoolEntry("Autostart",false));
cB_autostart_neverAsk->setChecked(kconfig->readBoolEntry("AutostartNeverAsk",false));
- QString lockmethod = kconfig->readEntry("lockMethod", "NULL");
+ TQString lockmethod = kconfig->readEntry("lockMethod", "NULL");
if(comboB_lock->count() == 0 ){
comboB_lock->insertItem(i18n("Select Automatically"),0);
comboB_lock->insertItem(i18n("KScreensaver"),1);
@@ -696,21 +696,21 @@ void ConfigureDialog::setGeneralSettings() {
sB_batLowAction_value->hide();
sB_batCritAction_value->hide();
- QString _select;
- QStringList _actions = kconfig->readListEntry("batteryAllowedActions", QString());
- _select = kconfig->readEntry("batteryWarningAction", QString());
+ TQString _select;
+ TQStringList _actions = kconfig->readListEntry("batteryAllowedActions", TQString());
+ _select = kconfig->readEntry("batteryWarningAction", TQString());
fillActionComboBox(cB_batWarning, _actions, _select);
if (_select == "BRIGHTNESS" && hwinfo->supportBrightness()) {
sB_batWarnAction_value->show();
sB_batWarnAction_value->setValue(kconfig->readNumEntry( "batteryWarningActionValue",0));
}
- _select = kconfig->readEntry("batteryLowAction", QString());
+ _select = kconfig->readEntry("batteryLowAction", TQString());
fillActionComboBox(cB_batLow, _actions, _select);
if (_select == "BRIGHTNESS" && hwinfo->supportBrightness()) {
sB_batLowAction_value->show();
sB_batLowAction_value->setValue( kconfig->readNumEntry( "batteryLowActionValue",0));
}
- _select = kconfig->readEntry("batteryCriticalAction", QString());
+ _select = kconfig->readEntry("batteryCriticalAction", TQString());
fillActionComboBox(cB_batCritical, _actions, _select);
if (_select == "BRIGHTNESS" && hwinfo->supportBrightness()) {
sB_batCritAction_value->show();
@@ -723,19 +723,19 @@ void ConfigureDialog::setGeneralSettings() {
}
// buttons tab:
- QStringList _actions = kconfig->readListEntry("buttonsAllowedActions", QString());
- fillActionComboBox(cB_PowerButton, _actions, kconfig->readEntry("ActionOnPowerButton", QString()));
- fillActionComboBox(cB_SleepButton, _actions, kconfig->readEntry("ActionOnSleepButton", QString()));
- fillActionComboBox(cB_S2DiskButton, _actions, kconfig->readEntry("ActionOnS2DiskButton", QString()));
+ TQStringList _actions = kconfig->readListEntry("buttonsAllowedActions", TQString());
+ fillActionComboBox(cB_PowerButton, _actions, kconfig->readEntry("ActionOnPowerButton", TQString()));
+ fillActionComboBox(cB_SleepButton, _actions, kconfig->readEntry("ActionOnSleepButton", TQString()));
+ fillActionComboBox(cB_S2DiskButton, _actions, kconfig->readEntry("ActionOnS2DiskButton", TQString()));
// avoid logout dialog for lidclose - this make no sense
_actions.remove("LOGOUT_DIALOG");
- fillActionComboBox(cB_LidcloseButton, _actions, kconfig->readEntry("ActionOnLidClose", QString()));
+ fillActionComboBox(cB_LidcloseButton, _actions, kconfig->readEntry("ActionOnLidClose", TQString()));
// default scheme tab:
- QString _ac_scheme = kconfig->readEntry( "ac_scheme", "Performance");
- QString _bat_scheme = kconfig->readEntry( "battery_scheme", "Powersave");
- cB_acScheme->setCurrentItem(schemes.findIndex(_ac_scheme));
- cB_batteryScheme->setCurrentItem(schemes.findIndex(_bat_scheme));
+ TQString _ac_scheme = kconfig->readEntry( "ac_scheme", "Performance");
+ TQString _bat_scheme = kconfig->readEntry( "battery_scheme", "Powersave");
+ cB_acScheme->setCurrentItem(schemes.tqfindIndex(_ac_scheme));
+ cB_batteryScheme->setCurrentItem(schemes.tqfindIndex(_bat_scheme));
kdDebugFuncOut(trace);
}
@@ -750,7 +750,7 @@ void ConfigureDialog::setGeneralSettings() {
void ConfigureDialog::saveSchemeSettings() {
kdDebugFuncIn(trace);
- QString s_scheme = getSchemeRealName(schemes[currentScheme]);
+ TQString s_scheme = getSchemeRealName(schemes[currentScheme]);
kconfig->setGroup(s_scheme);
kconfig->writeEntry("specSsSettings",cB_specificSettings->isOn());
@@ -829,7 +829,7 @@ void ConfigureDialog::saveGeneralSettings() {
kconfig->writeEntry("Autostart",cB_autostart->isOn());
kconfig->writeEntry("AutostartNeverAsk",cB_autostart_neverAsk->isOn());
- QString selected_method = "";
+ TQString selected_method = "";
int _selected = comboB_lock->currentItem();
if(_selected == 0) selected_method = "automatic";
else if(_selected == 1) selected_method = "kscreensaver";
@@ -843,7 +843,7 @@ void ConfigureDialog::saveGeneralSettings() {
kconfig->writeEntry("batteryCritical", sB_batCritical->value());
// battery level tab
- QString _action = mapDescriptionToAction(cB_batWarning->currentText());
+ TQString _action = mapDescriptionToAction(cB_batWarning->currentText());
kconfig->writeEntry("batteryWarningAction", _action);
if (_action == "BRIGHTNESS") {
kconfig->writeEntry("batteryWarningActionValue", sB_batWarnAction_value->value());
@@ -918,7 +918,7 @@ void ConfigureDialog::scheme_valueChanged(){
}
/*!
- * SLOT: called if the current scheme in the QListBox listBox_schemes is
+ * SLOT: called if the current scheme in the TQListBox listBox_schemes is
* changed/ a other scheme was selected.
*/
void ConfigureDialog::listBox_schemes_currentChanged(){
@@ -1028,21 +1028,21 @@ void ConfigureDialog::pB_newScheme_clicked(){
bool _ok = false;
bool _end = false;
- QString _new;
- QString _text = i18n("Please insert a name for the new scheme:");
- QString _error;
+ TQString _new;
+ TQString _text = i18n("Please insert a name for the new scheme:");
+ TQString _error;
getSchemeList();
while (!_end) {
_new = KInputDialog::getText( i18n("KPowersave Configuration"),
- _error + _text, QString::null, &_ok, this);
+ _error + _text, TQString(), &_ok, this);
if (!_ok ) {
_end = true;
} else {
- _error = QString();
+ _error = TQString();
if (!_new.isEmpty()) {
- if ( schemes.contains(_new))
+ if ( schemes.tqcontains(_new))
_error = i18n("Error: A scheme with this name already exist.\n");
else
_end = true;
@@ -1074,12 +1074,12 @@ void ConfigureDialog::pB_deleteScheme_clicked(){
if (pB_deleteScheme->isEnabled()) {
int answer = KMessageBox::questionYesNo( this, i18n("Do you really want to delete the "
- "%1 scheme?").arg(schemes[currentScheme]),
+ "%1 scheme?").tqarg(schemes[currentScheme]),
i18n("Confirm delete scheme"),
i18n("Delete"), i18n("Cancel"));
if (answer == KMessageBox::Yes) {
// delete the scheme, we can be sure this is a userscheme
- QString _s_tmp = getSchemeRealName(schemes[currentScheme]);
+ TQString _s_tmp = getSchemeRealName(schemes[currentScheme]);
if (kconfig->hasGroup(_s_tmp) && kconfig->deleteGroup(_s_tmp)) {
schemes.remove(_s_tmp);
kconfig->setGroup("General");
@@ -1105,7 +1105,7 @@ void ConfigureDialog::pB_deleteScheme_clicked(){
/* ---- START SCREENSAVER SECTION ---- */
/*!
- * SLOT: called if QCheckBox cB_specificSettings is toggled.
+ * SLOT: called if TQCheckBox cB_specificSettings is toggled.
* \param state boolean, true if toggled on
* false if toggled off
*/
@@ -1133,7 +1133,7 @@ void ConfigureDialog::cB_specificSettings_toggled(bool state){
}
/*!
- * SLOT: called if QCheckBox cB_disable_Ss is toggled.
+ * SLOT: called if TQCheckBox cB_disable_Ss is toggled.
* \param state boolean, true if toggled on
* false if toggled off
*/
@@ -1153,7 +1153,7 @@ void ConfigureDialog::cB_disable_Ss_toggled(bool state){
/* ---- START DPMS SECTION ---- */
/*!
- * SLOT: called if QCheckBox cB_SpecificPM is toggled.
+ * SLOT: called if TQCheckBox cB_SpecificPM is toggled.
* \param state boolean, true if toggled on
* false if toggled offtrue
*/
@@ -1178,7 +1178,7 @@ void ConfigureDialog::cB_SpecificPM_toggled(bool state){
}
/*!
- * SLOT: called if QCheckBox cB_disablePM is toggled.
+ * SLOT: called if TQCheckBox cB_disablePM is toggled.
* \param state boolean, true if toggled on
* false if toggled off
*/
@@ -1199,7 +1199,7 @@ void ConfigureDialog::cB_disablePM_toggled(bool state){
}
/*!
- * SLOT: called if the standby QSpinBoxes for DPMS timout is changed.
+ * SLOT: called if the standby TQSpinBoxes for DPMS timout is changed.
*/
void ConfigureDialog::sB_standby_valueChanged() {
kdDebugFuncIn(trace);
@@ -1216,7 +1216,7 @@ void ConfigureDialog::sB_standby_valueChanged() {
}
/*!
- * SLOT: called if the suspend QSpinBoxes for DPMS timout is changed.
+ * SLOT: called if the suspend TQSpinBoxes for DPMS timout is changed.
*/
void ConfigureDialog::sB_suspend_valueChanged() {
kdDebugFuncIn(trace);
@@ -1237,7 +1237,7 @@ void ConfigureDialog::sB_suspend_valueChanged() {
}
/*!
- * SLOT: called if the powerOff QSpinBoxes for DPMS timout is changed.
+ * SLOT: called if the powerOff TQSpinBoxes for DPMS timout is changed.
*/
void ConfigureDialog::sB_powerOff_valueChanged() {
kdDebugFuncIn(trace);
@@ -1267,10 +1267,10 @@ void ConfigureDialog::setInactivityBox(){
// add "nothing" at start of the list
actions.push_front(" ");
// add "Turn Off Computer" at end of the list
- // QString _to_i18n = i18n("Turn Off Computer");
+ // TQString _to_i18n = i18n("Turn Off Computer");
// actions.append("Turn Off Computer");
- for ( QStringList::Iterator it = actions.begin(); it != actions.end(); ++it ) {
+ for ( TQStringList::Iterator it = actions.begin(); it != actions.end(); ++it ) {
cB_autoInactivity->insertItem( i18n( (*it).ascii() ) );
}
@@ -1321,7 +1321,7 @@ void ConfigureDialog::cB_autoInactivity_activated( int selectedItem ) {
if( actions[selectedItem] != " " ) {
if(!displayed_WARN_autosuspend && initalised) {
- QString _msg = "<qt>" + i18n("<b>Note:</b> If you select this option, the computer "
+ TQString _msg = "<qt>" + i18n("<b>Note:</b> If you select this option, the computer "
"will suspend or standby if the current user is "
"inactive for the defined time even if somebody is "
"logged in remotely to the X server.<br><br> This "
@@ -1388,20 +1388,20 @@ void ConfigureDialog::cB_Blacklist_toggled( bool toggled ){
void ConfigureDialog::pB_editBlacklistSuspend_clicked(){
kdDebugFuncIn(trace);
- QString _top_text = "";
+ TQString _top_text = "";
bool initialiseImport = false;
if(tabWidget->currentPageIndex() == 0 ) {
- QString s_scheme = getSchemeRealName(schemes[listBox_schemes->currentItem()]);
+ TQString s_scheme = getSchemeRealName(schemes[listBox_schemes->currentItem()]);
_top_text = listBox_schemes->currentText();
if (kconfig->hasGroup(s_scheme)){
kconfig->setGroup(s_scheme);
}
blacklist = kconfig->readListEntry("autoInactiveSchemeBlacklist", ',');
if( blacklist.empty()) {
- QString _msg = i18n("The blacklist of the selected scheme is empty. "
+ TQString _msg = i18n("The blacklist of the selected scheme is empty. "
"Import the general blacklist?");
- int tmp = KMessageBox::questionYesNo(this, _msg, QString(), i18n("Import"), i18n("Do Not Import"));
+ int tmp = KMessageBox::questionYesNo(this, _msg, TQString(), i18n("Import"), i18n("Do Not Import"));
if (tmp == KMessageBox::Yes) {
initialiseImport = true;
if(kconfig->hasGroup("General")){
@@ -1420,24 +1420,24 @@ void ConfigureDialog::pB_editBlacklistSuspend_clicked(){
}
blacklistEDlgAS = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
- connect( blacklistEDlgAS, SIGNAL(config_finished(QStringList)), this,
- SLOT(saveSchemeSuspendBlacklist(QStringList)));
+ connect( blacklistEDlgAS, TQT_SIGNAL(config_finished(TQStringList)), this,
+ TQT_SLOT(saveSchemeSuspendBlacklist(TQStringList)));
blacklistEDlgAS->exec();
kdDebugFuncOut(trace);
}
/*!
- * SLOT: Called if the signal config_finished(QStringList) recieved
+ * SLOT: Called if the signal config_finished(TQStringList) recieved
* and the autosuspend blacklist is edited.
- * \param new_blacklist QStringlist with the edited blacklisted processes
+ * \param new_blacklist TQStringlist with the edited blacklisted processes
*/
-void ConfigureDialog::saveSchemeSuspendBlacklist( QStringList new_blacklist){
+void ConfigureDialog::saveSchemeSuspendBlacklist( TQStringList new_blacklist){
kdDebugFuncIn(trace);
if(tabWidget->currentPageIndex() == 0 ) {
- QString s_scheme = getSchemeRealName(schemes[currentScheme]);
+ TQString s_scheme = getSchemeRealName(schemes[currentScheme]);
kconfig->setGroup(s_scheme);
kconfig->writeEntry("autoInactiveSchemeBlacklist", new_blacklist, ',');
}
@@ -1518,20 +1518,20 @@ void ConfigureDialog::cB_BlacklistDimm_toggled( bool toggled ){
void ConfigureDialog::pB_editBlacklistDimm_clicked(){
kdDebugFuncIn(trace);
- QString _top_text = "";
+ TQString _top_text = "";
bool initialiseImport = false;
if(tabWidget->currentPageIndex() == 0 ) {
- QString s_scheme = getSchemeRealName(schemes[listBox_schemes->currentItem()]);
+ TQString s_scheme = getSchemeRealName(schemes[listBox_schemes->currentItem()]);
_top_text = listBox_schemes->currentText();
if (kconfig->hasGroup(s_scheme)){
kconfig->setGroup(s_scheme);
}
blacklist = kconfig->readListEntry("autoDimmSchemeBlacklist", ',');
if( blacklist.empty()) {
- QString _msg = i18n("The blacklist of the selected scheme is empty. "
+ TQString _msg = i18n("The blacklist of the selected scheme is empty. "
"Import the general blacklist?");
- int tmp = KMessageBox::questionYesNo(this, _msg, QString(), i18n("Import"), i18n("Do Not Import"));
+ int tmp = KMessageBox::questionYesNo(this, _msg, TQString(), i18n("Import"), i18n("Do Not Import"));
if (tmp == KMessageBox::Yes) {
initialiseImport = true;
if(kconfig->hasGroup("General")){
@@ -1550,23 +1550,23 @@ void ConfigureDialog::pB_editBlacklistDimm_clicked(){
}
blacklistEDlgAD = new blacklistEditDialog(blacklist, _top_text, initialiseImport, this);
- connect( blacklistEDlgAD, SIGNAL(config_finished(QStringList)), this,
- SLOT(saveSchemeDimmBlacklist(QStringList)));
+ connect( blacklistEDlgAD, TQT_SIGNAL(config_finished(TQStringList)), this,
+ TQT_SLOT(saveSchemeDimmBlacklist(TQStringList)));
blacklistEDlgAD->exec();
kdDebugFuncOut(trace);
}
/*!
- * SLOT: Called if the signal config_finished(QStringList) recieved
+ * SLOT: Called if the signal config_finished(TQStringList) recieved
* and the autdimm blacklist is edited.
- * \param new_blacklist QStringlist with the edited blacklisted processes
+ * \param new_blacklist TQStringlist with the edited blacklisted processes
*/
-void ConfigureDialog::saveSchemeDimmBlacklist( QStringList new_blacklist){
+void ConfigureDialog::saveSchemeDimmBlacklist( TQStringList new_blacklist){
kdDebugFuncIn(trace);
if(tabWidget->currentPageIndex() == 0 ) {
- QString s_scheme = getSchemeRealName(schemes[currentScheme]);
+ TQString s_scheme = getSchemeRealName(schemes[currentScheme]);
kconfig->setGroup(s_scheme);
kconfig->writeEntry("autoDimmSchemeBlacklist", new_blacklist, ',');
}
@@ -1615,7 +1615,7 @@ void ConfigureDialog::cB_Brightness_toggled( bool toggled ) {
gB_Brightness->setEnabled(toggled);
cB_Brightness->setChecked(toggled);
- connect(brightnessSlider, SIGNAL(valueChanged (int)), this, SLOT(brightnessSlider_sliderMoved(int)));
+ connect(brightnessSlider, TQT_SIGNAL(valueChanged (int)), this, TQT_SLOT(brightnessSlider_sliderMoved(int)));
kdDebugFuncOut(trace);
}
@@ -1626,7 +1626,7 @@ void ConfigureDialog::brightnessSlider_sliderMoved( int new_value ) {
if (cB_Brightness->isEnabled() && cB_Brightness->isChecked()) {
scheme_valueChanged();
- tL_valueBrightness->setText(QString::number(new_value) + " %");
+ tL_valueBrightness->setText(TQString::number(new_value) + " %");
hwinfo->setBrightness(-1, new_value);
pB_resetBrightness->setEnabled(true);
brightness_changed = true;
@@ -1651,7 +1651,7 @@ void ConfigureDialog::pB_resetBrightness_clicked( ) {
/* ---- START battery level SECTION ---- */
/*!
- * SLOT: called if the warning QSpinBoxes for battery level is changed.
+ * SLOT: called if the warning TQSpinBoxes for battery level is changed.
*/
void ConfigureDialog::sB_batWarning_valueChanged() {
kdDebugFuncIn(trace);
@@ -1668,7 +1668,7 @@ void ConfigureDialog::sB_batWarning_valueChanged() {
}
/*!
- * SLOT: called if the low QSpinBoxes for battery level is changed.
+ * SLOT: called if the low TQSpinBoxes for battery level is changed.
*/
void ConfigureDialog::sB_batLow_valueChanged() {
kdDebugFuncIn(trace);
@@ -1689,7 +1689,7 @@ void ConfigureDialog::sB_batLow_valueChanged() {
}
/*!
- * SLOT: called if the critical QSpinBoxes for battery level is changed.
+ * SLOT: called if the critical TQSpinBoxes for battery level is changed.
*/
void ConfigureDialog::sB_batCritical_valueChanged() {
kdDebugFuncIn(trace);
@@ -1706,8 +1706,8 @@ void ConfigureDialog::sB_batCritical_valueChanged() {
}
/*!
- * SLOT: called if the QComboBox for the battery warning level action changed,
- * used to hide/show the related QSpinboxes if needed.
+ * SLOT: called if the TQComboBox for the battery warning level action changed,
+ * used to hide/show the related TQSpinboxes if needed.
*/
void ConfigureDialog::cB_batWarning_activated() {
kdDebugFuncIn(trace);
@@ -1721,9 +1721,9 @@ void ConfigureDialog::cB_batWarning_activated() {
kdDebugFuncOut(trace);
}
-//! called if the QComboBox for the battery low level action changed
+//! called if the TQComboBox for the battery low level action changed
/*!
- * used to hide/show the related QSpinboxes if needed.
+ * used to hide/show the related TQSpinboxes if needed.
*/
void ConfigureDialog::cB_batLow_activated() {
kdDebugFuncIn(trace);
@@ -1738,8 +1738,8 @@ void ConfigureDialog::cB_batLow_activated() {
}
/*!
- * SLOT: called if the QComboBox for the battery critical level action changed,
- * used to hide/show the related QSpinboxes if needed.
+ * SLOT: called if the TQComboBox for the battery critical level action changed,
+ * used to hide/show the related TQSpinboxes if needed.
*/
void ConfigureDialog::cB_batCritical_activated() {
kdDebugFuncIn(trace);
@@ -1767,31 +1767,31 @@ void ConfigureDialog::pB_configNotify_released( ) {
/* ---- START helper functions SECTION ---- */
/*!
* Map the key from config for a action to a descriptive name.
- * \param action QString with the config key value
- * \return QString with the description
+ * \param action TQString with the config key value
+ * \return TQString with the description
*/
-QString ConfigureDialog::mapActionToDescription( QString action ) {
+TQString ConfigureDialog::mapActionToDescription( TQString action ) {
kdDebugFuncIn(trace);
- QString ret;
+ TQString ret;
if (action.startsWith("SHUTDOWN")) {
ret = i18n("Shutdown");
} else if (action.startsWith("LOGOUT_DIALOG")) {
ret = i18n("Logout Dialog");
} else if (action.startsWith("SUSPEND2DISK")) {
- if (actions.contains("Suspend to Disk"))
+ if (actions.tqcontains("Suspend to Disk"))
ret = i18n("Suspend to Disk");
} else if (action.startsWith("SUSPEND2RAM")) {
- if (actions.contains("Suspend to RAM"))
+ if (actions.tqcontains("Suspend to RAM"))
ret = i18n("Suspend to RAM");
- } else if (action.startsWith("CPUFREQ_POWERSAVE")) {
+ } else if (action.startsWith("CPUFRETQ_POWERSAVE")) {
if (hwinfo->supportCPUFreq())
ret = i18n("CPU Powersave policy");
- } else if (action.startsWith("CPUFREQ_DYNAMIC")) {
+ } else if (action.startsWith("CPUFRETQ_DYNAMIC")) {
if (hwinfo->supportCPUFreq())
ret = i18n("CPU Dynamic policy");
- } else if (action.startsWith("CPUFREQ_PERFORMANCE")) {
+ } else if (action.startsWith("CPUFRETQ_PERFORMANCE")) {
if (hwinfo->supportCPUFreq())
ret = i18n("CPU Performance policy");
} else if (action.startsWith("BRIGHTNESS")) {
@@ -1804,14 +1804,14 @@ QString ConfigureDialog::mapActionToDescription( QString action ) {
}
/*!
- * Map the action description (maybe translated) back to a QString key for the config.
- * \param description QString with the description
- * \return QString with the config key value
+ * Map the action description (maybe translated) back to a TQString key for the config.
+ * \param description TQString with the description
+ * \return TQString with the config key value
*/
-QString ConfigureDialog::mapDescriptionToAction( QString description ) {
+TQString ConfigureDialog::mapDescriptionToAction( TQString description ) {
kdDebugFuncIn(trace);
- QString ret;
+ TQString ret;
if (description.startsWith("Shutdown") || description.startsWith(i18n("Shutdown"))) {
ret = "SHUTDOWN";
@@ -1826,13 +1826,13 @@ QString ConfigureDialog::mapDescriptionToAction( QString description ) {
ret = "SUSPEND2RAM";
} else if (description.startsWith("CPU Powersave policy") ||
description.startsWith(i18n("CPU Powersave policy"))) {
- ret = "CPUFREQ_POWERSAVE";
+ ret = "CPUFRETQ_POWERSAVE";
} else if (description.startsWith("CPU Dynamic policy") ||
description.startsWith(i18n("CPU Dynamic policy"))) {
- ret = "CPUFREQ_DYNAMIC";
+ ret = "CPUFRETQ_DYNAMIC";
} else if (description.startsWith("CPU Performance policy") ||
description.startsWith(i18n("CPU Performance policy"))) {
- ret = "CPUFREQ_PERFORMANCE";
+ ret = "CPUFRETQ_PERFORMANCE";
} else if (description.startsWith("Set Brightness to") ||
description.startsWith(i18n("Set Brightness to"))) {
ret = "BRIGHTNESS";
@@ -1843,21 +1843,21 @@ QString ConfigureDialog::mapDescriptionToAction( QString description ) {
}
/*!
- * Helper to fill a QComboBox with their text and select the correct item
- * \param _cb Pointer to the QComboBox
- * \param _actions QStringList with the allowed actions
- * \param _select QString with the action to select
+ * Helper to fill a TQComboBox with their text and select the correct item
+ * \param _cb Pointer to the TQComboBox
+ * \param _actions TQStringList with the allowed actions
+ * \param _select TQString with the action to select
*/
-void ConfigureDialog::fillActionComboBox(QComboBox *_cb, QStringList _actions, QString _select) {
+void ConfigureDialog::fillActionComboBox(TQComboBox *_cb, TQStringList _actions, TQString _select) {
kdDebugFuncIn(trace);
_cb->clear();
_cb->insertItem("");
- for ( QStringList::Iterator it = _actions.begin(); it != _actions.end(); ++it ) {
- QString _tmp = *it;
+ for ( TQStringList::Iterator it = _actions.begin(); it != _actions.end(); ++it ) {
+ TQString _tmp = *it;
- QString _desc = mapActionToDescription( _tmp );
+ TQString _desc = mapActionToDescription( _tmp );
if (!_desc.isEmpty()) {
_cb->insertItem( _desc );
if (_tmp == _select) {
diff --git a/src/configuredialog.h b/src/configuredialog.h
index 19cbdeb..1ec8c68 100644
--- a/src/configuredialog.h
+++ b/src/configuredialog.h
@@ -42,11 +42,12 @@
class ConfigureDialog: public configure_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
ConfigureDialog( KConfig *_config, HardwareInfo *_hwinfo, Settings *_settings,
- QWidget *parent = 0, const char *name = 0);
+ TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~ConfigureDialog();
@@ -66,12 +67,12 @@ private:
//! struct with allowed suspend states
SuspendStates suspend;
- //! QStringList with the blacklisted processes
- QStringList blacklist;
- //! QStringList with all available supported actions
- QStringList actions;
- //! QStringList with the name of the schemes in the config
- QStringList schemes;
+ //! TQStringList with the blacklisted processes
+ TQStringList blacklist;
+ //! TQStringList with all available supported actions
+ TQStringList actions;
+ //! TQStringList with the name of the schemes in the config
+ TQStringList schemes;
//! true if the current desktop session is a GNOME session, else if not
bool gnome_session;
@@ -116,16 +117,16 @@ private:
//! get the list of schemes and fill \ref schemes
void getSchemeList();
//! set the current scheme
- void selectScheme (QString _scheme);
+ void selectScheme (TQString _scheme);
//! to get the real Name of the Scheme
- QString getSchemeRealName( QString );
+ TQString getSchemeRealName( TQString );
//! map a action string from options to a description
- QString mapActionToDescription( QString action );
+ TQString mapActionToDescription( TQString action );
//! map a (translated) description of a action back to the name config key
- QString mapDescriptionToAction( QString description );
- //! fill a QComboBox with actions (translated text) and select a value
- void fillActionComboBox(QComboBox *_cb, QStringList _actions, QString _select);
+ TQString mapDescriptionToAction( TQString description );
+ //! fill a TQComboBox with actions (translated text) and select a value
+ void fillActionComboBox(TQComboBox *_cb, TQStringList _actions, TQString _select);
signals:
@@ -178,11 +179,11 @@ private slots:
//! called if the pB_editBlacklist clicked
void pB_editBlacklistSuspend_clicked();
//! to store the changed and from BlacklistEditDlg recieved suspend blacklist to scheme
- void saveSchemeSuspendBlacklist( QStringList );
+ void saveSchemeSuspendBlacklist( TQStringList );
//! called if the pB_editBlacklistDimm clicked
void pB_editBlacklistDimm_clicked();
//! to store the changed and from BlacklistEditDlg recieved dimm blacklist to scheme
- void saveSchemeDimmBlacklist( QStringList );
+ void saveSchemeDimmBlacklist( TQStringList );
//! called if the checkbox cB_Brightness toggled
void cB_Brightness_toggled ( bool );
@@ -205,18 +206,18 @@ private slots:
//! called if the value of the powerOff DPMS spinBox changed
void sB_powerOff_valueChanged();
- //! called if the warning QSpinBoxes for battery level is changed
+ //! called if the warning TQSpinBoxes for battery level is changed
void sB_batWarning_valueChanged();
- //! called if the low QSpinBoxes for battery level is changed
+ //! called if the low TQSpinBoxes for battery level is changed
void sB_batLow_valueChanged();
- //! called if the critical QSpinBoxes for battery level is changed
+ //! called if the critical TQSpinBoxes for battery level is changed
void sB_batCritical_valueChanged();
- //! called if the QComboBox for the battery warning level action changed
+ //! called if the TQComboBox for the battery warning level action changed
void cB_batWarning_activated();
- //! called if the QComboBox for the battery low level action changed
+ //! called if the TQComboBox for the battery low level action changed
void cB_batLow_activated();
- //! called if the QComboBox for the battery critical level action changed
+ //! called if the TQComboBox for the battery critical level action changed
void cB_batCritical_activated();
};
diff --git a/src/countdown_Dialog.ui b/src/countdown_Dialog.ui
index eda8d01..0cecb99 100644
--- a/src/countdown_Dialog.ui
+++ b/src/countdown_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>countdown_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>countdown_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -40,14 +40,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>142</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="2" column="4">
+ <widget class="TQPushButton" row="2" column="4">
<property name="name">
<cstring>pB_cancel</cstring>
</property>
@@ -68,7 +68,7 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>20</height>
@@ -85,24 +85,24 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>144</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="0" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>48</width>
<height>48</height>
@@ -125,14 +125,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="3" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="0" column="3" rowspan="1" colspan="4">
<property name="name">
<cstring>textLabel</cstring>
</property>
@@ -142,7 +142,7 @@
<property name="textFormat">
<enum>AutoText</enum>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -156,7 +156,7 @@
<property name="sizeType">
<enum>Maximum</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>30</width>
<height>20</height>
@@ -175,7 +175,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>200</width>
<height>20</height>
@@ -197,8 +197,8 @@
<slot>pB_cancel_pressed()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>pB_cancel_pressed()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/countdowndialog.cpp b/src/countdowndialog.cpp
index 3deac27..0e22b36 100644
--- a/src/countdowndialog.cpp
+++ b/src/countdowndialog.cpp
@@ -33,24 +33,24 @@
#include <kprogress.h>
// QT headers:
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqprogressbar.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtimer.h>
/*! This is the default constructor of class countDownDialog . */
-countDownDialog::countDownDialog( int timeout, QWidget *parent, const char *name)
- :countdown_Dialog(parent, name, false, Qt::WStyle_StaysOnTop | Qt::WDestructiveClose )
+countDownDialog::countDownDialog( int timeout, TQWidget *tqparent, const char *name)
+ :countdown_Dialog(tqparent, name, false, TQt::WStyle_StaysOnTop | TQt::WDestructiveClose )
{
kdDebugFuncIn(trace);
chancel = false;
remaining = timeout;
timeOut = timeout;
- PROGRESS = new QTimer(this);
- connect(PROGRESS, SIGNAL(timeout()), this, SLOT(updateProgress()));
+ PROGRESS = new TQTimer(this);
+ connect(PROGRESS, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateProgress()));
this->setCaption(i18n("KPowersave"));
@@ -60,7 +60,7 @@ countDownDialog::countDownDialog( int timeout, QWidget *parent, const char *name
/*! This is the default destructor of class countDownDialog . */
countDownDialog::~countDownDialog() {
kdDebugFuncIn(trace);
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
emit dialogClosed(chancel);
kdDebugFuncOut(trace);
@@ -68,12 +68,12 @@ countDownDialog::~countDownDialog() {
/*!
* This used to set Icon/pixmap for the dialog.
- * \param type QString with the type of the current suspend
+ * \param type TQString with the type of the current suspend
* to set the pixmap in the dialog
*/
-void countDownDialog::setPixmap( QString type )
+void countDownDialog::setPixmap( TQString type )
{
- QPixmap pixmap = 0;
+ TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
@@ -89,9 +89,9 @@ void countDownDialog::setPixmap( QString type )
/*!
* To set the message to the dialog, which should be shown to the user.
- * \param text QString with the message.
+ * \param text TQString with the message.
*/
-void countDownDialog::setMessageText(QString text) {
+void countDownDialog::setMessageText(TQString text) {
kdDebugFuncIn(trace);
if (!text.isEmpty()) {
@@ -114,7 +114,7 @@ bool countDownDialog::showDialog() {
if (!textLabel->text().isEmpty() && timeOut > 0) {
// init the progressbar
- progressBar->setFormat(i18n("%1 seconds").arg(remaining));
+ progressBar->setFormat(i18n("%1 seconds").tqarg(remaining));
progressBar->setPercentageVisible(true);
progressBar->setProgress(100);
progressBar->setEnabled(true);
@@ -130,7 +130,7 @@ bool countDownDialog::showDialog() {
}
/*!
- * \b SLOT to get the event if the 'Cancel' button was pressed.
+ * \b TQT_SLOT to get the event if the 'Cancel' button was pressed.
*/
void countDownDialog::pB_cancel_pressed() {
kdDebugFuncIn(trace);
@@ -145,7 +145,7 @@ void countDownDialog::pB_cancel_pressed() {
}
/*!
- * \b SLOT to handle the change of the progressbar.
+ * \b TQT_SLOT to handle the change of the progressbar.
*/
void countDownDialog::updateProgress() {
kdDebugFuncIn(trace);
@@ -160,7 +160,7 @@ void countDownDialog::updateProgress() {
int setTo = (int)((100.0/(float)timeOut)*(float)remaining);
// set the progressBar
- progressBar->setFormat(i18n("%1 seconds").arg(remaining));
+ progressBar->setFormat(i18n("%1 seconds").tqarg(remaining));
progressBar->setPercentageVisible(true);
progressBar->setProgress(setTo);
progressBar->setEnabled(true);
diff --git a/src/countdowndialog.h b/src/countdowndialog.h
index 86662f6..f23cae4 100644
--- a/src/countdowndialog.h
+++ b/src/countdowndialog.h
@@ -36,18 +36,19 @@
class countDownDialog: public countdown_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- countDownDialog(int timeout, QWidget *parent = 0, const char *name = 0);
+ countDownDialog(int timeout, TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~countDownDialog();
//! set needed icons
- void setPixmap( QString );
+ void setPixmap( TQString );
//! to set the message text for the user
- void setMessageText(QString text);
+ void setMessageText(TQString text);
//! to show up the dialog
bool showDialog();
@@ -57,7 +58,7 @@ private:
* This timer is used to change the progressbar and to close the dialog if
* the \ref timeOut is over.
*/
- QTimer *PROGRESS;
+ TQTimer *PROGRESS;
//! time the dialog should be displayed
int timeOut;
diff --git a/src/dbusHAL.cpp b/src/dbusHAL.cpp
index 926d189..6983eb3 100644
--- a/src/dbusHAL.cpp
+++ b/src/dbusHAL.cpp
@@ -194,17 +194,17 @@ bool dbusHAL::initDBUS(){
dbus_bus_add_match( dbus_connection, "type='signal',"
"interface='org.freedesktop.ConsoleKit.Session',"
"member='ActiveChanged'", NULL);
-
+
m_dBusQtConnection = new DBusQt::Connection(this);
m_dBusQtConnection->dbus_connection_setup_with_qt_main(dbus_connection);
-
+
dbus_is_connected = true;
kdDebugFuncOut(trace);
return true;
}
-/*!
+/*!
* This function aquire the org.freedesktop.Policy.Power interface
* \return boolean with the result of the operation
* \retval true if successful aquired the interface
@@ -415,12 +415,12 @@ bool dbusHAL::reconnectHAL() {
/*!
* This function query a integer property from HAL for a given device
- * \param udi QString with the UDI of the device
- * \param property QString with the property
+ * \param udi TQString with the UDI of the device
+ * \param property TQString with the property
* \param returnval pointer to the return value
* \return If the query was successful or not
*/
-bool dbusHAL::halGetPropertyInt(QString udi, QString property, int *returnval){
+bool dbusHAL::halGetPropertyInt(TQString udi, TQString property, int *returnval){
kdDebugFuncIn(trace);
bool ret = false;
@@ -454,12 +454,12 @@ out:
/*!
* This function query a boolean property from HAL for a given device
- * \param udi QString with the UDI of the device
- * \param property QString with the property
+ * \param udi TQString with the UDI of the device
+ * \param property TQString with the property
* \param returnval pointer to the return value
* \return If the query was successful or not
*/
-bool dbusHAL::halGetPropertyBool(QString udi, QString property, bool *returnval){
+bool dbusHAL::halGetPropertyBool(TQString udi, TQString property, bool *returnval){
kdDebugFuncIn(trace);
bool ret = false;
@@ -494,12 +494,12 @@ out:
/*!
* This function query a Sting property from HAL for a given device
- * \param udi QString with the UDI of the device
- * \param property QString with the property
+ * \param udi TQString with the UDI of the device
+ * \param property TQString with the property
* \param returnval pointer to the return value
* \return If the query was successful or not
*/
-bool dbusHAL::halGetPropertyString(QString udi, QString property, QString *returnval){
+bool dbusHAL::halGetPropertyString(TQString udi, TQString property, TQString *returnval){
kdDebugFuncIn(trace);
bool ret = false;
@@ -533,12 +533,12 @@ out:
/*!
* This function query a String List property from HAL for a given device
- * \param udi QString with the udi of the device
- * \param property QString with the property to query
- * \param devices QStringList to return the values
+ * \param udi TQString with the udi of the device
+ * \param property TQString with the property to query
+ * \param devices TQStringList to return the values
* \return If the query was successful or not
*/
-bool dbusHAL::halGetPropertyStringList (QString udi, QString property, QStringList *devices) {
+bool dbusHAL::halGetPropertyStringList (TQString udi, TQString property, TQStringList *devices) {
kdDebugFuncIn(trace);
bool ret = false;
@@ -566,7 +566,7 @@ bool dbusHAL::halGetPropertyStringList (QString udi, QString property, QStringLi
goto out;
} else {
for (int i = 0; found[i] != NULL ; ++i) {
- QString _to_add = found[i];
+ TQString _to_add = found[i];
if (!_to_add.isEmpty()) *devices += _to_add;
}
libhal_free_string_array(found);
@@ -581,12 +581,12 @@ out:
/*!
* This function query a capability from HAL for a given device
- * \param udi QString with the UDI of the device
- * \param capability QString with the capability to query
+ * \param udi TQString with the UDI of the device
+ * \param capability TQString with the capability to query
* \param returnval pointer to the return value as boolean
* \return If the query was successful or not
*/
-bool dbusHAL::halQueryCapability(QString udi, QString capability, bool *returnval) {
+bool dbusHAL::halQueryCapability(TQString udi, TQString capability, bool *returnval) {
kdDebugFuncIn(trace);
bool ret = false;
@@ -615,11 +615,11 @@ out:
/*!
* Use this function to check if a device has a specia property/key.
- * \param udi QString with the UDI of the device
- * \param property QString with the property
+ * \param udi TQString with the UDI of the device
+ * \param property TQString with the property
* \return If the query was successful or not
*/
-bool dbusHAL::halDevicePropertyExist(QString udi, QString property ) {
+bool dbusHAL::halDevicePropertyExist(TQString udi, TQString property ) {
kdDebugFuncIn(trace);
bool ret = false;
@@ -648,11 +648,11 @@ out:
/*!
* Use this function to search find devices with a give capability
- * \param capability QString with the capability to query
- * \param devices QStringList to return the found devices
+ * \param capability TQString with the capability to query
+ * \param devices TQStringList to return the found devices
* \return If the query was successful or not
*/
-bool dbusHAL::halFindDeviceByCapability (QString capability, QStringList *devices) {
+bool dbusHAL::halFindDeviceByCapability (TQString capability, TQStringList *devices) {
kdDebugFuncIn(trace);
DBusError error;
@@ -675,7 +675,7 @@ bool dbusHAL::halFindDeviceByCapability (QString capability, QStringList *device
goto out;
} else {
for (int i = 0; i < num; ++i) {
- QString _to_add = found[i];
+ TQString _to_add = found[i];
if (!_to_add.isEmpty()) *devices += _to_add;
}
libhal_free_string_array(found);
@@ -689,12 +689,12 @@ out:
/*!
* Use this function to search find devices with a special string property
- * \param property QString with the name of the property
- * \param keyval QString with value of the string property
- * \param devices QStringList to return the found devices
+ * \param property TQString with the name of the property
+ * \param keyval TQString with value of the string property
+ * \param devices TQStringList to return the found devices
* \return If the query was successful or not
*/
-bool dbusHAL::halFindDeviceByString (QString property, QString keyval, QStringList *devices) {
+bool dbusHAL::halFindDeviceByString (TQString property, TQString keyval, TQStringList *devices) {
kdDebugFuncIn(trace);
DBusError error;
@@ -717,7 +717,7 @@ bool dbusHAL::halFindDeviceByString (QString property, QString keyval, QStringLi
goto out;
} else {
for (int i = 0; i < num; ++i) {
- QString _to_add = found[i];
+ TQString _to_add = found[i];
if (!_to_add.isEmpty()) *devices += _to_add;
}
libhal_free_string_array(found);
@@ -733,15 +733,15 @@ out:
/* ----> D-Bus methode calls functions :: START <---- */
/*!
* This function call a D-Bus method
- * \param interface QString with te dbus interface
- * \param path QString with the object path
- * \param object QString with the object name
- * \param method QString with the name of the methode
+ * \param interface TQString with te dbus interface
+ * \param path TQString with the object path
+ * \param object TQString with the object name
+ * \param method TQString with the name of the methode
* \param first_arg_type integer with the dbus type of the first argument
* \param ... more arguments
* \return If the query was successful or not
*/
-bool dbusHAL::dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
+bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
int first_arg_type, ... ) {
kdDebugFuncIn(trace);
@@ -760,16 +760,16 @@ bool dbusHAL::dbusSystemMethodCall( QString interface, QString path, QString obj
/*!
* This overloaded function call a D-Bus method on the D-Bus system bus with a return value
- * \param interface QString with the dbus interface
- * \param path QString with the object path
- * \param object QString with the object name
- * \param method QString with the name of the method
+ * \param interface TQString with the dbus interface
+ * \param path TQString with the object path
+ * \param object TQString with the object name
+ * \param method TQString with the name of the method
* \param retvalue void pointer to arguments, if NULL we make a simple call
* \param retval_type Integer with the dbus type of the return value, set to -1 if retvalue is NULL
* \param first_arg_type Integer with the dbus type of the first argument followed by the value
* \return If the query was successful or not
*/
-bool dbusHAL::dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
+bool dbusHAL::dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
void *retvalue, int retval_type, int first_arg_type, ... ) {
kdDebugFuncIn(trace);
@@ -788,10 +788,10 @@ bool dbusHAL::dbusSystemMethodCall( QString interface, QString path, QString obj
/*!
* This function call a D-Bus method with a return value
- * \param interface QString with the dbus interface
- * \param path QString with the object path
- * \param object QString with the object name
- * \param method QString with the name of the method
+ * \param interface TQString with the dbus interface
+ * \param path TQString with the object path
+ * \param object TQString with the object name
+ * \param method TQString with the name of the method
* \param dbus_type DBusBusType with the D-Bus BUS Type
* \param retvalue void pointer to arguments, if NULL we make a simple call
* \param retval_type Integer with the dbus type of the return value, set to -1 if retvalue is NULL
@@ -799,7 +799,7 @@ bool dbusHAL::dbusSystemMethodCall( QString interface, QString path, QString obj
* \param var_args va_list with more arguments
* \return If the query was successful or not
*/
-bool dbusHAL::dbusMethodCall( QString interface, QString path, QString object, QString method,
+bool dbusHAL::dbusMethodCall( TQString interface, TQString path, TQString object, TQString method,
DBusBusType dbus_type, void *retvalue, int retval_type, int first_arg_type,
va_list var_args ) {
kdDebugFuncIn(trace);
@@ -969,16 +969,16 @@ out:
/*!
* Check if the user is privileged to a special privilege
- * \param privilege QString with the name of the requested privilege
- * \param udi QString with the UDI.
- * \param ressource QString with the name of the ressource
- * \param user QString with the name of the user. If empty the current user is used.
+ * \param privilege TQString with the name of the requested privilege
+ * \param udi TQString with the UDI.
+ * \param ressource TQString with the name of the ressource
+ * \param user TQString with the name of the user. If empty the current user is used.
* \return int with info if the user is allowed or not.
* \retval 0 if not allowed
* \retval 1 if allowed
* \retval -1 if a error occurs or we could not query the interface
*/
-int dbusHAL::isUserPrivileged(QString privilege, QString udi, QString ressource, QString user) {
+int dbusHAL::isUserPrivileged(TQString privilege, TQString udi, TQString ressource, TQString user) {
kdDebugFuncIn(trace);
const char *_unique_name;
@@ -1058,14 +1058,14 @@ out:
/* ---> PolicyKit method call section :: END <--- */
/*!
- * Use this SLOT to emit a reviced messages to the kpowersave.
+ * Use this TQT_SLOT to emit a reviced messages to the kpowersave.
* NOTE: Because of the filter function this need to be a public function.
* Don't use this function in any other place than this class.
* \param type enum with the type of the message
* \param message String with the message
* \param string String with additional info
*/
-void dbusHAL::emitMsgReceived( msg_type type, QString message, QString string ) {
+void dbusHAL::emitMsgReceived( msg_type type, TQString message, TQString string ) {
if (message.startsWith("dbus.terminate"))
dbus_is_connected = false;
@@ -1097,7 +1097,7 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
bool reply_wanted;
char *value;
- QString ifaceType;
+ TQString ifaceType;
DBusError error;
dbus_error_init( &error );
@@ -1288,7 +1288,7 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
if (dbus_message_get_args( message, &error, DBUS_TYPE_BOOLEAN, &active, DBUS_TYPE_INVALID )) {
((dbusHAL*) myInstance)->emitMsgReceived( CONSOLEKIT_SESSION_ACTIVE,
- session, QString("%1").arg((int)active));
+ session, TQString("%1").tqarg((int)active));
} else {
if (dbus_error_is_set( &error )) dbus_error_free( &error );
}
@@ -1312,3 +1312,4 @@ filterFunction (DBusConnection *connection, DBusMessage *message, void */*data*/
DBusConnection * dbusHAL::get_DBUS_connection() {
return dbus_connection;
}
+
diff --git a/src/dbusHAL.h b/src/dbusHAL.h
index 9346f0a..d8e3532 100644
--- a/src/dbusHAL.h
+++ b/src/dbusHAL.h
@@ -16,14 +16,14 @@
* Free Software Foundation, Inc., *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-
-/*!
+
+/*!
* \file dbusHAL.h
* \brief Headerfile for dbusHAL.cpp and the class \ref dbusHAL.
*/
-/*!
+/*!
* \class dbusHAL
-* \brief class for connection to HAL via D-Bus
+* \brief class for connection to HAL via D-Bus
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2006-2007
*/
@@ -41,7 +41,7 @@
#endif
// QT - Header
-#include <qstring.h>
+#include <tqstring.h>
// D-Bus Header
#include <dbus/dbus.h> // needed for dbus_bool_t
@@ -74,10 +74,11 @@ enum msg_type {
POLICY_POWER_OWNER_CHANGED
};
-class dbusHAL : public QObject{
+class dbusHAL : public TQObject{
Q_OBJECT
+ TQ_OBJECT
-private:
+private:
//! QT connection to D-Bus
DBusQt::Connection* m_dBusQtConnection;
@@ -85,7 +86,7 @@ private:
DBusConnection *dbus_connection;
//! HAL context
LibHalContext *hal_ctx;
-
+
//! to store information if KPowersave is connected to D-Bus
/*!
* This boolean represent information about the state of the connection to D-Bus
@@ -100,7 +101,7 @@ private:
* \li false: if disconnected
*/
bool hal_is_connected;
-
+
//! if we could claim the org.freedesktop.Policy.Power interface
/*!
* This boolean represent information if KPowersave could claim the
@@ -114,7 +115,7 @@ private:
//! to initialise the connection to D-Bus
bool initDBUS();
//! to call a methode on a dbus interface with reply
- bool dbusMethodCall( QString interface, QString path, QString object, QString method,
+ bool dbusMethodCall( TQString interface, TQString path, TQString object, TQString method,
DBusBusType dbus_type, void *retvalue, int retval_type,
int first_arg_type, va_list var_args);
@@ -128,7 +129,7 @@ private:
void freeHAL();
public:
-
+
//! default constructor
dbusHAL();
//! default destructor
@@ -155,7 +156,7 @@ public:
bool isConnectedToHAL();
//! to get info about claim org.freedesktop.Policy.Power interface
bool aquiredPolicyPowerInterface();
-
+
//! return the current HAL context
LibHalContext *get_HAL_context();
//! return the current DBus connection
@@ -163,32 +164,32 @@ public:
/* HAL device information stuff */
//! Query a integer device property from HAL
- bool halGetPropertyInt(QString udi, QString property, int *returnval);
+ bool halGetPropertyInt(TQString udi, TQString property, int *returnval);
//! Query a bolean device property from HAL
- bool halGetPropertyBool(QString udi, QString property, bool *returnval);
+ bool halGetPropertyBool(TQString udi, TQString property, bool *returnval);
//! Query a string device property from HAL
- bool halGetPropertyString(QString udi, QString property, QString *returnval);
+ bool halGetPropertyString(TQString udi, TQString property, TQString *returnval);
//! Query a string list device property from HAL
- bool halGetPropertyStringList (QString udi, QString property, QStringList *devices);
- //! Query a capability for a HAL device
- bool halQueryCapability(QString udi, QString capability, bool *returnval);
+ bool halGetPropertyStringList (TQString udi, TQString property, TQStringList *devices);
+ //! Query a capability for a HAL device
+ bool halQueryCapability(TQString udi, TQString capability, bool *returnval);
/* functions to find devices and check stuff */
//! check if a property exist on a device
- bool halDevicePropertyExist(QString udi, QString property);
+ bool halDevicePropertyExist(TQString udi, TQString property);
//! to find a device by capability
- bool halFindDeviceByCapability (QString capability, QStringList *devices);
+ bool halFindDeviceByCapability (TQString capability, TQStringList *devices);
//! to find a device by a string property
- bool halFindDeviceByString (QString property, QString keyval, QStringList *devices);
-
+ bool halFindDeviceByString (TQString property, TQString keyval, TQStringList *devices);
+
/* D-Bus helper functions */
-
+
/* functions to call methodes */
//! to call a methode on a dbus system bus method without reply
- bool dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
+ bool dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
int first_arg_type, ... );
//! to call a methode on a dbus system bus method with reply
- bool dbusSystemMethodCall( QString interface, QString path, QString object, QString method,
+ bool dbusSystemMethodCall( TQString interface, TQString path, TQString object, TQString method,
void *retvalue, int retval_type, int first_arg_type, ... );
//! to call a suspend method on HAL
@@ -196,14 +197,14 @@ public:
/* PolicyKit call helper */
//! check if the user has a requested privilege
- int isUserPrivileged( QString privilege, QString udi, QString ressource = "", QString user = QString());
+ int isUserPrivileged( TQString privilege, TQString udi, TQString ressource = "", TQString user = TQString());
//! wrapper to emit a signal with a event from HAL
- void emitMsgReceived( msg_type type, QString message, QString string );
-
+ void emitMsgReceived( msg_type type, TQString message, TQString string );
+
signals:
//! signal with message to forward from D-Bus to HAL
- void msgReceived_withStringString( msg_type, QString, QString );
+ void msgReceived_withStringString( msg_type, TQString, TQString );
//! signal if we resumed!
void backFromSuspend( int result );
};
diff --git a/src/detailed_Dialog.ui b/src/detailed_Dialog.ui
index 79a9335..84aae74 100644
--- a/src/detailed_Dialog.ui
+++ b/src/detailed_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>detailed_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>detailed_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -30,7 +30,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>GeneralGroup</cstring>
</property>
@@ -49,7 +49,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSplitter" row="0" column="1">
+ <widget class="TQSplitter" row="0" column="1">
<property name="name">
<cstring>splitter7</cstring>
</property>
@@ -64,15 +64,15 @@
<property name="orientation">
<enum>Horizontal</enum>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout17</cstring>
+ <cstring>tqlayout17</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>InfoLabelValue</cstring>
</property>
@@ -92,11 +92,11 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop|AlignRight</set>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>InfoLabel</cstring>
</property>
@@ -111,7 +111,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignTop</set>
</property>
</widget>
@@ -127,7 +127,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>50</height>
@@ -135,15 +135,15 @@
</property>
</spacer>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout18</cstring>
+ <cstring>tqlayout18</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>InfoPictogram</cstring>
</property>
@@ -155,13 +155,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@@ -181,7 +181,7 @@
<property name="sizeType">
<enum>MinimumExpanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>40</height>
@@ -192,7 +192,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>BatteryGroup</cstring>
</property>
@@ -205,7 +205,7 @@
</sizepolicy>
</property>
<property name="title">
- <string>Battery Status</string>
+ <string>Battery tqStatus</string>
</property>
<grid>
<property name="name">
@@ -221,30 +221,30 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>16</width>
<height>118</height>
</size>
</property>
</spacer>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>LabelAC</cstring>
</property>
@@ -270,7 +270,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>5</width>
<height>20</height>
@@ -300,16 +300,16 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>5</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
- <cstring>LabelACStatus</cstring>
+ <cstring>LabelACtqStatus</cstring>
</property>
<property name="sizePolicy">
<sizepolicy>
@@ -322,13 +322,13 @@
<property name="text">
<string>plugged in</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>powerConsLayout</cstring>
</property>
@@ -336,7 +336,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>tl_powerConsDesc</cstring>
</property>
@@ -344,20 +344,20 @@
<string>Power Consumtion: </string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>tl_powerConsValue</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
</hbox>
</widget>
- <widget class="QFrame" row="0" column="0">
+ <widget class="TQFrame" row="0" column="0">
<property name="name">
<cstring>BatteryFrame</cstring>
</property>
@@ -386,7 +386,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>5</height>
@@ -395,9 +395,9 @@
</spacer>
</grid>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<grid>
<property name="name">
@@ -413,14 +413,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>BatteryPictogram</cstring>
</property>
@@ -432,13 +432,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@@ -452,7 +452,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>ProcessorGroup</cstring>
</property>
@@ -465,15 +465,15 @@
</sizepolicy>
</property>
<property name="title">
- <string>Processor Status</string>
+ <string>Processor tqStatus</string>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout12_2</cstring>
+ <cstring>tqlayout12_2</cstring>
</property>
<grid>
<property name="name">
@@ -489,14 +489,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>90</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>ProcessorPictogram</cstring>
</property>
@@ -508,13 +508,13 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>22</width>
<height>22</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>22</width>
<height>22</height>
@@ -526,7 +526,7 @@
</widget>
</grid>
</widget>
- <widget class="QSplitter" row="0" column="1">
+ <widget class="TQSplitter" row="0" column="1">
<property name="name">
<cstring>splitter6</cstring>
</property>
@@ -541,15 +541,15 @@
<property name="orientation">
<enum>Horizontal</enum>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<grid>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QFrame" row="0" column="0">
+ <widget class="TQFrame" row="0" column="0">
<property name="name">
<cstring>ProcessorFrame</cstring>
</property>
@@ -580,7 +580,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>20</height>
@@ -590,9 +590,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout19</cstring>
+ <cstring>tqlayout19</cstring>
</property>
<grid>
<property name="name">
@@ -608,14 +608,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>230</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>OkButton</cstring>
</property>
@@ -638,5 +638,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/detaileddialog.cpp b/src/detaileddialog.cpp
index b75fcc9..2925062 100644
--- a/src/detaileddialog.cpp
+++ b/src/detaileddialog.cpp
@@ -33,11 +33,11 @@
#include <klocale.h>
// QT headers:
-#include <qpushbutton.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qgroupbox.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqgroupbox.h>
// own headers
#include "detaileddialog.h"
@@ -45,9 +45,9 @@
/*!
* This is the default constructor of the class detaileddialog.
*/
-detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Settings *_set,
- QWidget* parent, const char* name )
- : detailed_Dialog( parent, name, false, WDestructiveClose ) {
+detaileddialog::detaileddialog( HardwareInfo *_hwinfo, TQPixmap *_pixmap, Settings *_set,
+ TQWidget* tqparent, const char* name )
+ : detailed_Dialog( tqparent, name, false, WDestructiveClose ) {
kdDebugFuncIn(trace);
hwinfo = _hwinfo;
config = _set;
@@ -65,22 +65,22 @@ detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Setting
GeneralGroup->setTitle(i18n("Miscellaneous"));
ProcessorGroup->setTitle(i18n("CPUs"));
- ProcessorGridLayout = new QGridLayout(ProcessorFrame, numOfCPUs, 2, 0, 5, "ProcessorGridLayout");
+ ProcessorGridLayout = new TQGridLayout(ProcessorFrame, numOfCPUs, 2, 0, 5, "ProcessorGridLayout");
if (batteries > 0) {
if (batteries > 1) batteries++;
BatteryGroup->setTitle(i18n("Battery state:").remove(":"));
- BatteryGridLayout = new QGridLayout(BatteryFrame, batteries, 2, 0, 5, "BatteryGridLayout");
+ BatteryGridLayout = new TQGridLayout(BatteryFrame, batteries, 2, 0, 5, "BatteryGridLayout");
for (int i = 0; i < batteries; i++) {
- QLabel *Label = new QLabel(BatteryFrame, "BatteryLabel");
+ TQLabel *Label = new TQLabel(BatteryFrame, "BatteryLabel");
if ((primaryBatteries->getNumBatteries() > 1) && (i == 0))
Label->setText( i18n( "Total:" ));
else if ((primaryBatteries->getNumBatteries() > 1) && (i > 0))
- Label->setText( i18n( "Battery %1" ).arg(i));
+ Label->setText( i18n( "Battery %1" ).tqarg(i));
else
- Label->setText( i18n( "Battery %1" ).arg(i + 1));
+ Label->setText( i18n( "Battery %1" ).tqarg(i + 1));
BatteryGridLayout->addWidget( Label, i , 0);
@@ -93,12 +93,12 @@ detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Setting
BatteryFrame->adjustSize();
tl_powerConsDesc->hide();
tl_powerConsValue->hide();
- connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setBattery()));
- connect(primaryBatteries, SIGNAL(batteryChanged()), this, SLOT(setBattery()));
- connect(primaryBatteries, SIGNAL(batteryChargingStateChanged(int)), this,
- SLOT(setPowerConsumption()));
- connect(primaryBatteries, SIGNAL(batteryRateChanged()), this,
- SLOT(setPowerConsumption()));
+ connect(hwinfo, TQT_SIGNAL(generalDataChanged()), this, TQT_SLOT(setBattery()));
+ connect(primaryBatteries, TQT_SIGNAL(batteryChanged()), this, TQT_SLOT(setBattery()));
+ connect(primaryBatteries, TQT_SIGNAL(batteryChargingStateChanged(int)), this,
+ TQT_SLOT(setPowerConsumption()));
+ connect(primaryBatteries, TQT_SIGNAL(batteryRateChanged()), this,
+ TQT_SLOT(setPowerConsumption()));
setBattery();
setPowerConsumption();
} else {
@@ -110,8 +110,8 @@ detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Setting
ProcessorPictogram->setPixmap(SmallIcon("processor", 22));
for (int i = 0; i < numOfCPUs; i++) {
- QLabel *Label = new QLabel(ProcessorFrame, "ProcessorLabel");
- Label->setText( i18n( "Processor %1" ).arg(i + 1));
+ TQLabel *Label = new TQLabel(ProcessorFrame, "ProcessorLabel");
+ Label->setText( i18n( "Processor %1" ).tqarg(i + 1));
ProcessorGridLayout->addWidget( Label, i , 0);
KProgress *CPUPBar = new KProgress(ProcessorFrame, "ProcessorPBar");
@@ -122,21 +122,21 @@ detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Setting
}
ProcessorFrame->adjustSize();
- connect(OkButton, SIGNAL(clicked()), this, SLOT(closeDetailedDlg()));
- connect(hwinfo, SIGNAL(ACStatus(bool)), this, SLOT(setAC()));
+ connect(OkButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeDetailedDlg()));
+ connect(hwinfo, TQT_SIGNAL(ACtqStatus(bool)), this, TQT_SLOT(setAC()));
// TODO: replace event
- //connect(pd, SIGNAL(schemeDataChanged()), this, SLOT(setInfos()));
- connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setInfos()));
+ //connect(pd, TQT_SIGNAL(schemeDataChanged()), this, TQT_SLOT(setInfos()));
+ connect(hwinfo, TQT_SIGNAL(generalDataChanged()), this, TQT_SLOT(setInfos()));
if (hwinfo->supportCPUFreq() || cpuInfo->cpuFreqHW) {
// Check if cpufreq is available
cpuInfo->getCPUMaxSpeed();
setProcessor();
- connect(hwinfo, SIGNAL(currentCPUFreqPolicyChanged()), this, SLOT(setInfos()));
+ connect(hwinfo, TQT_SIGNAL(currentCPUFreqPolicyChanged()), this, TQT_SLOT(setInfos()));
} else {
// .. if not, use cpu throttling
if (!cpuInfo->getCPUThrottlingState() || numOfCPUs <= 1) {
- connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(setProcessorThrottling()));
+ connect(hwinfo, TQT_SIGNAL(generalDataChanged()), this, TQT_SLOT(setProcessorThrottling()));
}
setProcessorThrottling();
}
@@ -150,11 +150,11 @@ detaileddialog::detaileddialog( HardwareInfo *_hwinfo, QPixmap *_pixmap, Setting
/*! This is the default destructor of class detaileddialog. */
detaileddialog::~detaileddialog() {
kdDebugFuncIn(trace);
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*!
- * \b SLOT called if the dialog is closed by the user.
+ * \b TQT_SLOT called if the dialog is closed by the user.
* We do some cleanups here.
*/
void detaileddialog::closeDetailedDlg() {
@@ -165,18 +165,18 @@ void detaileddialog::closeDetailedDlg() {
}
/*!
- * \b SLOT to set up the battery progress widgets.
+ * \b TQT_SLOT to set up the battery progress widgets.
*/
void detaileddialog::setBattery() {
kdDebugFuncIn(trace);
- QString minutes;
+ TQString minutes;
int batteries = 0;
// refresh battery collection
primaryBatteries = hwinfo->getPrimaryBatteries();
- QPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
+ TQPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
batteries = primaryBatteries->getNumBatteries();
@@ -242,10 +242,10 @@ void detaileddialog::setBattery() {
// this should fix apm, where we have no time info if charging
BatteryPBar[i]->setFormat("%p% " + i18n("charged"));
} else if (_c_state == CHARGING) {
- QString temp = i18n("%1:%2 h until charged").arg(hours).arg(minutes);
+ TQString temp = i18n("%1:%2 h until charged").tqarg(hours).tqarg(minutes);
BatteryPBar[i]->setFormat(temp);
} else if (_c_state == DISCHARGING) {
- QString temp = i18n("%1:%2 h remaining").arg(hours).arg(minutes);
+ TQString temp = i18n("%1:%2 h remaining").tqarg(hours).tqarg(minutes);
BatteryPBar[i]->setFormat(temp);
} else {
@@ -266,7 +266,7 @@ void detaileddialog::setBattery() {
}
/*!
- * \b SLOT to set up the Processor/CPU progress bar widgets.
+ * \b TQT_SLOT to set up the Processor/CPU progress bar widgets.
*/
void detaileddialog::setPowerConsumption() {
kdDebugFuncIn(trace);
@@ -277,7 +277,7 @@ void detaileddialog::setPowerConsumption() {
if (rate > 0 && !primaryBatteries->getChargeLevelUnit().isEmpty()) {
- QString _val;
+ TQString _val;
_val.setNum(rate);
_val += " " + primaryBatteries->getChargeLevelUnit().remove('h');
@@ -298,7 +298,7 @@ void detaileddialog::setPowerConsumption() {
}
/*!
- * \b SLOT to set up the Processor/CPU progress bar widgets.
+ * \b TQT_SLOT to set up the Processor/CPU progress bar widgets.
*/
void detaileddialog::setProcessor() {
kdDebugFuncIn(trace);
@@ -332,12 +332,12 @@ void detaileddialog::setProcessor() {
ProcessorPBar[i]->setEnabled(false);
}
}
- QTimer::singleShot(333, this, SLOT(setProcessor()));
+ TQTimer::singleShot(333, this, TQT_SLOT(setProcessor()));
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT to set up the Processor/CPU bar widgets for cpu throttling machines.
+ * \b TQT_SLOT to set up the Processor/CPU bar widgets for cpu throttling machines.
*/
void detaileddialog::setProcessorThrottling() {
kdDebugFuncOut(trace);
@@ -355,7 +355,7 @@ void detaileddialog::setProcessorThrottling() {
if (throttling && cpuInfo->cpufreq_speed[i] > 0 && cpuInfo->cpu_throttling[i] >= 0) {
// get max cpu freq and set it to the max of the progressbar
ProcessorPBar[i]->setTotalSteps(100);
- QString ProgressString = QString("%1% (%2 MHz)").arg(100 - cpuInfo->cpu_throttling[i]).arg(cpuInfo->cpufreq_speed[i]);
+ TQString ProgressString = TQString("%1% (%2 MHz)").tqarg(100 - cpuInfo->cpu_throttling[i]).tqarg(cpuInfo->cpufreq_speed[i]);
ProcessorPBar[i]->setFormat(i18n(ProgressString.ascii()));
ProcessorPBar[i]->setProgress(100 - cpuInfo->cpu_throttling[i]);
ProcessorPBar[i]->setEnabled(true);
@@ -375,24 +375,24 @@ void detaileddialog::setProcessorThrottling() {
// currently there are no events we can use to get actual data
// so we recheck data ever 2 secs to register changes in the
// throttling state and if a CPU/core online state change
- QTimer::singleShot(2000, this, SLOT(setProcessorThrottling()));
+ TQTimer::singleShot(2000, this, TQT_SLOT(setProcessorThrottling()));
}
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT to set up the AC status within the Led widget.
+ * \b TQT_SLOT to set up the AC status within the Led widget.
*/
void detaileddialog::setAC() {
kdDebugFuncIn(trace);
if (hwinfo->getAcAdapter()) {
- LabelACStatus->setText( i18n("plugged in") );
+ LabelACtqStatus->setText( i18n("plugged in") );
LedAC->on();
} else {
LedAC->off();
- LabelACStatus->setText( i18n("unplugged") );
+ LabelACtqStatus->setText( i18n("unplugged") );
}
setInfos();
@@ -400,14 +400,14 @@ void detaileddialog::setAC() {
}
/*!
- * \b SLOT to set all additional informtation as e.g. CPUFrequency policy
+ * \b TQT_SLOT to set all additional informtation as e.g. CPUFrequency policy
* or current scheme
*/
void detaileddialog::setInfos() {
kdDebugFuncOut(trace);
- QString display;
- QString displayValue;
+ TQString display;
+ TQString displayValue;
if(!config->currentScheme.isEmpty())
display += i18n("Current Scheme: ") + "\n";
@@ -447,7 +447,7 @@ void detaileddialog::setInfos() {
// refresh battery collection
primaryBatteries = hwinfo->getPrimaryBatteries();
int batteries = primaryBatteries->getNumBatteries();
- QPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
+ TQPtrList<Battery> allBatteries = hwinfo->getAllBatteries();
if (batteries > 0 && primaryBatteries->getNumPresentBatteries() > 0) {
diff --git a/src/detaileddialog.h b/src/detaileddialog.h
index 3873030..59220cd 100644
--- a/src/detaileddialog.h
+++ b/src/detaileddialog.h
@@ -29,7 +29,7 @@
#include <kprogress.h>
// other QT headers:
-#include <qpixmap.h>
+#include <tqpixmap.h>
// own headers:
#include "hardware.h"
@@ -51,10 +51,11 @@
class detaileddialog: public detailed_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- detaileddialog(HardwareInfo *_hwinfo, QPixmap *_pixmap, Settings *_set, QWidget *parent = 0, const char *name = 0);
+ detaileddialog(HardwareInfo *_hwinfo, TQPixmap *_pixmap, Settings *_set, TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~detaileddialog();
@@ -85,29 +86,29 @@ private:
Settings *config;
//! pointer to the kpowersave class
- QPixmap *pixmap;
+ TQPixmap *pixmap;
//! the numbers of CPUs in the system
int numOfCPUs;
//! list of progressbars for battery information
/*!
- * This QValueList with type KProgress contains the list
+ * This TQValueList with type KProgress contains the list
* of battery progress widgets. Each element represent
* one battery or batteryslot
*/
- QValueList<KProgress *> BatteryPBar;
+ TQValueList<KProgress *> BatteryPBar;
//! list of progressbars for CPU information
/*!
- * This QValueList with type KProgress contains the list
+ * This TQValueList with type KProgress contains the list
* of CPU progress widgets. Each element represent one CPU.
*/
- QValueList<KProgress *> ProcessorPBar;
+ TQValueList<KProgress *> ProcessorPBar;
- //! QGridLayout for Battery progress widgets
- QGridLayout* BatteryGridLayout;
- //! QGridLayout for Processor progress widgets
- QGridLayout* ProcessorGridLayout;
+ //! TQGridLayout for Battery progress widgets
+ TQGridLayout* BatteryGridLayout;
+ //! TQGridLayout for Processor progress widgets
+ TQGridLayout* ProcessorGridLayout;
};
#endif
diff --git a/src/dummy.cpp b/src/dummy.cpp
index 4db9268..bd3f2f9 100644
--- a/src/dummy.cpp
+++ b/src/dummy.cpp
@@ -24,13 +24,13 @@
* \date 2007
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
class dummy {
dummy() {
- QString dummy;
+ TQString dummy;
// from configuredialog.cpp:
dummy = i18n("If the current desktop user is inactive, dim the display to:");
@@ -57,20 +57,20 @@ class dummy {
dummy = i18n("activated");
dummy = i18n("deactivated");
dummy = i18n("do nothing");
- dummy = i18n("Deactivate following devices:");
- dummy = i18n("Activate following devices");
- dummy = i18n("Reactivate following devices");
- dummy = i18n("Deactivate following device classes:");
- dummy = i18n("Activate following devices classes");
- dummy = i18n("Reactivate following device classes");
- dummy = i18n("If the scheme switched all devices are again activated.");
+ dummy = i18n("Deactivate following tqdevices:");
+ dummy = i18n("Activate following tqdevices");
+ dummy = i18n("Reactivate following tqdevices");
+ dummy = i18n("Deactivate following tqdevice classes:");
+ dummy = i18n("Activate following tqdevices classes");
+ dummy = i18n("Reactivate following tqdevice classes");
+ dummy = i18n("If the scheme switched all tqdevices are again activated.");
dummy = i18n("This is a experimental feature.");
dummy = i18n("If you have problems with this feature, please report them.");
- dummy = i18n("Select one of the available devices and click on ");
- dummy = i18n("Select one of the available device classes and click on ");
- dummy = i18n("Select one or more of the available devices and click on ");
- dummy = i18n("Select one or more of the available device classes and click on ");
- dummy = i18n("Please note: If you e.g. deactivate a network device you may lose your "
+ dummy = i18n("Select one of the available tqdevices and click on ");
+ dummy = i18n("Select one of the available tqdevice classes and click on ");
+ dummy = i18n("Select one or more of the available tqdevices and click on ");
+ dummy = i18n("Select one or more of the available tqdevice classes and click on ");
+ dummy = i18n("Please note: If you e.g. deactivate a network tqdevice you may lose your "
"internet connection.");
dummy = i18n("<b>Note:</b> If you select this option, the computer will suspend or standby "
"if the current user is inactive for the defined time. <br><br> This feature "
@@ -92,11 +92,11 @@ class dummy {
// for kpowersave.cpp:
dummy = i18n("Cannot connect to D-Bus. The D-Bus daemon may not be running.");
- dummy = i18n("Scheme switched to %1. \n Deactivate following devices: %2").arg("").arg("");
- dummy = i18n("Scheme switched to %1. \n Activate following devices: %2").arg("").arg("");
+ dummy = i18n("Scheme switched to %1. \n Deactivate following tqdevices: %2").tqarg("").tqarg("");
+ dummy = i18n("Scheme switched to %1. \n Activate following tqdevices: %2").tqarg("").tqarg("");
dummy = i18n("Report ...");
dummy = i18n("Suspend to RAM is not supported on your machine.");
- dummy = i18n("Additionally, please mail the output of %1 to %2 . Thanks!").arg("").arg("");
+ dummy = i18n("Additionally, please mail the output of %1 to %2 . Thanks!").tqarg("").tqarg("");
dummy = i18n("Power consumption");
// for screen.cpp
@@ -116,12 +116,12 @@ class dummy {
dummy = i18n("Session active:");
// for countdowndialog.cpp
- dummy = i18n("The display get dimmed down to %1% in: ").arg(30);
+ dummy = i18n("The display get dimmed down to %1% in: ").tqarg(30);
// other ConsoleKit related stuff
- dummy = i18n("Could not call %1. The current desktop session is not active.").arg("");
- dummy = i18n("Could not set %1. The current desktop session is not active.").arg("");
- dummy = i18n("Stopped %1. The current desktop session is now inactive.").arg("");
- dummy = i18n("Restarted %1. The current desktop session is now active again.").arg("");
+ dummy = i18n("Could not call %1. The current desktop session is not active.").tqarg("");
+ dummy = i18n("Could not set %1. The current desktop session is not active.").tqarg("");
+ dummy = i18n("Stopped %1. The current desktop session is now inactive.").tqarg("");
+ dummy = i18n("Restarted %1. The current desktop session is now active again.").tqarg("");
}
};
diff --git a/src/hardware.cpp b/src/hardware.cpp
index 6be19a1..a07b3e5 100644
--- a/src/hardware.cpp
+++ b/src/hardware.cpp
@@ -28,8 +28,8 @@
#include <fcntl.h>
// include QT header
-#include <qtimer.h>
-#include <qdir.h>
+#include <tqtimer.h>
+#include <tqdir.h>
// include own header
#include "hardware.h"
@@ -61,8 +61,8 @@ HardwareInfo::HardwareInfo() {
primaryBatteriesLowLevel = 7;
primaryBatteriesCriticalLevel = 2;
- allUDIs = QStringList();
- consoleKitSession = QString();
+ allUDIs = TQStringList();
+ consoleKitSession = TQString();
BatteryList.setAutoDelete( true ); // the list owns the objects
primaryBatteries = new BatteryCollection(BAT_PRIMARY);
@@ -93,9 +93,9 @@ HardwareInfo::HardwareInfo() {
updatePrimaryBatteries();
// connect to signals
- connect(dbus_HAL, SIGNAL(msgReceived_withStringString( msg_type, QString, QString )),
- this, SLOT(processMessage( msg_type, QString, QString )));
- connect(dbus_HAL, SIGNAL(backFromSuspend(int)), this, SLOT(handleResumeSignal(int)));
+ connect(dbus_HAL, TQT_SIGNAL(msgReceived_withStringString( msg_type, TQString, TQString )),
+ this, TQT_SLOT(processMessage( msg_type, TQString, TQString )));
+ connect(dbus_HAL, TQT_SIGNAL(backFromSuspend(int)), this, TQT_SLOT(handleResumeSignal(int)));
kdDebugFuncOut(trace);
}
@@ -122,7 +122,7 @@ void HardwareInfo::reconnectDBUS() {
if (!_reconnect && !dbus_HAL->isConnectedToDBUS()) {
//reconnect failed
emit dbusRunning(DBUS_NOT_RUNNING);
- QTimer::singleShot(4000, this, SLOT(reconnectDBUS()));
+ TQTimer::singleShot(4000, this, TQT_SLOT(reconnectDBUS()));
} else if (!_reconnect && dbus_HAL->isConnectedToDBUS()) {
// reset everything, we are reconnected
dbus_terminated = false;
@@ -163,7 +163,7 @@ bool HardwareInfo::reinitHardwareInfos () {
update_info_cpufreq_policy_changed = true;
update_info_primBattery_changed = true;
- allUDIs = QStringList();
+ allUDIs = TQStringList();
BatteryList.clear();
primaryBatteries = new BatteryCollection(BAT_PRIMARY);
@@ -196,7 +196,7 @@ bool HardwareInfo::reinitHardwareInfos () {
* \param message the message
* \param value an optional message value as e.g. message string
*/
-void HardwareInfo::processMessage (msg_type type, QString message, QString value) {
+void HardwareInfo::processMessage (msg_type type, TQString message, TQString value) {
kdDebugFuncIn(trace);
switch(type) {
@@ -208,7 +208,7 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
if ( message.startsWith("dbus.terminate")){
// TODO: addapt from pdaemon
dbus_terminated = true;
- QTimer::singleShot(4000, this, SLOT(reconnectDBUS()));
+ TQTimer::singleShot(4000, this, TQT_SLOT(reconnectDBUS()));
}
else if ( message.startsWith("hal.")) {
if ( message.startsWith("hal.terminate")) {
@@ -250,7 +250,7 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
}
}
} else if (message.startsWith("DeviceRemoved")) {
- if (allUDIs.contains(value)) {
+ if (allUDIs.tqcontains(value)) {
if (checkIfHandleDevice(value, &_type)) {
switch (_type) {
case BATTERY:
@@ -276,19 +276,19 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
}
break;
case HAL_PROPERTY_CHANGED:
- if (!message.isEmpty() && allUDIs.contains( message )) {
+ if (!message.isEmpty() && allUDIs.tqcontains( message )) {
if (value.startsWith( "ac_adapter.present" )) {
- QTimer::singleShot(50, this, SLOT(checkACAdapterState()));
+ TQTimer::singleShot(50, this, TQT_SLOT(checkACAdapterState()));
} else if (value.startsWith( "battery." )) {
// this is a battery event
updateBatteryValues(message, value);
} else if (value.startsWith( "button.state.value" )) {
if (message.startsWith( *udis["lidclose"] )) {
- QTimer::singleShot(50, this, SLOT(checkLidcloseState()));
+ TQTimer::singleShot(50, this, TQT_SLOT(checkLidcloseState()));
}
} else if (value.startsWith( "laptop_panel")) {
if (message.startsWith( *udis["laptop_panel"] )) {
- QTimer::singleShot(50, this, SLOT(checkBrightness()));
+ TQTimer::singleShot(50, this, TQT_SLOT(checkBrightness()));
}
}
// TODO: add needed code
@@ -302,18 +302,18 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
if (message.startsWith("ButtonPressed")) {
kdDebug() << "ButtonPressed event from HAL: " << value << endl;
if (value.startsWith("lid")) {
- QTimer::singleShot(50, this, SLOT(checkLidcloseState()));
+ TQTimer::singleShot(50, this, TQT_SLOT(checkLidcloseState()));
} else if (value.startsWith("power")) {
- QTimer::singleShot(50, this, SLOT(emitPowerButtonPressed()));
+ TQTimer::singleShot(50, this, TQT_SLOT(emitPowerButtonPressed()));
} else if (value.startsWith("sleep") || value.startsWith("suspend")) {
- QTimer::singleShot(50, this, SLOT(emitSleepButtonPressed()));
+ TQTimer::singleShot(50, this, TQT_SLOT(emitSleepButtonPressed()));
} else if (value.startsWith("hibernate")) {
- QTimer::singleShot(50, this, SLOT(emitS2diskButtonPressed()));
+ TQTimer::singleShot(50, this, TQT_SLOT(emitS2diskButtonPressed()));
} else if (value.startsWith("brightness-")) {
if (!brightness_in_hardware && value.endsWith("-up"))
- QTimer::singleShot(50, this, SLOT(brightnessUpPressed()));
+ TQTimer::singleShot(50, this, TQT_SLOT(brightnessUpPressed()));
else if (!brightness_in_hardware && value.endsWith("-down"))
- QTimer::singleShot(50, this, SLOT(brightnessDownPressed()));
+ TQTimer::singleShot(50, this, TQT_SLOT(brightnessDownPressed()));
}
} else {
kdDebug() << "Unmonitored HAL_CONDITION: " << message << " : " << value << endl;
@@ -327,7 +327,7 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
} else {
sessionIsActive = false;
}
- QTimer::singleShot(50, this, SLOT(emitSessionActiveState()));
+ TQTimer::singleShot(50, this, TQT_SLOT(emitSessionActiveState()));
} else {
if (trace)
kdDebug() << "CONSOLEKIT_SESSION_ACTIVE: not our session" << endl;
@@ -350,7 +350,7 @@ void HardwareInfo::processMessage (msg_type type, QString message, QString value
}
/*!
- * This SLOT is used to fetch the resume signal and multiplex. If needed some
+ * This TQT_SLOT is used to fetch the resume signal and multiplex. If needed some
* actions after resume, do this here.
* \param result integer with the result of the resume/suspend
*/
@@ -367,7 +367,7 @@ void HardwareInfo::handleResumeSignal (int result) {
emit resumed(result);
}
- calledSuspend = QTime();
+ calledSuspend = TQTime();
kdDebugFuncOut(trace);
}
@@ -429,23 +429,23 @@ bool HardwareInfo::checkConsoleKitSession () {
/*!
* This function check for a given UDI, if we should handle a device
- * \param _udi QString with the UDI of the device
+ * \param _udi TQString with the UDI of the device
* \param *type pointer to a integer to return the type of the device, see \ref device_type
* \return Boolean with info if we should handle the device.
* \retval true if we should handle
* \retval false if not
*/
-bool HardwareInfo::checkIfHandleDevice ( QString _udi, int *type) {
+bool HardwareInfo::checkIfHandleDevice ( TQString _udi, int *type) {
kdDebugFuncIn(trace);
- QStringList _cap;
+ TQStringList _cap;
bool ret = true;
if (dbus_HAL->halGetPropertyStringList( _udi, "info.capabilities", &_cap) && !_cap.isEmpty()) {
- if (_cap.contains("ac_adapter")) {
+ if (_cap.tqcontains("ac_adapter")) {
*type = BATTERY;
- } else if (_cap.contains("button")) {
- QString _val;
+ } else if (_cap.tqcontains("button")) {
+ TQString _val;
if (dbus_HAL->halGetPropertyString( _udi, "button.type", &_val)) {
if (_val.startsWith("lid")) {
*type = LID;
@@ -459,9 +459,9 @@ bool HardwareInfo::checkIfHandleDevice ( QString _udi, int *type) {
} else {
ret = false;
}
- } else if (_cap.contains("battery")) {
+ } else if (_cap.tqcontains("battery")) {
*type = BATTERY;
- } else if (_cap.contains("laptop_panel")) {
+ } else if (_cap.tqcontains("laptop_panel")) {
*type = LAPTOP_PANEL;
} else {
ret = false;
@@ -515,7 +515,7 @@ void HardwareInfo::setPrimaryBatteriesWarningLevel (int _warn, int _low, int _cr
void HardwareInfo::checkIsLaptop () {
kdDebugFuncIn(trace);
- QString ret;
+ TQString ret;
if (dbus_HAL->halGetPropertyString(HAL_COMPUTER_UDI, "system.formfactor", &ret)) {
@@ -537,7 +537,7 @@ void HardwareInfo::checkIsLaptop () {
void HardwareInfo::checkPowermanagement() {
kdDebugFuncIn(trace);
- QString ret;
+ TQString ret;
has_APM = false;
has_ACPI = false;
@@ -566,7 +566,7 @@ void HardwareInfo::checkPowermanagement() {
void HardwareInfo::checkSuspend() {
kdDebugFuncIn(trace);
- QStringList ret;
+ TQStringList ret;
bool _ret_b = false;
suspend_states = SuspendStates();
@@ -579,7 +579,7 @@ void HardwareInfo::checkSuspend() {
&_ret_b )) {
suspend_states.suspend2ram_can = _ret_b;
if (_ret_b) {
- if (ret.contains( "Suspend" )) {
+ if (ret.tqcontains( "Suspend" )) {
suspend_states.suspend2ram = true;
suspend_states.suspend2ram_allowed = dbus_HAL->isUserPrivileged(PRIV_SUSPEND,
HAL_COMPUTER_UDI);
@@ -600,7 +600,7 @@ void HardwareInfo::checkSuspend() {
&_ret_b )) {
suspend_states.suspend2disk_can = _ret_b;
if (_ret_b) {
- if (ret.contains( "Hibernate" )) {
+ if (ret.tqcontains( "Hibernate" )) {
suspend_states.suspend2disk = true;
suspend_states.suspend2disk_allowed =
dbus_HAL->isUserPrivileged(PRIV_HIBERNATE,
@@ -620,7 +620,7 @@ void HardwareInfo::checkSuspend() {
if (dbus_HAL->halGetPropertyBool( HAL_COMPUTER_UDI, "power_management.can_standby", &_ret_b )) {
suspend_states.standby_can = _ret_b;
if (_ret_b) {
- if (ret.contains( "Standby" )) {
+ if (ret.tqcontains( "Standby" )) {
suspend_states.standby = true;
suspend_states.standby_allowed = dbus_HAL->isUserPrivileged(PRIV_STANDBY,
HAL_COMPUTER_UDI);
@@ -720,7 +720,7 @@ cpufreq_type HardwareInfo::checkCurrentCPUFreqPolicy() {
void HardwareInfo::checkBrightness() {
kdDebugFuncIn(trace);
- QStringList devices;
+ TQStringList devices;
brightness = false;
currentBrightnessLevel = -1;
@@ -739,8 +739,8 @@ void HardwareInfo::checkBrightness() {
kdDebug() << "laptop_panel device found: " << devices.first() << endl;
// we should asume there is only one laptop panel device in the system
if (dbus_HAL->halGetPropertyInt(devices.first(), "laptop_panel.num_levels", &retval )) {
- udis.insert("laptop_panel", new QString( devices.first() ));
- if (!allUDIs.contains( devices.first() ))
+ udis.insert("laptop_panel", new TQString( devices.first() ));
+ if (!allUDIs.tqcontains( devices.first() ))
allUDIs.append( devices.first() );
if (retval > 1) {
@@ -798,17 +798,17 @@ void HardwareInfo::checkCurrentBrightness() {
bool HardwareInfo::intialiseHWInfo() {
kdDebugFuncIn(trace);
- QStringList ret;
+ TQStringList ret;
if (!dbus_HAL->isConnectedToDBUS() || !dbus_HAL->isConnectedToHAL())
return false;
if( dbus_HAL->halFindDeviceByCapability("ac_adapter", &ret)) {
// there should be normaly only one device, but let be sure
- for ( QStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
+ for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
// we need a deep copy
- udis.insert("acadapter", new QString( *it ));
- if (!allUDIs.contains( *it ))
+ udis.insert("acadapter", new TQString( *it ));
+ if (!allUDIs.tqcontains( *it ))
allUDIs.append( *it );
checkACAdapterState();
}
@@ -818,10 +818,10 @@ bool HardwareInfo::intialiseHWInfo() {
if( dbus_HAL->halFindDeviceByString("button.type", "lid", &ret)) {
// there should be normaly only one device, but let be sure
- for ( QStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
+ for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
// we need a deep copy
- udis.insert("lidclose", new QString( *it ));
- if (!allUDIs.contains( *it ))
+ udis.insert("lidclose", new TQString( *it ));
+ if (!allUDIs.tqcontains( *it ))
allUDIs.append( *it );
checkLidcloseState();
}
@@ -833,8 +833,8 @@ bool HardwareInfo::intialiseHWInfo() {
if( dbus_HAL->halFindDeviceByCapability("battery", &ret)) {
if (!ret.isEmpty()) {
// there should be normaly only one device, but let be sure
- for ( QStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
- if (!allUDIs.contains( *it ))
+ for ( TQStringList::iterator it = ret.begin(); it != ret.end(); ++it ) {
+ if (!allUDIs.tqcontains( *it ))
allUDIs.append( *it );
BatteryList.append( new Battery(dbus_HAL, *it) );
}
@@ -843,7 +843,7 @@ bool HardwareInfo::intialiseHWInfo() {
Battery *bat;
for (bat = BatteryList.first(); bat; bat = BatteryList.next() ) {
if (bat->getType() == BAT_PRIMARY) {
- connect(bat, SIGNAL(changedBattery()),this, SLOT(updatePrimaryBatteries()));
+ connect(bat, TQT_SIGNAL(changedBattery()),this, TQT_SLOT(updatePrimaryBatteries()));
}
}
}
@@ -854,7 +854,7 @@ bool HardwareInfo::intialiseHWInfo() {
}
/*!
- * The function/SLOT checks the state of the AC adapter.
+ * The function/TQT_SLOT checks the state of the AC adapter.
*/
void HardwareInfo::checkACAdapterState() {
kdDebugFuncIn(trace);
@@ -866,7 +866,7 @@ void HardwareInfo::checkACAdapterState() {
if (_state != acadapter) {
acadapter = _state;
update_info_ac_changed = true;
- emit ACStatus( acadapter );
+ emit ACtqStatus( acadapter );
} else {
update_info_ac_changed = false;
}
@@ -891,7 +891,7 @@ void HardwareInfo::checkLidcloseState() {
if (dbus_HAL->halGetPropertyBool(*udis["lidclose"] , "button.state.value", &_state )) {
if (_state != lidclose) {
lidclose = _state;
- emit lidcloseStatus( lidclose );
+ emit lidclosetqStatus( lidclose );
}
} else {
lidclose = false;
@@ -904,13 +904,13 @@ void HardwareInfo::checkLidcloseState() {
/*!
* This funtion is used to call a update of a battery value for a given
* UDI and the given changed property
- * \param udi QString with the UDI of the battery
- * \param property QString with the changed property
+ * \param udi TQString with the UDI of the battery
+ * \param property TQString with the changed property
*/
-void HardwareInfo::updateBatteryValues (QString udi, QString property) {
+void HardwareInfo::updateBatteryValues (TQString udi, TQString property) {
kdDebugFuncIn(trace);
- if (!udi.isEmpty() && allUDIs.contains( udi )) {
+ if (!udi.isEmpty() && allUDIs.tqcontains( udi )) {
// find effected battery object
Battery *bat;
for (bat = BatteryList.first(); bat; bat = BatteryList.next() ) {
@@ -937,10 +937,10 @@ void HardwareInfo::updatePrimaryBatteries () {
if (primaryBatteries->getNumBatteries() < 1) {
setPrimaryBatteriesWarningLevel();
primaryBatteries->refreshInfo( BatteryList );
- connect(primaryBatteries, SIGNAL(batteryChanged()), this,
- SLOT(setPrimaryBatteriesChanges()));
- connect(primaryBatteries, SIGNAL(batteryWarnState(int,int)), this,
- SLOT(emitBatteryWARNState(int,int)));
+ connect(primaryBatteries, TQT_SIGNAL(batteryChanged()), this,
+ TQT_SLOT(setPrimaryBatteriesChanges()));
+ connect(primaryBatteries, TQT_SIGNAL(batteryWarnState(int,int)), this,
+ TQT_SLOT(emitBatteryWARNState(int,int)));
} else {
setPrimaryBatteriesWarningLevel();
primaryBatteries->refreshInfo( BatteryList );
@@ -993,7 +993,7 @@ void HardwareInfo::emitBatteryWARNState (int type, int state) {
bool HardwareInfo::suspend( suspend_type suspend ) {
kdDebugFuncIn(trace);
- calledSuspend = QTime();
+ calledSuspend = TQTime();
if (dbus_HAL->isConnectedToDBUS() && dbus_HAL->isConnectedToHAL()) {
switch (suspend) {
@@ -1133,7 +1133,7 @@ bool HardwareInfo::setCPUFreq ( cpufreq_type cpufreq, int limit ) {
if (dbus_HAL->isConnectedToDBUS() && dbus_HAL->isConnectedToHAL()) {
dbus_bool_t consider = (dbus_bool_t) getAcAdapter();
- QStringList dynamic;
+ TQStringList dynamic;
if (checkCurrentCPUFreqPolicy() == cpufreq) {
if (cpufreq == DYNAMIC && !cpuFreqGovernor.startsWith("ondemand")) {
@@ -1155,7 +1155,7 @@ bool HardwareInfo::setCPUFreq ( cpufreq_type cpufreq, int limit ) {
case DYNAMIC:
dynamic << "ondemand" << "userspace" << "conservative";
- for (QStringList::Iterator it = dynamic.begin(); it != dynamic.end(); it++){
+ for (TQStringList::Iterator it = dynamic.begin(); it != dynamic.end(); it++){
kdDebug() << "Try to set dynamic CPUFreq to: " << *it << endl;
if (setCPUFreqGovernor((*it).latin1())) {
@@ -1604,9 +1604,9 @@ BatteryCollection* HardwareInfo::getPrimaryBatteries() const {
/*!
* The function return all batteries
- * \return QPtrList<Battery>
+ * \return TQPtrList<Battery>
*/
-QPtrList<Battery> HardwareInfo::getAllBatteries() const {
+TQPtrList<Battery> HardwareInfo::getAllBatteries() const {
return BatteryList;
}
diff --git a/src/hardware.h b/src/hardware.h
index 826deb6..9443675 100644
--- a/src/hardware.h
+++ b/src/hardware.h
@@ -39,11 +39,11 @@
#endif
// QT - Header
-#include <qstring.h>
-#include <qobject.h>
-#include <qvaluelist.h>
-#include <qptrlist.h>
-#include <qdict.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
+#include <tqptrlist.h>
+#include <tqdict.h>
// HAL Library
#include <hal/libhal.h>
@@ -119,15 +119,16 @@ typedef struct SuspendStates {
}
} SuspendStates;
-class HardwareInfo : public QObject{
+class HardwareInfo : public TQObject{
Q_OBJECT
+ TQ_OBJECT
private:
//! pointer to the dbusHAL connection class
dbusHAL *dbus_HAL;
- //! hold udis of special hardware execpt batteries represented by a QString pairs (name,udi)
+ //! hold udis of special hardware execpt batteries represented by a TQString pairs (name,udi)
/*!
* This directory handle udis for known fixed devices as e.g ac adapter. This devices are
* currently available:
@@ -135,15 +136,15 @@ private:
* \li lidclose
* \li laptop_panel
*/
- QDict<QString> udis;
+ TQDict<TQString> udis;
//! hold the UDIs of all hardware we handle atm
/*!
- * This QStringList contains the list of UDIs we handle at the moment in this
+ * This TQStringList contains the list of UDIs we handle at the moment in this
* class. This should be used to handle device events from HAL for devices we
* want to monitor
*/
- QStringList allUDIs;
+ TQStringList allUDIs;
//! hold information if suspend/standby/pm actions are supported and allowed
/*!
@@ -152,18 +153,18 @@ private:
*/
SuspendStates suspend_states;
- QTime calledSuspend;
+ TQTime calledSuspend;
//! hold the list of pointers to all relevant batteries
- QPtrList<Battery> BatteryList;
+ TQPtrList<Battery> BatteryList;
//! hold the information about all primary batteries
BatteryCollection *primaryBatteries;
//! hold the name of the CPU Freq governor from the last check
- QString cpuFreqGovernor;
+ TQString cpuFreqGovernor;
//! hold the ConsoleKit name/path of the actual session
- QString consoleKitSession;
+ TQString consoleKitSession;
//! enum with the currently active CPU Freq policy
/*! This enum contains the enum with the currently set CPU Freq Policy. */
@@ -305,7 +306,7 @@ private:
//! to check the current ConsoleKit session
bool checkConsoleKitSession();
//! to check if we should handle a device
- bool checkIfHandleDevice ( QString _udi, int *type );
+ bool checkIfHandleDevice ( TQString _udi, int *type );
//! to set the CPUFreq governor
bool setCPUFreqGovernor( const char *governor );
//! to get the state of SchedPowerSave setting of kernel/HAL
@@ -314,12 +315,12 @@ private:
bool setSchedPowerSavings( bool enable );
//! find and update a battery information
- void updateBatteryValues (QString udi, QString property);
+ void updateBatteryValues (TQString udi, TQString property);
private slots:
//! to fetch events from D-Bus and handle them
- void processMessage (msg_type type, QString message, QString value);
+ void processMessage (msg_type type, TQString message, TQString value);
//! to update \ref primaryBatteries
void updatePrimaryBatteries ();
//! to set \ref update_info_primBattery_changed
@@ -331,13 +332,13 @@ private slots:
//! check if brightness change is possible
void checkBrightness();
- //! SLOT to handle the reconnect to D-Bus
+ //! TQT_SLOT to handle the reconnect to D-Bus
void reconnectDBUS();
- //! SLOT to forward signal about changed battery warning state
+ //! TQT_SLOT to forward signal about changed battery warning state
void emitBatteryWARNState (int type, int state);
- //! SLOT to handle resume and forward a signal for resume
+ //! TQT_SLOT to handle resume and forward a signal for resume
void handleResumeSignal (int result);
//! to emit signal for power button
@@ -361,9 +362,9 @@ signals:
void currentCPUFreqPolicyChanged();
//! signal the AC adapter
- void ACStatus( bool );
+ void ACtqStatus( bool );
//! signal for the lidclose button
- void lidcloseStatus ( bool );
+ void lidclosetqStatus ( bool );
//! signal for pressed the power button
void powerButtonPressed ();
//! signal for pressed sleep (suspend2ram) button
@@ -443,7 +444,7 @@ public:
//! get a pointer to the primary batteries
BatteryCollection* getPrimaryBatteries() const;
//! get all batteries
- QPtrList<Battery> getAllBatteries() const;
+ TQPtrList<Battery> getAllBatteries() const;
//! check the currently set CPU Frequency Policy
cpufreq_type checkCurrentCPUFreqPolicy();
diff --git a/src/hardware_battery.cpp b/src/hardware_battery.cpp
index 131854f..b9809e8 100644
--- a/src/hardware_battery.cpp
+++ b/src/hardware_battery.cpp
@@ -30,7 +30,7 @@
Battery::Battery(dbusHAL* _dbus_HAL) : dbus_HAL(_dbus_HAL) {
kdDebugFuncIn(trace);
- udi = QString();
+ udi = TQString();
initialized = false;
initDefault();
@@ -40,7 +40,7 @@ Battery::Battery(dbusHAL* _dbus_HAL) : dbus_HAL(_dbus_HAL) {
}
/*! The default constructor of the class Battery. */
-Battery::Battery( dbusHAL* _dbus_HAL, QString _udi ) : dbus_HAL(_dbus_HAL), udi(_udi) {
+Battery::Battery( dbusHAL* _dbus_HAL, TQString _udi ) : dbus_HAL(_dbus_HAL), udi(_udi) {
if (trace) kdDebug() << funcinfo << "IN , udi: " << udi << endl;
initialized = false;
@@ -57,7 +57,7 @@ Battery::Battery() {
initialized = false;
initDefault();
- udi = QString();
+ udi = TQString();
kdDebugFuncOut(trace);
}
@@ -256,7 +256,7 @@ bool Battery::checkBatteryPresent () {
bool Battery::checkBatteryType () {
kdDebugFuncIn(trace);
- QString tmp_qstring;
+ TQString tmp_qstring;
if (!dbus_HAL->isConnectedToHAL() && !dbus_HAL->reconnect()) {
kdError() << "Couldn't connect to HAL" << endl;
@@ -302,7 +302,7 @@ bool Battery::checkBatteryType () {
bool Battery::checkBatteryTechnology () {
kdDebugFuncIn(trace);
- QString tmp_qstring;
+ TQString tmp_qstring;
if (!dbus_HAL->isConnectedToHAL() && !dbus_HAL->reconnect()) {
kdError() << "Couldn't connect to HAL" << endl;
@@ -318,15 +318,15 @@ bool Battery::checkBatteryTechnology () {
if (dbus_HAL->halGetPropertyString(udi,"battery.technology", &tmp_qstring)) {
if (!tmp_qstring.isEmpty()) {
- technology = QString(tmp_qstring);
+ technology = TQString(tmp_qstring);
} else {
- technology = QString("UNKNOWN");
+ technology = TQString("UNKNOWN");
}
kdDebugFuncOut(trace);
return true;
} else {
//query was not successfull, but this property is optional
- technology = QString("UNKNOWN");
+ technology = TQString("UNKNOWN");
kdDebugFuncOut(trace);
return false;
}
@@ -343,7 +343,7 @@ bool Battery::checkBatteryTechnology () {
bool Battery::checkCapacityState () {
kdDebugFuncIn(trace);
- QString tmp_qstring;
+ TQString tmp_qstring;
if (!dbus_HAL->isConnectedToHAL() && !dbus_HAL->reconnect()) {
kdError() << "Couldn't connect to HAL" << endl;
@@ -358,12 +358,12 @@ bool Battery::checkCapacityState () {
}
if (dbus_HAL->halGetPropertyString(udi, "battery.charge_level.capacity_state", &tmp_qstring)) {
- capacity_state = QString(tmp_qstring);
+ capacity_state = TQString(tmp_qstring);
kdDebugFuncOut(trace);
return true;
} else {
//query was not successfull, but this property is optional
- capacity_state = QString();
+ capacity_state = TQString();
kdDebugFuncOut(trace);
return false;
}
@@ -766,13 +766,13 @@ bool Battery::checkChargingState () {
/*!
* Check for the given property new values from HAL and set them to
* the battery variables.
- * \param _udi QString with the UDI of the device to recheck
- * \param _property QString with the property which was changed
+ * \param _udi TQString with the UDI of the device to recheck
+ * \param _property TQString with the property which was changed
* \return boolean with the result of the operation
* \retval true if the update was successfull
* \retval false if the update couldn't be applied
*/
-bool Battery::updateProperty(QString _udi, QString _property) {
+bool Battery::updateProperty(TQString _udi, TQString _property) {
kdDebugFuncIn(trace);
//first check whether HAL is available
@@ -828,14 +828,14 @@ bool Battery::updateProperty(QString _udi, QString _property) {
//! Resets the current HAL udi used by the one given
/*!
-* The given QString will be (checked and) used as new HAL udi for the battery.
+* The given TQString will be (checked and) used as new HAL udi for the battery.
* But don't forget to do a recheck of the battery afterwards.
-* \param _udi QString with the UDI to reset
+* \param _udi TQString with the UDI to reset
* \return boolean with the result of the operation
* \retval true if reset was successfull
* \retval false if reset couldn't be applied
*/
-bool Battery::resetUdi(QString _udi) {
+bool Battery::resetUdi(TQString _udi) {
kdDebugFuncIn(trace);
bool tmp_result=false;
@@ -909,8 +909,8 @@ void Battery::setCritLevel(int _crit_level) {
// ---> get private members SECTION : START <----
//! reports the HAL udi of this battery
-QString Battery::getUdi() const {
- return QString(udi);
+TQString Battery::getUdi() const {
+ return TQString(udi);
}
//! reports the battery type
@@ -919,8 +919,8 @@ int Battery::getType() const {
}
//! gives the name of this battery technology
-QString Battery::getTechnology() const {
- return QString(technology);
+TQString Battery::getTechnology() const {
+ return TQString(technology);
}
//! tells the current batterystate as enum BAT_STATE_
@@ -954,8 +954,8 @@ int Battery::getChargingState() const {
}
//! reports the physical unit of values like DesignCapacity, PresentRate and Lastfull
-QString Battery::getChargelevelUnit() const {
- return QString(charge_level_unit);
+TQString Battery::getChargelevelUnit() const {
+ return TQString(charge_level_unit);
}
//! reports current chargelevel in percentage
@@ -974,8 +974,8 @@ int Battery::getCurrentLevel() const {
}
//! reports HAL capacity_state value
-QString Battery::getCapacityState() const {
- return QString(capacity_state);
+TQString Battery::getCapacityState() const {
+ return TQString(capacity_state);
}
//! reports the chargelevel in percent when battery goes to state warning
diff --git a/src/hardware_battery.h b/src/hardware_battery.h
index 99a0bc0..f7b9afd 100644
--- a/src/hardware_battery.h
+++ b/src/hardware_battery.h
@@ -38,15 +38,16 @@
#endif
// QT - Header
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
#include "dbusHAL.h"
-class Battery : public QObject {
+class Battery : public TQObject {
Q_OBJECT
+ TQ_OBJECT
private:
//! Internal reference to dbusHAL for communication with HAL daemon
@@ -54,30 +55,30 @@ private:
//! HAL udi of the battery to represent
/*!
- * This QString holds the HAL udi adress of the battery.
+ * This TQString holds the HAL udi adress of the battery.
* \li empty: all primary batteries are represented
* \li e.g. "/org/freedesktop/Hal/devices/acpi_BAT0": first acpi battery
*/
- QString udi;
+ TQString udi;
//! Technologyname of the battery
/*!
* Tells the type of technologyname the battery is working with.
* \li e.g. "LION"
*/
- QString technology;
+ TQString technology;
//! Current charging state of this battery as reported by HAL
/*!
- * This QString tells the current capacity_state HAL is reporting.
+ * This TQString tells the current capacity_state HAL is reporting.
* \li as of current HAL spec: "ok", "critical"
*/
- QString capacity_state;
+ TQString capacity_state;
//! Unit of charge_level_unit and charge_level_lastfull.
- /*! This QString tells the physical unit the values of charge_level_unit. */
- QString charge_level_unit;
+ /*! This TQString tells the physical unit the values of charge_level_unit. */
+ TQString charge_level_unit;
//! Serialnumber of the the battery
/*! Identifies the currently installed battery uniquely. */
- QString serial;
+ TQString serial;
//! Boolean which tells if the battery is initalized first time
/*!
@@ -224,7 +225,7 @@ signals:
public:
//! default constructor
- Battery( dbusHAL* _dbus_HAL, QString _udi );
+ Battery( dbusHAL* _dbus_HAL, TQString _udi );
//! default constructor
Battery( dbusHAL* _dbus_HAL );
//! this constructor forces the use of init with dbuHAL pointer set!
@@ -239,17 +240,17 @@ public:
//! rechecks only minimalistic set properties
void minRecheck();
//! update a property on HAL event
- bool updateProperty(QString _udi, QString _property);
+ bool updateProperty(TQString _udi, TQString _property);
//ro-Interface to internal data
//! reports the HAL udi of this battery
- QString getUdi() const;
+ TQString getUdi() const;
//! reports HAL capacity_state value
- QString getCapacityState() const;
+ TQString getCapacityState() const;
//! reports the physical unit of values like DesignCapacity, PresentRate and Lastfull
- QString getChargelevelUnit() const;
+ TQString getChargelevelUnit() const;
//! gives the name of this battery technology
- QString getTechnology() const;
+ TQString getTechnology() const;
//! get availability of this battery
bool isPresent();
@@ -283,12 +284,12 @@ public:
//writeable access to internals
//! Resets the current HAL udi used by the one given
/*!
- * The given QString will be (checked and) used as new HAL udi for the battery.
+ * The given TQString will be (checked and) used as new HAL udi for the battery.
* But don't forget to do a recheck of the battery afterwards.
* \li returns TRUE: if reset was successfull
* \li returns FALSE: if reset couldn't be applied
*/
- bool resetUdi(QString);
+ bool resetUdi(TQString);
//! sets the chargelevel in percent when battery should go into state warning
void setWarnLevel(int _warn_level);
diff --git a/src/hardware_batteryCollection.cpp b/src/hardware_batteryCollection.cpp
index a9b00e4..0d3fe63 100644
--- a/src/hardware_batteryCollection.cpp
+++ b/src/hardware_batteryCollection.cpp
@@ -68,11 +68,11 @@ void BatteryCollection::initDefault() {
/*!
* This function refresh the information of the collection from the given
* batterylist.
- * \param BatteryList QPtrList with battery objects
+ * \param BatteryList TQPtrList with battery objects
* \param force_level_recheck boolean with info if the the check for the current
* battery warning level should get forced
*/
-bool BatteryCollection::refreshInfo(QPtrList<Battery> BatteryList, bool force_level_recheck) {
+bool BatteryCollection::refreshInfo(TQPtrList<Battery> BatteryList, bool force_level_recheck) {
kdDebugFuncIn(trace);
int _charging_state = UNKNOWN_STATE;
@@ -203,13 +203,13 @@ bool BatteryCollection::refreshInfo(QPtrList<Battery> BatteryList, bool force_le
}
//! check if the given udi is already handled by this collection
-bool BatteryCollection::isBatteryHandled( QString udi ) {
- return udis.contains( udi );
+bool BatteryCollection::isBatteryHandled( TQString udi ) {
+ return udis.tqcontains( udi );
}
// ---> write private members SECTION : START <----
//! get the unit for charge level stuff
-QString BatteryCollection::getChargeLevelUnit() const {
+TQString BatteryCollection::getChargeLevelUnit() const {
return present_rate_unit;
}
diff --git a/src/hardware_batteryCollection.h b/src/hardware_batteryCollection.h
index 9b98952..5eaccaf 100644
--- a/src/hardware_batteryCollection.h
+++ b/src/hardware_batteryCollection.h
@@ -37,24 +37,25 @@
#endif
// QT - Header
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qobject.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqobject.h>
// own Header
#include "hardware_battery.h"
-class BatteryCollection : public QObject {
+class BatteryCollection : public TQObject {
Q_OBJECT
+ TQ_OBJECT
private:
//! contains the udis of the batteries of this collection
- QStringList udis;
+ TQStringList udis;
//! contains the rate unit
- QString present_rate_unit;
+ TQString present_rate_unit;
//! Roletype of battery
/*!
@@ -160,13 +161,13 @@ public:
// functions
//! refresh the information of the collection from the given batterylist
- bool refreshInfo(QPtrList<Battery> BatteryList, bool force_level_recheck = false);
+ bool refreshInfo(TQPtrList<Battery> BatteryList, bool force_level_recheck = false);
//! check if this collection already handle a special battery/udi
- bool isBatteryHandled(QString udi);
+ bool isBatteryHandled(TQString udi);
// get internals
//! get the unit for charge level stuff
- QString getChargeLevelUnit() const;
+ TQString getChargeLevelUnit() const;
//! get the cumulative remaining time
int getRemainingMinutes() const;
diff --git a/src/hardware_cpu.cpp b/src/hardware_cpu.cpp
index f0d939c..5af515c 100644
--- a/src/hardware_cpu.cpp
+++ b/src/hardware_cpu.cpp
@@ -33,8 +33,8 @@
#include "hardware_cpu.moc"
// QT Header
-#include <qdir.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqtimer.h>
// system header
#include <fcntl.h>
@@ -63,8 +63,8 @@ int CPUInfo::getCPUNum() {
kdDebugFuncIn(trace);
int cpu_id=0;
- QDir tmp_dir;
- QString cpu_path = "/sys/devices/system/cpu/cpu0/";
+ TQDir tmp_dir;
+ TQString cpu_path = "/sys/devices/system/cpu/cpu0/";
#ifdef FAKE_CPU
cpu_path.prepend("/tmp/foo");
#endif
@@ -76,13 +76,13 @@ int CPUInfo::getCPUNum() {
cpuFreqHW = false;
}
- QString tmp_path = tmp_dir.absFilePath(cpu_path, true);
+ TQString tmp_path = tmp_dir.absFilePath(cpu_path, true);
while (tmp_dir.exists(tmp_path)) {
int tmp = cpu_id;
cpu_id++;
- cpu_path.replace(QString::number(tmp), QString::number(cpu_id));
+ cpu_path.tqreplace(TQString::number(tmp), TQString::number(cpu_id));
tmp_path = tmp_dir.absFilePath(cpu_path, true);
}
@@ -107,7 +107,7 @@ int CPUInfo::checkCPUSpeed(){
int new_value = -1;
int fd;
char buf[15];
- QString cpu_device = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq";
+ TQString cpu_device = "/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq";
#ifdef FAKE_CPU
cpu_device.prepend("/tmp/foo");
#endif
@@ -141,7 +141,7 @@ int CPUInfo::checkCPUSpeed(){
cpufreq_speed.append(new_value);
}
- cpu_device.replace(QString::number(cpu_id), QString::number(cpu_id+1));
+ cpu_device.tqreplace(TQString::number(cpu_id), TQString::number(cpu_id+1));
}
if (speed_changed) {
@@ -164,11 +164,11 @@ int CPUInfo::checkCPUSpeed(){
int CPUInfo::checkCPUSpeedThrottling() {
kdDebugFuncOut(trace);
- QString cpu_file = "/proc/cpuinfo";
+ TQString cpu_file = "/proc/cpuinfo";
#ifdef FAKE_CPU
cpu_file.prepend("/tmp/foo");
#endif
- QFile cpu_info(cpu_file);
+ TQFile cpu_info(cpu_file);
// clear cpufreq list
cpufreq_speed.clear();
@@ -179,8 +179,8 @@ int CPUInfo::checkCPUSpeedThrottling() {
return -1;
}
- QTextStream stream( &cpu_info );
- QString line;
+ TQTextStream stream( &cpu_info );
+ TQString line;
while ( !stream.atEnd() ) {
line = stream.readLine();
@@ -212,24 +212,24 @@ bool CPUInfo::getCPUThrottlingState() {
kdDebugFuncIn(trace);
int id = 0;
- QFileInfo *fi;
- QString cpu_dirname;
- QString dir_acpi_processor = "/proc/acpi/processor/";
+ TQFileInfo *fi;
+ TQString cpu_dirname;
+ TQString dir_acpi_processor = "/proc/acpi/processor/";
#ifdef FAKE_CPU
dir_acpi_processor.prepend("/tmp/foo");
#endif
- QDir d_throttling(dir_acpi_processor);
+ TQDir d_throttling(dir_acpi_processor);
if (!d_throttling.exists()) {
kdDebugFuncOut(trace);
return false;
}
- d_throttling.setFilter( QDir::Dirs );
+ d_throttling.setFilter( TQDir::Dirs );
d_throttling.setNameFilter("CPU*");
- const QFileInfoList *list = d_throttling.entryInfoList();
- QFileInfoListIterator it( *list );
+ const TQFileInfoList *list = d_throttling.entryInfoList();
+ TQFileInfoListIterator it( *list );
// clear throttling value list
cpu_throttling.clear();
@@ -237,17 +237,17 @@ bool CPUInfo::getCPUThrottlingState() {
while ((fi = it.current()) != 0 ) {
cpu_dirname = fi->fileName();
- QString throttling_device = d_throttling.absPath();
+ TQString throttling_device = d_throttling.absPath();
throttling_device.append("/").append(cpu_dirname).append("/throttling");
kdDebug() << "Throttling state file for CPU" << id << " will be: " << throttling_device << endl;
- QFile throttling(throttling_device);
+ TQFile throttling(throttling_device);
// open throttling state file
if ( throttling.open(IO_ReadOnly) ) {
- QTextStream stream( &throttling );
- QString line;
+ TQTextStream stream( &throttling );
+ TQString line;
do {
line = stream.readLine();
@@ -283,7 +283,7 @@ void CPUInfo::getCPUMaxSpeed() {
int fd;
int maxfreq;
char buf[15];
- QString cpu_device_max = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
+ TQString cpu_device_max = "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq";
#ifdef FAKE_CPU
cpu_device_max.prepend("/tmp/foo");
#endif
@@ -306,7 +306,7 @@ void CPUInfo::getCPUMaxSpeed() {
close(fd);
}
- cpu_device_max.replace(QString::number(cpu_id), QString::number(cpu_id+1));
+ cpu_device_max.tqreplace(TQString::number(cpu_id), TQString::number(cpu_id+1));
}
kdDebugFuncOut(trace);
diff --git a/src/hardware_cpu.h b/src/hardware_cpu.h
index 0c41237..705b90b 100644
--- a/src/hardware_cpu.h
+++ b/src/hardware_cpu.h
@@ -39,16 +39,17 @@
#endif
// QT Headers
-#include <qstring.h>
-#include <qobject.h>
-#include <qvaluelist.h>
+#include <tqstring.h>
+#include <tqobject.h>
+#include <tqvaluelist.h>
// own headers
#include "kpowersave_debug.h"
-class CPUInfo : public QObject{
+class CPUInfo : public TQObject{
Q_OBJECT
+ TQ_OBJECT
private:
@@ -63,21 +64,21 @@ public:
* This interge value represent the current throttling step of the CPU in percent
* \li a value >= 0 in %
*/
- QValueList <int> cpu_throttling;
+ TQValueList <int> cpu_throttling;
//! represent the current CPU speeds
/*!
* This integer value represent the current speed/frequency of the CPUs in Mhz
* \li a value > 0 in Mhz
*/
- QValueList <int> cpufreq_speed;
+ TQValueList <int> cpufreq_speed;
//! represent the max. CPU speeds
/*!
* This integer value represent the max speed/frequency of the CPUs in Mhz
* \li a value > 0 in Mhz
*/
- QValueList <int> cpufreq_max_speed;
+ TQValueList <int> cpufreq_max_speed;
//! if the machine support change CPU Freq in general
/*!
diff --git a/src/inactivity.cpp b/src/inactivity.cpp
index 5c808b7..d1d9204 100644
--- a/src/inactivity.cpp
+++ b/src/inactivity.cpp
@@ -53,8 +53,8 @@ inactivity::inactivity() {
int dummy = 0;
has_XSC_Extension = XScreenSaverQueryExtension( qt_xdisplay(), &dummy, &dummy );
- checkInactivity = new QTimer( this );
- connect( checkInactivity, SIGNAL(timeout()), this, SLOT(check()));
+ checkInactivity = new TQTimer( this );
+ connect( checkInactivity, TQT_SIGNAL(timeout()), this, TQT_SLOT(check()));
kdDebugFuncOut(trace);
}
@@ -72,13 +72,13 @@ inactivity::~inactivity() {
/*!
* This function start the monitoring of inactivity of user on the X-Server.
* Here wee set the time for the signal \ref inactivityTimeExpired() and start
- * the needed QTimer.
+ * the needed TQTimer.
* \param timeToExpire Integer value representing the time of inactivity which need
* to elapse befor send signal. The time is in seconds.
- * \param blacked QStringList with blacklisted programs which if detected with
+ * \param blacked TQStringList with blacklisted programs which if detected with
* pidof() as running prevent the autosuspend.
*/
-void inactivity::start( int timeToExpire, QStringList blacked ) {
+void inactivity::start( int timeToExpire, TQStringList blacked ) {
kdDebugFuncIn(trace);
blacklist = blacked;
@@ -93,7 +93,7 @@ void inactivity::start( int timeToExpire, QStringList blacked ) {
}
/*!
- * \b SLOT to call check as recheck inactivity if befor a running PID
+ * \b TQT_SLOT to call check as recheck inactivity if befor a running PID
* request was detected.
*/
void inactivity::recheck() {
@@ -105,14 +105,14 @@ void inactivity::recheck() {
}
/*!
- * \b SLOT to call check without a recheck.
+ * \b TQT_SLOT to call check without a recheck.
*/
void inactivity::check() {
check(false);
}
/*!
- * \b SLOT to check the current idle-time of the X-Server and if there
+ * \b TQT_SLOT to check the current idle-time of the X-Server and if there
* are blacklisted programs are running. If the through \ref timeToInactivity
* defined time is expired, this function emit signal \ref inactivityTimeExpired() .
* \param recheck boolean which define if this is a recheck or not.
@@ -143,7 +143,7 @@ void inactivity::check( bool recheck ) {
}
else {
//called if there is a getPIDs() is running
- QTimer::singleShot(500, this, SLOT(recheck()));
+ TQTimer::singleShot(500, this, TQT_SLOT(recheck()));
}
}
else checkInactivity->start(CHECK_for_INACTIVITY, true);
@@ -288,10 +288,10 @@ void inactivity::checkBlacklisted(){
proc = new KProcess;
*proc << "pidof" << blacklist;
- connect( proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this,
- SLOT(getPIDs(KProcess *, char *, int)));
- connect( proc, SIGNAL(processExited(KProcess *)),
- SLOT(getPIDsExited(KProcess *)));
+ connect( proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this,
+ TQT_SLOT(getPIDs(KProcess *, char *, int)));
+ connect( proc, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(getPIDsExited(KProcess *)));
if (!proc->start(KProcess::NotifyOnExit, KProcess::AllOutput))
{
@@ -309,7 +309,7 @@ void inactivity::checkBlacklisted(){
/*!
- * \b SLOT to get the return of the command pidof and parse this to set
+ * \b TQT_SLOT to get the return of the command pidof and parse this to set
* \ref blacklisted_running .
* \param *proc pointer to the sending KProcess
* \param *buffer the char pointer to the output of the process to stdout
@@ -318,14 +318,14 @@ void inactivity::checkBlacklisted(){
void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*lenght*/) {
kdDebugFuncIn(trace);
- QString pids(buffer);
+ TQString pids(buffer);
pids.remove(" ");
if(pids.isEmpty() || pids == "\n" ) {
kdDebug() << "NO! BLACKLISTED IS RUNNING" << endl;
blacklisted_running = false;
}
else {
- if (pids.contains(QRegExp("[0-9]"))) {
+ if (pids.tqcontains(TQRegExp("[0-9]"))) {
kdDebug() << "BLACKLISTED IS RUNNING" << endl;
blacklisted_running = true;
blacklisted_running_last = idleTime;
@@ -342,7 +342,7 @@ void inactivity::getPIDs(KProcess */*proc*/, char *buffer, int /*lenght*/) {
/*!
- * \b SLOT which called if the call of pidof is exited
+ * \b TQT_SLOT which called if the call of pidof is exited
* \param proc the KPocess which called this SLOT
*/
void inactivity::getPIDsExited(KProcess *proc){
diff --git a/src/inactivity.h b/src/inactivity.h
index d3fb979..93013db 100644
--- a/src/inactivity.h
+++ b/src/inactivity.h
@@ -22,19 +22,19 @@
/* this is needed to avoid typedef clash with X11
*/
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
+#ifndef TQT_CLEAN_NAMESPACE
+#define TQT_CLEAN_NAMESPACE
#endif
// KDE Header
#include <kprocess.h>
// QT Header
-#include <qregexp.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qtimer.h>
-#include <qevent.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqtimer.h>
+#include <tqevent.h>
// X11 Header
#include <X11/X.h>
@@ -56,9 +56,10 @@
* \date 2006
*/
-class inactivity : public QWidget
+class inactivity : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
@@ -67,7 +68,7 @@ public:
~inactivity();
//! to start the monitoring of the X-Server
- void start(int, QStringList);
+ void start(int, TQStringList);
//! to stop the monitoring of the X-Server
void stop();
@@ -79,7 +80,7 @@ signals:
//! signal emited if the with \ref start() set time of inactivity is expired
void inactivityTimeExpired();
//! signal to emit error msg
- void displayErrorMsg( QString );
+ void displayErrorMsg( TQString );
private:
@@ -117,8 +118,8 @@ private:
*/
bool blacklisted_running;
- //! QStringList with blacklisted programs for autosuspend
- QStringList blacklist;
+ //! TQStringList with blacklisted programs for autosuspend
+ TQStringList blacklist;
//! time which must expire befor emit signal for autosuspend
unsigned long timeToInactivity;
@@ -129,20 +130,20 @@ private:
//! if the XServer-has XScreenSaverExtension
int has_XSC_Extension;
- //! QTimer intervall for the \ref checkInactivity Timer
+ //! TQTimer intervall for the \ref checkInactivity Timer
/*!
* The time intervall to check for the current status and time of
* userinactivity. The timeslice is currently 30 sec.
*/
static const int CHECK_for_INACTIVITY = 30000;
- //! QTimer for check inactivity
+ //! TQTimer for check inactivity
/*!
* This timer is used to check the currently status and time of
* userinactivity on the X-Server. The timerinterval is defined trough
* \ref CHECK_for_INACTIVITY .
*/
- QTimer *checkInactivity;
+ TQTimer *checkInactivity;
// -------- FUNCTIONS ------------
diff --git a/src/info_Dialog.ui b/src/info_Dialog.ui
index 43e1479..8230f21 100644
--- a/src/info_Dialog.ui
+++ b/src/info_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>info_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>info_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,11 +19,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="3" column="4">
+ <widget class="TQPushButton" row="3" column="4">
<property name="name">
<cstring>buttonOK</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>90</width>
<height>0</height>
@@ -46,7 +46,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>171</width>
<height>21</height>
@@ -63,24 +63,24 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>151</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="0" column="1" rowspan="2" colspan="2">
+ <widget class="TQLabel" row="0" column="1" rowspan="2" colspan="2">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>32</width>
<height>32</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32</width>
<height>32</height>
@@ -93,11 +93,11 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="3" rowspan="2" colspan="4">
+ <widget class="TQLabel" row="0" column="3" rowspan="2" colspan="4">
<property name="name">
<cstring>msgText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>370</width>
<height>50</height>
@@ -106,7 +106,7 @@
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignTop</set>
</property>
</widget>
@@ -120,7 +120,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>20</height>
@@ -137,7 +137,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>10</width>
<height>20</height>
@@ -154,18 +154,18 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>61</width>
<height>21</height>
</size>
</property>
</spacer>
- <widget class="QCheckBox" row="2" column="3" rowspan="1" colspan="3">
+ <widget class="TQCheckBox" row="2" column="3" rowspan="1" colspan="3">
<property name="name">
<cstring>dontShowAgain</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>330</width>
<height>0</height>
@@ -188,7 +188,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>31</width>
<height>21</height>
@@ -210,8 +210,8 @@
<slot>ButtonOK_clicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>ButtonOK_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/infodialog.cpp b/src/infodialog.cpp
index 74b3891..7948bdd 100644
--- a/src/infodialog.cpp
+++ b/src/infodialog.cpp
@@ -33,18 +33,18 @@
#include <klocale.h>
// QT headers:
-#include <qcheckbox.h>
-#include <qdialog.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqdialog.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqtooltip.h>
/*! This is the default constructor of class infoDialog . */
-infoDialog::infoDialog( KConfig *config, QString captionName, QString message,
- QString dontShowAgainMsg, QString settingsEntryName,
- QWidget *parent, const char *name)
- :info_Dialog( parent, name, false, Qt::WStyle_StaysOnTop | WDestructiveClose )
+infoDialog::infoDialog( KConfig *config, TQString captionName, TQString message,
+ TQString dontShowAgainMsg, TQString settingsEntryName,
+ TQWidget *tqparent, const char *name)
+ :info_Dialog( tqparent, name, false, TQt::WStyle_StaysOnTop | WDestructiveClose )
{
if ( message.isEmpty() || (!dontShowAgainMsg.isEmpty() && settingsEntryName.isEmpty()) ||
(!dontShowAgainMsg.isEmpty() && (config == 0)))
@@ -64,9 +64,9 @@ infoDialog::infoDialog( KConfig *config, QString captionName, QString message,
}
}
- buttonOK->setIconSet(SmallIconSet("ok", QIconSet::Automatic));
+ buttonOK->setIconSet(SmallIconSet("ok", TQIconSet::Automatic));
- QPixmap pixmap = 0;
+ TQPixmap pixmap = 0;
pixmap = KGlobal::iconLoader()->loadIcon("messagebox_warning", KIcon::NoGroup, KIcon::SizeMedium);
iconPixmap->setPixmap( pixmap );
@@ -90,7 +90,7 @@ infoDialog::infoDialog( KConfig *config, QString captionName, QString message,
/*! This is the default destructor of class infoDialog . */
infoDialog::~infoDialog()
{
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*!
@@ -104,7 +104,7 @@ bool infoDialog::dialogIsDisabled() {
}
/*!
- * SLOT: called if the 'ok' button clicked. This SLOT sync the settings
+ * SLOT: called if the 'ok' button clicked. This TQT_SLOT sync the settings
* and close the dialog.
*/
void infoDialog::ButtonOK_clicked() {
diff --git a/src/infodialog.h b/src/infodialog.h
index 7d419dd..d24acb3 100644
--- a/src/infodialog.h
+++ b/src/infodialog.h
@@ -38,13 +38,14 @@
class infoDialog: public info_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- infoDialog( KConfig *config = 0, QString captionName = QString(), QString message = QString(),
- QString dontShowAgainMsg = QString(), QString settingsEntryName = QString(),
- QWidget *parent = 0, const char *name = 0);
+ infoDialog( KConfig *config = 0, TQString captionName = TQString(), TQString message = TQString(),
+ TQString dontShowAgainMsg = TQString(), TQString settingsEntryName = TQString(),
+ TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~infoDialog();
@@ -57,10 +58,10 @@ private:
KConfig *settings;
//! name of the entry in the settings
- /*! QString store the name of the settings entry to
+ /*! TQString store the name of the settings entry to
* store settings of 'DontShowAgain' checkbox
*/
- QString entryName;
+ TQString entryName;
//! represent if the dialog is disabled by user
/*!
diff --git a/src/kpowersave.cpp b/src/kpowersave.cpp
index 085753e..8e1e27b 100644
--- a/src/kpowersave.cpp
+++ b/src/kpowersave.cpp
@@ -31,14 +31,14 @@
#include <kpassivepopup.h>
#include <kpopupmenu.h>
-// other Qt headers:
-#include <qcursor.h>
-#include <qevent.h>
-#include <qfile.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+// other TQt headers:
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqfile.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
// own headers:
#include "kpowersave.h"
@@ -95,26 +95,26 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
settings->batteryCriticalLevel);
// connect to signals for changes
- connect(hwinfo, SIGNAL(generalDataChanged()), this, SLOT(update()));
- connect(hwinfo, SIGNAL(primaryBatteryChanged()), this, SLOT(update()));
- connect(hwinfo, SIGNAL(ACStatus(bool)), this, SLOT(handleACStatusChange (bool)));
- connect(hwinfo, SIGNAL(resumed(int)), this, SLOT(forwardResumeSignal(int)));
+ connect(hwinfo, TQT_SIGNAL(generalDataChanged()), this, TQT_SLOT(update()));
+ connect(hwinfo, TQT_SIGNAL(primaryBatteryChanged()), this, TQT_SLOT(update()));
+ connect(hwinfo, TQT_SIGNAL(ACtqStatus(bool)), this, TQT_SLOT(handleACStatusChange (bool)));
+ connect(hwinfo, TQT_SIGNAL(resumed(int)), this, TQT_SLOT(forwardResumeSignal(int)));
// connect to error mesages
- connect(autoSuspend, SIGNAL(displayErrorMsg(QString)), this, SLOT(showErrorMessage(QString)));
- connect(hwinfo, SIGNAL(halRunning(bool)), this, SLOT(showHalErrorMsg()));
- connect(hwinfo, SIGNAL(dbusRunning(int)), this, SLOT(showDBusErrorMsg(int)));
+ connect(autoSuspend, TQT_SIGNAL(displayErrorMsg(TQString)), this, TQT_SLOT(showErrorMessage(TQString)));
+ connect(hwinfo, TQT_SIGNAL(halRunning(bool)), this, TQT_SLOT(showHalErrorMsg()));
+ connect(hwinfo, TQT_SIGNAL(dbusRunning(int)), this, TQT_SLOT(showDBusErrorMsg(int)));
// connect to events
- connect(hwinfo, SIGNAL(lidcloseStatus(bool)), this, SLOT(handleLidEvent(bool)));
- connect(hwinfo, SIGNAL(powerButtonPressed()), this, SLOT (handlePowerButtonEvent()));
- connect(hwinfo, SIGNAL(sleepButtonPressed()), this, SLOT (handleSleepButtonEvent()));
- connect(hwinfo, SIGNAL(s2diskButtonPressed()), this, SLOT (handleS2DiskButtonEvent()));
- connect(hwinfo, SIGNAL(batteryWARNState(int,int)), this, SLOT(notifyBatteryStatusChange (int,int)));
- connect(hwinfo, SIGNAL(desktopSessionIsActive(bool)), this, SLOT (handleSessionState(bool)));
- connect(autoSuspend, SIGNAL(inactivityTimeExpired()), this, SLOT(do_autosuspendWarn()));
- connect(autoDimm, SIGNAL(inactivityTimeExpired()), this, SLOT(do_downDimm()));
- connect(autoDimm, SIGNAL(UserIsActiveAgain()), this, SLOT(do_upDimm()));
+ connect(hwinfo, TQT_SIGNAL(lidclosetqStatus(bool)), this, TQT_SLOT(handleLidEvent(bool)));
+ connect(hwinfo, TQT_SIGNAL(powerButtonPressed()), this, TQT_SLOT (handlePowerButtonEvent()));
+ connect(hwinfo, TQT_SIGNAL(sleepButtonPressed()), this, TQT_SLOT (handleSleepButtonEvent()));
+ connect(hwinfo, TQT_SIGNAL(s2diskButtonPressed()), this, TQT_SLOT (handleS2DiskButtonEvent()));
+ connect(hwinfo, TQT_SIGNAL(batteryWARNState(int,int)), this, TQT_SLOT(notifyBatteryStatusChange (int,int)));
+ connect(hwinfo, TQT_SIGNAL(desktopSessionIsActive(bool)), this, TQT_SLOT (handleSessionState(bool)));
+ connect(autoSuspend, TQT_SIGNAL(inactivityTimeExpired()), this, TQT_SLOT(do_autosuspendWarn()));
+ connect(autoDimm, TQT_SIGNAL(inactivityTimeExpired()), this, TQT_SLOT(do_downDimm()));
+ connect(autoDimm, TQT_SIGNAL(UserIsActiveAgain()), this, TQT_SLOT(do_upDimm()));
config->sync();
@@ -131,13 +131,13 @@ kpowersave::kpowersave( bool force_acpi_check, bool trace_func ) : KSystemTray(0
pixmap_name = "NONE";
suspendType = "NULL";
- BAT_WARN_ICON_Timer = new QTimer(this);
- connect(BAT_WARN_ICON_Timer, SIGNAL(timeout()), this, SLOT(do_setIconBG()));
+ BAT_WARN_ICON_Timer = new TQTimer(this);
+ connect(BAT_WARN_ICON_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_setIconBG()));
- DISPLAY_HAL_ERROR_Timer = new QTimer(this);
- connect(DISPLAY_HAL_ERROR_Timer, SIGNAL(timeout()), this, SLOT(showHalErrorMsg()));
+ DISPLAY_HAL_ERROR_Timer = new TQTimer(this);
+ connect(DISPLAY_HAL_ERROR_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(showHalErrorMsg()));
- AUTODIMM_Timer = new QTimer(this);
+ AUTODIMM_Timer = new TQTimer(this);
initMenu();
update();
@@ -167,76 +167,76 @@ kpowersave::~kpowersave(){
void kpowersave::initMenu() {
kdDebugFuncIn(trace);
- CONFIGURE_ID = this->contextMenu()->insertItem(SmallIcon("configure", QIconSet::Automatic),
+ CONFIGURE_ID = this->contextMenu()->insertItem(SmallIcon("configure", TQIconSet::Automatic),
i18n("Configure KPowersave..."),
- this, SLOT(showConfigureDialog()));
- CONFIGURE_EVENTS_ID = this->contextMenu()->insertItem(SmallIcon("knotify", QIconSet::Automatic),
+ this, TQT_SLOT(showConfigureDialog()));
+ CONFIGURE_EVENTS_ID = this->contextMenu()->insertItem(SmallIcon("knotify", TQIconSet::Automatic),
i18n("Configure Notifications..."),
- this, SLOT(showConfigureNotificationsDialog()));
+ this, TQT_SLOT(showConfigureNotificationsDialog()));
#ifdef ENABLE_YAST_ENTRY
- YAST_MODULE_MENU_ID = this->contextMenu()->insertItem(SmallIcon("yast", QIconSet::Automatic),
+ YAST_MODULE_MENU_ID = this->contextMenu()->insertItem(SmallIcon("yast", TQIconSet::Automatic),
i18n("Start YaST2 Power Management Module..."),
- this, SLOT(do_config()));
+ this, TQT_SLOT(do_config()));
#endif
SLEEP_SEPARATOR_MENU_ID = this->contextMenu()->insertSeparator();
SUSPEND2DISK_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("suspend_to_disk",
- QIconSet::Automatic),
+ TQIconSet::Automatic),
i18n("Suspend to Disk"), this,
- SLOT(do_suspend2disk()));
+ TQT_SLOT(do_suspend2disk()));
SUSPEND2RAM_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("suspend_to_ram",
- QIconSet::Automatic),
+ TQIconSet::Automatic),
i18n("Suspend to RAM"), this,
- SLOT(do_suspend2ram()));
- STANDBY_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("stand_by", QIconSet::Automatic),
- i18n("Standby"), this, SLOT(do_standby()));
+ TQT_SLOT(do_suspend2ram()));
+ STANDBY_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("stand_by", TQIconSet::Automatic),
+ i18n("Standby"), this, TQT_SLOT(do_standby()));
- speed_menu = new QPopupMenu(this, i18n("Set CPU Frequency Policy").ascii());
+ speed_menu = new TQPopupMenu(this, i18n("Set CPU Frequency Policy").ascii());
speed_menu->insertItem(i18n("Performance"), PERFORMANCE);
speed_menu->insertItem(i18n("Dynamic"), DYNAMIC);
speed_menu->insertItem(i18n("Powersave"), POWERSAVE);
- CPUFREQ_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
+ CPUFRETQ_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
- CPUFREQ_MENU_ID = contextMenu()->insertItem(i18n("Set CPU Frequency Policy"), speed_menu);
- connect(speed_menu, SIGNAL(activated(int)), this, SLOT(do_setSpeedPolicy(int)));
- connect(hwinfo, SIGNAL(currentCPUFreqPolicyChanged()), this, SLOT(updateCPUFreqMenu()));
+ CPUFRETQ_MENU_ID = contextMenu()->insertItem(i18n("Set CPU Frequency Policy"), speed_menu);
+ connect(speed_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(do_setSpeedPolicy(int)));
+ connect(hwinfo, TQT_SIGNAL(currentCPUFreqPolicyChanged()), this, TQT_SLOT(updateCPUFreqMenu()));
SCHEME_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
- scheme_menu = new QPopupMenu(this, i18n("Set Active Scheme").ascii());
+ scheme_menu = new TQPopupMenu(this, i18n("Set Active Scheme").ascii());
SCHEME_MENU_ID = contextMenu()->insertItem(i18n("Set Active Scheme"), scheme_menu);
- connect(scheme_menu, SIGNAL(activated(int)), this, SLOT(do_setActiveScheme(int)));
+ connect(scheme_menu, TQT_SIGNAL(activated(int)), this, TQT_SLOT(do_setActiveScheme(int)));
// menu entry for the autosuspend disable checkbox, disabled by default, only
// displayed if autosuspend for the current scheme is activated
AUTOSUSPEND_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
AUTOSUSPEND_MENU_ID = this->contextMenu()->insertItem( i18n("Disable Actions on Inactivity"),
- this,SLOT(do_setAutosuspend()));
+ this,TQT_SLOT(do_setAutosuspend()));
this->contextMenu()->setItemVisible(AUTOSUSPEND_SEPARATOR_MENU_ID, false);
this->contextMenu()->setItemVisible(AUTOSUSPEND_MENU_ID, false);
HELP_SEPARATOR_MENU_ID = contextMenu()->insertSeparator();
- help_menu = new QPopupMenu(this, i18n("&Help").ascii());
+ help_menu = new TQPopupMenu(this, i18n("&Help").ascii());
- help_menu->insertItem( SmallIcon("help", QIconSet::Automatic), i18n("&KPowersave Handbook"),
- this, SLOT(slotHelp()));
+ help_menu->insertItem( SmallIcon("help", TQIconSet::Automatic), i18n("&KPowersave Handbook"),
+ this, TQT_SLOT(slotHelp()));
help_menu->insertSeparator();
- help_menu->insertItem( i18n("&Report a bug ..."), this, SLOT(slotReportBug()));
- help_menu->insertItem( SmallIcon("kpowersave", QIconSet::Automatic),
- i18n("&About KPowersave"), this, SLOT(slotAbout()));
+ help_menu->insertItem( i18n("&Report a bug ..."), this, TQT_SLOT(slotReportBug()));
+ help_menu->insertItem( SmallIcon("kpowersave", TQIconSet::Automatic),
+ i18n("&About KPowersave"), this, TQT_SLOT(slotAbout()));
- HELP_MENU = contextMenu()->insertItem(SmallIcon("help", QIconSet::Automatic),
+ HELP_MENU = contextMenu()->insertItem(SmallIcon("help", TQIconSet::Automatic),
i18n("&Help"), help_menu);
- connect(this, SIGNAL(quitSelected()), this, SLOT(_quit()));
+ connect(this, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(_quit()));
kdDebugFuncOut(trace);
}
-void kpowersave::resizeEvent ( QResizeEvent * )
+void kpowersave::resizeEvent ( TQResizeEvent * )
{
// Honor Free Desktop specifications that allow for arbitrary system tray icon sizes
loadIcon();
@@ -277,9 +277,9 @@ void kpowersave::showConfigureDialog() {
configDlg = new ConfigureDialog(config, hwinfo, settings);
configDlg->show();
config_dialog_shown = true;
- connect(configDlg, SIGNAL(destroyed()), this, SLOT(observeConfigDlg()));
- connect(configDlg, SIGNAL(openHelp()), this, SLOT(slotHelp()));
- connect(configDlg, SIGNAL(openKNotify()), this, SLOT(showConfigureNotificationsDialog()));
+ connect(configDlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(observeConfigDlg()));
+ connect(configDlg, TQT_SIGNAL(openHelp()), this, TQT_SLOT(slotHelp()));
+ connect(configDlg, TQT_SIGNAL(openKNotify()), this, TQT_SLOT(showConfigureNotificationsDialog()));
}
else {
KPassivePopup::message(i18n("WARNING"), i18n("Cannot find any schemes."),
@@ -287,7 +287,7 @@ void kpowersave::showConfigureDialog() {
i18n("Warning").ascii(), 15000);
}
} else {
- configDlg->setWindowState(configDlg->windowState() & ~WindowMinimized | WindowActive);
+ configDlg->setWindowState(configDlg->windowState() & ~Qt::WindowMinimized | Qt::WindowActive);
configDlg->setActiveWindow();
}
@@ -313,40 +313,40 @@ void kpowersave::showConfigureNotificationsDialog() {
void kpowersave::loadIcon(){
kdDebugFuncIn(trace);
- QString pixmap_name_tmp = "NONE";
+ TQString pixmap_name_tmp = "NONE";
BatteryCollection *primary = hwinfo->getPrimaryBatteries();
if (hwinfo->hal_terminated || !hwinfo->isOnline() ) {
- pixmap_name_tmp = QString("ERROR");
+ pixmap_name_tmp = TQString("ERROR");
}
else if (hwinfo->getAcAdapter() || primary->getBatteryState() == BAT_NONE) {
icon_set_colored = false;
if (primary->getBatteryState() == BAT_NONE || (primary->getRemainingPercent() < 0 ||
primary->getRemainingPercent() >= 99))
- pixmap_name_tmp = QString("laptoppower");
+ pixmap_name_tmp = TQString("laptoppower");
else
- pixmap_name_tmp = QString("laptopcharge");
+ pixmap_name_tmp = TQString("laptopcharge");
}
else {
switch(primary->getBatteryState()) {
case BAT_CRIT:
case BAT_LOW:
- if (icon_BG_is_colored) pixmap_name_tmp = QString("laptopbattery");
- else pixmap_name_tmp = QString("laptopbatteryRED");
+ if (icon_BG_is_colored) pixmap_name_tmp = TQString("laptopbattery");
+ else pixmap_name_tmp = TQString("laptopbatteryRED");
icon_BG_is_colored = !icon_BG_is_colored;
icon_set_colored = true;
break;
case BAT_WARN:
- if (icon_BG_is_colored) pixmap_name_tmp = QString("laptopbattery");
- else pixmap_name_tmp = QString("laptopbatteryORANGE");
+ if (icon_BG_is_colored) pixmap_name_tmp = TQString("laptopbattery");
+ else pixmap_name_tmp = TQString("laptopbatteryORANGE");
icon_BG_is_colored = !icon_BG_is_colored;
icon_set_colored = true;
break;
default:
// if battery is discharging and not in warning, low or critical state
- pixmap_name_tmp = QString("laptopbattery");
+ pixmap_name_tmp = TQString("laptopbattery");
icon_set_colored = false;
icon_BG_is_colored = false;
}
@@ -382,39 +382,39 @@ void kpowersave::drawIcon(){
BatteryCollection *primary = hwinfo->getPrimaryBatteries();
- QImage image = pixmap.convertToImage();
+ TQImage image = pixmap.convertToImage();
int w = image.width();
int h = image.height();
int x, y;
countWhiteIconPixel = 0;
- if((pixmap_name.contains("laptopbattery") || pixmap_name.contains("charge")) &&
+ if((pixmap_name.tqcontains("laptopbattery") || pixmap_name.tqcontains("charge")) &&
countWhiteIconPixel == 0) {
for (x = 0; x < w; x++)
for (y = 0; y < h; y++)
- if(QColor(image.pixel(x, y)) == Qt::white) countWhiteIconPixel++;
+ if(TQColor(image.pixel(x, y)) == TQt::white) countWhiteIconPixel++;
}
int c = (countWhiteIconPixel * primary->getRemainingPercent()) / 100;
if (c > 0) {
uint ui;
- QRgb Rgb_set;
+ TQRgb Rgb_set;
if (hwinfo->getAcAdapter()) {
- Rgb_set = qRgb(0x00, 0xff, 0x00); //green
+ Rgb_set = tqRgb(0x00, 0xff, 0x00); //green
}
else {
switch(primary->getBatteryState()) {
case BAT_CRIT:
case BAT_LOW:
- Rgb_set = qRgb(0xff, 0x00, 0x00);//red
+ Rgb_set = tqRgb(0xff, 0x00, 0x00);//red
break;
case BAT_WARN:
- Rgb_set = qRgb(0xff, 0x55, 0x00); //orange
+ Rgb_set = tqRgb(0xff, 0x55, 0x00); //orange
break;
default:
- Rgb_set = qRgb(0x00, 0xff, 0x00); //green
+ Rgb_set = tqRgb(0x00, 0xff, 0x00); //green
}
}
if (image.depth() <= 8) {
@@ -426,7 +426,7 @@ void kpowersave::drawIcon(){
for (y = h - 1; y >= 0; y--) {
for (x = 0; x < w ; x++) {
- if(QColor(image.pixel(x, y)) == Qt::white) {
+ if(TQColor(image.pixel(x, y)) == TQt::white) {
image.setPixel(x, y, ui);
c--;
if (c <= 0) goto quit;
@@ -457,7 +457,7 @@ void kpowersave::updateTooltip(){
int minutes = primary->getRemainingMinutes();
int charging_state = primary->getChargingState();
- QString tmp, num3;
+ TQString tmp, num3;
num3.setNum(minutes % 60);
num3 = num3.rightJustify(2, '0');
@@ -474,26 +474,26 @@ void kpowersave::updateTooltip(){
else if (minutes > 0){
if (charging_state == CHARGING)
tmp = i18n("Plugged in -- %1% charged (%2:%3 h until full "
- "charged)").arg(percent).arg(minutes / 60).arg(num3);
+ "charged)").tqarg(percent).tqarg(minutes / 60).tqarg(num3);
else
tmp = i18n("Plugged in -- %1% charged (%2:%3 remaining hours)")
- .arg(percent).arg(minutes / 60).arg(num3);
+ .tqarg(percent).tqarg(minutes / 60).tqarg(num3);
}
else if (charging_state == CHARGING && hwinfo->hasAPM()) {
- tmp = i18n("Plugged in -- %1% charged").arg(percent);
+ tmp = i18n("Plugged in -- %1% charged").tqarg(percent);
}
else{
if (percent == -1) tmp = i18n("Plugged in -- no battery");
- else tmp = i18n("Plugged in -- %1% charged").arg(percent);
+ else tmp = i18n("Plugged in -- %1% charged").tqarg(percent);
}
}
} else{
if (minutes >= 0){
tmp = i18n("Running on batteries -- %1% charged (%2:%3 hours remaining)")
- .arg(percent).arg(minutes / 60).arg(num3);
+ .tqarg(percent).tqarg(minutes / 60).tqarg(num3);
}
else {
- tmp = i18n("Running on batteries -- %1% charged").arg(percent);
+ tmp = i18n("Running on batteries -- %1% charged").tqarg(percent);
}
}
// add string whether battery is charging, but only if < 100% to avoid
@@ -502,13 +502,13 @@ void kpowersave::updateTooltip(){
if (charging_state == CHARGING && percent < 100)
tmp += i18n(" -- battery is charging");
- QToolTip::add(this, tmp);
+ TQToolTip::add(this, tmp);
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT to starts the Yast2-power-management module. This called by the menuentry
+ * \b TQT_SLOT to starts the Yast2-power-management module. This called by the menuentry
* with ID \ref YAST_MODULE_MENU_ID, named "Start YaST2 Power Management Module".
* It create a new KProcess and execute "/sbin/yast2 power-management" with kdesu.
*/
@@ -521,8 +521,8 @@ void kpowersave::do_config(){
yast2 = new KProcess;
*yast2 << "kdesu" << "--nonewdcop" << "/sbin/yast2" << "power-management";
- connect(yast2, SIGNAL(processExited(KProcess *)),
- SLOT(slotConfigProcessExited(KProcess *)));
+ connect(yast2, TQT_SIGNAL(processExited(KProcess *)),
+ TQT_SLOT(slotConfigProcessExited(KProcess *)));
if(!yast2->start(KProcess::NotifyOnExit))
{
delete yast2;
@@ -537,7 +537,7 @@ void kpowersave::do_config(){
}
/*!
- * \b SLOT to open the KPowersave help
+ * \b TQT_SLOT to open the KPowersave help
*/
void kpowersave::slotHelp()
{
@@ -545,7 +545,7 @@ void kpowersave::slotHelp()
}
/*!
- * \b SLOT to open the KPowersave About dialog
+ * \b TQT_SLOT to open the KPowersave About dialog
*/
void kpowersave::slotAbout()
{
@@ -554,7 +554,7 @@ void kpowersave::slotAbout()
}
/*!
- * \b SLOT to open the website to report bugs
+ * \b TQT_SLOT to open the website to report bugs
*/
void kpowersave::slotReportBug()
{
@@ -582,10 +582,10 @@ void kpowersave::slotReportBug()
}
/*!
- * \b SLOT to set the icon background on/off if battery is in critical, low or warning-state. Within
+ * \b TQT_SLOT to set the icon background on/off if battery is in critical, low or warning-state. Within
* this function we set \ref icon_state_changed to true and call \ref redrawPixmap() to redraw the
* kickerapplet icon and create a icon with blinking background. \n \n
- * The slot called by the QTimer \ref BAT_WARN_ICON_Timer . The interval of the timer is defined
+ * The slot called by the TQTimer \ref BAT_WARN_ICON_Timer . The interval of the timer is defined
* trough \ref BAT_icon_BG_intervall and starts here: \ref loadIcon() .
*/
void kpowersave::do_setIconBG(){
@@ -597,7 +597,7 @@ void kpowersave::do_setIconBG(){
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT to enable/disable the autosuspend.
+ * \b TQT_SLOT to enable/disable the autosuspend.
*/
void kpowersave::do_setAutosuspend(){
kdDebugFuncIn(trace);
@@ -622,7 +622,7 @@ void kpowersave::do_setAutosuspend(){
}
/*!
- * \b SLOT which called if the \ref configDlg is destroyed. We set within this SLOT
+ * \b TQT_SLOT which called if the \ref configDlg is destroyed. We set within this SLOT
* \ref config_dialog_shown to false.
* TODO: check if we maybe should force here the current default scheme depending on the AC/battery state
*/
@@ -648,7 +648,7 @@ void kpowersave::observeConfigDlg(){
}
/*!
- * \b SLOT which called from \ref do_config() if the 'kdesu yast2' KProcess exited.
+ * \b TQT_SLOT which called from \ref do_config() if the 'kdesu yast2' KProcess exited.
* This function control the return value and display if needed a errormessage on failure.
*/
void kpowersave::slotConfigProcessExited(KProcess *proc){
@@ -679,7 +679,7 @@ void kpowersave::slotConfigProcessExited(KProcess *proc){
}
/*!
- * \b SLOT to send the command for "suspend to disk" to HAL daemon.
+ * \b TQT_SLOT to send the command for "suspend to disk" to HAL daemon.
* If there is a error while "suspend to disk" the user get e messagebox.
* This function need a running HAL daemon for "suspend to disk".
* \return boolean with the result of the operation
@@ -735,7 +735,7 @@ bool kpowersave::do_suspend2disk(){
}
/*!
- * \b SLOT to send the command for "suspend to RAM" to the HAL daemon.
+ * \b TQT_SLOT to send the command for "suspend to RAM" to the HAL daemon.
* If there is a error while "suspend to RAM" the user get e messagebox.
* This function need a running HAL daemon for "suspend to RAM".
* \return boolean with the result of the operation
@@ -791,7 +791,7 @@ bool kpowersave::do_suspend2ram(){
}
/*!
- * \b SLOT to send the command for "stand-by" to the HAL daemon.
+ * \b TQT_SLOT to send the command for "stand-by" to the HAL daemon.
* If there is a error while "stand-by" the user get e messagebox.
* This function need a running HAL daemon for "stand-by".
* \return boolean with the result of the operation
@@ -846,7 +846,7 @@ bool kpowersave::do_standby(){
}
/*!
- * \b SLOT to send check if we should display the warning dialog and display
+ * \b TQT_SLOT to send check if we should display the warning dialog and display
* the dialog if needed or call directly autosuspend after the signal
* \ref autosuspend::inactivityTimeExpired was recieved.
*/
@@ -856,7 +856,7 @@ void kpowersave::do_autosuspendWarn() {
if (settings->autoSuspendCountdown && (settings->autoSuspendCountdownTimeout > 0)) {
// we have to display the warn dialog
if(!contextMenu()->isItemChecked(AUTOSUSPEND_MENU_ID)) {
- QString message;
+ TQString message;
countdown = new countDownDialog(settings->autoSuspendCountdownTimeout);
@@ -873,12 +873,12 @@ void kpowersave::do_autosuspendWarn() {
// TODO: rework this after translation round for openSUSE 10.3 !
message = i18n("Inactivity detected.") + " " +
i18n("To stop the %1 press the 'Cancel' button before the countdown "
- "expire.").arg(i18n("Autosuspend")) + "\n\n" +
+ "expire.").tqarg(i18n("Autosuspend")) + "\n\n" +
i18n("The computer autosuspend in: ");
countdown->setMessageText(message);
- connect(countdown, SIGNAL(dialogClosed(bool)), this, SLOT(do_autosuspend(bool)));
+ connect(countdown, TQT_SIGNAL(dialogClosed(bool)), this, TQT_SLOT(do_autosuspend(bool)));
countdown->showDialog();
}
} else {
@@ -889,7 +889,7 @@ void kpowersave::do_autosuspendWarn() {
}
/*!
- * \b SLOT to send the related suspend command for autosuspend
+ * \b TQT_SLOT to send the related suspend command for autosuspend
* \param chancel boolean with info if the autosuspend should get chanceld
* \return boolean with the result of the operation
* \retval true if successful
@@ -930,7 +930,7 @@ bool kpowersave::do_autosuspend(bool chancel) {
}
/*!
- * \b SLOT to dimm the display down to the configured level if the signal
+ * \b TQT_SLOT to dimm the display down to the configured level if the signal
* \ref autodimm::inactivityTimeExpired was recieved.
* \param
* \return boolean with the result of the operation
@@ -951,15 +951,15 @@ void kpowersave::do_downDimm() {
autoDimmDown = true;
- AUTODIMM_Timer = new QTimer(this);
- connect(AUTODIMM_Timer, SIGNAL(timeout()), this, SLOT(do_dimm()));
+ AUTODIMM_Timer = new TQTimer(this);
+ connect(AUTODIMM_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_dimm()));
AUTODIMM_Timer->start(timePerStep, false);
} else {
kdWarning() << "Don't dimm down, current level is already lower than requested Level" << endl;
}
} else {
// wait until the timer is stopped, try later!
- QTimer::singleShot(1500, this, SLOT(do_downDimm()));
+ TQTimer::singleShot(1500, this, TQT_SLOT(do_downDimm()));
}
}
@@ -967,7 +967,7 @@ void kpowersave::do_downDimm() {
}
/*!
- * \b SLOT to dimm the display up to the configured level if the signal
+ * \b TQT_SLOT to dimm the display up to the configured level if the signal
* \ref autodimm::UserIsActiveAgain was recieved.
* \param
* \return boolean with the result of the operation
@@ -990,8 +990,8 @@ void kpowersave::do_upDimm() {
autoDimmDown = false;
- AUTODIMM_Timer = new QTimer(this);
- connect(AUTODIMM_Timer, SIGNAL(timeout()), this, SLOT(do_dimm()));
+ AUTODIMM_Timer = new TQTimer(this);
+ connect(AUTODIMM_Timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(do_dimm()));
AUTODIMM_Timer->start(timePerStep, false);
// start autodimm again
@@ -1001,7 +1001,7 @@ void kpowersave::do_upDimm() {
}
} else {
// wait until the timer is stopped, try later!
- QTimer::singleShot(750, this, SLOT(do_downDimm()));
+ TQTimer::singleShot(750, this, TQT_SLOT(do_downDimm()));
}
}
@@ -1010,7 +1010,7 @@ void kpowersave::do_upDimm() {
/*!
- * \b SLOT to dimm the display down
+ * \b TQT_SLOT to dimm the display down
* \return boolean with the result of the operation
* \retval true if successful
* \retval false else
@@ -1057,10 +1057,10 @@ bool kpowersave::handleMounts( bool suspend ) {
if (trace) kdDebug() << funcinfo << "IN: " << "called suspend: " << suspend << endl;
bool _ret = false;
- QString _errormsg;
+ TQString _errormsg;
if (settings->unmountExternalOnSuspend) {
- QString _method;
+ TQString _method;
DCOPRef dcop_ref = DCOPRef( "kded", "mediamanager" );
if (suspend) {
@@ -1090,9 +1090,9 @@ bool kpowersave::handleMounts( bool suspend ) {
// on resume a simple error msg should be enough
if (!_ret && suspend) {
// handle error case
- QString _msg;
- QString _e_msg;
- QString _suspend;
+ TQString _msg;
+ TQString _e_msg;
+ TQString _suspend;
if (!_errormsg.isEmpty()) {
_e_msg = _errormsg;
@@ -1104,13 +1104,13 @@ bool kpowersave::handleMounts( bool suspend ) {
_msg = "<qt>" +
i18n("Could not umount external media before suspend/standby. \n "
"(Reason: %1)\n \n Would you like to continue suspend/standby "
- "anyway? \n(Warning: Continue suspend can cause data loss!)").arg(_e_msg) +
+ "anyway? \n(Warning: Continue suspend can cause data loss!)").tqarg(_e_msg) +
"</qt>";
_suspend = getSuspendString(calledSuspend);
int answer = KMessageBox::questionYesNo( 0, _msg,
- i18n("Error while prepare %1").arg(_suspend),
+ i18n("Error while prepare %1").tqarg(_suspend),
i18n("Suspend anyway"), i18n("Cancel suspend"),
"ignoreMountOnSuspend");
@@ -1168,7 +1168,7 @@ void kpowersave::handleS2DiskButtonEvent(){
}
/*!
- * \b SLOT to handle the lidclose event. If the screen get locked
+ * \b TQT_SLOT to handle the lidclose event. If the screen get locked
* depends on the user specific settings.
* \param closed boolean with info if the lid is closed or not
*/
@@ -1226,7 +1226,7 @@ void kpowersave::handleLidEvent( bool closed ){
}
/*!
- * \b SLOT to show the login dialog if the desktop was locked before the suspend.
+ * \b TQT_SLOT to show the login dialog if the desktop was locked before the suspend.
*/
void kpowersave::activateLoginScreen(){
kdDebugFuncIn(trace);
@@ -1236,16 +1236,16 @@ void kpowersave::activateLoginScreen(){
settings->load_general_settings();
if(settings->timeToFakeKeyAfterLock >= 0) {
- QTimer::singleShot(settings->timeToFakeKeyAfterLock, display, SLOT(fakeShiftKeyEvent()));
+ TQTimer::singleShot(settings->timeToFakeKeyAfterLock, display, TQT_SLOT(fakeShiftKeyEvent()));
}
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT to set the current suspend type for later use.
+ * \b TQT_SLOT to set the current suspend type for later use.
*/
-void kpowersave::setSuspendType( QString suspendtype){
+void kpowersave::setSuspendType( TQString suspendtype){
kdDebugFuncIn(trace);
suspendType = suspendtype;
@@ -1254,7 +1254,7 @@ void kpowersave::setSuspendType( QString suspendtype){
}
/*!
- * \b SLOT which called if kpowersave is exited by the user. In this case the user
+ * \b TQT_SLOT which called if kpowersave is exited by the user. In this case the user
* is asked through a yes/no box if "KPowersave start automatically on log in" and the
* result is written to the KDE configfile.
*/
@@ -1281,13 +1281,13 @@ void kpowersave::_quit (){
}
// set, if this is a GNOME session, XScreensaver settings back to user default
- QString session = getenv("DESKTOP_SESSION");
+ TQString session = getenv("DESKTOP_SESSION");
if(session.startsWith("gnome")) {
display->resetXScreensaver();
}
if(!settings->autostartNeverAsk) {
- QString tmp1 = i18n ("Start KPowersave automatically when you log in?");
+ TQString tmp1 = i18n ("Start KPowersave automatically when you log in?");
int tmp2 = KMessageBox::questionYesNo ( 0, tmp1, i18n("Question"),
i18n("Start Automatically"), i18n("Do Not Start"));
config->setGroup("General");
@@ -1299,14 +1299,14 @@ void kpowersave::_quit (){
}
/*!
- * \b SLOT called if the user select a 'CPU Frequency Policy' from the menu ( \ref CPUFREQ_MENU_ID ).
+ * \b TQT_SLOT called if the user select a 'CPU Frequency Policy' from the menu ( \ref CPUFRETQ_MENU_ID ).
*/
void kpowersave::do_setSpeedPolicy(int menu_id){
if (trace) kdDebug() << funcinfo << "IN: " << "menu_id/set policy to: " << menu_id << endl;
if(!hwinfo->setCPUFreq((cpufreq_type)menu_id, settings->cpuFreqDynamicPerformance)) {
KPassivePopup::message(i18n("WARNING"),
- i18n("CPU Freq Policy %1 could not be set.").arg(speed_menu->text(menu_id)),
+ i18n("CPU Freq Policy %1 could not be set.").tqarg(speed_menu->text(menu_id)),
SmallIcon("messagebox_warning", 20), this, i18n("Warning").ascii(), 10000);
} else {
hwinfo->checkCurrentCPUFreqPolicy();
@@ -1317,7 +1317,7 @@ void kpowersave::do_setSpeedPolicy(int menu_id){
}
/*!
- * \b SLOT called if the user select a scheme from the menu. If there is any errormessage
+ * \b TQT_SLOT called if the user select a scheme from the menu. If there is any errormessage
* while try to set the selected scheme, the user get a messagebox with info.
*/
void kpowersave::do_setActiveScheme( int i ){
@@ -1335,7 +1335,7 @@ void kpowersave::do_setActiveScheme( int i ){
notifySchemeSwitch();
} else if (!settings->schemes[i]){
KPassivePopup::message( i18n("WARNING"),
- i18n("Scheme %1 could not be activated.").arg(scheme_menu->text(i)),
+ i18n("Scheme %1 could not be activated.").tqarg(scheme_menu->text(i)),
SmallIcon("messagebox_warning", 20), this, i18n("Warning").ascii(), 5000);
}
@@ -1351,7 +1351,7 @@ void kpowersave::update(){
kdDebugFuncIn(trace);
int redraw_pixmap = 0;
- QString justMins;
+ TQString justMins;
/* need to redraw pixmap in toolbar */
if (hwinfo->update_info_ac_changed){
@@ -1452,9 +1452,9 @@ void kpowersave::updateCPUFreqMenu(){
if (hwinfo->supportCPUFreq() && hwinfo->isOnline() && hwinfo->isCpuFreqAllowed()) {
/* set CPU frequency menu entries *********/
/* speed menu has id 3 in context menu */
- contextMenu()->setItemVisible(CPUFREQ_MENU_ID, true);
- contextMenu()->setItemEnabled(CPUFREQ_MENU_ID, true);
- contextMenu()->setItemVisible(CPUFREQ_SEPARATOR_MENU_ID, true);
+ contextMenu()->setItemVisible(CPUFRETQ_MENU_ID, true);
+ contextMenu()->setItemEnabled(CPUFRETQ_MENU_ID, true);
+ contextMenu()->setItemVisible(CPUFRETQ_SEPARATOR_MENU_ID, true);
switch (hwinfo->getCurrentCPUFreqPolicy()){
case PERFORMANCE:
@@ -1478,13 +1478,13 @@ void kpowersave::updateCPUFreqMenu(){
if (!speed_menu) {
return ;
} else if (hwinfo->supportCPUFreq() && (hwinfo->isCpuFreqAllowed() != 1)) {
- contextMenu()->setItemEnabled(CPUFREQ_MENU_ID, false);
- contextMenu()->setItemVisible(CPUFREQ_SEPARATOR_MENU_ID, true);
+ contextMenu()->setItemEnabled(CPUFRETQ_MENU_ID, false);
+ contextMenu()->setItemVisible(CPUFRETQ_SEPARATOR_MENU_ID, true);
} else{
/* there were CPU freq policies, but they are not accessible any more */
/* delete speed_menu */
- contextMenu()->setItemVisible(CPUFREQ_MENU_ID, false);
- contextMenu()->setItemVisible(CPUFREQ_SEPARATOR_MENU_ID, false);
+ contextMenu()->setItemVisible(CPUFRETQ_MENU_ID, false);
+ contextMenu()->setItemVisible(CPUFRETQ_SEPARATOR_MENU_ID, false);
}
}
@@ -1524,34 +1524,34 @@ void kpowersave::updateSchemeMenu(){
org_schemenames = settings->schemes;
int x = 0;
- for ( QStringList::iterator it = org_schemenames.begin(); it != org_schemenames.end(); ++it ) {
+ for ( TQStringList::iterator it = org_schemenames.begin(); it != org_schemenames.end(); ++it ) {
- QString _t = *it;
+ TQString _t = *it;
if ( *it == settings->ac_scheme ){
- scheme_menu->insertItem( SmallIcon("scheme_power", QIconSet::Automatic),
- i18n( ((QString)*it).ascii() ), x, x);
+ scheme_menu->insertItem( SmallIcon("scheme_power", TQIconSet::Automatic),
+ i18n( ((TQString)*it).ascii() ), x, x);
}
else{
if ( *it == settings->battery_scheme ){
- scheme_menu->insertItem(SmallIcon("scheme_powersave", QIconSet::Automatic),
+ scheme_menu->insertItem(SmallIcon("scheme_powersave", TQIconSet::Automatic),
i18n( (*it).ascii() ), x, x);
}
else{
- if ((QString)*it == "Acoustic"){
+ if ((TQString)*it == "Acoustic"){
scheme_menu->insertItem(SmallIcon("scheme_acoustic",
- QIconSet::Automatic),
+ TQIconSet::Automatic),
i18n("Acoustic"), x, x);
}
- else if ((QString)*it == "Presentation"){
+ else if ((TQString)*it == "Presentation"){
scheme_menu->insertItem(SmallIcon("scheme_presentation",
- QIconSet::Automatic),
+ TQIconSet::Automatic),
i18n("Presentation"), x, x);
}
- else if((QString)*it == "AdvancedPowersave") {
+ else if((TQString)*it == "AdvancedPowersave") {
scheme_menu->insertItem(SmallIcon("scheme_advanced_powersave",
- QIconSet::Automatic),
+ TQIconSet::Automatic),
i18n( "Advanced Powersave" ), x, x);
}
else {
@@ -1584,10 +1584,10 @@ void kpowersave::updateSchemeMenu(){
* enters the widget. In this case if the user move the mouse cursor over the kpowersave
* trayicon. \n \n
* We use this event to update the Tooltip with all needed information. The time beetween
- * the event and the automatically popup of the QToolTip should be long enought to collect
+ * the event and the automatically popup of the TQToolTip should be long enought to collect
* the needed values and add a updated Tooltip.
*/
-void kpowersave::enterEvent( QEvent */*qee*/ ){
+void kpowersave::enterEvent( TQEvent */*qee*/ ){
updateTooltip();
@@ -1599,14 +1599,14 @@ void kpowersave::enterEvent( QEvent */*qee*/ ){
* this will raise the brightness by one level for wheel up events and lower the
* brightness by one level for wheel down events.
*/
-void kpowersave::wheelEvent (QWheelEvent *qwe)
+void kpowersave::wheelEvent (TQWheelEvent *qwe)
{
kdDebugFuncIn(trace);
if (!hwinfo->supportBrightness() && settings->brightness)
return;
- if (qwe->orientation () == Vertical) {
+ if (qwe->orientation () == Qt::Vertical) {
if (qwe->delta() > 0) {
do_brightnessUp(5);
} else {
@@ -1623,15 +1623,15 @@ void kpowersave::wheelEvent (QWheelEvent *qwe)
* right and the left mousebutton activate the menu. In the future this can also used
* to popup maybe a other menu.
*/
-void kpowersave::mousePressEvent(QMouseEvent *qme){
+void kpowersave::mousePressEvent(TQMouseEvent *qme){
kdDebugFuncIn(trace);
KSystemTray::mousePressEvent(qme);
if (hwinfo->isOnline()) {
- if (qme->button() == RightButton){
+ if (qme->button() == Qt::RightButton){
// TODO check if maybe some rechecks needed
- this->contextMenu()->exec(QCursor::pos());
- } else if (qme->button() == LeftButton) {
+ this->contextMenu()->exec(TQCursor::pos());
+ } else if (qme->button() == Qt::LeftButton) {
showDetailedDialog();
}
}
@@ -1640,7 +1640,7 @@ void kpowersave::mousePressEvent(QMouseEvent *qme){
}
/*!
- * \b SLOT called if the detaileddialog is closed. With this we prevent open
+ * \b TQT_SLOT called if the detaileddialog is closed. With this we prevent open
* the dialog twice, use this function to reset the used variables.
*/
void kpowersave::closedetaileddialog() {
@@ -1648,7 +1648,7 @@ void kpowersave::closedetaileddialog() {
}
/*!
- * \b SLOT used to display error messages related to D-Bus in kpowersave. This function
+ * \b TQT_SLOT used to display error messages related to D-Bus in kpowersave. This function
* block all messeges which we have in kpowersave!
* TODO: do something usefull
*/
@@ -1657,8 +1657,8 @@ void kpowersave::showDBusErrorMsg( int type ){
static bool displayed = false;
- QString msg;
- QString dlg_name;
+ TQString msg;
+ TQString dlg_name;
switch (type) {
case DBUS_RUNNING:
@@ -1689,7 +1689,7 @@ void kpowersave::showDBusErrorMsg( int type ){
}
/*!
- * \b SLOT to display the HAL error message. We use this
+ * \b TQT_SLOT to display the HAL error message. We use this
* function to delay the message, and prevent display them is HAL or
* powersaved restarted.
*/
@@ -1727,10 +1727,10 @@ void kpowersave::showHalErrorMsg() {
}
/*!
- * \b SLOT used to display messeges in kpowersave. This function
+ * \b TQT_SLOT used to display messeges in kpowersave. This function
* block all messeges which we have in kpowersave!
*/
-void kpowersave::showErrorMessage( QString msg ){
+void kpowersave::showErrorMessage( TQString msg ){
kdDebugFuncIn(trace);
if(settings->psMsgAsPassivePopup) {
@@ -1869,7 +1869,7 @@ void kpowersave::setSchemeSettings(){
}
/*!
- * \b SLOT which called to set and start the autosuspend monitoring.
+ * \b TQT_SLOT which called to set and start the autosuspend monitoring.
* \param resumed boolean value which represent information if machine
* currently back from suspend/standby
*/
@@ -1887,8 +1887,8 @@ void kpowersave::setAutoSuspend( bool resumed ){
autoSuspend->stop();
delete autoSuspend;
autoSuspend = new autosuspend();
- connect(autoSuspend, SIGNAL(inactivityTimeExpired()), this,
- SLOT(do_autosuspendWarn()));
+ connect(autoSuspend, TQT_SIGNAL(inactivityTimeExpired()), this,
+ TQT_SLOT(do_autosuspendWarn()));
}
if (settings->autoSuspendCountdown && (settings->autoSuspendCountdownTimeout > 0)) {
@@ -1921,7 +1921,7 @@ void kpowersave::setAutoSuspend( bool resumed ){
}
/*!
- * \b SLOT which called to set and start the autodimm monitoring.
+ * \b TQT_SLOT which called to set and start the autodimm monitoring.
* \param resumed boolean value which represent information if machine
* currently back from suspend/standby
*/
@@ -1938,8 +1938,8 @@ void kpowersave::setAutoDimm( bool resumed ){
autoDimm->stop();
delete autoDimm;
autoDimm = new autodimm();
- connect(autoDimm, SIGNAL(inactivityTimeExpired()), this, SLOT(do_downDimm()));
- connect(autoDimm, SIGNAL(UserIsActiveAgain()), this, SLOT(do_upDimm()));
+ connect(autoDimm, TQT_SIGNAL(inactivityTimeExpired()), this, TQT_SLOT(do_downDimm()));
+ connect(autoDimm, TQT_SIGNAL(UserIsActiveAgain()), this, TQT_SLOT(do_upDimm()));
}
if (settings->autoDimmSBlistEnabled) {
@@ -1959,7 +1959,7 @@ void kpowersave::setAutoDimm( bool resumed ){
// -------- start KNotify functions ------------- //
/*!
- * \b SLOT called if a battery warning state reached and related signal recieved.
+ * \b TQT_SLOT called if a battery warning state reached and related signal recieved.
* Here we emit the related KNotify event, if not disabled.
* \param type integer with the type of the battery
* \param state integer represent the reached battery state
@@ -1990,7 +1990,7 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
if (!settings->disableNotifications)
KNotifyClient::event(this->winId(), "battery_warning_event",
i18n("Battery state changed to WARNING -- remaining time: "
- "%1 hours and %2 minutes.").arg(min/60).arg(min%60));
+ "%1 hours and %2 minutes.").tqarg(min/60).tqarg(min%60));
// set/call related actions
handleActionCall(settings->batteryWarningLevelAction,
settings->batteryWarningLevelActionValue);
@@ -1999,7 +1999,7 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
if (!settings->disableNotifications)
KNotifyClient::event(this->winId(), "battery_low_event",
i18n("Battery state changed to LOW -- remaining time: "
- "%1 hours and %2 minutes.").arg(min/60).arg(min%60));
+ "%1 hours and %2 minutes.").tqarg(min/60).tqarg(min%60));
// set/call related actions
handleActionCall(settings->batteryLowLevelAction,
settings->batteryLowLevelActionValue);
@@ -2014,9 +2014,9 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
"Shut down your system or plug in the power "
"cable immediately. Otherwise the machine\n"
"will go shutdown in 30 seconds")
- .arg(min/ 60).arg(min%60));
+ .tqarg(min/ 60).tqarg(min%60));
- QTimer::singleShot(30000, this, SLOT(handleCriticalBatteryActionCall()));
+ TQTimer::singleShot(30000, this, TQT_SLOT(handleCriticalBatteryActionCall()));
} else {
if (!settings->disableNotifications)
KNotifyClient::event(this->winId(), "battery_critical_event",
@@ -2024,7 +2024,7 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
"remaining time: %1 hours and %2 minutes.\n"
"Shut down your system or plug in the power "
"cable immediately.")
- .arg(min/ 60).arg(min%60));
+ .tqarg(min/ 60).tqarg(min%60));
handleActionCall(settings->batteryCriticalLevelAction,
settings->batteryCriticalLevelActionValue);
@@ -2043,7 +2043,7 @@ void kpowersave::notifyBatteryStatusChange ( int type, int state ) {
/*!
* Function to call the action for battery critical event. This is ugly, but
- * because of QTimer::singleShot() can't take param ...
+ * because of TQTimer::singleShot() can't take param ...
* NOTE: Use this only for SHUTDOWN atm
*/
void kpowersave::handleCriticalBatteryActionCall () {
@@ -2080,21 +2080,21 @@ void kpowersave::handleActionCall ( action action, int value , bool checkAC, boo
}
break;
case GO_SUSPEND2RAM:
- QTimer::singleShot(100, this, SLOT(do_suspend2ram()));
+ TQTimer::singleShot(100, this, TQT_SLOT(do_suspend2ram()));
break;
case GO_SUSPEND2DISK:
- QTimer::singleShot(100, this, SLOT(do_suspend2disk()));
+ TQTimer::singleShot(100, this, TQT_SLOT(do_suspend2disk()));
break;
case BRIGHTNESS:
hwinfo->setBrightness( -1, value );
break;
- case CPUFREQ_POWERSAVE:
+ case CPUFRETQ_POWERSAVE:
hwinfo->setCPUFreq( POWERSAVE );
break;
- case CPUFREQ_DYNAMIC:
+ case CPUFRETQ_DYNAMIC:
hwinfo->setCPUFreq( DYNAMIC, settings->cpuFreqDynamicPerformance );
break;
- case CPUFREQ_PERFORMANCE:
+ case CPUFRETQ_PERFORMANCE:
hwinfo->setCPUFreq( PERFORMANCE );
break;
case SWITCH_SCHEME: // not supported atm
@@ -2126,7 +2126,7 @@ void kpowersave::handleActionCall ( action action, int value , bool checkAC, boo
}
/*!
- * \b SLOT called if ac stated changed. Here we emit the related KNotify event.
+ * \b TQT_SLOT called if ac stated changed. Here we emit the related KNotify event.
* and switch to the AC/battery scheme depending on the state of AC
* \param acstate boolean represent the state of AC (true == AC plugged in ...)
*/
@@ -2148,9 +2148,9 @@ void kpowersave::handleACStatusChange ( bool acstate , bool notifyEvent ) {
// handle switch to AC/battery default scheme
if (acstate) {
- index = settings->schemes.findIndex(settings->ac_scheme);
+ index = settings->schemes.tqfindIndex(settings->ac_scheme);
} else {
- index = settings->schemes.findIndex(settings->battery_scheme);
+ index = settings->schemes.tqfindIndex(settings->battery_scheme);
}
if (index != -1)
@@ -2164,15 +2164,15 @@ void kpowersave::handleACStatusChange ( bool acstate , bool notifyEvent ) {
}
/*!
- * \b SLOT called if scheme switched. Here we emit the related KNotify events
+ * \b TQT_SLOT called if scheme switched. Here we emit the related KNotify events
* if they are not disabled.
*/
void kpowersave::notifySchemeSwitch() {
kdDebugFuncIn(trace);
if(!settings->disableNotifications) {
- QString _scheme = settings->currentScheme;
- QString eventType;
+ TQString _scheme = settings->currentScheme;
+ TQString eventType;
if( _scheme != "Performance" && _scheme != "Powersave" && _scheme != "Acoustic" &&
_scheme != "Presentation" && _scheme != "AdvancedPowersave" )
@@ -2181,14 +2181,14 @@ void kpowersave::notifySchemeSwitch() {
eventType = "scheme_" + _scheme;
KNotifyClient::event( this->winId(), eventType,
- i18n("Switched to scheme: %1").arg(i18n(_scheme.ascii())).ascii());
+ i18n("Switched to scheme: %1").tqarg(i18n(_scheme.ascii())).ascii());
}
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT called if the machine suspend. Here we emit the related KNotify events
+ * \b TQT_SLOT called if the machine suspend. Here we emit the related KNotify events
* if they are not disabled.
*/
void kpowersave::notifySuspend( int suspendType ) {
@@ -2220,7 +2220,7 @@ void kpowersave::notifySuspend( int suspendType ) {
}
/*!
- * \b SLOT called to independent handleResumeSignal() from event loop and
+ * \b TQT_SLOT called to independent handleResumeSignal() from event loop and
* to avoid problems with the QT3 D-Bus bindings
*/
void kpowersave::forwardResumeSignal( int result ) {
@@ -2228,13 +2228,13 @@ void kpowersave::forwardResumeSignal( int result ) {
resume_result = result;
- QTimer::singleShot(100, this, SLOT(handleResumeSignal()));
+ TQTimer::singleShot(100, this, TQT_SLOT(handleResumeSignal()));
kdDebugFuncOut(trace);
}
/*!
- * \b SLOT called if the machine suspend. Here we emit the related KNotify events
+ * \b TQT_SLOT called if the machine suspend. Here we emit the related KNotify events
* if they are not disabled.
*/
void kpowersave::handleResumeSignal() {
@@ -2258,17 +2258,17 @@ void kpowersave::handleResumeSignal() {
switch (calledSuspend) {
case SUSPEND2DISK:
KNotifyClient::event( this->winId(), "resume_from_suspend2disk_event",
- i18n("System is resumed from %1.").arg(
+ i18n("System is resumed from %1.").tqarg(
i18n("Suspend to Disk")));
break;
case SUSPEND2RAM:
KNotifyClient::event( this->winId(), "resume_from_suspend2ram_event",
- i18n("System is resumed from %1.").arg(
+ i18n("System is resumed from %1.").tqarg(
i18n("Suspend to RAM")));
break;
case STANDBY:
KNotifyClient::event( this->winId(), "resume_from_standby_event",
- i18n("System is resumed from %1.").arg(
+ i18n("System is resumed from %1.").tqarg(
i18n("Standby")));
break;
default:
@@ -2294,10 +2294,10 @@ void kpowersave::handleResumeSignal() {
}
} else {
kdError() << "Unknown error while suspend. Errorcode: " << resume_result << endl;
- QString msg;
+ TQString msg;
msg = i18n("An unknown error occurred while %1. The errorcode is: '%2'").
- arg(getSuspendString(calledSuspend)).arg(resume_result);
+ tqarg(getSuspendString(calledSuspend)).tqarg(resume_result);
#if defined(DISTRO_IS_SUSE) || defined(DISTRO_IS_SLES_SLED) || defined(DISTRO_IS_PARDUS)
// okay we know this system use pm-utils and log is under /var/log/pm-suspend.log
@@ -2328,7 +2328,7 @@ void kpowersave::handleResumeSignal() {
#endif
}
#else
- KMessageBox::error(0, msg, i18n("Error while %1").arg(getSuspendString(calledSuspend)));
+ KMessageBox::error(0, msg, i18n("Error while %1").tqarg(getSuspendString(calledSuspend)));
#endif
}
// set back ... suspend is handled
@@ -2339,7 +2339,7 @@ void kpowersave::handleResumeSignal() {
}
/*!
- * \b SLOT called if the state of the current session change
+ * \b TQT_SLOT called if the state of the current session change
* \param state boolean represent the state of the session
* TODO: fix scheme handling
* TODO: fix critical battery situations (see the todo file in the source)
@@ -2370,9 +2370,9 @@ void kpowersave::handleSessionState (bool state) {
/*!
* Helper function to get a i18n name for a suspend type.
* \param type Integer value with the suspend type
- * \return QString with the translated name or NULL if it fail
+ * \return TQString with the translated name or NULL if it fail
*/
-QString kpowersave::getSuspendString (int type) {
+TQString kpowersave::getSuspendString (int type) {
kdDebugFuncIn(trace);
switch (type) {
@@ -2386,7 +2386,7 @@ QString kpowersave::getSuspendString (int type) {
return i18n("Standby");
break;
default:
- return QString();
+ return TQString();
}
kdDebugFuncOut(trace);
@@ -2413,9 +2413,9 @@ bool kpowersave::lockScreen(){
/*!
* DCOP Interface funtion to return the name of the current powersave scheme.
- * \return QString with the name of the current scheme
+ * \return TQString with the name of the current scheme
*/
-QString kpowersave::currentScheme (){
+TQString kpowersave::currentScheme (){
kdDebugFuncIn(trace);
if(hwinfo->isOnline()) {
@@ -2429,13 +2429,13 @@ QString kpowersave::currentScheme (){
/*!
* DCOP Interface funtion to return the name of the current cpuFreqPolicy.
- * \return QString with the name of the current cpuFreqPolicy
+ * \return TQString with the name of the current cpuFreqPolicy
*/
-QString kpowersave::currentCPUFreqPolicy() {
+TQString kpowersave::currentCPUFreqPolicy() {
kdDebugFuncIn(trace);
if(hwinfo->isOnline()) {
- QString _cpuFreq = "";
+ TQString _cpuFreq = "";
switch (hwinfo->getCurrentCPUFreqPolicy()){
case PERFORMANCE:
_cpuFreq = "PERFORMANCE";
@@ -2461,12 +2461,12 @@ QString kpowersave::currentCPUFreqPolicy() {
/*!
* DCOP Interface funtion to send a list with the allowed
* CPU Frequency states.
- * \return QStringList with the supported CPUFreq states
+ * \return TQStringList with the supported CPUFreq states
*/
-QStringList kpowersave::listCPUFreqPolicies() {
+TQStringList kpowersave::listCPUFreqPolicies() {
kdDebugFuncIn(trace);
- QStringList ret_list;
+ TQStringList ret_list;
if (hwinfo->isCpuFreqAllowed()) {
ret_list.append("PERFORMANCE");
ret_list.append("DYNAMIC");
@@ -2482,13 +2482,13 @@ QStringList kpowersave::listCPUFreqPolicies() {
/*!
* DCOP Interface funtion to set the current CPUFreq policy
- * \param policy QString with the policy to set, only values from
+ * \param policy TQString with the policy to set, only values from
* list_CPUFreqPolicies are allowed (except "NOT SUPPORTED")
* \return boolean with the result of set the requested CPUFreq policy
* \retval true if successful set
* \retval false if not supported or any other failure
*/
-bool kpowersave::do_setCPUFreqPolicy( QString policy ) {
+bool kpowersave::do_setCPUFreqPolicy( TQString policy ) {
if (trace) kdDebug() << funcinfo << "IN: " << "policy: " << policy << endl;
@@ -2516,12 +2516,12 @@ bool kpowersave::do_setCPUFreqPolicy( QString policy ) {
/*!
* DCOP Interface funtion to send a list with the supported and enabled
* sleeping states.
- * \return QStringList with the supported spleeping states
+ * \return TQStringList with the supported spleeping states
*/
-QStringList kpowersave::allowed_sleepingStates(){
+TQStringList kpowersave::allowed_sleepingStates(){
kdDebugFuncIn(trace);
- QStringList sleepList;
+ TQStringList sleepList;
if(hwinfo->isOnline()) {
if (suspend.suspend2disk && (suspend.suspend2disk_allowed ||
suspend.suspend2disk_allowed == -1)){
@@ -2548,12 +2548,12 @@ QStringList kpowersave::allowed_sleepingStates(){
/*!
* DCOP Interface funtion to send a list with the all schemes.
- * \return QStringList with all schemes
+ * \return TQStringList with all schemes
*/
-QStringList kpowersave::listSchemes(){
+TQStringList kpowersave::listSchemes(){
kdDebugFuncIn(trace);
- QStringList _schemeList;
+ TQStringList _schemeList;
if(hwinfo->isOnline()) {
if (settings->schemes.count() > 0){
_schemeList = settings->schemes;
@@ -2573,14 +2573,14 @@ QStringList kpowersave::listSchemes(){
* \return boolean with the result of set the requested scheme
* \retval false if failed (e.g. scheme is not in the list)
* \retval true if scheme found and set
- * \param _scheme QString with the scheme to set, scheme should be
+ * \param _scheme TQString with the scheme to set, scheme should be
* named as list from list_schemes()
*/
-bool kpowersave::do_setScheme( QString /*_scheme*/ ) {
+bool kpowersave::do_setScheme( TQString /*_scheme*/ ) {
kdDebugFuncIn(trace);
/* int index;
- index = settings->schemes.findIndex(_scheme);
+ index = settings->schemes.tqfindIndex(_scheme);
if (index != -1) {
do_setActiveScheme(index);
@@ -2705,7 +2705,7 @@ void kpowersave::showDetailedDialog( ){
detailedIsShown = true;
}
- connect(detailedDlg, SIGNAL(destroyed()), this, SLOT(closedetaileddialog()));
+ connect(detailedDlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(closedetaileddialog()));
kdDebugFuncOut(trace);
}
diff --git a/src/kpowersave.h b/src/kpowersave.h
index e739344..e6f12ed 100644
--- a/src/kpowersave.h
+++ b/src/kpowersave.h
@@ -23,8 +23,8 @@
#define _KPOWERSAVE_H_
// this is needed to avoid typedef clash with X11/Xmd.h (X11/Xproto.h)
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
+#ifndef TQT_CLEAN_NAMESPACE
+#define TQT_CLEAN_NAMESPACE
#endif
// Global Header
@@ -38,7 +38,7 @@
#include <dcopobject.h>
// QT - Header
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
// kpowersave - Header
#include "autosuspend.h"
@@ -68,6 +68,7 @@
class kpowersave : public KSystemTray, public DCOPObject
{
Q_OBJECT
+// TQ_OBJECT
K_DCOP
private:
@@ -199,10 +200,10 @@ private:
int STANDBY_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between sleep-states-entries and the cpufreq-submenu */
- int CPUFREQ_SEPARATOR_MENU_ID;
+ int CPUFRETQ_SEPARATOR_MENU_ID;
//! a submenu ID
/*! contains the ID of the cpufreq sub menu*/
- int CPUFREQ_MENU_ID;
+ int CPUFRETQ_MENU_ID;
//! a menu seperator ID
/*! contains the ID of the separator between cpufreq- and scheme-submenu*/
int SCHEME_SEPARATOR_MENU_ID;
@@ -230,14 +231,14 @@ private:
*/
int countWhiteIconPixel;
- //! QTimer-interval for icon background
+ //! TQTimer-interval for icon background
/*!
* Time intervall to set the colored background of the batteryicon on/off.
* The value is 1000 msec/ 1 sec.
*/
static const int BAT_icon_BG_intervall = 1000;
- //! QTimer-interval for display HAL error message
+ //! TQTimer-interval for display HAL error message
/*!
* Time intervall to delay display the HAL error message to prevent displayed
* the message if only HAL or powersave is restarted. The value is 15000 msec/ 15 sec.
@@ -245,40 +246,40 @@ private:
static const int HAL_ERROR_MSG_intervall = 15000;
//! type of current running suspend
- /*! QString store the name of the current running suspend*/
- QString suspendType;
+ /*! TQString store the name of the current running suspend*/
+ TQString suspendType;
//! current name of the pixmap
/*!
* Contains the current name of the icon/pixmap. The value must be a filename of a existing iconfile.
* \sa power_icon, no_battery_icon, charge_icon, battery, battery_RED or battery_ORANGE
*/
- QString pixmap_name;
+ TQString pixmap_name;
//! contains the 'real' schemenames
/*!
* This list store the real schemenames (not the i18n()-version)
* regarding to position in the scheme-menu
*/
- QStringList org_schemenames;
+ TQStringList org_schemenames;
//! a sub-menu of the kickerapplet
- /*! QPopupMenu for the cpufreq-entries. */
- QPopupMenu *speed_menu;
+ /*! TQPopupMenu for the cpufreq-entries. */
+ TQPopupMenu *speed_menu;
//! a sub-menu of the kickerapplet
- /*! QPopupMenu for the scheme-entries. */
- QPopupMenu *scheme_menu;
+ /*! TQPopupMenu for the scheme-entries. */
+ TQPopupMenu *scheme_menu;
//! a sub-menu of the kickerapplet
- /*! QPopupMenu for the help-entries. */
- QPopupMenu *help_menu;
+ /*! TQPopupMenu for the help-entries. */
+ TQPopupMenu *help_menu;
//! icon-pixmap
- /*! QPixmap with the (pre-)loaded icon from \ref pixmap_name .*/
- QPixmap pixmap;
+ /*! TQPixmap with the (pre-)loaded icon from \ref pixmap_name .*/
+ TQPixmap pixmap;
//! icon-pixmap
- /*! QPixmap with the full draw applet Icon (to be used in other classes) .*/
- QPixmap fullIcon;
+ /*! TQPixmap with the full draw applet Icon (to be used in other classes) .*/
+ TQPixmap fullIcon;
//! Timer for the blinking Icon background
@@ -286,19 +287,19 @@ private:
* This timer is used to let blink the background of a icon in kicker.
* The timerinterval is defined in \ref BAT_icon_BG_intervall .
*/
- QTimer *BAT_WARN_ICON_Timer;
+ TQTimer *BAT_WARN_ICON_Timer;
//! Timer to delay the HAL error message
/*!
* This timer is used to add a delay befor display the HAL error message
* The timerinterval is defined in \ref HAL_ERROR_MSG_intervall .
*/
- QTimer *DISPLAY_HAL_ERROR_Timer;
+ TQTimer *DISPLAY_HAL_ERROR_Timer;
//! Timer to dimm down/up the brightness
/*!
* This timer is used dimm the display up and down. The timerinterval
* depends on calculated timePerStep in the calling function.
*/
- QTimer *AUTODIMM_Timer;
+ TQTimer *AUTODIMM_Timer;
//! draw all icon related things for \ref redrawPixmap()
void drawIcon();
@@ -314,17 +315,17 @@ private:
void updateTooltip();
//! Eventhandler to catch mouse-press-events and react
- void mousePressEvent( QMouseEvent *qme );
+ void mousePressEvent( TQMouseEvent *qme );
//! Event handler to catch mouse wheel events and react
- void wheelEvent( QWheelEvent *qwe );
+ void wheelEvent( TQWheelEvent *qwe );
//! Eventhandler to catch mouse enter events and react
- void enterEvent( QEvent *qee);
+ void enterEvent( TQEvent *qee);
//! to handle mount/umount on resume/suspend
bool handleMounts ( bool suspend );
//! to get the i18n string for a suspend type
- QString getSuspendString (int type);
+ TQString getSuspendString (int type);
private slots:
@@ -366,9 +367,9 @@ private slots:
void do_downDimm();
//! called if the user get active again and the display should get dimmed up
void do_upDimm();
- //! SLOT do do the dimmining for autodimm feature
+ //! TQT_SLOT do do the dimmining for autodimm feature
void do_dimm();
- //! SLOT to set autodimm related stuff and start autodimm monitoring
+ //! TQT_SLOT to set autodimm related stuff and start autodimm monitoring
void setAutoDimm( bool resumed );
//! to update the main menu of the kickerapplet
@@ -380,7 +381,7 @@ private slots:
void updateCPUFreqMenu();
//! this set \ref suspendType from signal
- void setSuspendType( QString suspendtype );
+ void setSuspendType( TQString suspendtype );
//! this set the autosuspend and start the monitoring
void setAutoSuspend( bool );
@@ -389,7 +390,7 @@ private slots:
//! set for a battery status the related actions
void handleActionCall ( action action, int value, bool checkAC = false, bool batWarnCall = false );
- //! this lock/reactivate the screen if a lidcloseStatus() signal is triggered
+ //! this lock/reactivate the screen if a lidclosetqStatus() signal is triggered
void handleLidEvent( bool closed );
//! show the login dialog after locked the screen
void activateLoginScreen();
@@ -427,7 +428,7 @@ private slots:
//! this is invoked to display powersave error message
void showDBusErrorMsg( int );
//! this show a blocking dialog from kpowersave with the given message
- void showErrorMessage( QString msg );
+ void showErrorMessage( TQString msg );
//! this is called when detailed dialog is closed
void closedetaileddialog();
@@ -443,9 +444,9 @@ k_dcop:
//! dcop function to lock the screen
bool lockScreen();
//! dcop function to set a scheme
- bool do_setScheme( QString );
+ bool do_setScheme( TQString );
//! dcop function to set CPU Freq policy
- bool do_setCPUFreqPolicy( QString );
+ bool do_setCPUFreqPolicy( TQString );
//! dcop function to send 'suspend to disk' command to powersaved
bool do_suspendToDisk();
//! dcop function to send 'suspend to RAM' command to powersaved
@@ -471,19 +472,19 @@ k_dcop:
int brightnessGet();
//! dcop function to return the name of the current scheme
- QString currentScheme ();
+ TQString currentScheme ();
//! dcop function to return the current cpufreqpolicy
- QString currentCPUFreqPolicy();
+ TQString currentCPUFreqPolicy();
//! dcop function to return the supported sleeping states
- QStringList allowed_sleepingStates();
+ TQStringList allowed_sleepingStates();
//! dcop function to return the schemes
- QStringList listSchemes();
+ TQStringList listSchemes();
//! dcop function to return the supported CPU
- QStringList listCPUFreqPolicies();
+ TQStringList listCPUFreqPolicies();
protected:
- void resizeEvent ( QResizeEvent * );
+ void resizeEvent ( TQResizeEvent * );
};
#endif // _KPOWERSAVE_H_
diff --git a/src/kpowersave_debug.h b/src/kpowersave_debug.h
index 6f258ea..2c9f648 100644
--- a/src/kpowersave_debug.h
+++ b/src/kpowersave_debug.h
@@ -31,7 +31,7 @@
#include <stdlib.h>
// QT - Header
-#include <qdatetime.h>
+#include <tqdatetime.h>
// KDE Header
#include <kdebug.h>
@@ -48,8 +48,8 @@ extern bool trace;
/*
* macro to collect time and k_funcinfo information for kdDebug()
*/
-#define funcinfo "[" << QTime::currentTime().toString().ascii() << \
- ":" << QTime::currentTime().msec() << "]" << k_funcinfo
+#define funcinfo "[" << TQString(TQTime::currentTime().toString()).ascii() << \
+ ":" << TQTime::currentTime().msec() << "]" << k_funcinfo
/*
* macros to trace function entry and leave points
diff --git a/src/log_viewer.ui b/src/log_viewer.ui
index fae17d0..ff95357 100644
--- a/src/log_viewer.ui
+++ b/src/log_viewer.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>log_viewer</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>log_viewer</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -19,9 +19,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<grid>
<property name="name">
@@ -35,15 +35,15 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pB_save</cstring>
</property>
@@ -61,14 +61,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>330</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>pB_close</cstring>
</property>
@@ -96,9 +96,9 @@
<slot>pB_save_clicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>pB_close_clicked()</slot>
<slot>pB_save_clicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/logviewer.cpp b/src/logviewer.cpp
index cb4d333..6e09db4 100644
--- a/src/logviewer.cpp
+++ b/src/logviewer.cpp
@@ -25,8 +25,8 @@
*/
// QT header
-#include <qfile.h>
-#include <qtextstream.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
// KDE header
#include <ktextedit.h>
@@ -38,19 +38,19 @@
#include "logviewer.h"
/*! This is the default constructor of the class LogViewer. */
-LogViewer::LogViewer( QString filename, QWidget *parent, const char *name)
- :log_viewer(parent, name, false, WDestructiveClose ) {
+LogViewer::LogViewer( TQString filename, TQWidget *tqparent, const char *name)
+ :log_viewer(tqparent, name, false, WDestructiveClose ) {
- this->setCaption(i18n("KPowersave Logfile Viewer: %1").arg(filename));
+ this->setCaption(i18n("KPowersave Logfile Viewer: %1").tqarg(filename));
- if (!QFile::exists ( filename ))
+ if (!TQFile::exists ( filename ))
return;
log_file = filename;
- QFile file (log_file);
+ TQFile file (log_file);
if (file.open(IO_ReadOnly)) {
- QTextStream stream ( &file );
+ TQTextStream stream ( &file );
kTextEdit->setText (stream.read());
kTextEdit->setReadOnly(true);
}
@@ -59,7 +59,7 @@ LogViewer::LogViewer( QString filename, QWidget *parent, const char *name)
/*! This is the default destructor of the class LogViewer. */
LogViewer::~LogViewer(){
- // no need to delete child widgets, Qt does it all for us
+ // no need to delete child widgets, TQt does it all for us
}
/*!
@@ -75,23 +75,23 @@ void LogViewer::pB_close_clicked() {
*/
void LogViewer::pB_save_clicked() {
- QString sFileName;
+ TQString sFileName;
bool tryagain = true;
while (tryagain == true) {
int answer;
- QString msg;
+ TQString msg;
- sFileName = KFileDialog::getSaveFileName( QDir::homeDirPath() );
- QFileInfo info (sFileName);
+ sFileName = KFileDialog::getSaveFileName( TQDir::homeDirPath() );
+ TQFileInfo info (sFileName);
- if (QFile::exists(sFileName) && info.isWritable() && info.isReadable() && info.isFile()) {
+ if (TQFile::exists(sFileName) && info.isWritable() && info.isReadable() && info.isFile()) {
msg = i18n("File already exist. Overwrite the file?");
answer = KMessageBox::questionYesNo(this, msg , i18n("Error while save logfile"));
if (answer == KMessageBox::Yes) {
tryagain = false;
}
- } else if (QFile::exists(sFileName)) {
+ } else if (TQFile::exists(sFileName)) {
msg = i18n("File already exist.");
answer = KMessageBox::warningContinueCancel(this, msg ,
i18n("Error while save logfile"),
@@ -105,11 +105,11 @@ void LogViewer::pB_save_clicked() {
}
}
- QFile in(log_file);
- QFile out(sFileName);
+ TQFile in(log_file);
+ TQFile out(sFileName);
if (in.open(IO_ReadOnly)) {
if (out.open(IO_WriteOnly)) {
- QByteArray input(4096);
+ TQByteArray input(4096);
long l = 0;
while (!in.atEnd()) {
l = in.readLine(input.data(), 4096);
diff --git a/src/logviewer.h b/src/logviewer.h
index bf25fd6..c04bbfd 100644
--- a/src/logviewer.h
+++ b/src/logviewer.h
@@ -38,16 +38,17 @@
class LogViewer: public log_viewer {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- LogViewer( QString filename, QWidget *parent = 0, const char *name = 0);
+ LogViewer( TQString filename, TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~LogViewer();
private:
//! name of the log file
- QString log_file;
+ TQString log_file;
private slots:
diff --git a/src/pics/cr22-action-processor.png b/src/pics/cr22-action-processor.png
index 3e7a343..5138cca 100644
--- a/src/pics/cr22-action-processor.png
+++ b/src/pics/cr22-action-processor.png
Binary files differ
diff --git a/src/screen.cpp b/src/screen.cpp
index 0f58d0f..ef62233 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -52,16 +52,16 @@ screen::screen() {
xlock = NULL;
got_XScreensaver = false;
- checkDPMSStatus();
+ checkDPMStqStatus();
check_xscreensaver_timer_runs = false;
SCREENSAVER_STATUS = -1;
screen_save_dcop_ref = DCOPRef( "kdesktop", "KScreensaverIface" );
- check_xscreensaver_timer = new QTimer( this );
- connect( check_xscreensaver_timer, SIGNAL(timeout()), this, SLOT(xscreensaver_ping() ));
+ check_xscreensaver_timer = new TQTimer( this );
+ connect( check_xscreensaver_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(xscreensaver_ping() ));
- SCREENSAVER_STATUS = checkScreenSaverStatus();
+ SCREENSAVER_STATUS = checkScreenSavertqStatus();
kdDebugFuncOut(trace);
}
@@ -80,7 +80,7 @@ screen::~screen() {
bool screen::setScreenSaver(bool enable){
kdDebugFuncIn(trace);
- if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
+ if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSavertqStatus();
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
screen_save_dcop_ref.send( "enable", enable);
kdDebugFuncOut(trace);
@@ -120,7 +120,7 @@ static int got_badwindow;
/*! Errorhandler for all X-Server related operations */
static XErrorHandler defaultHandler;
-//! to find/handle bad XWindows / XSetErrorHandler
+//! to tqfind/handle bad XWindows / XSetErrorHandler
/*!
* This function is involved by the search for the window of the Xscreensaver. By this
* function we seperate the BadWindow-error and set \ref got_badwindow if we get a BadWindow.
@@ -150,7 +150,7 @@ static Window find_xscreensaver_window(Display * dpy) {
kdDebugFuncIn(trace);
Window root = RootWindowOfScreen(DefaultScreenOfDisplay(dpy));
- Window root2, parent, *kids;
+ Window root2, tqparent, *kids;
Window retval = 0;
Atom xs_version;
unsigned int i;
@@ -158,7 +158,7 @@ static Window find_xscreensaver_window(Display * dpy) {
xs_version = XInternAtom(dpy, "_SCREENSAVER_VERSION", True);
- if (!(xs_version != None && XQueryTree(dpy, root, &root2, &parent, &kids, &nkids)
+ if (!(xs_version != None && XQueryTree(dpy, root, &root2, &tqparent, &kids, &nkids)
&& kids && nkids)) {
kdDebugFuncOut(trace);
return 0;
@@ -193,7 +193,7 @@ static Window find_xscreensaver_window(Display * dpy) {
* This function is used to ping the XScreensaver. There is no direct way to stop
* the XScreensaver without to kill/stop an restart or modify config-files of the
* current user. \n \n
-* We ping the xscreensaver as defined in the QTimer-interval \ref xScreenSaver_timer_interval .
+* We ping the xscreensaver as defined in the TQTimer-interval \ref xScreenSaver_timer_interval .
* The value of \ref xScreenSaver_timer_interval is 58 sec at the moment. The intervall must be
* smaller then 1 minute (this is the smallest interval of Xscreensaver a.t.m.).
*/
@@ -243,7 +243,7 @@ void screen::xscreensaver_ping(){
* \retval 99 gnome-screensaver check is running
* \retval -1 else
*/
-int screen::checkScreenSaverStatus() {
+int screen::checkScreenSavertqStatus() {
kdDebugFuncIn(trace);
bool get_reply = false;
@@ -284,7 +284,7 @@ int screen::checkScreenSaverStatus() {
gnomeScreensaverCheck = new KProcess;
*gnomeScreensaverCheck << "gnome-screensaver-command" << "--query";
- connect( gnomeScreensaverCheck , SIGNAL(processExited(KProcess *)),SLOT(getGSExited(KProcess *)));
+ connect( gnomeScreensaverCheck , TQT_SIGNAL(processExited(KProcess *)),TQT_SLOT(getGSExited(KProcess *)));
if(!gnomeScreensaverCheck->start(KProcess::NotifyOnExit))
{
@@ -299,7 +299,7 @@ int screen::checkScreenSaverStatus() {
}
/*!
- * \b SLOT which called if the call of gnomescreensaver-command exited
+ * \b TQT_SLOT which called if the call of gnomescreensaver-command exited
* \param gnomecheckcommand the KPocess which called this SLOT
*/
void screen::getGSExited (KProcess *gnomecheckcommand) {
@@ -326,7 +326,7 @@ void screen::getGSExited (KProcess *gnomecheckcommand) {
* \retval 0 if DMPS is disabled
* \retval -1 if there is a error
*/
-int screen::checkDPMSStatus(){
+int screen::checkDPMStqStatus(){
kdDebugFuncIn(trace);
CARD16 state;
@@ -432,7 +432,7 @@ bool screen::lockScreen(){
kdDebugFuncIn(trace);
// screensaver status known?
- if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
+ if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSavertqStatus();
// set lock for KScreensaver
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
@@ -451,8 +451,8 @@ xscreensaver:
xscreensaver_lock = new KProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
- connect(xscreensaver_lock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
if(!status)
@@ -469,8 +469,8 @@ xscreensaver:
gnomescreensaver_lock = new KProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
- connect(gnomescreensaver_lock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
if(!status)
{
@@ -487,8 +487,8 @@ xscreensaver:
xlock = new KProcess;
*xlock << "xlock"; //<< "-mode" << "blank";
- connect(xlock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xlock->start(KProcess::DontCare);
if(!status)
{
@@ -502,14 +502,14 @@ xscreensaver:
/*!
* Use this function to lock the screen with a specified lock method.
-* \param lock_withMethod a QString, which contain the alias for the lock
+* \param lock_withMethod a TQString, which contain the alias for the lock
* command.
* \return boolean with the result of the operation
* \retval true if the requested method worked
* \retval false if there was a error
* \todo check if we should also set blank only if the user would like!!!
*/
-bool screen::lockScreen( QString lock_withMethod ) {
+bool screen::lockScreen( TQString lock_withMethod ) {
kdDebugFuncIn(trace);
if (lock_withMethod == "automatic") {
@@ -521,8 +521,8 @@ bool screen::lockScreen( QString lock_withMethod ) {
xlock = new KProcess;
*xlock << "xlock";
- connect(xlock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xlock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xlock->start(KProcess::DontCare);
if(!status)
@@ -536,8 +536,8 @@ bool screen::lockScreen( QString lock_withMethod ) {
else if (lock_withMethod == "gnomescreensaver") {
gnomescreensaver_lock = new KProcess;
*gnomescreensaver_lock << "gnome-screensaver-command" << "--lock";
- connect(gnomescreensaver_lock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(gnomescreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = gnomescreensaver_lock->start(KProcess::DontCare);
if(!status)
@@ -549,7 +549,7 @@ bool screen::lockScreen( QString lock_withMethod ) {
}
else {
// screensaver status known?
- SCREENSAVER_STATUS = checkScreenSaverStatus();
+ SCREENSAVER_STATUS = checkScreenSavertqStatus();
if (lock_withMethod == "kscreensaver") {
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
@@ -571,8 +571,8 @@ xscreensaver:
xscreensaver_lock = new KProcess;
*xscreensaver_lock << "xscreensaver-command" << "-lock";
- connect(xscreensaver_lock, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_lock, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_lock->start(KProcess::DontCare);
if(!status)
@@ -597,7 +597,7 @@ xscreensaver:
void screen::blankOnlyScreen( bool blankonly ){
kdDebugFuncIn(trace);
- if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSaverStatus();
+ if(SCREENSAVER_STATUS == -1) SCREENSAVER_STATUS = checkScreenSavertqStatus();
// set KScreensaver
if((SCREENSAVER_STATUS == 1) || (SCREENSAVER_STATUS == 0)){
screen_save_dcop_ref.send("setBlankOnly", blankonly);
@@ -620,7 +620,7 @@ bool screen::resetKDEScreensaver(){
kdDebugFuncIn(trace);
if(SCREENSAVER_STATUS == -1)
- SCREENSAVER_STATUS = checkScreenSaverStatus();
+ SCREENSAVER_STATUS = checkScreenSavertqStatus();
// do this only if the screensaver is not running
if(SCREENSAVER_STATUS == 0){
@@ -648,14 +648,14 @@ bool screen::resetKDEScreensaver(){
bool screen::resetXScreensaver(){
kdDebugFuncIn(trace);
- if(checkScreenSaverStatus() == 11) {
+ if(checkScreenSavertqStatus() == 11) {
delete xscreensaver_reset;
xscreensaver_reset = new KProcess;
*xscreensaver_reset << "xscreensaver-command" << "-restart";
- connect(xscreensaver_reset, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xscreensaver_reset, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
bool status = xscreensaver_reset->start(KProcess::DontCare);
if(!status)
@@ -679,8 +679,8 @@ void screen::forceDPMSOff() {
KProcess *xset = new KProcess;
*xset << "xset" << "dpms" << "force" << "off";
- connect(xset, SIGNAL(processExited(KProcess*)),
- this, SLOT(cleanProcess(KProcess*)));
+ connect(xset, TQT_SIGNAL(processExited(KProcess*)),
+ this, TQT_SLOT(cleanProcess(KProcess*)));
if(!xset->start())
{
delete xset;
diff --git a/src/screen.h b/src/screen.h
index ed6ad17..231dd6d 100644
--- a/src/screen.h
+++ b/src/screen.h
@@ -22,8 +22,8 @@
/* this is needed to avoid typedef clash with X11/Xmd.h (X11/Xproto.h)
*/
-#ifndef QT_CLEAN_NAMESPACE
-#define QT_CLEAN_NAMESPACE
+#ifndef TQT_CLEAN_NAMESPACE
+#define TQT_CLEAN_NAMESPACE
#endif
// KDE Header
@@ -32,11 +32,11 @@
#include <klocale.h>
// QT Header
-#include <qstring.h>
-#include <qwidget.h>
-//#include <qvector.h>
-#include <qtimer.h>
-#include <qevent.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+//#include <tqvector.h>
+#include <tqtimer.h>
+#include <tqevent.h>
// X11 Header
#include <X11/X.h>
@@ -53,9 +53,10 @@
* \author Danny Kukawka, <dkukawka@suse.de>, <danny.kukawka@web.de>
* \date 2004 - 2006
*/
-class screen : public QWidget
+class screen : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
private:
@@ -96,13 +97,13 @@ private:
*/
int SCREENSAVER_STATUS;
- //! QTimer - interval
+ //! TQTimer - interval
/*! This is the interval to poll the Xscreensaver. The value is 58 sec */
static const int xScreenSaver_timer_interval = 58000;
- //! QTimer to check/ping the Xscreensaver
- /*! This is the QTimer to ping the Xscreensaver. The ping-interval is defined
+ //! TQTimer to check/ping the Xscreensaver
+ /*! This is the TQTimer to ping the Xscreensaver. The ping-interval is defined
* through \ref xScreenSaver_timer_interval . */
- QTimer *check_xscreensaver_timer;
+ TQTimer *check_xscreensaver_timer;
//! the active X-Display
/*! Here we store a pointer to the active X-Display of KDE or GNOME */
@@ -132,9 +133,9 @@ public:
//! to check if \ref check_xscreensaver_timer is active
/*!
- * This boolean contains information about QTimer \ref check_xscreensaver_timer .
- * \li true: if the QTtimer is running
- * \li false: if the QTimer isn't active/ isn't in use
+ * This boolean contains information about TQTimer \ref check_xscreensaver_timer .
+ * \li true: if the TQTtimer is running
+ * \li false: if the TQTimer isn't active/ isn't in use
*/
bool check_xscreensaver_timer_runs;
//! info about DPMS on the machine
@@ -157,7 +158,7 @@ public:
//! lock the screen
bool lockScreen();
//! lock the screen with a give alias for the lock method
- bool lockScreen( QString );
+ bool lockScreen( TQString );
//! to set DPMS on/off
bool setDPMS( bool );
//! to set the DPMS Timeouts
@@ -166,9 +167,9 @@ public:
bool setScreenSaver( bool );
//! for check the status of the screensaver
- int checkScreenSaverStatus();
+ int checkScreenSavertqStatus();
//! for check the actual status of DPMS on the machine
- int checkDPMSStatus();
+ int checkDPMStqStatus();
//! default constructor
screen();
diff --git a/src/settings.cpp b/src/settings.cpp
index 342bb81..c756370 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -51,14 +51,14 @@ Settings::~Settings()
/*!
* Loads the scheme settings from kpowersaverc and fills the related variables.
- * \param schemeName QString with the name (realname not i18n() version) of the
+ * \param schemeName TQString with the name (realname not i18n() version) of the
* scheme which setting should be load. If the scheme could not
* be loaded, this function try to load "default-scheme"
* \return the result of the load
* \retval true if the settings could be loaded
* \retval false if there was no group named like schemeName or named "default-scheme"
*/
-bool Settings::load_scheme_settings(QString schemeName){
+bool Settings::load_scheme_settings(TQString schemeName){
kconfig->reparseConfiguration();
bool setToDefault = false;
@@ -149,7 +149,7 @@ bool Settings::load_scheme_settings(QString schemeName){
kconfig->setGroup(schemeName);
}
- QString _autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
+ TQString _autoInactiveAction = kconfig->readEntry("autoInactiveAction", "NULL");
if( _autoInactiveAction != "NULL") {
autoInactiveAction = _autoInactiveAction;
}
@@ -198,7 +198,7 @@ bool Settings::load_scheme_settings(QString schemeName){
disableNotifications = kconfig->readBoolEntry("disableNotifications",false);
- QString _cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
+ TQString _cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
if( _cpufreqpolicy == "NULL") {
kconfig->setGroup("default-scheme");
_cpufreqpolicy = kconfig->readEntry("cpuFreqPolicy", "NULL");
@@ -317,10 +317,10 @@ bool Settings::load_general_settings(){
/*!
* Map the string value from the config file to the type from \ref action
- * \param _action a QString to map
+ * \param _action a TQString to map
* \return a integer value with the result of the mapping as \ref action
*/
-action Settings::mapActionToType (QString _action) {
+action Settings::mapActionToType (TQString _action) {
if (_action.isEmpty()) {
return NONE;
@@ -332,12 +332,12 @@ action Settings::mapActionToType (QString _action) {
return GO_SUSPEND2DISK;
} else if (_action.startsWith("SUSPEND2RAM")) {
return GO_SUSPEND2RAM;
- } else if (_action.startsWith("CPUFREQ_POWERSAVE")) {
- return CPUFREQ_POWERSAVE;
- } else if (_action.startsWith("CPUFREQ_DYNAMIC")) {
- return CPUFREQ_DYNAMIC;
- } else if (_action.startsWith("CPUFREQ_PERFORMANCE")) {
- return CPUFREQ_PERFORMANCE;
+ } else if (_action.startsWith("CPUFRETQ_POWERSAVE")) {
+ return CPUFRETQ_POWERSAVE;
+ } else if (_action.startsWith("CPUFRETQ_DYNAMIC")) {
+ return CPUFRETQ_DYNAMIC;
+ } else if (_action.startsWith("CPUFRETQ_PERFORMANCE")) {
+ return CPUFRETQ_PERFORMANCE;
} else if (_action.startsWith("BRIGHTNESS")) {
return BRIGHTNESS;
} else {
@@ -370,7 +370,7 @@ void Settings::load_kde(){
kde->enabled = _kconfig->readBoolEntry("Enabled", true);
kde->lock = _kconfig->readBoolEntry("Lock", true);
- QString _savername = _kconfig->readEntry("Saver", "KBlankscreen.desktop");
+ TQString _savername = _kconfig->readEntry("Saver", "KBlankscreen.desktop");
if (_savername.startsWith("KBlankscreen.desktop"))
kde->blanked = true;
else
diff --git a/src/settings.h b/src/settings.h
index 2cf589e..1769ccc 100644
--- a/src/settings.h
+++ b/src/settings.h
@@ -29,8 +29,8 @@
#include <kconfig.h>
// QT - Header
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
// own headers
#include "hardware.h"
@@ -44,9 +44,9 @@ enum action{
GO_SUSPEND2DISK,
SWITCH_SCHEME,
BRIGHTNESS,
- CPUFREQ_POWERSAVE,
- CPUFREQ_DYNAMIC,
- CPUFREQ_PERFORMANCE
+ CPUFRETQ_POWERSAVE,
+ CPUFRETQ_DYNAMIC,
+ CPUFRETQ_PERFORMANCE
};
/*!
@@ -131,26 +131,26 @@ public:
/* START ************************** General settings *******************************/
//! name of the default "onAC" scheme
- QString ac_scheme;
+ TQString ac_scheme;
//! name of the default "on Battery" scheme
- QString battery_scheme;
+ TQString battery_scheme;
//! a list with the names of the currently available schemes.
/*!
* List with the names of the currently configured schemes. The name of the
* schemes are the same as we use for the related selection in the configure file.
* Note: Be sure that the name for the default schemes is not translated !!!
*/
- QStringList schemes;
+ TQStringList schemes;
//! the name of the lock method
/*!
- * This QString contains a alias to the selected method for lock screen. Possible values:
+ * This TQString contains a alias to the selected method for lock screen. Possible values:
* \li automatic for automatically selected (sequence: kscreensaver, xscreensaver, xlock)
* \li kscreensaver for KDE KScreensaver
* \li xscreensaver for XScreensaver (default used on GNOME)
* \li xlock for xlock
*/
- QString lockmethod;
+ TQString lockmethod;
//! if the messages from powersave should popup as Kpassivepopup
/*!
@@ -267,7 +267,7 @@ public:
/* START ************************ Scheme settings and values ***********************/
//! name of the scheme representing the current settings
- QString currentScheme;
+ TQString currentScheme;
// ---------- Screensaver/DPMS section ------------ //
//! if kpowersave use own screensaver settings
@@ -371,23 +371,23 @@ public:
int autoInactiveActionAfter;
//! action which execute after a defined time of inactivity
/*!
- * This QString contains the action/command which should be execute
+ * This TQString contains the action/command which should be execute
* after a trough \ref autoInactiveActionAfter defined time. If nothing
- * should happens this QString is empty or '_NONE_'
+ * should happens this TQString is empty or '_NONE_'
*/
- QString autoInactiveAction;
+ TQString autoInactiveAction;
//! general list with running programs which prevent the autosuspend
/*!
- * This QStringList contains names of programs which prevent, if one of
+ * This TQStringList contains names of programs which prevent, if one of
* them is running/active the autossuspend.
*/
- QStringList autoInactiveGBlist;
+ TQStringList autoInactiveGBlist;
//! scheme list with running programs which prevent the autosuspend
/*!
- * This QStringList contains names of programs which prevent, if one of
+ * This TQStringList contains names of programs which prevent, if one of
* them is running/active the autossuspend.
*/
- QStringList autoInactiveSBlist;
+ TQStringList autoInactiveSBlist;
// ------ Autosuspend countdown dialog section -------- //
//! if KPowersave should display a dialog with a warning for autosuspend
@@ -438,17 +438,17 @@ public:
int autoDimmTo;
//! general list with running programs which prevent the autodimm
/*!
- * This QStringList contains names of programs which prevent, if one of
+ * This TQStringList contains names of programs which prevent, if one of
* them is running/active the autodimm of the display panel.
*/
- QStringList autoDimmGBlist;
+ TQStringList autoDimmGBlist;
//! scheme specific list with running programs which prevent the autodimm
/*!
- * This QStringList contains names of programs which prevent, if one of
+ * This TQStringList contains names of programs which prevent, if one of
* them is running/active the autodimm of the display panel. This list is
* scheme specific.
*/
- QStringList autoDimmSBlist;
+ TQStringList autoDimmSBlist;
// ------------ CPU Frequency section ---------------- //
@@ -483,7 +483,7 @@ public:
//! to load the global KDE settings
void load_kde();
//! to load settings of a specific scheme
- bool load_scheme_settings(QString);
+ bool load_scheme_settings(TQString);
private:
@@ -491,6 +491,6 @@ private:
KConfig *kconfig;
//! to map a battery action string to the related type
- action mapActionToType (QString _action);
+ action mapActionToType (TQString _action);
};
#endif
diff --git a/src/suspend_Dialog.ui b/src/suspend_Dialog.ui
index b825f06..f515865 100644
--- a/src/suspend_Dialog.ui
+++ b/src/suspend_Dialog.ui
@@ -1,10 +1,10 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>suspend_Dialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>suspend_Dialog</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>0</x>
<y>0</y>
@@ -20,23 +20,23 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>300</width>
<height>90</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>300</width>
<height>90</height>
</size>
</property>
- <widget class="QProgressBar">
+ <widget class="TQProgressBar">
<property name="name">
<cstring>progressBar</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>70</x>
<y>21</y>
@@ -45,11 +45,11 @@
</rect>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>message</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>10</x>
<y>60</y>
@@ -61,11 +61,11 @@
<string></string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>iconPixmap</cstring>
</property>
- <property name="geometry">
+ <property name="tqgeometry">
<rect>
<x>10</x>
<y>10</y>
@@ -73,13 +73,13 @@
<height>48</height>
</rect>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>48</width>
<height>48</height>
</size>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>48</width>
<height>48</height>
@@ -98,5 +98,5 @@
<data format="XPM.GZ" length="2304">789c8593c9721a311086ef3cc5947573a5dacc303043a57230b6f1beef4ee530128bc1069bcd5b2aef9e5f52b702d855410cf0a9b7bf5b626d35ba39398c56d74a936931ed99c8dc17e368b5351b0cde7ffefaf1bbb4922411de59354a56be9556681c994895ddcbf12c70eeb8c19cb27d12d8d955c7711efc47cc6ca7a970ece2559739e77c3781bdff85b0f7a71d66c3fecf81bdff8be7b8ccfe75cb71b96c98ef3cc7a27f37b08fbf1266ff3eb3e879779c076e0ab3ff03b3e88985d95eb69cd42b329f4761b6f798a57ed572250efcc12cf56acc92ffd2732af932c775b03f9f4238f1f637cb699c72bc3281bdbe7bcbd5a456653e715c04ce99eb5c6f10d8db9f84b9de3a738bede7c2deae7cbd228bd99e58ae2562a7d47316b37f8bb9caac1c17b9c46f0973fc2db3e8df6716fd1b96b34a883f6516ff0ab3f4776839d745c1f98f2cd7d3c07b81eb8ebbcc6dd64b9e75c2fe078e8d663b5d5b2e52dde67a9bc21cdff36c12d63f0cecfd5bc29c6f9bb9c6f74f0973bc0eecedafc21c7fc65c707c4798ef4fdbb191fa4a0b73fc31b3d433817d3e89977a0533e73f9d06ce3d93a282d4fcb73ccbfbbedf85a5977861f9fa4bb93496a116b53fd798cbdfe1dc5dbaa71ef5e9811e69005aa839af1f11437aa2671ad1982678a634a317c4bc7ea95fc3fbcd79cee81d153e5063e2f80d96aff4af5303b9fbb4419bd0afd1c11635113d428d3658f46fb3ee1df8efd21ee77aa57d3aa043c48fa1f1888e17f41b3a419e199d22dad019f6cee9822e5169cbf5f3f4497f0fbb57748daeb79d36eb7543b788b8c3aff2d27c0ce637418c71bfd7e16975af439546e7638ad14d27e4b7937cc0ee87d36dbdc7e8654c899b5b0f99faf6f4e6f2b7713a53ecb6a802dd13e4f64f0a3d764655d273fa35340fb03b41779b5443fe017237dcca506744f9bff9b8b32d30cf3a229a98e0266ad83b94baf3b027b6a3e8d3fd39c644ed79f695822a5bf34015dc47e6e2b717ee8f565a19d7a93de30f74d9740a6d8d866a7dca8fa5dad0fd8c8899bf71aa8333cfe0ddc5ccf457f71f73eae22c7b98f73b6632806ef4a1eedd348ba5fbc97da81e3e87f018867d7916ef7f31f75feab86f1df6cd57faffbf56fe7c2ffd0519fbee77</data>
</image>
</images>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/suspenddialog.cpp b/src/suspenddialog.cpp
index cb40a74..e76f887 100644
--- a/src/suspenddialog.cpp
+++ b/src/suspenddialog.cpp
@@ -29,19 +29,19 @@
#include <kiconloader.h>
// QT - Headers
- #include <qdialog.h>
- #include <qlabel.h>
- #include <qstring.h>
- #include <qpixmap.h>
- #include <qprogressbar.h>
+ #include <tqdialog.h>
+ #include <tqlabel.h>
+ #include <tqstring.h>
+ #include <tqpixmap.h>
+ #include <tqprogressbar.h>
#include "suspenddialog.h"
/*! This is the default constructor of the class. */
-suspendDialog::suspendDialog(QWidget *parent, const char *name)
- :suspend_Dialog(parent, name, true, Qt::WStyle_StaysOnTop | Qt::WDestructiveClose )
+suspendDialog::suspendDialog(TQWidget *tqparent, const char *name)
+ :suspend_Dialog(tqparent, name, true, TQt::WStyle_StaysOnTop | TQt::WDestructiveClose )
{
- this->setIcon(SmallIcon("kpowersave", QIconSet::Automatic));
+ this->setIcon(SmallIcon("kpowersave", TQIconSet::Automatic));
}
/*! This is the default destructor of the class. */
@@ -52,12 +52,12 @@ suspendDialog::~suspendDialog()
/*!
* This used to set Icon/pixmap for the dialog.
- * \param type QString with the type of the current suspend
+ * \param type TQString with the type of the current suspend
* to set the pixmap in the dialog
*/
-void suspendDialog::setPixmap( QString type )
+void suspendDialog::setPixmap( TQString type )
{
- QPixmap pixmap = 0;
+ TQPixmap pixmap = 0;
if(type.startsWith("suspend2disk")){// || type.startsWith("NULL")) {
pixmap = KGlobal::iconLoader()->loadIcon("suspend_to_disk", KIcon::NoGroup, KIcon::SizeLarge);
} else if (type.startsWith("suspend2ram")) {
@@ -83,10 +83,10 @@ void suspendDialog::setProgressbar( int percent )
/*!
* This used to set the message of current suspend action to the the dialog.
- * \param messageText QString with the message of the current running suspend
+ * \param messageText TQString with the message of the current running suspend
* prepare action
*/
-void suspendDialog::setTextLabel( QString messageText )
+void suspendDialog::setTextLabel( TQString messageText )
{
message->show();
message->setText(messageText);
diff --git a/src/suspenddialog.h b/src/suspenddialog.h
index 22a4527..f5b2de0 100644
--- a/src/suspenddialog.h
+++ b/src/suspenddialog.h
@@ -36,20 +36,21 @@
class suspendDialog: public suspend_Dialog {
Q_OBJECT
+ TQ_OBJECT
public:
//! default constructor
- suspendDialog(QWidget *parent = 0, const char *name = 0);
+ suspendDialog(TQWidget *tqparent = 0, const char *name = 0);
//! default destructor
~suspendDialog();
//! set all needed icons
- void setPixmap( QString );
+ void setPixmap( TQString );
//! set the value for the progressbar
void setProgressbar( int );
//! set the message for the textlabel
- void setTextLabel( QString );
+ void setTextLabel( TQString );
};