From 8c6051a16b12f265d7a30b4b24da10b3ba63edae Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 2 Jul 2010 16:28:02 +0200 Subject: Started NewMovieWizard for adding movies Finished GUI for first page of NewMovieWizard. To make things easier I added two new member functions to SmTreeModel: -QModelIndex find() to find items by value of a column -void reparent() to remove an item from one parent and add it to another --- smtreemodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'smtreemodel.h') diff --git a/smtreemodel.h b/smtreemodel.h index ae3b5ce..6d89fb2 100644 --- a/smtreemodel.h +++ b/smtreemodel.h @@ -33,11 +33,13 @@ class SmTreeModel : public QAbstractItemModel { bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role); virtual QVariant data(const QModelIndex &index, int role) const; virtual bool setData(const QModelIndex &index, const QVariant &value, int role); + virtual QModelIndex find(const QVariant &value, int column = 0, const QModelIndex &parent = QModelIndex()) const; // root + parent item bool setRoot(SmTreeItem *rootItem); SmTreeItem *root() const { return mRootItem; } SmTreeItem *parentItem(const QModelIndex &child) const; + void reparent(const QModelIndex &idx, const QModelIndex &newParent); // row manipulation bool insertRows(int row, int count, const QModelIndex &parent); -- cgit v1.2.3-70-g09d2