diff options
author | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-07 00:16:23 +0300 |
---|---|---|
committer | Trial97 <alexandru.tripon97@gmail.com> | 2023-06-07 00:16:23 +0300 |
commit | 1e702ee40f211286f85fa5353704e358e7fe14a9 (patch) | |
tree | 5985a07a23501dfc7a1ab55fc122c4a55d438244 /launcher/ui/pages/BasePage.h | |
parent | 3b9d822d728a311705caf0dbc4a17511e1f5b7c4 (diff) | |
download | PrismLauncher-1e702ee40f211286f85fa5353704e358e7fe14a9.tar.gz PrismLauncher-1e702ee40f211286f85fa5353704e358e7fe14a9.tar.bz2 PrismLauncher-1e702ee40f211286f85fa5353704e358e7fe14a9.zip |
Added dynamic page extra info
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
Diffstat (limited to 'launcher/ui/pages/BasePage.h')
-rw-r--r-- | launcher/ui/pages/BasePage.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/launcher/ui/pages/BasePage.h b/launcher/ui/pages/BasePage.h index ceb24040..5537c28f 100644 --- a/launcher/ui/pages/BasePage.h +++ b/launcher/ui/pages/BasePage.h @@ -35,15 +35,16 @@ #pragma once -#include <QString> #include <QIcon> +#include <QString> +#include <functional> #include <memory> #include "BasePageContainer.h" -class BasePage -{ -public: +class BasePage { + public: + using updateExtraInfoFunc = std::function<void(QString)>; virtual ~BasePage() {} virtual QString id() const = 0; virtual QString displayName() const = 0; @@ -63,17 +64,16 @@ public: } virtual void openedImpl() {} virtual void closedImpl() {} - virtual void setParentContainer(BasePageContainer * container) - { - m_container = container; - }; - virtual void retranslate() { } + virtual void setParentContainer(BasePageContainer* container) { m_container = container; }; + virtual void retranslate() {} -public: + public: int stackIndex = -1; int listIndex = -1; -protected: - BasePageContainer * m_container = nullptr; + updateExtraInfoFunc updateExtraInfo; + + protected: + BasePageContainer* m_container = nullptr; bool isOpened = false; }; |