summaryrefslogtreecommitdiffstats
path: root/randomtab.cpp
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2016-11-11 10:44:09 +0100
committerArno <arno@disconnect.de>2016-11-11 10:44:09 +0100
commit7c6deee2325d83f711fd28767467865da7cda848 (patch)
tree6e5bdff5d2d9c981e819cf862cfd7a2ada1b1f17 /randomtab.cpp
parent57c8d4751f2a6e4ab0cd675c269cd950e4f270be (diff)
downloadSheMov-7c6deee2325d83f711fd28767467865da7cda848.tar.gz
SheMov-7c6deee2325d83f711fd28767467865da7cda848.tar.bz2
SheMov-7c6deee2325d83f711fd28767467865da7cda848.zip
Play movie on doublelClick in RandomTab
Diffstat (limited to 'randomtab.cpp')
-rw-r--r--randomtab.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/randomtab.cpp b/randomtab.cpp
index 7b0dd59..291dcd7 100644
--- a/randomtab.cpp
+++ b/randomtab.cpp
@@ -132,6 +132,7 @@ void RandomTab::setupGui(){
mFileView->setRootIsDecorated(false);
mFileView->setSelectionMode(QAbstractItemView::ExtendedSelection);
mFileView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ connect(mFileView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(playDoubleclicked(QModelIndex)));
mFileModel = new QStandardItemModel;
mFileProxy = new QSortFilterProxyModel;
mFileProxy->setSourceModel(mFileModel);
@@ -452,6 +453,14 @@ void RandomTab::playSelected(){
play(files);
}
+void RandomTab::playDoubleclicked(QModelIndex idx){
+ QString fp = idx.sibling(0, FullPath).data().toString();
+ logMessage(QString(tr("Doubleclick on %1")).arg(fp));
+ QStringList f = QStringList() << fp;
+ play(f);
+
+}
+
void RandomTab::play(const QStringList &files){
QPair<QString, QStringList> pgdata = Helper::programData("movieviewer");
QString program = pgdata.first;