MythTV  master
mythtv-setup.cpp
Go to the documentation of this file.
1 // C/C++
2 #include <fcntl.h>
3 #include <iostream>
4 #include <memory>
5 #include <unistd.h>
6 
7 // Qt
8 #include <QApplication>
9 #include <QDir>
10 #include <QFileInfo>
11 #include <QMap>
12 #include <QString>
13 #include <QtGlobal>
14 
15 // MythTV
16 #include "libmythui/langsettings.h"
17 #include "libmyth/mythcontext.h"
19 #include "libmythbase/dbutil.h"
20 #include "libmythbase/exitcodes.h"
22 #include "libmythbase/mythconfig.h"
24 #include "libmythbase/mythdbcon.h"
25 #include "libmythbase/mythdirs.h"
29 #include "libmythbase/mythversion.h"
30 #include "libmythbase/remoteutil.h"
31 #include "libmythtv/cardutil.h"
36 #include "libmythtv/dbcheck.h"
38 #include "libmythtv/profilegroup.h"
39 #include "libmythtv/videosource.h"
40 #include "libmythtv/channelgroup.h"
41 #include "libmythui/mythdisplay.h"
43 #include "libmythui/mythuihelper.h"
44 #include "libmythupnp/ssdp.h"
45 
46 // MythTV Setup
47 #include "backendsettings.h"
48 #include "channeleditor.h"
49 #include "checksetup.h"
50 #include "exitprompt.h"
51 #include "expertsettingseditor.h"
53 #include "startprompt.h"
54 
57 
59 
60 static void SetupMenuCallback(void* /* data */, QString& selection)
61 {
62  QString sel = selection.toLower();
63 
64  if (sel == "general")
65  {
67  auto *ssd = new StandardSettingDialog(mainStack, "generalsettings",
68  new BackendSettings());
69 
70  if (ssd->Create())
71  mainStack->AddScreen(ssd);
72  else
73  delete ssd;
74  }
75  else if (sel == "capture cards")
76  {
78  auto *ssd = new StandardSettingDialog(mainStack, "capturecardeditor",
79  new CaptureCardEditor());
80 
81  if (ssd->Create())
82  mainStack->AddScreen(ssd);
83  else
84  delete ssd;
85  }
86  else if (sel == "video sources")
87  {
89  auto *ssd = new StandardSettingDialog(mainStack, "videosourceeditor",
90  new VideoSourceEditor());
91  if (ssd->Create())
92  mainStack->AddScreen(ssd);
93  else
94  delete ssd;
95  }
96  else if (sel == "card inputs")
97  {
99  auto *ssd = new StandardSettingDialog(mainStack, "cardinputeditor",
100  new CardInputEditor());
101 
102  if (ssd->Create())
103  mainStack->AddScreen(ssd);
104  else
105  delete ssd;
106  }
107  else if (sel == "recording profile")
108  {
110  auto *ssd = new StandardSettingDialog(mainStack, "recordingprofileeditor",
111  new ProfileGroupEditor());
112 
113  if (ssd->Create())
114  mainStack->AddScreen(ssd);
115  else
116  delete ssd;
117  }
118  else if (sel == "channel editor")
119  {
121 
122  auto *chanedit = new ChannelEditor(mainStack);
123 
124  if (chanedit->Create())
125  mainStack->AddScreen(chanedit);
126  else
127  delete chanedit;
128  }
129  else if (sel == "storage groups")
130  {
132  auto *ssd = new StandardSettingDialog(mainStack, "storagegroupeditor",
133  new StorageGroupListEditor());
134 
135  if (ssd->Create())
136  mainStack->AddScreen(ssd);
137  else
138  delete ssd;
139  }
140  else if (sel == "systemeventeditor")
141  {
143 
144  auto *msee = new MythSystemEventEditor(mainStack, "System Event Editor");
145 
146  if (msee->Create())
147  mainStack->AddScreen(msee);
148  else
149  delete msee;
150  }
151  else if (sel.startsWith("exiting_app") || (sel == "standby_mode"))
152  {
153  if (!exitPrompt)
154  exitPrompt = new ExitPrompter();
156  }
157  else
158  {
159  LOG(VB_GENERAL, LOG_ERR, "Unknown menu action: " + selection);
160  }
161 }
162 
163 static bool RunMenu(const QString& themedir, const QString& themename)
164 {
165  QByteArray tmp = themedir.toLocal8Bit();
166  menu = new MythThemedMenu(
167  QString(tmp.constData()), "setup.xml",
168  GetMythMainWindow()->GetMainStack(), "mainmenu", false);
169 
170  if (menu->foundTheme())
171  {
174  return true;
175  }
176 
177  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't use theme '%1'").arg(themename));
178  delete menu;
179  menu = nullptr;
180 
181  return false;
182 }
183 
184 // If the theme specified in the DB is somehow broken, try a standard one:
185 //
186 static bool resetTheme(QString themedir, const QString &badtheme)
187 {
188  QString themename = DEFAULT_UI_THEME;
189 
190  if (badtheme == DEFAULT_UI_THEME)
191  themename = FALLBACK_UI_THEME;
192 
193  LOG(VB_GENERAL, LOG_ERR,
194  QString("Overriding broken theme '%1' with '%2'")
195  .arg(badtheme, themename));
196 
197  gCoreContext->OverrideSettingForSession("Theme", themename);
198  themedir = GetMythUI()->FindThemeDir(themename);
199 
201  GetMythMainWindow()->Init();
202 
203  return RunMenu(themedir, themename);
204 }
205 
206 static int reloadTheme(void)
207 {
209  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
210  QString themedir = GetMythUI()->FindThemeDir(themename);
211  if (themedir.isEmpty())
212  {
213  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
214  .arg(themename));
215  return GENERIC_EXIT_NO_THEME;
216  }
217 
219 
221  if (menu)
222  menu->Close();
223  GetMythMainWindow()->Init();
225 
226  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
227  return GENERIC_EXIT_NO_THEME;
228 
229  return 0;
230 }
231 
232 int main(int argc, char *argv[])
233 {
234  QString geometry;
235  bool doScan = false;
236  bool doScanList = false;
237  bool doScanSaveOnly = false;
238  bool scanInteractive = true;
239  bool expertMode = false;
240  uint scanImport = 0;
241  bool scanFTAOnly = false;
242  bool scanLCNOnly = false;
243  bool scanCompleteOnly = false;
244  bool scanFullChannelSearch = false;
245  bool scanRemoveDuplicates = false;
246  bool addFullTS = false;
247  ServiceRequirements scanServiceRequirements = kRequireAV;
248  uint scanCardId = 0;
249  QString frequencyStandard = "atsc";
250  QString modulation = "vsb8";
251  QString region = "us";
252  QString scanInputName = "";
253 
255  if (!cmdline.Parse(argc, argv))
256  {
257  cmdline.PrintHelp();
259  }
260 
261  if (cmdline.toBool("showhelp"))
262  {
263  cmdline.PrintHelp();
264  return GENERIC_EXIT_OK;
265  }
266 
267  if (cmdline.toBool("showversion"))
268  {
270  return GENERIC_EXIT_OK;
271  }
272 
273  bool quiet = false;
274  bool use_display = true;
275  if (cmdline.toBool("scan"))
276  {
277  quiet = true;
278  use_display = false;
279  }
280 
281  std::unique_ptr<QCoreApplication> app {nullptr};
282 
283  if (use_display)
284  {
286  app = std::make_unique<QApplication>(argc, argv);
287  }
288  else
289  {
290  app = std::make_unique<QCoreApplication>(argc, argv);
291  }
292  QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHTV_SETUP);
293 
294  if (cmdline.toBool("geometry"))
295  geometry = cmdline.toString("geometry");
296 
297  QString mask("general");
298  int retval = cmdline.ConfigureLogging(mask, quiet);
299  if (retval != GENERIC_EXIT_OK)
300  return retval;
301 
302  if (cmdline.toBool("expert"))
303  expertMode = true;
304  if (cmdline.toBool("scanlist"))
305  doScanList = true;
306  if (cmdline.toBool("savescan"))
307  doScanSaveOnly = true;
308  if (cmdline.toBool("scannoninteractive"))
309  scanInteractive = false;
310 
311  if (cmdline.toBool("importscan"))
312  scanImport = cmdline.toUInt("importscan");
313  if (cmdline.toBool("ftaonly"))
314  scanFTAOnly = true;
315  if (cmdline.toBool("lcnonly"))
316  scanLCNOnly = true;
317  if (cmdline.toBool("completeonly"))
318  scanCompleteOnly = true;
319  if (cmdline.toBool("fullsearch"))
320  scanFullChannelSearch = true;
321  if (cmdline.toBool("removeduplicates"))
322  scanRemoveDuplicates = true;
323  if (cmdline.toBool("addfullts"))
324  addFullTS = true;
325  if (cmdline.toBool("servicetype"))
326  {
327  scanServiceRequirements = kRequireNothing;
328  if (cmdline.toString("servicetype").contains("radio"))
329  scanServiceRequirements = kRequireAudio;
330  if (cmdline.toString("servicetype").contains("tv"))
331  scanServiceRequirements = kRequireAV;
332  if (cmdline.toString("servicetype").contains("tv+radio") ||
333  cmdline.toString("servicetype").contains("radio+tv"))
334  scanServiceRequirements = kRequireAudio;
335  if (cmdline.toString("servicetype").contains("all"))
336  scanServiceRequirements = kRequireNothing;
337  }
338 
339  if (!cmdline.toBool("noupnp"))
340  {
341  // start looking for any uPnP devices we can use like VBoxes
342  SSDP::Instance()->PerformSearch("ssdp:all");
343  }
344  if (cmdline.toBool("scan"))
345  {
346  scanCardId = cmdline.toUInt("scan");
347  doScan = true;
348  }
349  if (cmdline.toBool("freqstd"))
350  frequencyStandard = cmdline.toString("freqstd").toLower();
351  if (cmdline.toBool("modulation"))
352  modulation = cmdline.toString("modulation").toLower();
353  if (cmdline.toBool("region"))
354  region = cmdline.toString("region").toLower();
355  if (cmdline.toBool("inputname"))
356  scanInputName = cmdline.toString("inputname");
357 
358  if (!geometry.isEmpty())
360 
361  MythContext context {MYTH_BINARY_VERSION};
362 
364  if (!context.Init(use_display,false,true)) // No Upnp, Prompt for db
365  {
366  LOG(VB_GENERAL, LOG_ERR, "Failed to init MythContext, exiting.");
368  }
369 
371 
372  if (!GetMythDB()->HaveSchema())
373  {
374  if (!InitializeMythSchema())
375  return GENERIC_EXIT_DB_ERROR;
376  }
377 
378  setHttpProxy();
379 
380  if (use_display)
381  {
382  QString fileprefix = GetConfDir();
383  QDir dir(fileprefix);
384  if (!dir.exists())
385  dir.mkdir(fileprefix);
386  }
387 
388  if (doScan)
389  {
390  bool okCardID = scanCardId != 0U;
391 
392  if (scanInputName.isEmpty())
393  scanInputName = CardUtil::GetInputName(scanCardId);
394 
395  bool okInputName = (scanInputName == CardUtil::GetInputName(scanCardId)
396  && scanInputName != "None");
397 
398  doScan = (okCardID && okInputName);
399 
400  if (!okCardID)
401  {
402  std::cerr << "You must enter a valid cardid to scan." << std::endl;
403  std::vector<unsigned int> cardids = CardUtil::GetInputIDs();
404  if (cardids.empty())
405  {
406  std::cerr << "But no cards have been defined on this host"
407  << std::endl;
409  }
410  std::cerr << "Valid cards: " << std::endl;
411  for (uint id : cardids)
412  {
413  fprintf(stderr, "%5u: %s %s\n", id,
414  CardUtil::GetRawInputType(id).toLatin1().constData(),
415  CardUtil::GetVideoDevice(id).toLatin1().constData());
416  }
418  }
419 
420  if (!okInputName)
421  {
422  std::cerr << "You must enter a valid input to scan this card."
423  << std::endl;
424  std::cerr << "Valid input: "
425  << CardUtil::GetInputName(scanCardId).toLatin1().constData()
426  << std::endl;
428  }
429  }
430 
431  if (doScan)
432  {
433  int ret = 0;
434  uint inputid = scanCardId;
435  uint sourceid = CardUtil::GetSourceID(inputid);
436  QMap<QString,QString> startChan;
437  {
438  ChannelScannerCLI scanner(doScanSaveOnly, scanInteractive);
439 
440  int scantype { ScanTypeSetting::FullScan_ATSC };
441  if (frequencyStandard == "atsc")
442  scantype = ScanTypeSetting::FullScan_ATSC; // NOLINT(bugprone-branch-clone)
443  else if (frequencyStandard == "dvbt")
445  else if (frequencyStandard == "mpeg")
447  else if (frequencyStandard == "iptv")
448  {
450  scanner.ImportM3U(scanCardId, scanInputName, sourceid, true);
451  }
452  else if (frequencyStandard == "extern")
453  {
455  }
456  else
457  {
459  }
460 
461  scanner.Scan(scantype,
462  /* cardid */ scanCardId,
463  /* inputname */ scanInputName,
464  /* sourceid */ sourceid,
465  /* ignore signal timeout */ false,
466  /* follow_nit */ true,
467  /* test decryption */ true,
468  scanFTAOnly,
469  scanLCNOnly,
470  scanCompleteOnly,
471  scanFullChannelSearch,
472  scanRemoveDuplicates,
473  addFullTS,
474  scanServiceRequirements,
475  // stuff needed for particular scans
476  /* mplexid */ 0,
477  startChan, frequencyStandard, modulation, region);
478  ret = QCoreApplication::exec();
479  }
480  return (ret) ? GENERIC_EXIT_NOT_OK : GENERIC_EXIT_OK;
481  }
482 
483  if (doScanList)
484  {
485  std::vector<ScanInfo> scans = LoadScanList();
486 
487  std::cout<<" scanid cardid sourceid processed date"<<std::endl;
488  for (auto & scan : scans)
489  {
490  printf("%5i %6i %8i %8s %20s\n",
491  scan.m_scanid, scan.m_cardid,
492  scan.m_sourceid, (scan.m_processed) ? "yes" : "no",
493  scan.m_scandate.toString(Qt::ISODate)
494  .toLatin1().constData());
495  }
496  std::cout<<std::endl;
497 
498  return GENERIC_EXIT_OK;
499  }
500 
501  if (scanImport)
502  {
503  std::cout<<"*** SCAN IMPORT START ***"<<std::endl;
504  {
505  ScanDTVTransportList list = LoadScan(scanImport);
506  ChannelImporter ci(false, true, true, true, false,
507  scanFTAOnly, scanLCNOnly,
508  scanCompleteOnly,
509  scanFullChannelSearch,
510  scanRemoveDuplicates,
511  scanServiceRequirements);
512  ci.Process(list);
513  }
514  std::cout<<"*** SCAN IMPORT END ***"<<std::endl;
515  return GENERIC_EXIT_OK;
516  }
517 
518  MythTranslation::load("mythfrontend");
519 
520  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
521  QString themedir = GetMythUI()->FindThemeDir(themename);
522  if (themedir.isEmpty())
523  {
524  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
525  .arg(themename));
526  return GENERIC_EXIT_NO_THEME;
527  }
528 
529  MythMainWindow *mainWindow = GetMythMainWindow();
530  mainWindow->Init();
531  mainWindow->setWindowTitle(QObject::tr("MythTV Setup"));
532 
533  // We must reload the translation after a language change and this
534  // also means clearing the cached/loaded theme strings, so reload the
535  // theme which also triggers a translation reload
537  {
538  if (!reloadTheme())
539  return GENERIC_EXIT_NO_THEME;
540  }
541 
543  {
544  LOG(VB_GENERAL, LOG_ERR,
545  "MySQL time zone support is missing. "
546  "Please install it and try again. "
547  "See 'mysql_tzinfo_to_sql' for assistance.");
549  }
550 
551  if (!UpgradeTVDatabaseSchema(true))
552  {
553  LOG(VB_GENERAL, LOG_ERR, "Couldn't upgrade database to new schema.");
555  }
556 
557  // Refresh Global/Main Menu keys after DB update in case there was no DB
558  // when they were written originally
559  mainWindow->ReloadKeys();
560 
561  if (!startPrompt)
562  startPrompt = new StartPrompter();
564 
565  // Let the user select buttons, type values, scan for channels, etc.
566  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
567  return GENERIC_EXIT_NO_THEME;
568 
569  ExpertSettingsEditor *expertEditor = nullptr;
570  if (expertMode)
571  {
573  expertEditor =
574  new ExpertSettingsEditor(mainStack, "Expert Settings Editor");
575  if (expertEditor->Create())
576  mainStack->AddScreen(expertEditor);
577  else
578  {
579  delete expertEditor;
580  expertEditor = nullptr;
581  LOG(VB_GENERAL, LOG_ERR,
582  "Unable to create expert settings editor window");
583  return GENERIC_EXIT_OK;
584  }
585  }
586 
587  QCoreApplication::exec();
588 
590 }
591 
592 /* vim: set expandtab tabstop=4 shiftwidth=4: */
themedir
static QString themedir
Definition: mythdirs.cpp:23
GENERIC_EXIT_DB_NOTIMEZONE
@ GENERIC_EXIT_DB_NOTIMEZONE
Missing DB time zone support.
Definition: exitcodes.h:39
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
channelscanner_cli.h
CardUtil::GetInputIDs
static std::vector< uint > GetInputIDs(const QString &videodevice=QString(), const QString &rawtype=QString(), const QString &inputname=QString(), QString hostname=QString())
Returns all inputids of inputs that uses the specified videodevice if specified, and optionally rawty...
Definition: cardutil.cpp:1304
GENERIC_EXIT_NO_THEME
@ GENERIC_EXIT_NO_THEME
No Theme available.
Definition: exitcodes.h:17
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
mythtv-setup_commandlineparser.h
setHttpProxy
void setHttpProxy(void)
Get network proxy settings from OS, and use for [Q]Http[Comms].
Definition: mythmiscutil.cpp:803
dbutil.h
MythMainWindow::Init
void Init(bool MayReInit=true)
Definition: mythmainwindow.cpp:641
MythUIScreenBounds::ParseGeometryOverride
static void ParseGeometryOverride(const QString &Geometry)
Parse an X11 style command line geometry string.
Definition: mythuiscreenbounds.cpp:40
LoadScanList
std::vector< ScanInfo > LoadScanList(void)
Definition: scaninfo.cpp:268
VideoSourceEditor
Definition: videosource.h:836
storagegroupeditor.h
expertsettingseditor.h
SSDP::PerformSearch
void PerformSearch(const QString &sST, std::chrono::seconds timeout=2s)
Definition: ssdp.cpp:251
MythTranslation::reload
static void reload()
Reload all active translators based on the current language setting.
Definition: mythtranslation.cpp:98
CardUtil::GetInputName
static QString GetInputName(uint inputid)
Definition: cardutil.cpp:1772
channelimporter.h
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:384
cmdline
MythCommFlagCommandLineParser cmdline
Definition: mythcommflag.cpp:63
ssdp.h
kRequireAudio
@ kRequireAudio
Definition: channelscantypes.h:8
MythContext
Startup context for MythTV.
Definition: mythcontext.h:19
ExitPrompter
Definition: exitprompt.h:6
RawSettingsEditor::Create
bool Create(void) override
Creates the UI screen.
Definition: rawsettingseditor.cpp:30
MythCoreContext::OverrideSettingForSession
void OverrideSettingForSession(const QString &key, const QString &value)
Definition: mythcorecontext.cpp:1347
ExpertSettingsEditor
Definition: expertsettingseditor.h:8
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
ChannelScannerCLI
Definition: channelscanner_cli.h:40
MythMainWindow::ReloadKeys
void ReloadKeys()
Definition: mythmainwindow.cpp:953
StartPrompter::handleStart
void handleStart()
Definition: startprompt.cpp:37
checksetup.h
scanwizardconfig.h
quiet
int quiet
Definition: mythcommflag.cpp:59
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
startprompt.h
MythThemedMenu::foundTheme
bool foundTheme(void) const
Returns true iff a theme has been found by a previous call to SetMenuTheme().
Definition: myththemedmenu.cpp:145
reloadTheme
static int reloadTheme(void)
Definition: mythtv-setup.cpp:206
GetMythDB
MythDB * GetMythDB(void)
Definition: mythdb.cpp:51
mythsystemevent.h
mythdirs.h
CaptureCardEditor
Definition: videosource.h:814
MythTVSetupCommandLineParser
Definition: mythtv-setup_commandlineparser.h:6
remoteutil.h
BackendSettings
Definition: backendsettings.h:7
ChannelImporter::Process
void Process(const ScanDTVTransportList &_transports, int sourceid=-1)
Definition: channelimporter.cpp:103
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:54
langsettings.h
tmp
static guint32 * tmp
Definition: goom_core.cpp:26
MythMainWindow::SetEffectsEnabled
void SetEffectsEnabled(bool Enable)
Definition: mythmainwindow.cpp:1028
MythDisplay::ConfigureQtGUI
static void ConfigureQtGUI(int SwapInterval, const MythCommandLineParser &CmdLine)
Shared static initialisation code for all MythTV GUI applications.
Definition: mythdisplay.cpp:1158
SSDP::Instance
static SSDP * Instance()
Definition: ssdp.cpp:102
ProfileGroupEditor
Definition: profilegroup.h:120
MythCommandLineParser::Parse
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
Definition: mythcommandlineparser.cpp:1558
StandardSettingDialog
Definition: standardsettings.h:468
InitializeMythSchema
bool InitializeMythSchema(void)
command to get the the initial database layout from an empty database:
Definition: dbcheck.cpp:1254
mythdisplay.h
GENERIC_EXIT_INVALID_CMDLINE
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
Definition: exitcodes.h:18
mythlogging.h
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:263
UpgradeTVDatabaseSchema
bool UpgradeTVDatabaseSchema(const bool upgradeAllowed, const bool upgradeIfNoUI, [[maybe_unused]] const bool informSystemd)
Called from outside dbcheck.cpp to update the schema.
Definition: dbcheck.cpp:362
dbcheck.h
GENERIC_EXIT_OK
@ GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:13
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
ChannelScanner::Scan
void Scan(int scantype, uint cardid, const QString &inputname, uint sourceid, bool do_ignore_signal_timeout, bool do_follow_nit, bool do_test_decryption, bool do_fta_only, bool do_lcn_only, bool do_complete_only, bool do_full_channel_search, bool do_remove_duplicates, bool do_add_full_ts, ServiceRequirements service_requirements, uint mplexid, const QMap< QString, QString > &startChan, const QString &freq_std, const QString &mod, const QString &tbl, const QString &tbl_start=QString(), const QString &tbl_end=QString())
Definition: channelscanner.cpp:111
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
startPrompt
StartPrompter * startPrompt
Definition: mythtv-setup.cpp:56
ChannelEditor
Definition: channeleditor.h:12
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
MythUIThemeHelper::FindThemeDir
QString FindThemeDir(const QString &ThemeName, bool Fallback=true)
Returns the full path to the theme denoted by themename.
Definition: mythuithemehelper.cpp:48
MythCommandLineParser::PrintVersion
static void PrintVersion(void)
Print application version information.
Definition: mythcommandlineparser.cpp:1386
mythtranslation.h
scaninfo.h
MythCommandLineParser::toUInt
uint toUInt(const QString &key) const
Returns stored QVariant as an unsigned integer, falling to default if not provided.
Definition: mythcommandlineparser.cpp:2252
DBUtil::CheckTimeZoneSupport
static bool CheckTimeZoneSupport(void)
Check if MySQL has working timz zone support.
Definition: dbutil.cpp:865
resetTheme
static bool resetTheme(QString themedir, const QString &badtheme)
Definition: mythtv-setup.cpp:186
ExitPrompter::handleExit
void handleExit(void)
Definition: exitprompt.cpp:66
kRequireAV
@ kRequireAV
Definition: channelscantypes.h:9
MythCommandLineParser::PrintHelp
void PrintHelp(void) const
Print command line option help.
Definition: mythcommandlineparser.cpp:1402
MythSystemEventEditor
An editor for MythSystemEvent handler commands.
Definition: mythsystemevent.h:50
GENERIC_EXIT_DB_OUTOFDATE
@ GENERIC_EXIT_DB_OUTOFDATE
Database needs upgrade.
Definition: exitcodes.h:19
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:57
ScanDTVTransportList
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
MythCommandLineParser::ApplySettingsOverride
void ApplySettingsOverride(void)
Apply all overrides to the global context.
Definition: mythcommandlineparser.cpp:2947
mythappname.h
channeleditor.h
MythUIThemeHelper::InitThemeHelper
void InitThemeHelper()
Definition: mythuithemehelper.cpp:14
exitPrompt
ExitPrompter * exitPrompt
Definition: mythtv-setup.cpp:55
SetupMenuCallback
static void SetupMenuCallback(void *, QString &selection)
Definition: mythtv-setup.cpp:60
MYTH_APPNAME_MYTHTV_SETUP
static constexpr const char * MYTH_APPNAME_MYTHTV_SETUP
Definition: mythappname.h:7
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:292
mythuihelper.h
DEFAULT_UI_THEME
static constexpr const char * DEFAULT_UI_THEME
Definition: mythuithemehelper.h:7
backendsettings.h
ScanTypeSetting::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
channelgroup.h
mythmiscutil.h
bbciplayer.stderr
stderr
Definition: bbciplayer.py:199
MythCommandLineParser::toString
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
Definition: mythcommandlineparser.cpp:2360
mythcorecontext.h
StartPrompter
Definition: startprompt.h:6
MythCommandLineParser::toBool
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
Definition: mythcommandlineparser.cpp:2203
cardutil.h
LanguageSelection::prompt
static bool prompt(bool force=false)
Ask the user for the language to use.
Definition: langsettings.cpp:173
MythDate::ISODate
@ ISODate
Default UTC.
Definition: mythdate.h:17
ChannelImporter
Definition: channelimporter.h:71
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
main
int main(int argc, char *argv[])
Definition: mythtv-setup.cpp:232
mythcontext.h
LoadScan
ScanDTVTransportList LoadScan(uint scanid)
Definition: scaninfo.cpp:77
MythThemedMenu::setCallback
void setCallback(void(*lcallback)(void *, QString &), void *data)
Set the themed menus callback function and data for that function.
Definition: myththemedmenu.cpp:159
CardUtil::GetSourceID
static uint GetSourceID(uint inputid)
Definition: cardutil.cpp:1947
kRequireNothing
@ kRequireNothing
Definition: channelscantypes.h:6
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
GENERIC_EXIT_NOT_OK
@ GENERIC_EXIT_NOT_OK
Exited with error.
Definition: exitcodes.h:14
ChannelGroup::UpdateChannelGroups
static void UpdateChannelGroups(void)
Definition: channelgroup.cpp:494
RunMenu
static bool RunMenu(const QString &themedir, const QString &themename)
Definition: mythtv-setup.cpp:163
MythThemedMenu
Themed menu class, used for main menus in MythTV frontend.
Definition: myththemedmenu.h:57
myththemedmenu.h
MythCommandLineParser::ConfigureLogging
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
Definition: mythcommandlineparser.cpp:2876
FALLBACK_UI_THEME
static constexpr const char * FALLBACK_UI_THEME
Definition: mythuithemehelper.h:8
profilegroup.h
MythTranslation::load
static void load(const QString &module_name)
Load a QTranslator for the user's preferred language.
Definition: mythtranslation.cpp:38
exitcodes.h
GetMythUI
MythUIHelper * GetMythUI()
Definition: mythuihelper.cpp:64
StorageGroupListEditor
Definition: storagegroupeditor.h:29
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
videosource.h
MythMainWindow
Definition: mythmainwindow.h:28
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:353
GENERIC_EXIT_DB_ERROR
@ GENERIC_EXIT_DB_ERROR
Database error.
Definition: exitcodes.h:20
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
GENERIC_EXIT_NO_MYTHCONTEXT
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
Definition: exitcodes.h:16
uint
unsigned int uint
Definition: freesurround.h:24
exitprompt.h
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:904
CardInputEditor
Definition: videosource.h:858