view ui/certificatelistwidget.h @ 1402:1adf72328b75 tip

Added tag 1.0 for changeset ee807f64e21e
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 27 Jan 2015 15:18:32 +0100
parents 2a1aa9df8f11
children
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 <QVBoxLayout>

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

class CertificateItemWidget;
class QToolButton;

Q_DECLARE_METATYPE(Certificate);
/**
 * @brief Displays a list of certificates and a details panel for a selected
 * certificate.
 **/
class CertificateListWidget : public QWidget
{
    Q_OBJECT
public:
    CertificateListWidget(QWidget *parent, Qt::WindowFlags flags = 0);

    void addCertificate(const Certificate &certificate, bool state,
                        QToolButton *btn);
    void removeCertificate(const Certificate &cert);
    void setCertState(bool state, const Certificate &cert);
    void clear();
    QStringList certificates();
    QStringList selectedCertificates();
    QStringList unselectedCertificates();
    QList<Certificate> certificateList();
    int selectedCertCount();
    bool contains(const Certificate &cert);

private:

    QList <CertificateItemWidget*> mCertificateWidgets;
    QVBoxLayout mLayout;

private slots:
    void certStateChanged(bool state, const Certificate &cert);

signals:
    void certListChanged(int selected);
    void certChanged(bool state, const Certificate &cert);

};
#endif // CERTIFICATELISTWIDGET_H

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