summaryrefslogtreecommitdiffstats
path: root/gui/pages/NotesPage.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-06-18 01:15:01 +0200
committerPetr Mrázek <peterix@gmail.com>2014-06-18 01:15:01 +0200
commitd911c9908c11c42144084c862c64b740cfb0c02f (patch)
tree974bafaf530afe4076850a21f91a1b4b911c32f1 /gui/pages/NotesPage.cpp
parent702e00e0593b03603690717646dac5e4fae504d3 (diff)
downloadMultiMC-d911c9908c11c42144084c862c64b740cfb0c02f.tar
MultiMC-d911c9908c11c42144084c862c64b740cfb0c02f.tar.gz
MultiMC-d911c9908c11c42144084c862c64b740cfb0c02f.tar.lz
MultiMC-d911c9908c11c42144084c862c64b740cfb0c02f.tar.xz
MultiMC-d911c9908c11c42144084c862c64b740cfb0c02f.zip
Replace notes dialog with a page.
Diffstat (limited to 'gui/pages/NotesPage.cpp')
-rw-r--r--gui/pages/NotesPage.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/gui/pages/NotesPage.cpp b/gui/pages/NotesPage.cpp
new file mode 100644
index 00000000..b4746a77
--- /dev/null
+++ b/gui/pages/NotesPage.cpp
@@ -0,0 +1,35 @@
+#include "NotesPage.h"
+#include "ui_NotesPage.h"
+
+QString NotesPage::displayName()
+{
+ return tr("Notes");
+}
+
+QIcon NotesPage::icon()
+{
+ return QIcon::fromTheme("news");
+}
+
+QString NotesPage::id()
+{
+ return "notes";
+}
+
+NotesPage::NotesPage(BaseInstance *inst, QWidget *parent)
+ : QWidget(parent), ui(new Ui::NotesPage), m_inst(inst)
+{
+ ui->setupUi(this);
+ ui->noteEditor->setText(m_inst->notes());
+}
+
+NotesPage::~NotesPage()
+{
+ delete ui;
+}
+
+bool NotesPage::apply()
+{
+ m_inst->setNotes(ui->noteEditor->toPlainText());
+ return true;
+}