From a87e4d8c3c2102e9728dd5df303acca7ae08b343 Mon Sep 17 00:00:00 2001 From: Arno Date: Mon, 6 Dec 2010 19:10:19 +0100 Subject: Edit values in archive This commit introduces QInputDialogs for all values editable in the archive. Inline editing in the view doesn't seem the right choice regarding usability. Fixed a long standing bug in nextDvdNo(). That was off by one. Return one more than max(value). Also got rid of DvdNoDialog, replaced by a QInputDialog. --- filestreemodel.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'filestreemodel.h') diff --git a/filestreemodel.h b/filestreemodel.h index 5140478..7acca2c 100644 --- a/filestreemodel.h +++ b/filestreemodel.h @@ -29,6 +29,7 @@ class FilesTreeModel : public SmTreeModel { const QHash fileTypes() const { return mFileTypes; } const QHash coverTypes() const { return mCoverTypes; } const QString modeName(int mode = -1) const; + const QHash editableColumns() const { return mEditableColumns; } int mode() const { return mMode; } ~FilesTreeModel(); @@ -64,6 +65,7 @@ class FilesTreeModel : public SmTreeModel { QSqlQuery *mUpdateDvdQuery; QSqlQuery *mUpdateQualityQuery; QSqlQuery *mUpdatePartNoQuery; + QSqlQuery *mUpdateFileTypeQuery; QSqlQuery *mInsertFileQuery; QSqlQuery *mFilesQuery; QSqlQuery *mDeleteFileQuery; @@ -74,6 +76,7 @@ class FilesTreeModel : public SmTreeModel { QHash mCoverTypes; QHash mModeNames; QHash mPicsDurationCache; + QHash mEditableColumns; SeriesTreeModel *mSeriesModel; int mMode; const int mMagic; -- cgit v1.2.3-70-g09d2