From 8d4c7767d450a4c03f81abd7131181ea8d29ba19 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 18 May 2020 10:32:25 +0200 Subject: [PATCH] [libcalamaresui] Document ClickableLabel --- src/libcalamaresui/widgets/ClickableLabel.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/libcalamaresui/widgets/ClickableLabel.h b/src/libcalamaresui/widgets/ClickableLabel.h index fd66082c5..5a3265c13 100644 --- a/src/libcalamaresui/widgets/ClickableLabel.h +++ b/src/libcalamaresui/widgets/ClickableLabel.h @@ -17,12 +17,19 @@ * along with Calamares. If not, see . */ -#ifndef CLICKABLELABEL_H -#define CLICKABLELABEL_H +#ifndef LIBCALAMARESUI_CLICKABLELABEL_H +#define LIBCALAMARESUI_CLICKABLELABEL_H #include -#include +#include +/** @brief A Label where the whole label area is clickable + * + * When clicking anywhere on the Label (text, background, whatever) + * the signal clicked() is emitted. Use this as a buddy for radio + * buttons or other clickable things where you want mouse interaction + * with the label, to be the same as mouse interaction with the control. + */ class ClickableLabel : public QLabel { Q_OBJECT @@ -39,7 +46,7 @@ protected: virtual void mouseReleaseEvent( QMouseEvent* event ) override; private: - QTime m_time; + QElapsedTimer m_time; }; -#endif // CLICKABLELABEL_H +#endif // LIBCALAMARESUI_CLICKABLELABEL_H