/*
* Copyright (C) 2010 Ixonos Plc.
+ * Copyright (C) 2011-2024 Philipp Spitzer, gregor herrmann, Stefan Stahl
*
- * This file is part of fosdem-schedule.
+ * This file is part of ConfClerk.
*
- * fosdem-schedule is free software: you can redistribute it and/or modify it
+ * ConfClerk is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation, either version 2 of the License, or (at your option)
* any later version.
*
- * fosdem-schedule is distributed in the hope that it will be useful, but
+ * ConfClerk is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
- * fosdem-schedule. If not, see <http://www.gnu.org/licenses/>.
+ * ConfClerk. If not, see <http://www.gnu.org/licenses/>.
*/
#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
{
enum ControlId
{
ControlNone = 0,
- FavouriteControlOn,
- FavouriteControlOff,
+ FavouriteControlStrong,
+ FavouriteControlWeak,
+ FavouriteControlNo,
AlarmControlOn,
AlarmControlOff,
- MapControl,
WarningControl
};
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: