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