16#include <QApplication>
34#include "libmythbase/mythversion.h"
44#define LOC QString("MythScreenWizard: ")
45#define LOC_WARN QString("MythScreenWizard, Warning: ")
46#define LOC_ERR QString("MythScreenWizard, Error: ")
76 auto *screenwizard =
new ScreenWizard(mainStack,
"screenwizard");
77 screenwizard->SetInitialSettings(_x, _y, _w, _h);
79 if (screenwizard->Create())
85int main(
int argc,
char **argv)
107 QApplication a(argc, argv);
110 QString mask(
"general");
120 if (!context.Init(
true,
false,
true))
122 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to init MythContext, exiting.");
128 LOG(VB_GENERAL, LOG_WARNING,
LOC +
129 "Refusing to run screen setup wizard in windowed mode.");
149 LOG(VB_GENERAL, LOG_ERR, QString(
"Couldn't find theme '%1'")
156 mainWindow->setWindowTitle(QObject::tr(
"MythTV Screen Setup Wizard"));
179 int exitCode = QCoreApplication::exec();
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
Startup context for MythTV.
QString GetSetting(const QString &key, const QString &defaultval="")
void OverrideSettingForSession(const QString &key, const QString &value)
int GetNumSetting(const QString &key, int defaultval=0)
bool GetBoolSetting(const QString &key, bool defaultval=false)
static void ConfigureQtGUI(int SwapInterval, const MythCommandLineParser &CmdLine)
Shared static initialisation code for all MythTV GUI applications.
MythScreenStack * GetMainStack()
void Init(bool MayReInit=true)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
QString FindThemeDir(const QString &ThemeName, bool Fallback=true)
Returns the full path to the theme denoted by themename.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_NO_THEME
No Theme available.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_NOT_OK
Exited with error.
static HostSpinBoxSetting * GuiHeight()
static HostSpinBoxSetting * GuiWidth()
static HostSpinBoxSetting * GuiOffsetX()
static HostSpinBoxSetting * GuiOffsetY()
static constexpr const char * MYTH_APPNAME_MYTHSCREENWIZARD
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
int main(int argc, char **argv)
static void startAppearWiz(int _x, int _y, int _w, int _h)
MythUIHelper * GetMythUI()
static constexpr const char * DEFAULT_UI_THEME
MythCommFlagCommandLineParser cmdline