summaryrefslogtreecommitdiffstats
path: root/sip/qt/qmainwindow.sip
blob: 11a2f12090ec3a6cc8bfe00f84090422eda3b297 (plain)
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
// This is the SIP interface definition for QMainWindow.
//
// Copyright (c) 2007
// 	Riverbank Computing Limited <[email protected]>
// 
// This file is part of PyQt.
// 
// This copy of PyQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


%ExportedDoc
<Sect2><Title>QMainWindow</Title>
<FuncSynopsis>
	<FuncDef>QTextStream &amp;<Function>operator&lt&lt;</Function></FuncDef>
	<ParamDef>QTextStream &amp;<Parameter></Parameter></ParamDef>
	<ParamDef>const QMainWindow &amp;<Parameter></Parameter></ParamDef>
</FuncSynopsis>
<Para>
This operator is fully implemented.  (Qt v3+)
</Para>

<FuncSynopsis>
	<FuncDef>QTextStream &amp;<Function>operator&gt&gt;</Function></FuncDef>
	<ParamDef>QTextStream &amp;<Parameter></Parameter></ParamDef>
	<ParamDef>QMainWindow &amp;<Parameter></Parameter></ParamDef>
</FuncSynopsis>
<Para>
This operator is fully implemented.  (Qt v3+)
</Para>

<FuncSynopsis>
	<FuncDef>bool <Function>getLocation</Function></FuncDef>
	<ParamDef>QToolBar *<Parameter>tb</Parameter></ParamDef>
	<ParamDef>ToolBarDock &amp;<Parameter>dock</Parameter></ParamDef>
	<ParamDef>int &amp;<Parameter>index</Parameter></ParamDef>
	<ParamDef>bool &amp;<Parameter>nl</Parameter></ParamDef>
	<ParamDef>int &amp;<Parameter>extraOffset</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This takes only the <Literal>tb</Literal> parameter and returns a tuple of the
result, <Literal>dock</Literal>, <Literal>index</Literal>,
<Literal>nl</Literal> and <Literal>extraOffset</Literal> values.  (Qt v2.1.0+)
</Para>

<FuncSynopsis>
	<FuncDef>QList&lt;QToolBar&gt; <Function>toolBars</Function></FuncDef>
	<ParamDef>ToolBarDock <Parameter>dock</Parameter></ParamDef>
</FuncSynopsis>
<Para>
This returns a list of <Literal>QToolBar</Literal> instances.  (Qt v2.1.0+)
</Para>
</Sect2>
%End


class QMainWindow : QWidget
{
%TypeHeaderCode
#include <qmainwindow.h>
%End

public:
%If (- Qt_2_00)
	QMainWindow(QWidget * /TransferThis/ = 0,const char * = 0,WFlags = 0);
%End
%If (Qt_2_00 -)
	QMainWindow(QWidget * /TransferThis/ = 0,const char * = 0,WFlags = WType_TopLevel);
%End

	QMenuBar *menuBar() const;
	QStatusBar *statusBar() const;
	QToolTipGroup *toolTipGroup() const;
	virtual void setCentralWidget(QWidget *);
	QWidget *centralWidget() const;

%If (- Qt_2_1_0)
	enum ToolBarDock {
		Unmanaged,
		TornOff,
		Top,
		Bottom,
		Right,
		Left
	};
%End
%If (Qt_2_1_0 - Qt_3_0_0)
	enum ToolBarDock {
		Unmanaged,
		TornOff,
		Top,
		Bottom,
		Right,
		Left,
		Minimized
	};
%End

%If (- Qt_2_00)
	void setDockEnabled(ToolBarDock,bool);
	void addToolBar(QToolBar *,const char *,ToolBarDock = Top,bool = 0);
%End
%If (Qt_2_00 - Qt_3_0_0)
	virtual void setDockEnabled(ToolBarDock,bool);
	void addToolBar(QToolBar *,ToolBarDock = Top,bool = 0);
	void addToolBar(QToolBar *,const QString &,ToolBarDock = Top,bool = 0);
	void moveToolBar(QToolBar *,ToolBarDock = Top);
%End
%If (Qt_2_1_0 - Qt_3_0_0)
	void setDockEnabled(QToolBar *,ToolBarDock,bool);
	bool isDockEnabled(QToolBar *,ToolBarDock) const;
	void moveToolBar(QToolBar *,ToolBarDock,bool,int,int = -1);
	bool toolBarsMovable() const;
%End
%If (Qt_3_0_0 -)
	virtual void setDockEnabled(Dock,bool);
%End
%If (- Qt_3_0_0)
	bool isDockEnabled(ToolBarDock) const;
	void removeToolBar(QToolBar *);
%End
%If (Qt_3_0_0 -)
	bool isDockEnabled(Dock) const;
	bool isDockEnabled(QDockArea *) const;
	virtual void setDockEnabled(QDockWindow *,Dock,bool);
	bool isDockEnabled(QDockWindow *,Dock) const;
	bool isDockEnabled(QDockWindow *,QDockArea *) const;
 
