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
9
10class QString;
11
12class MythScreenType;
13class MythMainWindow;
14class MythPainter;
15
16class 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:
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
void DisableEffects(void)
QVector< MythScreenType * > m_drawOrder
QVector< MythScreenType * > m_children
void topScreenChanged(MythScreenType *screen)
void AllowReInit(void)
QVector< MythScreenType * > m_toDelete
Screen in which all other widgets are contained and rendered.
bool force
#define MUI_PUBLIC
Definition: mythuiexp.h:9