Mercurial > trustbridge
comparison ui/certificatelistwidget.h @ 582:88c9bdc74175 trustbridge-refactor
New widgets to display certificates in lists.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 27 May 2014 16:16:21 +0200 |
parents | |
children | 566ee111e331 |
comparison
equal
deleted
inserted
replaced
581:ab622e094786 | 582:88c9bdc74175 |
---|---|
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik | |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
8 #ifndef CERTIFICATELISTWIDGET_H | |
9 #define CERTIFICATELISTWIDGET_H | |
10 | |
11 #include <QWidget> | |
12 #include <QMainWindow> | |
13 #include <QLabel> | |
14 #include <QListWidget> | |
15 | |
16 #include "certificate.h" | |
17 /** | |
18 * @file certificatelistwidget.h | |
19 * @brief Displays a list of certificates and a details panel for a selected | |
20 * certificate. | |
21 */ | |
22 | |
23 Q_DECLARE_METATYPE(Certificate); | |
24 class CertificateListWidget : public QWidget | |
25 { | |
26 Q_OBJECT | |
27 public: | |
28 CertificateListWidget(QWidget *parent, Qt::WindowFlags flags = 0); | |
29 | |
30 void addCertificate(const Certificate &certificate); | |
31 void addCertificates(const QList<Certificate> &list); | |
32 void removeCertificate(int ndx); | |
33 QList<Certificate> getCertificates(); | |
34 | |
35 private: | |
36 void setupGUI(); | |
37 | |
38 QListWidget *mCertificateList; | |
39 QLabel *mSubjectCN; | |
40 QLabel *mSubjectO; | |
41 QLabel *mIssuerCN; | |
42 QLabel *mIssuerO; | |
43 QLabel *mValidFrom; | |
44 QLabel *mValidTo; | |
45 QLabel *mFingerprint; | |
46 | |
47 private slots: | |
48 void updateDetails(QListWidgetItem *item); | |
49 | |
50 }; | |
51 #endif // CERTIFICATELISTWIDGET_H |