diff options
Diffstat (limited to 'application/pages/BasePage.h')
-rw-r--r-- | application/pages/BasePage.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/application/pages/BasePage.h b/application/pages/BasePage.h index 63a26239..d4547770 100644 --- a/application/pages/BasePage.h +++ b/application/pages/BasePage.h @@ -31,8 +31,18 @@ public: virtual bool apply() { return true; } virtual bool shouldDisplay() const { return true; } virtual QString helpPage() const { return QString(); } - virtual void opened() {} - virtual void closed() {} + void opened() + { + isOpened = true; + openedImpl(); + } + void closed() + { + isOpened = false; + closedImpl(); + } + virtual void openedImpl() {} + virtual void closedImpl() {} virtual void setParentContainer(BasePageContainer * container) { m_container = container; @@ -42,6 +52,7 @@ public: int listIndex = -1; protected: BasePageContainer * m_container = nullptr; + bool isOpened = false; }; typedef std::shared_ptr<BasePage> BasePagePtr; |