diff options
Diffstat (limited to 'application/widgets')
-rw-r--r-- | application/widgets/PageContainer.cpp | 2 | ||||
-rw-r--r-- | application/widgets/PageContainer.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/application/widgets/PageContainer.cpp b/application/widgets/PageContainer.cpp index 24814d57..840b39d4 100644 --- a/application/widgets/PageContainer.cpp +++ b/application/widgets/PageContainer.cpp @@ -215,7 +215,7 @@ void PageContainer::currentChanged(const QModelIndex ¤t) showPage(current.isValid() ? m_proxyModel->mapToSource(current).row() : -1); } -bool PageContainer::requestClose(QCloseEvent *event) +bool PageContainer::prepareToClose() { for (auto page : m_model->pages()) { diff --git a/application/widgets/PageContainer.h b/application/widgets/PageContainer.h index 93971209..e7dc8b08 100644 --- a/application/widgets/PageContainer.h +++ b/application/widgets/PageContainer.h @@ -41,7 +41,11 @@ public: void addButtons(QWidget * buttons); void addButtons(QLayout * buttons); - bool requestClose(QCloseEvent *event); + /* + * Save any unsaved state and prepare to be closed. + * @return true if everything can be saved, false if there is something that requires attention + */ + bool prepareToClose(); virtual bool selectPage(QString pageId) override; |