Go to the documentation of this file.
12 #include <sys/types.h>
17 #include <QApplication>
35 #include "libmythbase/mythversion.h"
46 #define LOC QString("MythScreenWizard: ")
47 #define LOC_WARN QString("MythScreenWizard, Warning: ")
48 #define LOC_ERR QString("MythScreenWizard, Error: ")
93 auto *screenwizard =
new ScreenWizard(mainStack,
"screenwizard");
94 screenwizard->SetInitialSettings(_x, _y, _w, _h);
96 if (screenwizard->Create())
102 int main(
int argc,
char **argv)
124 QApplication a(argc, argv);
127 QString mask(
"general");
146 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to init MythContext, exiting.");
152 LOG(VB_GENERAL, LOG_WARNING,
LOC +
153 "Refusing to run screen setup wizard in windowed mode.");
173 LOG(VB_GENERAL, LOG_ERR, QString(
"Couldn't find theme '%1'")
180 mainWindow->setWindowTitle(QObject::tr(
"MythTV Screen Setup Wizard"));
203 int exitCode = QCoreApplication::exec();
MythScreenStack * GetMainStack()
@ GENERIC_EXIT_NO_THEME
No Theme available.
void Init(bool MayReInit=true)
MythCommFlagCommandLineParser cmdline
Startup context for MythTV.
void OverrideSettingForSession(const QString &key, const QString &value)
static void PrintDebug(void)
Print out any leaks if that level of debugging is enabled.
static HostSpinBoxSetting * GuiHeight()
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
static void ConfigureQtGUI(int SwapInterval, const MythCommandLineParser &CmdLine)
Shared static initialisation code for all MythTV GUI applications.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_OK
Exited with no error.
static void startAppearWiz(int _x, int _y, int _w, int _h)
void DestroyMythMainWindow(void)
QString FindThemeDir(const QString &ThemeName, bool Fallback=true)
Returns the full path to the theme denoted by themename.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
static HostSpinBoxSetting * GuiOffsetY()
int GetNumSetting(const QString &key, int defaultval=0)
static HostSpinBoxSetting * GuiOffsetX()
bool GetBoolSetting(const QString &key, bool defaultval=false)
static void Init(QObject *parent=nullptr)
static constexpr const char * DEFAULT_UI_THEME
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
static constexpr const char * MYTH_APPNAME_MYTHSCREENWIZARD
int main(int argc, char **argv)
MythMainWindow * GetMythMainWindow(void)
@ GENERIC_EXIT_NOT_OK
Exited with error.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
MythUIHelper * GetMythUI()
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
MythContext * gContext
This global variable contains the MythContext instance for the application.
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
static HostSpinBoxSetting * GuiWidth()
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
QString GetSetting(const QString &key, const QString &defaultval="")