]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/mvc/delegate.cpp
Map button/compass icon added
[toast/confclerk.git] / src / mvc / delegate.cpp
index 95ab7b1b41968d9d1e2f93c8fc5edf03f13532b0..c6174bf294f7a4672f2414f9d9089002d9d4ee94 100644 (file)
@@ -85,6 +85,7 @@ void Delegate::paint(QPainter *painter, const QStyleOptionViewItem &option, cons
         // draw Controls
         painter->drawImage(mControls[FavouriteControl]->drawPoint(option.rect),*mControls[FavouriteControl]->image());
         painter->drawImage(mControls[AlarmControl]->drawPoint(option.rect),*mControls[AlarmControl]->image());
+        painter->drawImage(mControls[MapControl]->drawPoint(option.rect),*mControls[MapControl]->image());
     }
     else // doesn't have parent - time-groups' elements (top items)
     {
@@ -208,6 +209,12 @@ void Delegate::defineControls()
     control = new Control(AlarmControl,QString(":icons/alarm-on.png"));
     control->setDrawPoint(QPoint(-mControls[FavouriteControl]->image()->width()-control->image()->width()-2*SPACER,SPACER));
     mControls.insert(AlarmControl,control);
+
+    // MAP ICON
+    control = new Control(MapControl,QString(":icons/compass.png"));
+    control->setDrawPoint(QPoint(-mControls[AlarmControl]->image()->width()-control->image()->width()
+                                 -mControls[FavouriteControl]->image()->width()-3*SPACER,SPACER));
+    mControls.insert(MapControl,control);
 }
 
 bool Delegate::isPointFromRect(const QPoint &aPoint, const QRect &aRect) const