diff options
author | Arno <am@disconnect.de> | 2010-08-13 17:06:00 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-08-13 17:06:00 +0200 |
commit | 831a1031b14f4899905e54dd94fdff5d263eb609 (patch) | |
tree | 3273211da6929dc2db3ffacc84d1b9cc7504753f /filestreewidget.cpp | |
parent | a8fc46f186911ba4ab79231f24e6e4f940eb7cde (diff) | |
download | SheMov-831a1031b14f4899905e54dd94fdff5d263eb609.tar.gz SheMov-831a1031b14f4899905e54dd94fdff5d263eb609.tar.bz2 SheMov-831a1031b14f4899905e54dd94fdff5d263eb609.zip |
Implemented editing of file part numbers
Added the possibility to edit file part numbers via context menu in
FilesTreeWidget. This action triggers the edit event on the specific
QModelIndex.
Diffstat (limited to 'filestreewidget.cpp')
-rw-r--r-- | filestreewidget.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/filestreewidget.cpp b/filestreewidget.cpp index 2b28c93..4542ea8 100644 --- a/filestreewidget.cpp +++ b/filestreewidget.cpp @@ -200,6 +200,14 @@ void FilesTreeWidget::editQuality(){ } } +void FilesTreeWidget::editPart(){ + QModelIndex current = mView->selectionModel()->currentIndex(); + if(current.isValid()){ + QModelIndex qualityIndex = mView->model()->index(current.row(), FilesTreeModel::PartNo, current.parent()); + mView->edit(qualityIndex); + } +} + void FilesTreeWidget::fileSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous){ Q_UNUSED(previous); int seriesPartId = current.data(FilesTreeModel::SeriesPartIdRole).toInt(); |