summaryrefslogtreecommitdiffstats
path: root/gui/pagedialog/PageDialog.cpp
diff options
context:
space:
mode:
authorJan Dalheimer <jan@dalheimer.de>2014-07-12 23:02:52 +0200
committerPetr Mrázek <peterix@gmail.com>2014-07-12 23:31:06 +0200
commit4c0dc51110603cbe0e98228c703e26402094a3cc (patch)
treeb056d601ba2494e046752e5c94e3049182293515 /gui/pagedialog/PageDialog.cpp
parent5c4384235989b16d6931cc0cfa26dd192af68b96 (diff)
downloadMultiMC-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/PageDialog.cpp')
-rw-r--r--gui/pagedialog/PageDialog.cpp30
1 files changed, 17 insertions, 13 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);