modified model-view
[toast/confclerk.git] / src / gui / mainwindow.cpp
index e0f20d4..b2f091c 100644 (file)
@@ -1,8 +1,10 @@
 #include "mainwindow.h"
 
 #include <QTreeView>
 #include "mainwindow.h"
 
 #include <QTreeView>
+#include <QDirModel>
 
 #include <eventmodel.h>
 
 #include <eventmodel.h>
+#include <delegate.h>
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
 
 MainWindow::MainWindow(QWidget *parent)
     : QMainWindow(parent)
@@ -12,8 +14,13 @@ MainWindow::MainWindow(QWidget *parent)
     db.setDatabaseName("fosdem-test.sqlite");
     db.open();
 
     db.setDatabaseName("fosdem-test.sqlite");
     db.open();
 
-    QTreeView * view = new QTreeView(parent);
-    this->setCentralWidget(view);
-
-    view->setModel(new EventModel());
+    setupUi(this);
+    //TODO Palo: continue
+    treeView->setHeaderHidden(true);
+    treeView->setRootIsDecorated(false);
+    treeView->setIndentation(0);
+    treeView->setAnimated(true);
+    treeView->setModel(new EventModel());
+    treeView->setItemDelegate(new Delegate(treeView));
 }
 }
+