MythTV  master
mythplayeroverlayui.h
Go to the documentation of this file.
1 #ifndef MYTHPLAYEROVERLAYUI_H
2 #define MYTHPLAYEROVERLAYUI_H
3 
4 // MythTV
5 #include "mythplayeruibase.h"
6 
8 {
9  Q_OBJECT
10 
11  signals:
12  void OverlayStateChanged(MythOverlayState OverlayState);
13 
14  public slots:
15  void BrowsingChanged(bool Browsing);
16  void EditingChanged(bool Editing);
17 
18  public:
19  MythPlayerOverlayUI(MythMainWindow* MainWindow, TV* Tv, PlayerContext* Context, PlayerFlags Flags);
20  ~MythPlayerOverlayUI() override = default;
21 
22  virtual void UpdateSliderInfo(osdInfo& Info, bool PaddedFields = false);
23 
24  OSD* GetOSD() { return &m_osd; }
25  void LockOSD() { m_osdLock.lock(); }
26  void UnlockOSD() { m_osdLock.unlock(); }
27 
28  protected slots:
29  void UpdateOSDMessage (const QString& Message);
30  void UpdateOSDMessage (const QString& Message, OSDTimeout Timeout);
31  void SetOSDStatus (const QString &Title, OSDTimeout Timeout);
32  void UpdateOSDStatus (osdInfo &Info, int Type, enum OSDTimeout Timeout);
33  void UpdateOSDStatus (const QString& Title, const QString& Desc,
34  const QString& Value, int Type, const QString& Units,
35  int Position, OSDTimeout Timeout);
36  void ChangeOSDPositionUpdates(bool Enable);
37  void UpdateOSDPosition();
38 
39  protected:
40  virtual std::chrono::milliseconds GetMillisecondsPlayed(bool HonorCutList);
41  virtual std::chrono::milliseconds GetTotalMilliseconds(bool HonorCutList) const;
42  std::chrono::seconds GetSecondsPlayed(bool HonorCutList);
43  std::chrono::seconds GetTotalSeconds(bool HonorCutList) const;
44 
46 #if QT_VERSION < QT_VERSION_CHECK(5,14,0)
47  QMutex m_osdLock { QMutex::Recursive };
48 #else
49  QRecursiveMutex m_osdLock;
50 #endif
51  bool m_browsing { false };
52  bool m_editing { false };
53  // Set in the decoder thread
54  bool m_reinitOsd { false };
55 
56  private:
57  Q_DISABLE_COPY(MythPlayerOverlayUI)
58  QTimer m_positionUpdateTimer;
59 };
60 
61 #endif
osdInfo
Definition: playercontext.h:37
MythPlayerOverlayUI::LockOSD
void LockOSD()
Definition: mythplayeroverlayui.h:25
MythPlayerOverlayUI::GetOSD
OSD * GetOSD()
Definition: mythplayeroverlayui.h:24
PlayerFlags
PlayerFlags
Definition: mythplayer.h:65
OSDTimeout
OSDTimeout
Definition: osd.h:56
mythplayeruibase.h
MythPlayerOverlayUI
Definition: mythplayeroverlayui.h:7
MythPlayerOverlayUI::m_osd
OSD m_osd
Definition: mythplayeroverlayui.h:45
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythPlayerOverlayUI::m_osdLock
QRecursiveMutex m_osdLock
Definition: mythplayeroverlayui.h:49
MythPlayerOverlayUI::UnlockOSD
void UnlockOSD()
Definition: mythplayeroverlayui.h:26
PlayerContext
Definition: playercontext.h:52
MythOverlayState
A simpler than simple wrapper around OSD state.
Definition: mythplayerstate.h:19
OSD
Definition: osd.h:94
MythMainWindow
Definition: mythmainwindow.h:35
MythPlayerUIBase
Definition: mythplayeruibase.h:7
TV
Control TV playback.
Definition: tv_play.h:154