-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathframelesswindow.h
More file actions
36 lines (33 loc) · 1.18 KB
/
Copy pathframelesswindow.h
File metadata and controls
36 lines (33 loc) · 1.18 KB
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
#pragma once
#include "qmainwindow.h"
#include "common/object.h"
#include "flags.h"
namespace shelllet {
namespace frameless {
class FramelessWindowPrivate;
class FramelessWindow : public QMainWindow, public Object {
Q_OBJECT
Q_DECLARE_PRIVATE_D(Object::d_ptr, FramelessWindow)
public:
explicit FramelessWindow(QWidget* parent = nullptr, WindowTypeFlags flags = WindowTypeFlags());
virtual ~FramelessWindow();
void setCustomButton(QWidget* c);
void setContextMenu(QMenu* menu);
void setTitleTextBlurRadius(qreal blurRadius);
void disableNativeTitleBar();
void enableNativeTitleBar();
virtual SizePolicyFlags fixedSizeTypes() const = 0;
protected:
virtual void minimizeButtonClicked();
virtual void restoreButtonClicked();
virtual void maximizeButtonClicked();
virtual void closeButtonClicked();
virtual void iconDoubleClicked();
FramelessWindow(FramelessWindowPrivate& d, QWidget* parent = nullptr, WindowTypeFlags flags = WindowTypeFlags());
protected:
void paintEvent(QPaintEvent* event) override;
void changeEvent(QEvent* event) override;
bool nativeEvent(const QByteArray& eventType, void* message, long* result) override;
};
}
}