From 0afebd0e3cb3da831cd5ffba1eefbe9e61e408a1 Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 27 Jul 2013 03:59:47 +0200 Subject: Read JSON from ffprobe Use JSON output from ffprobe instead of string parsing to get some kind of type safety. For doing that, some changes were needed in FileView: Use delegates for displaying Duration and Bitrate instead of mangling output in Qt::Displayrole. To reuse code, move all delegates from the new Archive to a separate file. And, of course, the initial objective: Show the accumulated size and duration of selected files in the status bar from the experimental archive. --- archivecontroller.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'archivecontroller.h') diff --git a/archivecontroller.h b/archivecontroller.h index 750b017..4f24973 100644 --- a/archivecontroller.h +++ b/archivecontroller.h @@ -45,6 +45,7 @@ class ArchiveController : public QObject { public slots: void treeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); + void fileSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); void playSelectedFiles(); void editQuality(); void editDvdNo(); @@ -56,6 +57,10 @@ class ArchiveController : public QObject { private slots: void fileDoubleClicked(const QModelIndex &idx); + signals: + void sizeChanged(qint64 newSize); + void durationChanged(qint64 newDuration, bool maybeMore); + private: QModelIndexList mapToSource(const QSortFilterProxyModel *proxy, const QModelIndexList idxs) const; ArchiveView *mArchiveView; -- cgit v1.2.3-70-g09d2