Torc  0.1
torcpower.cpp
Go to the documentation of this file.
1 /* Class TorcPower
2 *
3 * This file is part of the Torc project.
4 *
5 * Copyright (C) Mark Kendall 2012-18
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 * USA.
21 */
22 
23 // Qt
24 #include <QtGlobal>
25 #include <QCoreApplication>
26 
27 // Torc
28 #include "torclocalcontext.h"
29 #include "torcadminthread.h"
30 #include "torclanguage.h"
31 #include "torcpower.h"
32 
34 {
35  void Score(int &Score)
36  {
37  if (Score <= 1)
38  Score = 1;
39  }
40 
41  TorcPower* Create(int Score)
42  {
43  if (Score <= 1)
44  return new TorcPowerNull();
45 
46  return nullptr;
47  }
49 
56 
59 {
60  gPowerFactory = this;
61 }
62 
64 {
65  return gPowerFactory;
66 }
67 
69 {
70  return nextPowerFactory;
71 }
72 
74 {
75  TorcPower *power = nullptr;
76 
77  int score = 0;
79  for ( ; factory; factory = factory->NextPowerFactory())
80  (void)factory->Score(score);
81 
83  for ( ; factory; factory = factory->NextPowerFactory())
84  {
85  power = factory->Create(score);
86  if (power)
87  break;
88  }
89 
90  if (!power)
91  LOG(VB_GENERAL, LOG_ERR, QStringLiteral("Failed to create power implementation"));
92 
93  return power;
94 }
95 
119  : QObject(),
120  TorcHTTPService(this, QStringLiteral("power"), QStringLiteral("power"), TorcPower::staticMetaObject, QStringLiteral("ShuttingDown,Suspending,Hibernating,Restarting,WokeUp,LowBattery,Refresh")),
121  m_canShutdown(new TorcSetting(nullptr, QStringLiteral("CanShutdown"), QStringLiteral(), TorcSetting::Bool, TorcSetting::None, QVariant((bool)false))),
122  m_canSuspend(new TorcSetting(nullptr, QStringLiteral("CanSuspend"), QStringLiteral(), TorcSetting::Bool, TorcSetting::None, QVariant((bool)false))),
123  m_canHibernate(new TorcSetting(nullptr, QStringLiteral("CanHibernate"), QStringLiteral(), TorcSetting::Bool, TorcSetting::None, QVariant((bool)false))),
124  m_canRestart(new TorcSetting(nullptr, QStringLiteral("CanRestart"), QStringLiteral(), TorcSetting::Bool, TorcSetting::None, QVariant((bool)false))),
125  m_batteryLevel(TorcPower::UnknownPower),
126  m_powerGroupItem(new TorcSettingGroup(gLocalContext->GetRootSetting(), tr("Power"))),
127  m_powerEnabled(new TorcSetting(m_powerGroupItem, QStringLiteral("EnablePower"),
128  tr("Enable power management"),
129  TorcSetting::Bool, TorcSetting::Persistent | TorcSetting::Public, QVariant((bool)true))),
130  m_allowShutdown(new TorcSetting(m_powerEnabled, QStringLiteral("AllowShutdown"),
131  tr("Allow Torc to shutdown the system"),
132  TorcSetting::Bool, TorcSetting::Persistent | TorcSetting::Public, QVariant((bool)true))),
133  m_allowSuspend(new TorcSetting(m_powerEnabled, QStringLiteral("AllowSuspend"),
134  tr("Allow Torc to suspend the system"),
135  TorcSetting::Bool, TorcSetting::Persistent | TorcSetting::Public, QVariant((bool)true))),
136  m_allowHibernate(new TorcSetting(m_powerEnabled, QStringLiteral("AllowHibernate"),
137  tr("Allow Torc to hibernate the system"),
138  TorcSetting::Bool, TorcSetting::Persistent | TorcSetting::Public, QVariant((bool)true))),
139  m_allowRestart(new TorcSetting(m_powerEnabled, QStringLiteral("AllowRestart"),
140  tr("Allow Torc to restart the system"),
141  TorcSetting::Bool, TorcSetting::Persistent | TorcSetting::Public, QVariant((bool)true))),
142  m_lastBatteryLevel(UnknownPower),
143  canShutdown(false),
144  canSuspend(false),
145  canHibernate(false),
146  canRestart(false),
147  batteryLevel(UnknownPower)
148 {
149  m_powerEnabled->SetActive(true);
150  // 'allow' depends on both underlying platform capabilities and top level setting
151  m_allowShutdown->SetActiveThreshold(2);
152  m_allowSuspend->SetActiveThreshold(2);
153  m_allowHibernate->SetActiveThreshold(2);
154  m_allowRestart->SetActiveThreshold(2);
155 
156  if (m_canShutdown->GetValue().toBool())
157  m_allowShutdown->SetActive(true);
158  if (m_canSuspend->GetValue().toBool())
159  m_allowSuspend->SetActive(true);
160  if (m_canHibernate->GetValue().toBool())
161  m_allowHibernate->SetActive(true);
162  if (m_canRestart->GetValue().toBool())
163  m_allowRestart->SetActive(true);
164 
165  if (m_powerEnabled->GetValue().toBool())
166  {
167  m_allowShutdown->SetActive(true);
168  m_allowSuspend->SetActive(true);
169  m_allowHibernate->SetActive(true);
170  m_allowRestart->SetActive(true);
171  }
172 
173  // listen for changes
174  connect(m_allowShutdown, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ActiveChanged), this, &TorcPower::CanShutdownActiveChanged);
175  connect(m_allowSuspend, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ActiveChanged), this, &TorcPower::CanSuspendActiveChanged);
176  connect(m_allowHibernate, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ActiveChanged), this, &TorcPower::CanHibernateActiveChanged);
177  connect(m_allowRestart, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ActiveChanged), this, &TorcPower::CanRestartActiveChanged);
178 
179  connect(m_allowShutdown, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), this, &TorcPower::CanShutdownValueChanged);
180  connect(m_allowSuspend, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), this, &TorcPower::CanSuspendValueChanged);
181  connect(m_allowHibernate, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), this, &TorcPower::CanHibernateValueChanged);
182  connect(m_allowRestart, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), this, &TorcPower::CanRestartValueChanged);
183 
184  connect(m_canShutdown, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowShutdown, &TorcSetting::SetActive);
185  connect(m_canSuspend, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowSuspend, &TorcSetting::SetActive);
186  connect(m_canHibernate, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowHibernate, &TorcSetting::SetActive);
187  connect(m_canRestart, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowRestart, &TorcSetting::SetActive);
188 
189  connect(m_powerEnabled, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowShutdown, &TorcSetting::SetActive);
190  connect(m_powerEnabled, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowSuspend, &TorcSetting::SetActive);
191  connect(m_powerEnabled, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowHibernate, &TorcSetting::SetActive);
192  connect(m_powerEnabled, static_cast<void (TorcSetting::*)(bool)>(&TorcSetting::ValueChanged), m_allowRestart, &TorcSetting::SetActive);
193 
194  // listen for delayed shutdown events
195  gLocalContext->AddObserver(this);
196 }
197 
199 {
201 
202  if (m_canShutdown)
204 
205  if (m_canSuspend)
207 
208  if (m_canHibernate)
210 
211  if (m_canRestart)
213 
214  if (m_allowShutdown)
215  {
216  m_allowShutdown->Remove();
217  m_allowShutdown->DownRef();
218  }
219 
220  if (m_allowRestart)
221  {
222  m_allowRestart->Remove();
223  m_allowRestart->DownRef();
224  }
225 
226  if (m_allowHibernate)
227  {
228  m_allowHibernate->Remove();
229  m_allowHibernate->DownRef();
230  }
231 
232  if (m_allowSuspend)
233  {
234  m_allowSuspend->Remove();
235  m_allowSuspend->DownRef();
236  }
237 
238  if (m_powerEnabled)
239  {
240  m_powerEnabled->Remove();
241  m_powerEnabled->DownRef();
242  }
243 
244  if (m_powerGroupItem)
245  {
246  m_powerGroupItem->Remove();
247  m_powerGroupItem->DownRef();
248  }
249 }
250 
252 {
253  QString caps;
254 
255  if (m_canShutdown->GetValue().toBool())
256  caps += QStringLiteral("Shutdown ");
257  if (m_canSuspend->GetValue().toBool())
258  caps += QStringLiteral("Suspend ");
259  if (m_canHibernate->GetValue().toBool())
260  caps += QStringLiteral("Hibernate ");
261  if (m_canRestart->GetValue().toBool())
262  caps += QStringLiteral("Restart ");
263 
264  if (caps.isEmpty())
265  caps = QStringLiteral("None");
266 
267  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("Power support: %1").arg(caps));
268 }
269 
270 QString TorcPower::GetUIName(void)
271 {
272  return tr("Power");
273 }
274 
276 {
277  m_httpServiceLock.lockForWrite();
278 
279  if (m_lastBatteryLevel == Level)
280  {
281  m_httpServiceLock.unlock();
282  return;
283  }
284 
285  bool wasalreadylow = m_lastBatteryLevel >= 0 && m_lastBatteryLevel <= BatteryLow;
286  m_lastBatteryLevel = Level;
287 
288  if (m_lastBatteryLevel == ACPower)
289  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("On AC power"));
290  else if (m_lastBatteryLevel == UnknownPower)
291  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("Unknown power status"));
292  else
293  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("Battery level %1%").arg(m_lastBatteryLevel));
294 
295 
296  bool lowbattery = !wasalreadylow && (m_lastBatteryLevel >= 0 && m_lastBatteryLevel <= BatteryLow);
297  int level = m_lastBatteryLevel;
298 
299  m_httpServiceLock.unlock();
300 
301  if (lowbattery)
302  LowBattery();
303  emit BatteryLevelChanged(level);
304 }
305 
306 bool TorcPower::event(QEvent *Event)
307 {
308  TorcEvent* torcevent = dynamic_cast<TorcEvent*>(Event);
309  if (torcevent)
310  {
311  int event = torcevent->GetEvent();
312  switch (event)
313  {
314  case Torc::ShutdownNow:
315  return DoShutdown();
316  case Torc::RestartNow:
317  return DoRestart();
318  case Torc::SuspendNow:
319  return DoSuspend();
320  case Torc::HibernateNow:
321  return DoHibernate();
322  default: break;
323  }
324  }
325 
326  return QObject::event(Event);
327 }
328 
330 {
331  m_httpServiceLock.lockForRead();
332  bool shutdown = m_allowShutdown->GetValue().toBool() && m_allowShutdown->GetIsActive();
333  m_httpServiceLock.unlock();
334 
335  if (shutdown)
337  return false;
338 }
339 
341 {
342  m_httpServiceLock.lockForRead();
343  bool suspend = m_allowSuspend->GetValue().toBool() && m_allowSuspend->GetIsActive();
344  m_httpServiceLock.unlock();
345 
346  if (suspend)
348  return false;
349 }
350 
352 {
353  m_httpServiceLock.lockForRead();
354  bool hibernate = m_allowHibernate->GetValue().toBool() && m_allowHibernate->GetIsActive();
355  m_httpServiceLock.unlock();
356 
357  if (hibernate)
359  return false;
360 }
361 
363 {
364  m_httpServiceLock.lockForRead();
365  bool restart = m_allowRestart->GetValue().toBool() && m_allowRestart->GetIsActive();
366  m_httpServiceLock.unlock();
367 
368  if (restart)
370  return false;
371 }
372 
373 void TorcPower::SubscriberDeleted(QObject *Subscriber)
374 {
376 }
377 
379 {
380  m_httpServiceLock.lockForRead();
381  bool result = m_allowShutdown->GetValue().toBool() && m_allowShutdown->GetIsActive();
382  m_httpServiceLock.unlock();
383  return result;
384 }
385 
387 {
388  m_httpServiceLock.lockForRead();
389  bool result = m_allowSuspend->GetValue().toBool() && m_allowSuspend->GetIsActive();
390  m_httpServiceLock.unlock();
391  return result;
392 }
393 
395 {
396  m_httpServiceLock.lockForRead();
397  bool result = m_allowHibernate->GetValue().toBool() && m_allowHibernate->GetIsActive();
398  m_httpServiceLock.unlock();
399  return result;
400 }
401 
403 {
404  m_httpServiceLock.lockForRead();
405  bool result = m_allowRestart->GetValue().toBool() && m_allowRestart->GetIsActive();
406  m_httpServiceLock.unlock();
407  return result;
408 }
409 
411 {
412  m_httpServiceLock.lockForRead();
413  int result = m_batteryLevel;
414  m_httpServiceLock.unlock();
415  return result;
416 }
417 
419 {
420  m_httpServiceLock.lockForRead();
421  bool changed = m_allowShutdown->GetValue().toBool() && Active;
422  m_httpServiceLock.unlock();
423  emit CanShutdownChanged(changed);
424 }
425 
427 {
428  m_httpServiceLock.lockForRead();
429  bool changed = Value && m_allowShutdown->GetIsActive();
430  m_httpServiceLock.unlock();
431  emit CanShutdownChanged(changed);
432 }
433 
435 {
436  m_httpServiceLock.lockForRead();
437  bool changed = m_allowSuspend->GetValue().toBool() && Active;
438  m_httpServiceLock.unlock();
439  emit CanSuspendChanged(changed);
440 }
441 
443 {
444  m_httpServiceLock.lockForRead();
445  bool changed = Value && m_allowSuspend->GetIsActive();
446  m_httpServiceLock.unlock();
447  emit CanSuspendChanged(changed);
448 }
449 
451 {
452  m_httpServiceLock.lockForRead();
453  bool changed = m_allowHibernate->GetValue().toBool() && Active;
454  m_httpServiceLock.unlock();
455  emit CanHibernateChanged(changed);
456 }
457 
459 {
460  m_httpServiceLock.lockForRead();
461  bool changed = Value && m_allowHibernate->GetIsActive();
462  m_httpServiceLock.unlock();
463  emit CanHibernateChanged(changed);
464 }
465 
467 {
468  m_httpServiceLock.lockForRead();
469  bool changed = m_allowHibernate->GetValue().toBool() && Active;
470  m_httpServiceLock.unlock();
471  emit CanRestartChanged(changed);
472 }
473 
475 {
476  m_httpServiceLock.lockForRead();
477  bool changed = Value && m_allowHibernate->GetIsActive();
478  m_httpServiceLock.unlock();
479  emit CanRestartChanged(changed);
480 }
481 
482 QVariantMap TorcPower::GetPowerStatus(void)
483 {
484  QVariantMap result;
485  result.insert(QStringLiteral("canShutdown"), GetCanShutdown());
486  result.insert(QStringLiteral("canSuspend"), GetCanSuspend());
487  result.insert(QStringLiteral("canHibernate"), GetCanHibernate());
488  result.insert(QStringLiteral("canRestart"), GetCanRestart());
489  result.insert(QStringLiteral("batteryLevel"), GetBatteryLevel());
490  return result;
491 }
492 
494 {
495  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("System will shut down"));
497 }
498 
500 {
501  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("System will go to sleep"));
503 }
504 
506 {
507  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("System will hibernate"));
509 }
510 
512 {
513  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("System restarting"));
515 }
516 
518 {
519  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("System woke up"));
521 }
522 
524 {
525  LOG(VB_GENERAL, LOG_INFO, QStringLiteral("Sending low battery warning"));
527 }
528 
532 static class TorcPowerObject : public TorcAdminObject, public TorcStringFactory
533 {
534  Q_DECLARE_TR_FUNCTIONS(TorcPowerObject)
535 
536  public:
539  m_power(nullptr)
540  {
541  }
542 
544  {
545  Destroy();
546  }
547 
548  void GetStrings(QVariantMap &Strings)
549  {
550  Strings.insert(QStringLiteral("Suspend"), QCoreApplication::translate("TorcPower", "Suspend"));
551  Strings.insert(QStringLiteral("Shutdown"), QCoreApplication::translate("TorcPower", "Shutdown"));
552  Strings.insert(QStringLiteral("Hibernate"), QCoreApplication::translate("TorcPower", "Hibernate"));
553  Strings.insert(QStringLiteral("Restart"), QCoreApplication::translate("TorcPower", "Restart"));
554  Strings.insert(QStringLiteral("ConfirmSuspend"), QCoreApplication::translate("TorcPower", "Are you sure you want to suspend the device?"));
555  Strings.insert(QStringLiteral("ConfirmShutdown"), QCoreApplication::translate("TorcPower", "Are you sure you want to shutdown the device?"));
556  Strings.insert(QStringLiteral("ConfirmHibernate"), QCoreApplication::translate("TorcPower", "Are you sure you want to hibernate the device?"));
557  Strings.insert(QStringLiteral("ConfirmRestart"), QCoreApplication::translate("TorcPower", "Are you sure you want to restart the device?"));
558  Strings.insert(QStringLiteral("ACPowerTr"), QCoreApplication::translate("TorcPower", "On AC Power"));
559  Strings.insert(QStringLiteral("UnknownPowerTr"), QCoreApplication::translate("TorcPower", "Unknown power status"));
560 
561  // string constants
562  Strings.insert(QStringLiteral("ACPower"), TorcPower::ACPower);
563  Strings.insert(QStringLiteral("UnknownPower"), TorcPower::UnknownPower);
564  }
565 
566  void Create(void)
567  {
568  m_power = TorcPowerFactory::CreatePower();
569  }
570 
571  void Destroy(void)
572  {
573  if (m_power)
574  delete m_power;
575  m_power = nullptr;
576  }
577 
578  private:
579  Q_DISABLE_COPY(TorcPowerObject)
580  TorcPower *m_power;
void GetStrings(QVariantMap &Strings)
Definition: torcpower.cpp:548
QVariantMap GetPowerStatus(void)
Definition: torcpower.cpp:482
void CanHibernateActiveChanged(bool Active)
Definition: torcpower.cpp:450
bool Hibernate(void)
Definition: torcpower.cpp:351
void Create(void)
Definition: torcpower.cpp:566
void CanShutdownChanged(bool CanShutdown)
void Restarting(void)
Definition: torcpower.cpp:511
TorcLocalContext * gLocalContext
QVariant GetValue(void)
bool Suspend(void)
Definition: torcpower.cpp:340
High level group of related settings.
Definition: torcsetting.h:123
A static class used to create the TorcPower singleton in the admin thread.
Definition: torcpower.cpp:532
#define TORC_ADMIN_MED_PRIORITY
A wrapper around a database setting.
Definition: torcsetting.h:15
bool event(QEvent *Event) override
Definition: torcpower.cpp:306
A factory class for automatically running objects outside of the main loop.
int GetEvent(void)
Return the Torc action associated with this event.
Definition: torcevent.cpp:65
bool GetCanSuspend(void)
Definition: torcpower.cpp:386
void BatteryLevelChanged(int BatteryLevel)
void BatteryUpdated(int Level)
Definition: torcpower.cpp:275
void Debug(void)
Definition: torcpower.cpp:251
TorcPowerFactory * NextPowerFactory(void) const
Definition: torcpower.cpp:68
bool GetCanHibernate(void)
Definition: torcpower.cpp:394
TorcSetting * m_canHibernate
Definition: torcpower.h:95
virtual bool DownRef(void)
virtual ~TorcPower()
Definition: torcpower.cpp:198
virtual TorcPower * Create(int Score)=0
void CanHibernateChanged(bool CanHibernate)
void CanRestartValueChanged(bool Value)
Definition: torcpower.cpp:474
static void NotifyEvent(int Event)
void LowBattery(void)
Definition: torcpower.cpp:523
virtual bool DoSuspend(void)=0
void Remove(void)
TorcSetting * m_canSuspend
Definition: torcpower.h:94
static TorcPower * CreatePower(void)
Definition: torcpower.cpp:73
virtual bool DoHibernate(void)=0
A dummy/default power implementation.
Definition: torcpower.h:122
TorcPowerFactory * nextPowerFactory
Definition: torcpower.h:148
void Hibernating(void)
Definition: torcpower.cpp:505
VERBOSE_PREAMBLE true
virtual bool DoRestart(void)=0
static TorcPowerFactory * GetTorcPowerFactory(void)
Definition: torcpower.cpp:63
void ShuttingDown(void)
Definition: torcpower.cpp:493
bool GetCanRestart(void)
Definition: torcpower.cpp:402
void HandleSubscriberDeleted(QObject *Subscriber)
void Suspending(void)
Definition: torcpower.cpp:499
QReadWriteLock m_httpServiceLock
TorcSetting * m_canShutdown
Definition: torcpower.h:93
static TorcPowerFactory * gPowerFactory
Definition: torcpower.h:147
void WokeUp(void)
Definition: torcpower.cpp:517
void CanSuspendValueChanged(bool Value)
Definition: torcpower.cpp:442
A generic power status class.
Definition: torcpower.h:12
void CanHibernateValueChanged(bool Value)
Definition: torcpower.cpp:458
QString GetUIName(void) override
Definition: torcpower.cpp:270
int m_batteryLevel
Definition: torcpower.h:97
A general purpose event object.
Definition: torcevent.h:9
void Destroy(void)
Definition: torcpower.cpp:571
virtual void Score(int &Score)=0
virtual bool DoShutdown(void)=0
#define LOG(_MASK_, _LEVEL_, _STRING_)
Definition: torclogging.h:20
void ActiveChanged(bool Active)
void AddObserver(QObject *Observer)
brief Register the given object to receive events.
A factory class to register translatable strings for use with external interfaces/applications.
Definition: torclanguage.h:66
void CanSuspendChanged(bool CanSuspend)
void SetActiveThreshold(int Threshold)
void ValueChanged(int Value)
bool GetIsActive(void)
void CanRestartActiveChanged(bool Active)
Definition: torcpower.cpp:466
void RemoveObserver(QObject *Observer)
brief Deregister the given object.
TorcPowerObject TorcPowerObject
bool QueueShutdownEvent(int Event)
void CanRestartChanged(bool CanRestart)
int GetBatteryLevel(void)
Definition: torcpower.cpp:410
bool GetCanShutdown(void)
Definition: torcpower.cpp:378
bool Restart(void)
Definition: torcpower.cpp:362
TorcSetting * m_canRestart
Definition: torcpower.h:96
void CanShutdownActiveChanged(bool Active)
Definition: torcpower.cpp:418
TorcPowerFactoryNull TorcPowerFactoryNull
bool Shutdown(void)
Definition: torcpower.cpp:329
void CanSuspendActiveChanged(bool Active)
Definition: torcpower.cpp:434
void SubscriberDeleted(QObject *Subscriber)
Definition: torcpower.cpp:373
void CanShutdownValueChanged(bool Value)
Definition: torcpower.cpp:426
void SetActive(bool Value)