Mercurial > trustbridge
view ui/certificateitemwidget.h @ 638:9d806f140bd5 trustbridge-refactor
Added state and editable flag to certificate list items.
author | Raimund Renkert <rrenkert@intevation.de> |
---|---|
date | Tue, 24 Jun 2014 16:59:52 +0200 |
parents | 566ee111e331 |
children | 973a7ce19658 |
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 CERTIFICATELISTITEM_H #define CERTIFICATELISTITEM_H /** * @file certificateitemdelegate.h * @brief Item delegate drawing custom certificate items in list views. * */ #include <QWidget> #include <QLabel> #include <QComboBox> #include "certificate.h" class CertificateItemWidget : public QWidget { Q_OBJECT public: CertificateItemWidget( QWidget *parent = 0, const Certificate &cert = Certificate(), bool state = false, bool edtiable = true); bool state(); void setState(bool state); Certificate certificate(); private: void setupGUI(); Certificate mCertificate; bool mState; bool mEditable; QLabel *mLabel; QComboBox *mComboBox; private slots: void currentStateChanged(int ndx); signals: void stateChanged(bool state, const Certificate &cert); }; #endif