blob: a3eb511b4e9048a0e0ec2d3679f61f1eb37a71c3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// SPDX-FileCopyrightText: 2021 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
#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_;
};
|