MythTV  master
mythuistatetracker.h
Go to the documentation of this file.
1 #ifndef MYTHUISTATETRACKER_H
2 #define MYTHUISTATETRACKER_H
3 
4 #include <QVariantMap>
5 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
6 #include <QMutex>
7 #else
8 #include <QRecursiveMutex>
9 #endif
10 #include <QTime>
11 
12 #include "mythuiexp.h"
13 
15 {
16  public:
17  static void SetState(const QVariantMap& NewState);
18  static void GetState(QVariantMap& State);
19  static void GetFreshState(QVariantMap& State);
20 
21  protected:
22  static MythUIStateTracker* GetMythUIStateTracker();
23  static std::chrono::milliseconds TimeSinceLastUpdate();
24  static inline MythUIStateTracker* gUIState { nullptr };
25 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
26  static inline QMutex gUIStateLock { QMutex::Recursive };
27 #else
28  static inline QRecursiveMutex gUIStateLock;
29 #endif
30 
32  QVariantMap m_state;
34 };
35 
36 #endif
MythUIStateTracker::m_lastUpdated
QTime m_lastUpdated
Definition: mythuistatetracker.h:33
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
State
State
Definition: zmserver.h:68
MythUIStateTracker
Definition: mythuistatetracker.h:14
GetState
#define GetState(a, b)
Definition: audiooutputopensles.cpp:55
MythUIStateTracker::m_state
QVariantMap m_state
Definition: mythuistatetracker.h:32
MythUIStateTracker::gUIStateLock
static QRecursiveMutex gUIStateLock
Definition: mythuistatetracker.h:28
mythuiexp.h