diff options
author | Arno <am@disconnect.de> | 2013-03-22 09:18:52 +0100 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-03-22 09:18:52 +0100 |
commit | 153683e2e961b13c5e97e582563656851bce377c (patch) | |
tree | 5efd902813f059dfb76548f96e77558c58930d98 /helper.h | |
parent | 50b34092a45990000ba73409abd75377816b70e6 (diff) | |
download | SheMov-153683e2e961b13c5e97e582563656851bce377c.tar.gz SheMov-153683e2e961b13c5e97e582563656851bce377c.tar.bz2 SheMov-153683e2e961b13c5e97e582563656851bce377c.zip |
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.
Diffstat (limited to 'helper.h')
-rw-r--r-- | helper.h | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -12,6 +12,7 @@ #include <QStringList> #include <QVariant> #include <QList> +#include <QMetaType> #include <magic.h> @@ -32,7 +33,23 @@ namespace Helper { const QString colorToHtml(const QColor &color); void centerWidget(QWidget *widget); QList<QVariant> 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 |