blob: 5555fc79caf74a2dee7278f639554cf17e46a663 (
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
36
37
38
39
40
|
#include "GameOptionsPage.h"
#include "ui_GameOptionsPage.h"
#include "minecraft/MinecraftInstance.h"
#include "minecraft/gameoptions/GameOptions.h"
GameOptionsPage::GameOptionsPage(MinecraftInstance * inst, QWidget* parent)
: QWidget(parent), ui(new Ui::GameOptionsPage)
{
ui->setupUi(this);
ui->tabWidget->tabBar()->hide();
m_model = inst->gameOptionsModel();
ui->optionsView->setModel(m_model.get());
auto head = ui->optionsView->header();
if(head->count())
{
head->setSectionResizeMode(0, QHeaderView::ResizeToContents);
for(int i = 1; i < head->count(); i++)
{
head->setSectionResizeMode(i, QHeaderView::Stretch);
}
}
}
GameOptionsPage::~GameOptionsPage()
{
// m_model->save();
}
void GameOptionsPage::openedImpl()
{
// m_model->observe();
}
void GameOptionsPage::closedImpl()
{
// m_model->unobserve();
}
#include "GameOptionsPage.moc"
|