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

40 lines
816 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:
2018-04-05 23:44:46 +02:00
virtual void themeRefreshEvent() override;
2018-01-24 22:09:26 +01:00
virtual void paintEvent(QPaintEvent *) override;
virtual void mouseReleaseEvent(QMouseEvent *) override;
virtual void dragEnterEvent(QDragEnterEvent *) override;
virtual void dragLeaveEvent(QDragLeaveEvent *) override;
virtual void dropEvent(QDropEvent *) 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