2017-06-07 10:09:24 +02:00
|
|
|
#pragma once
|
2016-12-30 12:19:31 +01:00
|
|
|
|
2017-06-11 09:31:45 +02:00
|
|
|
#include "fancybutton.hpp"
|
2017-04-12 17:46:44 +02:00
|
|
|
|
2016-12-30 12:20:26 +01:00
|
|
|
#include <QWidget>
|
2016-12-30 12:19:31 +01:00
|
|
|
|
2017-01-18 21:30:23 +01:00
|
|
|
namespace chatterino {
|
|
|
|
namespace widgets {
|
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
class NotebookButton : public FancyButton
|
2016-12-30 12:19:31 +01:00
|
|
|
{
|
2016-12-30 12:20:26 +01:00
|
|
|
Q_OBJECT
|
2017-04-12 17:46:44 +02:00
|
|
|
|
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;
|
|
|
|
|
2017-06-26 16:41:20 +02:00
|
|
|
NotebookButton(BaseWidget *parent);
|
2016-12-30 12:20:26 +01:00
|
|
|
|
2017-04-12 17:46:44 +02:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) override;
|
|
|
|
void mouseReleaseEvent(QMouseEvent *event) override;
|
2016-12-30 12:20:26 +01:00
|
|
|
|
2017-01-01 18:43:52 +01:00
|
|
|
signals:
|
|
|
|
void clicked();
|
|
|
|
|
2016-12-30 12:20:26 +01:00
|
|
|
private:
|
2017-06-26 16:41:20 +02:00
|
|
|
bool mouseOver = false;
|
|
|
|
bool mouseDown = false;
|
|
|
|
QPoint mousePos;
|
2016-12-30 12:19:31 +01:00
|
|
|
};
|
2017-05-27 15:40:06 +02:00
|
|
|
|
2017-04-14 17:47:28 +02:00
|
|
|
} // namespace widgets
|
|
|
|
} // namespace chatterino
|