MythTV  master
mythfrontend/exitprompt.h
Go to the documentation of this file.
1 // MythTV
2 #include "mythpower.h"
3 
4 class MythDialogBox;
5 
6 class ExitPrompter : public QObject
7 {
8  Q_OBJECT
9 
10  public:
11  ExitPrompter();
12  ~ExitPrompter() override;
13 
14  public slots:
15  void HandleExit();
16 
17  protected slots:
18  void DoQuit();
19  void DoHalt(bool Confirmed);
20  void DoHalt() { DoHalt(true); }
21  void DoReboot(bool Confirmed);
22  void DoReboot() { DoReboot(true); }
23  void DoStandby();
24  void DoSuspend(bool Confirmed);
25  void DoSuspend() { DoSuspend(true); }
26  void ConfirmHalt();
27  void ConfirmReboot();
28  void ConfirmSuspend();
30  void MainDialogClosed(const QString& /*unused*/, int Id);
31 
32  private:
33  MythPower* m_power { nullptr };
34  bool m_confirm { true };
35  QString m_haltCommand;
36  QString m_rebootCommand;
38  MythDialogBox* m_dialog { nullptr };
39 };
ExitPrompter::m_confirm
bool m_confirm
Definition: mythfrontend/exitprompt.h:34
ExitPrompter::ConfirmHalt
void ConfirmHalt()
Definition: mythfrontend/exitprompt.cpp:43
ExitPrompter::m_dialog
MythDialogBox * m_dialog
Definition: mythfrontend/exitprompt.h:38
MythPower
Definition: mythpower.h:23
ExitPrompter::m_power
MythPower * m_power
Definition: mythfrontend/exitprompt.h:33
ExitPrompter
Definition: mythfrontend/exitprompt.h:6
ExitPrompter::~ExitPrompter
~ExitPrompter() override
Definition: mythfrontend/exitprompt.cpp:26
ExitPrompter::DoReboot
void DoReboot()
Definition: mythfrontend/exitprompt.h:22
ExitPrompter::DoQuit
void DoQuit()
Definition: mythfrontend/exitprompt.cpp:37
Action
An action (for this plugin) consists of a description, and a set of key sequences.
Definition: action.h:40
ExitPrompter::m_suspendCommand
QString m_suspendCommand
Definition: mythfrontend/exitprompt.h:37
ExitPrompter::MainDialogClosed
void MainDialogClosed(const QString &, int Id)
Definition: mythfrontend/exitprompt.cpp:153
ExitPrompter::m_rebootCommand
QString m_rebootCommand
Definition: mythfrontend/exitprompt.h:36
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
ExitPrompter::DoStandby
void DoStandby()
Definition: mythfrontend/exitprompt.cpp:147
MythPower::Feature
Feature
Definition: mythpower.h:39
ExitPrompter::Confirm
void Confirm(MythPower::Feature Action)
Definition: mythfrontend/exitprompt.cpp:282
ExitPrompter::DoSuspend
void DoSuspend()
Definition: mythfrontend/exitprompt.h:25
ExitPrompter::m_haltCommand
QString m_haltCommand
Definition: mythfrontend/exitprompt.h:35
ExitPrompter::DoHalt
void DoHalt()
Definition: mythfrontend/exitprompt.h:20
ExitPrompter::ConfirmReboot
void ConfirmReboot()
Definition: mythfrontend/exitprompt.cpp:80
ExitPrompter::HandleExit
void HandleExit()
Definition: mythfrontend/exitprompt.cpp:161
mythpower.h
ExitPrompter::ConfirmSuspend
void ConfirmSuspend()
Definition: mythfrontend/exitprompt.cpp:116
ExitPrompter::ExitPrompter
ExitPrompter()
Definition: mythfrontend/exitprompt.cpp:15