From 4d78abefd76d7d828a4ac078b80e8891ddb975e6 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 3 Jun 2010 21:06:30 +0200 Subject: Started Treemodel for Archive Implemented generic SmTreeItem, started on generic SmTreeModel. --- smtreemodel.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 smtreemodel.cpp (limited to 'smtreemodel.cpp') diff --git a/smtreemodel.cpp b/smtreemodel.cpp new file mode 100644 index 0000000..60cc977 --- /dev/null +++ b/smtreemodel.cpp @@ -0,0 +1,18 @@ +/* + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either version + 2 of the License, or (at your option) any later version. +*/ + +#include "smtreemodel.h" +#include "smtreeitem.h" + +SmTreeModel::SmTreeModel(const QStringList &headers, QObject *parent) : QAbstractItemModel(parent), mRootItem(0){ + mHeaders = headers; + mRootItem = new SmTreeItem(headers.count()); +} + +SmTreeModel::~SmTreeModel(){ + delete mRootItem; +} -- cgit v1.2.3-70-g09d2