Mercurial > trustbridge
diff ui/certificateitemwidget.h @ 1255:2a1aa9df8f11
(issue133) Improve API documentation
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Thu, 25 Sep 2014 17:58:12 +0200 |
parents | ad4fc3649ffb |
children | 265583011f24 |
line wrap: on
line diff
--- a/ui/certificateitemwidget.h Thu Sep 25 17:37:03 2014 +0200 +++ b/ui/certificateitemwidget.h Thu Sep 25 17:58:12 2014 +0200 @@ -18,15 +18,23 @@ #include "certificate.h" +/** @brief A tool button that always looks as if it were unchecked. */ class CheckLessToolBtn : public QToolButton { void paintEvent(QPaintEvent * pe); }; +/** @brief Item delegate drawing custom certificate items in list views.*/ class CertificateItemWidget : public QWidget { Q_OBJECT public: + /** @brief ctor of the widget + * + * @param [in] parent the parent of the widget + * @param [in] cert the certificate to hold. + * @param [in] state wether or not the action of the certificate should be done. + * @param [in] btn the button used to manage the state of the cert.*/ CertificateItemWidget( QWidget *parent = 0, const Certificate &cert = Certificate(), @@ -34,7 +42,19 @@ QToolButton * btn = NULL); bool state(); + /** @brief set the state of the certificate. + * + * A false state means that the certificate action (install or remove) + * should not be executed. + * + * @param [in] state the state of the certificate + **/ void setState(bool state); + + /** @brief Obtain a copy of the certificate that is shown in the widget. + * + * @returns A copy of the hold certificate. + **/ Certificate certificate(); private: