view 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
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#ifndef CERTIFICATELISTWIDGET_H
#define CERTIFICATELISTWIDGET_H

#include <QWidget>
#include <QMainWindow>
#include <QLabel>
#include <QListWidget>

#include "certificate.h"
/**
 * @file certificatelistwidget.h
 * @brief Displays a list of certificates and a details panel for a selected
 * certificate.
 */

Q_DECLARE_METATYPE(Certificate);
class CertificateListWidget : public QWidget
{
    Q_OBJECT
public:
    CertificateListWidget(QWidget *parent, Qt::WindowFlags flags = 0);

    void addCertificate(const Certificate &certificate);
    void addCertificates(const QList<Certificate> &list);
    void removeCertificate(int ndx);
    QList<Certificate> getCertificates();

private:
    void setupGUI();

    QListWidget *mCertificateList;
    QLabel *mSubjectCN;
    QLabel *mSubjectO;
    QLabel *mIssuerCN;
    QLabel *mIssuerO;
    QLabel *mValidFrom;
    QLabel *mValidTo;
    QLabel *mFingerprint;

private slots:
    void updateDetails(QListWidgetItem *item);

};
#endif // CERTIFICATELISTWIDGET_H

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