From 9dc2528dfdb04f18641602cfd24c09cb9b119107 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 8 Jul 2013 22:09:36 +0200 Subject: Make new archive work Well, this is a huge commit. Should be severals, but who knew... First and foremost feature: Make NewMovieWizard work with the experimental model. This change obsoleted a lot of code. Also, the old archive won't work with with the new Wizward... There are most probably many other features I forgot about. --- smtreemodel.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'smtreemodel.cpp') diff --git a/smtreemodel.cpp b/smtreemodel.cpp index 4f8ffdc..6abc999 100644 --- a/smtreemodel.cpp +++ b/smtreemodel.cpp @@ -272,6 +272,15 @@ bool SmTreeModel::addRow(const QList &data, const QModelIndex &parent, return false; } +bool SmTreeModel::appendRow(const QList &data, const QModelIndex &parent){ + SmTreeItem *pItem = itemAt(parent); + SmTreeItem *newItem = new SmTreeItem(data, pItem); + beginResetModel(); + pItem->appendChild(newItem); + endResetModel(); + return true; +} + SmTreeItem *SmTreeModel::itemAt(const QModelIndex &index) const{ if(index.isValid()){ SmTreeItem *item = static_cast(index.internalPointer()); -- cgit v1.2.3-70-g09d2