2 Copyright (c) 2010 Volker Krause
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
20 #ifndef AGENTCONFIGMODEL_H
21 #define AGENTCONFIGMODEL_H
23 #include <Akonadi/AgentInstance>
25 #include <QtCore/QAbstractItemModel>
26 #include <QtCore/QVector>
30 class AgentConfigModel
: public QAbstractTableModel
34 AgentConfigModel( QObject
* parent
= 0 );
35 void setAgentInstance( const Akonadi::AgentInstance
&instance
);
37 int columnCount(const QModelIndex
& parent
= QModelIndex()) const;
38 int rowCount(const QModelIndex
& parent
= QModelIndex()) const;
39 QVariant
data(const QModelIndex
& index
, int role
= Qt::DisplayRole
) const;
40 bool setData(const QModelIndex
& index
, const QVariant
& value
, int role
= Qt::EditRole
);
41 QVariant
headerData(int section
, Qt::Orientation orientation
, int role
= Qt::DisplayRole
) const;
42 Qt::ItemFlags
flags(const QModelIndex
& index
) const;
49 QVector
<QPair
<QString
, QVariant
> > m_settings
;
50 QDBusInterface
*m_interface
;