1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** All rights reserved.
|
---|
5 | ** Contact: Nokia Corporation ([email protected])
|
---|
6 | **
|
---|
7 | ** This file is part of the Qt3Support module of the Qt Toolkit.
|
---|
8 | **
|
---|
9 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
10 | ** Commercial Usage
|
---|
11 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
12 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
13 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
14 | ** a written agreement between you and Nokia.
|
---|
15 | **
|
---|
16 | ** GNU Lesser General Public License Usage
|
---|
17 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
18 | ** General Public License version 2.1 as published by the Free Software
|
---|
19 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
20 | ** packaging of this file. Please review the following information to
|
---|
21 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
22 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
23 | **
|
---|
24 | ** In addition, as a special exception, Nokia gives you certain additional
|
---|
25 | ** rights. These rights are described in the Nokia Qt LGPL Exception
|
---|
26 | ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
---|
27 | **
|
---|
28 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you have questions regarding the use of this file, please contact
|
---|
37 | ** Nokia at [email protected].
|
---|
38 | ** $QT_END_LICENSE$
|
---|
39 | **
|
---|
40 | ****************************************************************************/
|
---|
41 |
|
---|
42 | #ifndef Q3DOCKWINDOW_H
|
---|
43 | #define Q3DOCKWINDOW_H
|
---|
44 |
|
---|
45 | #include <Qt3Support/q3frame.h>
|
---|
46 |
|
---|
47 | QT_BEGIN_HEADER
|
---|
48 |
|
---|
49 | QT_BEGIN_NAMESPACE
|
---|
50 |
|
---|
51 | QT_MODULE(Qt3SupportLight)
|
---|
52 |
|
---|
53 | #ifndef QT_NO_MAINWINDOW
|
---|
54 |
|
---|
55 | class Q3DockWindowHandle;
|
---|
56 | class Q3DockWindowTitleBar;
|
---|
57 | class QPainter;
|
---|
58 | class Q3DockWindowResizeHandle;
|
---|
59 | class QBoxLayout;
|
---|
60 | class QHBoxLayout;
|
---|
61 | class QVBoxLayout;
|
---|
62 | class Q3DockArea;
|
---|
63 | class QWidgetResizeHandler;
|
---|
64 | class Q3MainWindow;
|
---|
65 | class Q3DockAreaLayout;
|
---|
66 | class Q3DockWindowPrivate;
|
---|
67 | class Q3ToolBar;
|
---|
68 | class QWindowsXPStyle;
|
---|
69 | class QRubberBand;
|
---|
70 |
|
---|
71 | class Q_COMPAT_EXPORT Q3DockWindow : public Q3Frame
|
---|
72 | {
|
---|
73 | Q_OBJECT
|
---|
74 | Q_ENUMS(CloseMode Place)
|
---|
75 | Q_PROPERTY(int closeMode READ closeMode WRITE setCloseMode)
|
---|
76 | Q_PROPERTY(bool resizeEnabled READ isResizeEnabled WRITE setResizeEnabled)
|
---|
77 | Q_PROPERTY(bool movingEnabled READ isMovingEnabled WRITE setMovingEnabled)
|
---|
78 | Q_PROPERTY(bool horizontallyStretchable READ isHorizontallyStretchable WRITE setHorizontallyStretchable)
|
---|
79 | Q_PROPERTY(bool verticallyStretchable READ isVerticallyStretchable WRITE setVerticallyStretchable)
|
---|
80 | Q_PROPERTY(bool stretchable READ isStretchable)
|
---|
81 | Q_PROPERTY(bool newLine READ newLine WRITE setNewLine)
|
---|
82 | Q_PROPERTY(bool opaqueMoving READ opaqueMoving WRITE setOpaqueMoving)
|
---|
83 | Q_PROPERTY(int offset READ offset WRITE setOffset)
|
---|
84 | Q_PROPERTY(Place place READ place)
|
---|
85 |
|
---|
86 | friend class Q3DockWindowHandle;
|
---|
87 | friend class Q3DockWindowTitleBar;
|
---|
88 | friend class Q3DockArea;
|
---|
89 | friend class Q3DockAreaLayout;
|
---|
90 | friend class Q3MainWindow;
|
---|
91 | friend class QCEMainWindow;
|
---|
92 | friend class Q3ToolBar;
|
---|
93 | friend class QWindowsXPStyle;
|
---|
94 |
|
---|
95 | public:
|
---|
96 | enum Place { InDock, OutsideDock };
|
---|
97 | enum CloseMode { Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked };
|
---|
98 |
|
---|
99 | Q3DockWindow(Place p = InDock, QWidget* parent=0, const char* name=0, Qt::WindowFlags f = 0);
|
---|
100 | Q3DockWindow(QWidget* parent, const char* name=0, Qt::WindowFlags f = 0);
|
---|
101 | ~Q3DockWindow();
|
---|
102 |
|
---|
103 | virtual void setWidget(QWidget *w);
|
---|
104 | QWidget *widget() const;
|
---|
105 |
|
---|
106 | Place place() const { return curPlace; }
|
---|
107 |
|
---|
108 | Q3DockArea *area() const;
|
---|
109 |
|
---|
110 | virtual void setCloseMode(int m);
|
---|
111 | bool isCloseEnabled() const;
|
---|
112 | int closeMode() const;
|
---|
113 |
|
---|
114 | virtual void setResizeEnabled(bool b);
|
---|
115 | virtual void setMovingEnabled(bool b);
|
---|
116 | bool isResizeEnabled() const;
|
---|
117 | bool isMovingEnabled() const;
|
---|
118 |
|
---|
119 | virtual void setHorizontallyStretchable(bool b);
|
---|
120 | virtual void setVerticallyStretchable(bool b);
|
---|
121 | bool isHorizontallyStretchable() const;
|
---|
122 | bool isVerticallyStretchable() const;
|
---|
123 | void setHorizontalStretchable(bool b) { setHorizontallyStretchable(b); }
|
---|
124 | void setVerticalStretchable(bool b) { setVerticallyStretchable(b); }
|
---|
125 | bool isHorizontalStretchable() const { return isHorizontallyStretchable(); }
|
---|
126 | bool isVerticalStretchable() const { return isVerticallyStretchable(); }
|
---|
127 | bool isStretchable() const;
|
---|
128 |
|
---|
129 | virtual void setOffset(int o);
|
---|
130 | int offset() const;
|
---|
131 |
|
---|
132 | virtual void setFixedExtentWidth(int w);
|
---|
133 | virtual void setFixedExtentHeight(int h);
|
---|
134 | QSize fixedExtent() const;
|
---|
135 |
|
---|
136 | virtual void setNewLine(bool b);
|
---|
137 | bool newLine() const;
|
---|
138 |
|
---|
139 | Qt::Orientation orientation() const;
|
---|
140 |
|
---|
141 | QSize sizeHint() const;
|
---|
142 | QSize minimumSize() const;
|
---|
143 | QSize minimumSizeHint() const;
|
---|
144 |
|
---|
145 | QBoxLayout *boxLayout();
|
---|
146 |
|
---|
147 | virtual void setOpaqueMoving(bool b);
|
---|
148 | bool opaqueMoving() const;
|
---|
149 |
|
---|
150 | bool eventFilter(QObject *o, QEvent *e);
|
---|
151 |
|
---|
152 | QString windowTitle() const;
|
---|
|
---|