comparison ui/certificatelistwidget.h @ 639:c1b35edb097f trustbridge-refactor

New methods to modify and use the certificate list.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 24 Jun 2014 17:03:59 +0200
parents 566ee111e331
children 39f03316f675
comparison
equal deleted inserted replaced
638:9d806f140bd5 639:c1b35edb097f
25 { 25 {
26 Q_OBJECT 26 Q_OBJECT
27 public: 27 public:
28 CertificateListWidget(QWidget *parent, Qt::WindowFlags flags = 0); 28 CertificateListWidget(QWidget *parent, Qt::WindowFlags flags = 0);
29 29
30 void addCertificate(const Certificate &certificate); 30 void addCertificate(const Certificate &certificate, bool state, bool editable = true);
31 void addCertificates(const QList<Certificate> &list); 31 void addCertificates(const QList<Certificate> &list);
32 void removeCertificate(int ndx); 32 void removeCertificate(const Certificate &cert);
33 void setCertState(bool state, const Certificate &cert);
33 void clear(); 34 void clear();
34 QStringList certificates(); 35 QStringList certificates();
36 QStringList selectedCertificates();
37 QStringList unselectedCertificates();
38 QList<Certificate> certificateList();
35 int selectedCertCount(); 39 int selectedCertCount();
40 bool contains(const Certificate &cert);
36 41
37 private: 42 private:
38 void setupGUI(); 43 void setupGUI();
39 44
40 QListWidget *mCertificateList; 45 QListWidget *mCertificateList;
50 void updateDetails(QListWidgetItem *item); 55 void updateDetails(QListWidgetItem *item);
51 void certStateChanged(bool state, const Certificate &cert); 56 void certStateChanged(bool state, const Certificate &cert);
52 57
53 signals: 58 signals:
54 void certListChanged(int selected); 59 void certListChanged(int selected);
60 void certChanged(bool state, const Certificate &cert);
55 61
56 }; 62 };
57 #endif // CERTIFICATELISTWIDGET_H 63 #endif // CERTIFICATELISTWIDGET_H

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