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_battery.h | 41 +++++++++++++++++++++-------------------- 1 file changed, 21 insertions(+), 20 deletions(-) (limited to 'src/hardware_battery.h') 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 -#include -#include +#include +#include +#include #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); -- cgit v1.2.1