From 00893b3cfc68f12c09e84643d255044a488b0eb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 22 Jan 2013 05:56:12 +0100 Subject: Instance model (or at least something like it) --- gui/mainwindow.cpp | 5 +++-- gui/mainwindow.h | 4 ++-- gui/mainwindow.ui | 30 +++++++++++++++++++++++++++--- 3 files changed, 32 insertions(+), 7 deletions(-) (limited to 'gui') diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 8f7372c8..87a1dcc0 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -26,7 +26,8 @@ MainWindow::MainWindow(QWidget *parent) : ui(new Ui::MainWindow) { ui->setupUi(this); - instList.loadInstances("instances"); + instList.initialLoad("instances"); + ui->instanceView->setModel(&instList); } MainWindow::~MainWindow() @@ -46,7 +47,7 @@ void MainWindow::on_actionViewInstanceFolder_triggered() void MainWindow::on_actionRefresh_triggered() { - instList.loadInstances("instances"); + instList.initialLoad("instances"); } void MainWindow::on_actionViewCentralModsFolder_triggered() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 09cd0817..77245531 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -18,7 +18,7 @@ #include -#include "../data/instancelist.h" +#include "../data/instancemodel.h" namespace Ui { @@ -55,7 +55,7 @@ private slots: private: Ui::MainWindow *ui; - InstanceList instList; + InstanceModel instList; }; #endif // MAINWINDOW_H diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui index 0ef98d0e..ccc7e777 100644 --- a/gui/mainwindow.ui +++ b/gui/mainwindow.ui @@ -6,14 +6,38 @@ 0 0 - 600 - 400 + 739 + 657 MultiMC 5 - + + + + 0 + + + QLayout::SetDefaultConstraint + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + false -- cgit v1.2.3