35 lines
687 B
C++
35 lines
687 B
C++
|
|
#ifndef FM_LABEL_CLICK_H
|
|
#define FM_LABEL_CLICK_H
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QObject>
|
|
#include <QWidget>
|
|
|
|
|
|
class FMClickLabel : public QLabel
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit FMClickLabel(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
|
~FMClickLabel();
|
|
signals:
|
|
void clicked();
|
|
protected:
|
|
void mouseReleaseEvent(QMouseEvent* event);
|
|
};
|
|
|
|
class FMClickURLLabel : public FMClickLabel
|
|
{
|
|
public:
|
|
explicit FMClickURLLabel(QString url, QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
|
~FMClickURLLabel();
|
|
protected:
|
|
QString _url;
|
|
protected:
|
|
void mouseReleaseEvent(QMouseEvent* event);
|
|
};
|
|
|
|
#endif // FM_LABEL_CLICK_H
|