diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-16 23:01:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-16 23:01:29 +0000 |
commit | 4304e8d9dab8e20513e38e71b0debdf6937b630c (patch) | |
tree | 76a86f013a811449a5b5bfbbbb962e7db0bbcc6a /src/kpowersave.h | |
parent | ba24506b3bb46312d998468ad3c1a7f28058b2bd (diff) | |
download | kpowersave-4304e8d9dab8e20513e38e71b0debdf6937b630c.tar.gz kpowersave-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/kpowersave.h')
-rw-r--r-- | src/kpowersave.h | 83 |
1 files changed, 42 insertions, 41 deletions
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_ |