MythTV  master
mythscreenstack.h
Go to the documentation of this file.
1 #ifndef MYTHSCREEN_STACK_H_
2 #define MYTHSCREEN_STACK_H_
3 
4 #include <QVector>
5 #include <QObject>
6 
8 #include "libmythui/mythuiexp.h"
9 
10 class QString;
11 
12 class MythScreenType;
13 class MythMainWindow;
14 class MythPainter;
15 
16 class MUI_PUBLIC MythScreenStack : public QObject
17 {
18  Q_OBJECT
19 
20  public:
21  MythScreenStack(MythMainWindow *parent, const QString &name,
22  bool main = false);
23  ~MythScreenStack() override;
24 
25  virtual void AddScreen(MythScreenType *screen, bool allowFade = true);
26  virtual void PopScreen(MythScreenType *screen = nullptr, bool allowFade = true,
27  bool deleteScreen = true);
28 
29  virtual MythScreenType *GetTopScreen(void) const;
30 
31  void GetDrawOrder(QVector<MythScreenType *> &screens);
32  void GetScreenList(QVector<MythScreenType *> &screens);
33  void ScheduleInitIfNeeded(void);
34  void AllowReInit(void) { m_doInit = true; }
35  int TotalScreens() const;
36 
37  void DisableEffects(void) { m_doTransitions = false; }
38  void EnableEffects(void);
39 
40  QString GetLocation(bool fullPath) const;
41 
42  static MythPainter *GetPainter(void);
43 
44  signals:
45  void topScreenChanged(MythScreenType *screen);
46 
47  private slots:
48  void doInit(void);
49 
50  protected:
51  virtual void RecalculateDrawOrder(void);
52  void DoNewFadeTransition();
53  void CheckNewFadeTransition();
54  void CheckDeletes(bool force = false);
55 
56  QVector<MythScreenType *> m_children;
57  QVector<MythScreenType *> m_drawOrder;
58 
59  MythScreenType *m_topScreen {nullptr};
60 
61  bool m_doTransitions {false};
62  bool m_doInit {false};
63  bool m_initTimerStarted {false};
64  bool m_inNewTransition {false};
65  MythScreenType *m_newTop {nullptr};
66 
67  QVector<MythScreenType *> m_toDelete;
68 };
69 
70 #endif
71 
bbciplayer.main
main
Definition: bbciplayer.py:259
MythScreenStack::DisableEffects
void DisableEffects(void)
Definition: mythscreenstack.h:37
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythScreenStack
Definition: mythscreenstack.h:16
MythScreenType
Screen in which all other widgets are contained and rendered.
Definition: mythscreentype.h:45
force
bool force
Definition: mythcommflag.cpp:70
MythScreenStack::m_children
QVector< MythScreenType * > m_children
Definition: mythscreenstack.h:56
MythScreenStack::m_drawOrder
QVector< MythScreenType * > m_drawOrder
Definition: mythscreenstack.h:57
MythScreenStack::m_toDelete
QVector< MythScreenType * > m_toDelete
Definition: mythscreenstack.h:67
MythPainter
Definition: mythpainter.h:34
mythchrono.h
MythScreenStack::AllowReInit
void AllowReInit(void)
Definition: mythscreenstack.h:34
mythuiexp.h
MythMainWindow
Definition: mythmainwindow.h:28