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 "libmyth/mythexp.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  bool SaveDatabaseParams(const DatabaseParams &params, bool force = false);
55  bool saveSettingsCache(void);
56 
57  void SetDisableEventPopup(bool check);
58 
59  enum WebOnlyStartup : std::uint8_t {
60  kWebOnlyNone = 0,
61  kWebOnlyDBSetup = 1,
62  kWebOnlyDBTimezone = 2,
63  kWebOnlyWebOnlyParm = 3,
64  kWebOnlyIPAddress = 4,
65  kWebOnlySchemaUpdate = 5
66  };
67 
68  void setWebOnly(WebOnlyStartup w) {m_webOnly = w;}
69  WebOnlyStartup getWebOnly(void) {return m_webOnly;}
70 
71  private:
72  Q_DISABLE_COPY(MythContext)
73  MythContextPrivate *d {nullptr}; // NOLINT(readability-identifier-naming)
75  WebOnlyStartup m_webOnly {kWebOnlyNone};
76 };
77 
80 
81 #endif
82 
83 /* vim: set expandtab tabstop=4 shiftwidth=4: */
mythevent.h
MPUBLIC
#define MPUBLIC
Definition: mythexp.h:10
MythContextSlotHandler::VersionMismatchPopupClosed
void VersionMismatchPopupClosed(void)
Definition: mythcontext.cpp:1576
MythContext::WebOnlyStartup
WebOnlyStartup
Definition: mythcontext.h:59
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::setWebOnly
void setWebOnly(WebOnlyStartup w)
Definition: mythcontext.h:68
force
bool force
Definition: mythcommflag.cpp:70
MythContext::m_appBinaryVersion
QString m_appBinaryVersion
Definition: mythcontext.h:74
mythlogging.h
MythContext::getWebOnly
WebOnlyStartup getWebOnly(void)
Definition: mythcontext.h:69
MythContextSlotHandler::d
MythContextPrivate * d
Definition: mythcontext.h:31
mythcorecontext.h
MythContextSlotHandler::~MythContextSlotHandler
~MythContextSlotHandler() override=default
MythContextSlotHandler::OnCloseDialog
void OnCloseDialog(void)
Definition: mythcontext.cpp:713
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:97