summaryrefslogtreecommitdiffstats
path: root/helper.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-03-22 09:18:52 +0100
committerArno <am@disconnect.de>2013-03-22 09:18:52 +0100
commit153683e2e961b13c5e97e582563656851bce377c (patch)
tree5efd902813f059dfb76548f96e77558c58930d98 /helper.h
parent50b34092a45990000ba73409abd75377816b70e6 (diff)
downloadSheMov-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.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/helper.h b/helper.h
index a93406a..23ac261 100644
--- a/helper.h
+++ b/helper.h
@@ -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