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  ~MythScreenStack() override;
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  static MythPainter *GetPainter(void);
42 
43  signals:
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 
force
bool force
Definition: mythtv/programs/mythcommflag/main.cpp:75
bbciplayer.main
main
Definition: bbciplayer.py:263
MythScreenStack::DisableEffects
void DisableEffects(void)
Definition: mythscreenstack.h:36
slots
std::array< unsigned int, 4 > slots
Definition: element.cpp:38
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
MythScreenStack::m_children
QVector< MythScreenType * > m_children
Definition: mythscreenstack.h:55
MythScreenStack::m_drawOrder
QVector< MythScreenType * > m_drawOrder
Definition: mythscreenstack.h:56
MythScreenStack::topScreenChanged
void topScreenChanged(MythScreenType *screen)
MythScreenStack::m_toDelete
QVector< MythScreenType * > m_toDelete
Definition: mythscreenstack.h:66
MythPainter
Definition: mythpainter.h:33
MythScreenStack::AllowReInit
void AllowReInit(void)
Definition: mythscreenstack.h:33
mythuiexp.h
MythMainWindow
Definition: mythmainwindow.h:33