Commit 8d4c7767 authored by Adriaan de Groot's avatar Adriaan de Groot

[libcalamaresui] Document ClickableLabel

parent f67d8ef1
......@@ -17,12 +17,19 @@
* along with Calamares. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CLICKABLELABEL_H
#define CLICKABLELABEL_H
#ifndef LIBCALAMARESUI_CLICKABLELABEL_H
#define LIBCALAMARESUI_CLICKABLELABEL_H
#include <QLabel>
#include <QTime>
#include <QElapsedTimer>
/** @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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment