mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 03:58:49 +03:00
26 lines
626 B
C
26 lines
626 B
C
|
#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());
|
||
|
|
||
|
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_;
|
||
|
};
|