source: trunk/doc/html/qdockwindow-h.html

Last change on this file was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 9.2 KB
RevLine 
[190]1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qdockwindow.h:1 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>qdockwindow.h Include File</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { background: #ffffff; color: black; }
12--></style>
13</head>
14<body>
15
16<table border="0" cellpadding="0" cellspacing="0" width="100%">
17<tr bgcolor="#E5E5E5">
18<td valign=center>
19 <a href="index.html">
20<font color="#004faf">Home</font></a>
21 | <a href="classes.html">
22<font color="#004faf">All&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;Classes</font></a>
25 | <a href="annotated.html">
26<font color="#004faf">Annotated</font></a>
27 | <a href="groups.html">
28<font color="#004faf">Grouped&nbsp;Classes</font></a>
29 | <a href="functions.html">
30<font color="#004faf">Functions</font></a>
31</td>
32<td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qdockwindow.h</h1>
33
34<p>This is the verbatim text of the qdockwindow.h include file. It is provided only for illustration; the copyright remains with Trolltech.
35<hr>
36<pre>
37/****************************************************************************
38** $Id: qdockwindow-h.html 2051 2007-02-21 10:04:20Z chehrlic $
39**
40** Definition of the QDockWindow class
41**
42** Created : 001010
43**
44** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
45**
46** This file is part of the workspace module of the Qt GUI Toolkit.
47**
48** This file may be distributed under the terms of the Q Public License
49** as defined by Trolltech ASA of Norway and appearing in the file
50** LICENSE.QPL included in the packaging of this file.
51**
52** This file may be distributed and/or modified under the terms of the
53** GNU General Public License version 2 as published by the Free Software
54** Foundation and appearing in the file LICENSE.GPL included in the
55** packaging of this file.
56**
57** Licensees holding valid Qt Enterprise Edition licenses may use this
58** file in accordance with the Qt Commercial License Agreement provided
59** with the Software.
60**
61** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
62** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
63**
64** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
65** information about Qt Commercial License Agreements.
66** See http://www.trolltech.com/qpl/ for QPL licensing information.
67** See http://www.trolltech.com/gpl/ for GPL licensing information.
68**
69** Contact info@trolltech.com if any conditions of this licensing are
70** not clear to you.
71**
72**********************************************************************/
73
74#ifndef QDOCKWINDOW_H
75#define QDOCKWINDOW_H
76
77#ifndef QT_H
78#include "qframe.h"
79#endif // QT_H
80
81#ifndef QT_NO_MAINWINDOW
82
83class QDockWindowHandle;
84class QDockWindowTitleBar;
85class QPainter;
86class QDockWindowResizeHandle;
87class QBoxLayout;
88class QHBoxLayout;
89class QVBoxLayout;
90class QDockArea;
91class QWidgetResizeHandler;
92class QMainWindow;
93class QDockAreaLayout;
94class QDockWindowPrivate;
95class QToolBar;
96class QWindowsXPStyle;
97
98class Q_EXPORT QDockWindow : public QFrame
99{
100 Q_OBJECT
101 Q_ENUMS( CloseMode Place )
102 Q_PROPERTY( int closeMode READ closeMode WRITE setCloseMode ) //### this shouldn't be of type int?!
103 Q_PROPERTY( bool resizeEnabled READ isResizeEnabled WRITE setResizeEnabled )
104 Q_PROPERTY( bool movingEnabled READ isMovingEnabled WRITE setMovingEnabled )
105 Q_PROPERTY( bool horizontallyStretchable READ isHorizontallyStretchable WRITE setHorizontallyStretchable )
106 Q_PROPERTY( bool verticallyStretchable READ isVerticallyStretchable WRITE setVerticallyStretchable )
107 Q_PROPERTY( bool stretchable READ isStretchable )
108 Q_PROPERTY( bool newLine READ newLine WRITE setNewLine )
109 Q_PROPERTY( bool opaqueMoving READ opaqueMoving WRITE setOpaqueMoving )
110 Q_PROPERTY( int offset READ offset WRITE setOffset )
111 Q_PROPERTY( Place place READ place )
112
113 friend class QDockWindowHandle;
114 friend class QDockWindowTitleBar;
115 friend class QDockArea;
116 friend class QDockAreaLayout;
117 friend class QMainWindow;
118 friend class QCEMainWindow;
119 friend class QToolBar;
120 friend class QWindowsXPStyle;
121
122public:
123 enum Place { InDock, OutsideDock };
124 enum CloseMode { Never = 0, Docked = 1, Undocked = 2, Always = Docked | Undocked };
125
126 QDockWindow( Place p = InDock, QWidget* parent=0, const char* name=0, WFlags f = 0 );
127 QDockWindow( QWidget* parent, const char* name=0, WFlags f = 0 );
128 ~QDockWindow();
129
130 virtual void setWidget( QWidget *w );
131 QWidget *widget() const;
132
133 Place place() const { return curPlace; }
134
135 QDockArea *area() const;
136
137 virtual void setCloseMode( int m );
138 bool isCloseEnabled() const;
139 int closeMode() const;
140
141 virtual void setResizeEnabled( bool b );
142 virtual void setMovingEnabled( bool b );
143 bool isResizeEnabled() const;
144 bool isMovingEnabled() const;
145
146 virtual void setHorizontallyStretchable( bool b );
147 virtual void setVerticallyStretchable( bool b );
148 bool isHorizontallyStretchable() const;
149 bool isVerticallyStretchable() const;
150 void setHorizontalStretchable( bool b ) { setHorizontallyStretchable( b ); }
151 void setVerticalStretchable( bool b ) { setVerticallyStretchable( b ); }
152 bool isHorizontalStretchable() const { return isHorizontallyStretchable(); }
153 bool isVerticalStretchable() const { return isVerticallyStretchable(); }
154 bool isStretchable() const;
155
156 virtual void setOffset( int o );
157 int offset() const;
158
159 virtual void setFixedExtentWidth( int w );
160 virtual void setFixedExtentHeight( int h );
161 QSize fixedExtent() const;
162
163 virtual void setNewLine( bool b );
164 bool newLine() const;
165
166 Qt::Orientation orientation() const;
167
168 QSize sizeHint() const;
169 QSize minimumSize() const;
170 QSize minimumSizeHint() const;
171
172 QBoxLayout *boxLayout();
173
174 virtual void setOpaqueMoving( bool b );
175 bool opaqueMoving() const;
176
177 bool eventFilter( QObject *o, QEvent *e );
178
179#ifdef QT_NO_WIDGET_TOPEXTRA
180 QString caption() const;
181#endif
182
183signals:
184 void orientationChanged( Orientation o );
185 void placeChanged( QDockWindow::Place p );
186 void visibilityChanged( bool );
187
188public slots:
189 virtual void undock( QWidget *w );
190 virtual void undock() { undock( 0 ); }
191 virtual void dock();
192 virtual void setOrientation( Orientation o );
193 void setCaption( const QString &amp;s );
194
195protected:
196 void resizeEvent( QResizeEvent *e );
197 void showEvent( QShowEvent *e );
198 void hideEvent( QHideEvent *e );
199 void contextMenuEvent( QContextMenuEvent *e );
200
201 void drawFrame( QPainter * );
202 void drawContents( QPainter * );
203
204 bool event( QEvent *e );
205
206private slots:
207 void toggleVisible() { if ( !isVisible() ) show(); else hide(); }
208
209private:
210 QDockWindow( Place p, QWidget* parent, const char* name, WFlags f, bool toolbar );
211
212 void handleMove( const QPoint &amp;pos, const QPoint &amp;gp, bool drawRect );
213 void updateGui();
214 void updateSplitterVisibility( bool visible );
215
216 void startRectDraw( const QPoint &amp;so, bool drawRect );
217 void endRectDraw( bool drawRect );
218 void updatePosition( const QPoint &amp;globalPos );
219 QWidget *areaAt( const QPoint &amp;gp );
220 void removeFromDock( bool fixNewLines = TRUE );
221 void swapRect( QRect &amp;r, Qt::Orientation o, const QPoint &amp;offset, QDockArea *area );
222 void init();
223
224private:
225 QDockWindowHandle *horHandle, *verHandle;
226 QDockWindowTitleBar *titleBar;
227 QWidget *wid;
228 QPainter *unclippedPainter;
229 QDockArea *dockArea, *tmpDockArea;
230 QRect currRect;
231 Place curPlace;
232 Place state;
233 bool resizeEnabled : 1;
234 bool moveEnabled : 1;
235 bool nl : 1;
236 bool opaque : 1;
237 bool isToolbar : 1;
238 bool stretchable[ 3 ];
239 Orientation startOrientation;
240 int cMode;
241 QPoint startOffset;
242 int offs;
243 QSize fExtent;
244 QDockWindowResizeHandle *hHandleTop, *hHandleBottom, *vHandleLeft, *vHandleRight;
245 QVBoxLayout *hbox;
246 QHBoxLayout *vbox;
247 QBoxLayout *childBox;
248 void *dockWindowData;
249 QPoint lastPos;
250 QSize lastSize;
251 QWidgetResizeHandler *widgetResizeHandler;
252 QDockWindowPrivate *d;
253
254private: // Disabled copy constructor and operator=
255#if defined(Q_DISABLE_COPY)
256 QDockWindow( const QDockWindow &amp; );
257 QDockWindow&amp; operator=( const QDockWindow &amp; );
258#endif
259};
260
261inline QDockArea *QDockWindow::area() const
262{
263 return dockArea;
264}
265
266#define Q_DEFINED_QDOCKWINDOW
267#include "qwinexport.h"
268#endif
269
270#endif // QDOCKWINDOW_H
271</pre>
272<!-- eof -->
273<p><address><hr><div align=center>
274<table width=100% cellspacing=0 border=0><tr>
275<td>Copyright &copy; 2007
276<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
277<td align=right><div align=right>Qt 3.3.8</div>
278</table></div></address></body>
279</html>
Note: See TracBrowser for help on using the repository browser.