diff options
author | Arno <am@disconnect.de> | 2010-07-02 16:28:02 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-07-02 16:28:02 +0200 |
commit | 8c6051a16b12f265d7a30b4b24da10b3ba63edae (patch) | |
tree | 4dd81ab3533b55654247c9a2e1583e88cde1b780 /smtreemodel.h | |
parent | eed880078be57296517535f9c06e279f722b4ec3 (diff) | |
download | SheMov-8c6051a16b12f265d7a30b4b24da10b3ba63edae.tar.gz SheMov-8c6051a16b12f265d7a30b4b24da10b3ba63edae.tar.bz2 SheMov-8c6051a16b12f265d7a30b4b24da10b3ba63edae.zip |
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
Diffstat (limited to 'smtreemodel.h')
-rw-r--r-- | smtreemodel.h | 2 |
1 files changed, 2 insertions, 0 deletions
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); |