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 
7 #include "mythuiexp.h"
8 
9 class QString;
10 
11 class MythScreenType;
12 class MythMainWindow;
13 class MythPainter;
14 
15 class MUI_PUBLIC MythScreenStack : public QObject
16 {
17  Q_OBJECT
18 
19  public:
20  MythScreenStack(MythMainWindow *parent, const QString &name,
21  bool main = false);
22  virtual ~MythScreenStack();
23 
24  virtual void AddScreen(MythScreenType *screen, bool allowFade = true);
25  virtual void PopScreen(MythScreenType *screen = nullptr, bool allowFade = true,
26  bool deleteScreen = true);
27 
28  virtual MythScreenType *GetTopScreen(void) const;
29 
30  void GetDrawOrder(QVector<MythScreenType *> &screens);
31  void GetScreenList(QVector<MythScreenType *> &screens);
32  void ScheduleInitIfNeeded(void);
33  void AllowReInit(void) { m_DoInit = true; }
34  int TotalScreens() const;
35 
36  void DisableEffects(void) { m_DoTransitions = false; }
37  void EnableEffects(void);
38 
39  QString GetLocation(bool fullPath) const;
40 
41  MythPainter *GetPainter(void);
42 
43  signals:
44  void topScreenChanged(MythScreenType *screen);
45 
46  private slots:
47  void doInit(void);
48 
49  protected:
50  virtual void RecalculateDrawOrder(void);
51  void DoNewFadeTransition();
52  void CheckNewFadeTransition();
53  void CheckDeletes(bool force = false);
54 
55  QVector<MythScreenType *> m_Children;
56  QVector<MythScreenType *> m_DrawOrder;
57 
58  MythScreenType *m_topScreen {nullptr};
59 
60  bool m_DoTransitions {false};
61  bool m_DoInit {false};
62  bool m_InitTimerStarted {false};
63  bool m_InNewTransition {false};
64  MythScreenType *m_newTop {nullptr};
65 
66  QVector<MythScreenType *> m_ToDelete;
67 };
68 
69 #endif
70 
QVector< MythScreenType * > m_ToDelete
unsigned int slots[4]
Definition: element.c:38
QVector< MythScreenType * > m_DrawOrder
void AllowReInit(void)
const char * name
Definition: ParseText.cpp:328
QVector< MythScreenType * > m_Children
#define MUI_PUBLIC
Definition: mythuiexp.h:9
void DisableEffects(void)
Screen in which all other widgets are contained and rendered.