-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathtitlebarwidget.h
More file actions
37 lines (32 loc) · 930 Bytes
/
Copy pathtitlebarwidget.h
File metadata and controls
37 lines (32 loc) · 930 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
#pragma once
#include "qwidget.h"
#include "qevent.h"
#include "flags.h"
namespace shelllet {
namespace frameless {
class TitleBarWidgetPrivate;
class TitleBarWidget : public QWidget {
Q_OBJECT
Q_DECLARE_PRIVATE(TitleBarWidget)
public:
explicit TitleBarWidget(QWidget* parent = nullptr, WindowTypeFlags f = WindowTypeFlags());
virtual ~TitleBarWidget() {}
void applicationStateChanged(Qt::ApplicationState state);
void setWindowTypes(WindowTypeFlags f);
void setCustomButton(QWidget* c);
bool underMouse();
void switchToMaxButton();
void switchToRestoreButton();
void setTitleTextBlurRadius(qreal blurRadius);
signals:
void minimizeButtonClicked();
void restoreButtonClicked();
void maximizeButtonClicked();
void closeButtonClicked();
void iconDoubleClicked();
protected:
void paintEvent(QPaintEvent* event);
void resizeEvent(QResizeEvent* event);
};
}
}