summaryrefslogtreecommitdiffstats
path: root/src/hardware_battery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardware_battery.cpp')
-rw-r--r--src/hardware_battery.cpp50
1 files changed, 25 insertions, 25 deletions
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