	virtual void addDockWindow(QDockWindow *,Dock = DockTop,bool = 0);
	virtual void addDockWindow(QDockWindow *,const QString &,
				   Dock = DockTop,bool = 0);
	virtual void moveDockWindow(QDockWindow *,Dock = DockTop);
	virtual void moveDockWindow(QDockWindow *,Dock,bool,int,int = -1);
	virtual void removeDockWindow(QDockWindow *);
%End

	void show();
%If (Qt_3_1_0 -)
	void hide();
%End
%If (Qt_2_1_0 -)
	QSize sizeHint() const;
	QSize minimumSizeHint() const;
%End

	bool rightJustification() const;
	bool usesBigPixmaps() const;
%If (Qt_2_1_0 -)
	bool usesTextLabel() const;
%End
%If (Qt_3_0_0 -)
	bool dockWindowsMovable() const;
%End
%If (Qt_2_1_0 -)
	bool opaqueMoving() const;
%End

	bool eventFilter(QObject *,QEvent *);

%If (Qt_3_0_0 -)
	bool getLocation(QDockWindow *,Dock &,int &,bool &,int &) const;
%End
%If (Qt_2_1_0 - Qt_3_0_0)
	bool getLocation(QToolBar *,ToolBarDock &,int &,bool &,int &) const;
%End
 
%If (Qt_2_1_0 - Qt_3_0_0)
	QList<QToolBar> toolBars(ToolBarDock) const;
%End
%If (Qt_3_0_0 -)
	QPtrList<QDockWindow> dockWindows(Dock) const;
	QPtrList<QDockWindow> dockWindows() const;
	void lineUpDockWindows(bool = 0);
%End

%If (Qt_2_1_0 -)
	void lineUpToolBars(bool = 0);
	bool isDockMenuEnabled() const;
%End

%If (Qt_3_0_0 -)
	bool hasDockWindow(QDockWindow *);
	QPtrList<QToolBar> toolBars(Dock) const;

	// The following one is in Qt3 but not documented.
	//virtual QDockArea *dockingArea(const QPoint &);
	QDockArea *leftDock() const;
	QDockArea *rightDock() const;
	QDockArea *topDock() const;
	QDockArea *bottomDock() const;
 
	virtual bool isCustomizable() const;
 
	bool appropriate(QDockWindow *) const;
 
	enum DockWindows {
		OnlyToolBars,
		NoToolBars,
		AllDockWindows
	};

	QPopupMenu *createDockWindowMenu(DockWindows = AllDockWindows) const;
%End

public slots:
%If (- Qt_2_00)
	void setRightJustification(bool);
	void setUsesBigPixmaps(bool);
%End
%If (Qt_2_00 -)
	virtual void setRightJustification(bool);
	virtual void setUsesBigPixmaps(bool);
%End
%If (Qt_2_1_0 - Qt_3_0_0)
	void setUsesTextLabel(bool);
	void setToolBarsMovable(bool);
	void setOpaqueMoving(bool);
	void setDockMenuEnabled(bool);
%End
%If (Qt_3_0_0 -)
	virtual void setUsesTextLabel(bool);
	virtual void setDockWindowsMovable(bool);
	virtual void setOpaqueMoving(bool);
	virtual void setDockMenuEnabled(bool);
%End
%If (Qt_2_00 - Qt_3_0_0)
	void whatsThis();
%End
%If (Qt_3_0_0 -)
	virtual void whatsThis();
	virtual void setAppropriate(QDockWindow *,bool);
	virtual void customize();
%End

signals:
	void pixmapSizeChanged(bool);
%If (Qt_2_1_0 -)
	void usesTextLabelChanged(bool);
%End
%If (Qt_2_1_0 - Qt_3_0_0)
	void startMovingToolBar(QToolBar *);
	void endMovingToolBar(QToolBar *);
	void toolBarPositionChanged(QToolBar *);
%End
%If (Qt_3_0_0 -)
	void dockWindowPositionChanged(QDockWindow *);
%End

protected slots:
%If (- Qt_2_00)
	void setUpLayout();
%End
%If (Qt_2_00 -)
	virtual void setUpLayout();
%End
%If (Qt_3_0_0 -)
	virtual bool showDockMenu(const QPoint &);
	void menuAboutToShow();
%End

protected:
	void paintEvent(QPaintEvent *);
%If (Qt_2_00 -)
	void childEvent(QChildEvent *);
%End
	bool event(QEvent *);
%If (Qt_2_00 - Qt_3_0_0)
	void resizeEvent(QResizeEvent *);
%End
%If (Qt_2_00 -)
	void styleChange(QStyle &);
%End

private:
%If (Qt_2_00 -)
	QMainWindow(const QMainWindow &);
%End
};