annotate ui/certificatetablemodel.h @ 339:5fa58979cb3a

Fix ressource leak found by cppcheck
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 09 Apr 2014 14:32:55 +0000
parents 36be67070dcb
children fba80767fd7a
rev   line source
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
1 #ifndef CERTIFICATETABLEMODEL_H
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
2 #define CERTIFICATETABLEMODEL_H
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
3
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
4 /**
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
5 * @file certificatetablemodel.h
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
6 * @brief Table model for certificates.
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
7 */
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #include <QAbstractTableModel>
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10 #include <QString>
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 #include "certificate.h"
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 class CertificateTabelModel : public QAbstractTableModel
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
14 {
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15 Q_OBJECT
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 public:
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 CertificateTabelModel(QObject *parent = 0);
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 void addCertificate(Certificate *certificate);
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 int rowCount(const QModelIndex &parent = QModelIndex()) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 int columnCount(const QModelIndex &parent = QModelIndex()) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 QVariant headerData(int section, Qt::Orientation orientation,
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 int role = Qt::DisplayRole) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
28 private:
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
29 QList<Certificate> *certificates;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30 QList<QString> *header;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 };
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33 #endif

http://wald.intevation.org/projects/trustbridge/