quill/qclickablelabel.h

29 lines
580 B
C
Raw Normal View History

2022-06-23 12:34:40 -07:00
#ifndef QCLICKABLELABEL_H
#define QCLICKABLELABEL_H
#include <QLabel>
#include <QWidget>
class QClickableLabel : public QLabel {
Q_OBJECT
public:
explicit QClickableLabel(QWidget* parent = Q_NULLPTR, Qt::WindowFlags f = Qt::WindowFlags());
~QClickableLabel();
long long timeAtClick;
2022-06-23 12:34:40 -07:00
signals:
void clicked();
void unclicked();
void bookID(int id);
2022-06-28 23:15:13 -07:00
void bookPath(QString path);
void longPress(int id);
2022-06-23 12:34:40 -07:00
protected:
void mousePressEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent * event);
2022-06-23 12:34:40 -07:00
};
#endif // CLICKABLELABEL_H