]> ToastFreeware Gitweb - toast/confclerk.git/blobdiff - src/mvc/delegate.h
Bump copyright years.
[toast/confclerk.git] / src / mvc / delegate.h
index b171e899b06179940c038c626c40fd1affc0dae6..83c591d85eda570b660441791e1d4bd14f8d43c1 100644 (file)
@@ -1,5 +1,6 @@
 /*
  * Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl
  *
  * This file is part of ConfClerk.
  *
 #ifndef DELEGATE_H
 #define DELEGATE_H
 
-#include <QItemDelegate>
-#include <QTreeView>
-#include <QPointer>
+#include "qglobal.h"
+#if QT_VERSION >= 0x050000
+#include <QtWidgets>
+#else
+#include <QtGui>
+#endif
 
 class Delegate : public QItemDelegate
 {
@@ -32,11 +36,11 @@ class Delegate : public QItemDelegate
         enum ControlId
         {
             ControlNone = 0,
-            FavouriteControlOn,
-            FavouriteControlOff,
+            FavouriteControlStrong,
+            FavouriteControlWeak,
+            FavouriteControlNo,
             AlarmControlOn,
             AlarmControlOff,
-            MapControl,
             WarningControl
         };
 
@@ -86,10 +90,10 @@ class Delegate : public QItemDelegate
         void defineControls();
         // TODO: the better place for these methods would be 'eventmodel'
         // they are used in 'paint' method and so it's better to obtain number of
-        // favourities/alarms once when the data has changed and not to call
+        // favourites/alarms once when the data has changed and not to call
         // these methods which iterate over all Events in corresponding group
         // every time it requires them
-        int numberOfFavourities(const QModelIndex &index) const;
+        int numberOfFavourites(const QModelIndex &index) const;
         int numberOfAlarms(const QModelIndex &index) const;
 
     private: