diff options
author | Arno <am@disconnect.de> | 2012-03-03 06:36:22 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2012-03-03 06:36:22 +0100 |
commit | 5d1e566d275b47fa590fb9e9879b9a1f970fc3ba (patch) | |
tree | 5d1f2d6f68de9318f21bb1a6145944b833aa883e /pictureswidget.h | |
parent | 08861cc269ba6126ec7fa3bfad4f946fb60d3d98 (diff) | |
download | SheMov-5d1e566d275b47fa590fb9e9879b9a1f970fc3ba.tar.gz SheMov-5d1e566d275b47fa590fb9e9879b9a1f970fc3ba.tar.bz2 SheMov-5d1e566d275b47fa590fb9e9879b9a1f970fc3ba.zip |
Impement editing of picture mappings
Make it possible to edit picture mappings on archived pictures.
Diffstat (limited to 'pictureswidget.h')
-rw-r--r-- | pictureswidget.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pictureswidget.h b/pictureswidget.h index b8a7b40..8be7a24 100644 --- a/pictureswidget.h +++ b/pictureswidget.h @@ -16,6 +16,8 @@ class PictureView; class MappingTreeWidget; +class MappingEditWidget; +class MappingEditDialog; class QSqlQuery; class PicFilesModel; class QSortFilterProxyModel; @@ -31,10 +33,12 @@ class PicturesWidget : public QWidget { private slots: void setMappingColors(); + void editMappings(); private: MappingTreeWidget *mMappingTree; PictureView *mPictureView; + MappingEditDialog *mEditDialog; }; class PictureView : public QTreeView { @@ -42,6 +46,7 @@ class PictureView : public QTreeView { public: explicit PictureView(QWidget *parent = 0); QList<int> fileMappings() { return mFilesMappings; } + PicFilesModel *filesModel() { return mModel; } public slots: void mappingChanged(int mapping); @@ -57,6 +62,7 @@ class PictureView : public QTreeView { signals: void newFileMappigs(); + void editPicsMappings(); private: HoverWindow *mHoverWin; @@ -81,6 +87,7 @@ class PicFilesModel : public SmTreeModel { Qt::ItemFlags flags(const QModelIndex &) const { return Qt::ItemIsEnabled | Qt::ItemIsSelectable; } QVariant data(const QModelIndex &index, int role) const; void removeFiles(const QList<QPersistentModelIndex> &files); + bool changeMappings(const QList<int> &fileIds, const QList<int> &mappingIds); public slots: void populate(); @@ -90,6 +97,8 @@ class PicFilesModel : public SmTreeModel { QSqlQuery *mPopulateQ; QSqlQuery *mDeleteFileQ; QSqlQuery *mCurMappingIdsQ; + QSqlQuery *mDeleteMappingsQ; + QSqlQuery *mAddMappingsQ; QString mCurMappingIdsQS; int mMappingId; QList<int> mCurMappingsIds; |