From b039fbf6aaef0e961490f8267a91976866ac2e0a Mon Sep 17 00:00:00 2001 From: Arno Date: Sat, 6 Jul 2013 19:24:04 +0200 Subject: Lots of Display Changes * Save header states * Implement delegates for columns * unify size and duration to 1 column * colorize View ... and lots of other things I forgot :) --- helper.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'helper.cpp') diff --git a/helper.cpp b/helper.cpp index 07a66c0..ae5eb36 100644 --- a/helper.cpp +++ b/helper.cpp @@ -246,6 +246,19 @@ namespace Helper { Duration::Duration() : mHours(0), mMinutes(0), mSeconds(0) {} + Duration::Duration(qint64 seconds){ + int sec(0), min(0), h(0); + // get hours + h = (seconds / 60 / 60) % 24; + // remaining minutes + min = (seconds / 60) % 60; + // seconds + sec = seconds % 60; + mHours = h; + mMinutes = min; + mSeconds = sec; + } + Duration::Duration(const QString &dur) : mHours(0), mMinutes(0), mSeconds(0){ QStringList parts = dur.split(':'); if(parts.size() == 3){ -- cgit v1.2.3-70-g09d2