-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathstandardbutton.h
More file actions
39 lines (31 loc) · 828 Bytes
/
Copy pathstandardbutton.h
File metadata and controls
39 lines (31 loc) · 828 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#include "common/object.h"
#include "qsvgwidget.h"
namespace shelllet {
namespace frameless {
enum class ButtonType {
Close,
Minimize,
Maximize,
Restore
};
class StandardButtonPrivate;
class StandardButton : public QSvgWidget, public Object {
Q_DECLARE_PRIVATE_D(Object::d_ptr, StandardButton)
Q_OBJECT
public:
StandardButton(ButtonType t, QWidget* parent = nullptr);
signals:
void clicked();
protected slots:
void applicationStateChanged(Qt::ApplicationState state);
protected:
void paintEvent(QPaintEvent* event);
void mousePressEvent(QMouseEvent* event) override;
void enterEvent(QEvent* event) override;
void leaveEvent(QEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
QSize sizeHint() const override;
};
}
}