13#include "libmythbase/mythversion.h"
23#if CONFIG_SYSTEMD_NOTIFY
24#include <systemd/sd-daemon.h>
25static inline void mw_sd_notify(
const char *str) { sd_notify(0, str); };
32 REG_KEY(
"Welcome",
"STARTXTERM", QT_TRANSLATE_NOOP(
"MythControls",
33 "Open an Xterm window"),
"F12");
34 REG_KEY(
"Welcome",
"SHOWSETTINGS", QT_TRANSLATE_NOOP(
"MythControls",
35 "Show Mythshutdown settings"),
"F11");
36 REG_KEY(
"Welcome",
"STARTSETUP", QT_TRANSLATE_NOOP(
"MythControls",
37 "Start Mythtv-Setup"),
"");
40int main(
int argc,
char **argv)
42 bool bShowSettings =
false;
64 QApplication a(argc, argv);
82 LOG(VB_GENERAL, LOG_ERR,
83 "mythwelcome: Could not initialize MythContext. Exiting.");
91 LOG(VB_GENERAL, LOG_ERR,
92 "mythwelcome: Could not open the database. Exiting.");
124 bool ok = screen->
Create();
133 {
if (!_screen) block.quit(); });
static void SetupLCD(void)
static bool testDBConnection()
Checks DB connection + login (login info via Mythcontext)
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.
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
Startup context for MythTV.
static void ConfigureQtGUI(int SwapInterval, const MythCommandLineParser &CmdLine)
Shared static initialisation code for all MythTV GUI applications.
MythScreenStack * GetMainStack()
void DisableIdleTimer(bool DisableIdle=true)
Disable the idle timeout timer.
void Init(bool MayReInit=true)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void topScreenChanged(MythScreenType *screen)
Screen in which all other widgets are contained and rendered.
virtual bool Create(void)
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
static void ParseGeometryOverride(const QString &Geometry)
Parse an X11 style command line geometry string.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
static constexpr const char * MYTH_APPNAME_MYTHWELCOME
MythCommFlagCommandLineParser cmdline
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
static void REG_KEY(const QString &Context, const QString &Action, const QString &Description, const QString &Key)
static void mw_sd_notify(const char *)
int main(int argc, char **argv)
static void initKeys(void)