comparison ui/certificateitemwidget.h @ 654:129e611eaf50

Merge branch trustbridge-refactor
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 25 Jun 2014 15:16:24 +0200
parents 9d806f140bd5
children 973a7ce19658
comparison
equal deleted inserted replaced
648:e41a2537b84d 654:129e611eaf50
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 CERTIFICATELISTITEM_H
9 #define CERTIFICATELISTITEM_H
10 /**
11 * @file certificateitemdelegate.h
12 * @brief Item delegate drawing custom certificate items in list views.
13 *
14 */
15 #include <QWidget>
16 #include <QLabel>
17 #include <QComboBox>
18
19 #include "certificate.h"
20
21 class CertificateItemWidget : public QWidget
22 {
23 Q_OBJECT
24 public:
25 CertificateItemWidget(
26 QWidget *parent = 0,
27 const Certificate &cert = Certificate(),
28 bool state = false,
29 bool edtiable = true);
30
31 bool state();
32 void setState(bool state);
33 Certificate certificate();
34
35 private:
36 void setupGUI();
37
38 Certificate mCertificate;
39 bool mState;
40 bool mEditable;
41 QLabel *mLabel;
42 QComboBox *mComboBox;
43
44 private slots:
45 void currentStateChanged(int ndx);
46
47 signals:
48 void stateChanged(bool state, const Certificate &cert);
49 };
50 #endif

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