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();
|
2022-07-06 11:24:23 -07:00
|
|
|
long long timeAtClick;
|
2022-06-23 12:34:40 -07:00
|
|
|
|
|
|
|
signals:
|
|
|
|
void clicked();
|
2022-06-23 16:15:33 -07:00
|
|
|
void unclicked();
|
2022-06-25 17:12:50 -07:00
|
|
|
void bookID(int id);
|
2022-06-28 23:15:13 -07:00
|
|
|
void bookPath(QString path);
|
2022-07-17 23:40:32 -07:00
|
|
|
void longPressInt(int id);
|
|
|
|
void longPressString(QString bookPath);
|
2022-06-23 12:34:40 -07:00
|
|
|
|
|
|
|
protected:
|
2022-06-23 16:15:33 -07:00
|
|
|
void mousePressEvent(QMouseEvent * event);
|
|
|
|
void mouseReleaseEvent(QMouseEvent * event);
|
2022-06-23 12:34:40 -07:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CLICKABLELABEL_H
|