rrenkert@582: /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik rrenkert@582: * Software engineering by Intevation GmbH rrenkert@582: * rrenkert@582: * This file is Free Software under the GNU GPL (v>=2) rrenkert@582: * and comes with ABSOLUTELY NO WARRANTY! rrenkert@582: * See LICENSE.txt for details. rrenkert@582: */ rrenkert@582: #ifndef CERTIFICATELISTITEM_H rrenkert@582: #define CERTIFICATELISTITEM_H rrenkert@582: /** emanuel@1053: * @file certificateitemwidget.h rrenkert@582: * @brief Item delegate drawing custom certificate items in list views. rrenkert@582: * rrenkert@582: */ rrenkert@582: #include rrenkert@582: #include rrenkert@582: rrenkert@582: #include "certificate.h" andre@701: andre@1106: class QToolButton; rrenkert@582: rrenkert@582: class CertificateItemWidget : public QWidget rrenkert@582: { rrenkert@627: Q_OBJECT rrenkert@582: public: rrenkert@638: CertificateItemWidget( rrenkert@638: QWidget *parent = 0, rrenkert@638: const Certificate &cert = Certificate(), rrenkert@638: bool state = false, andre@1106: QToolButton * btn = NULL); rrenkert@582: rrenkert@627: bool state(); rrenkert@638: void setState(bool state); andre@1108: Certificate certificate(); rrenkert@627: rrenkert@582: private: rrenkert@582: void setupGUI(); rrenkert@582: rrenkert@582: Certificate mCertificate; rrenkert@638: bool mState; rrenkert@582: QLabel *mLabel; andre@1106: QToolButton *mButton; rrenkert@627: rrenkert@627: private slots: andre@1106: void currentStateChanged(bool state); rrenkert@627: rrenkert@627: signals: rrenkert@627: void stateChanged(bool state, const Certificate &cert); rrenkert@582: }; rrenkert@582: #endif