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 "libmyth/langsettings.h"
17 #include "libmyth/mythcontext.h"
20 #include "libmythbase/dbutil.h"
21 #include "libmythbase/exitcodes.h"
22 #include "libmythbase/mythconfig.h"
23 #include "libmythbase/mythdbcon.h"
24 #include "libmythbase/mythdirs.h"
28 #include "libmythbase/mythversion.h"
29 #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 static QString logfile;
60 
61 static void cleanup()
62 {
64 
65  delete gContext;
66  gContext = nullptr;
67 
69 }
70 
71 static void SetupMenuCallback(void* /* data */, QString& selection)
72 {
73  QString sel = selection.toLower();
74 
75  if (sel == "general")
76  {
78  auto *ssd = new StandardSettingDialog(mainStack, "generalsettings",
79  new BackendSettings());
80 
81  if (ssd->Create())
82  mainStack->AddScreen(ssd);
83  else
84  delete ssd;
85  }
86  else if (sel == "capture cards")
87  {
89  auto *ssd = new StandardSettingDialog(mainStack, "capturecardeditor",
90  new CaptureCardEditor());
91 
92  if (ssd->Create())
93  mainStack->AddScreen(ssd);
94  else
95  delete ssd;
96  }
97  else if (sel == "video sources")
98  {
100  auto *ssd = new StandardSettingDialog(mainStack, "videosourceeditor",
101  new VideoSourceEditor());
102  if (ssd->Create())
103  mainStack->AddScreen(ssd);
104  else
105  delete ssd;
106  }
107  else if (sel == "card inputs")
108  {
110  auto *ssd = new StandardSettingDialog(mainStack, "cardinputeditor",
111  new CardInputEditor());
112 
113  if (ssd->Create())
114  mainStack->AddScreen(ssd);
115  else
116  delete ssd;
117  }
118  else if (sel == "recording profile")
119  {
121  auto *ssd = new StandardSettingDialog(mainStack, "recordingprofileeditor",
122  new ProfileGroupEditor());
123 
124  if (ssd->Create())
125  mainStack->AddScreen(ssd);
126  else
127  delete ssd;
128  }
129  else if (sel == "channel editor")
130  {
132 
133  auto *chanedit = new ChannelEditor(mainStack);
134 
135  if (chanedit->Create())
136  mainStack->AddScreen(chanedit);
137  else
138  delete chanedit;
139  }
140  else if (sel == "storage groups")
141  {
143  auto *ssd = new StandardSettingDialog(mainStack, "storagegroupeditor",
144  new StorageGroupListEditor());
145 
146  if (ssd->Create())
147  mainStack->AddScreen(ssd);
148  else
149  delete ssd;
150  }
151  else if (sel == "systemeventeditor")
152  {
154 
155  auto *msee = new MythSystemEventEditor(mainStack, "System Event Editor");
156 
157  if (msee->Create())
158  mainStack->AddScreen(msee);
159  else
160  delete msee;
161  }
162  else if (sel.startsWith("exiting_app") || (sel == "standby_mode"))
163  {
164  if (!exitPrompt)
165  exitPrompt = new ExitPrompter();
167  }
168  else
169  LOG(VB_GENERAL, LOG_ERR, "Unknown menu action: " + selection);
170 }
171 
172 static bool RunMenu(const QString& themedir, const QString& themename)
173 {
174  QByteArray tmp = themedir.toLocal8Bit();
175  menu = new MythThemedMenu(
176  QString(tmp.constData()), "setup.xml",
177  GetMythMainWindow()->GetMainStack(), "mainmenu", false);
178 
179  if (menu->foundTheme())
180  {
183  return true;
184  }
185 
186  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't use theme '%1'").arg(themename));
187  delete menu;
188  menu = nullptr;
189 
190  return false;
191 }
192 
193 // If the theme specified in the DB is somehow broken, try a standard one:
194 //
195 static bool resetTheme(QString themedir, const QString &badtheme)
196 {
197  QString themename = DEFAULT_UI_THEME;
198 
199  if (badtheme == DEFAULT_UI_THEME)
200  themename = FALLBACK_UI_THEME;
201 
202  LOG(VB_GENERAL, LOG_ERR,
203  QString("Overriding broken theme '%1' with '%2'")
204  .arg(badtheme, themename));
205 
206  gCoreContext->OverrideSettingForSession("Theme", themename);
207  themedir = GetMythUI()->FindThemeDir(themename);
208 
210  GetMythMainWindow()->Init();
211 
212  return RunMenu(themedir, themename);
213 }
214 
215 static int reloadTheme(void)
216 {
218  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
219  QString themedir = GetMythUI()->FindThemeDir(themename);
220  if (themedir.isEmpty())
221  {
222  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
223  .arg(themename));
224  return GENERIC_EXIT_NO_THEME;
225  }
226 
228 
230  if (menu)
231  menu->Close();
232  GetMythMainWindow()->Init();
234 
235  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
236  return GENERIC_EXIT_NO_THEME;
237 
238  return 0;
239 }
240 
241 int main(int argc, char *argv[])
242 {
243  QString geometry;
244  bool doScan = false;
245  bool doScanList = false;
246  bool doScanSaveOnly = false;
247  bool scanInteractive = true;
248  bool expertMode = false;
249  uint scanImport = 0;
250  bool scanFTAOnly = false;
251  bool scanLCNOnly = false;
252  bool scanCompleteOnly = false;
253  bool scanFullChannelSearch = false;
254  bool scanRemoveDuplicates = false;
255  bool addFullTS = false;
256  ServiceRequirements scanServiceRequirements = kRequireAV;
257  uint scanCardId = 0;
258  QString frequencyStandard = "atsc";
259  QString modulation = "vsb8";
260  QString region = "us";
261  QString scanInputName = "";
262 
264  if (!cmdline.Parse(argc, argv))
265  {
266  cmdline.PrintHelp();
268  }
269 
270  if (cmdline.toBool("showhelp"))
271  {
272  cmdline.PrintHelp();
273  return GENERIC_EXIT_OK;
274  }
275 
276  if (cmdline.toBool("showversion"))
277  {
279  return GENERIC_EXIT_OK;
280  }
281 
282  bool quiet = false;
283  bool use_display = true;
284  if (cmdline.toBool("scan"))
285  {
286  quiet = true;
287  use_display = false;
288  }
289 
290  std::unique_ptr<QCoreApplication> app {nullptr};
291  CleanupGuard callCleanup(cleanup);
292 
293  if (use_display)
294  {
296  app = std::make_unique<QApplication>(argc, argv);
297  }
298  else
299  {
300  app = std::make_unique<QCoreApplication>(argc, argv);
301  }
302  QCoreApplication::setApplicationName(MYTH_APPNAME_MYTHTV_SETUP);
303 
304 #ifndef _WIN32
306 #endif
307 
308  if (cmdline.toBool("geometry"))
309  geometry = cmdline.toString("geometry");
310 
311  QString mask("general");
312  int retval = cmdline.ConfigureLogging(mask, quiet);
313  if (retval != GENERIC_EXIT_OK)
314  return retval;
315 
316  if (cmdline.toBool("expert"))
317  expertMode = true;
318  if (cmdline.toBool("scanlist"))
319  doScanList = true;
320  if (cmdline.toBool("savescan"))
321  doScanSaveOnly = true;
322  if (cmdline.toBool("scannoninteractive"))
323  scanInteractive = false;
324 
325  if (cmdline.toBool("importscan"))
326  scanImport = cmdline.toUInt("importscan");
327  if (cmdline.toBool("ftaonly"))
328  scanFTAOnly = true;
329  if (cmdline.toBool("lcnonly"))
330  scanLCNOnly = true;
331  if (cmdline.toBool("completeonly"))
332  scanCompleteOnly = true;
333  if (cmdline.toBool("fullsearch"))
334  scanFullChannelSearch = true;
335  if (cmdline.toBool("removeduplicates"))
336  scanRemoveDuplicates = true;
337  if (cmdline.toBool("addfullts"))
338  addFullTS = true;
339  if (cmdline.toBool("servicetype"))
340  {
341  scanServiceRequirements = kRequireNothing;
342  if (cmdline.toString("servicetype").contains("radio"))
343  scanServiceRequirements = kRequireAudio;
344  if (cmdline.toString("servicetype").contains("tv"))
345  scanServiceRequirements = kRequireAV;
346  if (cmdline.toString("servicetype").contains("tv+radio") ||
347  cmdline.toString("servicetype").contains("radio+tv"))
348  scanServiceRequirements = kRequireAudio;
349  if (cmdline.toString("servicetype").contains("all"))
350  scanServiceRequirements = kRequireNothing;
351  }
352 
353  if (!cmdline.toBool("noupnp"))
354  {
355  // start looking for any uPnP devices we can use like VBoxes
356  SSDP::Instance()->PerformSearch("ssdp:all");
357  }
358  if (cmdline.toBool("scan"))
359  {
360  scanCardId = cmdline.toUInt("scan");
361  doScan = true;
362  }
363  if (cmdline.toBool("freqstd"))
364  frequencyStandard = cmdline.toString("freqstd").toLower();
365  if (cmdline.toBool("modulation"))
366  modulation = cmdline.toString("modulation").toLower();
367  if (cmdline.toBool("region"))
368  region = cmdline.toString("region").toLower();
369  if (cmdline.toBool("inputname"))
370  scanInputName = cmdline.toString("inputname");
371 
372  if (!geometry.isEmpty())
374 
375  gContext = new MythContext(MYTH_BINARY_VERSION);
376 
378  if (!gContext->Init(use_display,false,true)) // No Upnp, Prompt for db
379  {
380  LOG(VB_GENERAL, LOG_ERR, "Failed to init MythContext, exiting.");
382  }
383 
385 
386  if (!GetMythDB()->HaveSchema())
387  {
388  if (!InitializeMythSchema())
389  return GENERIC_EXIT_DB_ERROR;
390  }
391 
392  setHttpProxy();
393 
394  if (use_display)
395  {
396  QString fileprefix = GetConfDir();
397  QDir dir(fileprefix);
398  if (!dir.exists())
399  dir.mkdir(fileprefix);
400  }
401 
402  if (doScan)
403  {
404  bool okCardID = scanCardId != 0U;
405 
406  if (scanInputName.isEmpty())
407  scanInputName = CardUtil::GetInputName(scanCardId);
408 
409  bool okInputName = (scanInputName == CardUtil::GetInputName(scanCardId)
410  && scanInputName != "None");
411 
412  doScan = (okCardID && okInputName);
413 
414  if (!okCardID)
415  {
416  std::cerr << "You must enter a valid cardid to scan." << std::endl;
417  std::vector<unsigned int> cardids = CardUtil::GetInputIDs();
418  if (cardids.empty())
419  {
420  std::cerr << "But no cards have been defined on this host"
421  << std::endl;
423  }
424  std::cerr << "Valid cards: " << std::endl;
425  for (uint id : cardids)
426  {
427  fprintf(stderr, "%5u: %s %s\n", id,
428  CardUtil::GetRawInputType(id).toLatin1().constData(),
429  CardUtil::GetVideoDevice(id).toLatin1().constData());
430  }
432  }
433 
434  if (!okInputName)
435  {
436  std::cerr << "You must enter a valid input to scan this card."
437  << std::endl;
438  std::cerr << "Valid input: "
439  << CardUtil::GetInputName(scanCardId).toLatin1().constData()
440  << std::endl;
442  }
443  }
444 
445  if (doScan)
446  {
447  int ret = 0;
448  uint inputid = scanCardId;
449  uint sourceid = CardUtil::GetSourceID(inputid);
450  QMap<QString,QString> startChan;
451  {
452  ChannelScannerCLI scanner(doScanSaveOnly, scanInteractive);
453 
454  int scantype { ScanTypeSetting::FullScan_ATSC };
455  if (frequencyStandard == "atsc")
456  scantype = ScanTypeSetting::FullScan_ATSC; // NOLINT(bugprone-branch-clone)
457  else if (frequencyStandard == "dvbt")
459  else if (frequencyStandard == "mpeg")
461  else if (frequencyStandard == "iptv")
462  {
464  scanner.ImportM3U(scanCardId, scanInputName, sourceid, true);
465  }
466  else if (frequencyStandard == "extern")
468  else
470 
471  scanner.Scan(scantype,
472  /* cardid */ scanCardId,
473  /* inputname */ scanInputName,
474  /* sourceid */ sourceid,
475  /* ignore signal timeout */ false,
476  /* follow_nit */ true,
477  /* test decryption */ true,
478  scanFTAOnly,
479  scanLCNOnly,
480  scanCompleteOnly,
481  scanFullChannelSearch,
482  scanRemoveDuplicates,
483  addFullTS,
484  scanServiceRequirements,
485  // stuff needed for particular scans
486  /* mplexid */ 0,
487  startChan, frequencyStandard, modulation, region);
488  ret = QCoreApplication::exec();
489  }
490  return (ret) ? GENERIC_EXIT_NOT_OK : GENERIC_EXIT_OK;
491  }
492 
493  if (doScanList)
494  {
495  std::vector<ScanInfo> scans = LoadScanList();
496 
497  std::cout<<" scanid cardid sourceid processed date"<<std::endl;
498  for (auto & scan : scans)
499  {
500  printf("%5i %6i %8i %8s %20s\n",
501  scan.m_scanid, scan.m_cardid,
502  scan.m_sourceid, (scan.m_processed) ? "yes" : "no",
503  scan.m_scandate.toString(Qt::ISODate)
504  .toLatin1().constData());
505  }
506  std::cout<<std::endl;
507 
508  return GENERIC_EXIT_OK;
509  }
510 
511  if (scanImport)
512  {
513  std::cout<<"*** SCAN IMPORT START ***"<<std::endl;
514  {
515  ScanDTVTransportList list = LoadScan(scanImport);
516  ChannelImporter ci(false, true, true, true, false,
517  scanFTAOnly, scanLCNOnly,
518  scanCompleteOnly,
519  scanFullChannelSearch,
520  scanRemoveDuplicates,
521  scanServiceRequirements);
522  ci.Process(list);
523  }
524  std::cout<<"*** SCAN IMPORT END ***"<<std::endl;
525  return GENERIC_EXIT_OK;
526  }
527 
528  MythTranslation::load("mythfrontend");
529 
530  QString themename = gCoreContext->GetSetting("Theme", DEFAULT_UI_THEME);
531  QString themedir = GetMythUI()->FindThemeDir(themename);
532  if (themedir.isEmpty())
533  {
534  LOG(VB_GENERAL, LOG_ERR, QString("Couldn't find theme '%1'")
535  .arg(themename));
536  return GENERIC_EXIT_NO_THEME;
537  }
538 
539  MythMainWindow *mainWindow = GetMythMainWindow();
540  mainWindow->Init();
541  mainWindow->setWindowTitle(QObject::tr("MythTV Setup"));
542 
543  // We must reload the translation after a language change and this
544  // also means clearing the cached/loaded theme strings, so reload the
545  // theme which also triggers a translation reload
547  {
548  if (!reloadTheme())
549  return GENERIC_EXIT_NO_THEME;
550  }
551 
553  {
554  LOG(VB_GENERAL, LOG_ERR,
555  "MySQL time zone support is missing. "
556  "Please install it and try again. "
557  "See 'mysql_tzinfo_to_sql' for assistance.");
559  }
560 
561  if (!UpgradeTVDatabaseSchema(true))
562  {
563  LOG(VB_GENERAL, LOG_ERR, "Couldn't upgrade database to new schema.");
565  }
566 
567  // Refresh Global/Main Menu keys after DB update in case there was no DB
568  // when they were written originally
569  mainWindow->ReloadKeys();
570 
571  if (!startPrompt)
572  startPrompt = new StartPrompter();
574 
575  // Let the user select buttons, type values, scan for channels, etc.
576  if (!RunMenu(themedir, themename) && !resetTheme(themedir, themename))
577  return GENERIC_EXIT_NO_THEME;
578 
579  ExpertSettingsEditor *expertEditor = nullptr;
580  if (expertMode)
581  {
583  expertEditor =
584  new ExpertSettingsEditor(mainStack, "Expert Settings Editor");
585  if (expertEditor->Create())
586  mainStack->AddScreen(expertEditor);
587  else
588  {
589  delete expertEditor;
590  expertEditor = nullptr;
591  LOG(VB_GENERAL, LOG_ERR,
592  "Unable to create expert settings editor window");
593  return GENERIC_EXIT_OK;
594  }
595  }
596 
597  QCoreApplication::exec();
598 
600 }
601 
602 /* vim: set expandtab tabstop=4 shiftwidth=4: */
themedir
static QString themedir
Definition: mythdirs.cpp:23
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:318
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:1301
mythtv-setup_commandlineparser.h
kRequireAV
@ kRequireAV
Definition: channelscantypes.h:9
setHttpProxy
void setHttpProxy(void)
Get network proxy settings from OS, and use for [Q]Http[Comms].
Definition: mythmiscutil.cpp:800
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:266
VideoSourceEditor
Definition: videosource.h:842
storagegroupeditor.h
expertsettingseditor.h
SSDP::PerformSearch
void PerformSearch(const QString &sST, std::chrono::seconds timeout=2s)
Definition: ssdp.cpp:204
MythTranslation::reload
static void reload()
Reload all active translators based on the current language setting.
Definition: mythtranslation.cpp:97
ScanTypeSetting::FullScan_DVBT
@ FullScan_DVBT
Definition: scanwizardconfig.h:80
CardUtil::GetInputName
static QString GetInputName(uint inputid)
Definition: cardutil.cpp:1764
channelimporter.h
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
cmdline
MythCommFlagCommandLineParser cmdline
Definition: mythcommflag.cpp:72
ssdp.h
MythContext
Startup context for MythTV.
Definition: mythcontext.h:43
ExitPrompter
Definition: mythfrontend/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:1336
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:36
checksetup.h
scanwizardconfig.h
ScanTypeSetting::FullScan_ATSC
@ FullScan_ATSC
Definition: scanwizardconfig.h:78
quiet
int quiet
Definition: mythcommflag.cpp:68
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:142
reloadTheme
static int reloadTheme(void)
Definition: mythtv-setup.cpp:215
GetMythDB
MythDB * GetMythDB(void)
Definition: mythdb.cpp:50
mythsystemevent.h
mythdirs.h
GENERIC_EXIT_OK
@ GENERIC_EXIT_OK
Exited with no error.
Definition: exitcodes.h:11
CaptureCardEditor
Definition: videosource.h:820
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:82
hardwareprofile.scan.scan
def scan(profile, smoonURL, gate)
Definition: scan.py:57
kRequireAudio
@ kRequireAudio
Definition: channelscantypes.h:8
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
MYTH_APPNAME_MYTHTV_SETUP
static constexpr const char * MYTH_APPNAME_MYTHTV_SETUP
Definition: mythcorecontext.h:23
SSDP::Instance
static SSDP * Instance()
Definition: ssdp.cpp:55
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:1554
StandardSettingDialog
Definition: standardsettings.h:468
InitializeMythSchema
bool InitializeMythSchema(void)
command to get the the initial database layout from an empty database:
Definition: dbcheck.cpp:3972
mythdisplay.h
mythlogging.h
GENERIC_EXIT_NO_MYTHCONTEXT
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
Definition: exitcodes.h:14
GetConfDir
QString GetConfDir(void)
Definition: mythdirs.cpp:256
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:361
dbcheck.h
signalhandling.h
menu
static MythThemedMenu * menu
Definition: mythtv-setup.cpp:58
CleanupGuard
Definition: cleanupguard.h:6
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:109
ScanTypeSetting::IPTVImportMPTS
@ IPTVImportMPTS
Definition: scanwizardconfig.h:98
startPrompt
StartPrompter * startPrompt
Definition: mythtv-setup.cpp:56
ChannelEditor
Definition: channeleditor.h:12
DestroyMythMainWindow
void DestroyMythMainWindow(void)
Definition: mythmainwindow.cpp:114
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:1382
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:2251
DBUtil::CheckTimeZoneSupport
static bool CheckTimeZoneSupport(void)
Check if MySQL has working timz zone support.
Definition: dbutil.cpp:867
resetTheme
static bool resetTheme(QString themedir, const QString &badtheme)
Definition: mythtv-setup.cpp:195
ExitPrompter::handleExit
void handleExit(void)
Definition: mythtv-setup/exitprompt.cpp:63
MythCommandLineParser::PrintHelp
void PrintHelp(void) const
Print command line option help.
Definition: mythcommandlineparser.cpp:1398
MythSystemEventEditor
An editor for MythSystemEvent handler commands.
Definition: mythsystemevent.h:50
GENERIC_EXIT_NO_THEME
@ GENERIC_EXIT_NO_THEME
No Theme available.
Definition: exitcodes.h:15
GENERIC_EXIT_NOT_OK
@ GENERIC_EXIT_NOT_OK
Exited with error.
Definition: exitcodes.h:12
uint
unsigned int uint
Definition: compat.h:81
ScanTypeSetting::CurrentTransportScan
@ CurrentTransportScan
Scans the transport when there is no tuner (for ASI)
Definition: scanwizardconfig.h:94
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
ScanDTVTransportList
std::vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:143
kRequireNothing
@ kRequireNothing
Definition: channelscantypes.h:6
MythCommandLineParser::ApplySettingsOverride
void ApplySettingsOverride(void)
Apply all overrides to the global context.
Definition: mythcommandlineparser.cpp:2932
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:71
CardUtil::GetRawInputType
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:292
mythuihelper.h
GENERIC_EXIT_DB_NOTIMEZONE
@ GENERIC_EXIT_DB_NOTIMEZONE
Missing DB time zone support.
Definition: exitcodes.h:37
SignalHandler::Init
static void Init(QObject *parent=nullptr)
Definition: signalhandling.cpp:127
DEFAULT_UI_THEME
static constexpr const char * DEFAULT_UI_THEME
Definition: mythuithemehelper.h:7
backendsettings.h
channelgroup.h
logfile
static QString logfile
Definition: mythtv-setup.cpp:59
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:2359
StartPrompter
Definition: startprompt.h:6
MythCommandLineParser::toBool
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
Definition: mythcommandlineparser.cpp:2202
cardutil.h
cleanupguard.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::ExternRecImport
@ ExternRecImport
Definition: scanwizardconfig.h:106
GENERIC_EXIT_DB_OUTOFDATE
@ GENERIC_EXIT_DB_OUTOFDATE
Database needs upgrade.
Definition: exitcodes.h:17
main
int main(int argc, char *argv[])
Definition: mythtv-setup.cpp:241
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:156
CardUtil::GetSourceID
static uint GetSourceID(uint inputid)
Definition: cardutil.cpp:1936
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
ChannelGroup::UpdateChannelGroups
static void UpdateChannelGroups(void)
Definition: channelgroup.cpp:468
RunMenu
static bool RunMenu(const QString &themedir, const QString &themename)
Definition: mythtv-setup.cpp:172
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:2864
cleanup
static void cleanup()
Definition: mythtv-setup.cpp:61
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:37
exitcodes.h
GetMythUI
MythUIHelper * GetMythUI()
Definition: mythuihelper.cpp:66
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
StorageGroupListEditor
Definition: storagegroupeditor.h:29
GENERIC_EXIT_INVALID_CMDLINE
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
Definition: exitcodes.h:16
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
gContext
MythContext * gContext
This global variable contains the MythContext instance for the application.
Definition: mythcontext.cpp:64
videosource.h
MythContext::Init
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
Definition: mythcontext.cpp:1603
MythMainWindow
Definition: mythmainwindow.h:28
ChannelScanner::ImportM3U
virtual bool ImportM3U(uint cardid, const QString &inputname, uint sourceid, bool is_mpts)
Definition: channelscanner.cpp:333
SignalHandler::Done
static void Done(void)
Definition: signalhandling.cpp:134
CardUtil::GetVideoDevice
static QString GetVideoDevice(uint inputid)
Definition: cardutil.h:294
exitprompt.h
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:897
CardInputEditor
Definition: videosource.h:864
GENERIC_EXIT_DB_ERROR
@ GENERIC_EXIT_DB_ERROR
Database error.
Definition: exitcodes.h:18