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
40
41
42
43
44
45
46
47
48
49
50
51
| #ifndef WINDOWBARPRIVATE_H
| #define WINDOWBARPRIVATE_H
|
| #include <QBoxLayout>
|
| #include "WindowBar.h"
|
| namespace QWK {
|
| class WindowBarPrivate {
| Q_DECLARE_PUBLIC(WindowBar)
| Q_DISABLE_COPY(WindowBarPrivate)
| public:
| WindowBarPrivate();
| virtual ~WindowBarPrivate();
|
| void init();
|
| WindowBar *q_ptr;
|
| QWidget *w;
| bool autoTitle;
| bool autoIcon;
|
| enum WindowBarItem {
| IconButton,
| MenuWidget,
| TitleLabel,
| MinimumButton,
| MaximumButton,
| CloseButton,
| };
|
| QHBoxLayout *layout;
|
| inline QWidget *widgetAt(int index) const {
| return layout->itemAt(index)->widget();
| }
|
| void setWidgetAt(int index, QWidget *widget);
|
| QWidget *takeWidgetAt(int index);
|
| inline void insertDefaultSpace(int index) {
| layout->insertSpacerItem(index, new QSpacerItem(0, 0));
| }
| };
|
| }
|
| #endif // WINDOWBARPRIVATE_H
|
|