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  Q_OBJECT
17 
18  public:
20 
21  private slots:
22  void VersionMismatchPopupClosed(void);
23 
24  public slots:
25  void OnCloseDialog(void);
26 
27  private:
28  ~MythContextSlotHandler() override = default;
29 
30  MythContextPrivate *d {nullptr}; // NOLINT(readability-identifier-naming)
31 };
32 
43 {
44  public:
45  explicit MythContext(QString binversion, bool needsBackend = false);
46  virtual ~MythContext();
47 
48  bool Init(bool gui = true,
49  bool promptForBackend = false,
50  bool disableAutoDiscovery = false,
51  bool ignoreDB = false);
52 
53  DatabaseParams GetDatabaseParams(void);
54  bool SaveDatabaseParams(const DatabaseParams &params);
55  bool saveSettingsCache(void);
56 
57  void SetDisableEventPopup(bool check);
58 
59  private:
60  MythContextPrivate *d {nullptr}; // NOLINT(readability-identifier-naming)
62 };
63 
66 
67 #endif
68 
69 /* vim: set expandtab tabstop=4 shiftwidth=4: */
Startup context for MythTV.
Definition: mythcontext.h:42
#define MPUBLIC
Definition: mythexp.h:10
unsigned int slots[4]
Definition: element.cpp:38
QString m_appBinaryVersion
Definition: mythcontext.h:61
MPUBLIC MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:62
void VersionMismatchPopupClosed(void)
static const uint16_t * d
Structure containing the basic Database parameters.
Definition: mythdbparams.h:9
~MythContextSlotHandler() override=default
MythContextSlotHandler(MythContextPrivate *x)
Definition: mythcontext.h:19
MythContextPrivate * d
Definition: mythcontext.h:30