MythTV master
settingshelper.h
Go to the documentation of this file.
1// Qt
2#include <QObject>
3
4// MythTV
9
10 class SettingsHelper : public QObject
11 {
12 Q_OBJECT
13
14 public:
15
16 SettingsHelper(void) = default;
17
18 ~SettingsHelper(void) override = default;
19
20 public slots:
21 void RunProlog(const QString &settingsPage)
22 {
23 m_settingsPage = settingsPage;
24
25 LOG(VB_GENERAL, LOG_DEBUG,
26 QString("SettingHelper::RunProlog called: %1").arg(m_settingsPage));
27
28 GetMythUI()->AddCurrentLocation("Setup");
30 }
31
32 void RunEpilog(void)
33 {
34 LOG(VB_GENERAL, LOG_DEBUG,
35 QString("SettingHelper::RunEpilog called: %1").arg(m_settingsPage));
36
38
40
41 // tell the backend the settings may have changed
42 gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE");
43
44 // tell the frontend the settings may have changed
45 gCoreContext->dispatch(MythEvent(QString("CLEAR_SETTINGS_CACHE")));
46
47 if (m_settingsPage == "settings general" ||
48 m_settingsPage == "settings generalrecpriorities")
50 }
51
52 private:
54 };
void ActivateSettingsCache(bool activate=true)
void dispatch(const MythEvent &event)
void SendMessage(const QString &message)
This class is used as a container for messages.
Definition: mythevent.h:17
QString RemoveCurrentLocation()
void AddCurrentLocation(const QString &Location)
static void ReschedulePlace(const QString &why)
QString m_settingsPage
~SettingsHelper(void) override=default
void RunProlog(const QString &settingsPage)
SettingsHelper(void)=default
void RunEpilog(void)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythUIHelper * GetMythUI()