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::MythEventMessage)
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  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  handled = false;
296  }
297 
298  if (!handled && MythScreenType::keyPressEvent(event))
299  handled = true;
300 
301  return handled;
302 }
303 
305 {
306  Close();
307 }
308 
310 {
312 
314  m_updateStatusTimer->disconnect();
315 
317  m_updateScreenTimer->disconnect();
318 }
319 
321 {
323 
325 }
326 
328 {
329  QString status;
330 
332  {
333  m_recordingText->SetText(tr("Cannot connect to server!"));
334  m_scheduledText->SetText(tr("Cannot connect to server!"));
335  m_warningText->SetVisible(false);
336  }
337  else
338  {
339  // update recording
340  if (m_isRecording && !m_tunerList.empty())
341  {
343 
344  do
345  {
346  if (m_screenTunerNo < m_tunerList.size() - 1)
347  m_screenTunerNo++;
348  else
349  m_screenTunerNo = 0;
350  tuner = m_tunerList[m_screenTunerNo];
351  }
352  while (!tuner.isRecording);
353 
354  status = tr("Tuner %1 is recording:").arg(tuner.id);
355  status += "\n";
356  status += tuner.channame;
357  status += "\n" + tuner.title;
358  if (!tuner.subtitle.isEmpty())
359  status += "\n("+tuner.subtitle+")";
360 
361  status += "\n" +
362  tr("%1 to %2", "Time period, 'starttime to endtime'")
365  }
366  else
367  status = tr("There are no recordings currently taking place");
368 
369  m_recordingText->SetText(status);
370 
371  // update scheduled
372  if (!m_scheduledList.empty())
373  {
374  if (m_screenScheduledNo >= m_scheduledList.size())
376 
378 
379  InfoMap infomap;
380  progInfo.ToMap(infomap);
381 
382  //status = QString("%1 of %2\n").arg(m_screenScheduledNo + 1)
383  // .arg(m_scheduledList.size());
384  status = infomap["channame"] + "\n";
385  status += infomap["title"];
386  if (!infomap["subtitle"].isEmpty())
387  status += "\n(" + infomap["subtitle"] + ")";
388 
389  status += "\n" + infomap["timedate"];
390 
391  if (m_screenScheduledNo < m_scheduledList.size() - 1)
393  else
395  }
396  else
397  status = tr("There are no scheduled recordings");
398 
399  m_scheduledText->SetText(status);
400  }
401 
402  // update status message
403  if (m_statusList.empty())
404  status = tr("Please Wait...");
405  else
406  {
407  if ((int)m_statusListNo >= m_statusList.count())
408  m_statusListNo = 0;
409 
410  status = m_statusList[m_statusListNo];
411  if (m_statusList.count() > 1)
412  status += "...";
413  m_statusText->SetText(status);
414 
415  if ((int)m_statusListNo < m_statusList.count() - 1)
416  m_statusListNo++;
417  else
418  m_statusListNo = 0;
419  }
420 
421  m_updateScreenTimer->stop();
422  m_updateScreenTimer->setSingleShot(true);
424 }
425 
426 // taken from housekeeper.cpp
428 {
429  QString command;
430 
431  QString mfpath = gCoreContext->GetSetting("MythFillDatabasePath",
432  "mythfilldatabase");
433  QString mfarg = gCoreContext->GetSetting("MythFillDatabaseArgs", "");
434 
435  command = QString("%1 %2").arg(mfpath, mfarg);
436  command += logPropagateArgs;
437 
438  command += "&";
439 
440  LOG(VB_GENERAL, LOG_INFO, QString("Grabbing EPG data using command: %1\n")
441  .arg(command));
442 
444 }
445 
447 {
450 }
451 
453 {
454  {
455  // clear pending flag early in case something happens while
456  // we're updating
457  QMutexLocker lock(&m_recListUpdateMuxtex);
459  }
460 
461  m_tunerList.clear();
462  m_isRecording = false;
463  m_screenTunerNo = 0;
464 
466  return false;
467 
469 
470  return true;
471 }
472 
474 {
475  {
476  // clear pending flag early in case something happens while
477  // we're updating
478  QMutexLocker lock(&m_schedUpdateMuxtex);
479  setPendingSchedUpdate(false);
480  }
481 
482  m_scheduledList.clear();
484 
486  {
488  return false;
489  }
490 
492  &m_scheduledList);
493 
494  updateStatus();
495  updateScreen();
496 
497  return true;
498 }
499 
501 {
502  m_statusList.clear();
503 
504  QDateTime curtime = MythDate::current();
505 
506  if (!m_isRecording && !m_nextRecordingStart.isNull() &&
507  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
509  {
510  m_statusList.append(tr("MythTV is about to start recording."));
511  }
512 
513  if (m_isRecording)
514  {
515  m_statusList.append(tr("MythTV is busy recording."));
516  }
517 
518  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
519  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
520 
521  if (!(statusCode & 0xFF00))
522  {
523  if (statusCode & 1)
524  m_statusList.append(tr("MythTV is busy transcoding."));
525  if (statusCode & 2)
526  m_statusList.append(tr("MythTV is busy flagging commercials."));
527  if (statusCode & 4)
528  m_statusList.append(tr("MythTV is busy grabbing EPG data."));
529  if (statusCode & 16)
530  m_statusList.append(tr("MythTV is locked by a user."));
531  if (statusCode & 32)
532  m_statusList.append(tr("MythTV has running or pending jobs."));
533  if (statusCode & 64)
534  m_statusList.append(tr("MythTV is in a daily wakeup/shutdown period."));
535  if (statusCode & 128)
536  m_statusList.append(tr("MythTV is about to start a wakeup/shutdown period."));
537  }
538 
539  if (m_statusList.empty())
540  {
541  if (m_willShutdown && m_secondsToShutdown != -1)
542  {
543  m_statusList.append(tr("MythTV is idle and will shutdown in %n "
544  "second(s).", "", m_secondsToShutdown));
545  }
546  else
547  {
548  m_statusList.append(tr("MythTV is idle."));
549  }
550  }
551 
553 }
554 
556 {
557  m_updateStatusTimer->stop();
558 
559  bool bRes = false;
560 
562  bRes = true;
563  else
564  {
566  {
567  bRes = true;
568  updateAll();
569  }
570  else
571  updateScreen();
572  }
573 
574  if (bRes)
576  else
577  m_updateStatusTimer->start(5s);
578 
579  return bRes;
580 }
581 
583 {
584  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
585 
586  m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");
587 
588  if (m_menuPopup->Create())
589  popupStack->AddScreen(m_menuPopup);
590 
591  m_menuPopup->SetReturnEvent(this, "action");
592 
593  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
594  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
595 
596  if (!(statusCode & 0xFF00) && statusCode & 16)
597  m_menuPopup->AddButton(tr("Unlock Shutdown"), &WelcomeDialog::unlockShutdown);
598  else
599  m_menuPopup->AddButton(tr("Lock Shutdown"), &WelcomeDialog::lockShutdown);
600 
601  m_menuPopup->AddButton(tr("Run mythfilldatabase"), &WelcomeDialog::runEPGGrabber);
602  m_menuPopup->AddButton(tr("Shutdown Now"), &WelcomeDialog::shutdownNow);
604  m_menuPopup->AddButton(tr("Cancel"));
605 }
606 
608 {
609  QString command = m_appBinDir + "mythshutdown --lock";
610  command += logPropagateArgs;
613  updateScreen();
614 }
615 
617 {
618  QString command = m_appBinDir + "mythshutdown --unlock";
619  command += logPropagateArgs;
622  updateScreen();
623 }
624 
626 {
628  sleep(1);
630  updateScreen();
631 }
632 
634 {
635  // if this is a frontend only machine just shut down now
637  {
638  LOG(VB_GENERAL, LOG_INFO,
639  "MythWelcome is shutting this computer down now");
640  QString poweroff_cmd = gCoreContext->GetSetting("MythShutdownPowerOff", "");
641  if (!poweroff_cmd.isEmpty())
642  myth_system(poweroff_cmd, kMSDontBlockInputDevs);
643  return;
644  }
645 
646  // don't shutdown if we are recording
647  if (m_isRecording)
648  {
649  ShowOkPopup(tr("Cannot shutdown because MythTV is currently recording"));
650  return;
651  }
652 
653  QDateTime curtime = MythDate::current();
654 
655  // don't shutdown if we are about to start recording
656  if (!m_nextRecordingStart.isNull() &&
657  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
659  {
660  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start recording"));
661  return;
662  }
663 
664  // don't shutdown if we are about to start a wakeup/shutdown period
665  QString command = m_appBinDir + "mythshutdown --status 0";
666  command += logPropagateArgs;
667 
668  uint statusCode = myth_system(command, kMSDontBlockInputDevs);
669  if (!(statusCode & 0xFF00) && statusCode & 128)
670  {
671  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start "
672  "a wakeup/shutdown period."));
673  return;
674  }
675 
676  // set the wakeup time for the next scheduled recording
677  if (!m_nextRecordingStart.isNull())
678  {
679  QDateTime restarttime = m_nextRecordingStart.addSecs((-1) * m_preRollSeconds.count());
680 
681  int add = gCoreContext->GetNumSetting("StartupSecsBeforeRecording", 240);
682  if (add)
683  restarttime = restarttime.addSecs((-1LL) * add);
684 
685  QString wakeup_timeformat = gCoreContext->GetSetting("WakeupTimeFormat",
686  "yyyy-MM-ddThh:mm");
687  QString setwakeup_cmd = gCoreContext->GetSetting("SetWakeuptimeCommand",
688  "echo \'Wakeuptime would "
689  "be $time if command "
690  "set.\'");
691 
692  if (wakeup_timeformat == "time_t")
693  {
694  QString time_ts;
695  setwakeup_cmd.replace("$time",
696  time_ts.setNum(restarttime.toSecsSinceEpoch())
697  );
698  }
699  else
700  setwakeup_cmd.replace(
701  "$time", restarttime.toLocalTime().toString(wakeup_timeformat));
702 
703  if (!setwakeup_cmd.isEmpty())
704  {
705  myth_system(setwakeup_cmd, kMSDontBlockInputDevs);
706  }
707  }
708 
709  // run command to set wakeuptime in bios and shutdown the system
710  command = QString();
711 
712 #ifndef _WIN32
713  command = "sudo ";
714 #endif
715 
716  command += m_appBinDir + "mythshutdown --shutdown" + logPropagateArgs;
717 
719 }
720 
MythUIButton::Clicked
void Clicked()
build_compdb.args
args
Definition: build_compdb.py:11
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:315
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:301
MythDate::toString
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
Definition: mythdate.cpp:84
tv.h
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:79
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
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
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:452
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:743
TunerStatus::title
QString title
Definition: tvremoteutil.h:22
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:386
WelcomeDialog::customEvent
void customEvent(QEvent *e) override
Definition: welcomedialog.cpp:137
WelcomeDialog::updateScreen
void updateScreen(void)
Definition: welcomedialog.cpp:327
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:616
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:309
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:344
MythDate::current
QDateTime current(bool stripped)
Returns current Date and Time in UTC.
Definition: mythdate.cpp:14
WelcomeDialog::shutdownNow
void shutdownNow(void)
Definition: welcomedialog.cpp:633
MythScreenType::GetFocusWidget
MythUIType * GetFocusWidget(void) const
Definition: mythscreentype.cpp:113
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:588
TunerStatus
recording status stuff
Definition: tvremoteutil.h:16
WelcomeDialog::updateScheduledList
bool updateScheduledList(void)
Definition: welcomedialog.cpp:473
WelcomeDialog::closeDialog
void closeDialog(void)
Definition: welcomedialog.cpp:304
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:1104
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:501
MythScreenType::SetFocusWidget
bool SetFocusWidget(MythUIType *widget=nullptr)
Definition: mythscreentype.cpp:118
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:227
compat.h
MythDialogBox::Create
bool Create(void) override
Definition: mythdialogbox.cpp:127
WelcomeDialog::checkConnectionToServer
bool checkConnectionToServer(void)
Definition: welcomedialog.cpp:555
MythCoreContext::GetDurSetting
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDurSetting(const QString &key, T defaultval=T::zero())
Definition: mythcorecontext.h:169
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:206
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:446
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:1542
WelcomeDialog::lockShutdown
void lockShutdown(void)
Definition: welcomedialog.cpp:607
WelcomeDialog::updateStatusMessage
void updateStatusMessage(void)
Definition: welcomedialog.cpp:500
WelcomeDialog::m_startFrontendButton
MythUIButton * m_startFrontendButton
Definition: welcomedialog.h:61
WelcomeDialog::m_screenScheduledNo
uint m_screenScheduledNo
Definition: welcomedialog.h:78
uint
unsigned int uint
Definition: compat.h:79
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition: mythcorecontext.cpp:54
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:910
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:904
WelcomeDialog::runMythFillDatabase
static void runMythFillDatabase(void)
Definition: welcomedialog.cpp:427
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:404
WelcomeDialog::updateStatus
void updateStatus(void)
Definition: welcomedialog.cpp:320
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:695
GetNextRecordingList
bool GetNextRecordingList(QDateTime &nextRecordingStart, bool *hasConflicts, std::vector< ProgramInfo > *list)
Definition: programinfo.cpp:6249
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:132
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1108
mythcontext.h
GetAppBinDir
QString GetAppBinDir(void)
Definition: mythdirs.cpp:221
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:102
WelcomeDialog::ShowMenu
void ShowMenu(void) override
Definition: welcomedialog.cpp:582
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:320
WelcomeDialog::ShowSettings
static void ShowSettings(GroupSetting *screen)
Definition: welcomedialog.cpp:215
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:86
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:50
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:563
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
MythCoreContext::GetSetting
QString GetSetting(const QString &key, const QString &defaultval="")
Definition: mythcorecontext.cpp:896
WelcomeDialog::runEPGGrabber
void runEPGGrabber(void)
Definition: welcomedialog.cpp:625
WelcomeDialog::m_idleWaitForRecordingTime
std::chrono::seconds m_idleWaitForRecordingTime
Definition: welcomedialog.h:75
WelcomeDialog::WelcomeDialog
WelcomeDialog(MythScreenStack *parent, const char *name)
Definition: welcomedialog.cpp:32