MythTV  master
mythcontext.h
Go to the documentation of this file.
1 #ifndef MYTHCONTEXT_H_
2 #define MYTHCONTEXT_H_
3 
4 #include <QObject>
5 #include <QString>
6 
7 #include "mythcorecontext.h"
8 #include "mythevent.h"
9 #include "mythexp.h"
10 #include "mythlogging.h"
11 
12 class MythContextPrivate;
13 
14 class MythContextSlotHandler : public QObject
15 {
16  friend class MythContextPrivate;
17  Q_OBJECT
18 
19  public:
21 
22  private slots:
23  void VersionMismatchPopupClosed(void);
24 
25  public slots:
26  void OnCloseDialog(void);
27 
28  private:
29  ~MythContextSlotHandler() override = default;
30 
31  MythContextPrivate *d {nullptr}; // NOLINT(readability-identifier-naming)
32 };
33 
44 {
45  public:
46  explicit MythContext(QString binversion, bool needsBackend = false);
47  virtual ~MythContext();
48 
49  bool Init(bool gui = true,
50  bool promptForBackend = false,
51  bool disableAutoDiscovery = false,
52  bool ignoreDB = false);
53 
54  DatabaseParams GetDatabaseParams(void);
55  bool SaveDatabaseParams(const DatabaseParams &params);
56  bool saveSettingsCache(void);
57 
58  void SetDisableEventPopup(bool check);
59 
60  private:
61  Q_DISABLE_COPY(MythContext)
62  MythContextPrivate *d {nullptr}; // NOLINT(readability-identifier-naming)
64 };
65 
68 
69 #endif
70 
71 /* vim: set expandtab tabstop=4 shiftwidth=4: */
mythevent.h
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
MythContextSlotHandler::VersionMismatchPopupClosed
void VersionMismatchPopupClosed(void)
Definition: mythcontext.cpp:1539
gContext
MPUBLIC MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:64
DatabaseParams
Structure containing the basic Database parameters.
Definition: mythdbparams.h:10
mythexp.h
MythContext
Startup context for MythTV.
Definition: mythcontext.h:43
MythContext::m_appBinaryVersion
QString m_appBinaryVersion
Definition: mythcontext.h:63
mythlogging.h
MythContextSlotHandler::d
MythContextPrivate * d
Definition: mythcontext.h:31
mythcorecontext.h
MythContextSlotHandler::~MythContextSlotHandler
~MythContextSlotHandler() override=default
MythContextSlotHandler::OnCloseDialog
void OnCloseDialog(void)
Definition: mythcontext.cpp:707
d
static const iso6937table * d
Definition: iso6937tables.cpp:1025
MythContextSlotHandler
Definition: mythcontext.h:14
MythContextSlotHandler::MythContextSlotHandler
MythContextSlotHandler(MythContextPrivate *x)
Definition: mythcontext.h:20
MythContextPrivate
Definition: mythcontext.cpp:68