• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

tdebatterydevice.h
00001 /* This file is part of the TDE libraries
00002    Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
00003              (C) 2013 Golubev Alexander <fatzer2@gmail.com>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License version 2 as published by the Free Software Foundation.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef _TDEBATTERYDEVICE_H
00021 #define _TDEBATTERYDEVICE_H
00022 
00023 #include "tdegenericdevice.h"
00024 
00025 namespace TDEBatteryStatus {
00026 enum TDEBatteryStatus {
00027     Charging,
00028     Discharging,
00029     Full,
00030     Unknown = 0x80000000
00031 };
00032 };
00033 
00034 class TDECORE_EXPORT TDEBatteryDevice : public TDEGenericDevice
00035 {
00036     public:
00041         TDEBatteryDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null);
00042         
00046         ~TDEBatteryDevice();
00047 
00051         double voltage();
00052 
00056         double minimumVoltage();
00057 
00061         double maximumVoltage();
00062 
00066         double maximumDesignVoltage();
00067 
00071         double energy();
00072 
00076         double alarmEnergy();
00077 
00081         double maximumEnergy();
00082 
00086         double maximumDesignEnergy();
00087 
00091         double dischargeRate();
00092 
00096         double timeRemaining();
00097 
00101         TQString technology();
00102 
00106         TDEBatteryStatus::TDEBatteryStatus status();
00107 
00111         bool installed();
00112 
00116         double chargePercent();
00117 
00118     protected:
00123         void internalSetVoltage(double vt);
00124 
00129         void internalSetMinimumVoltage(double vt);
00130 
00135         void internalSetMaximumVoltage(double vt);
00136 
00141         void internalSetMaximumDesignVoltage(double vt);
00142 
00147         void internalSetEnergy(double vt);
00148 
00153         void internalSetAlarmEnergy(double vt);
00154 
00159         void internalSetMaximumEnergy(double vt);
00160 
00165         void internalSetMaximumDesignEnergy(double vt);
00166 
00171         void internalSetDischargeRate(double vt);
00172 
00177         void internalSetTimeRemaining(double tr);
00178 
00183         void internalSetTechnology(TQString tc);
00184 
00189         void internalSetStatus(TQString tc);
00190 
00195         void internalSetInstalled(bool tc);
00196 
00197     private:
00198         double m_currentVoltage;
00199         double m_minimumVoltage;
00200         double m_maximumVoltage;
00201         double m_maximumDesignVoltage;
00202         double m_alarmEnergy;
00203         double m_currentEnergy;
00204         double m_maximumEnergy;
00205         double m_maximumDesignEnergy;
00206         double m_dischargeRate;
00207         double m_timeRemaining;
00208         TQString m_technology;
00209         TDEBatteryStatus::TDEBatteryStatus m_status;
00210         bool m_installed;
00211 
00212     friend class TDEHardwareDevices;
00213 };
00214 
00215 #endif // _TDEBATTERYDEVICE_H

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.6.1
This website is maintained by Timothy Pearson.