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

tdecore

  • tdecore
  • tdehw
tdebatterydevice.h
1/* This file is part of the TDE libraries
2 Copyright (C) 2012 Timothy Pearson <kb9vqf@pearsoncomputing.net>
3 (C) 2013 Golubev Alexander <fatzer2@gmail.com>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#ifndef _TDEBATTERYDEVICE_H
21#define _TDEBATTERYDEVICE_H
22
23#include "tdegenericdevice.h"
24
25namespace TDEBatteryStatus {
26enum TDEBatteryStatus {
27 Charging,
28 Discharging,
29 Full,
30 Unknown = 0x80000000
31};
32};
33
34class TDECORE_EXPORT TDEBatteryDevice : public TDEGenericDevice
35{
36 public:
41 TDEBatteryDevice(TDEGenericDeviceType::TDEGenericDeviceType dt, TQString dn=TQString::null);
42
46 ~TDEBatteryDevice();
47
51 double voltage();
52
56 double minimumVoltage();
57
61 double maximumVoltage();
62
66 double maximumDesignVoltage();
67
71 double energy();
72
76 double alarmEnergy();
77
81 double maximumEnergy();
82
86 double maximumDesignEnergy();
87
91 double dischargeRate();
92
96 double timeRemaining();
97
101 TQString technology();
102
106 TDEBatteryStatus::TDEBatteryStatus status();
107
111 bool installed();
112
116 double chargePercent();
117
118 protected:
123 void internalSetVoltage(double vt);
124
129 void internalSetMinimumVoltage(double vt);
130
135 void internalSetMaximumVoltage(double vt);
136
141 void internalSetMaximumDesignVoltage(double vt);
142
147 void internalSetEnergy(double vt);
148
153 void internalSetAlarmEnergy(double vt);
154
159 void internalSetMaximumEnergy(double vt);
160
165 void internalSetMaximumDesignEnergy(double vt);
166
171 void internalSetDischargeRate(double vt);
172
177 void internalSetTimeRemaining(double tr);
178
183 void internalSetTechnology(TQString tc);
184
189 void internalSetStatus(TQString tc);
190
195 void internalSetInstalled(bool tc);
196
197 private:
198 double m_currentVoltage;
199 double m_minimumVoltage;
200 double m_maximumVoltage;
201 double m_maximumDesignVoltage;
202 double m_alarmEnergy;
203 double m_currentEnergy;
204 double m_maximumEnergy;
205 double m_maximumDesignEnergy;
206 double m_dischargeRate;
207 double m_timeRemaining;
208 TQString m_technology;
209 TDEBatteryStatus::TDEBatteryStatus m_status;
210 bool m_installed;
211
212 friend class TDEHardwareDevices;
213};
214
215#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.9.4
This website is maintained by Timothy Pearson.