diff options
Diffstat (limited to 'src/tdepowersave.h')
-rw-r--r-- | src/tdepowersave.h | 46 |
1 files changed, 25 insertions, 21 deletions
diff --git a/src/tdepowersave.h b/src/tdepowersave.h index 41e0d9f..67fc6f7 100644 --- a/src/tdepowersave.h +++ b/src/tdepowersave.h @@ -22,23 +22,13 @@ #ifndef _TDEPOWERSAVE_H_ #define _TDEPOWERSAVE_H_ -// this is needed to avoid typedef clash with X11/Xmd.h (X11/Xproto.h) -#ifndef TQT_CLEAN_NAMESPACE -#define TQT_CLEAN_NAMESPACE -#endif - -// Global Header -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - // KDE - Header -#include <kprocess.h> +#include <tdeprocess.h> #include <ksystemtray.h> #include <dcopobject.h> #include <tdehardwaredevices.h> -// QT - Header +// TQt - Header #include <tqpopupmenu.h> // tdepowersave - Header @@ -69,7 +59,7 @@ class TDEGlobalAccel; class tdepowersave : public KSystemTray, public DCOPObject { - Q_OBJECT + TQ_OBJECT // K_DCOP @@ -169,6 +159,11 @@ private: */ bool autoDimmDown; + // used during dimm down/up transitions + int m_dimmRequestedLevel; + int m_dimmStep; + int m_dimmTimeoutCounter; + //! to temporary hold the resume result int resume_result; @@ -188,6 +183,9 @@ private: /*! contains the ID of the menuentry for suspend-to-disk */ int SUSPEND2DISK_MENU_ID; //! a menu entry ID + /*! contains the ID of the menuentry for hybrid suspend */ + int SUSPEND_HYBRID_MENU_ID; + //! a menu entry ID /*! contains the ID of the menuentry for suspend-to-ram */ int SUSPEND2RAM_MENU_ID; //! a menu entry ID @@ -273,12 +271,12 @@ private: * The timerinterval is defined in \ref BAT_icon_BG_intervall . */ TQTimer *BAT_WARN_ICON_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. + * This timer is used to dimm the display up and down. */ - TQTimer *AUTODIMM_Timer; + TQTimer *m_autoDimmTimer; //! draw all icon related things for \ref redrawPixmap() void drawIcon(); @@ -316,6 +314,8 @@ private slots: bool do_suspend2disk(); //! send command for suspend_to_RAM to the TDE hardware library bool do_suspend2ram(); + //! send command for hybrid suspend to the TDE hardware library + bool do_suspend_hybrid(); //! show warning dialog or call autosuspend if signal \ref inactivity::inactivityTimeExpired() recieved void do_autosuspendWarn(); @@ -346,9 +346,9 @@ private slots: void do_downDimm(); //! called if the user get active again and the display should get dimmed up void do_upDimm(); - //! TQT_SLOT do do the dimmining for autodimm feature + //! TQ_SLOT do do the dimmining for autodimm feature void do_dimm(); - //! TQT_SLOT to set autodimm related stuff and start autodimm monitoring + //! TQ_SLOT to set autodimm related stuff and start autodimm monitoring void setAutoDimm( bool resumed ); //! to update the main menu of the kickerapplet @@ -377,7 +377,7 @@ private slots: //! handle event for press power button and call action void handlePowerButtonEvent(); //! handle event for press s2ram/sleep button and call action - void handleSleepButtonEvent(); + void handleSuspendButtonEvent(); //! handle event for press s2disk button and call action void handleS2DiskButtonEvent(); @@ -424,6 +424,8 @@ k_dcop: bool do_setCPUFreqPolicy( TQString ); //! dcop function to send 'suspend to disk' command to powersaved bool do_suspendToDisk(); + //! dcop function to send 'hybrid suspend' command to powersaved + bool do_suspendHybrid(); //! dcop function to send 'suspend to RAM' command to powersaved bool do_suspendToRAM(); //! dcop function to send 'freeze' command to powersaved @@ -443,10 +445,12 @@ k_dcop: //! dcop function to open the configure dialog bool openConfigureDialog(); - //! dcop function to find out if tdepowersave manages DPMS - bool currentSchemeManagesDPMS(); + //! dcop function to find out if tdepowersave manages DPMS + bool currentSchemeManagesDPMS(); //! dcop funtion to get the current brightness level int brightnessGet(); + //! dcop funtion to set the brightness level + void brightnessSet(int percentage); //! dcop function to return the name of the current scheme TQString currentScheme (); |