quill/qclickablelabel.h
Nicolas Mailloux 80bdeb32ed localLibraryWidget: Implement book options dialog (WIP)
This dialog will open if user keeps touch input active on a button from `bookBtnArray` for >= 500 ms.
'Pin' and 'More info' operations are currently not implemented.
2022-07-06 14:24:23 -04:00

28 lines
580 B
C++

#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;
signals:
void clicked();
void unclicked();
void bookID(int id);
void bookPath(QString path);
void longPress(int id);
protected:
void mousePressEvent(QMouseEvent * event);
void mouseReleaseEvent(QMouseEvent * event);
};
#endif // CLICKABLELABEL_H