sAlarm 0.5
salarm/scheduler/schedule.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 SCHEDULE_H
00023 #define SCHEDULE_H
00024 
00025 #include <QList>
00026 #include <QVector>
00027 #include <QVariant>
00028 
00029 #include <QStandardItem>
00030 
00031 
00032 class Schedule : public QStandardItem {
00033         
00034 public:
00035     explicit Schedule(const QVector<QVariant> &data, Schedule* parent = 0);
00036         Schedule();
00037         ~Schedule();
00038                                  
00039         Schedule* child(int number);
00040         int childCount() const;
00041         int columnCount() const;
00042         QVariant data(int column) const;
00043         bool insertChildren(int position, int count, int columns);
00044         bool insertColumns(int position, int columns);
00045         Schedule* parent();
00046         bool removeChildren(int position, int count);
00047         bool removeColumns(int position, int columns);
00048         int childNumber() const;
00049         bool setData(int column, const QVariant &value);
00050         
00051 private:
00052         QList<Schedule*> m_childItems;
00053         QVector<QVariant> m_itemData;
00054         Schedule* m_parentItem;
00055         
00056 };
00057 
00058 #endif // SCHEDULE_H
 All Classes Functions Enumerations