Adjust shown event time when displayTimeShift is set.
[debian/confclerk.git] / src / mvc / delegate.cpp
index a3e64a7b3df4f0431e96dcde2ab7a68a210b512b..33b59c86d3c422277f07b0b7713ef40207a6ce06 100644 (file)
@@ -23,7 +23,9 @@
 
 #include <QDebug>
 #include <QPainter>
+#include <application.h>
 
+#include "conference.h"
 #include "room.h"
 
 const int SPACER = 10;
@@ -147,7 +149,8 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         painter->setPen(QPen(conflictSeverity != csNone ? Qt::black : textColor));
         QPointF titlePointF(option.rect.x() + SPACER,
                             option.rect.y() + SPACER + mControls[FavouriteControlStrong]->image()->height());
-        QTime start = event->start().time();
+        Conference& conference = ((Application*) qApp)->activeConference();
+        QTime start = conference.shiftTime(event->start().time());
         painter->setFont(fontBig);
         painter->drawText(titlePointF,start.toString("hh:mm") + "-" + start.addSecs(event->duration()).toString("hh:mm") + ", " + event->roomName());