diff options
author | Arno <am@disconnect.de> | 2010-08-07 20:19:58 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2010-08-07 20:19:58 +0200 |
commit | 3af9f3f8b900b9dd5e09300e74d6ce49018be98e (patch) | |
tree | fa9012bd0ccaf0e540bdb2b2562e6deddbb72bf0 /filestreewidget.cpp | |
parent | 40cedb64e32383f488000f89c2084c2bda98310f (diff) | |
download | SheMov-3af9f3f8b900b9dd5e09300e74d6ce49018be98e.tar.gz SheMov-3af9f3f8b900b9dd5e09300e74d6ce49018be98e.tar.bz2 SheMov-3af9f3f8b900b9dd5e09300e74d6ce49018be98e.zip |
Fix doubleclick in FilesTreeWidget
Doubleclicking the DvdNo in FilesWidget did
1. play the movie
2. create an editor event in the widget
Now doubleclicking only starts the default player. The quality can be
edited via context menu.
Diffstat (limited to 'filestreewidget.cpp')
-rw-r--r-- | filestreewidget.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/filestreewidget.cpp b/filestreewidget.cpp index 765fc44..c00456d 100644 --- a/filestreewidget.cpp +++ b/filestreewidget.cpp @@ -34,6 +34,7 @@ FilesTreeWidget::FilesTreeWidget(QWidget *parent) : QWidget(parent), mSelectedSi //the view mView = new FilesTreeView; mView->setSelectionMode(QAbstractItemView::ExtendedSelection); + mView->setEditTriggers(QAbstractItemView::NoEditTriggers); mModel = static_cast<FilesTreeModel*>(SmGlobals::instance()->model("FilesModel")); mProxy = new FilesTreeSortModel(this); mProxy->setSourceModel(mModel); @@ -191,6 +192,14 @@ void FilesTreeWidget::fileProperties(){ } +void FilesTreeWidget::editQuality(){ + QModelIndex current = mView->selectionModel()->currentIndex(); + if(current.isValid()){ + QModelIndex qualityIndex = mView->model()->index(current.row(), FilesTreeModel::Quality, current.parent()); + mView->edit(qualityIndex); + } +} + void FilesTreeWidget::fileSelectionChanged(const QModelIndex ¤t, const QModelIndex &previous){ Q_UNUSED(previous); int seriesPartId = current.data(FilesTreeModel::SeriesPartIdRole).toInt(); |