summaryrefslogtreecommitdiffstats
path: root/archiveview.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-07-06 08:06:52 +0200
committerArno <am@disconnect.de>2013-07-06 08:06:52 +0200
commitbd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10 (patch)
treeb4a3cf4db50c84c08419562484e9016b7d4af5f6 /archiveview.h
parent04d9dcbe2139109e00d07488f6e45d0353a676e2 (diff)
downloadSheMov-bd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10.tar.gz
SheMov-bd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10.tar.bz2
SheMov-bd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10.zip
Basic ArchiveFilesModel and ArchiveController
Implement a new file model for the archive. It's quite basic at this stage, but finally something happens when clicking the archive tree. Also, implement the interaction (signal -> slot) between the views and models in an explicit controller to prevent the mess from the old archive.
Diffstat (limited to 'archiveview.h')
-rw-r--r--archiveview.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/archiveview.h b/archiveview.h
index 27bae35..de9875d 100644
--- a/archiveview.h
+++ b/archiveview.h
@@ -24,7 +24,8 @@ class QSortFilterProxyModel;
class ArchiveTree;
class ArchiveFiles;
class ArchiveProxy;
-class ArchiveProgressDialog;
+class ArchiveFilesProxy;
+class ArchiveController;
class ArchiveView : public QWidget {
Q_OBJECT
@@ -48,15 +49,17 @@ class ArchiveView : public QWidget {
void collapseItem(const QModelIndex &idx);
private:
+ void initController();
QComboBox *mSortOrder;
QLineEdit *mFilter;
ArchiveTree *mTree;
ArchiveFiles *mFiles;
ArchiveModel *mArchiveModel;
+ ArchiveFilesModel *mFilesModel;
ArchiveProxy *mProxy;
- ArchiveProgressDialog *mProgress;
+ ArchiveFilesProxy *mFilesProxy;
QHash<int, QVariantList> mExpandedItems;
- bool mConstructing;
+ ArchiveController *mController;
};
class ArchiveTree : public SmTreeView {
@@ -96,4 +99,10 @@ class ArchiveProxy : public QSortFilterProxyModel {
int mSortOrder;
};
+class ArchiveFilesProxy : public QSortFilterProxyModel {
+ Q_OBJECT
+ public:
+ explicit ArchiveFilesProxy(QObject *parent = 0);
+};
+
#endif // ARCHIVEVIEW_H