author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 18 Aug 2010 10:37:55 +0300 | |
changeset 33 | 3e2da88830cd |
parent 30 | 5dc02b23752f |
child 37 | 758a864f9613 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
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 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
36 |
** |
|
37 |
** |
|
38 |
** $QT_END_LICENSE$ |
|
39 |
** |
|
40 |
****************************************************************************/ |
|
41 |
||
42 |
#ifndef QWIDGET_P_H |
|
43 |
#define QWIDGET_P_H |
|
44 |
||
45 |
// |
|
46 |
// W A R N I N G |
|
47 |
// ------------- |
|
48 |
// |
|
49 |
// This file is not part of the Qt API. It exists for the convenience |
|
50 |
// of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header |
|
51 |
// file may change from version to version without notice, or even be removed. |
|
52 |
// |
|
53 |
// We mean it. |
|
54 |
// |
|
55 |
||
56 |
#include "QtGui/qwidget.h" |
|
57 |
#include "private/qobject_p.h" |
|
58 |
#include "QtCore/qrect.h" |
|
59 |
#include "QtCore/qlocale.h" |
|
60 |
#include "QtCore/qset.h" |
|
61 |
#include "QtGui/qregion.h" |
|
62 |
#include "QtGui/qsizepolicy.h" |
|
63 |
#include "QtGui/qstyle.h" |
|
64 |
#include "QtGui/qapplication.h" |
|
65 |
#include <private/qgraphicseffect_p.h> |
|
66 |
#include "QtGui/qgraphicsproxywidget.h" |
|
67 |
#include "QtGui/qgraphicsscene.h" |
|
68 |
#include "QtGui/qgraphicsview.h" |
|
69 |
#include <private/qgesture_p.h> |
|
70 |
||
71 |
#ifdef Q_WS_WIN |
|
72 |
#include "QtCore/qt_windows.h" |
|
73 |
#include <private/qdnd_p.h> |
|
74 |
#endif // Q_WS_WIN |
|
75 |
||
76 |
#ifdef Q_WS_X11 |
|
77 |
#include "QtGui/qx11info_x11.h" |
|
78 |
#endif |
|
79 |
||
80 |
#ifdef Q_WS_MAC |
|
81 |
#include <private/qt_mac_p.h> |
|
82 |
#endif |
|
83 |
||
84 |
#if defined(Q_WS_QWS) |
|
85 |
#include "QtGui/qinputcontext.h" |
|
86 |
#include "QtGui/qscreen_qws.h" |
|
87 |
#endif |
|
88 |
||
89 |
#if defined(Q_OS_SYMBIAN) |
|
90 |
class RDrawableWindow; |
|
91 |
class CCoeControl; |
|
92 |
#endif |
|
93 |
||
94 |
QT_BEGIN_NAMESPACE |
|
95 |
||
96 |
// Extra QWidget data |
|
97 |
// - to minimize memory usage for members that are seldom used. |
|
98 |
// - top-level widgets have extra extra data to reduce cost further |
|
99 |
#if defined(Q_WS_QWS) |
|
100 |
class QWSManager; |
|
101 |
#endif |
|
102 |
#if defined(Q_WS_MAC) |
|
103 |
class QCoreGraphicsPaintEnginePrivate; |
|
104 |
#endif |
|
105 |
class QPaintEngine; |
|
106 |
class QPixmap; |
|
107 |
class QWidgetBackingStore; |
|
108 |
class QGraphicsProxyWidget; |
|
109 |
class QWidgetItemV2; |
|
110 |
||
111 |
class QStyle; |
|
112 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
113 |
class Q_AUTOTEST_EXPORT QRefCountedWidgetBackingStore |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
114 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
115 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
116 |
public: |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
117 |
QRefCountedWidgetBackingStore(); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
118 |
~QRefCountedWidgetBackingStore(); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
119 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
120 |
void create(QWidget *tlw); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
121 |
void destroy(); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
122 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
123 |
void widgetShown(QWidget *w); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
124 |
void widgetHidden(QWidget *w); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
125 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
126 |
inline QWidgetBackingStore* data() |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
127 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
128 |
return m_ptr; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
129 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
130 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
131 |
inline QWidgetBackingStore* operator->() |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
132 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
133 |
return m_ptr; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
134 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
135 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
136 |
inline QWidgetBackingStore& operator*() |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
137 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
138 |
return *m_ptr; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
139 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
140 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
141 |
inline operator bool() const |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
142 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
143 |
return (0 != m_ptr); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
144 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
145 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
146 |
private: |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
147 |
Q_DISABLE_COPY(QRefCountedWidgetBackingStore) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
148 |
|
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
149 |
private: |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
150 |
QWidgetBackingStore* m_ptr; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
151 |
QSet<QWidget *> m_visibleWidgets; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
152 |
}; |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
153 |
|
0 | 154 |
struct QTLWExtra { |
155 |
// *************************** Cross-platform variables ***************************** |
|
156 |
||
157 |
// Regular pointers (keep them together to avoid gaps on 64 bits architectures). |
|
158 |
QIcon *icon; // widget icon |
|
159 |
QPixmap *iconPixmap; |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
160 |
QRefCountedWidgetBackingStore backingStore; |
0 | 161 |
QWindowSurface *windowSurface; |
162 |
QPainter *sharedPainter; |
|
163 |
||
164 |
// Implicit pointers (shared_null). |
|
165 |
QString caption; // widget caption |
|
166 |
QString iconText; // widget icon text |
|
167 |
QString role; // widget role |
|
168 |
QString filePath; // widget file path |
|
169 |
||
170 |
// Other variables. |
|
171 |
short incw, inch; // size increments |
|
172 |
short basew, baseh; // base sizes |
|
173 |
// frame strut, don't use these directly, use QWidgetPrivate::frameStrut() instead. |
|
174 |
QRect frameStrut; |
|
175 |
QRect normalGeometry; // used by showMin/maximized/FullScreen |
|
176 |
Qt::WindowFlags savedFlags; // Save widget flags while showing fullscreen |
|
177 |
||
178 |
// *************************** Cross-platform bit fields **************************** |
|
179 |
uint opacity : 8; |
|
180 |
uint posFromMove : 1; |
|
181 |
uint sizeAdjusted : 1; |
|
182 |
uint inTopLevelResize : 1; |
|
183 |
uint inRepaint : 1; |
|
184 |
uint embedded : 1; |
|
185 |
||
186 |
// *************************** Platform specific values (bit fields first) ********** |
|
187 |
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11 |
|
188 |
uint spont_unmapped: 1; // window was spontaneously unmapped |
|
189 |
uint dnd : 1; // DND properties installed |
|
190 |
uint validWMState : 1; // is WM_STATE valid? |
|
191 |
uint waitingForMapNotify : 1; // show() has been called, haven't got the MapNotify yet |
|
192 |
WId parentWinId; // parent window Id (valid after reparenting) |
|
193 |
WId userTimeWindow; // window id that contains user-time timestamp when WM supports a _NET_WM_USER_TIME_WINDOW atom |
|
194 |
QPoint fullScreenOffset; |
|
195 |
#ifndef QT_NO_XSYNC |
|
196 |
WId syncUpdateCounter; |
|
197 |
ulong syncRequestTimestamp; |
|
198 |
qint32 newCounterValueHi; |
|
199 |
quint32 newCounterValueLo; |
|
200 |
#endif |
|
201 |
#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
202 |
uint hotkeyRegistered: 1; // Hot key from the STARTUPINFO has been registered. |
0 | 203 |
HICON winIconBig; // internal big Windows icon |
204 |
HICON winIconSmall; // internal small Windows icon |
|
205 |
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC |
|
206 |
uint resizer : 4; |
|
207 |
uint isSetGeometry : 1; |
|
208 |
uint isMove : 1; |
|
209 |
quint32 wattr; |
|
210 |
quint32 wclass; |
|
211 |
WindowGroupRef group; |
|
212 |
IconRef windowIcon; // the current window icon, if set with setWindowIcon_sys. |
|
213 |
quint32 savedWindowAttributesFromMaximized; // Saved attributes from when the calling updateMaximizeButton_sys() |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
214 |
#ifdef QT_MAC_USE_COCOA |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
215 |
// This value is just to make sure we maximize and restore to the right location, yet we allow apps to be maximized and |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
216 |
// manually resized. |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
217 |
// The name is misleading, since this is set when maximizing the window. It is a hint to saveGeometry(..) to record the |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
218 |
// starting position as 0,0 instead of the normal starting position. |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
219 |
bool wasMaximized; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
220 |
#endif // QT_MAC_USE_COCOA |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
221 |
|
0 | 222 |
#elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS |
223 |
#ifndef QT_NO_QWS_MANAGER |
|
224 |
QWSManager *qwsManager; |
|
225 |
#endif |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
226 |
#elif defined(Q_OS_SYMBIAN) |
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
227 |
uint inExpose : 1; // Prevents drawing recursion |
0 | 228 |
#endif |
229 |
}; |
|
230 |
||
231 |
struct QWExtra { |
|
232 |
// *************************** Cross-platform variables ***************************** |
|
233 |
||
234 |
// Regular pointers (keep them together to avoid gaps on 64 bits architectures). |
|
235 |
void *glContext; // if the widget is hijacked by QGLWindowSurface |
|
236 |
QTLWExtra *topextra; // only useful for TLWs |
|
237 |
#ifndef QT_NO_GRAPHICSVIEW |
|
238 |
QGraphicsProxyWidget *proxyWidget; // if the widget is embedded |
|
239 |
#endif |
|
240 |
#ifndef QT_NO_CURSOR |
|
241 |
QCursor *curs; |
|
242 |
#endif |
|
243 |
QPointer<QStyle> style; |
|
244 |
QPointer<QWidget> focus_proxy; |
|
245 |
||
246 |
// Implicit pointers (shared_empty/shared_null). |
|
247 |
QRegion mask; // widget mask |
|
248 |
QString styleSheet; |
|
249 |
||
250 |
// Other variables. |
|
251 |
qint32 minw; |
|
252 |
qint32 minh; // minimum size |
|
253 |
qint32 maxw; |
|
254 |
qint32 maxh; // maximum size |
|
255 |
quint16 customDpiX; |
|
256 |
quint16 customDpiY; |
|
257 |
QSize staticContentsSize; |
|
258 |
||
259 |
// *************************** Cross-platform bit fields **************************** |
|
260 |
uint explicitMinSize : 2; |
|
261 |
uint explicitMaxSize : 2; |
|
262 |
uint autoFillBackground : 1; |
|
263 |
uint nativeChildrenForced : 1; |
|
264 |
uint inRenderWithPainter : 1; |
|
265 |
uint hasMask : 1; |
|
266 |
||
267 |
// *************************** Platform specific values (bit fields first) ********** |
|
268 |
#if defined(Q_WS_WIN) // <----------------------------------------------------------- WIN |
|
269 |
#ifndef QT_NO_DRAGANDDROP |
|
270 |
QOleDropTarget *dropTarget; // drop target |
|
271 |
QList<QPointer<QWidget> > oleDropWidgets; |
|
272 |
#endif |
|
273 |
#elif defined(Q_WS_X11) // <--------------------------------------------------------- X11 |
|
274 |
uint compress_events : 1; |
|
275 |
WId xDndProxy; // XDND forwarding to embedded windows |
|
276 |
#elif defined(Q_WS_MAC) // <------------------------------------------------------ MAC |
|
277 |
#ifdef QT_MAC_USE_COCOA |
|
278 |
// Cocoa Mask stuff |
|
279 |
QImage maskBits; |
|
280 |
CGImageRef imageMask; |
|
281 |
#endif |
|
282 |
#elif defined(Q_OS_SYMBIAN) // <----------------------------------------------------- Symbian |
|
283 |
uint activated : 1; // RWindowBase::Activated has been called |
|
284 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
285 |
/** |
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
286 |
* If this bit is set, each native widget receives the signals from the |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
287 |
* Symbian control immediately before and immediately after draw ops are |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
288 |
* sent to the window server for this control: |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
289 |
* void beginNativePaintEvent(const QRect &paintRect); |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
290 |
* void endNativePaintEvent(const QRect &paintRect); |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
291 |
*/ |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
292 |
uint receiveNativePaintEvents : 1; |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
293 |
|
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
294 |
/** |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
295 |
* Defines the behaviour of QSymbianControl::Draw. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
296 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
297 |
enum NativePaintMode { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
298 |
/** |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
299 |
* Normal drawing mode: blits the required region of the backing store |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
300 |
* via WSERV. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
301 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
302 |
Blit, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
303 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
304 |
/** |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
305 |
* Disable drawing for this widget. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
306 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
307 |
Disable, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
308 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
309 |
/** |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
310 |
* Paint zeros into the WSERV framebuffer, using BitGDI APIs. For windows |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
311 |
* with an EColor16MU display mode, zero is written only into the R, G and B |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
312 |
* channels of the pixel. |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
313 |
*/ |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
314 |
ZeroFill, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
315 |
|
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
316 |
Default = Blit |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
317 |
}; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
318 |
|
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
319 |
NativePaintMode nativePaintMode; |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
320 |
|
0 | 321 |
#endif |
322 |
}; |
|
323 |
||
324 |
/*! |
|
325 |
\internal |
|
326 |
||
327 |
Returns true if \a p or any of its parents enable the |
|
328 |
Qt::BypassGraphicsProxyWidget window flag. Used in QWidget::show() and |
|
329 |
QWidget::setParent() to determine whether it's necessary to embed the |
|
330 |
widget into a QGraphicsProxyWidget or not. |
|
331 |
*/ |
|
332 |
static inline bool bypassGraphicsProxyWidget(const QWidget *p) |
|
333 |
{ |
|
334 |
while (p) { |
|
335 |
if (p->windowFlags() & Qt::BypassGraphicsProxyWidget) |
|
336 |
return true; |
|
337 |
p = p->parentWidget(); |
|
338 |
} |
|
339 |
return false; |
|
340 |
} |
|
341 |
||
342 |
class Q_GUI_EXPORT QWidgetPrivate : public QObjectPrivate |
|
343 |
{ |
|
344 |
Q_DECLARE_PUBLIC(QWidget) |
|
345 |
||
346 |
public: |
|
347 |
// *************************** Cross-platform *************************************** |
|
348 |
enum DrawWidgetFlags { |
|
349 |
DrawAsRoot = 0x01, |
|
350 |
DrawPaintOnScreen = 0x02, |
|
351 |
DrawRecursive = 0x04, |
|
352 |
DrawInvisible = 0x08, |
|
353 |
DontSubtractOpaqueChildren = 0x10, |
|
354 |
DontSetCompositionMode = 0x20, |
|
355 |
DontDrawOpaqueChildren = 0x40 |
|
356 |
}; |
|
357 |
||
358 |
enum CloseMode { |
|
359 |
CloseNoEvent, |
|
360 |
CloseWithEvent, |
|
361 |
CloseWithSpontaneousEvent |
|
362 |
}; |
|
363 |
||
364 |
enum Direction { |
|
365 |
DirectionNorth = 0x01, |
|
366 |
DirectionEast = 0x10, |
|
367 |
DirectionSouth = 0x02, |
|
368 |
DirectionWest = 0x20 |
|
369 |
}; |
|
370 |
||
371 |
// Functions. |
|
372 |
explicit QWidgetPrivate(int version = QObjectPrivateVersion); |
|
373 |
~QWidgetPrivate(); |
|
374 |
||
375 |
QWExtra *extraData() const; |
|
376 |
QTLWExtra *topData() const; |
|
377 |
QTLWExtra *maybeTopData() const; |
|
378 |
QPainter *sharedPainter() const; |
|
379 |
void setSharedPainter(QPainter *painter); |
|
380 |
QWidgetBackingStore *maybeBackingStore() const; |
|
381 |
void init(QWidget *desktopWidget, Qt::WindowFlags f); |
|
382 |
void create_sys(WId window, bool initializeWindow, bool destroyOldWindow); |
|
383 |
void createRecursively(); |
|
384 |
void createWinId(WId id = 0); |
|
385 |
||
386 |
void createTLExtra(); |
|
387 |
void createExtra(); |
|
388 |
void deleteExtra(); |
|
389 |
void createSysExtra(); |
|
390 |
void deleteSysExtra(); |
|
391 |
void createTLSysExtra(); |
|
392 |
void deleteTLSysExtra(); |
|
393 |
void updateSystemBackground(); |
|
394 |
void propagatePaletteChange(); |
|
395 |
||
396 |
void setPalette_helper(const QPalette &); |
|
397 |
void resolvePalette(); |
|
398 |
QPalette naturalWidgetPalette(uint inheritedMask) const; |
|
399 |
||
400 |
void setMask_sys(const QRegion &); |
|
401 |
#ifdef Q_OS_SYMBIAN |
|
402 |
void setSoftKeys_sys(const QList<QAction*> &softkeys); |
|
403 |
void activateSymbianWindow(WId wid = 0); |
|
404 |
void _q_delayedDestroy(WId winId); |
|
405 |
#endif |
|
406 |
||
407 |
void raise_sys(); |
|
408 |
void lower_sys(); |
|
409 |
void stackUnder_sys(QWidget *); |
|
410 |
||
411 |
void setFocus_sys(); |
|
412 |
||
413 |
void updateFont(const QFont &); |
|
414 |
inline void setFont_helper(const QFont &font) { |
|
415 |
if (data.fnt == font && data.fnt.resolve() == font.resolve()) |
|
416 |
return; |
|
417 |
updateFont(font); |
|
418 |
} |
|
419 |
void resolveFont(); |
|
420 |
QFont naturalWidgetFont(uint inheritedMask) const; |
|
421 |
||
422 |
void setLayoutDirection_helper(Qt::LayoutDirection); |
|
423 |
void resolveLayoutDirection(); |
|
424 |
||
425 |
void setLocale_helper(const QLocale &l, bool forceUpdate = false); |
|
426 |
void resolveLocale(); |
|
427 |
||
428 |
void setStyle_helper(QStyle *newStyle, bool propagate, bool metalHack = false); |
|
429 |
void inheritStyle(); |
|
430 |
||
431 |
void setUpdatesEnabled_helper(bool ); |
|
432 |
||
433 |
void paintBackground(QPainter *, const QRegion &, int flags = DrawAsRoot) const; |
|
434 |
bool isAboutToShow() const; |
|
435 |
QRegion prepareToRender(const QRegion ®ion, QWidget::RenderFlags renderFlags); |
|
436 |
void render_helper(QPainter *painter, const QPoint &targetOffset, const QRegion &sourceRegion, |
|
437 |
QWidget::RenderFlags renderFlags); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
438 |
void render(QPaintDevice *target, const QPoint &targetOffset, const QRegion &sourceRegion, |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
439 |
QWidget::RenderFlags renderFlags, bool readyToRender); |
0 | 440 |
void drawWidget(QPaintDevice *pdev, const QRegion &rgn, const QPoint &offset, int flags, |
441 |
QPainter *sharedPainter = 0, QWidgetBackingStore *backingStore = 0); |
|
442 |
||
443 |
||
444 |
void paintSiblingsRecursive(QPaintDevice *pdev, const QObjectList& children, int index, |
|
445 |
const QRegion &rgn, const QPoint &offset, int flags |
|
446 |
#ifdef Q_BACKINGSTORE_SUBSURFACES |
|
447 |
, const QWindowSurface *currentSurface |
|
448 |
#endif |
|
449 |
, QPainter *sharedPainter, QWidgetBackingStore *backingStore); |
|
450 |
||
451 |
||
452 |
QPainter *beginSharedPainter(); |
|
453 |
bool endSharedPainter(); |
|
454 |
#ifndef QT_NO_GRAPHICSVIEW |
|
455 |
static QGraphicsProxyWidget * nearestGraphicsProxyWidget(const QWidget *origin); |
|
456 |
#endif |
|
457 |
QWindowSurface *createDefaultWindowSurface(); |
|
458 |
QWindowSurface *createDefaultWindowSurface_sys(); |
|
459 |
void repaint_sys(const QRegion &rgn); |
|
460 |
||
461 |
QRect clipRect() const; |
|
462 |
QRegion clipRegion() const; |
|
463 |
void subtractOpaqueChildren(QRegion &rgn, const QRect &clipRect) const; |
|
464 |
void subtractOpaqueSiblings(QRegion &source, bool *hasDirtySiblingsAbove = 0, |
|
465 |
bool alsoNonOpaque = false) const; |
|
466 |
void clipToEffectiveMask(QRegion ®ion) const; |
|
467 |
void updateIsOpaque(); |
|
468 |
void setOpaque(bool opaque); |
|
469 |
void updateIsTranslucent(); |
|
470 |
bool paintOnScreen() const; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
471 |
#ifndef QT_NO_GRAPHICSEFFECT |
0 | 472 |
void invalidateGraphicsEffectsRecursively(); |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
473 |
#endif //QT_NO_GRAPHICSEFFECT |
0 | 474 |
|
475 |
const QRegion &getOpaqueChildren() const; |
|
476 |
void setDirtyOpaqueRegion(); |
|
477 |
||
478 |
bool close_helper(CloseMode mode); |
|
479 |
||
480 |
void setWindowIcon_helper(); |
|
481 |
void setWindowIcon_sys(bool forceReset = false); |
|
482 |
void setWindowOpacity_sys(qreal opacity); |
|
483 |
void adjustQuitOnCloseAttribute(); |
|
484 |
||
485 |
void scrollChildren(int dx, int dy); |
|
486 |
void moveRect(const QRect &, int dx, int dy); |
|
487 |
void scrollRect(const QRect &, int dx, int dy); |
|
488 |
void invalidateBuffer_resizeHelper(const QPoint &oldPos, const QSize &oldSize); |
|
489 |
// ### Qt 4.6: Merge into a template function (after MSVC isn't supported anymore). |
|
490 |
void invalidateBuffer(const QRegion &); |
|
491 |
void invalidateBuffer(const QRect &); |
|
492 |
bool isOverlapped(const QRect&) const; |
|
493 |
void syncBackingStore(); |
|
494 |
void syncBackingStore(const QRegion ®ion); |
|
495 |
||
496 |
void reparentFocusWidgets(QWidget *oldtlw); |
|
497 |
||
498 |
static int pointToRect(const QPoint &p, const QRect &r); |
|
499 |
||
500 |
void setWinId(WId); |
|
501 |
void showChildren(bool spontaneous); |
|
502 |
void hideChildren(bool spontaneous); |
|
503 |
void setParent_sys(QWidget *parent, Qt::WindowFlags); |
|
504 |
void scroll_sys(int dx, int dy); |
|
505 |
void scroll_sys(int dx, int dy, const QRect &r); |
|
506 |
void deactivateWidgetCleanup(); |
|
507 |
void setGeometry_sys(int, int, int, int, bool); |
|
508 |
void sendPendingMoveAndResizeEvents(bool recursive = false, bool disableUpdates = false); |
|
509 |
void activateChildLayoutsRecursively(); |
|
510 |
void show_recursive(); |
|
511 |
void show_helper(); |
|
512 |
void show_sys(); |
|
513 |
void hide_sys(); |
|
514 |
void hide_helper(); |
|
515 |
void _q_showIfNotHidden(); |
|
516 |
||
517 |
void setEnabled_helper(bool); |
|
518 |
void registerDropSite(bool); |
|
519 |
static void adjustFlags(Qt::WindowFlags &flags, QWidget *w = 0); |
|
520 |
||
521 |
void updateFrameStrut(); |
|
522 |
QRect frameStrut() const; |
|
523 |
||
524 |
#ifdef QT_KEYPAD_NAVIGATION |
|
525 |
static bool navigateToDirection(Direction direction); |
|
526 |
static QWidget *widgetInNavigationDirection(Direction direction); |
|
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
527 |
static bool canKeypadNavigate(Qt::Orientation orientation); |
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
18
diff
changeset
|
528 |
static bool inTabWidget(QWidget *widget); |
0 | 529 |
#endif |
530 |
||
531 |
void setWindowIconText_sys(const QString &cap); |
|
532 |
void setWindowIconText_helper(const QString &cap); |
|
533 |
void setWindowTitle_sys(const QString &cap); |
|
534 |
||
535 |
#ifndef QT_NO_CURSOR |
|
536 |
void setCursor_sys(const QCursor &cursor); |
|
537 |
void unsetCursor_sys(); |
|
538 |
#endif |
|
539 |
||
540 |
void setWindowTitle_helper(const QString &cap); |
|
541 |
void setWindowFilePath_helper(const QString &filePath); |
|
542 |
||
543 |
bool setMinimumSize_helper(int &minw, int &minh); |
|
544 |
bool setMaximumSize_helper(int &maxw, int &maxh); |
|
545 |
void setConstraints_sys(); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
546 |
bool pointInsideRectAndMask(const QPoint &) const; |
0 | 547 |
QWidget *childAt_helper(const QPoint &, bool) const; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
548 |
QWidget *childAtRecursiveHelper(const QPoint &p, bool, bool includeFrame = false) const; |
0 | 549 |
void updateGeometry_helper(bool forceUpdate); |
550 |
||
551 |
void getLayoutItemMargins(int *left, int *top, int *right, int *bottom) const; |
|
552 |
void setLayoutItemMargins(int left, int top, int right, int bottom); |
|
553 |
void setLayoutItemMargins(QStyle::SubElement element, const QStyleOption *opt = 0); |
|
554 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
555 |
// aboutToDestroy() is called just before the contents of |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
556 |
// QWidget::destroy() is executed. It's used to signal QWidget |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
557 |
// sub-classes that their internals are about to be released. |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
558 |
virtual void aboutToDestroy() {} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
559 |
|
0 | 560 |
QInputContext *inputContext() const; |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
561 |
inline QWidget *effectiveFocusWidget() { |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
562 |
QWidget *w = q_func(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
563 |
while (w->focusProxy()) |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
564 |
w = w->focusProxy(); |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
565 |
return w; |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
566 |
} |
0 | 567 |
|
568 |
void setModal_sys(); |
|
569 |
||
570 |
// This is an helper function that return the available geometry for |
|
571 |
// a widget and takes care is this one is in QGraphicsView. |
|
572 |
// If the widget is not embed in a scene then the geometry available is |
|
573 |
// null, we let QDesktopWidget decide for us. |
|
574 |
static QRect screenGeometry(const QWidget *widget) |
|
575 |
{ |
|
576 |
QRect screen; |
|
577 |
#ifndef QT_NO_GRAPHICSVIEW |
|
578 |
QGraphicsProxyWidget *ancestorProxy = widget->d_func()->nearestGraphicsProxyWidget(widget); |
|
579 |
//It's embedded if it has an ancestor |
|
580 |
if (ancestorProxy) { |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
581 |
if (!bypassGraphicsProxyWidget(widget) && ancestorProxy->scene() != 0) { |
0 | 582 |
// One view, let be smart and return the viewport rect then the popup is aligned |
583 |
if (ancestorProxy->scene()->views().size() == 1) { |
|
584 |
QGraphicsView *view = ancestorProxy->scene()->views().at(0); |
|
585 |
screen = view->mapToScene(view->viewport()->rect()).boundingRect().toRect(); |
|
586 |
} else { |
|
587 |
screen = ancestorProxy->scene()->sceneRect().toRect(); |
|
588 |
} |
|
589 |
} |
|
590 |
} |
|
591 |
#endif |
|
592 |
return screen; |
|
593 |
} |
|
594 |
||
595 |
inline void setRedirected(QPaintDevice *replacement, const QPoint &offset) |
|
596 |
{ |
|
597 |
Q_ASSERT(q_func()->testAttribute(Qt::WA_WState_InPaintEvent)); |
|
598 |
redirectDev = replacement; |
|
599 |
redirectOffset = offset; |
|
600 |
} |
|
601 |
||
602 |
inline QPaintDevice *redirected(QPoint *offset) const |
|
603 |
{ |
|
604 |
if (offset) |
|
605 |
*offset = redirectDev ? redirectOffset : QPoint(); |
|
606 |
return redirectDev; |
|
607 |
} |
|
608 |
||
609 |
inline void restoreRedirected() |
|
610 |
{ redirectDev = 0; } |
|
611 |
||
612 |
inline void enforceNativeChildren() |
|
613 |
{ |
|
614 |
if (!extra) |
|
615 |
createExtra(); |
|
616 |
||
617 |
if (extra->nativeChildrenForced) |
|
618 |
return; |
|
619 |
extra->nativeChildrenForced = 1; |
|
620 |
||
621 |
for (int i = 0; i < children.size(); ++i) { |
|
622 |
if (QWidget *child = qobject_cast<QWidget *>(children.at(i))) |
|
623 |
child->setAttribute(Qt::WA_NativeWindow); |
|
624 |
} |
|
625 |
} |
|
626 |
||
627 |
inline bool nativeChildrenForced() const |
|
628 |
{ |
|
629 |
return extra ? extra->nativeChildrenForced : false; |
|
630 |
} |
|
631 |
||
632 |
inline QRect effectiveRectFor(const QRect &rect) const |
|
633 |
{ |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
634 |
#ifndef QT_NO_GRAPHICSEFFECT |
0 | 635 |
if (graphicsEffect && graphicsEffect->isEnabled()) |
636 |
return graphicsEffect->boundingRectFor(rect).toAlignedRect(); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
637 |
#endif //QT_NO_GRAPHICSEFFECT |
0 | 638 |
return rect; |
639 |
} |
|
640 |
||
641 |
QSize adjustedSize() const; |
|
642 |
||
643 |
inline void handleSoftwareInputPanel(Qt::MouseButton button, bool clickCausedFocus) |
|
644 |
{ |
|
645 |
Q_Q(QWidget); |
|
646 |
if (button == Qt::LeftButton && qApp->autoSipEnabled()) { |
|
647 |
QStyle::RequestSoftwareInputPanel behavior = QStyle::RequestSoftwareInputPanel( |
|
648 |
q->style()->styleHint(QStyle::SH_RequestSoftwareInputPanel)); |
|
649 |
if (!clickCausedFocus || behavior == QStyle::RSIP_OnMouseClick) { |
|
650 |
QEvent event(QEvent::RequestSoftwareInputPanel); |
|
651 |
QApplication::sendEvent(q, &event); |
|
652 |
} |
|
653 |
} |
|
654 |
} |
|
655 |
||
656 |
#ifndef Q_WS_QWS // Almost cross-platform :-) |
|
657 |
void setWSGeometry(bool dontShow=false, const QRect &oldRect = QRect()); |
|
658 |
||
659 |
inline QPoint mapToWS(const QPoint &p) const |
|
660 |
{ return p - data.wrect.topLeft(); } |
|
661 |
||
662 |
inline QPoint mapFromWS(const QPoint &p) const |
|
663 |
{ return p + data.wrect.topLeft(); } |
|
664 |
||
665 |
inline QRect mapToWS(const QRect &r) const |
|
666 |
{ QRect rr(r); rr.translate(-data.wrect.topLeft()); return rr; } |
|
667 |
||
668 |
inline QRect mapFromWS(const QRect &r) const |
|
669 |
{ QRect rr(r); rr.translate(data.wrect.topLeft()); return rr; } |
|
670 |
#endif |
|
671 |
||
672 |
// Variables. |
|
673 |
// Regular pointers (keep them together to avoid gaps on 64 bit architectures). |
|
674 |
QWExtra *extra; |
|
675 |
QWidget *focus_next; |
|
676 |
QWidget *focus_prev; |
|
677 |
QWidget *focus_child; |
|
678 |
QLayout *layout; |
|
679 |
QRegion *needsFlush; |
|
680 |
QPaintDevice *redirectDev; |
|
681 |
QWidgetItemV2 *widgetItem; |
|
682 |
QPaintEngine *extraPaintEngine; |
|
683 |
mutable const QMetaObject *polished; |
|
684 |
QGraphicsEffect *graphicsEffect; |
|
685 |
// All widgets are added into the allWidgets set. Once |
|
686 |
// they receive a window id they are also added to the mapper. |
|
687 |
// This should just ensure that all widgets are deleted by QApplication |
|
688 |
static QWidgetMapper *mapper; |
|
689 |
static QWidgetSet *allWidgets; |
|
690 |
#if !defined(QT_NO_IM) |
|
691 |
QPointer<QInputContext> ic; |
|
692 |
Qt::InputMethodHints imHints; |
|
693 |
#endif |
|
694 |
#ifdef QT_KEYPAD_NAVIGATION |
|
695 |
static QPointer<QWidget> editingWidget; |
|
696 |
#endif |
|
697 |
||
698 |
// Implicit pointers (shared_null/shared_empty). |
|
699 |
QRegion opaqueChildren; |
|
700 |
QRegion dirty; |
|
701 |
#ifndef QT_NO_TOOLTIP |
|
702 |
QString toolTip; |
|
703 |
#endif |
|
704 |
#ifndef QT_NO_STATUSTIP |
|
705 |
QString statusTip; |
|
706 |
#endif |
|
707 |
#ifndef QT_NO_WHATSTHIS |
|
708 |
QString whatsThis; |
|
709 |
#endif |
|
710 |
#ifndef QT_NO_ACCESSIBILITY |
|
711 |
QString accessibleName; |
|
712 |
QString accessibleDescription; |
|
713 |
#endif |
|
714 |
||
715 |
// Other variables. |
|
716 |
uint inheritedFontResolveMask; |
|
717 |
uint inheritedPaletteResolveMask; |
|
718 |
short leftmargin; |
|
719 |
short topmargin; |
|
720 |
short rightmargin; |
|
721 |
short bottommargin; |
|
722 |
signed char leftLayoutItemMargin; |
|
723 |
signed char topLayoutItemMargin; |
|
724 |
signed char rightLayoutItemMargin; |
|
725 |
signed char bottomLayoutItemMargin; |
|
726 |
static int instanceCounter; // Current number of widget instances |
|
727 |
static int maxInstances; // Maximum number of widget instances |
|
728 |
Qt::HANDLE hd; |
|
729 |
QWidgetData data; |
|
730 |
QSizePolicy size_policy; |
|
731 |
QLocale locale; |
|
732 |
QPoint redirectOffset; |
|
733 |
#ifndef QT_NO_ACTION |
|
734 |
QList<QAction*> actions; |
|
735 |
#endif |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
736 |
#ifndef QT_NO_GESTURES |
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
737 |
QMap<Qt::GestureType, Qt::GestureFlags> gestureContext; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
738 |
#endif |
0 | 739 |
|
740 |
// Bit fields. |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
741 |
uint high_attributes[4]; // the low ones are in QWidget::widget_attributes |
0 | 742 |
QPalette::ColorRole fg_role : 8; |
743 |
QPalette::ColorRole bg_role : 8; |
|
744 |
uint dirtyOpaqueChildren : 1; |
|
745 |
uint isOpaque : 1; |
|
746 |
uint inDirtyList : 1; |
|
747 |
uint isScrolled : 1; |
|
748 |
uint isMoved : 1; |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
3
diff
changeset
|
749 |
uint isGLWidget : 1; |
0 | 750 |
uint usesDoubleBufferedGLContext : 1; |
751 |
||
752 |
// *************************** Platform specific ************************************ |
|
753 |
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11 |
|
754 |
QX11Info xinfo; |
|
755 |
Qt::HANDLE picture; |
|
756 |
static QWidget *mouseGrabber; |
|
757 |
static QWidget *keyboardGrabber; |
|
758 |
||
759 |
void setWindowRole(); |
|
760 |
void sendStartupMessage(const char *message) const; |
|
761 |
void setNetWmWindowTypes(); |
|
762 |
void x11UpdateIsOpaque(); |
|
763 |
bool isBackgroundInherited() const; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
764 |
void updateX11AcceptFocus(); |
0 | 765 |
#elif defined(Q_WS_WIN) // <--------------------------------------------------------- WIN |
766 |
uint noPaintOnScreen : 1; // see qwidget_win.cpp ::paintEngine() |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
767 |
#ifndef QT_NO_GESTURES |
0 | 768 |
uint nativeGesturePanEnabled : 1; |
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
769 |
#endif |
0 | 770 |
bool shouldShowMaximizeButton(); |
771 |
void winUpdateIsOpaque(); |
|
772 |
void reparentChildren(); |
|
773 |
#ifndef QT_NO_DRAGANDDROP |
|
774 |
QOleDropTarget *registerOleDnd(QWidget *widget); |
|
775 |
void unregisterOleDnd(QWidget *widget, QOleDropTarget *target); |
|
776 |
#endif |
|
777 |
void grabMouseWhileInWindow(); |
|
778 |
void registerTouchWindow(); |
|
779 |
void winSetupGestures(); |
|
780 |
#elif defined(Q_WS_MAC) // <--------------------------------------------------------- MAC |
|
781 |
// This is new stuff |
|
782 |
uint needWindowChange : 1; |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
783 |
uint hasAlienChildren : 1; |
0 | 784 |
|
785 |
// Each wiget keeps a list of all its child and grandchild OpenGL widgets. |
|
786 |
// This list is used to update the gl context whenever a parent and a granparent |
|
787 |
// moves, and also to check for intersections with gl widgets within the window |
|
788 |
// when a widget moves. |
|
789 |
struct GlWidgetInfo |
|
790 |
{ |
|
791 |
GlWidgetInfo(QWidget *widget) : widget(widget), lastUpdateWidget(0) { } |
|
792 |
bool operator==(const GlWidgetInfo &other) const { return (widget == other.widget); } |
|
793 |
QWidget * widget; |
|
794 |
QWidget * lastUpdateWidget; |
|
795 |
}; |
|
796 |
||
797 |
// dirtyOnWidget contains the areas in the widget that needs to be repained, |
|
798 |
// in the same way as dirtyOnScreen does for the window. Areas are added in |
|
799 |
// dirtyWidget_sys and cleared in the paint event. In scroll_sys we then use |
|
800 |
// this information repaint invalid areas when widgets are scrolled. |
|
801 |
QRegion dirtyOnWidget; |
|
802 |
EventHandlerRef window_event; |
|
803 |
QList<GlWidgetInfo> glWidgets; |
|
804 |
||
805 |
//these are here just for code compat (HIViews) |
|
806 |
Qt::HANDLE qd_hd; |
|
807 |
||
808 |
void macUpdateSizeAttribute(); |
|
809 |
void macUpdateHideOnSuspend(); |
|
810 |
void macUpdateOpaqueSizeGrip(); |
|
811 |
void macUpdateIgnoreMouseEvents(); |
|
812 |
void macUpdateMetalAttribute(); |
|
813 |
void macUpdateIsOpaque(); |
|
814 |
void setEnabled_helper_sys(bool enable); |
|
815 |
bool isRealWindow() const; |
|
816 |
void adjustWithinMaxAndMinSize(int &w, int &h); |
|
817 |
void applyMaxAndMinSizeOnWindow(); |
|
818 |
void update_sys(const QRect &rect); |
|
819 |
void update_sys(const QRegion &rgn); |
|
820 |
void setGeometry_sys_helper(int, int, int, int, bool); |
|
821 |
void setWindowModified_sys(bool b); |
|
822 |
void updateMaximizeButton_sys(); |
|
823 |
void setWindowFilePath_sys(const QString &filePath); |
|
824 |
void createWindow_sys(); |
|
825 |
void recreateMacWindow(); |
|
826 |
#ifndef QT_MAC_USE_COCOA |
|
827 |
void initWindowPtr(); |
|
828 |
void finishCreateWindow_sys_Carbon(OSWindowRef windowRef); |
|
829 |
#else |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
830 |
void setSubWindowStacking(bool set); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
831 |
void setWindowLevel(); |
0 | 832 |
void finishCreateWindow_sys_Cocoa(void * /*NSWindow * */ windowRef); |
833 |
void syncCocoaMask(); |
|
834 |
void finishCocoaMaskSetup(); |
|
30
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
835 |
void syncUnifiedMode(); |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
836 |
// Did we add the drawRectOriginal method? |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
837 |
bool drawRectOriginalAdded; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
838 |
// Is the original drawRect method available? |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
839 |
bool originalDrawMethod; |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
840 |
// Do we need to change the methods? |
5dc02b23752f
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
841 |
bool changeMethods; |
0 | 842 |
#endif |
843 |
void determineWindowClass(); |
|
844 |
void transferChildren(); |
|
845 |
bool qt_mac_dnd_event(uint, DragRef); |
|
846 |
void toggleDrawers(bool); |
|
847 |
//mac event functions |
|
848 |
static bool qt_create_root_win(); |
|
849 |
static void qt_clean_root_win(); |
|
850 |
static bool qt_mac_update_sizer(QWidget *, int up = 0); |
|
851 |
static OSStatus qt_window_event(EventHandlerCallRef er, EventRef event, void *); |
|
852 |
static OSStatus qt_widget_event(EventHandlerCallRef er, EventRef event, void *); |
|
853 |
static bool qt_widget_rgn(QWidget *, short, RgnHandle, bool); |
|
854 |
void registerTouchWindow(); |
|
855 |
#elif defined(Q_WS_QWS) // <--------------------------------------------------------- QWS |
|
856 |
void setMaxWindowState_helper(); |
|
857 |
void setFullScreenSize_helper(); |
|
858 |
void moveSurface(QWindowSurface *surface, const QPoint &offset); |
|
859 |
QRegion localRequestedRegion() const; |
|
860 |
QRegion localAllocatedRegion() const; |
|
861 |
||
862 |
friend class QWSManager; |
|
863 |
friend class QWSManagerPrivate; |
|
864 |
friend class QDecoration; |
|
865 |
#ifndef QT_NO_CURSOR |
|
866 |
void updateCursor() const; |
|
867 |
#endif |
|
868 |
QScreen* getScreen() const; |
|
869 |
#elif defined(Q_OS_SYMBIAN) // <--------------------------------------------------------- SYMBIAN |
|
870 |
static QWidget *mouseGrabber; |
|
871 |
static QWidget *keyboardGrabber; |
|
872 |
void s60UpdateIsOpaque(); |
|
873 |
void reparentChildren(); |
|
874 |
void registerTouchWindow(); |
|
875 |
#endif |
|
876 |
||
877 |
}; |
|
878 |
||
879 |
struct QWidgetPaintContext |
|
880 |
{ |
|
881 |
inline QWidgetPaintContext(QPaintDevice *d, const QRegion &r, const QPoint &o, int f, |
|
882 |
QPainter *p, QWidgetBackingStore *b) |
|
883 |
: pdev(d), rgn(r), offset(o), flags(f), sharedPainter(p), backingStore(b), painter(0) {} |
|
884 |
||
885 |
QPaintDevice *pdev; |
|
886 |
QRegion rgn; |
|
887 |
QPoint offset; |
|
888 |
int flags; |
|
889 |
QPainter *sharedPainter; |
|
890 |
QWidgetBackingStore *backingStore; |
|
891 |
QPainter *painter; |
|
892 |
}; |
|
893 |
||
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
894 |
#ifndef QT_NO_GRAPHICSEFFECT |
0 | 895 |
class QWidgetEffectSourcePrivate : public QGraphicsEffectSourcePrivate |
896 |
{ |
|
897 |
public: |
|
898 |
QWidgetEffectSourcePrivate(QWidget *widget) |
|
899 |
: QGraphicsEffectSourcePrivate(), m_widget(widget), context(0), updateDueToGraphicsEffect(false) |
|
900 |
{} |
|
901 |
||
902 |
inline void detach() |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
903 |
{ m_widget->d_func()->graphicsEffect = 0; } |
0 | 904 |
|
905 |
inline const QGraphicsItem *graphicsItem() const |
|
906 |
{ return 0; } |
|
907 |
||
908 |
inline const QWidget *widget() const |
|
909 |
{ return m_widget; } |
|
910 |
||
911 |
inline void update() |
|
912 |
{ |
|
913 |
updateDueToGraphicsEffect = true; |
|
914 |
m_widget->update(); |
|
915 |
updateDueToGraphicsEffect = false; |
|
916 |
} |
|
917 |
||
918 |
inline bool isPixmap() const |
|
919 |
{ return false; } |
|
920 |
||
921 |
inline void effectBoundingRectChanged() |
|
922 |
{ |
|
923 |
// ### This function should take a rect parameter; then we can avoid |
|
924 |
// updating too much on the parent widget. |
|
925 |
if (QWidget *parent = m_widget->parentWidget()) |
|
926 |
parent->update(); |
|
927 |
else |
|
928 |
update(); |
|
929 |
} |
|
930 |
||
931 |
inline const QStyleOption *styleOption() const |
|
932 |
{ return 0; } |
|
933 |
||
934 |
inline QRect deviceRect() const |
|
935 |
{ return m_widget->window()->rect(); } |
|
936 |
||
937 |
QRectF boundingRect(Qt::CoordinateSystem system) const; |
|
938 |
void draw(QPainter *p); |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
939 |
QPixmap pixmap(Qt::CoordinateSystem system, QPoint *offset, |
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
940 |
QGraphicsEffect::PixmapPadMode mode) const; |
0 | 941 |
|
942 |
QWidget *m_widget; |
|
943 |
QWidgetPaintContext *context; |
|
944 |
QTransform lastEffectTransform; |
|
945 |
bool updateDueToGraphicsEffect; |
|
946 |
}; |
|
3
41300fa6a67c
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
947 |
#endif //QT_NO_GRAPHICSEFFECT |
0 | 948 |
|
949 |
inline QWExtra *QWidgetPrivate::extraData() const |
|
950 |
{ |
|
951 |
return extra; |
|
952 |
} |
|
953 |
||
954 |
inline QTLWExtra *QWidgetPrivate::topData() const |
|
955 |
{ |
|
956 |
const_cast<QWidgetPrivate *>(this)->createTLExtra(); |
|
957 |
return extra->topextra; |
|
958 |
} |
|
959 |
||
960 |
inline QTLWExtra *QWidgetPrivate::maybeTopData() const |
|
961 |
{ |
|
962 |
return extra ? extra->topextra : 0; |
|
963 |
} |
|
964 |
||
965 |
inline QPainter *QWidgetPrivate::sharedPainter() const |
|
966 |
{ |
|
967 |
Q_Q(const QWidget); |
|
968 |
QTLWExtra *x = q->window()->d_func()->maybeTopData(); |
|
969 |
return x ? x->sharedPainter : 0; |
|
970 |
} |
|
971 |
||
972 |
inline void QWidgetPrivate::setSharedPainter(QPainter *painter) |
|
973 |
{ |
|
974 |
Q_Q(QWidget); |
|
975 |
QTLWExtra *x = q->window()->d_func()->topData(); |
|
976 |
x->sharedPainter = painter; |
|
977 |
} |
|
978 |
||
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
979 |
inline bool QWidgetPrivate::pointInsideRectAndMask(const QPoint &p) const |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
980 |
{ |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
981 |
Q_Q(const QWidget); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
982 |
return q->rect().contains(p) && (!extra || !extra->hasMask || q->testAttribute(Qt::WA_MouseNoMask) |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
983 |
|| extra->mask.contains(p)); |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
984 |
} |
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
985 |
|
0 | 986 |
inline QWidgetBackingStore *QWidgetPrivate::maybeBackingStore() const |
987 |
{ |
|
988 |
Q_Q(const QWidget); |
|
989 |
QTLWExtra *x = q->window()->d_func()->maybeTopData(); |
|
33
3e2da88830cd
Revision: 201031
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
30
diff
changeset
|
990 |
return x ? x->backingStore.data() : 0; |
0 | 991 |
} |
992 |
||
993 |
QT_END_NAMESPACE |
|
994 |
||
995 |
#endif // QWIDGET_P_H |