diff options
Diffstat (limited to 'archiveviewwidget.cpp')
-rw-r--r-- | archiveviewwidget.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/archiveviewwidget.cpp b/archiveviewwidget.cpp index 1bc7902..9be3a10 100644 --- a/archiveviewwidget.cpp +++ b/archiveviewwidget.cpp @@ -28,6 +28,7 @@ #include "coverarchiveeditor.h" #include "textenterdialog.h" #include "helper.h" +#include "moviepropertiesdialog.h" ArchiveViewWidget::ArchiveViewWidget(MovieModel *model, ListModel *genre, ListModel *actors, QWidget *parent) : QWidget(parent), mMovieModel(model), mGenreModel(genre), mActorsModel(actors){ //filter bar @@ -151,6 +152,18 @@ void ArchiveViewWidget::showMovie(const QModelIndex &movie){ QProcess::startDetached(playerPath, args); } +void ArchiveViewWidget::properties(){ + QModelIndexList selected = fileView()->selectionModel()->selectedRows(); + if(selected.isEmpty()){ + return; + } + QModelIndex idx = selected.at(0); + QModelIndex real = mProxy->mapToSource(idx); + int movid = real.data(MovieModel::IdRole).toInt(); + MoviePropertiesDialog dlg(movid, this); + dlg.exec(); +} + void ArchiveViewWidget::setFilter(){ QString filter = mName->text().toLower(); if(filter.isEmpty()){ |