summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2013-01-22 05:56:12 +0100
committerPetr Mrázek <peterix@gmail.com>2013-01-22 05:56:12 +0100
commit00893b3cfc68f12c09e84643d255044a488b0eb6 (patch)
tree229762a1cc56827b7bbfedd237dbf5c3bd57808c /gui
parentf33ab9beb17bd11cb55951cb04d24cef34f6dec0 (diff)
downloadMultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar
MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.gz
MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.lz
MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.tar.xz
MultiMC-00893b3cfc68f12c09e84643d255044a488b0eb6.zip
Instance model (or at least something like it)
Diffstat (limited to 'gui')
-rw-r--r--gui/mainwindow.cpp5
-rw-r--r--gui/mainwindow.h4
-rw-r--r--gui/mainwindow.ui30
3 files changed, 32 insertions, 7 deletions
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 <QMainWindow>
-#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 @@
<rect>
<x>0</x>
<y>0</y>
- <width>600</width>
- <height>400</height>
+ <width>739</width>
+ <height>657</height>
</rect>
</property>
<property name="windowTitle">
<string>MultiMC 5</string>
</property>
- <widget class="QWidget" name="centralWidget"/>
+ <widget class="QWidget" name="centralWidget">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <property name="spacing">
+ <number>0</number>
+ </property>
+ <property name="sizeConstraint">
+ <enum>QLayout::SetDefaultConstraint</enum>
+ </property>
+ <property name="leftMargin">
+ <number>0</number>
+ </property>
+ <property name="topMargin">
+ <number>0</number>
+ </property>
+ <property name="rightMargin">
+ <number>0</number>
+ </property>
+ <property name="bottomMargin">
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QTreeView" name="instanceView"/>
+ </item>
+ </layout>
+ </widget>
<widget class="QToolBar" name="mainToolBar">
<property name="movable">
<bool>false</bool>