forked from mirror/nheko
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
655 B
27 lines
655 B
7 years ago
|
#pragma once
|
||
|
|
||
|
#include <QLabel>
|
||
|
|
||
|
class Label : public QLabel
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
explicit Label(QWidget *parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
|
||
|
explicit Label(const QString &text,
|
||
|
QWidget *parent = Q_NULLPTR,
|
||
|
Qt::WindowFlags f = Qt::WindowFlags());
|
||
|
~Label() override {}
|
||
|
|
||
|
signals:
|
||
|
void clicked(QMouseEvent *e);
|
||
|
void pressed(QMouseEvent *e);
|
||
|
void released(QMouseEvent *e);
|
||
|
|
||
|
protected:
|
||
|
void mousePressEvent(QMouseEvent *e) override;
|
||
|
void mouseReleaseEvent(QMouseEvent *e) override;
|
||
|
|
||
|
QPoint pressPosition_;
|
||
|
};
|