MythTV  master
welcomedialog.cpp
Go to the documentation of this file.
1 // POSIX
2 #include <unistd.h>
3 
4 // C++
5 #include <chrono>
6 #include <cstdlib>
7 
8 // qt
9 #include <QEvent>
10 #include <QGuiApplication>
11 #include <QKeyEvent>
12 
13 // myth
14 #include "libmyth/mythcontext.h"
15 #include "libmythbase/compat.h"
16 #include "libmythbase/exitcodes.h"
17 #include "libmythbase/lcddevice.h"
18 #include "libmythbase/mythdbcon.h"
19 #include "libmythbase/mythdirs.h"
21 #include "libmythbase/remoteutil.h"
22 #include "libmythtv/tv.h"
23 
24 // mythwelcome
25 #include "welcomedialog.h"
26 #include "welcomesettings.h"
27 
28 static constexpr std::chrono::milliseconds UPDATE_STATUS_INTERVAL { 30s };
29 static constexpr std::chrono::milliseconds UPDATE_SCREEN_INTERVAL { 15s };
30 
31 
33  :MythScreenType(parent, name),
34  m_updateStatusTimer(new QTimer(this)),
35  m_updateScreenTimer(new QTimer(this))
36 {
38 
40  m_preRollSeconds = gCoreContext->GetDurSetting<std::chrono::seconds>("RecordPreRoll");
42  gCoreContext->GetDurSetting<std::chrono::minutes>("idleWaitForRecordingTime", 15min);
43  m_idleTimeoutSecs = gCoreContext->GetDurSetting<std::chrono::seconds>("idleTimeoutSecs", 0s);
44 
45  // if idleTimeoutSecs is 0, the user disabled the auto-shutdown feature
47 
51 
54 }
55 
57 {
58  // Load the theme for this screen
59  bool foundtheme = LoadWindowFromXML("welcome-ui.xml", "welcome_screen", this);
60  if (!foundtheme)
61  return false;
62 
63  bool err = false;
64  UIUtilE::Assign(this, m_statusText, "status_text", &err);
65  UIUtilE::Assign(this, m_recordingText, "recording_text", &err);
66  UIUtilE::Assign(this, m_scheduledText, "scheduled_text", &err);
67  UIUtilE::Assign(this, m_warningText, "conflicts_text", &err);
68  UIUtilE::Assign(this, m_startFrontendButton, "startfrontend_button", &err);
69 
70  if (err)
71  {
72  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'welcome_screen'");
73  return false;
74  }
75 
76  m_warningText->SetVisible(false);
77 
78  m_startFrontendButton->SetText(tr("Start Frontend"));
81 
83 
85 
88 
89  return true;
90 }
91 
93 {
94  QString startFECmd = gCoreContext->GetSetting("MythWelcomeStartFECmd",
95  m_appBinDir + "mythfrontend");
96 
97  // Ensure we use the same platform for mythfrontend
98  QStringList args;
99  if (!startFECmd.contains("platform"))
100  args << QString("--platform %1").arg(QGuiApplication::platformName());
102  updateAll();
103  m_frontendIsRunning = false;
104 }
105 
107 {
109  return;
110 
111  m_frontendIsRunning = true;
112 
113  // this makes sure the button appears to click properly
114  QTimer::singleShot(500ms, this, &WelcomeDialog::startFrontend);
115 }
116 
118 {
119  // mythshutdown --startup returns 0 for automatic startup
120  // 1 for manual startup
121  QString command = m_appBinDir + "mythshutdown --startup";
122  command += logPropagateArgs;
123  uint state = myth_system(command, kMSDontBlockInputDevs);
124 
125  LOG(VB_GENERAL, LOG_NOTICE,
126  QString("mythshutdown --startup returned: %1").arg(state));
127 
128  bool bAutoStartFrontend = gCoreContext->GetBoolSetting("AutoStartFrontend", true);
129 
130  if (state == 1 && bAutoStartFrontend)
132 
133  // update status now
134  updateAll();
135 }
136 
138 {
139  if (e->type() == MythEvent::kMythEventMessage)
140  {
141  auto *me = dynamic_cast<MythEvent *>(e);
142  if (me == nullptr)
143  return;
144 
145  if (me->Message().startsWith("RECORDING_LIST_CHANGE") ||
146  me->Message() == "UPDATE_PROG_INFO")
147  {
148  LOG(VB_GENERAL, LOG_NOTICE,
149  "MythWelcome received a recording list change event");
150 
151  QMutexLocker lock(&m_recListUpdateMuxtex);
152 
153  if (pendingRecListUpdate())
154  {
155  LOG(VB_GENERAL, LOG_NOTICE,
156  " [deferred to pending handler]");
157  }
158  else
159  {
160  // we can't query the backend from inside a customEvent
161  QTimer::singleShot(500ms, this, &WelcomeDialog::updateRecordingList);
163  }
164  }
165  else if (me->Message().startsWith("SCHEDULE_CHANGE"))
166  {
167  LOG(VB_GENERAL, LOG_NOTICE,
168  "MythWelcome received a SCHEDULE_CHANGE event");
169 
170  QMutexLocker lock(&m_schedUpdateMuxtex);
171 
172  if (pendingSchedUpdate())
173  {
174  LOG(VB_GENERAL, LOG_NOTICE,
175  " [deferred to pending handler]");
176  }
177  else
178  {
179  QTimer::singleShot(500ms, this, &WelcomeDialog::updateScheduledList);
180  setPendingSchedUpdate(true);
181  }
182  }
183  else if (me->Message().startsWith("SHUTDOWN_COUNTDOWN"))
184  {
185 #if 0
186  LOG(VB_GENERAL, LOG_NOTICE,
187  "MythWelcome received a SHUTDOWN_COUNTDOWN event");
188 #endif
189  QString secs = me->Message().mid(19);
190  m_secondsToShutdown = secs.toInt();
192  updateScreen();
193  }
194  else if (me->Message().startsWith("SHUTDOWN_NOW"))
195  {
196  LOG(VB_GENERAL, LOG_NOTICE,
197  "MythWelcome received a SHUTDOWN_NOW event");
199  {
200  // does the user want to shutdown this frontend only machine
201  // when the BE shuts down?
202  if (gCoreContext->GetNumSetting("ShutdownWithMasterBE", 0) == 1)
203  {
204  LOG(VB_GENERAL, LOG_NOTICE,
205  "MythWelcome is shutting this computer down now");
206  QString poweroff_cmd = gCoreContext->GetSetting("MythShutdownPowerOff", "");
207  if (!poweroff_cmd.isEmpty())
208  myth_system(poweroff_cmd, kMSDontBlockInputDevs);
209  }
210  }
211  }
212  }
213 }
214 
216 {
218  auto *ssd = new StandardSettingDialog(mainStack, "settings", screen);
219  if (ssd->Create())
220  mainStack->AddScreen(ssd);
221  else
222  delete ssd;
223 }
224 
225 bool WelcomeDialog::keyPressEvent(QKeyEvent *event)
226 {
227  if (GetFocusWidget()->keyPressEvent(event))
228  return true;
229 
230  QStringList actions;
231  bool handled = GetMythMainWindow()->TranslateKeyPress("Welcome", event, actions);
232 
233  for (int i = 0; i < actions.size() && !handled; i++)
234  {
235  const QString& action = actions[i];
236  handled = true;
237 
238  if (action == "ESCAPE")
239  {
240  return true; // eat escape key
241  }
242  if (action == "MENU")
243  {
244  ShowMenu();
245  }
246  else if (action == "NEXTVIEW")
247  {
248  Close();
249  }
250  else if (action == "INFO")
251  {
253  }
254  else if (action == "SHOWSETTINGS")
255  {
257  }
258  else if (action == "0")
259  {
260  QString mythshutdown_status =
261  m_appBinDir + "mythshutdown --status 0";
262  QString mythshutdown_unlock =
263  m_appBinDir + "mythshutdown --unlock";
264  QString mythshutdown_lock =
265  m_appBinDir + "mythshutdown --lock";
266 
267  uint statusCode =
268  myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
269 
270  // is shutdown locked by a user
271  if (!(statusCode & 0xFF00) && statusCode & 16)
272  {
273  myth_system(mythshutdown_unlock + logPropagateArgs, kMSDontBlockInputDevs);
274  }
275  else
276  {
277  myth_system(mythshutdown_lock + logPropagateArgs, kMSDontBlockInputDevs);
278  }
279 
281  updateScreen();
282  }
283  else if (action == "STARTXTERM")
284  {
285  QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", "");
286  if (!cmd.isEmpty())
288  }
289  else if (action == "STARTSETUP")
290  {
291  QString mythtv_setup = m_appBinDir + "mythtv-setup";
292  myth_system(mythtv_setup + logPropagateArgs);
293  }
294  else
295  {
296  handled = false;
297  }
298  }
299 
300  if (!handled && MythScreenType::keyPressEvent(event))
301  handled = true;
302 
303  return handled;
304 }
305 
307 {
308  Close();
309 }
310 
312 {
314 
316  m_updateStatusTimer->disconnect();
317 
319  m_updateScreenTimer->disconnect();
320 }
321 
323 {
325 
327 }
328 
330 {
331  QString status;
332 
334  {
335  m_recordingText->SetText(tr("Cannot connect to server!"));
336  m_scheduledText->SetText(tr("Cannot connect to server!"));
337  m_warningText->SetVisible(false);
338  }
339  else
340  {
341  // update recording
342  if (m_isRecording && !m_tunerList.empty())
343  {
345 
346  do
347  {
348  if (m_screenTunerNo < m_tunerList.size() - 1)
349  m_screenTunerNo++;
350  else
351  m_screenTunerNo = 0;
352  tuner = m_tunerList[m_screenTunerNo];
353  }
354  while (!tuner.isRecording);
355 
356  status = tr("Tuner %1 is recording:").arg(tuner.id);
357  status += "\n";
358  status += tuner.channame;
359  status += "\n" + tuner.title;
360  if (!tuner.subtitle.isEmpty())
361  status += "\n("+tuner.subtitle+")";
362 
363  status += "\n" +
364  tr("%1 to %2", "Time period, 'starttime to endtime'")
367  }
368  else
369  {
370  status = tr("There are no recordings currently taking place");
371  }
372 
373  m_recordingText->SetText(status);
374 
375  // update scheduled
376  if (!m_scheduledList.empty())
377  {
378  if (m_screenScheduledNo >= m_scheduledList.size())
380 
382 
383  InfoMap infomap;
384  progInfo.ToMap(infomap);
385 
386  //status = QString("%1 of %2\n").arg(m_screenScheduledNo + 1)
387  // .arg(m_scheduledList.size());
388  status = infomap["channame"] + "\n";
389  status += infomap["title"];
390  if (!infomap["subtitle"].isEmpty())
391  status += "\n(" + infomap["subtitle"] + ")";
392 
393  status += "\n" + infomap["timedate"];
394 
395  if (m_screenScheduledNo < m_scheduledList.size() - 1)
397  else
399  }
400  else
401  {
402  status = tr("There are no scheduled recordings");
403  }
404 
405  m_scheduledText->SetText(status);
406  }
407 
408  // update status message
409  if (m_statusList.empty())
410  status = tr("Please Wait...");
411  else
412  {
413  if ((int)m_statusListNo >= m_statusList.count())
414  m_statusListNo = 0;
415 
416  status = m_statusList[m_statusListNo];
417  if (m_statusList.count() > 1)
418  status += "...";
419  m_statusText->SetText(status);
420 
421  if ((int)m_statusListNo < m_statusList.count() - 1)
422  m_statusListNo++;
423  else
424  m_statusListNo = 0;
425  }
426 
427  m_updateScreenTimer->stop();
428  m_updateScreenTimer->setSingleShot(true);
430 }
431 
432 // taken from housekeeper.cpp
434 {
435  QString command;
436 
437  QString mfpath = gCoreContext->GetSetting("MythFillDatabasePath",
438  "mythfilldatabase");
439  QString mfarg = gCoreContext->GetSetting("MythFillDatabaseArgs", "");
440 
441  command = QString("%1 %2").arg(mfpath, mfarg);
442  command += logPropagateArgs;
443 
444  command += "&";
445 
446  LOG(VB_GENERAL, LOG_INFO, QString("Grabbing EPG data using command: %1\n")
447  .arg(command));
448 
450 }
451 
453 {
456 }
457 
459 {
460  {
461  // clear pending flag early in case something happens while
462  // we're updating
463  QMutexLocker lock(&m_recListUpdateMuxtex);
465  }
466 
467  m_tunerList.clear();
468  m_isRecording = false;
469  m_screenTunerNo = 0;
470 
472  return false;
473 
475 
476  return true;
477 }
478 
480 {
481  {
482  // clear pending flag early in case something happens while
483  // we're updating
484  QMutexLocker lock(&m_schedUpdateMuxtex);
485  setPendingSchedUpdate(false);
486  }
487 
488  m_scheduledList.clear();
490 
492  {
494  return false;
495  }
496 
498  &m_scheduledList);
499 
500  updateStatus();
501  updateScreen();
502 
503  return true;
504 }
505 
507 {
508  m_statusList.clear();
509 
510  QDateTime curtime = MythDate::current();
511 
512  if (!m_isRecording && !m_nextRecordingStart.isNull() &&
513  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
515  {
516  m_statusList.append(tr("MythTV is about to start recording."));
517  }
518 
519  if (m_isRecording)
520  {
521  m_statusList.append(tr("MythTV is busy recording."));
522  }
523 
524  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
525  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
526 
527  if (!(statusCode & 0xFF00))
528  {
529  if (statusCode & 1)
530  m_statusList.append(tr("MythTV is busy transcoding."));
531  if (statusCode & 2)
532  m_statusList.append(tr("MythTV is busy flagging commercials."));
533  if (statusCode & 4)
534  m_statusList.append(tr("MythTV is busy grabbing EPG data."));
535  if (statusCode & 16)
536  m_statusList.append(tr("MythTV is locked by a user."));
537  if (statusCode & 32)
538  m_statusList.append(tr("MythTV has running or pending jobs."));
539  if (statusCode & 64)
540  m_statusList.append(tr("MythTV is in a daily wakeup/shutdown period."));
541  if (statusCode & 128)
542  m_statusList.append(tr("MythTV is about to start a wakeup/shutdown period."));
543  }
544 
545  if (m_statusList.empty())
546  {
547  if (m_willShutdown && m_secondsToShutdown != -1)
548  {
549  m_statusList.append(tr("MythTV is idle and will shutdown in %n "
550  "second(s).", "", m_secondsToShutdown));
551  }
552  else
553  {
554  m_statusList.append(tr("MythTV is idle."));
555  }
556  }
557 
559 }
560 
562 {
563  m_updateStatusTimer->stop();
564 
565  bool bRes = false;
566 
568  bRes = true;
569  else
570  {
572  {
573  bRes = true;
574  updateAll();
575  }
576  else
577  {
578  updateScreen();
579  }
580  }
581 
582  if (bRes)
584  else
585  m_updateStatusTimer->start(5s);
586 
587  return bRes;
588 }
589 
591 {
592  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
593 
594  m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");
595 
596  if (m_menuPopup->Create())
597  popupStack->AddScreen(m_menuPopup);
598 
599  m_menuPopup->SetReturnEvent(this, "action");
600 
601  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
602  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
603 
604  if (!(statusCode & 0xFF00) && statusCode & 16)
605  m_menuPopup->AddButton(tr("Unlock Shutdown"), &WelcomeDialog::unlockShutdown);
606  else
607  m_menuPopup->AddButton(tr("Lock Shutdown"), &WelcomeDialog::lockShutdown);
608 
609  m_menuPopup->AddButton(tr("Run mythfilldatabase"), &WelcomeDialog::runEPGGrabber);
610  m_menuPopup->AddButton(tr("Shutdown Now"), &WelcomeDialog::shutdownNow);
612  m_menuPopup->AddButton(tr("Cancel"));
613 }
614 
616 {
617  QString command = m_appBinDir + "mythshutdown --lock";
618  command += logPropagateArgs;
621  updateScreen();
622 }
623 
625 {
626  QString command = m_appBinDir + "mythshutdown --unlock";
627  command += logPropagateArgs;
630  updateScreen();
631 }
632 
634 {
636  sleep(1);
638  updateScreen();
639 }
640 
642 {
643  // if this is a frontend only machine just shut down now
645  {
646  LOG(VB_GENERAL, LOG_INFO,
647  "MythWelcome is shutting this computer down now");
648  QString poweroff_cmd = gCoreContext->GetSetting("MythShutdownPowerOff", "");
649  if (!poweroff_cmd.isEmpty())
650  myth_system(poweroff_cmd, kMSDontBlockInputDevs);
651  return;
652  }
653 
654  // don't shutdown if we are recording
655  if (m_isRecording)
656  {
657  ShowOkPopup(tr("Cannot shutdown because MythTV is currently recording"));
658  return;
659  }
660 
661  QDateTime curtime = MythDate::current();
662 
663  // don't shutdown if we are about to start recording
664  if (!m_nextRecordingStart.isNull() &&
665  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
667  {
668  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start recording"));
669  return;
670  }
671 
672  // don't shutdown if we are about to start a wakeup/shutdown period
673  QString command = m_appBinDir + "mythshutdown --status 0";
674  command += logPropagateArgs;
675 
676  uint statusCode = myth_system(command, kMSDontBlockInputDevs);
677  if (!(statusCode & 0xFF00) && statusCode & 128)
678  {
679  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start "
680  "a wakeup/shutdown period."));
681  return;
682  }
683 
684  // set the wakeup time for the next scheduled recording
685  if (!m_nextRecordingStart.isNull())
686  {
687  QDateTime restarttime = m_nextRecordingStart.addSecs((-1) * m_preRollSeconds.count());
688 
689  int add = gCoreContext->GetNumSetting("StartupSecsBeforeRecording", 240);
690  if (add)
691  restarttime = restarttime.addSecs((-1LL) * add);
692 
693  QString wakeup_timeformat = gCoreContext->GetSetting("WakeupTimeFormat",
694  "yyyy-MM-ddThh:mm");
695  QString setwakeup_cmd = gCoreContext->GetSetting("SetWakeuptimeCommand",
696  "echo \'Wakeuptime would "
697  "be $time if command "
698  "set.\'");
699 
700  if (wakeup_timeformat == "time_t")
701  {
702  QString time_ts;
703  setwakeup_cmd.replace("$time",
704  time_ts.setNum(restarttime.toSecsSinceEpoch())
705  );
706  }
707  else
708  {
709  setwakeup_cmd.replace(
710  "$time", restarttime.toLocalTime().toString(wakeup_timeformat));
711  }
712 
713  if (!setwakeup_cmd.isEmpty())
714  {
715  myth_system(setwakeup_cmd, kMSDontBlockInputDevs);
716  }
717  }
718 
719  // run command to set wakeuptime in bios and shutdown the system
720  command = QString();
721 
722 #ifndef _WIN32
723  command = "sudo ";
724 #endif
725 
726  command += m_appBinDir + "mythshutdown --shutdown" + logPropagateArgs;
727 
729 }
730 
MythUIButton::Clicked
void Clicked()
build_compdb.args
args
Definition: build_compdb.py:11
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:317
WelcomeDialog::m_idleTimeoutSecs
std::chrono::seconds m_idleTimeoutSecs
Definition: welcomedialog.h:76
WelcomeDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: welcomedialog.cpp:225
MythDialogBox::SetReturnEvent
void SetReturnEvent(QObject *retobject, const QString &resultid)
Definition: mythdialogbox.cpp:303
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:93
tv.h
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:102
UPDATE_SCREEN_INTERVAL
static constexpr std::chrono::milliseconds UPDATE_SCREEN_INTERVAL
Definition: welcomedialog.cpp:29
WelcomeDialog::m_updateScreenTimer
QTimer * m_updateScreenTimer
Definition: welcomedialog.h:66
welcomesettings.h
MythShutdownSettings
Definition: welcomesettings.h:14
MythEvent::kMythEventMessage
static const Type kMythEventMessage
Definition: mythevent.h:79
kMSDontBlockInputDevs
@ kMSDontBlockInputDevs
avoid blocking LIRC & Joystick Menu
Definition: mythsystem.h:36
WelcomeDialog::m_statusList
QStringList m_statusList
Definition: welcomedialog.h:80
WelcomeDialog::updateRecordingList
bool updateRecordingList(void)
Definition: welcomedialog.cpp:458
WelcomeDialog::m_statusListNo
uint m_statusListNo
Definition: welcomedialog.h:79
MythCoreContext::IsFrontendOnly
bool IsFrontendOnly(void)
is there a frontend, but no backend, running on this host
Definition: mythcorecontext.cpp:749
TunerStatus::title
QString title
Definition: tvremoteutil.h:22
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:383
WelcomeDialog::customEvent
void customEvent(QEvent *e) override
Definition: welcomedialog.cpp:137
WelcomeDialog::updateScreen
void updateScreen(void)
Definition: welcomedialog.cpp:329
MythEvent
This class is used as a container for messages.
Definition: mythevent.h:16
MythScreenStack
Definition: mythscreenstack.h:16
mythdbcon.h
WelcomeDialog::m_scheduledList
std::vector< ProgramInfo > m_scheduledList
Definition: welcomedialog.h:84
WelcomeDialog::unlockShutdown
void unlockShutdown(void)
Definition: welcomedialog.cpp:624
WelcomeDialog::m_recordingText
MythUIText * m_recordingText
Definition: welcomedialog.h:57
WelcomeDialog::pendingRecListUpdate
bool pendingRecListUpdate() const
Definition: welcomedialog.h:89
TunerStatus::endTime
QDateTime endTime
Definition: tvremoteutil.h:25
WelcomeDialog::m_appBinDir
QString m_appBinDir
Definition: welcomedialog.h:68
WelcomeDialog::m_frontendIsRunning
bool m_frontendIsRunning
Definition: welcomedialog.h:81
LOG
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
Definition: mythlogging.h:39
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
WelcomeDialog::~WelcomeDialog
~WelcomeDialog() override
Definition: welcomedialog.cpp:311
mythdirs.h
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:506
remoteutil.h
MythCoreContext::SafeConnectToMasterServer
bool SafeConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
Definition: mythcorecontext.cpp:346
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:15
WelcomeDialog::shutdownNow
void shutdownNow(void)
Definition: welcomedialog.cpp:641
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:110
WelcomeDialog::m_updateStatusTimer
QTimer * m_updateStatusTimer
Definition: welcomedialog.h:65
mythsystemlegacy.h
InfoMap
QHash< QString, QString > InfoMap
Definition: mythtypes.h:15
TunerStatus::channame
QString channame
Definition: tvremoteutil.h:21
MythObservable::addListener
void addListener(QObject *listener)
Add a listener to the observable.
Definition: mythobservable.cpp:38
welcomedialog.h
MythCoreContext::IsConnectedToMaster
bool IsConnectedToMaster(void)
Definition: mythcorecontext.cpp:594
TunerStatus
recording status stuff
Definition: tvremoteutil.h:16
WelcomeDialog::updateScheduledList
bool updateScheduledList(void)
Definition: welcomedialog.cpp:479
WelcomeDialog::closeDialog
void closeDialog(void)
Definition: welcomedialog.cpp:306
StandardSettingDialog
Definition: standardsettings.h:468
WelcomeDialog::m_preRollSeconds
std::chrono::seconds m_preRollSeconds
Definition: welcomedialog.h:74
WelcomeDialog::m_schedUpdateMuxtex
QMutex m_schedUpdateMuxtex
Definition: welcomedialog.h:92
MythMainWindow::TranslateKeyPress
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
Definition: mythmainwindow.cpp:1111
WelcomeDialog::Create
bool Create(void) override
Definition: welcomedialog.cpp:56
RemoteGetRecordingStatus
int RemoteGetRecordingStatus(const ProgramInfo *pginfo, int overrecsecs, int underrecsecs)
Get status of an individual programme (with pre-post roll?).
Definition: remoteutil.cpp:505
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:115
WelcomeDialog::pendingSchedUpdate
bool pendingSchedUpdate() const
Definition: welcomedialog.h:95
MythDialogBox::AddButton
void AddButton(const QString &title)
Definition: mythdialogbox.h:198
MythDialogBox
Basic menu dialog, message and a list of options.
Definition: mythdialogbox.h:166
MythUIButton::SetText
void SetText(const QString &msg)
Definition: mythuibutton.cpp:229
compat.h
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
WelcomeDialog::checkConnectionToServer
bool checkConnectionToServer(void)
Definition: welcomedialog.cpp:561
MythCoreContext::GetDurSetting
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDurSetting(const QString &key, T defaultval=T::zero())
Definition: mythcorecontext.h:168
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:203
WelcomeDialog::m_isRecording
bool m_isRecording
Definition: welcomedialog.h:69
WelcomeDialog::m_nextRecordingStart
QDateTime m_nextRecordingStart
Definition: welcomedialog.h:73
MythWelcomeSettings
Definition: welcomesettings.h:7
WelcomeDialog::updateAll
void updateAll(void)
Definition: welcomedialog.cpp:452
WelcomeDialog::m_screenTunerNo
uint m_screenTunerNo
Definition: welcomedialog.h:77
ProgramInfo::ToMap
virtual void ToMap(InfoMap &progMap, bool showrerecord=false, uint star_range=10, uint date_format=0) const
Converts ProgramInfo into QString QHash containing each field in ProgramInfo converted into localized...
Definition: programinfo.cpp:1588
WelcomeDialog::lockShutdown
void lockShutdown(void)
Definition: welcomedialog.cpp:615
WelcomeDialog::updateStatusMessage
void updateStatusMessage(void)
Definition: welcomedialog.cpp:506
WelcomeDialog::m_startFrontendButton
MythUIButton * m_startFrontendButton
Definition: welcomedialog.h:61
WelcomeDialog::m_screenScheduledNo
uint m_screenScheduledNo
Definition: welcomedialog.h:78
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:55
WelcomeDialog::startFrontend
void startFrontend(void)
Definition: welcomedialog.cpp:92
WelcomeDialog::m_statusText
MythUIText * m_statusText
Definition: welcomedialog.h:56
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:916
UIUtilDisp::Assign
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Definition: mythuiutils.h:27
MythCoreContext::GetBoolSetting
bool GetBoolSetting(const QString &key, bool defaultval=false)
Definition: mythcorecontext.cpp:910
WelcomeDialog::runMythFillDatabase
static void runMythFillDatabase(void)
Definition: welcomedialog.cpp:433
WelcomeDialog::startFrontendClick
void startFrontendClick(void)
Definition: welcomedialog.cpp:106
kMSDisableUDPListener
@ kMSDisableUDPListener
disable MythMessage UDP listener for the duration of application.
Definition: mythsystem.h:50
ProgramInfo
Holds information on recordings and videos.
Definition: programinfo.h:67
MythScreenType::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: mythscreentype.cpp:401
WelcomeDialog::updateStatus
void updateStatus(void)
Definition: welcomedialog.cpp:322
WelcomeDialog::m_scheduledText
MythUIText * m_scheduledText
Definition: welcomedialog.h:58
WelcomeDialog::m_menuPopup
MythDialogBox * m_menuPopup
Definition: welcomedialog.h:63
XMLParseBase::LoadWindowFromXML
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
Definition: xmlparsebase.cpp:701
GetNextRecordingList
bool GetNextRecordingList(QDateTime &nextRecordingStart, bool *hasConflicts, std::vector< ProgramInfo > *list)
Definition: programinfo.cpp:6383
kMSProcessEvents
@ kMSProcessEvents
process events while waiting
Definition: mythsystem.h:39
WelcomeDialog::setPendingRecListUpdate
void setPendingRecListUpdate(bool newState)
Definition: welcomedialog.h:90
WelcomeDialog::checkAutoStart
void checkAutoStart(void)
Definition: welcomedialog.cpp:117
UPDATE_STATUS_INTERVAL
static constexpr std::chrono::milliseconds UPDATE_STATUS_INTERVAL
Definition: welcomedialog.cpp:28
WelcomeDialog::m_warningText
MythUIText * m_warningText
Definition: welcomedialog.h:59
TunerStatus::id
uint id
Definition: tvremoteutil.h:19
MythUIText::SetText
virtual void SetText(const QString &text)
Definition: mythuitext.cpp:115
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1105
mythcontext.h
GetAppBinDir
QString GetAppBinDir(void)
Definition: mythdirs.cpp:260
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:104
WelcomeDialog::ShowMenu
void ShowMenu(void) override
Definition: welcomedialog.cpp:590
build_compdb.action
action
Definition: build_compdb.py:9
TunerStatus::startTime
QDateTime startTime
Definition: tvremoteutil.h:24
MythMainWindow::GetStack
MythScreenStack * GetStack(const QString &Stackname)
Definition: mythmainwindow.cpp:322
WelcomeDialog::ShowSettings
static void ShowSettings(GroupSetting *screen)
Definition: welcomedialog.cpp:215
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:83
WelcomeDialog::setPendingSchedUpdate
void setPendingSchedUpdate(bool newState)
Definition: welcomedialog.h:96
WelcomeDialog::m_tunerList
std::vector< TunerStatus > m_tunerList
Definition: welcomedialog.h:83
MythDate::kTime
@ kTime
Default local time.
Definition: mythdate.h:22
TunerStatus::isRecording
bool isRecording
Definition: tvremoteutil.h:20
lcddevice.h
exitcodes.h
WelcomeDialog::m_hasConflicts
bool m_hasConflicts
Definition: welcomedialog.h:70
WelcomeDialog::m_recListUpdateMuxtex
QMutex m_recListUpdateMuxtex
Definition: welcomedialog.h:86
MythScreenStack::AddScreen
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Definition: mythscreenstack.cpp:52
WelcomeDialog::m_willShutdown
bool m_willShutdown
Definition: welcomedialog.h:71
WelcomeDialog::m_secondsToShutdown
int m_secondsToShutdown
Definition: welcomedialog.h:72
ShowOkPopup
MythConfirmationDialog * ShowOkPopup(const QString &message, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
Definition: mythdialogbox.cpp:566
TunerStatus::subtitle
QString subtitle
Definition: tvremoteutil.h:23
MythObservable::removeListener
void removeListener(QObject *listener)
Remove a listener to the observable.
Definition: mythobservable.cpp:55
GroupSetting
Definition: standardsettings.h:435
uint
unsigned int uint
Definition: freesurround.h:24
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:902
WelcomeDialog::runEPGGrabber
void runEPGGrabber(void)
Definition: welcomedialog.cpp:633
WelcomeDialog::m_idleWaitForRecordingTime
std::chrono::seconds m_idleWaitForRecordingTime
Definition: welcomedialog.h:75
WelcomeDialog::WelcomeDialog
WelcomeDialog(MythScreenStack *parent, const char *name)
Definition: welcomedialog.cpp:32