From 286d54a4705e56567a68cf6dabfa3ce64ac162d6 Mon Sep 17 00:00:00 2001 From: am Date: Sat, 1 Aug 2009 13:23:42 +0000 Subject: -finished properties dialog -start mplayer detached from FileSystemWidget git-svn-id: file:///var/svn/repos2/shemov/trunk@397 f440f766-f032-0410-8965-dc7d17de2ca0 --- archiveviewwidget.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'archiveviewwidget.cpp') 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()){ -- cgit v1.2.3-70-g09d2