sAlarm 0.5
salarm/scheduler/scheduledelegate.h
00001 /*
00002  * sAlarm - Scheduler
00003  * http://salarm.seberm.com
00004  *
00005  * Copyright (C) 2009-2010 Otto Sabart <seberm[at]gmail[dot]com>
00006  * 
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * version 3 as published by the Free Software Foundation.
00010  * 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  * 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 
00022 #ifndef SCHEDULEDELEGATE_H
00023 #define SCHEDULEDELEGATE_H
00024 
00025 
00026 #include <QStyledItemDelegate>
00027 #include <QPainter>
00028 
00029 
00030 class Scheduler;
00031 class SchedulerProxyModel;
00032 class SchedulerModel;
00033 
00034 
00035 class ScheduleDelegate : public QStyledItemDelegate {
00036     
00037         Q_OBJECT
00038         
00039 public:
00040     explicit ScheduleDelegate(QObject *parent = 0, SchedulerProxyModel *proxyModel = 0, SchedulerModel *model = 0);
00041         void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const;
00042         
00043 
00044 signals:
00045 
00046 public slots:
00047         
00048 private:
00049         
00050         Scheduler *m_scheduler;
00051         SchedulerProxyModel *m_proxyModel;
00052         SchedulerModel *m_model;
00053 };
00054 
00055 #endif // SCHEDULEDELEGATE_H
 All Classes Functions Enumerations