X-Git-Url: https://git.toastfreeware.priv.at/toast/confclerk.git/blobdiff_plain/11f3f87d393db53a8e455128afb5ccc0f6e02292..080dc7d603d45ba0662aa731418993ddd45b5fe8:/src/mvc/conference.h diff --git a/src/mvc/conference.h b/src/mvc/conference.h index f6817cc..51b2bd9 100644 --- a/src/mvc/conference.h +++ b/src/mvc/conference.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2010 Ixonos Plc. - * Copyright (C) 2011-2014 Philipp Spitzer, gregor herrmann, Stefan Stahl + * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl * * This file is part of ConfClerk. * @@ -51,6 +51,12 @@ public: int dayChange() const { return value("day_change").toInt(); } // in seconds from 00:00 QTime dayChangeTime() const {QTime dayChangeTime(0, 0); return dayChangeTime.addSecs(dayChange());} int timeslotDuration() const { return value("timeslot_duration").toInt(); } // in seconds + bool hasUtcOffset() const {return !value("utc_offset").isNull();} + int utcOffset() const {return value("utc_offset").toInt();} + bool hasDisplayTimeShift() const {return !value("display_time_shift").isNull();} + int displayTimeShift() const {return value("display_time_shift").toInt();} + void setDisplayTimeShift(int newValue) {setValue("display_time_shift", newValue); update("display_time_shift");} + bool isActive() const { return value("active").toBool(); } QString url() const { return stringFromNullable(value("url")); } @@ -60,6 +66,9 @@ public: update("url"); } + /// Returns a QTime that is shifted by displayTimeShift minutes + QTime shiftTime(const QTime& value) const; + private: static QString stringFromNullable(const QVariant& v) {