From 153683e2e961b13c5e97e582563656851bce377c Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 22 Mar 2013 09:18:52 +0100 Subject: Show duration in statusBar Show total duration of selected Movies in FileView. Created a new class Helper::Duration for this and declared it as QMetaType. --- helper.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'helper.h') diff --git a/helper.h b/helper.h index a93406a..23ac261 100644 --- a/helper.h +++ b/helper.h @@ -12,6 +12,7 @@ #include #include #include +#include #include @@ -32,7 +33,23 @@ namespace Helper { const QString colorToHtml(const QColor &color); void centerWidget(QWidget *widget); QList duration(const QString &path); + class Duration { + public: + Duration(); + Duration(const QString &dur); + Duration operator+(const Duration &dur) const; + const QString toString() const; + bool isNull() const; + + private: + int mHours; + int mMinutes; + int mSeconds; + }; } + +Q_DECLARE_METATYPE(Helper::Duration) + #endif -- cgit v1.2.3-70-g09d2