mirror-chatterino2/src/widgets/helper/notebookbutton.hpp

36 lines
585 B
C++
Raw Normal View History

#pragma once
2016-12-30 12:19:31 +01:00
#include "rippleeffectbutton.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 {
class NotebookButton : public RippleEffectButton
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;
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:
QPoint mousePos;
2016-12-30 12:19:31 +01:00
};
2017-04-14 17:47:28 +02:00
} // namespace widgets
} // namespace chatterino