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