summaryrefslogtreecommitdiffstats
path: root/gui/pages/NotesPage.cpp
blob: b4746a77fd060cba4d86a08edbd843aa6c78bc5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}