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  QRecursiveMutex m_osdLock;
47  bool m_browsing { false };
48  bool m_editing { false };
49  // Set in the decoder thread
50  bool m_reinitOsd { false };
51 
52  private:
53  Q_DISABLE_COPY(MythPlayerOverlayUI)
54  QTimer m_positionUpdateTimer;
55 };
56 
57 #endif
osdInfo
Definition: playercontext.h:34
MythPlayerOverlayUI::LockOSD
void LockOSD()
Definition: mythplayeroverlayui.h:25
MythPlayerOverlayUI::GetOSD
OSD * GetOSD()
Definition: mythplayeroverlayui.h:24
PlayerFlags
PlayerFlags
Definition: mythplayer.h:64
OSDTimeout
OSDTimeout
Definition: osd.h:55
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:46
MythPlayerOverlayUI::UnlockOSD
void UnlockOSD()
Definition: mythplayeroverlayui.h:26
PlayerContext
Definition: playercontext.h:49
MythOverlayState
A simpler than simple wrapper around OSD state.
Definition: mythplayerstate.h:19
OSD
Definition: osd.h:93
MythMainWindow
Definition: mythmainwindow.h:28
MythPlayerUIBase
Definition: mythplayeruibase.h:7
TV
Control TV playback.
Definition: tv_play.h:152