63 LOG(VB_GENERAL, LOG_ERR,
"Cannot load screen 'zmevents'");
113 for (
int i = 0; i < actions.size() && !handled; i++)
115 const QString&
action = actions[i];
122 else if (
action ==
"ESCAPE")
130 else if (
action ==
"DELETE")
135 else if (
action ==
"PAUSE")
140 else if (
action ==
"INFO")
173 QString monitorName =
"<ANY>";
174 QString date =
"<ANY>";
198 QVariant::fromValue(event));
200 item->SetText(event->eventName());
201 item->SetText(event->monitorName(),
"camera" );
206 item->SetText(event->length(),
"length");
264 zm->getAnalyseFrame(event, 0, image);
288 auto *player =
new ZMPlayer(mainStack,
"ZMPlayer",
293 if (player->Create())
318 zm->deleteEvent(event->eventID());
323 std::vector<Event*>::iterator it;
339 QStringList cameraList;
340 zm->getCameraList(cameraList);
346 for (
int x = 1; x <= cameraList.count(); x++)
357 QString monitorName =
"<ANY>";
380 if (layout < 1 || layout > 3)
393 QString layoutName = QString(
"layout%1").arg(layout);
396 for (
auto *
type : std::as_const(*children))
398 name =
type->objectName();
399 if (name.startsWith(
"layout"))
401 if (name.startsWith(layoutName))
402 type->SetVisible(
true);
404 type->SetVisible(
false);
428 LOG(VB_GENERAL, LOG_ERR, QString(
"Theme is missing grid layout (%1).")
429 .arg(layoutName +
"_eventlist"));
471 QString title = tr(
"Delete All Events?");
476 if (dialog->Create())
Dialog asking for user confirmation.
void SaveSetting(const QString &key, int newValue)
QString GetSetting(const QString &key, const QString &defaultval="")
int GetNumSetting(const QString &key, int defaultval=0)
Basic menu dialog, message and a list of options.
void AddButton(const QString &title)
void SetReturnEvent(QObject *retobject, const QString &resultid)
bool Create(void) override
virtual void SetChanged(bool change=true)
void Assign(const QImage &img)
int DecrRef(void) override
Decrements reference count and deletes on 0.
MythScreenStack * GetMainStack()
bool TranslateKeyPress(const QString &Context, QKeyEvent *Event, QStringList &Actions, bool AllowJumps=true)
Get a list of actions for a keypress in the given context.
MythScreenStack * GetStack(const QString &Stackname)
MythImage * GetFormatImage()
Returns a blank reference counted image in the format required for the Draw functions for this painte...
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
void BuildFocusList(void)
MythUIType * GetFocusWidget(void) const
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
bool SetFocusWidget(MythUIType *widget=nullptr)
virtual void SetText(const QString &text)
QList< MythUIType * > * GetAllChildren(void)
Return a list of all child widgets.
MythUIType * GetChild(const QString &name) const
Get a named child of this UIType.
static bool LoadWindowFromXML(const QString &xmlfile, const QString &windowname, MythUIType *parent)
static ZMClient * get(void)
void eventChanged(MythUIButtonListItem *item)
void doDeleteAll(bool doDelete)
MythUIButtonList * m_eventGrid
bool Create(void) override
MythUIButton * m_playButton
MythUIButtonList * m_dateSelector
static void eventVisible(MythUIButtonListItem *item)
void setGridLayout(int layout)
std::vector< Event * > * m_eventList
MythUIButton * m_deleteButton
MythUIText * m_eventNoText
MythDialogBox * m_menuPopup
void toggleShowContinuous(void)
void ShowMenu(void) override
MythUIButtonList * m_cameraSelector
bool keyPressEvent(QKeyEvent *event) override
Key event handler.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythPainter * GetMythPainter(void)
MythMainWindow * GetMythMainWindow(void)
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
@ kDateTimeFull
Default local time.
@ kSimplify
Do Today/Yesterday/Tomorrow transform.
QDateTime fromString(const QString &dtstr)
Converts kFilename && kISODate formats to QDateTime.
static bool Assign(ContainerType *container, UIType *&item, const QString &name, bool *err=nullptr)
Q_DECLARE_METATYPE(Event *)