diff options
Diffstat (limited to 'gui/pagedialog')
-rw-r--r-- | gui/pagedialog/PageDialog.cpp | 30 | ||||
-rw-r--r-- | gui/pagedialog/PageDialog.h | 5 |
2 files changed, 20 insertions, 15 deletions
diff --git a/gui/pagedialog/PageDialog.cpp b/gui/pagedialog/PageDialog.cpp index 4dd4a811..c0bcdf9f 100644 --- a/gui/pagedialog/PageDialog.cpp +++ b/gui/pagedialog/PageDialog.cpp @@ -14,18 +14,20 @@ */ #include "PageDialog.h" -#include "gui/Platform.h" -#include "MultiMC.h" -#include "logic/settings/SettingsObject.h" -#include <gui/widgets/IconLabel.h> -#include <gui/widgets/PageContainer.h> #include <QDialogButtonBox> #include <QPushButton> #include <QVBoxLayout> -#include <QtGui/QKeyEvent> +#include <QKeyEvent> + +#include "MultiMC.h" +#include "logic/settings/SettingsObject.h" +#include "gui/Platform.h" +#include "gui/widgets/IconLabel.h" +#include "gui/widgets/PageContainer.h" -PageDialog::PageDialog(BasePageProviderPtr pageProvider, QString defaultId, QWidget *parent) : QDialog(parent) +PageDialog::PageDialog(BasePageProviderPtr pageProvider, QString defaultId, QWidget *parent) + : QDialog(parent) { MultiMCPlatform::fixWM_CLASS(this); setWindowTitle(pageProvider->dialogTitle()); @@ -34,23 +36,25 @@ PageDialog::PageDialog(BasePageProviderPtr pageProvider, QString defaultId, QWid QVBoxLayout *mainLayout = new QVBoxLayout; mainLayout->addWidget(m_container); mainLayout->setSpacing(0); - mainLayout->setContentsMargins(0,0,0,0); + mainLayout->setContentsMargins(0, 0, 0, 0); setLayout(mainLayout); - + QDialogButtonBox *buttons = new QDialogButtonBox(QDialogButtonBox::Help | QDialogButtonBox::Close); buttons->button(QDialogButtonBox::Close)->setDefault(true); m_container->addButtons(buttons); connect(buttons->button(QDialogButtonBox::Close), SIGNAL(clicked()), this, SLOT(close())); - connect(buttons->button(QDialogButtonBox::Help), SIGNAL(clicked()), m_container, SLOT(help())); + connect(buttons->button(QDialogButtonBox::Help), SIGNAL(clicked()), m_container, + SLOT(help())); - restoreGeometry(QByteArray::fromBase64(MMC->settings()->get("PagedGeometry").toByteArray())); + restoreGeometry( + QByteArray::fromBase64(MMC->settings()->get("PagedGeometry").toByteArray())); } -void PageDialog::closeEvent(QCloseEvent * event) +void PageDialog::closeEvent(QCloseEvent *event) { - if(m_container->requestClose(event)) + if (m_container->requestClose(event)) { MMC->settings()->set("PagedGeometry", saveGeometry().toBase64()); QDialog::closeEvent(event); diff --git a/gui/pagedialog/PageDialog.h b/gui/pagedialog/PageDialog.h index 097eac64..19d1b01f 100644 --- a/gui/pagedialog/PageDialog.h +++ b/gui/pagedialog/PageDialog.h @@ -14,8 +14,9 @@ */ #pragma once + #include <QDialog> -#include <gui/pages/BasePageProvider.h> +#include "gui/pages/BasePageProvider.h" class PageContainer; class PageDialog : public QDialog @@ -24,7 +25,7 @@ class PageDialog : public QDialog public: explicit PageDialog(BasePageProviderPtr pageProvider, QString defaultId = QString(), QWidget *parent = 0); - virtual ~PageDialog() {}; + virtual ~PageDialog() {} private slots: |