comparison 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
comparison
equal deleted inserted replaced
1254:6d840341bc25 1255:2a1aa9df8f11
16 #include <QLabel> 16 #include <QLabel>
17 #include <QToolButton> 17 #include <QToolButton>
18 18
19 #include "certificate.h" 19 #include "certificate.h"
20 20
21 /** @brief A tool button that always looks as if it were unchecked. */
21 class CheckLessToolBtn : public QToolButton 22 class CheckLessToolBtn : public QToolButton
22 { 23 {
23 void paintEvent(QPaintEvent * pe); 24 void paintEvent(QPaintEvent * pe);
24 }; 25 };
25 26
27 /** @brief Item delegate drawing custom certificate items in list views.*/
26 class CertificateItemWidget : public QWidget 28 class CertificateItemWidget : public QWidget
27 { 29 {
28 Q_OBJECT 30 Q_OBJECT
29 public: 31 public:
32 /** @brief ctor of the widget
33 *
34 * @param [in] parent the parent of the widget
35 * @param [in] cert the certificate to hold.
36 * @param [in] state wether or not the action of the certificate should be done.
37 * @param [in] btn the button used to manage the state of the cert.*/
30 CertificateItemWidget( 38 CertificateItemWidget(
31 QWidget *parent = 0, 39 QWidget *parent = 0,
32 const Certificate &cert = Certificate(), 40 const Certificate &cert = Certificate(),
33 bool state = false, 41 bool state = false,
34 QToolButton * btn = NULL); 42 QToolButton * btn = NULL);
35 43
36 bool state(); 44 bool state();
45 /** @brief set the state of the certificate.
46 *
47 * A false state means that the certificate action (install or remove)
48 * should not be executed.
49 *
50 * @param [in] state the state of the certificate
51 **/
37 void setState(bool state); 52 void setState(bool state);
53
54 /** @brief Obtain a copy of the certificate that is shown in the widget.
55 *
56 * @returns A copy of the hold certificate.
57 **/
38 Certificate certificate(); 58 Certificate certificate();
39 59
40 private: 60 private:
41 void setupGUI(); 61 void setupGUI();
42 62

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