/**************************************************************************
- KitchenAlert v.0.019
+ KitchenAlert
Copyright (C) 2010 Heli Hyvättinen
- This program is free software: you can redistribute it and/or modify
+ This file is part of KitchenAlert.
+
+ Kitchen Alert 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 3 of the License, or
(at your option) any later version.
#define CURRENTALERTSTABLEMODEL_H
#include <QAbstractTableModel>
+#include <QMainWindow>
#include "timer.h"
+
+/*! Class that contains the model that holds the timers'
+
+ @author Heli Hyvättinen
+ @date 2010-08-08
+ @version 0.1.1
+
+Class that contains the model that holds the timers
+
+*/
+
+
class CurrentAlertsTableModel : public QAbstractTableModel
{
Q_OBJECT
QVariant data(const QModelIndex &index, int role) const;
+ QVariant headerData(int section, Qt::Orientation orientation, int role) const;
+
QModelIndex giveIndexForTimer(Timer * ptimer);
+ bool isThisTimerAlerting(QModelIndex index);
+
+ bool saveTimer(QModelIndex index,QString filename);
+
signals:
public slots:
void snoozeTimer(QModelIndex index);
void stopTimer(QModelIndex index);
+
+ void setUpdateViewOnChanges(bool update);
+
+ void removeTimer(QModelIndex index);
+
private:
QList <Timer * > currentTimers_;
static const int timeRemainingColumnNumber_ = 1;
static const int statusColumnNumber_ = 2;
+
+
+ bool updateViewOnChanges_;
+
};
#endif // CURRENTALERTSTABLEMODEL_H