Mercurial > trustbridge
diff ui/certificatelistwidget.h @ 743:a467204a35f5
Rework User Interface.
Certificate lists are now plain lists of widgets and no longer
a ListWidget. Details are no longer shown extra but included
in the list. List entries are somewhat larger accordingly.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 04 Jul 2014 16:15:59 +0200 |
parents | 3d669400104a |
children | 9c4543128666 |
line wrap: on
line diff
--- a/ui/certificatelistwidget.h Fri Jul 04 16:13:40 2014 +0200 +++ b/ui/certificatelistwidget.h Fri Jul 04 16:15:59 2014 +0200 @@ -12,6 +12,7 @@ #include <QMainWindow> #include <QLabel> #include <QListWidget> +#include <QVBoxLayout> #include "certificate.h" /** @@ -20,6 +21,8 @@ * certificate. */ +class CertificateItemWidget; + Q_DECLARE_METATYPE(Certificate); class CertificateListWidget : public QWidget { @@ -31,7 +34,6 @@ bool editable = true, const QString& installLabel = tr("install"), const QString& removeLabel = tr("remove")); - void addCertificates(const QList<Certificate> &list); void removeCertificate(const Certificate &cert); void setCertState(bool state, const Certificate &cert); void clear(); @@ -41,23 +43,13 @@ QList<Certificate> certificateList(); int selectedCertCount(); bool contains(const Certificate &cert); - void setSelected(int index); - int selected() { return mCertificateList->currentRow(); } private: - void setupGUI(); - QListWidget *mCertificateList; - QLabel *mSubjectCN; - QLabel *mSubjectO; - QLabel *mIssuerCN; - QLabel *mIssuerO; - QLabel *mValidFrom; - QLabel *mValidTo; - QLabel *mFingerprint; + QList <CertificateItemWidget*> mCertificateWidgets; + QVBoxLayout mLayout; private slots: - void updateDetails(QListWidgetItem *item); void certStateChanged(bool state, const Certificate &cert); signals: