25 m_updateScreenTimer(new QTimer(this))
62 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'standbymode'");
105 QString state =
"idle";
110 state =
"shuttingdown";
131 QString status = tr(
"Backend will shutdown in %n "
205 QVariant::fromValue(progInfo));
208 progInfo->
ToMap(infoMap);
209 item->SetTextFromMap(infoMap,
"");
252 auto *me =
dynamic_cast<MythEvent *
>(event);
256 if (me->Message().startsWith(
"RECONNECT_"))
261 else if (me->Message().startsWith(
"SHUTDOWN_COUNTDOWN"))
263 QString secs = me->Message().mid(19);
267 else if (me->Message().startsWith(
"SHUTDOWN_NOW"))
275 LOG(VB_GENERAL, LOG_NOTICE,
276 "Backend has gone offline, Shutting down frontend");
277 QString poweroff_cmd =
279 if (!poweroff_cmd.isEmpty())
284 else if (me->Message().startsWith(
"SCHEDULE_CHANGE") ||
285 me->Message().startsWith(
"RECORDING_LIST_CHANGE") ||
286 me->Message() ==
"UPDATE_PROG_INFO")
bool UpdateScheduledList()
void Load(void) override
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
void Init(void) override
Used after calling Load() to assign data to widgets and other UI initilisation which is prohibited in...
MythUIText * m_conflictWarning
bool CheckConnectionToServer(void)
std::chrono::seconds m_secondsToShutdown
bool Create(void) override
MythUIStateType * m_statusState
MythUIButtonList * m_conflictingRecordings
IdleScreen(MythScreenStack *parent)
void customEvent(QEvent *e) override
void SetPendingSchedUpdate(bool newState)
MythUIButtonList * m_currentRecordings
QTimer * m_updateScreenTimer
ProgramList m_scheduledList
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
MythUIButtonList * m_nextRecordings
QMutex m_schedUpdateMutex
bool PendingSchedUpdate() const
bool IsConnectedToMaster(void)
bool SafeConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
QString GetSetting(const QString &key, const QString &defaultval="")
bool IsFrontendOnly(void)
is there a frontend, but no backend, running on this host
int GetNumSetting(const QString &key, int defaultval=0)
This class is used as a container for messages.
static const Type kMythEventMessage
void ExitStandby(bool Manual=true)
void EnterStandby(bool Manual=true)
void addListener(QObject *listener)
Add a listener to the observable.
void removeListener(QObject *listener)
Remove a listener to the observable.
Screen in which all other widgets are contained and rendered.
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
virtual void Load(void)
Load data which will ultimately be displayed on-screen or used to determine what appears on-screen (S...
MythUIType * GetState(const QString &name)
bool DisplayState(const QString &name)
All purpose text widget, displays a text string.
void Reset(void) override
Reset the widget to it's original state, should not reset changes made by the theme.
virtual void SetText(const QString &text)
The base class on which all widgets and screens are based.
void SetCanTakeFocus(bool set=true)
Set whether this widget can take focus.
void customEvent(QEvent *event) override
virtual void SetVisible(bool visible)
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
Holds information on recordings and videos.
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...
RecStatus::Type GetRecordingStatus(void) const
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
static constexpr std::chrono::milliseconds UPDATE_INTERVAL
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythMainWindow * GetMythMainWindow(void)
uint myth_system(const QString &command, uint flags, std::chrono::seconds timeout)
QHash< QString, QString > InfoMap
bool LoadFromScheduler(AutoDeleteDeque< TYPE * > &destination, bool &hasConflicts, const QString &altTable="", int recordid=-1)
int RemoteGetRecordingStatus(const ProgramInfo *pginfo, int overrecsecs, int underrecsecs)
Get status of an individual programme (with pre-post roll?).
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)