annotate ui/certificatetablemodel.h @ 1304:82fab0c689bf 0.9.3

Fix doxygen syntax error. Change inout to in,out
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 29 Sep 2014 16:42:06 +0200
parents 2a1aa9df8f11
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 396
diff changeset
7 */
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #ifndef CERTIFICATETABLEMODEL_H
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
9 #define CERTIFICATETABLEMODEL_H
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 /**
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
12 * @file certificatetablemodel.h
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 * @brief Table model for certificates.
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
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 #include <QAbstractTableModel>
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 #include <QString>
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 #include "certificate.h"
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
19
1255
2a1aa9df8f11 (issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 463
diff changeset
20 /** @brief Table model for certificates.*/
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 class CertificateTabelModel : public QAbstractTableModel
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22 {
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 Q_OBJECT
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 public:
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
26 CertificateTabelModel(QObject *parent = 0);
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
27
358
9ba7b4b4c1de Implemented the load from certificate file and set the edit state of certificates.
Raimund Renkert <rrenkert@intevation.de>
parents: 348
diff changeset
28 void addCertificate(const Certificate &certificate, bool editable);
376
9731d28b95af Implemented 'remove certificate' in administrator app.
Raimund Renkert <rrenkert@intevation.de>
parents: 358
diff changeset
29 bool removeRows(int row, int count, const QModelIndex&);
396
26651cc0cc47 Remove all certificates if a new list is loaded from file.
Raimund Renkert <rrenkert@intevation.de>
parents: 376
diff changeset
30 bool removeAll();
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
31 int rowCount(const QModelIndex &parent = QModelIndex()) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
32 int columnCount(const QModelIndex &parent = QModelIndex()) const;
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
33
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
34 QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
348
e6aa82466420 Use the table item delegate for certificates and make the model editable.
Raimund Renkert <rrenkert@intevation.de>
parents: 342
diff changeset
35 bool setData(const QModelIndex &index, const QVariant &value,
e6aa82466420 Use the table item delegate for certificates and make the model editable.
Raimund Renkert <rrenkert@intevation.de>
parents: 342
diff changeset
36 int role = Qt::EditRole);
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
37 QVariant headerData(int section, Qt::Orientation orientation,
348
e6aa82466420 Use the table item delegate for certificates and make the model editable.
Raimund Renkert <rrenkert@intevation.de>
parents: 342
diff changeset
38 int role = Qt::DisplayRole) const;
e6aa82466420 Use the table item delegate for certificates and make the model editable.
Raimund Renkert <rrenkert@intevation.de>
parents: 342
diff changeset
39
e6aa82466420 Use the table item delegate for certificates and make the model editable.
Raimund Renkert <rrenkert@intevation.de>
parents: 342
diff changeset
40 Qt::ItemFlags flags(const QModelIndex &index) const;
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
41
463
5200b8e9b2ae Rename tablemodel certificates and add accessors
Andre Heinecke <aheinecke@intevation.de>
parents: 404
diff changeset
42 const QList<Certificate>& certificates() {return mCertificates;}
5200b8e9b2ae Rename tablemodel certificates and add accessors
Andre Heinecke <aheinecke@intevation.de>
parents: 404
diff changeset
43
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
44 private:
463
5200b8e9b2ae Rename tablemodel certificates and add accessors
Andre Heinecke <aheinecke@intevation.de>
parents: 404
diff changeset
45 QList<Certificate> mCertificates;
342
fba80767fd7a Fixed member variables in certificate table model.
Raimund Renkert <rrenkert@intevation.de>
parents: 334
diff changeset
46 QList<QString> header;
334
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
47 };
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
48
36be67070dcb Added table model for certificates.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
49 #endif

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