2019-05-28 03:20:45 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
/**
|
|
|
|
* \file GuiClickableLabel.h
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GUICLICKABLELABEL_H
|
|
|
|
#define GUICLICKABLELABEL_H
|
|
|
|
|
|
|
|
#include <QLabel>
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
namespace frontend {
|
|
|
|
|
|
|
|
// see https://wiki.qt.io/Clickable_QLabel
|
|
|
|
class GuiClickableLabel : public QLabel {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit GuiClickableLabel(QWidget * parent);
|
|
|
|
|
|
|
|
~GuiClickableLabel();
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
void clicked();
|
2022-09-08 05:44:15 +00:00
|
|
|
void pressed();
|
2019-05-28 03:20:45 +00:00
|
|
|
|
|
|
|
protected:
|
2022-09-08 05:44:15 +00:00
|
|
|
void mousePressEvent(QMouseEvent *) override;
|
2020-11-19 13:40:14 +00:00
|
|
|
void mouseReleaseEvent(QMouseEvent *) override;
|
2019-05-28 03:20:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|