LibEngsas
eaboutmodel.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2010 - 2012 EngSaS - Engineering Solutions and Services Langenbach. All rights reserved.
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library 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 GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
17  MA 02110-1301 USA.
18 */
19 
20 #ifndef EABOUTMODEL_H
21 #define EABOUTMODEL_H
22 
23 #include "eglobal.h"
24 #include "eabstractitemmodel.h"
25 
26 #include "eaboutperson.h"
27 
35 {
36  Q_OBJECT
37  public:
38  EAboutModel(QObject *parent = 0);
39  ~EAboutModel();
40 
41  QString toHtml() const;
42  void addPerson(EAboutPerson *person);
43  void addPerson(QString name, QString givenName, EAboutPerson::Categories categories);
44  void addPerson(QString name, QString givenName, QString email, EAboutPerson::Categories categories);
45  EAboutPerson *itemFromIndex(QModelIndex index) const;
46 
47  // standard api
48  QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
49  int columnCount(const QModelIndex& parent = QModelIndex()) const;
50  int rowCount(const QModelIndex& parent = QModelIndex()) const;
51  QModelIndex parent(const QModelIndex& child) const;
52  QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const;
53  QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
54 
55  private:
57 };
58 
59 #endif // EABOUTMODEL_H
Replacement of QAbstractItemModel to provide convenience signals for message handling.
Definition: eabstractitemmodel.h:36
EngSaS::AboutPersons items
Definition: eaboutmodel.h:56
Used by the EAboutDialog to display all related persons.
Definition: eaboutmodel.h:34
#define E_CORE_EXPORT
Definition: eglobal.h:107
A person, which should be mentioned at the EAboutDialog.
Definition: eaboutperson.h:30
QList< EAboutPerson * > AboutPersons
A type to replace QList<EAboutPerson*> with a shorter name.
Definition: eglobal.h:160