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 int64_t GetSecondsPlayed(bool HonorCutList, int Divisor = 1000);
41  virtual int64_t GetTotalSeconds(bool HonorCutList, int Divisor = 1000) const;
42 
44  QMutex m_osdLock { QMutex::Recursive };
45  bool m_browsing { false };
46  bool m_editing { false };
47  // Set in the decoder thread
48  bool m_reinitOsd { false };
49 
50  private:
51  Q_DISABLE_COPY(MythPlayerOverlayUI)
52 
53  QTimer m_positionUpdateTimer;
54 };
55 
56 #endif
osdInfo
Definition: playercontext.h:33
MythPlayerOverlayUI::LockOSD
void LockOSD()
Definition: mythplayeroverlayui.h:25
MythPlayerOverlayUI::GetOSD
OSD * GetOSD()
Definition: mythplayeroverlayui.h:24
PlayerFlags
PlayerFlags
Definition: mythplayer.h:62
OSDTimeout
OSDTimeout
Definition: osd.h:56
mythplayeruibase.h
MythPlayerOverlayUI
Definition: mythplayeroverlayui.h:7
MythPlayerOverlayUI::m_osd
OSD m_osd
Definition: mythplayeroverlayui.h:43
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
MythPlayerOverlayUI::UnlockOSD
void UnlockOSD()
Definition: mythplayeroverlayui.h:26
PlayerContext
Definition: playercontext.h:48
MythOverlayState
A simpler than simple wrapper around OSD state.
Definition: mythplayerstate.h:18
OSD
Definition: osd.h:94
MythMainWindow
Definition: mythmainwindow.h:34
MythPlayerUIBase
Definition: mythplayeruibase.h:7
TV
Control TV playback.
Definition: tv_play.h:152