summaryrefslogtreecommitdiffstats
path: root/helper.h
diff options
context:
space:
mode:
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