From 4304e8d9dab8e20513e38e71b0debdf6937b630c Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 16 Apr 2011 23:01:29 +0000 Subject: 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 --- src/hardware.h | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) (limited to 'src/hardware.h') 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 -#include -#include -#include -#include +#include +#include +#include +#include +#include // HAL Library #include @@ -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 udis; + TQDict 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 BatteryList; + TQPtrList 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 getAllBatteries() const; + TQPtrList getAllBatteries() const; //! check the currently set CPU Frequency Policy cpufreq_type checkCurrentCPUFreqPolicy(); -- cgit v1.2.3