diff options
author | Jan Dalheimer <jan@dalheimer.de> | 2014-07-12 23:02:52 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-07-12 23:31:06 +0200 |
commit | 4c0dc51110603cbe0e98228c703e26402094a3cc (patch) | |
tree | b056d601ba2494e046752e5c94e3049182293515 /gui/pagedialog | |
parent | 5c4384235989b16d6931cc0cfa26dd192af68b96 (diff) | |
download | MultiMC-4c0dc51110603cbe0e98228c703e26402094a3cc.tar MultiMC-4c0dc51110603cbe0e98228c703e26402094a3cc.tar.gz MultiMC-4c0dc51110603cbe0e98228c703e26402094a3cc.tar.lz MultiMC-4c0dc51110603cbe0e98228c703e26402094a3cc.tar.xz MultiMC-4c0dc51110603cbe0e98228c703e26402094a3cc.zip |
Finish of the OtherLogs page, and (re)format page related files
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: |