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