mirror-chatterino2/notebookbutton.h

33 lines
699 B
C
Raw Normal View History

2016-12-30 12:19:31 +01:00
#ifndef NOTEBOOKBUTTON_H
#define NOTEBOOKBUTTON_H
2016-12-30 12:20:26 +01:00
#include <QWidget>
2016-12-30 12:19:31 +01:00
2016-12-30 12:20:26 +01:00
class NotebookButton : public QWidget
2016-12-30 12:19:31 +01:00
{
2016-12-30 12:20:26 +01:00
Q_OBJECT
2016-12-30 12:19:31 +01:00
public:
2016-12-30 12:20:26 +01:00
static const int IconPlus = 0;
2017-01-01 02:30:42 +01:00
static const int IconUser = 1;
static const int IconSettings = 2;
2016-12-30 12:20:26 +01:00
int icon = 0;
NotebookButton(QWidget *parent);
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
2017-01-01 18:43:52 +01:00
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
2016-12-30 12:20:26 +01:00
void enterEvent(QEvent *) Q_DECL_OVERRIDE;
void leaveEvent(QEvent *) Q_DECL_OVERRIDE;
2017-01-01 18:43:52 +01:00
signals:
void clicked();
2016-12-30 12:20:26 +01:00
private:
bool mouseOver = false;
bool mouseDown = false;
2016-12-30 12:19:31 +01:00
};
2017-01-11 18:52:09 +01:00
#endif // NOTEBOOKBUTTON_H