summaryrefslogtreecommitdiffstats
path: root/helper.cpp
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2013-07-06 19:24:04 +0200
committerArno <am@disconnect.de>2013-07-06 19:24:04 +0200
commitb039fbf6aaef0e961490f8267a91976866ac2e0a (patch)
tree270fbd374dbb0d2cc524ba24328da537f30213a7 /helper.cpp
parentbd6a6a7c42dabe2d0d86e309a6dc6b04de7c0a10 (diff)
downloadSheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.tar.gz
SheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.tar.bz2
SheMov-b039fbf6aaef0e961490f8267a91976866ac2e0a.zip
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 :)
Diffstat (limited to 'helper.cpp')
-rw-r--r--helper.cpp13
1 files changed, 13 insertions, 0 deletions
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){