From 8aae1eea458695a19a7ff36bdffbe59c9e7d4cf2 Mon Sep 17 00:00:00 2001 From: Arno Date: Thu, 8 Mar 2012 10:19:16 +0100 Subject: Make PictureViewer useful -Implement add and replace files -use QList (typedef'd) for shoveling data around -more code shuffling -new artwork --- pictureswidget.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'pictureswidget.h') diff --git a/pictureswidget.h b/pictureswidget.h index fd0b5ac..f473140 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -62,11 +62,14 @@ class PictureView : public QTreeView { explicit PictureView(QWidget *parent = 0); QList fileMappings() { return mFilesMappings; } PicFilesModel *filesModel() { return mModel; } + QSortFilterProxyModel *proxy() { return mProxy; } + void setPV(PictureViewer2 *pv) { mPV = pv; } public slots: void mappingChanged(int mapping); void deletePics(); void refresh(); + void setPVData(int replace = false); protected: virtual void hideEvent(QHideEvent *); @@ -87,6 +90,7 @@ class PictureView : public QTreeView { PicFilesModel *mModel; int mCursorOffset; QList mFilesMappings; + PictureViewer2 *mPV; }; class PicFilesModel : public SmTreeModel { @@ -102,6 +106,7 @@ class PicFilesModel : public SmTreeModel { //some data Qt::ItemFlags flags(const QModelIndex &) const { return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } QVariant data(const QModelIndex &index, int role) const; + QList dataList(const QModelIndex &idx) const; void removeFiles(const QList &files); bool changeMappings(const QList &fileIds, const QList &mappingIds); -- cgit v1.2.3-70-g09d2