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 static constexpr std::chrono::milliseconds UPDATE_STATUS_INTERVAL { 30s };
30 static constexpr std::chrono::milliseconds UPDATE_SCREEN_INTERVAL { 15s };
31 
32 
34  :MythScreenType(parent, name),
35  m_updateStatusTimer(new QTimer(this)),
36  m_updateScreenTimer(new QTimer(this))
37 {
39 
41  m_preRollSeconds = gCoreContext->GetDurSetting<std::chrono::seconds>("RecordPreRoll");
43  gCoreContext->GetDurSetting<std::chrono::minutes>("idleWaitForRecordingTime", 15min);
44  m_idleTimeoutSecs = gCoreContext->GetDurSetting<std::chrono::seconds>("idleTimeoutSecs", 0s);
45 
46  // if idleTimeoutSecs is 0, the user disabled the auto-shutdown feature
48 
52 
55 }
56 
58 {
59  // Load the theme for this screen
60  bool foundtheme = LoadWindowFromXML("welcome-ui.xml", "welcome_screen", this);
61  if (!foundtheme)
62  return false;
63 
64  bool err = false;
65  UIUtilE::Assign(this, m_statusText, "status_text", &err);
66  UIUtilE::Assign(this, m_recordingText, "recording_text", &err);
67  UIUtilE::Assign(this, m_scheduledText, "scheduled_text", &err);
68  UIUtilE::Assign(this, m_warningText, "conflicts_text", &err);
69  UIUtilE::Assign(this, m_startFrontendButton, "startfrontend_button", &err);
70 
71  if (err)
72  {
73  LOG(VB_GENERAL, LOG_ERR, "Cannot load screen 'welcome_screen'");
74  return false;
75  }
76 
77  m_warningText->SetVisible(false);
78 
79  m_startFrontendButton->SetText(tr("Start Frontend"));
82 
84 
86 
89 
90  return true;
91 }
92 
94 {
95  QString startFECmd = gCoreContext->GetSetting("MythWelcomeStartFECmd",
96  m_appBinDir + "mythfrontend");
97 
98  // Ensure we use the same platform for mythfrontend
99  QStringList args;
100  if (!startFECmd.contains("platform"))
101  args << QString("--platform %1").arg(QGuiApplication::platformName());
103  updateAll();
104  m_frontendIsRunning = false;
105 }
106 
108 {
110  return;
111 
112  m_frontendIsRunning = true;
113 
114  // this makes sure the button appears to click properly
115  QTimer::singleShot(500ms, this, &WelcomeDialog::startFrontend);
116 }
117 
119 {
120  // mythshutdown --startup returns 0 for automatic startup
121  // 1 for manual startup
122  QString command = m_appBinDir + "mythshutdown --startup";
123  command += logPropagateArgs;
124  uint state = myth_system(command, kMSDontBlockInputDevs);
125 
126  LOG(VB_GENERAL, LOG_NOTICE,
127  QString("mythshutdown --startup returned: %1").arg(state));
128 
129  bool bAutoStartFrontend = gCoreContext->GetBoolSetting("AutoStartFrontend", true);
130 
131  if (state == 1 && bAutoStartFrontend)
133 
134  // update status now
135  updateAll();
136 }
137 
139 {
140  if (e->type() == MythEvent::MythEventMessage)
141  {
142  auto *me = dynamic_cast<MythEvent *>(e);
143  if (me == nullptr)
144  return;
145 
146  if (me->Message().startsWith("RECORDING_LIST_CHANGE") ||
147  me->Message() == "UPDATE_PROG_INFO")
148  {
149  LOG(VB_GENERAL, LOG_NOTICE,
150  "MythWelcome received a recording list change event");
151 
152  QMutexLocker lock(&m_recListUpdateMuxtex);
153 
154  if (pendingRecListUpdate())
155  {
156  LOG(VB_GENERAL, LOG_NOTICE,
157  " [deferred to pending handler]");
158  }
159  else
160  {
161  // we can't query the backend from inside a customEvent
162  QTimer::singleShot(500ms, this, &WelcomeDialog::updateRecordingList);
164  }
165  }
166  else if (me->Message().startsWith("SCHEDULE_CHANGE"))
167  {
168  LOG(VB_GENERAL, LOG_NOTICE,
169  "MythWelcome received a SCHEDULE_CHANGE event");
170 
171  QMutexLocker lock(&m_schedUpdateMuxtex);
172 
173  if (pendingSchedUpdate())
174  {
175  LOG(VB_GENERAL, LOG_NOTICE,
176  " [deferred to pending handler]");
177  }
178  else
179  {
180  QTimer::singleShot(500ms, this, &WelcomeDialog::updateScheduledList);
181  setPendingSchedUpdate(true);
182  }
183  }
184  else if (me->Message().startsWith("SHUTDOWN_COUNTDOWN"))
185  {
186 #if 0
187  LOG(VB_GENERAL, LOG_NOTICE,
188  "MythWelcome received a SHUTDOWN_COUNTDOWN event");
189 #endif
190  QString secs = me->Message().mid(19);
191  m_secondsToShutdown = secs.toInt();
193  updateScreen();
194  }
195  else if (me->Message().startsWith("SHUTDOWN_NOW"))
196  {
197  LOG(VB_GENERAL, LOG_NOTICE,
198  "MythWelcome received a SHUTDOWN_NOW event");
200  {
201  // does the user want to shutdown this frontend only machine
202  // when the BE shuts down?
203  if (gCoreContext->GetNumSetting("ShutdownWithMasterBE", 0) == 1)
204  {
205  LOG(VB_GENERAL, LOG_NOTICE,
206  "MythWelcome is shutting this computer down now");
207  QString poweroff_cmd = gCoreContext->GetSetting("MythShutdownPowerOff", "");
208  if (!poweroff_cmd.isEmpty())
209  myth_system(poweroff_cmd, kMSDontBlockInputDevs);
210  }
211  }
212  }
213  }
214 }
215 
217 {
219  auto *ssd = new StandardSettingDialog(mainStack, "settings", screen);
220  if (ssd->Create())
221  mainStack->AddScreen(ssd);
222  else
223  delete ssd;
224 }
225 
226 bool WelcomeDialog::keyPressEvent(QKeyEvent *event)
227 {
228  if (GetFocusWidget()->keyPressEvent(event))
229  return true;
230 
231  QStringList actions;
232  bool handled = GetMythMainWindow()->TranslateKeyPress("Welcome", event, actions);
233 
234  for (int i = 0; i < actions.size() && !handled; i++)
235  {
236  QString action = actions[i];
237  handled = true;
238 
239  if (action == "ESCAPE")
240  {
241  return true; // eat escape key
242  }
243  if (action == "MENU")
244  {
245  ShowMenu();
246  }
247  else if (action == "NEXTVIEW")
248  {
249  Close();
250  }
251  else if (action == "INFO")
252  {
254  }
255  else if (action == "SHOWSETTINGS")
256  {
258  }
259  else if (action == "0")
260  {
261  QString mythshutdown_status =
262  m_appBinDir + "mythshutdown --status 0";
263  QString mythshutdown_unlock =
264  m_appBinDir + "mythshutdown --unlock";
265  QString mythshutdown_lock =
266  m_appBinDir + "mythshutdown --lock";
267 
268  uint statusCode =
269  myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
270 
271  // is shutdown locked by a user
272  if (!(statusCode & 0xFF00) && statusCode & 16)
273  {
274  myth_system(mythshutdown_unlock + logPropagateArgs, kMSDontBlockInputDevs);
275  }
276  else
277  {
278  myth_system(mythshutdown_lock + logPropagateArgs, kMSDontBlockInputDevs);
279  }
280 
282  updateScreen();
283  }
284  else if (action == "STARTXTERM")
285  {
286  QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", "");
287  if (!cmd.isEmpty())
289  }
290  else if (action == "STARTSETUP")
291  {
292  QString mythtv_setup = m_appBinDir + "mythtv-setup";
293  myth_system(mythtv_setup + logPropagateArgs);
294  }
295  else
296  handled = false;
297  }
298 
299  if (!handled && MythScreenType::keyPressEvent(event))
300  handled = true;
301 
302  return handled;
303 }
304 
306 {
307  Close();
308 }
309 
311 {
313 
315  m_updateStatusTimer->disconnect();
316 
318  m_updateScreenTimer->disconnect();
319 }
320 
322 {
324 
326 }
327 
329 {
330  QString status;
331 
333  {
334  m_recordingText->SetText(tr("Cannot connect to server!"));
335  m_scheduledText->SetText(tr("Cannot connect to server!"));
336  m_warningText->SetVisible(false);
337  }
338  else
339  {
340  // update recording
341  if (m_isRecording && !m_tunerList.empty())
342  {
344 
345  do
346  {
347  if (m_screenTunerNo < m_tunerList.size() - 1)
348  m_screenTunerNo++;
349  else
350  m_screenTunerNo = 0;
351  tuner = m_tunerList[m_screenTunerNo];
352  }
353  while (!tuner.isRecording);
354 
355  status = tr("Tuner %1 is recording:").arg(tuner.id);
356  status += "\n";
357  status += tuner.channame;
358  status += "\n" + tuner.title;
359  if (!tuner.subtitle.isEmpty())
360  status += "\n("+tuner.subtitle+")";
361 
362  status += "\n" +
363  tr("%1 to %2", "Time period, 'starttime to endtime'")
366  }
367  else
368  status = tr("There are no recordings currently taking place");
369 
370  m_recordingText->SetText(status);
371 
372  // update scheduled
373  if (!m_scheduledList.empty())
374  {
375  if (m_screenScheduledNo >= m_scheduledList.size())
377 
379 
380  InfoMap infomap;
381  progInfo.ToMap(infomap);
382 
383  //status = QString("%1 of %2\n").arg(m_screenScheduledNo + 1)
384  // .arg(m_scheduledList.size());
385  status = infomap["channame"] + "\n";
386  status += infomap["title"];
387  if (!infomap["subtitle"].isEmpty())
388  status += "\n(" + infomap["subtitle"] + ")";
389 
390  status += "\n" + infomap["timedate"];
391 
392  if (m_screenScheduledNo < m_scheduledList.size() - 1)
394  else
396  }
397  else
398  status = tr("There are no scheduled recordings");
399 
400  m_scheduledText->SetText(status);
401  }
402 
403  // update status message
404  if (m_statusList.empty())
405  status = tr("Please Wait...");
406  else
407  {
408  if ((int)m_statusListNo >= m_statusList.count())
409  m_statusListNo = 0;
410 
411  status = m_statusList[m_statusListNo];
412  if (m_statusList.count() > 1)
413  status += "...";
414  m_statusText->SetText(status);
415 
416  if ((int)m_statusListNo < m_statusList.count() - 1)
417  m_statusListNo++;
418  else
419  m_statusListNo = 0;
420  }
421 
422  m_updateScreenTimer->stop();
423  m_updateScreenTimer->setSingleShot(true);
425 }
426 
427 // taken from housekeeper.cpp
429 {
430  QString command;
431 
432  QString mfpath = gCoreContext->GetSetting("MythFillDatabasePath",
433  "mythfilldatabase");
434  QString mfarg = gCoreContext->GetSetting("MythFillDatabaseArgs", "");
435 
436  command = QString("%1 %2").arg(mfpath, mfarg);
437  command += logPropagateArgs;
438 
439  command += "&";
440 
441  LOG(VB_GENERAL, LOG_INFO, QString("Grabbing EPG data using command: %1\n")
442  .arg(command));
443 
445 }
446 
448 {
451 }
452 
454 {
455  {
456  // clear pending flag early in case something happens while
457  // we're updating
458  QMutexLocker lock(&m_recListUpdateMuxtex);
460  }
461 
462  m_tunerList.clear();
463  m_isRecording = false;
464  m_screenTunerNo = 0;
465 
467  return false;
468 
470 
471  return true;
472 }
473 
475 {
476  {
477  // clear pending flag early in case something happens while
478  // we're updating
479  QMutexLocker lock(&m_schedUpdateMuxtex);
480  setPendingSchedUpdate(false);
481  }
482 
483  m_scheduledList.clear();
485 
487  {
489  return false;
490  }
491 
493  &m_scheduledList);
494 
495  updateStatus();
496  updateScreen();
497 
498  return true;
499 }
500 
502 {
503  m_statusList.clear();
504 
505  QDateTime curtime = MythDate::current();
506 
507  if (!m_isRecording && !m_nextRecordingStart.isNull() &&
508  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
510  {
511  m_statusList.append(tr("MythTV is about to start recording."));
512  }
513 
514  if (m_isRecording)
515  {
516  m_statusList.append(tr("MythTV is busy recording."));
517  }
518 
519  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
520  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
521 
522  if (!(statusCode & 0xFF00))
523  {
524  if (statusCode & 1)
525  m_statusList.append(tr("MythTV is busy transcoding."));
526  if (statusCode & 2)
527  m_statusList.append(tr("MythTV is busy flagging commercials."));
528  if (statusCode & 4)
529  m_statusList.append(tr("MythTV is busy grabbing EPG data."));
530  if (statusCode & 16)
531  m_statusList.append(tr("MythTV is locked by a user."));
532  if (statusCode & 32)
533  m_statusList.append(tr("MythTV has running or pending jobs."));
534  if (statusCode & 64)
535  m_statusList.append(tr("MythTV is in a daily wakeup/shutdown period."));
536  if (statusCode & 128)
537  m_statusList.append(tr("MythTV is about to start a wakeup/shutdown period."));
538  }
539 
540  if (m_statusList.empty())
541  {
542  if (m_willShutdown && m_secondsToShutdown != -1)
543  {
544  m_statusList.append(tr("MythTV is idle and will shutdown in %n "
545  "second(s).", "", m_secondsToShutdown));
546  }
547  else
548  {
549  m_statusList.append(tr("MythTV is idle."));
550  }
551  }
552 
554 }
555 
557 {
558  m_updateStatusTimer->stop();
559 
560  bool bRes = false;
561 
563  bRes = true;
564  else
565  {
567  {
568  bRes = true;
569  updateAll();
570  }
571  else
572  updateScreen();
573  }
574 
575  if (bRes)
577  else
578  m_updateStatusTimer->start(5s);
579 
580  return bRes;
581 }
582 
584 {
585  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
586 
587  m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu");
588 
589  if (m_menuPopup->Create())
590  popupStack->AddScreen(m_menuPopup);
591 
592  m_menuPopup->SetReturnEvent(this, "action");
593 
594  QString mythshutdown_status = m_appBinDir + "mythshutdown --status 0";
595  uint statusCode = myth_system(mythshutdown_status + logPropagateArgs, kMSDontBlockInputDevs);
596 
597  if (!(statusCode & 0xFF00) && statusCode & 16)
598  m_menuPopup->AddButton(tr("Unlock Shutdown"), &WelcomeDialog::unlockShutdown);
599  else
600  m_menuPopup->AddButton(tr("Lock Shutdown"), &WelcomeDialog::lockShutdown);
601 
602  m_menuPopup->AddButton(tr("Run mythfilldatabase"), &WelcomeDialog::runEPGGrabber);
603  m_menuPopup->AddButton(tr("Shutdown Now"), &WelcomeDialog::shutdownNow);
605  m_menuPopup->AddButton(tr("Cancel"));
606 }
607 
609 {
610  QString command = m_appBinDir + "mythshutdown --lock";
611  command += logPropagateArgs;
614  updateScreen();
615 }
616 
618 {
619  QString command = m_appBinDir + "mythshutdown --unlock";
620  command += logPropagateArgs;
623  updateScreen();
624 }
625 
627 {
629  sleep(1);
631  updateScreen();
632 }
633 
635 {
636  // if this is a frontend only machine just shut down now
638  {
639  LOG(VB_GENERAL, LOG_INFO,
640  "MythWelcome is shutting this computer down now");
641  QString poweroff_cmd = gCoreContext->GetSetting("MythShutdownPowerOff", "");
642  if (!poweroff_cmd.isEmpty())
643  myth_system(poweroff_cmd, kMSDontBlockInputDevs);
644  return;
645  }
646 
647  // don't shutdown if we are recording
648  if (m_isRecording)
649  {
650  ShowOkPopup(tr("Cannot shutdown because MythTV is currently recording"));
651  return;
652  }
653 
654  QDateTime curtime = MythDate::current();
655 
656  // don't shutdown if we are about to start recording
657  if (!m_nextRecordingStart.isNull() &&
658  std::chrono::seconds(curtime.secsTo(m_nextRecordingStart)) - m_preRollSeconds <
660  {
661  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start recording"));
662  return;
663  }
664 
665  // don't shutdown if we are about to start a wakeup/shutdown period
666  QString command = m_appBinDir + "mythshutdown --status 0";
667  command += logPropagateArgs;
668 
669  uint statusCode = myth_system(command, kMSDontBlockInputDevs);
670  if (!(statusCode & 0xFF00) && statusCode & 128)
671  {
672  ShowOkPopup(tr("Cannot shutdown because MythTV is about to start "
673  "a wakeup/shutdown period."));
674  return;
675  }
676 
677  // set the wakeup time for the next scheduled recording
678  if (!m_nextRecordingStart.isNull())
679  {
680  QDateTime restarttime = m_nextRecordingStart.addSecs((-1) * m_preRollSeconds.count());
681 
682  int add = gCoreContext->GetNumSetting("StartupSecsBeforeRecording", 240);
683  if (add)
684  restarttime = restarttime.addSecs((-1) * add);
685 
686  QString wakeup_timeformat = gCoreContext->GetSetting("WakeupTimeFormat",
687  "yyyy-MM-ddThh:mm");
688  QString setwakeup_cmd = gCoreContext->GetSetting("SetWakeuptimeCommand",
689  "echo \'Wakeuptime would "
690  "be $time if command "
691  "set.\'");
692 
693  if (wakeup_timeformat == "time_t")
694  {
695  QString time_ts;
696  setwakeup_cmd.replace("$time",
697  time_ts.setNum(restarttime.toSecsSinceEpoch())
698  );
699  }
700  else
701  setwakeup_cmd.replace(
702  "$time", restarttime.toLocalTime().toString(wakeup_timeformat));
703 
704  if (!setwakeup_cmd.isEmpty())
705  {
706  myth_system(setwakeup_cmd, kMSDontBlockInputDevs);
707  }
708  }
709 
710  // run command to set wakeuptime in bios and shutdown the system
711  command = QString();
712 
713 #ifndef _WIN32
714  command = "sudo ";
715 #endif
716 
717  command += m_appBinDir + "mythshutdown --shutdown" + logPropagateArgs;
718 
720 }
721 
MythUIButton::Clicked
void Clicked()
build_compdb.args
args
Definition: build_compdb.py:11
MythMainWindow::GetMainStack
MythScreenStack * GetMainStack()
Definition: mythmainwindow.cpp:314
WelcomeDialog::m_idleTimeoutSecs
std::chrono::seconds m_idleTimeoutSecs
Definition: welcomedialog.h:80
WelcomeDialog::keyPressEvent
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
Definition: welcomedialog.cpp:226
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:80
tv.h
MythEvent::MythEventMessage
static Type MythEventMessage
Definition: mythevent.h:78
hardwareprofile.smolt.timeout
float timeout
Definition: smolt.py:103
UPDATE_SCREEN_INTERVAL
static constexpr std::chrono::milliseconds UPDATE_SCREEN_INTERVAL
Definition: welcomedialog.cpp:30
WelcomeDialog::m_updateScreenTimer
QTimer * m_updateScreenTimer
Definition: welcomedialog.h:70
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:84
WelcomeDialog::updateRecordingList
bool updateRecordingList(void)
Definition: welcomedialog.cpp:453
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:769
TunerStatus::title
QString title
Definition: tvremoteutil.h:22
MythScreenType::Close
virtual void Close()
Definition: mythscreentype.cpp:385
WelcomeDialog::customEvent
void customEvent(QEvent *e) override
Definition: welcomedialog.cpp:138
WelcomeDialog::updateScreen
void updateScreen(void)
Definition: welcomedialog.cpp:328
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:88
WelcomeDialog::unlockShutdown
void unlockShutdown(void)
Definition: welcomedialog.cpp:617
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:6172
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:44
WelcomeDialog::~WelcomeDialog
~WelcomeDialog() override
Definition: welcomedialog.cpp:310
mythdirs.h
myth_system
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
Definition: mythsystemlegacy.cpp:505
remoteutil.h
MythCoreContext::SafeConnectToMasterServer
bool SafeConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
Definition: mythcorecontext.cpp:370
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:634
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:614
TunerStatus
recording status stuff
Definition: tvremoteutil.h:16
WelcomeDialog::updateScheduledList
bool updateScheduledList(void)
Definition: welcomedialog.cpp:474
WelcomeDialog::closeDialog
void closeDialog(void)
Definition: welcomedialog.cpp:305
StandardSettingDialog
Definition: standardsettings.h:468
WelcomeDialog::m_preRollSeconds
std::chrono::seconds m_preRollSeconds
Definition: welcomedialog.h:78
WelcomeDialog::m_schedUpdateMuxtex
QMutex m_schedUpdateMuxtex
Definition: welcomedialog.h:96
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:1102
WelcomeDialog::Create
bool Create(void) override
Definition: welcomedialog.cpp:57
RemoteGetRecordingStatus
int RemoteGetRecordingStatus(const ProgramInfo *pginfo, int overrecsecs, int underrecsecs)
Get status of an individual programme (with pre-post roll?).
Definition: remoteutil.cpp:498
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: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:556
MythCoreContext::GetDurSetting
std::enable_if_t< std::chrono::__is_duration< T >::value, T > GetDurSetting(const QString &key, T defaultval=T::zero())
Definition: mythcorecontext.h:170
MythScreenType::BuildFocusList
void BuildFocusList(void)
Definition: mythscreentype.cpp:205
WelcomeDialog::m_isRecording
bool m_isRecording
Definition: welcomedialog.h:73
WelcomeDialog::m_nextRecordingStart
QDateTime m_nextRecordingStart
Definition: welcomedialog.h:77
MythWelcomeSettings
Definition: welcomesettings.h:7
WelcomeDialog::updateAll
void updateAll(void)
Definition: welcomedialog.cpp:447
WelcomeDialog::m_screenTunerNo
uint m_screenTunerNo
Definition: welcomedialog.h:81
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:1560
WelcomeDialog::lockShutdown
void lockShutdown(void)
Definition: welcomedialog.cpp:608
WelcomeDialog::updateStatusMessage
void updateStatusMessage(void)
Definition: welcomedialog.cpp:501
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:144
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:93
WelcomeDialog::m_statusText
MythUIText * m_statusText
Definition: welcomedialog.h:60
MythCoreContext::GetNumSetting
int GetNumSetting(const QString &key, int defaultval=0)
Definition: mythcorecontext.cpp:936
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:930
WelcomeDialog::runMythFillDatabase
static void runMythFillDatabase(void)
Definition: welcomedialog.cpp:428
WelcomeDialog::startFrontendClick
void startFrontendClick(void)
Definition: welcomedialog.cpp:107
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:397
WelcomeDialog::updateStatus
void updateStatus(void)
Definition: welcomedialog.cpp:321
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:39
WelcomeDialog::setPendingRecListUpdate
void setPendingRecListUpdate(bool newState)
Definition: welcomedialog.h:94
WelcomeDialog::checkAutoStart
void checkAutoStart(void)
Definition: welcomedialog.cpp:118
UPDATE_STATUS_INTERVAL
static constexpr std::chrono::milliseconds UPDATE_STATUS_INTERVAL
Definition: welcomedialog.cpp:29
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:133
MythUIType::SetVisible
virtual void SetVisible(bool visible)
Definition: mythuitype.cpp:1098
mythcontext.h
GetAppBinDir
QString GetAppBinDir(void)
Definition: mythdirs.cpp:221
GetMythMainWindow
MythMainWindow * GetMythMainWindow(void)
Definition: mythmainwindow.cpp:101
WelcomeDialog::ShowMenu
void ShowMenu(void) override
Definition: welcomedialog.cpp:583
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:319
WelcomeDialog::ShowSettings
static void ShowSettings(GroupSetting *screen)
Definition: welcomedialog.cpp:216
logPropagateArgs
QString logPropagateArgs
Definition: logging.cpp:85
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:22
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:50
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:558
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:922
WelcomeDialog::runEPGGrabber
void runEPGGrabber(void)
Definition: welcomedialog.cpp:626
WelcomeDialog::m_idleWaitForRecordingTime
std::chrono::seconds m_idleWaitForRecordingTime
Definition: welcomedialog.h:79
WelcomeDialog::WelcomeDialog
WelcomeDialog(MythScreenStack *parent, const char *name)
Definition: welcomedialog.cpp:33