]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/mvc/eventmodel.cpp
Bump copyright years.
[toast/confclerk.git] / src / mvc / eventmodel.cpp
index 406a095644ea4087de19ac3b930b05c7d0cac4d2..a140efdac496ed00bac06368825351e757164aa2 100644 (file)
@@ -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.
  *
@@ -21,6 +21,7 @@
 #include "conference.h"
 #include "track.h"
 #include "room.h"
+#include "application.h"
 
 const QString EventModel::COMMA_SEPARATOR = ", ";
 
@@ -34,7 +35,10 @@ void EventModel::Group::setTitle(const QList<Event>& mEvents) {
     for (int i = mFirstEventIndex; i != mFirstEventIndex + mChildCount; ++i) {
         endTime = qMax(mEvents.at(i).start().addSecs(mEvents.at(i).duration()), endTime);
     }
-    mTitle = QString("%1 - %2").arg(startTime.toString("HH:mm")).arg(endTime.toString("HH:mm"));
+    Conference& conference = ((Application*) qApp)->activeConference();
+    QTime s = conference.shiftTime(startTime.time());
+    QTime e = conference.shiftTime(endTime.time());
+    mTitle = QString("%1 - %2").arg(s.toString("HH:mm")).arg(e.toString("HH:mm"));
 }
 
 
@@ -176,7 +180,7 @@ QModelIndex EventModel::index(int row, int column, const QModelIndex& parent) co
 
     if (!parent.isValid())
     {
-        return createIndex(row, column, (quintptr) 0);
+        return createIndex(row, column);
     }
     else if (parent.internalId() == 0)
     {
@@ -201,7 +205,7 @@ QModelIndex EventModel::parent(const QModelIndex & index) const
 
         Event * event = static_cast<Event*>(index.internalPointer());
 
-        return createIndex(mParents[event->id()], 0, (quintptr) 0);
+        return createIndex(mParents[event->id()], 0);
     }
 
     return QModelIndex();