From 8dc808a3bd6a8156db4f68e6faaaaae6a0534195 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 26 Jun 2010 17:16:12 +0200 Subject: Implemented playing a movie on doubleclick Movie files are played in the default player when double clicking on a movie, but not when doubleclicking on a series. The latter invokes the edit event on the series. Don't yet know if this is a good thing or not. Changes on the way there: 1. new helper function for finding the right player. Still need to fix FileSystemWidget to also use the Helper::function. It's a simple copy & paste from there. 2. added function SeriesTreeModel::findSortedMovies. It returns a QFileInfoList sorted by seriespart and fileno. --- seriestreemodel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'seriestreemodel.h') diff --git a/seriestreemodel.h b/seriestreemodel.h index 67be97c..81c6d6a 100644 --- a/seriestreemodel.h +++ b/seriestreemodel.h @@ -35,6 +35,7 @@ class SeriesTreeModel : public SmTreeModel { QModelIndex findValue(const QVariant &value, const QModelIndex &parent = QModelIndex(), int column = 0) const; QFileInfoList findFiles(const QModelIndex &where) const; QFileInfoList findMovies(const QModelIndexList &from) const; + QFileInfoList findSortedMovies(const QModelIndex &from) const; //delete bool deleteFromSeries(const QModelIndex &what); @@ -56,6 +57,7 @@ class SeriesTreeModel : public SmTreeModel { QSqlQuery *mSeriesInsertQuery; QSqlQuery *mSeriesFilesQuery; QSqlQuery *mSeriesPartFilesQuery; + QSqlQuery *mSortedMovieListQuery; }; #endif // SERIESTREEMODEL_H -- cgit v1.2.3-70-g09d2