author | kergoth <kergoth> | 2002-11-01 00:10:42 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-11-01 00:10:42 (UTC) |
commit | 5042e3cf0d3514552769e441f5aad590c8eaf967 (patch) (unidiff) | |
tree | 4a5ea45f3519d981a172ab5275bf38c6fa778dec /qmake/include/private | |
parent | 108c1c753e74e989cc13923086996791428c9af4 (diff) | |
download | opie-5042e3cf0d3514552769e441f5aad590c8eaf967.zip opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.gz opie-5042e3cf0d3514552769e441f5aad590c8eaf967.tar.bz2 |
Adding qmake in preperation for new build system
42 files changed, 7123 insertions, 0 deletions
diff --git a/qmake/include/private/qapplication_p.h b/qmake/include/private/qapplication_p.h new file mode 100644 index 0000000..6fab6b3 --- a/dev/null +++ b/qmake/include/private/qapplication_p.h | |||
@@ -0,0 +1,87 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some Qt private functions. | ||
5 | ** | ||
6 | ** Created : 000228 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QAPPLICATION_P_H | ||
39 | #define QAPPLICATION_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qapplication_*.cpp, qwidget*.cpp, qcolor_x11.cpp, qfiledialog.cpp | ||
48 | // and many other. This header file may change from version to version | ||
49 | // without notice, or even be removed. | ||
50 | // | ||
51 | // We mean it. | ||
52 | // | ||
53 | // | ||
54 | |||
55 | #ifndef QT_H | ||
56 | #endif // QT_H | ||
57 | |||
58 | class QWidget; | ||
59 | class QObject; | ||
60 | class QClipboard; | ||
61 | class QKeyEvent; | ||
62 | class QMouseEvent; | ||
63 | class QWheelEvent; | ||
64 | |||
65 | extern Q_EXPORT bool qt_modal_state(); | ||
66 | extern Q_EXPORT void qt_enter_modal( QWidget* ); | ||
67 | extern Q_EXPORT void qt_leave_modal( QWidget* ); | ||
68 | |||
69 | extern bool qt_is_gui_used; | ||
70 | #ifndef QT_NO_CLIPBOARD | ||
71 | extern QClipboard *qt_clipboard; | ||
72 | #endif | ||
73 | |||
74 | #if defined (Q_OS_WIN32) || defined (Q_OS_CYGWIN) | ||
75 | extern Qt::WindowsVersion qt_winver; | ||
76 | #endif | ||
77 | |||
78 | #if defined (Q_WS_X11) | ||
79 | extern int qt_ncols_option; | ||
80 | #endif | ||
81 | |||
82 | |||
83 | extern void qt_dispatchEnterLeave( QWidget*, QWidget* ); | ||
84 | |||
85 | |||
86 | |||
87 | #endif | ||
diff --git a/qmake/include/private/qcolor_p.h b/qmake/include/private/qcolor_p.h new file mode 100644 index 0000000..942a803 --- a/dev/null +++ b/qmake/include/private/qcolor_p.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Named color support for non-X platforms. | ||
5 | ** The color names have been borrowed from X. | ||
6 | ** | ||
7 | ** Created : 000228 | ||
8 | ** | ||
9 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
10 | ** | ||
11 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
12 | ** | ||
13 | ** This file may be distributed under the terms of the Q Public License | ||
14 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
15 | ** LICENSE.QPL included in the packaging of this file. | ||
16 | ** | ||
17 | ** This file may be distributed and/or modified under the terms of the | ||
18 | ** GNU General Public License version 2 as published by the Free Software | ||
19 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
20 | ** packaging of this file. | ||
21 | ** | ||
22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
23 | ** licenses may use this file in accordance with the Qt Commercial License | ||
24 | ** Agreement provided with the Software. | ||
25 | ** | ||
26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
28 | ** | ||
29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
30 | ** information about Qt Commercial License Agreements. | ||
31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
33 | ** | ||
34 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
35 | ** not clear to you. | ||
36 | ** | ||
37 | **********************************************************************/ | ||
38 | |||
39 | #ifndef QCOLOR_P_H | ||
40 | #define QCOLOR_P_H | ||
41 | |||
42 | |||
43 | // | ||
44 | // W A R N I N G | ||
45 | // ------------- | ||
46 | // | ||
47 | // This file is not part of the Qt API. It exists for the convenience | ||
48 | // of qmenudata.cpp, qmenubar.cpp, qmenubar.cpp, qpopupmenu.cpp, | ||
49 | // qmotifstyle.cpp and qwindowssstyle.cpp. This header file may change | ||
50 | // from version to version without notice, or even be removed. | ||
51 | // | ||
52 | // We mean it. | ||
53 | // | ||
54 | // | ||
55 | |||
56 | #ifndef QT_H | ||
57 | #endif // QT_H | ||
58 | |||
59 | extern uint qt_get_rgb_val( const char *name ); | ||
60 | extern bool qt_get_named_rgb( const char *, QRgb* ); | ||
61 | extern void qt_reset_color_avail(); | ||
62 | |||
63 | #endif | ||
diff --git a/qmake/include/private/qcom_p.h b/qmake/include/private/qcom_p.h new file mode 100644 index 0000000..6e7e1c8 --- a/dev/null +++ b/qmake/include/private/qcom_p.h | |||
@@ -0,0 +1,337 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** ... | ||
5 | ** | ||
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QCOM_H | ||
37 | #define QCOM_H | ||
38 | |||
39 | // | ||
40 | // W A R N I N G | ||
41 | // ------------- | ||
42 | // | ||
43 | // This file is not part of the Qt API. It exists for the convenience | ||
44 | // of a number of Qt sources files. This header file may change from | ||
45 | // version to version without notice, or even be removed. | ||
46 | // | ||
47 | // We mean it. | ||
48 | // | ||
49 | // | ||
50 | |||
51 | #ifndef QT_H | ||
52 | #include "qstringlist.h" | ||
53 | #include "quuid.h" | ||
54 | #endif // QT_H | ||
55 | |||
56 | #ifndef QT_NO_COMPONENT | ||
57 | |||
58 | class QObject; | ||
59 | struct QUInterfaceDescription; | ||
60 | struct QUObject; | ||
61 | |||
62 | #define QRESULT unsigned long | ||
63 | #define QS_OK (QRESULT)0x00000000 | ||
64 | #define QS_FALSE(QRESULT)0x00000001 | ||
65 | |||
66 | #define QE_NOTIMPL (QRESULT)0x80000001 | ||
67 | #define QE_OUTOFMEMORY (QRESULT)0x80000002 | ||
68 | #define QE_INVALIDARG(QRESULT)0x80000003 | ||
69 | #define QE_NOINTERFACE(QRESULT)0x80000004 | ||
70 | #define QE_NOCOMPONENT(QRESULT)0x80000005 | ||
71 | |||
72 | |||
73 | // {1D8518CD-E8F5-4366-99E8-879FD7E482DE} | ||
74 | #ifndef IID_QUnknown | ||
75 | #define IID_QUnknown QUuid(0x1d8518cd, 0xe8f5, 0x4366, 0x99, 0xe8, 0x87, 0x9f, 0xd7, 0xe4, 0x82, 0xde) | ||
76 | #endif | ||
77 | |||
78 | struct Q_EXPORT QUnknownInterface | ||
79 | { | ||
80 | virtual QRESULT queryInterface( const QUuid&, QUnknownInterface** ) = 0; | ||
81 | virtual ulong addRef() = 0; | ||
82 | virtual ulong release() = 0; | ||
83 | }; | ||
84 | |||
85 | // {FBAC965E-A441-413F-935E-CDF582573FAB} | ||
86 | #ifndef IID_QDispatch | ||
87 | #define IID_QDispatch QUuid( 0xfbac965e, 0xa441, 0x413f, 0x93, 0x5e, 0xcd, 0xf5, 0x82, 0x57, 0x3f, 0xab) | ||
88 | #endif | ||
89 | |||
90 | // the dispatch interface that inherits the unknown interface.. It is | ||
91 | // used to explore interfaces during runtime and to do dynamic calls. | ||
92 | struct Q_EXPORT QDispatchInterface : public QUnknownInterface | ||
93 | { | ||
94 | // returns the interface description of this dispatch interface. | ||
95 | virtual const QUInterfaceDescription* interfaceDescription() const = 0; | ||
96 | |||
97 | // returns the event description of this dispatch interface. | ||
98 | virtual const QUInterfaceDescription* eventsDescription() const = 0; | ||
99 | |||
100 | // invokes method id with parameters V*. Returns some sort of | ||
101 | // exception code. | ||
102 | virtual QRESULT invoke( int id, QUObject* o ) = 0; | ||
103 | |||
104 | // installs listener as event listener | ||
105 | virtual void installListener( QDispatchInterface* listener ) = 0; | ||
106 | |||
107 | // remove listener as event listener | ||
108 | virtual void removeListener( QDispatchInterface* listener ) = 0; | ||
109 | }; | ||
110 | |||
111 | template <class T> | ||
112 | class QInterfacePtr | ||
113 | { | ||
114 | public: | ||
115 | QInterfacePtr():iface(0){} | ||
116 | |||
117 | QInterfacePtr( T* i) { | ||
118 | if ( (iface = i) ) | ||
119 | iface->addRef(); | ||
120 | } | ||
121 | |||
122 | QInterfacePtr(const QInterfacePtr<T> &p) { | ||
123 | if ( (iface = p.iface) ) | ||
124 | iface->addRef(); | ||
125 | } | ||
126 | |||
127 | ~QInterfacePtr() { | ||
128 | if ( iface ) | ||
129 | iface->release(); | ||
130 | } | ||
131 | |||
132 | QInterfacePtr<T> &operator=(const QInterfacePtr<T> &p) { | ||
133 | if ( iface != p.iface ) { | ||
134 | if ( iface ) | ||
135 | iface->release(); | ||
136 | if ( (iface = p.iface) ) | ||
137 | iface->addRef(); | ||
138 | } | ||
139 | return *this; | ||
140 | } | ||
141 | |||
142 | QInterfacePtr<T> &operator=(T* i) { | ||
143 | if (iface != i ) { | ||
144 | if ( iface ) | ||
145 | iface->release(); | ||
146 | if ( (iface = i) ) | ||
147 | iface->addRef(); | ||
148 | } | ||
149 | return *this; | ||
150 | } | ||
151 | |||
152 | bool operator==( const QInterfacePtr<T> &p ) const { return iface == p.iface; } | ||
153 | |||
154 | bool operator!= ( const QInterfacePtr<T>& p ) const { return !( *this == p ); } | ||
155 | |||
156 | bool isNull() const { return !iface; } | ||
157 | |||
158 | T* operator->() const { return iface; } | ||
159 | |||
160 | T& operator*() const { return *iface; } | ||
161 | |||
162 | operator T*() const { return iface; } | ||
163 | |||
164 | QUnknownInterface** operator &() const { | ||
165 | if( iface ) | ||
166 | iface->release(); | ||
167 | return (QUnknownInterface**)&iface; | ||
168 | } | ||
169 | |||
170 | T** operator &() { | ||
171 | if ( iface ) | ||
172 | iface->release(); | ||
173 | return &iface; | ||
174 | } | ||
175 | |||
176 | private: | ||
177 | T* iface; | ||
178 | }; | ||
179 | |||
180 | // {10A1501B-4C5F-4914-95DD-C400486CF900} | ||
181 | #ifndef IID_QObject | ||
182 | #define IID_QObject QUuid( 0x10a1501b, 0x4c5f, 0x4914, 0x95, 0xdd, 0xc4, 0x00, 0x48, 0x6c, 0xf9, 0x00) | ||
183 | #endif | ||
184 | |||
185 | struct Q_EXPORT QObjectInterface | ||
186 | { | ||
187 | virtual QObject* qObject() = 0; | ||
188 | }; | ||
189 | |||
190 | // {5F3968A5-F451-45b1-96FB-061AD98F926E} | ||
191 | #ifndef IID_QComponentInformation | ||
192 | #define IID_QComponentInformation QUuid(0x5f3968a5, 0xf451, 0x45b1, 0x96, 0xfb, 0x6, 0x1a, 0xd9, 0x8f, 0x92, 0x6e) | ||
193 | #endif | ||
194 | |||
195 | struct Q_EXPORT QComponentInformationInterface : public QUnknownInterface | ||
196 | { | ||
197 | virtual QString name() const = 0; | ||
198 | virtual QString description() const = 0; | ||
199 | virtual QString author() const = 0; | ||
200 | virtual QString version() const = 0; | ||
201 | }; | ||
202 | |||
203 | // {6CAA771B-17BB-4988-9E78-BA5CDDAAC31E} | ||
204 | #ifndef IID_QComponentFactory | ||
205 | #define IID_QComponentFactory QUuid( 0x6caa771b, 0x17bb, 0x4988, 0x9e, 0x78, 0xba, 0x5c, 0xdd, 0xaa, 0xc3, 0x1e) | ||
206 | #endif | ||
207 | |||
208 | struct Q_EXPORT QComponentFactoryInterface : public QUnknownInterface | ||
209 | { | ||
210 | virtual QRESULT createInstance( const QUuid &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer ) = 0; | ||
211 | }; | ||
212 | |||
213 | // {D16111D4-E1E7-4C47-8599-24483DAE2E07} | ||
214 | #ifndef IID_QLibrary | ||
215 | #define IID_QLibrary QUuid( 0xd16111d4, 0xe1e7, 0x4c47, 0x85, 0x99, 0x24, 0x48, 0x3d, 0xae, 0x2e, 0x07) | ||
216 | #endif | ||
217 | |||
218 | struct Q_EXPORT QLibraryInterface : public QUnknownInterface | ||
219 | { | ||
220 | virtual bool init() = 0; | ||
221 | virtual void cleanup() = 0; | ||
222 | virtual bool canUnload() const = 0; | ||
223 | }; | ||
224 | |||
225 | // {3F8FDC44-3015-4f3e-B6D6-E4AAAABDEAAD} | ||
226 | #ifndef IID_QFeatureList | ||
227 | #define IID_QFeatureList QUuid(0x3f8fdc44, 0x3015, 0x4f3e, 0xb6, 0xd6, 0xe4, 0xaa, 0xaa, 0xbd, 0xea, 0xad) | ||
228 | #endif | ||
229 | |||
230 | struct Q_EXPORT QFeatureListInterface : public QUnknownInterface | ||
231 | { | ||
232 | virtual QStringListfeatureList() const = 0; | ||
233 | }; | ||
234 | |||
235 | // {B5FEB5DE-E0CD-4E37-B0EB-8A812499A0C1} | ||
236 | #ifndef IID_QComponentRegistration | ||
237 | #define IID_QComponentRegistration QUuid( 0xb5feb5de, 0xe0cd, 0x4e37, 0xb0, 0xeb, 0x8a, 0x81, 0x24, 0x99, 0xa0, 0xc1) | ||
238 | #endif | ||
239 | |||
240 | struct Q_EXPORT QComponentRegistrationInterface : public QUnknownInterface | ||
241 | { | ||
242 | virtual bool registerComponents( const QString &filepath ) const = 0; | ||
243 | virtual bool unregisterComponents() const = 0; | ||
244 | }; | ||
245 | |||
246 | // internal class that wraps an initialized ulong | ||
247 | struct Q_EXPORT QtULong | ||
248 | { | ||
249 | QtULong() : ref( 0 ) { } | ||
250 | operator unsigned long () const { return ref; } | ||
251 | unsigned long& operator++() { return ++ref; } | ||
252 | unsigned long operator++( int ) { return ref++; } | ||
253 | unsigned long& operator--() { return --ref; } | ||
254 | unsigned long operator--( int ) { return ref--; } | ||
255 | |||
256 | unsigned long ref; | ||
257 | }; | ||
258 | // default implementation of ref counting. A variable "ulong ref" has to be a member | ||
259 | |||
260 | |||
261 | #define Q_REFCOUNT \ | ||
262 | private: \ | ||
263 | QtULong qtrefcount; \ | ||
264 | public: \ | ||
265 | ulong addRef() {return qtrefcount++;} \ | ||
266 | ulong release() {if(!--qtrefcount){delete this;return 0;}return qtrefcount;} | ||
267 | |||
268 | #ifndef Q_EXPORT_COMPONENT | ||
269 | #if defined(QT_THREAD_SUPPORT) | ||
270 | #define QT_THREADED_BUILD 1 | ||
271 | #define Q_UCM_FLAGS_STRING "11" | ||
272 | #else | ||
273 | #define QT_THREADED_BUILD 0 | ||
274 | #define Q_UCM_FLAGS_STRING "01" | ||
275 | #endif | ||
276 | |||
277 | #ifndef Q_EXTERN_C | ||
278 | #ifdef __cplusplus | ||
279 | #define Q_EXTERN_C extern "C" | ||
280 | #else | ||
281 | #define Q_EXTERN_C extern | ||
282 | #endif | ||
283 | #endif | ||
284 | |||
285 | // this is duplicated at Q_PLUGIN_VERIFICATION_DATA in qgplugin.h | ||
286 | // NOTE: if you change pattern, you MUST change the pattern in | ||
287 | // qcomlibrary.cpp as well. changing the pattern will break all | ||
288 | // backwards compatibility as well (no old plugins will be loaded). | ||
289 | #ifndef Q_UCM_VERIFICATION_DATA | ||
290 | # define Q_UCM_VERIFICATION_DATA \ | ||
291 | static const char *qt_ucm_verification_data = \ | ||
292 | "pattern=""QT_UCM_VERIFICATION_DATA""\n" \ | ||
293 | "version="QT_VERSION_STR"\n" \ | ||
294 | "flags="Q_UCM_FLAGS_STRING"\n" \ | ||
295 | "buildkey="QT_BUILD_KEY"\0"; | ||
296 | #endif // Q_UCM_VERIFICATION_DATA | ||
297 | |||
298 | // This macro expands to the default implementation of ucm_instantiate. | ||
299 | #ifndef Q_CREATE_INSTANCE | ||
300 | # define Q_CREATE_INSTANCE( IMPLEMENTATION ) \ | ||
301 | IMPLEMENTATION *i = new IMPLEMENTATION; \ | ||
302 | QUnknownInterface* iface = 0; \ | ||
303 | i->queryInterface( IID_QUnknown, &iface );\ | ||
304 | return iface; | ||
305 | #endif // Q_CREATE_INSTANCE | ||
306 | |||
307 | # ifdef Q_WS_WIN | ||
308 | #ifdef Q_CC_BOR | ||
309 | # define Q_EXPORT_COMPONENT() \ | ||
310 | Q_UCM_VERIFICATION_DATA \ | ||
311 | Q_EXTERN_C __declspec(dllexport) \ | ||
312 | const char * __stdcall qt_ucm_query_verification_data() \ | ||
313 | { return qt_ucm_verification_data; } \ | ||
314 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* \ | ||
315 | __stdcall ucm_instantiate() | ||
316 | #else | ||
317 | # define Q_EXPORT_COMPONENT() \ | ||
318 | Q_UCM_VERIFICATION_DATA \ | ||
319 | Q_EXTERN_C __declspec(dllexport) \ | ||
320 | const char *qt_ucm_query_verification_data() \ | ||
321 | { return qt_ucm_verification_data; } \ | ||
322 | Q_EXTERN_C __declspec(dllexport) QUnknownInterface* ucm_instantiate() | ||
323 | #endif | ||
324 | # else | ||
325 | #define Q_EXPORT_COMPONENT() \ | ||
326 | Q_UCM_VERIFICATION_DATA \ | ||
327 | Q_EXTERN_C \ | ||
328 | const char *qt_ucm_query_verification_data() \ | ||
329 | { return qt_ucm_verification_data; } \ | ||
330 | Q_EXTERN_C QUnknownInterface* ucm_instantiate() | ||
331 | # endif | ||
332 | # define Q_EXPORT_INTERFACE() Q_EXPORT_COMPONENT() | ||
333 | #endif | ||
334 | |||
335 | #endif //QT_NO_COMPONENT | ||
336 | |||
337 | #endif //QCOM_H | ||
diff --git a/qmake/include/private/qcomlibrary_p.h b/qmake/include/private/qcomlibrary_p.h new file mode 100644 index 0000000..f52f679 --- a/dev/null +++ b/qmake/include/private/qcomlibrary_p.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QComLibrary class | ||
5 | ** | ||
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QUCOMLIBRARY_H | ||
37 | #define QUCOMLIBRARY_H | ||
38 | |||
39 | // | ||
40 | // W A R N I N G | ||
41 | // ------------- | ||
42 | // | ||
43 | // This file is not part of the Qt API. It exists for the convenience | ||
44 | // of a number of Qt sources files. This header file may change from | ||
45 | // version to version without notice, or even be removed. | ||
46 | // | ||
47 | // We mean it. | ||
48 | // | ||
49 | // | ||
50 | |||
51 | #ifndef QT_H | ||
52 | #include "qcom_p.h" | ||
53 | #include "qlibrary.h" | ||
54 | #endif // QT_H | ||
55 | |||
56 | #ifndef QT_NO_COMPONENT | ||
57 | |||
58 | class Q_EXPORT QComLibrary : public QLibrary | ||
59 | { | ||
60 | public: | ||
61 | QComLibrary( const QString &filename ); | ||
62 | ~QComLibrary(); | ||
63 | |||
64 | bool unload(); | ||
65 | QRESULT queryInterface( const QUuid &iid, QUnknownInterface **iface ); | ||
66 | uint qtVersion(); | ||
67 | |||
68 | private: | ||
69 | void createInstanceInternal(); | ||
70 | |||
71 | QUnknownInterface *entry; | ||
72 | QLibraryInterface *libiface; | ||
73 | uint qt_version; | ||
74 | |||
75 | }; | ||
76 | |||
77 | #endif //QT_NO_COMPONENT | ||
78 | |||
79 | #endif // QUCOMLIBRARY_H | ||
diff --git a/qmake/include/private/qcomplextext_p.h b/qmake/include/private/qcomplextext_p.h new file mode 100644 index 0000000..2132522 --- a/dev/null +++ b/qmake/include/private/qcomplextext_p.h | |||
@@ -0,0 +1,123 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Internal header file. | ||
5 | ** | ||
6 | ** Created : | ||
7 | ** | ||
8 | ** Copyright (C) 2001 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QCOMPLEXTEXT_H | ||
39 | #define QCOMPLEXTEXT_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of Qt Remote Control. This header file may change from version to | ||
47 | // version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | #ifndef QT_H | ||
54 | #include <qstring.h> | ||
55 | #include <qpointarray.h> | ||
56 | #include <qfont.h> | ||
57 | #include <qpainter.h> | ||
58 | #include <qptrlist.h> | ||
59 | #include <qshared.h> | ||
60 | #endif // QT_H | ||
61 | |||
62 | #ifndef QT_NO_COMPLEXTEXT | ||
63 | |||
64 | // bidi helper classes. Internal to Qt | ||
65 | struct Q_EXPORT QBidiStatus { | ||
66 | QBidiStatus() { | ||
67 | eor = QChar::DirON; | ||
68 | lastStrong = QChar::DirON; | ||
69 | last = QChar:: DirON; | ||
70 | } | ||
71 | QChar::Direction eor; | ||
72 | QChar::Direction lastStrong; | ||
73 | QChar::Direction last; | ||
74 | }; | ||
75 | |||
76 | struct Q_EXPORT QBidiContext : public QShared { | ||
77 | // ### ref and deref parent? | ||
78 | QBidiContext( uchar level, QChar::Direction embedding, QBidiContext *parent = 0, bool override = FALSE ); | ||
79 | ~QBidiContext(); | ||
80 | |||
81 | unsigned char level; | ||
82 | bool override : 1; | ||
83 | QChar::Direction dir : 5; | ||
84 | |||
85 | QBidiContext *parent; | ||
86 | }; | ||
87 | |||
88 | struct Q_EXPORT QBidiControl { | ||
89 | QBidiControl() { context = 0; } | ||
90 | QBidiControl( QBidiContext *c, QBidiStatus s) | ||
91 | { context = c; if( context ) context->ref(); status = s; } | ||
92 | ~QBidiControl() { if ( context && context->deref() ) delete context; } | ||
93 | void setContext( QBidiContext *c ) { if ( context == c ) return; if ( context && context->deref() ) delete context; context = c; context->ref(); } | ||
94 | QBidiContext *context; | ||
95 | QBidiStatus status; | ||
96 | }; | ||
97 | |||
98 | struct Q_EXPORT QTextRun { | ||
99 | QTextRun(int _start, int _stop, QBidiContext *context, QChar::Direction dir); | ||
100 | |||
101 | int start; | ||
102 | int stop; | ||
103 | // explicit + implicit levels here | ||
104 | uchar level; | ||
105 | }; | ||
106 | |||
107 | class Q_EXPORT QComplexText { | ||
108 | public: | ||
109 | static QString shapedString( const QString &str, int from = 0, int len = -1, QPainter::TextDirection dir = QPainter::Auto, const QFontMetrics *fm = 0); | ||
110 | static QChar shapedCharacter(const QString &str, int pos, const QFontMetrics *fm = 0); | ||
111 | |||
112 | // positions non spacing marks relative to the base character at position pos. | ||
113 | static QPointArray positionMarks( QFontPrivate *f, const QString &str, int pos, QRect *boundingRect = 0 ); | ||
114 | |||
115 | static QPtrList<QTextRun> *bidiReorderLine( QBidiControl *control, const QString &str, int start, int len, | ||
116 | QChar::Direction basicDir = QChar::DirON ); | ||
117 | static QString bidiReorderString( const QString &str, QChar::Direction basicDir = QChar::DirON ); | ||
118 | }; | ||
119 | |||
120 | |||
121 | #endif //QT_NO_COMPLEXTEXT | ||
122 | |||
123 | #endif | ||
diff --git a/qmake/include/private/qcomponentfactory_p.h b/qmake/include/private/qcomponentfactory_p.h new file mode 100644 index 0000000..1ac973f --- a/dev/null +++ b/qmake/include/private/qcomponentfactory_p.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of the QComponentFactory class | ||
5 | ** | ||
6 | ** Created : 990101 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QCOMPONENTFACTORY_H | ||
39 | #define QCOMPONENTFACTORY_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include "qcom_p.h" | ||
43 | #endif // QT_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 a number of Qt sources files. This header file may change from | ||
51 | // version to version without notice, or even be removed. | ||
52 | // | ||
53 | // We mean it. | ||
54 | // | ||
55 | // | ||
56 | |||
57 | #ifndef QT_NO_COMPONENT | ||
58 | |||
59 | class Q_EXPORT QComponentFactory | ||
60 | { | ||
61 | public: | ||
62 | static QRESULT createInstance( const QString &cid, const QUuid &iid, QUnknownInterface** instance, QUnknownInterface *outer = 0 ); | ||
63 | static QRESULT registerServer( const QString &filename ); | ||
64 | static QRESULT unregisterServer( const QString &filename ); | ||
65 | |||
66 | static bool registerComponent( const QUuid &cid, const QString &filename, const QString &name = QString::null, | ||
67 | int version = 0, const QString &description = QString::null ); | ||
68 | static bool unregisterComponent( const QUuid &cid ); | ||
69 | }; | ||
70 | |||
71 | #endif // QT_NO_COMPONENT | ||
72 | |||
73 | #endif // QCOMPONENTFACTORY_H | ||
diff --git a/qmake/include/private/qcriticalsection_p.h b/qmake/include/private/qcriticalsection_p.h new file mode 100644 index 0000000..7d9feca --- a/dev/null +++ b/qmake/include/private/qcriticalsection_p.h | |||
@@ -0,0 +1,80 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QCriticalSection class | ||
5 | ** | ||
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QCRITICALSECTION_H | ||
37 | #define QCRITICALSECTION_H | ||
38 | |||
39 | #ifndef QT_H | ||
40 | #endif // QT_H | ||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of Qt Remote Control. This header file may change from version to | ||
48 | // version without notice, or even be removed. | ||
49 | // | ||
50 | // We mean it. | ||
51 | // | ||
52 | // | ||
53 | |||
54 | #if defined(QT_THREAD_SUPPORT) | ||
55 | |||
56 | #if defined(Q_WS_WIN) | ||
57 | |||
58 | /* | ||
59 | QCriticalSection | ||
60 | */ | ||
61 | |||
62 | class QCriticalSectionPrivate; | ||
63 | |||
64 | class QCriticalSection | ||
65 | { | ||
66 | public: | ||
67 | QCriticalSection(); | ||
68 | ~QCriticalSection(); | ||
69 | void enter(); | ||
70 | void leave(); | ||
71 | |||
72 | private: | ||
73 | QCriticalSectionPrivate *d; | ||
74 | }; | ||
75 | |||
76 | #endif | ||
77 | |||
78 | #endif | ||
79 | |||
80 | #endif | ||
diff --git a/qmake/include/private/qdir_p.h b/qmake/include/private/qdir_p.h new file mode 100644 index 0000000..35dba28 --- a/dev/null +++ b/qmake/include/private/qdir_p.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some private QDir functions. | ||
5 | ** | ||
6 | ** Created : 2000.11.06 | ||
7 | ** | ||
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QDIR_P_H | ||
39 | #define QDIR_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qdir.cpp and qdir_*.cpp. | ||
48 | // This header file may change from version to version without notice, | ||
49 | // or even be removed. | ||
50 | // | ||
51 | // We mean it. | ||
52 | // | ||
53 | // | ||
54 | |||
55 | #ifndef QT_H | ||
56 | #endif // QT_H | ||
57 | |||
58 | extern QStringList qt_makeFilterList( const QString & ); | ||
59 | |||
60 | |||
61 | extern int qt_cmp_si_sortSpec; | ||
62 | |||
63 | #if defined(Q_C_CALLBACKS) | ||
64 | extern "C" { | ||
65 | #endif | ||
66 | |||
67 | #ifdef Q_OS_TEMP | ||
68 | extern int __cdecl qt_cmp_si( const void *, const void * ); | ||
69 | #else | ||
70 | extern int qt_cmp_si( const void *, const void * ); | ||
71 | #endif | ||
72 | |||
73 | #if defined(Q_C_CALLBACKS) | ||
74 | } | ||
75 | #endif | ||
76 | |||
77 | |||
78 | #endif // QDIR_P_H | ||
diff --git a/qmake/include/private/qeffects_p.h b/qmake/include/private/qeffects_p.h new file mode 100644 index 0000000..4178b6f --- a/dev/null +++ b/qmake/include/private/qeffects_p.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QEffects functions | ||
5 | ** | ||
6 | ** Created : 2000.06.21 | ||
7 | ** | ||
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the widgets module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QEFFECTS_P_H | ||
39 | #define QEFFECTS_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qeffects.cpp, qcombobox.cpp, qpopupmenu.cpp and qtooltip.cpp. | ||
48 | // This header file may change from version to version without notice, | ||
49 | // or even be removed. | ||
50 | // | ||
51 | // We mean it. | ||
52 | // | ||
53 | // | ||
54 | |||
55 | #ifndef QT_H | ||
56 | #include "qnamespace.h" | ||
57 | #endif // QT_H | ||
58 | |||
59 | #ifndef QT_NO_EFFECTS | ||
60 | class QWidget; | ||
61 | |||
62 | struct QEffects | ||
63 | { | ||
64 | enum Direction { | ||
65 | LeftScroll= 0x0001, | ||
66 | RightScroll= 0x0002, | ||
67 | UpScroll= 0x0004, | ||
68 | DownScroll= 0x0008 | ||
69 | }; | ||
70 | |||
71 | typedef uint DirFlags; | ||
72 | }; | ||
73 | |||
74 | extern void Q_EXPORT qScrollEffect( QWidget*, QEffects::DirFlags dir = QEffects::DownScroll, int time = -1 ); | ||
75 | extern void Q_EXPORT qFadeEffect( QWidget*, int time = -1 ); | ||
76 | #endif // QT_NO_EFFECTS | ||
77 | |||
78 | #endif // QEFFECTS_P_H | ||
diff --git a/qmake/include/private/qeventloop_p.h b/qmake/include/private/qeventloop_p.h new file mode 100644 index 0000000..b64d0df --- a/dev/null +++ b/qmake/include/private/qeventloop_p.h | |||
@@ -0,0 +1,74 @@ | |||
1 | #ifndef QEVENTLOOP_P_H | ||
2 | #define QEVENTLOOP_P_H | ||
3 | |||
4 | #include "qplatformdefs.h" | ||
5 | #include "qwindowdefs.h" | ||
6 | |||
7 | class QSocketNotifier; | ||
8 | |||
9 | #if defined(Q_OS_UNIX) | ||
10 | #include <qptrlist.h> | ||
11 | |||
12 | struct QSockNot | ||
13 | { | ||
14 | QSocketNotifier *obj; | ||
15 | int fd; | ||
16 | fd_set *queue; | ||
17 | }; | ||
18 | |||
19 | class QSockNotType | ||
20 | { | ||
21 | public: | ||
22 | QSockNotType(); | ||
23 | ~QSockNotType(); | ||
24 | |||
25 | QPtrList<QSockNot> *list; | ||
26 | fd_set select_fds; | ||
27 | fd_set enabled_fds; | ||
28 | fd_set pending_fds; | ||
29 | |||
30 | }; | ||
31 | #endif // Q_OS_UNIX | ||
32 | |||
33 | |||
34 | class QEventLoopPrivate | ||
35 | { | ||
36 | public: | ||
37 | QEventLoopPrivate() | ||
38 | { | ||
39 | reset(); | ||
40 | } | ||
41 | |||
42 | void reset() { | ||
43 | looplevel = 0; | ||
44 | quitcode = 0; | ||
45 | quitnow = FALSE; | ||
46 | exitloop = FALSE; | ||
47 | } | ||
48 | |||
49 | int looplevel; | ||
50 | int quitcode; | ||
51 | bool quitnow; | ||
52 | bool exitloop; | ||
53 | |||
54 | #if defined(Q_WS_MAC) | ||
55 | EventLoopTimerRef select_timer; | ||
56 | #endif | ||
57 | |||
58 | #if defined(Q_WS_X11) | ||
59 | int xfd; | ||
60 | #endif // Q_WS_X11 | ||
61 | |||
62 | #if defined(Q_OS_UNIX) | ||
63 | int thread_pipe[2]; | ||
64 | |||
65 | // pending socket notifiers list | ||
66 | QPtrList<QSockNot> sn_pending_list; | ||
67 | // highest fd for all socket notifiers | ||
68 | int sn_highest; | ||
69 | // 3 socket notifier types - read, write and exception | ||
70 | QSockNotType sn_vec[3]; | ||
71 | #endif | ||
72 | }; | ||
73 | |||
74 | #endif // QEVENTLOOP_P_H | ||
diff --git a/qmake/include/private/qfiledefs_p.h b/qmake/include/private/qfiledefs_p.h new file mode 100644 index 0000000..627717f --- a/dev/null +++ b/qmake/include/private/qfiledefs_p.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Common macros and system include files for QFile, QFileInfo and QDir. | ||
5 | ** | ||
6 | ** Created : 930812 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2001 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QFILEDEFS_P_H | ||
39 | #define QFILEDEFS_P_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of qfileinfo*.cpp. This header file may change from version to version | ||
47 | // without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | // Be sure to include qplatformdefs.h first! | ||
54 | struct QFileInfoCache | ||
55 | { | ||
56 | #if defined(Q_WS_WIN) | ||
57 | QT_STATBUF st; | ||
58 | #else | ||
59 | struct stat st; | ||
60 | #endif | ||
61 | }; | ||
62 | |||
63 | |||
64 | #endif | ||
diff --git a/qmake/include/private/qfontcodecs_p.h b/qmake/include/private/qfontcodecs_p.h new file mode 100644 index 0000000..8222f98 --- a/dev/null +++ b/qmake/include/private/qfontcodecs_p.h | |||
@@ -0,0 +1,368 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Font utilities for X11 | ||
5 | ** | ||
6 | ** Created : 20001101 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QFONTCODECS_P_H | ||
39 | #define QFONTCODECS_P_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of qfontencodings_x11.cpp and qfont_x11.cpp. This header file may | ||
47 | // change from version to version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | #ifndef QT_H | ||
54 | #include <qglobal.h> | ||
55 | #include <qtextcodec.h> | ||
56 | #endif // QT_H | ||
57 | |||
58 | |||
59 | #ifndef QT_NO_CODECS | ||
60 | #ifndef QT_NO_BIG_CODECS | ||
61 | |||
62 | |||
63 | class QJpUnicodeConv; | ||
64 | |||
65 | |||
66 | class QFontJis0201Codec : public QTextCodec | ||
67 | { | ||
68 | public: | ||
69 | QFontJis0201Codec(); | ||
70 | |||
71 | const char *name() const; | ||
72 | |||
73 | int mibEnum() const; | ||
74 | |||
75 | #if !defined(Q_NO_USING_KEYWORD) | ||
76 | using QTextCodec::fromUnicode; | ||
77 | #endif | ||
78 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
79 | |||
80 | int heuristicContentMatch(const char *, int) const; | ||
81 | int heuristicNameMatch(const char* hint) const; | ||
82 | |||
83 | #if !defined(Q_NO_USING_KEYWORD) | ||
84 | using QTextCodec::canEncode; | ||
85 | #endif | ||
86 | bool canEncode( QChar ) const; | ||
87 | }; | ||
88 | |||
89 | |||
90 | class QFontJis0208Codec : public QTextCodec | ||
91 | { | ||
92 | public: | ||
93 | QFontJis0208Codec(); | ||
94 | ~QFontJis0208Codec(); | ||
95 | |||
96 | // Return the official name for the encoding. | ||
97 | const char* name() const ; | ||
98 | |||
99 | // Return the MIB enum for the encoding if it is listed in the | ||
100 | // IANA character-sets encoding file. | ||
101 | int mibEnum() const ; | ||
102 | |||
103 | // Converts len characters from chars to Unicode. | ||
104 | QString toUnicode(const char* chars, int len) const ; | ||
105 | |||
106 | // Converts lenInOut characters (of type QChar) from the start of | ||
107 | // the string uc, returning a QCString result, and also returning | ||
108 | // the length of the result in lenInOut. | ||
109 | #if !defined(Q_NO_USING_KEYWORD) | ||
110 | using QTextCodec::fromUnicode; | ||
111 | #endif | ||
112 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
113 | |||
114 | int heuristicContentMatch(const char *, int) const; | ||
115 | int heuristicNameMatch(const char* hint) const; | ||
116 | |||
117 | #if !defined(Q_NO_USING_KEYWORD) | ||
118 | using QTextCodec::canEncode; | ||
119 | #endif | ||
120 | bool canEncode( QChar ) const; | ||
121 | |||
122 | private: | ||
123 | QJpUnicodeConv *convJP; | ||
124 | }; | ||
125 | |||
126 | |||
127 | |||
128 | |||
129 | class QFontKsc5601Codec : public QTextCodec | ||
130 | { | ||
131 | public: | ||
132 | QFontKsc5601Codec(); | ||
133 | |||
134 | // Return the official name for the encoding. | ||
135 | const char* name() const ; | ||
136 | |||
137 | // Return the MIB enum for the encoding if it is listed in the | ||
138 | // IANA character-sets encoding file. | ||
139 | int mibEnum() const ; | ||
140 | |||
141 | // Converts len characters from chars to Unicode. | ||
142 | QString toUnicode(const char* chars, int len) const ; | ||
143 | |||
144 | // Converts lenInOut characters (of type QChar) from the start of | ||
145 | // the string uc, returning a QCString result, and also returning | ||
146 | // the length of the result in lenInOut. | ||
147 | #if !defined(Q_NO_USING_KEYWORD) | ||
148 | using QTextCodec::fromUnicode; | ||
149 | #endif | ||
150 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
151 | |||
152 | int heuristicContentMatch(const char *, int) const; | ||
153 | #if !defined(Q_NO_USING_KEYWORD) | ||
154 | using QTextCodec::canEncode; | ||
155 | #endif | ||
156 | bool canEncode( QChar ) const; | ||
157 | }; | ||
158 | |||
159 | |||
160 | |||
161 | |||
162 | class QFontGb2312Codec : public QTextCodec | ||
163 | { | ||
164 | public: | ||
165 | QFontGb2312Codec(); | ||
166 | |||
167 | // Return the official name for the encoding. | ||
168 | const char* name() const ; | ||
169 | |||
170 | // Return the MIB enum for the encoding if it is listed in the | ||
171 | // IANA character-sets encoding file. | ||
172 | int mibEnum() const ; | ||
173 | |||
174 | // Converts len characters from chars to Unicode. | ||
175 | QString toUnicode(const char* chars, int len) const ; | ||
176 | |||
177 | // Converts lenInOut characters (of type QChar) from the start of | ||
178 | // the string uc, returning a QCString result, and also returning | ||
179 | // the length of the result in lenInOut. | ||
180 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
181 | |||
182 | int heuristicContentMatch(const char *, int) const; | ||
183 | bool canEncode( QChar ) const; | ||
184 | }; | ||
185 | |||
186 | |||
187 | |||
188 | |||
189 | class QFontGbkCodec : public QTextCodec | ||
190 | { | ||
191 | public: | ||
192 | QFontGbkCodec(); | ||
193 | |||
194 | // Return the official name for the encoding. | ||
195 | const char* name() const ; | ||
196 | |||
197 | // Return the MIB enum for the encoding if it is listed in the | ||
198 | // IANA character-sets encoding file. | ||
199 | int mibEnum() const ; | ||
200 | |||
201 | // Converts len characters from chars to Unicode. | ||
202 | QString toUnicode(const char* chars, int len) const ; | ||
203 | |||
204 | // Converts lenInOut characters (of type QChar) from the start of | ||
205 | // the string uc, returning a QCString result, and also returning | ||
206 | // the length of the result in lenInOut. | ||
207 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
208 | |||
209 | int heuristicContentMatch(const char *, int) const; | ||
210 | int heuristicNameMatch(const char* hint) const; | ||
211 | bool canEncode( QChar ) const; | ||
212 | }; | ||
213 | |||
214 | |||
215 | |||
216 | |||
217 | class QFontGb18030_0Codec : public QTextCodec | ||
218 | { | ||
219 | public: | ||
220 | QFontGb18030_0Codec(); | ||
221 | |||
222 | // Return the official name for the encoding. | ||
223 | const char* name() const ; | ||
224 | |||
225 | // Return the MIB enum for the encoding if it is listed in the | ||
226 | // IANA character-sets encoding file. | ||
227 | int mibEnum() const ; | ||
228 | |||
229 | // Converts len characters from chars to Unicode. | ||
230 | QString toUnicode(const char* chars, int len) const ; | ||
231 | |||
232 | // Converts lenInOut characters (of type QChar) from the start of | ||
233 | // the string uc, returning a QCString result, and also returning | ||
234 | // the length of the result in lenInOut. | ||
235 | #if !defined(Q_NO_USING_KEYWORD) | ||
236 | using QTextCodec::fromUnicode; | ||
237 | #endif | ||
238 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
239 | |||
240 | int heuristicContentMatch(const char *, int) const; | ||
241 | #if !defined(Q_NO_USING_KEYWORD) | ||
242 | using QTextCodec::canEncode; | ||
243 | #endif | ||
244 | bool canEncode( QChar ) const; | ||
245 | }; | ||
246 | |||
247 | |||
248 | |||
249 | |||
250 | class QFontBig5Codec : public QTextCodec | ||
251 | { | ||
252 | public: | ||
253 | QFontBig5Codec(); | ||
254 | |||
255 | // Return the official name for the encoding. | ||
256 | const char* name() const ; | ||
257 | |||
258 | // Return the MIB enum for the encoding if it is listed in the | ||
259 | // IANA character-sets encoding file. | ||
260 | int mibEnum() const ; | ||
261 | |||
262 | // Converts len characters from chars to Unicode. | ||
263 | QString toUnicode(const char* chars, int len) const ; | ||
264 | |||
265 | // Converts lenInOut characters (of type QChar) from the start of | ||
266 | // the string uc, returning a QCString result, and also returning | ||
267 | // the length of the result in lenInOut. | ||
268 | #if !defined(Q_NO_USING_KEYWORD) | ||
269 | using QTextCodec::fromUnicode; | ||
270 | #endif | ||
271 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
272 | |||
273 | int heuristicContentMatch(const char *, int) const; | ||
274 | #if !defined(Q_NO_USING_KEYWORD) | ||
275 | using QTextCodec::canEncode; | ||
276 | #endif | ||
277 | int heuristicNameMatch(const char* hint) const; | ||
278 | bool canEncode( QChar ) const; | ||
279 | }; | ||
280 | |||
281 | |||
282 | |||
283 | class QFontBig5hkscsCodec : public QTextCodec | ||
284 | { | ||
285 | public: | ||
286 | QFontBig5hkscsCodec(); | ||
287 | |||
288 | // Return the official name for the encoding. | ||
289 | const char* name() const ; | ||
290 | |||
291 | // Return the MIB enum for the encoding if it is listed in the | ||
292 | // IANA character-sets encoding file. | ||
293 | int mibEnum() const ; | ||
294 | |||
295 | // Converts len characters from chars to Unicode. | ||
296 | QString toUnicode(const char* chars, int len) const ; | ||
297 | |||
298 | // Converts lenInOut characters (of type QChar) from the start of | ||
299 | // the string uc, returning a QCString result, and also returning | ||
300 | // the length of the result in lenInOut. | ||
301 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
302 | |||
303 | int heuristicContentMatch(const char *, int) const; | ||
304 | int heuristicNameMatch(const char* hint) const; | ||
305 | #if !defined(Q_NO_USING_KEYWORD) | ||
306 | using QTextCodec::canEncode; | ||
307 | #endif | ||
308 | bool canEncode( QChar ) const; | ||
309 | }; | ||
310 | |||
311 | |||
312 | |||
313 | |||
314 | // ------------------------------------------------------------------ | ||
315 | // the shaping codec for iso8859-6.8x fonts (see www.langbox.com) | ||
316 | |||
317 | class QFontArabic68Codec : public QTextCodec | ||
318 | { | ||
319 | public: | ||
320 | QFontArabic68Codec(); | ||
321 | |||
322 | // Return the official name for the encoding. | ||
323 | const char* name() const ; | ||
324 | |||
325 | // Return the MIB enum for the encoding if it is listed in the | ||
326 | // IANA character-sets encoding file. | ||
327 | int mibEnum() const ; | ||
328 | |||
329 | // Converts len characters from chars to Unicode. | ||
330 | QString toUnicode(const char* chars, int len) const ; | ||
331 | |||
332 | // Converts lenInOut characters (of type QChar) from the start of | ||
333 | // the string uc, returning a QCString result, and also returning | ||
334 | // the length of the result in lenInOut. | ||
335 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
336 | |||
337 | int heuristicContentMatch(const char *, int) const; | ||
338 | QByteArray fromUnicode( const QString &str, int from, int len ) const; | ||
339 | unsigned short characterFromUnicode(const QString &str, int pos) const; | ||
340 | }; | ||
341 | |||
342 | |||
343 | class QFontLaoCodec : public QTextCodec | ||
344 | { | ||
345 | public: | ||
346 | QFontLaoCodec(); | ||
347 | |||
348 | const char *name() const; | ||
349 | |||
350 | int mibEnum() const; | ||
351 | |||
352 | #if !defined(Q_NO_USING_KEYWORD) | ||
353 | using QTextCodec::fromUnicode; | ||
354 | #endif | ||
355 | QCString fromUnicode(const QString& uc, int& lenInOut ) const; | ||
356 | |||
357 | int heuristicContentMatch(const char *, int) const; | ||
358 | |||
359 | #if !defined(Q_NO_USING_KEYWORD) | ||
360 | using QTextCodec::canEncode; | ||
361 | #endif | ||
362 | bool canEncode( QChar ) const; | ||
363 | }; | ||
364 | |||
365 | #endif // QT_NO_BIG_CODECS | ||
366 | #endif // QT_NO_CODECS | ||
367 | |||
368 | #endif // QFONTCODECS_P_H | ||
diff --git a/qmake/include/private/qfontdata_p.h b/qmake/include/private/qfontdata_p.h new file mode 100644 index 0000000..917d14f --- a/dev/null +++ b/qmake/include/private/qfontdata_p.h | |||
@@ -0,0 +1,479 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of internal QFontData struct | ||
5 | ** | ||
6 | ** Created : 941229 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QFONTDATA_P_H | ||
39 | #define QFONTDATA_P_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include <qcache.h> | ||
43 | #include <qobject.h> | ||
44 | #include <qpaintdevice.h> | ||
45 | #endif // QT_H | ||
46 | #include <limits.h> | ||
47 | |||
48 | // | ||
49 | // W A R N I N G | ||
50 | // ------------- | ||
51 | // | ||
52 | // This file is not part of the Qt API. It exists for the convenience | ||
53 | // of internal files. This header file may change from version to version | ||
54 | // without notice, or even be removed. | ||
55 | // | ||
56 | // We mean it. | ||
57 | // | ||
58 | // | ||
59 | |||
60 | class QPaintDevice; | ||
61 | |||
62 | #ifdef Q_WS_WIN | ||
63 | #include <qt_windows.h> | ||
64 | #endif | ||
65 | |||
66 | #ifdef Q_WS_X11 | ||
67 | #include <qt_x11.h> | ||
68 | |||
69 | class QCharStruct; | ||
70 | #endif | ||
71 | |||
72 | // font description | ||
73 | struct QFontDef { | ||
74 | QFontDef() | ||
75 | : pixelSize(0), pointSize(0), lbearing(SHRT_MIN), rbearing(SHRT_MIN), | ||
76 | styleStrategy(QFont::PreferDefault), styleHint(QFont::AnyStyle), | ||
77 | weight(0), italic(FALSE), underline(FALSE), strikeOut(FALSE), | ||
78 | fixedPitch(FALSE), hintSetByUser(FALSE), rawMode(FALSE), dirty(TRUE) | ||
79 | { ; } | ||
80 | |||
81 | QString family; | ||
82 | QString addStyle; | ||
83 | |||
84 | int pixelSize; | ||
85 | int pointSize; | ||
86 | short lbearing; | ||
87 | short rbearing; | ||
88 | |||
89 | ushort styleStrategy; | ||
90 | uchar styleHint; | ||
91 | uchar weight; | ||
92 | |||
93 | bool italic; | ||
94 | bool underline; | ||
95 | bool strikeOut; | ||
96 | bool fixedPitch; | ||
97 | bool hintSetByUser; | ||
98 | bool rawMode; | ||
99 | |||
100 | bool dirty; | ||
101 | }; | ||
102 | |||
103 | |||
104 | class QTextCodec; | ||
105 | |||
106 | #ifdef Q_WS_X11 | ||
107 | |||
108 | // this is a shared wrapper for XFontStruct (to prevent a font being freed by | ||
109 | // the cache while it's being used) | ||
110 | class QFontStruct : public QShared | ||
111 | { | ||
112 | public: | ||
113 | QFontStruct(Qt::HANDLE h, Qt::HANDLE xfth, Qt::HANDLE xftp, | ||
114 | QCString n, QTextCodec *c, int a) : | ||
115 | QShared(), handle(h), xfthandle(xfth), xftpattern(xftp), | ||
116 | name(n), codec(c), cache_cost(a), scale( 1. ) | ||
117 | { ; } | ||
118 | |||
119 | ~QFontStruct(); | ||
120 | |||
121 | Qt::HANDLE handle, xfthandle, xftpattern; | ||
122 | QCString name; | ||
123 | QTextCodec *codec; | ||
124 | int cache_cost; | ||
125 | float scale; // needed for printing, to correctly scale font metrics for bitmap fonts | ||
126 | }; | ||
127 | |||
128 | enum { widthCacheSize = 0x500 }; | ||
129 | |||
130 | class QFontX11Data // used as a QFontPrivate member | ||
131 | { | ||
132 | public: | ||
133 | // X fontstruct handles for each character set | ||
134 | QFontStruct *fontstruct[QFont::LastPrivateScript]; | ||
135 | |||
136 | uchar widthCache[widthCacheSize]; | ||
137 | |||
138 | QFontX11Data(); | ||
139 | ~QFontX11Data(); | ||
140 | }; | ||
141 | |||
142 | #endif // Q_WS_X11 | ||
143 | |||
144 | |||
145 | #ifdef Q_WS_WIN | ||
146 | |||
147 | class QFontStruct : public QShared | ||
148 | { | ||
149 | public: | ||
150 | QFontStruct( const QString &key ); | ||
151 | ~QFontStruct() { reset(); } | ||
152 | bool dirty() const { return hfont == 0; } | ||
153 | HDC dc() const; | ||
154 | HFONT font() const { return hfont; } | ||
155 | const TEXTMETRICA *textMetricA() const { return &tm.a; } | ||
156 | const TEXTMETRICW *textMetricW() const { return &tm.w; } | ||
157 | QString key() const { return k; } | ||
158 | void reset(); | ||
159 | |||
160 | QStringk; | ||
161 | HDC hdc; | ||
162 | HFONThfont; | ||
163 | uintstockFont:1; | ||
164 | uintpaintDevice:1; | ||
165 | union { | ||
166 | TEXTMETRICWw; | ||
167 | TEXTMETRICAa; | ||
168 | } tm; | ||
169 | int lw; | ||
170 | int cache_cost; | ||
171 | // friend void QFont::initFontInfo() const; | ||
172 | }; | ||
173 | |||
174 | #endif // Q_WS_WIN | ||
175 | |||
176 | #if defined( Q_WS_MAC ) | ||
177 | |||
178 | #if defined( Q_WS_MACX ) | ||
179 | # define QMAC_FONT_ATSUI | ||
180 | #endif | ||
181 | #include "qt_mac.h" | ||
182 | class QMacFontInfo; | ||
183 | |||
184 | class QFontStruct : public QShared | ||
185 | { | ||
186 | public: | ||
187 | inline QFontStruct() : QShared(), info(NULL), fnum(-1), cache_cost(0), internal_fi(NULL) { } | ||
188 | #if defined( QMAC_FONT_ATSUI ) && 0 | ||
189 | ATSFontMetrics *info; | ||
190 | int maxWidth() const { return (int)info->maxAdvanceWidth; } | ||
191 | #else | ||
192 | FontInfo *info; | ||
193 | int maxWidth() const { return info->widMax; } | ||
194 | #endif | ||
195 | int ascent() const { return (int)info->ascent; } | ||
196 | int descent() const { return (int)info->descent; } | ||
197 | int leading() const { return (int)info->leading; } | ||
198 | int minLeftBearing() const { return 0; } | ||
199 | int minRightBearing() const { return 0; } | ||
200 | |||
201 | short fnum; | ||
202 | int psize, cache_cost; | ||
203 | QMacFontInfo *internal_fi; | ||
204 | }; | ||
205 | |||
206 | #endif | ||
207 | |||
208 | #ifdef Q_WS_QWS | ||
209 | class QFontStruct; | ||
210 | class QGfx; | ||
211 | #endif | ||
212 | |||
213 | typedef QCacheIterator<QFontStruct> QFontCacheIterator; | ||
214 | class QFontCache : public QObject, public QCache<QFontStruct> | ||
215 | { | ||
216 | public: | ||
217 | QFontCache(); | ||
218 | ~QFontCache(); | ||
219 | |||
220 | bool insert(const QString &, const QFontStruct *, int c); | ||
221 | #ifndef Q_WS_MAC | ||
222 | void deleteItem(Item d); | ||
223 | #endif | ||
224 | void timerEvent(QTimerEvent *); | ||
225 | |||
226 | |||
227 | protected: | ||
228 | |||
229 | |||
230 | private: | ||
231 | int timer_id; | ||
232 | bool fast; | ||
233 | }; | ||
234 | |||
235 | |||
236 | // QFontPrivate - holds all data on which a font operates | ||
237 | class QFontPrivate : public QShared | ||
238 | { | ||
239 | public: | ||
240 | static QFontCache *fontCache; | ||
241 | |||
242 | |||
243 | public: | ||
244 | |||
245 | QFontPrivate(); | ||
246 | QFontPrivate(const QFontPrivate &fp); | ||
247 | QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd ); | ||
248 | ~QFontPrivate(); | ||
249 | |||
250 | // requested font | ||
251 | QFontDef request; | ||
252 | // actual font | ||
253 | QFontDef actual; | ||
254 | |||
255 | bool exactMatch; | ||
256 | int lineWidth; | ||
257 | |||
258 | // common functions | ||
259 | QString defaultFamily() const; | ||
260 | QString lastResortFamily() const; | ||
261 | QString lastResortFont() const; | ||
262 | QString key() const; | ||
263 | |||
264 | static int getFontWeight(const QCString &, bool = FALSE); | ||
265 | QRect boundingRect( const QChar &ch ); | ||
266 | |||
267 | struct TextRun { | ||
268 | TextRun() | ||
269 | { | ||
270 | xoff = 0; | ||
271 | yoff = 0; | ||
272 | x2off = 0; | ||
273 | script = QFont::NoScript; | ||
274 | string = 0; | ||
275 | length = 0; | ||
276 | next = 0; | ||
277 | } | ||
278 | |||
279 | ~TextRun() | ||
280 | { | ||
281 | if ( next ) | ||
282 | delete next; | ||
283 | } | ||
284 | |||
285 | void setParams( int x, int y, int x2, const QChar *s, int len, | ||
286 | QFont::Script sc = QFont::NoScript ) { | ||
287 | xoff = x; | ||
288 | yoff = y; | ||
289 | x2off = x2; | ||
290 | string = s; | ||
291 | length = len; | ||
292 | script = sc; | ||
293 | } | ||
294 | int xoff; | ||
295 | int yoff; | ||
296 | int x2off; | ||
297 | QFont::Script script; | ||
298 | const QChar *string; | ||
299 | int length; | ||
300 | TextRun *next; | ||
301 | #ifdef Q_WS_X11 | ||
302 | QByteArray mapped; | ||
303 | #endif | ||
304 | }; | ||
305 | |||
306 | // some replacement functions for native calls. This is needed, because shaping and | ||
307 | // non spacing marks can change the extents of a string to draw. At the same time | ||
308 | // drawing needs to take care to correctly position non spacing marks. | ||
309 | int textWidth( const QString &str, int pos, int len ); | ||
310 | |||
311 | // returns the script a certain character is in. Needed to separate the string | ||
312 | // into runs of different scripts as required for X11 and opentype. | ||
313 | QFont::Script scriptForChar(const QChar &c); | ||
314 | |||
315 | #ifdef Q_WS_X11 | ||
316 | QFont::Script hanHack( const QChar & c ); | ||
317 | static char **getXFontNames(const char *, int *); | ||
318 | static bool fontExists(const QString &); | ||
319 | static bool parseXFontName(char *, char **); | ||
320 | static QCString fixXLFD( const QCString & ); | ||
321 | static bool fillFontDef(XFontStruct *, QFontDef *, int); | ||
322 | static bool fillFontDef(const QCString &, QFontDef *, int); | ||
323 | |||
324 | static inline bool isZero(char *x) | ||
325 | { | ||
326 | return (x[0] == '0' && x[1] == 0); | ||
327 | } | ||
328 | |||
329 | static inline bool isScalable( char **tokens ) | ||
330 | { | ||
331 | return (isZero(tokens[PixelSize]) && | ||
332 | isZero(tokens[PointSize]) && | ||
333 | isZero(tokens[AverageWidth])); | ||
334 | } | ||
335 | |||
336 | static inline bool isSmoothlyScalable( char **tokens ) | ||
337 | { | ||
338 | return (isZero(tokens[ResolutionX]) && isZero(tokens[ResolutionY])); | ||
339 | } | ||
340 | |||
341 | static inline bool isFixedPitch( char **tokens ) | ||
342 | { | ||
343 | return (tokens[Spacing][0] == 'm' || | ||
344 | tokens[Spacing][0] == 'c' || | ||
345 | tokens[Spacing][0] == 'M' || | ||
346 | tokens[Spacing][0] == 'C'); | ||
347 | } | ||
348 | |||
349 | // XLFD fields | ||
350 | enum FontFieldNames { | ||
351 | Foundry, | ||
352 | Family, | ||
353 | Weight, | ||
354 | Slant, | ||
355 | Width, | ||
356 | AddStyle, | ||
357 | PixelSize, | ||
358 | PointSize, | ||
359 | ResolutionX, | ||
360 | ResolutionY, | ||
361 | Spacing, | ||
362 | AverageWidth, | ||
363 | CharsetRegistry, | ||
364 | CharsetEncoding, | ||
365 | NFontFields | ||
366 | }; | ||
367 | |||
368 | #ifndef QT_NO_XFTFREETYPE | ||
369 | XftPattern *findXftFont(const QChar &, bool *, double *scale) const; | ||
370 | XftPattern *bestXftPattern(const QString &, const QString &, const QChar &, double *scale) const; | ||
371 | #endif // QT_NO_XFTFREETYPE | ||
372 | QCString findFont(QFont::Script, bool *, double *) const; | ||
373 | QCString bestFamilyMember(QFont::Script, const QString &, const QString &, | ||
374 | const QString &, int *, double *) const; | ||
375 | QCString bestMatch(const char *, int *, QFont::Script, double *) const; | ||
376 | int fontMatchScore(const char *, QCString &, float *, int *, bool *, | ||
377 | bool *, QFont::Script, double *) const; | ||
378 | void initFontInfo(QFont::Script, double scale); | ||
379 | void load(QFont::Script = QFont::NoScript, bool = TRUE); | ||
380 | bool loadUnicode(QFont::Script, const QChar &); | ||
381 | void computeLineWidth(); | ||
382 | |||
383 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); | ||
384 | void textExtents( const QString &str, int pos, int len, QCharStruct *overall ); | ||
385 | void drawText( Display *dpy, int screen, Qt::HANDLE hd, Qt::HANDLE rendhd, | ||
386 | GC gc, const QColor &pen, Qt::BGMode, const QColor &bgcolor, | ||
387 | int x, int y, const TextRun *cache, int pdWidth ); | ||
388 | bool inFont( const QChar &ch ); | ||
389 | |||
390 | QFontX11Data x11data; | ||
391 | static QFont::Script defaultScript; | ||
392 | int x11Screen; | ||
393 | #endif // Q_WS_X11 | ||
394 | |||
395 | QPaintDevice *paintdevice; | ||
396 | |||
397 | #ifdef Q_WS_WIN | ||
398 | void load(); | ||
399 | void initFontInfo(); | ||
400 | HFONT create( bool *stockFont, HDC hdc = 0, bool compatMode = FALSE ); | ||
401 | QFontStruct *fin; | ||
402 | |||
403 | void buildCache( HDC hdc, const QString &str, int pos, int len, TextRun *cache ); | ||
404 | void drawText( HDC hdc, int x, int y, TextRun *cache ); | ||
405 | #endif // Q_WS_WIN | ||
406 | |||
407 | #ifdef Q_WS_QWS | ||
408 | void load(); | ||
409 | QFontStruct *fin; | ||
410 | int textWidth( const QString &str, int pos, int len, TextRun *cache ); | ||
411 | void drawText( QGfx *gfx, int x, int y, const TextRun *cache ); | ||
412 | #endif | ||
413 | |||
414 | #if defined( Q_WS_MAC ) | ||
415 | void macSetFont(QPaintDevice *); | ||
416 | void drawText(int x, int y, QString s, int len, QPaintDevice *dev, const QRegion *rgn); | ||
417 | void computeLineWidth(); | ||
418 | void load(); | ||
419 | QFontStruct *fin; | ||
420 | #endif | ||
421 | |||
422 | }; | ||
423 | |||
424 | inline QFontPrivate::QFontPrivate() | ||
425 | : QShared(), exactMatch(FALSE), lineWidth(1) | ||
426 | { | ||
427 | |||
428 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | ||
429 | fin = 0; | ||
430 | #endif // Q_WS_WIN || Q_WS_QWS | ||
431 | #if defined(Q_WS_X11) | ||
432 | x11Screen = QPaintDevice::x11AppScreen(); | ||
433 | #endif // Q_WS_X11 | ||
434 | paintdevice = 0; | ||
435 | } | ||
436 | |||
437 | inline QFontPrivate::QFontPrivate(const QFontPrivate &fp) | ||
438 | : QShared(), request(fp.request), actual(fp.actual), | ||
439 | exactMatch(fp.exactMatch), lineWidth(1) | ||
440 | { | ||
441 | Q_ASSERT(!fp.paintdevice); | ||
442 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | ||
443 | fin = 0; | ||
444 | #endif // Q_WS_WIN || Q_WS_QWS | ||
445 | #if defined(Q_WS_X11) | ||
446 | x11Screen = fp.x11Screen; | ||
447 | #endif // Q_WS_X11 | ||
448 | paintdevice = 0; | ||
449 | } | ||
450 | |||
451 | inline QFontPrivate::QFontPrivate( const QFontPrivate &fp, QPaintDevice *pd ) | ||
452 | : QShared(), request(fp.request), actual(fp.actual), | ||
453 | exactMatch(fp.exactMatch), lineWidth(1) | ||
454 | { | ||
455 | |||
456 | #if defined(Q_WS_WIN) || defined(Q_WS_QWS) || defined(Q_WS_MAC) | ||
457 | fin = 0; | ||
458 | #endif // Q_WS_WIN || Q_WS_QWS | ||
459 | #if defined(Q_WS_X11) | ||
460 | x11Screen = pd->x11Screen(); | ||
461 | #endif // Q_WS_X11 | ||
462 | paintdevice = pd; | ||
463 | } | ||
464 | |||
465 | #ifndef Q_WS_QWS | ||
466 | inline QFontPrivate::~QFontPrivate() | ||
467 | { | ||
468 | #if defined(Q_WS_WIN) | ||
469 | if( fin ) | ||
470 | fin->deref(); | ||
471 | #endif | ||
472 | #if defined(Q_WS_MAC) | ||
473 | if( fin && fin->deref() ) | ||
474 | delete fin; | ||
475 | #endif | ||
476 | } | ||
477 | #endif | ||
478 | |||
479 | #endif // QFONTDATA_P_H | ||
diff --git a/qmake/include/private/qgfxdriverinterface_p.h b/qmake/include/private/qgfxdriverinterface_p.h new file mode 100644 index 0000000..1782ed4 --- a/dev/null +++ b/qmake/include/private/qgfxdriverinterface_p.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of Qt/Embedded Graphics Driver Interface | ||
5 | ** | ||
6 | ** Created : 20020211 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed and/or modified under the terms of the | ||
13 | ** GNU General Public License version 2 as published by the Free Software | ||
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
15 | ** packaging of this file. | ||
16 | ** | ||
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
18 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
20 | ** | ||
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
23 | ** | ||
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
25 | ** information about Qt Commercial License Agreements. | ||
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
27 | ** | ||
28 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
29 | ** not clear to you. | ||
30 | ** | ||
31 | **********************************************************************/ | ||
32 | |||
33 | #ifndef QGFXDRIVERINTERFACE_H | ||
34 | #define QGFXDRIVERINTERFACE_H | ||
35 | |||
36 | #ifndef QT_H | ||
37 | #include <private/qcom_p.h> | ||
38 | #endif // QT_H | ||
39 | |||
40 | #ifndef QT_NO_COMPONENT | ||
41 | |||
42 | // {449EC6C6-DF3E-43E3-9E57-354A3D05AB34} | ||
43 | #ifndef IID_QGfxDriver | ||
44 | #define IID_QGfxDriver QUuid( 0x449ec6c6, 0xdf3e, 0x43e3, 0x9e, 0x57, 0x35, 0x4a, 0x3d, 0x05, 0xab, 0x34) | ||
45 | #endif | ||
46 | |||
47 | class QScreen; | ||
48 | |||
49 | struct Q_EXPORT QGfxDriverInterface : public QFeatureListInterface | ||
50 | { | ||
51 | virtual QScreen* create( const QString& driver, int displayId ) = 0; | ||
52 | }; | ||
53 | |||
54 | #endif // QT_NO_COMPONENT | ||
55 | |||
56 | #endif // QGFXDRIVERINTERFACE_H | ||
diff --git a/qmake/include/private/qgpluginmanager_p.h b/qmake/include/private/qgpluginmanager_p.h new file mode 100644 index 0000000..e0c0e78 --- a/dev/null +++ b/qmake/include/private/qgpluginmanager_p.h | |||
@@ -0,0 +1,107 @@ | |||
1 | /********************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QGPluginManager class | ||
5 | ** | ||
6 | ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QGPLUGINMANAGER_H | ||
37 | #define QGPLUGINMANAGER_H | ||
38 | |||
39 | #ifndef QT_H | ||
40 | #include "qdict.h" | ||
41 | #include "qlibrary.h" | ||
42 | #include "quuid.h" | ||
43 | #include "qstringlist.h" | ||
44 | #include "qcom_p.h" | ||
45 | #endif // QT_H | ||
46 | |||
47 | // | ||
48 | // W A R N I N G | ||
49 | // ------------- | ||
50 | // | ||
51 | // This file is not part of the Qt API. It exists for the convenience | ||
52 | // of a number of Qt sources files. This header file may change from | ||
53 | // version to version without notice, or even be removed. | ||
54 | // | ||
55 | // We mean it. | ||
56 | // | ||
57 | // | ||
58 | |||
59 | #ifndef QT_NO_COMPONENT | ||
60 | |||
61 | #if defined(Q_TEMPLATEDLL) | ||
62 | // MOC_SKIP_BEGIN | ||
63 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QLibrary>; | ||
64 | // MOC_SKIP_END | ||
65 | #endif | ||
66 | |||
67 | class Q_EXPORT QGPluginManager | ||
68 | { | ||
69 | public: | ||
70 | QGPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ); | ||
71 | ~QGPluginManager(); | ||
72 | |||
73 | void addLibraryPath( const QString& path ); | ||
74 | const QLibrary* library( const QString& feature ) const; | ||
75 | QStringList featureList() const; | ||
76 | |||
77 | bool autoUnload() const; | ||
78 | void setAutoUnload( bool ); | ||
79 | |||
80 | protected: | ||
81 | bool enabled() const; | ||
82 | bool addLibrary( QLibrary* plugin ); | ||
83 | |||
84 | QRESULT queryUnknownInterface(const QString& feature, QUnknownInterface** iface) const; | ||
85 | |||
86 | QUuid interfaceId; | ||
87 | QDict<QLibrary> plugDict; // Dict to match feature with library | ||
88 | QDict<QLibrary> libDict; // Dict to match library file with library | ||
89 | QStringList libList; | ||
90 | |||
91 | uint casesens : 1; | ||
92 | uint autounload : 1; | ||
93 | }; | ||
94 | |||
95 | inline void QGPluginManager::setAutoUnload( bool unload ) | ||
96 | { | ||
97 | autounload = unload; | ||
98 | } | ||
99 | |||
100 | inline bool QGPluginManager::autoUnload() const | ||
101 | { | ||
102 | return autounload; | ||
103 | } | ||
104 | |||
105 | #endif | ||
106 | |||
107 | #endif //QGPLUGINMANAGER_H | ||
diff --git a/qmake/include/private/qimageformatinterface_p.h b/qmake/include/private/qimageformatinterface_p.h new file mode 100644 index 0000000..5f7601c --- a/dev/null +++ b/qmake/include/private/qimageformatinterface_p.h | |||
@@ -0,0 +1,75 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of ??? | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QIMAGEFORMATINTERFACE_H | ||
37 | #define QIMAGEFORMATINTERFACE_H | ||
38 | |||
39 | #ifndef QT_H | ||
40 | #include <private/qcom_p.h> | ||
41 | #endif // QT_H | ||
42 | |||
43 | |||
44 | // | ||
45 | // W A R N I N G | ||
46 | // ------------- | ||
47 | // | ||
48 | // This file is not part of the Qt API. It exists for the convenience | ||
49 | // of internal files. This header file may change from version to version | ||
50 | // without notice, or even be removed. | ||
51 | // | ||
52 | // We mean it. | ||
53 | // | ||
54 | // | ||
55 | |||
56 | #ifndef QT_NO_COMPONENT | ||
57 | |||
58 | // {04903F05-54B1-4726-A849-FB5CB097CA87} | ||
59 | #ifndef IID_QImageFormat | ||
60 | #define IID_QImageFormat QUuid( 0x04903f05, 0x54b1, 0x4726, 0xa8, 0x49, 0xfb, 0x5c, 0xb0, 0x97, 0xca, 0x87 ) | ||
61 | #endif | ||
62 | |||
63 | class QImage; | ||
64 | |||
65 | struct Q_EXPORT QImageFormatInterface : public QFeatureListInterface | ||
66 | { | ||
67 | virtual QRESULT loadImage( const QString &format, const QString &filename, QImage * ) = 0; | ||
68 | virtual QRESULT saveImage( const QString &format, const QString &filename, const QImage & ) = 0; | ||
69 | |||
70 | virtual QRESULT installIOHandler( const QString & ) = 0; | ||
71 | }; | ||
72 | |||
73 | #endif // QT_NO_COMPONENT | ||
74 | |||
75 | #endif // QIMAGEFORMATINTERFACE_H | ||
diff --git a/qmake/include/private/qinputcontext_p.h b/qmake/include/private/qinputcontext_p.h new file mode 100644 index 0000000..9ac0d2b --- a/dev/null +++ b/qmake/include/private/qinputcontext_p.h | |||
@@ -0,0 +1,121 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of ??? | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QINPUTCONTEXT_P_H | ||
37 | #define QINPUTCONTEXT_P_H | ||
38 | |||
39 | |||
40 | // | ||
41 | // W A R N I N G | ||
42 | // ------------- | ||
43 | // | ||
44 | // This file is not part of the Qt API. It exists for the convenience | ||
45 | // of internal files. This header file may change from version to version | ||
46 | // without notice, or even be removed. | ||
47 | // | ||
48 | // We mean it. | ||
49 | // | ||
50 | // | ||
51 | |||
52 | #include <qglobal.h> | ||
53 | |||
54 | class QKeyEvent; | ||
55 | class QWidget; | ||
56 | class QFont; | ||
57 | class QString; | ||
58 | |||
59 | |||
60 | #ifdef Q_WS_X11 | ||
61 | #include "qarray.h" | ||
62 | #include "qwindowdefs.h" | ||
63 | #include "qt_x11.h" | ||
64 | #endif | ||
65 | |||
66 | #ifdef Q_WS_WIN | ||
67 | #include <qt_windows.h> | ||
68 | #endif | ||
69 | |||
70 | #ifdef Q_WS_QWS | ||
71 | class QWSIMEvent; | ||
72 | #endif | ||
73 | |||
74 | class QInputContext | ||
75 | { | ||
76 | public: | ||
77 | #ifdef Q_WS_X11 | ||
78 | QInputContext(QWidget *); // should be a toplevel widget | ||
79 | ~QInputContext(); | ||
80 | |||
81 | void setFocus(); | ||
82 | void setComposePosition(int, int); | ||
83 | void setComposeArea(int, int, int, int); | ||
84 | void reset(); | ||
85 | |||
86 | int lookupString(XKeyEvent *, QCString &, KeySym *, Status *) const; | ||
87 | void setXFontSet(const QFont &); | ||
88 | |||
89 | void *ic; | ||
90 | QString text, lastcompose; | ||
91 | QWidget *focusWidget; | ||
92 | bool composing; | ||
93 | QFont font; | ||
94 | XFontSet fontset; | ||
95 | QMemArray<bool> selectedChars; | ||
96 | #endif // Q_WS_X11 | ||
97 | |||
98 | #ifdef Q_WS_QWS | ||
99 | static void translateIMEvent( QWSIMEvent *, QWidget * ); | ||
100 | static void reset(); | ||
101 | private: | ||
102 | static QWidget* focusWidget; | ||
103 | static QString* composition; | ||
104 | #endif //Q_WS_QWS | ||
105 | |||
106 | #ifdef Q_WS_WIN | ||
107 | static void init(); | ||
108 | static void shutdown(); | ||
109 | |||
110 | static void TranslateMessage( const MSG *msg); | ||
111 | static LRESULT DefWindowProc( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam ); | ||
112 | |||
113 | static void setFont( const QWidget *w, const QFont & ); | ||
114 | static void setFocusHint( int x, int y, int w, int h, const QWidget *widget ); | ||
115 | static bool startComposition(); | ||
116 | static bool endComposition( QWidget *fw = 0 ); | ||
117 | static bool composition( LPARAM lparam ); | ||
118 | #endif | ||
119 | }; | ||
120 | |||
121 | #endif // QINPUTCONTEXT_P_H | ||
diff --git a/qmake/include/private/qinternal_p.h b/qmake/include/private/qinternal_p.h new file mode 100644 index 0000000..ae38695 --- a/dev/null +++ b/qmake/include/private/qinternal_p.h | |||
@@ -0,0 +1,157 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some shared interal classes | ||
5 | ** | ||
6 | ** Created : 010427 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QINTERNAL_P_H | ||
39 | #define QINTERNAL_P_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of a number of Qt sources files. This header file may change from | ||
47 | // version to version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | #ifndef QT_H | ||
53 | #include <qnamespace.h> | ||
54 | #include <qrect.h> | ||
55 | #endif // QT_H | ||
56 | |||
57 | class QWidget; | ||
58 | class QPainter; | ||
59 | class QPixmap; | ||
60 | |||
61 | class Q_EXPORT QSharedDoubleBuffer | ||
62 | { | ||
63 | public: | ||
64 | enum DoubleBufferFlags { | ||
65 | NoFlags = 0x00, | ||
66 | InitBG = 0x01, | ||
67 | Force = 0x02, | ||
68 | Default = InitBG | Force | ||
69 | }; | ||
70 | typedef uint DBFlags; | ||
71 | |||
72 | QSharedDoubleBuffer( DBFlags f = Default ); | ||
73 | QSharedDoubleBuffer( QWidget* widget, | ||
74 | int x = 0, int y = 0, int w = -1, int h = -1, | ||
75 | DBFlags f = Default ); | ||
76 | QSharedDoubleBuffer( QPainter* painter, | ||
77 | int x = 0, int y = 0, int w = -1, int h = -1, | ||
78 | DBFlags f = Default ); | ||
79 | QSharedDoubleBuffer( QWidget *widget, const QRect &r, DBFlags f = Default ); | ||
80 | QSharedDoubleBuffer( QPainter *painter, const QRect &r, DBFlags f = Default ); | ||
81 | ~QSharedDoubleBuffer(); | ||
82 | |||
83 | bool begin( QWidget* widget, int x = 0, int y = 0, int w = -1, int h = -1 ); | ||
84 | bool begin( QPainter* painter, int x = 0, int y = 0, int w = -1, int h = -1); | ||
85 | bool begin( QWidget* widget, const QRect &r ); | ||
86 | bool begin( QPainter* painter, const QRect &r ); | ||
87 | bool end(); | ||
88 | |||
89 | QPainter* painter() const; | ||
90 | |||
91 | bool isActive() const; | ||
92 | bool isBuffered() const; | ||
93 | void flush(); | ||
94 | |||
95 | static bool isDisabled() { return !dblbufr; } | ||
96 | static void setDisabled( bool off ) { dblbufr = !off; } | ||
97 | |||
98 | static void cleanup(); | ||
99 | |||
100 | private: | ||
101 | enum DoubleBufferState { | ||
102 | Active = 0x0100, | ||
103 | BufferActive= 0x0200, | ||
104 | ExternalPainter= 0x0400 | ||
105 | }; | ||
106 | typedef uint DBState; | ||
107 | |||
108 | QPixmap *getPixmap(); | ||
109 | void releasePixmap(); | ||
110 | |||
111 | QWidget *wid; | ||
112 | int rx, ry, rw, rh; | ||
113 | DBFlags flags; | ||
114 | DBState state; | ||
115 | |||
116 | QPainter *p, *external_p; | ||
117 | QPixmap *pix; | ||
118 | |||
119 | static bool dblbufr; | ||
120 | }; | ||
121 | |||
122 | inline bool QSharedDoubleBuffer::begin( QWidget* widget, const QRect &r ) | ||
123 | { return begin( widget, r.x(), r.y(), r.width(), r.height() ); } | ||
124 | |||
125 | inline bool QSharedDoubleBuffer::begin( QPainter *painter, const QRect &r ) | ||
126 | { return begin( painter, r.x(), r.y(), r.width(), r.height() ); } | ||
127 | |||
128 | inline QPainter* QSharedDoubleBuffer::painter() const | ||
129 | { return p; } | ||
130 | |||
131 | inline bool QSharedDoubleBuffer::isActive() const | ||
132 | { return ( state & Active ); } | ||
133 | |||
134 | inline bool QSharedDoubleBuffer::isBuffered() const | ||
135 | { return ( state & BufferActive ); } | ||
136 | |||
137 | |||
138 | class QVirtualDestructor { | ||
139 | public: | ||
140 | virtual ~QVirtualDestructor() {} | ||
141 | }; | ||
142 | |||
143 | template <class T> | ||
144 | class QAutoDeleter : public QVirtualDestructor { | ||
145 | public: | ||
146 | QAutoDeleter( T* p ) : ptr( p ) {} | ||
147 | ~QAutoDeleter() { delete ptr; } | ||
148 | private: | ||
149 | T* ptr; | ||
150 | }; | ||
151 | |||
152 | template <class T> | ||
153 | QAutoDeleter<T>* qAutoDeleter( T* p ) | ||
154 | { | ||
155 | return new QAutoDeleter<T>( p ); | ||
156 | } | ||
157 | #endif // QINTERNAL_P_H | ||
diff --git a/qmake/include/private/qkbddriverinterface_p.h b/qmake/include/private/qkbddriverinterface_p.h new file mode 100644 index 0000000..efc7ded --- a/dev/null +++ b/qmake/include/private/qkbddriverinterface_p.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of Qt/Embedded Keyboard Driver Interface | ||
5 | ** | ||
6 | ** Created : 20020218 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed and/or modified under the terms of the | ||
13 | ** GNU General Public License version 2 as published by the Free Software | ||
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
15 | ** packaging of this file. | ||
16 | ** | ||
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
18 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
20 | ** | ||
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
23 | ** | ||
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
25 | ** information about Qt Commercial License Agreements. | ||
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
27 | ** | ||
28 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
29 | ** not clear to you. | ||
30 | ** | ||
31 | **********************************************************************/ | ||
32 | |||
33 | #ifndef QKBDDRIVERINTERFACE_H | ||
34 | #define QKBDDRIVERINTERFACE_H | ||
35 | |||
36 | #ifndef QT_H | ||
37 | #include <private/qcom_p.h> | ||
38 | #endif // QT_H | ||
39 | |||
40 | #ifndef QT_NO_COMPONENT | ||
41 | |||
42 | // {C7C838EA-FC3E-4905-92AD-F479E81F1D02} | ||
43 | #ifndef IID_QKbdDriver | ||
44 | #define IID_QKbdDriver QUuid( 0xc7c838ea, 0xfc3e, 0x4905, 0x92, 0xad, 0xf4, 0x79, 0xe8, 0x1f, 0x1d, 0x02) | ||
45 | #endif | ||
46 | |||
47 | class QWSKeyboardHandler; | ||
48 | |||
49 | struct Q_EXPORT QKbdDriverInterface : public QFeatureListInterface | ||
50 | { | ||
51 | virtual QWSKeyboardHandler* create( const QString& driver, const QString& device ) = 0; | ||
52 | }; | ||
53 | |||
54 | #endif // QT_NO_COMPONENT | ||
55 | |||
56 | #endif // QKBDDRIVERINTERFACE_H | ||
diff --git a/qmake/include/private/qlayoutengine_p.h b/qmake/include/private/qlayoutengine_p.h new file mode 100644 index 0000000..4d88afe --- a/dev/null +++ b/qmake/include/private/qlayoutengine_p.h | |||
@@ -0,0 +1,128 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Internal header file. | ||
5 | ** | ||
6 | ** Created : 981027 | ||
7 | ** | ||
8 | ** Copyright (C) 1998-99 by Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QLAYOUTENGINE_P_H | ||
39 | #define QLAYOUTENGINE_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qlayout.cpp, qlayoutengine.cpp, qmainwindow.cpp and qsplitter.cpp. | ||
48 | // This header file may change from version to version without notice, | ||
49 | // or even be removed. | ||
50 | // | ||
51 | // We mean it. | ||
52 | // | ||
53 | // | ||
54 | |||
55 | |||
56 | #ifndef QT_H | ||
57 | #include "qabstractlayout.h" | ||
58 | #endif // QT_H | ||
59 | |||
60 | #ifndef QT_NO_LAYOUT | ||
61 | |||
62 | struct QLayoutStruct | ||
63 | { | ||
64 | void initParameters() { | ||
65 | minimumSize = sizeHint = 0; | ||
66 | maximumSize = QLAYOUTSIZE_MAX; | ||
67 | expansive = FALSE; | ||
68 | empty = TRUE; | ||
69 | } | ||
70 | void init() { | ||
71 | stretch = 0; | ||
72 | initParameters(); | ||
73 | } | ||
74 | |||
75 | QCOORD smartSizeHint() { | ||
76 | return ( stretch > 0 ) ? minimumSize : sizeHint; | ||
77 | } | ||
78 | |||
79 | // permanent storage | ||
80 | int stretch; | ||
81 | |||
82 | // parameters | ||
83 | QCOORD sizeHint; | ||
84 | QCOORD maximumSize; | ||
85 | QCOORD minimumSize; | ||
86 | bool expansive; | ||
87 | bool empty; | ||
88 | |||
89 | // temporary storage | ||
90 | bool done; | ||
91 | |||
92 | // result | ||
93 | int pos; | ||
94 | int size; | ||
95 | }; | ||
96 | |||
97 | |||
98 | Q_EXPORT void qGeomCalc( QMemArray<QLayoutStruct> &chain, int start, int count, | ||
99 | int pos, int space, int spacer ); | ||
100 | Q_EXPORT QSize qSmartMinSize( const QWidgetItem *i ); | ||
101 | Q_EXPORT QSize qSmartMinSize( QWidget *w ); | ||
102 | Q_EXPORT QSize qSmartMaxSize( const QWidgetItem *i, int align = 0 ); | ||
103 | Q_EXPORT QSize qSmartMaxSize( QWidget *w, int align = 0 ); | ||
104 | |||
105 | |||
106 | /* | ||
107 | Modify total maximum (max) and total expansion (exp) | ||
108 | when adding boxmax/boxexp. | ||
109 | |||
110 | Expansive boxes win over non-expansive boxes. | ||
111 | */ | ||
112 | static inline void qMaxExpCalc( QCOORD & max, bool &exp, | ||
113 | QCOORD boxmax, bool boxexp ) | ||
114 | { | ||
115 | if ( exp ) { | ||
116 | if ( boxexp ) | ||
117 | max = QMAX( max, boxmax ); | ||
118 | } else { | ||
119 | if ( boxexp ) | ||
120 | max = boxmax; | ||
121 | else | ||
122 | max = QMIN( max, boxmax ); | ||
123 | } | ||
124 | exp = exp || boxexp; | ||
125 | } | ||
126 | |||
127 | #endif //QT_NO_LAYOUT | ||
128 | #endif | ||
diff --git a/qmake/include/private/qlibrary_p.h b/qmake/include/private/qlibrary_p.h new file mode 100644 index 0000000..c4dd565 --- a/dev/null +++ b/qmake/include/private/qlibrary_p.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of an internal QLibrary class | ||
5 | ** | ||
6 | ** Created : 2000-01-01 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QLIBRARY_P_H | ||
39 | #define QLIBRARY_P_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of the QLibrary class. This header file may change from | ||
47 | // version to version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | #include "qlibrary.h" | ||
54 | |||
55 | #ifndef QT_NO_LIBRARY | ||
56 | |||
57 | #ifndef QT_H | ||
58 | #if defined(Q_CC_GNU) | ||
59 | #warning "avoid including header file \"qwindowdefs.h\" in directory 'tools'" | ||
60 | #endif | ||
61 | #include "qwindowdefs.h" | ||
62 | #endif // QT_H | ||
63 | |||
64 | class QLibraryPrivate | ||
65 | { | ||
66 | public: | ||
67 | QLibraryPrivate( QLibrary *lib ); | ||
68 | |||
69 | #ifdef Q_WS_WIN | ||
70 | HINSTANCE pHnd; | ||
71 | #else | ||
72 | void *pHnd; | ||
73 | #endif | ||
74 | |||
75 | bool loadLibrary(); | ||
76 | bool freeLibrary(); | ||
77 | void *resolveSymbol( const char * ); | ||
78 | |||
79 | private: | ||
80 | QLibrary *library; | ||
81 | }; | ||
82 | |||
83 | #endif // QT_NO_LIBRARY | ||
84 | #endif // QLIBRARY_P_H | ||
diff --git a/qmake/include/private/qmousedriverinterface_p.h b/qmake/include/private/qmousedriverinterface_p.h new file mode 100644 index 0000000..fd76308 --- a/dev/null +++ b/qmake/include/private/qmousedriverinterface_p.h | |||
@@ -0,0 +1,56 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of Qt/Embedded Mouse Driver Interface | ||
5 | ** | ||
6 | ** Created : 20020220 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed and/or modified under the terms of the | ||
13 | ** GNU General Public License version 2 as published by the Free Software | ||
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
15 | ** packaging of this file. | ||
16 | ** | ||
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
18 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
20 | ** | ||
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
23 | ** | ||
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
25 | ** information about Qt Commercial License Agreements. | ||
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
27 | ** | ||
28 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
29 | ** not clear to you. | ||
30 | ** | ||
31 | **********************************************************************/ | ||
32 | |||
33 | #ifndef QMOUSEDRIVERINTERFACE_H | ||
34 | #define QMOUSEDRIVERINTERFACE_H | ||
35 | |||
36 | #ifndef QT_H | ||
37 | #include <private/qcom_p.h> | ||
38 | #endif // QT_H | ||
39 | |||
40 | #ifndef QT_NO_COMPONENT | ||
41 | |||
42 | // {4367CF5A-F7CE-407B-8BB6-DF19AEDA2EBB} | ||
43 | #ifndef IID_QMouseDriver | ||
44 | #define IID_QMouseDriver QUuid( 0x4367cf5a, 0xf7ce, 0x407b, 0x8b, 0xb6, 0xdf, 0x19, 0xae, 0xda, 0x2e, 0xbb) | ||
45 | #endif | ||
46 | |||
47 | class QWSMouseHandler; | ||
48 | |||
49 | struct Q_EXPORT QMouseDriverInterface : public QFeatureListInterface | ||
50 | { | ||
51 | virtual QWSMouseHandler* create( const QString& driver, const QString &device ) = 0; | ||
52 | }; | ||
53 | |||
54 | #endif // QT_NO_COMPONENT | ||
55 | |||
56 | #endif // QMOUSEDRIVERINTERFACE_H | ||
diff --git a/qmake/include/private/qmutex_p.h b/qmake/include/private/qmutex_p.h new file mode 100644 index 0000000..d4ce97a --- a/dev/null +++ b/qmake/include/private/qmutex_p.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** QMutex private class declarations | ||
5 | ** | ||
6 | ** Created : 20012507 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QMUTEX_P_H | ||
39 | #define QMUTEX_P_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #endif // QT_H | ||
43 | |||
44 | // | ||
45 | // W A R N I N G | ||
46 | // ------------- | ||
47 | // | ||
48 | // This file is not part of the Qt API. It exists for the convenience | ||
49 | // of qmutex_unix.cpp and qmutex_win.cpp. This header file may change | ||
50 | // from version to version without notice, or even be removed. | ||
51 | // | ||
52 | // We mean it. | ||
53 | // | ||
54 | |||
55 | class QMutexPrivate { | ||
56 | public: | ||
57 | // Q_MUTEX_T is defined in the various *.cpp files | ||
58 | Q_MUTEX_T handle; | ||
59 | |||
60 | virtual ~QMutexPrivate(); | ||
61 | |||
62 | virtual void lock() = 0; | ||
63 | virtual void unlock() = 0; | ||
64 | virtual bool locked() = 0; | ||
65 | virtual bool trylock() = 0; | ||
66 | virtual int type() const = 0; | ||
67 | }; | ||
68 | |||
69 | |||
70 | #endif // QMUTEX_P_H | ||
diff --git a/qmake/include/private/qmutexpool_p.h b/qmake/include/private/qmutexpool_p.h new file mode 100644 index 0000000..3d9fef7 --- a/dev/null +++ b/qmake/include/private/qmutexpool_p.h | |||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef QMUTEXPOOL_H | ||
2 | #define QMUTEXPOOL_H | ||
3 | |||
4 | // | ||
5 | // W A R N I N G | ||
6 | // ------------- | ||
7 | // | ||
8 | // This file is not part of the Qt API. It exists for the convenience | ||
9 | // of QSettings. This header file may change from version to | ||
10 | // version without notice, or even be removed. | ||
11 | // | ||
12 | // We mean it. | ||
13 | // | ||
14 | // | ||
15 | |||
16 | #ifdef QT_THREAD_SUPPORT | ||
17 | |||
18 | #include "qmutex.h" | ||
19 | #include "qmemarray.h" | ||
20 | |||
21 | class QMutexPool | ||
22 | { | ||
23 | public: | ||
24 | QMutexPool( bool recursive = FALSE, int size = 17 ); | ||
25 | ~QMutexPool(); | ||
26 | |||
27 | QMutex *get( void *address ); | ||
28 | |||
29 | private: | ||
30 | QMutex mutex; | ||
31 | QMemArray<QMutex*> mutexes; | ||
32 | bool recurs; | ||
33 | }; | ||
34 | |||
35 | extern QMutexPool *qt_global_mutexpool; | ||
36 | |||
37 | #endif // QT_THREAD_SUPPORT | ||
38 | |||
39 | #endif // QMUTEXPOOL_H | ||
diff --git a/qmake/include/private/qpainter_p.h b/qmake/include/private/qpainter_p.h new file mode 100644 index 0000000..43f454e --- a/dev/null +++ b/qmake/include/private/qpainter_p.h | |||
@@ -0,0 +1,63 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some Qt private functions. | ||
5 | ** | ||
6 | ** Created : 000909 | ||
7 | ** | ||
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QPAINTER_P_H | ||
39 | #define QPAINTER_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qpainter.cpp and qfont.cpp. This header file may change | ||
48 | // from version to version without notice, or even be removed. | ||
49 | // | ||
50 | // We mean it. | ||
51 | // | ||
52 | // | ||
53 | |||
54 | #ifndef QT_H | ||
55 | #endif // QT_H | ||
56 | |||
57 | extern void qt_format_text( const QFont& f, const QRect &r, | ||
58 | int tf, const QString& str, int len, QRect *brect, | ||
59 | int tabstops, int* tabarray, int tabarraylen, | ||
60 | QTextParag **internal, QPainter* painter ); | ||
61 | |||
62 | |||
63 | #endif | ||
diff --git a/qmake/include/private/qpluginmanager_p.h b/qmake/include/private/qpluginmanager_p.h new file mode 100644 index 0000000..4b64ba0 --- a/dev/null +++ b/qmake/include/private/qpluginmanager_p.h | |||
@@ -0,0 +1,73 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QPluginManager class | ||
5 | ** | ||
6 | ** Created : 2000-01-01 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QPLUGINMANAGER_H | ||
39 | #define QPLUGINMANAGER_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include "qgpluginmanager_p.h" | ||
43 | #endif // QT_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 a number of Qt sources files. This header file may change from | ||
51 | // version to version without notice, or even be removed. | ||
52 | // | ||
53 | // We mean it. | ||
54 | // | ||
55 | // | ||
56 | |||
57 | #ifndef QT_NO_COMPONENT | ||
58 | |||
59 | template<class Type> | ||
60 | class QPluginManager : public QGPluginManager | ||
61 | { | ||
62 | public: | ||
63 | QPluginManager( const QUuid& id, const QStringList& paths = QString::null, const QString &suffix = QString::null, bool cs = TRUE ) | ||
64 | : QGPluginManager( id, paths, suffix, cs ) {} | ||
65 | QRESULT queryInterface(const QString& feature, Type** iface) const | ||
66 | { | ||
67 | return queryUnknownInterface( feature, (QUnknownInterface**)iface ); | ||
68 | } | ||
69 | }; | ||
70 | |||
71 | #endif //QT_NO_COMPONENT | ||
72 | |||
73 | #endif //QPLUGINMANAGER_H | ||
diff --git a/qmake/include/private/qpsprinter_p.h b/qmake/include/private/qpsprinter_p.h new file mode 100644 index 0000000..27a4968 --- a/dev/null +++ b/qmake/include/private/qpsprinter_p.h | |||
@@ -0,0 +1,89 @@ | |||
1 | /********************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of internal QPSPrinter class. | ||
5 | ** QPSPrinter implements PostScript (tm) output via QPrinter. | ||
6 | ** | ||
7 | ** Created : 940927 | ||
8 | ** | ||
9 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
10 | ** | ||
11 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
12 | ** | ||
13 | ** This file may be distributed under the terms of the Q Public License | ||
14 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
15 | ** LICENSE.QPL included in the packaging of this file. | ||
16 | ** | ||
17 | ** This file may be distributed and/or modified under the terms of the | ||
18 | ** GNU General Public License version 2 as published by the Free Software | ||
19 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
20 | ** packaging of this file. | ||
21 | ** | ||
22 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
23 | ** licenses may use this file in accordance with the Qt Commercial License | ||
24 | ** Agreement provided with the Software. | ||
25 | ** | ||
26 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
27 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
28 | ** | ||
29 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
30 | ** information about Qt Commercial License Agreements. | ||
31 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
32 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
33 | ** | ||
34 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
35 | ** not clear to you. | ||
36 | ** | ||
37 | **********************************************************************/ | ||
38 | |||
39 | #ifndef QPSPRINTER_P_H | ||
40 | #define QPSPRINTER_P_H | ||
41 | |||
42 | |||
43 | // | ||
44 | // W A R N I N G | ||
45 | // ------------- | ||
46 | // | ||
47 | // This file is not part of the Qt API. It exists for the convenience | ||
48 | // of qpsprinter.cpp and qprinter_x11.cpp. | ||
49 | // This header file may change from version to version without notice, | ||
50 | // or even be removed. | ||
51 | // | ||
52 | // We mean it. | ||
53 | // | ||
54 | // | ||
55 | |||
56 | |||
57 | #ifndef QT_H | ||
58 | #include "qprinter.h" | ||
59 | #include "qtextstream.h" | ||
60 | #endif // QT_H | ||
61 | |||
62 | #ifndef QT_NO_PRINTER | ||
63 | |||
64 | struct QPSPrinterPrivate; | ||
65 | |||
66 | class Q_EXPORT QPSPrinter : public QPaintDevice | ||
67 | { | ||
68 | private: | ||
69 | // QPrinter uses these | ||
70 | QPSPrinter( QPrinter *, int ); | ||
71 | ~QPSPrinter(); | ||
72 | |||
73 | bool cmd ( int, QPainter *, QPDevCmdParam * ); | ||
74 | |||
75 | enum { NewPage = 100, AbortPrinting }; | ||
76 | |||
77 | friend class QPrinter; | ||
78 | private: | ||
79 | // not used by QPrinter | ||
80 | QPSPrinterPrivate *d; | ||
81 | |||
82 | // Disabled copy constructor and operator= | ||
83 | QPSPrinter( const QPSPrinter & ); | ||
84 | QPSPrinter &operator=( const QPSPrinter & ); | ||
85 | }; | ||
86 | |||
87 | #endif // QT_NO_PRINTER | ||
88 | |||
89 | #endif // QPSPRINTER_P_H | ||
diff --git a/qmake/include/private/qrichtext_p.h b/qmake/include/private/qrichtext_p.h new file mode 100644 index 0000000..8e29804 --- a/dev/null +++ b/qmake/include/private/qrichtext_p.h | |||
@@ -0,0 +1,2133 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of internal rich text classes | ||
5 | ** | ||
6 | ** Created : 990124 | ||
7 | ** | ||
8 | ** Copyright (C) 1999-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QRICHTEXT_P_H | ||
39 | #define QRICHTEXT_P_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of a number of Qt sources files. This header file may change from | ||
47 | // version to version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | #ifndef QT_H | ||
54 | #include "qstring.h" | ||
55 | #include "qptrlist.h" | ||
56 | #include "qrect.h" | ||
57 | #include "qfontmetrics.h" | ||
58 | #include "qintdict.h" | ||
59 | #include "qmap.h" | ||
60 | #include "qstringlist.h" | ||
61 | #include "qfont.h" | ||
62 | #include "qcolor.h" | ||
63 | #include "qsize.h" | ||
64 | #include "qvaluelist.h" | ||
65 | #include "qvaluestack.h" | ||
66 | #include "qobject.h" | ||
67 | #include "qdict.h" | ||
68 | #include "qpixmap.h" | ||
69 | #include "qstylesheet.h" | ||
70 | #include "qptrvector.h" | ||
71 | #include "qpainter.h" | ||
72 | #include "qlayout.h" | ||
73 | #include "qobject.h" | ||
74 | #include "private/qcomplextext_p.h" | ||
75 | #include "qapplication.h" | ||
76 | #endif // QT_H | ||
77 | |||
78 | #ifndef QT_NO_RICHTEXT | ||
79 | |||
80 | class QTextDocument; | ||
81 | class QTextString; | ||
82 | class QTextPreProcessor; | ||
83 | class QTextFormat; | ||
84 | class QTextCursor; | ||
85 | class QTextParagraph; | ||
86 | class QTextFormatter; | ||
87 | class QTextIndent; | ||
88 | class QTextFormatCollection; | ||
89 | class QStyleSheetItem; | ||
90 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
91 | class QTextCustomItem; | ||
92 | #endif | ||
93 | class QTextFlow; | ||
94 | struct QBidiContext; | ||
95 | |||
96 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
97 | |||
98 | class Q_EXPORT QTextStringChar | ||
99 | { | ||
100 | friend class QTextString; | ||
101 | |||
102 | public: | ||
103 | // this is never called, initialize variables in QTextString::insert()!!! | ||
104 | QTextStringChar() : lineStart( 0 ), type( Regular ), startOfRun( 0 ) {d.format=0;} | ||
105 | ~QTextStringChar(); | ||
106 | |||
107 | QChar c; | ||
108 | enum Type { Regular=0, Custom=1, Anchor=2, CustomAnchor=3 }; | ||
109 | uint lineStart : 1; | ||
110 | uint rightToLeft : 1; | ||
111 | uint hasCursor : 1; | ||
112 | uint canBreak : 1; | ||
113 | Type type : 2; | ||
114 | uint startOfRun : 1; | ||
115 | |||
116 | int x; | ||
117 | int height() const; | ||
118 | int ascent() const; | ||
119 | int descent() const; | ||
120 | bool isCustom() const { return (type & Custom) != 0; } | ||
121 | QTextFormat *format() const; | ||
122 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
123 | QTextCustomItem *customItem() const; | ||
124 | #endif | ||
125 | void setFormat( QTextFormat *f ); | ||
126 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
127 | void setCustomItem( QTextCustomItem *i ); | ||
128 | #endif | ||
129 | struct CustomData | ||
130 | { | ||
131 | QTextFormat *format; | ||
132 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
133 | QTextCustomItem *custom; | ||
134 | #endif | ||
135 | QString anchorName; | ||
136 | QString anchorHref; | ||
137 | }; | ||
138 | |||
139 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
140 | void loseCustomItem(); | ||
141 | #endif | ||
142 | |||
143 | union { | ||
144 | QTextFormat* format; | ||
145 | CustomData* custom; | ||
146 | } d; | ||
147 | |||
148 | bool isAnchor() const { return ( type & Anchor) != 0; } | ||
149 | bool isLink() const { return isAnchor() && !!d.custom->anchorHref; } | ||
150 | QString anchorName() const; | ||
151 | QString anchorHref() const; | ||
152 | void setAnchor( const QString& name, const QString& href ); | ||
153 | |||
154 | private: | ||
155 | QTextStringChar &operator=( const QTextStringChar & ) { | ||
156 | //abort(); | ||
157 | return *this; | ||
158 | } | ||
159 | friend class QComplexText; | ||
160 | friend class QTextParagraph; | ||
161 | }; | ||
162 | |||
163 | #if defined(Q_TEMPLATEDLL) | ||
164 | // MOC_SKIP_BEGIN | ||
165 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMemArray<QTextStringChar>; | ||
166 | // MOC_SKIP_END | ||
167 | #endif | ||
168 | |||
169 | class Q_EXPORT QTextString | ||
170 | { | ||
171 | public: | ||
172 | |||
173 | QTextString(); | ||
174 | QTextString( const QTextString &s ); | ||
175 | virtual ~QTextString(); | ||
176 | |||
177 | static QString toString( const QMemArray<QTextStringChar> &data ); | ||
178 | QString toString() const; | ||
179 | |||
180 | QTextStringChar &at( int i ) const; | ||
181 | #if defined(Q_STRICT_INLINING_RULES) | ||
182 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | ||
183 | // implementation to be a redefinition. | ||
184 | inline int length() const; | ||
185 | #else | ||
186 | int length() const; | ||
187 | #endif | ||
188 | |||
189 | int width( int idx ) const; | ||
190 | |||
191 | void insert( int index, const QString &s, QTextFormat *f ); | ||
192 | void insert( int index, const QChar *unicode, int len, QTextFormat *f ); | ||
193 | void insert( int index, QTextStringChar *c, bool doAddRefFormat = FALSE ); | ||
194 | void truncate( int index ); | ||
195 | void remove( int index, int len ); | ||
196 | void clear(); | ||
197 | |||
198 | void setFormat( int index, QTextFormat *f, bool useCollection ); | ||
199 | |||
200 | void setBidi( bool b ) { bidi = b; } | ||
201 | bool isBidi() const; | ||
202 | bool isRightToLeft() const; | ||
203 | QChar::Direction direction() const; | ||
204 | void setDirection( QChar::Direction d ) { dir = d; bidiDirty = TRUE; } | ||
205 | |||
206 | QMemArray<QTextStringChar> subString( int start = 0, int len = 0xFFFFFF ) const; | ||
207 | QMemArray<QTextStringChar> rawData() const { return data.copy(); } | ||
208 | |||
209 | void operator=( const QString &s ) { clear(); insert( 0, s, 0 ); } | ||
210 | void operator+=( const QString &s ) { insert( length(), s, 0 ); } | ||
211 | void prepend( const QString &s ) { insert( 0, s, 0 ); } | ||
212 | |||
213 | private: | ||
214 | void checkBidi() const; | ||
215 | |||
216 | QMemArray<QTextStringChar> data; | ||
217 | uint bidiDirty : 1; | ||
218 | uint bidi : 1; // true when the paragraph has right to left characters | ||
219 | uint rightToLeft : 1; | ||
220 | uint dir : 5; | ||
221 | }; | ||
222 | |||
223 | inline bool QTextString::isBidi() const | ||
224 | { | ||
225 | if ( bidiDirty ) | ||
226 | checkBidi(); | ||
227 | return bidi; | ||
228 | } | ||
229 | |||
230 | inline bool QTextString::isRightToLeft() const | ||
231 | { | ||
232 | if ( bidiDirty ) | ||
233 | checkBidi(); | ||
234 | return rightToLeft; | ||
235 | } | ||
236 | |||
237 | inline QChar::Direction QTextString::direction() const | ||
238 | { | ||
239 | return (QChar::Direction) dir; | ||
240 | } | ||
241 | |||
242 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
243 | |||
244 | #if defined(Q_TEMPLATEDLL) | ||
245 | // MOC_SKIP_BEGIN | ||
246 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<int>; | ||
247 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<QTextParagraph*>; | ||
248 | Q_TEMPLATE_EXTERN template class Q_EXPORT QValueStack<bool>; | ||
249 | // MOC_SKIP_END | ||
250 | #endif | ||
251 | |||
252 | class Q_EXPORT QTextCursor | ||
253 | { | ||
254 | public: | ||
255 | QTextCursor( QTextDocument *d = 0 ); | ||
256 | QTextCursor( const QTextCursor &c ); | ||
257 | QTextCursor &operator=( const QTextCursor &c ); | ||
258 | virtual ~QTextCursor() {} | ||
259 | |||
260 | bool operator==( const QTextCursor &c ) const; | ||
261 | bool operator!=( const QTextCursor &c ) const { return !(*this == c); } | ||
262 | |||
263 | #if defined(Q_STRICT_INLINING_RULES) | ||
264 | // This is for the IRIX MIPSpro o32 ABI - it fails, claiming the | ||
265 | // implementation to be a redefinition. | ||
266 | inline QTextParagraph *paragraph() const; | ||
267 | #else | ||
268 | QTextParagraph *paragraph() const; | ||
269 | #endif | ||
270 | |||
271 | void setParagraph( QTextParagraph*p ) { gotoPosition(p, 0 ); } | ||
272 | QTextDocument *document() const; | ||
273 | int index() const; | ||
274 | void setIndex( int index ) { gotoPosition(paragraph(), index ); } | ||
275 | |||
276 | void gotoPosition( QTextParagraph* p, int index = 0); | ||
277 | void gotoLeft(); | ||
278 | void gotoRight(); | ||
279 | void gotoNextLetter(); | ||
280 | void gotoPreviousLetter(); | ||
281 | void gotoUp(); | ||
282 | void gotoDown(); | ||
283 | void gotoLineEnd(); | ||
284 | void gotoLineStart(); | ||
285 | void gotoHome(); | ||
286 | void gotoEnd(); | ||
287 | void gotoPageUp( int visibleHeight ); | ||
288 | void gotoPageDown( int visibleHeight ); | ||
289 | void gotoNextWord(); | ||
290 | void gotoPreviousWord(); | ||
291 | void gotoWordLeft(); | ||
292 | void gotoWordRight(); | ||
293 | |||
294 | void insert( const QString &s, bool checkNewLine, QMemArray<QTextStringChar> *formatting = 0 ); | ||
295 | void splitAndInsertEmptyParagraph( bool ind = TRUE, bool updateIds = TRUE ); | ||
296 | bool remove(); | ||
297 | void indent(); | ||
298 | |||
299 | bool atParagStart(); | ||
300 | bool atParagEnd(); | ||
301 | |||
302 | int x() const; // x in current paragraph | ||
303 | int y() const; // y in current paragraph | ||
304 | |||
305 | int globalX() const; | ||
306 | int globalY() const; | ||
307 | |||
308 | QTextParagraph *topParagraph() const { return paras.isEmpty() ? para : paras.first(); } | ||
309 | int offsetX() const { return ox; } // inner document offset | ||
310 | int offsetY() const { return oy; } // inner document offset | ||
311 | int totalOffsetX() const; // total document offset | ||
312 | int totalOffsetY() const; // total document offset | ||
313 | |||
314 | bool place( const QPoint &pos, QTextParagraph *s ) { return place( pos, s, FALSE ); } | ||
315 | bool place( const QPoint &pos, QTextParagraph *s, bool link ); | ||
316 | void restoreState(); | ||
317 | |||
318 | |||
319 | int nestedDepth() const { return (int)indices.count(); } //### size_t/int cast | ||
320 | void oneUp() { if ( !indices.isEmpty() ) pop(); } | ||
321 | void setValid( bool b ) { valid = b; } | ||
322 | bool isValid() const { return valid; } | ||
323 | |||
324 | private: | ||
325 | enum Operation { EnterBegin, EnterEnd, Next, Prev, Up, Down }; | ||
326 | |||
327 | void push(); | ||
328 | void pop(); | ||
329 | void processNesting( Operation op ); | ||
330 | void invalidateNested(); | ||
331 | void gotoIntoNested( const QPoint &globalPos ); | ||
332 | |||
333 | QTextParagraph *para; | ||
334 | int idx, tmpIndex; | ||
335 | int ox, oy; | ||
336 | QValueStack<int> indices; | ||
337 | QValueStack<QTextParagraph*> paras; | ||
338 | QValueStack<int> xOffsets; | ||
339 | QValueStack<int> yOffsets; | ||
340 | uint valid : 1; | ||
341 | |||
342 | }; | ||
343 | |||
344 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
345 | |||
346 | class Q_EXPORT QTextCommand | ||
347 | { | ||
348 | public: | ||
349 | enum Commands { Invalid, Insert, Delete, Format, Style }; | ||
350 | |||
351 | QTextCommand( QTextDocument *d ) : doc( d ), cursor( d ) {} | ||
352 | virtual ~QTextCommand(); | ||
353 | |||
354 | virtual Commands type() const; | ||
355 | |||
356 | virtual QTextCursor *execute( QTextCursor *c ) = 0; | ||
357 | virtual QTextCursor *unexecute( QTextCursor *c ) = 0; | ||
358 | |||
359 | protected: | ||
360 | QTextDocument *doc; | ||
361 | QTextCursor cursor; | ||
362 | |||
363 | }; | ||
364 | |||
365 | #if defined(Q_TEMPLATEDLL) | ||
366 | // MOC_SKIP_BEGIN | ||
367 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCommand>; | ||
368 | // MOC_SKIP_END | ||
369 | #endif | ||
370 | |||
371 | class Q_EXPORT QTextCommandHistory | ||
372 | { | ||
373 | public: | ||
374 | QTextCommandHistory( int s ) : current( -1 ), steps( s ) { history.setAutoDelete( TRUE ); } | ||
375 | virtual ~QTextCommandHistory(); | ||
376 | |||
377 | void clear() { history.clear(); current = -1; } | ||
378 | |||
379 | void addCommand( QTextCommand *cmd ); | ||
380 | QTextCursor *undo( QTextCursor *c ); | ||
381 | QTextCursor *redo( QTextCursor *c ); | ||
382 | |||
383 | bool isUndoAvailable(); | ||
384 | bool isRedoAvailable(); | ||
385 | |||
386 | void setUndoDepth( int d ) { steps = d; } | ||
387 | int undoDepth() const { return steps; } | ||
388 | |||
389 | int historySize() const { return history.count(); } | ||
390 | int currentPosition() const { return current; } | ||
391 | |||
392 | private: | ||
393 | QPtrList<QTextCommand> history; | ||
394 | int current, steps; | ||
395 | |||
396 | }; | ||
397 | |||
398 | inline QTextCommandHistory::~QTextCommandHistory() | ||
399 | { | ||
400 | clear(); | ||
401 | } | ||
402 | |||
403 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
404 | |||
405 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
406 | class Q_EXPORT QTextCustomItem | ||
407 | { | ||
408 | public: | ||
409 | QTextCustomItem( QTextDocument *p ) | ||
410 | : xpos(0), ypos(-1), width(-1), height(0), parent( p ) | ||
411 | {} | ||
412 | virtual ~QTextCustomItem(); | ||
413 | virtual void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ) = 0; | ||
414 | |||
415 | virtual void adjustToPainter( QPainter* ); | ||
416 | |||
417 | enum Placement { PlaceInline = 0, PlaceLeft, PlaceRight }; | ||
418 | virtual Placement placement() const; | ||
419 | bool placeInline() { return placement() == PlaceInline; } | ||
420 | |||
421 | virtual bool ownLine() const; | ||
422 | virtual void resize( int nwidth ); | ||
423 | virtual void invalidate(); | ||
424 | virtual int ascent() const { return height; } | ||
425 | |||
426 | virtual bool isNested() const; | ||
427 | virtual int minimumWidth() const; | ||
428 | |||
429 | virtual QString richText() const; | ||
430 | |||
431 | int xpos; // used for floating items | ||
432 | int ypos; // used for floating items | ||
433 | int width; | ||
434 | int height; | ||
435 | |||
436 | QRect geometry() const { return QRect( xpos, ypos, width, height ); } | ||
437 | |||
438 | virtual bool enter( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); | ||
439 | virtual bool enterAt( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, const QPoint & ); | ||
440 | virtual bool next( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
441 | virtual bool prev( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
442 | virtual bool down( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
443 | virtual bool up( QTextCursor *, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
444 | |||
445 | void setParagraph( QTextParagraph *p ) { parag = p; } | ||
446 | QTextParagraph *paragraph() const { return parag; } | ||
447 | |||
448 | QTextDocument *parent; | ||
449 | QTextParagraph *parag; | ||
450 | |||
451 | virtual void pageBreak( int y, QTextFlow* flow ); | ||
452 | }; | ||
453 | #endif | ||
454 | |||
455 | #if defined(Q_TEMPLATEDLL) | ||
456 | // MOC_SKIP_BEGIN | ||
457 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QString, QString>; | ||
458 | // MOC_SKIP_END | ||
459 | #endif | ||
460 | |||
461 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
462 | class Q_EXPORT QTextImage : public QTextCustomItem | ||
463 | { | ||
464 | public: | ||
465 | QTextImage( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, | ||
466 | QMimeSourceFactory &factory ); | ||
467 | virtual ~QTextImage(); | ||
468 | |||
469 | Placement placement() const { return place; } | ||
470 | void adjustToPainter( QPainter* ); | ||
471 | int minimumWidth() const { return width; } | ||
472 | |||
473 | QString richText() const; | ||
474 | |||
475 | void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); | ||
476 | |||
477 | private: | ||
478 | QRegion* reg; | ||
479 | QPixmap pm; | ||
480 | Placement place; | ||
481 | int tmpwidth, tmpheight; | ||
482 | QMap<QString, QString> attributes; | ||
483 | QString imgId; | ||
484 | |||
485 | }; | ||
486 | #endif | ||
487 | |||
488 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
489 | class Q_EXPORT QTextHorizontalLine : public QTextCustomItem | ||
490 | { | ||
491 | public: | ||
492 | QTextHorizontalLine( QTextDocument *p, const QMap<QString, QString> &attr, const QString& context, | ||
493 | QMimeSourceFactory &factory ); | ||
494 | virtual ~QTextHorizontalLine(); | ||
495 | |||
496 | void adjustToPainter( QPainter* ); | ||
497 | void draw(QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); | ||
498 | QString richText() const; | ||
499 | |||
500 | bool ownLine() const { return TRUE; } | ||
501 | |||
502 | private: | ||
503 | int tmpheight; | ||
504 | QColor color; | ||
505 | bool shade; | ||
506 | |||
507 | }; | ||
508 | #endif | ||
509 | |||
510 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
511 | #if defined(Q_TEMPLATEDLL) | ||
512 | // MOC_SKIP_BEGIN | ||
513 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextCustomItem>; | ||
514 | // MOC_SKIP_END | ||
515 | #endif | ||
516 | #endif | ||
517 | |||
518 | class Q_EXPORT QTextFlow | ||
519 | { | ||
520 | friend class QTextDocument; | ||
521 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
522 | friend class QTextTableCell; | ||
523 | #endif | ||
524 | |||
525 | public: | ||
526 | QTextFlow(); | ||
527 | virtual ~QTextFlow(); | ||
528 | |||
529 | virtual void setWidth( int width ); | ||
530 | int width() const; | ||
531 | |||
532 | virtual void setPageSize( int ps ); | ||
533 | int pageSize() const { return pagesize; } | ||
534 | |||
535 | virtual int adjustLMargin( int yp, int h, int margin, int space ); | ||
536 | virtual int adjustRMargin( int yp, int h, int margin, int space ); | ||
537 | |||
538 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
539 | virtual void registerFloatingItem( QTextCustomItem* item ); | ||
540 | virtual void unregisterFloatingItem( QTextCustomItem* item ); | ||
541 | #endif | ||
542 | virtual QRect boundingRect() const; | ||
543 | virtual void drawFloatingItems(QPainter* p, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); | ||
544 | |||
545 | virtual int adjustFlow( int y, int w, int h ); // adjusts y according to the defined pagesize. Returns the shift. | ||
546 | |||
547 | virtual bool isEmpty(); | ||
548 | |||
549 | void clear(); | ||
550 | |||
551 | private: | ||
552 | int w; | ||
553 | int pagesize; | ||
554 | |||
555 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
556 | QPtrList<QTextCustomItem> leftItems; | ||
557 | QPtrList<QTextCustomItem> rightItems; | ||
558 | #endif | ||
559 | }; | ||
560 | |||
561 | inline int QTextFlow::width() const { return w; } | ||
562 | |||
563 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
564 | class QTextTable; | ||
565 | |||
566 | class Q_EXPORT QTextTableCell : public QLayoutItem | ||
567 | { | ||
568 | friend class QTextTable; | ||
569 | |||
570 | public: | ||
571 | QTextTableCell( QTextTable* table, | ||
572 | int row, int column, | ||
573 | const QMap<QString, QString> &attr, | ||
574 | const QStyleSheetItem* style, | ||
575 | const QTextFormat& fmt, const QString& context, | ||
576 | QMimeSourceFactory &factory, QStyleSheet *sheet, const QString& doc ); | ||
577 | virtual ~QTextTableCell(); | ||
578 | |||
579 | QSize sizeHint() const ; | ||
580 | QSize minimumSize() const ; | ||
581 | QSize maximumSize() const ; | ||
582 | QSizePolicy::ExpandData expanding() const; | ||
583 | bool isEmpty() const; | ||
584 | void setGeometry( const QRect& ) ; | ||
585 | QRect geometry() const; | ||
586 | |||
587 | bool hasHeightForWidth() const; | ||
588 | int heightForWidth( int ) const; | ||
589 | |||
590 | void adjustToPainter( QPainter* ); | ||
591 | |||
592 | int row() const { return row_; } | ||
593 | int column() const { return col_; } | ||
594 | int rowspan() const { return rowspan_; } | ||
595 | int colspan() const { return colspan_; } | ||
596 | int stretch() const { return stretch_; } | ||
597 | |||
598 | QTextDocument* richText() const { return richtext; } | ||
599 | QTextTable* table() const { return parent; } | ||
600 | |||
601 | void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, const QColorGroup& cg, bool selected ); | ||
602 | |||
603 | QBrush *backGround() const { return background; } | ||
604 | virtual void invalidate(); | ||
605 | |||
606 | int verticalAlignmentOffset() const; | ||
607 | int horizontalAlignmentOffset() const; | ||
608 | |||
609 | private: | ||
610 | QRect geom; | ||
611 | QTextTable* parent; | ||
612 | QTextDocument* richtext; | ||
613 | int row_; | ||
614 | int col_; | ||
615 | int rowspan_; | ||
616 | int colspan_; | ||
617 | int stretch_; | ||
618 | int maxw; | ||
619 | int minw; | ||
620 | bool hasFixedWidth; | ||
621 | QBrush *background; | ||
622 | int cached_width; | ||
623 | int cached_sizehint; | ||
624 | QMap<QString, QString> attributes; | ||
625 | int align; | ||
626 | }; | ||
627 | #endif | ||
628 | |||
629 | #if defined(Q_TEMPLATEDLL) | ||
630 | // MOC_SKIP_BEGIN | ||
631 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextTableCell>; | ||
632 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<QTextCursor*, int>; | ||
633 | // MOC_SKIP_END | ||
634 | #endif | ||
635 | |||
636 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
637 | class Q_EXPORT QTextTable: public QTextCustomItem | ||
638 | { | ||
639 | friend class QTextTableCell; | ||
640 | |||
641 | public: | ||
642 | QTextTable( QTextDocument *p, const QMap<QString, QString> &attr ); | ||
643 | virtual ~QTextTable(); | ||
644 | |||
645 | void adjustToPainter( QPainter *p ); | ||
646 | void pageBreak( int y, QTextFlow* flow ); | ||
647 | void draw( QPainter* p, int x, int y, int cx, int cy, int cw, int ch, | ||
648 | const QColorGroup& cg, bool selected ); | ||
649 | |||
650 | bool noErase() const { return TRUE; } | ||
651 | bool ownLine() const { return TRUE; } | ||
652 | Placement placement() const { return place; } | ||
653 | bool isNested() const { return TRUE; } | ||
654 | void resize( int nwidth ); | ||
655 | virtual void invalidate(); | ||
656 | |||
657 | virtual bool enter( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, bool atEnd = FALSE ); | ||
658 | virtual bool enterAt( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy, const QPoint &pos ); | ||
659 | virtual bool next( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
660 | virtual bool prev( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
661 | virtual bool down( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
662 | virtual bool up( QTextCursor *c, QTextDocument *&doc, QTextParagraph *¶g, int &idx, int &ox, int &oy ); | ||
663 | |||
664 | QString richText() const; | ||
665 | |||
666 | int minimumWidth() const; | ||
667 | |||
668 | QPtrList<QTextTableCell> tableCells() const { return cells; } | ||
669 | |||
670 | bool isStretching() const { return stretch; } | ||
671 | |||
672 | private: | ||
673 | void format( int w ); | ||
674 | void addCell( QTextTableCell* cell ); | ||
675 | |||
676 | private: | ||
677 | QGridLayout* layout; | ||
678 | QPtrList<QTextTableCell> cells; | ||
679 | int cachewidth; | ||
680 | int fixwidth; | ||
681 | int cellpadding; | ||
682 | int cellspacing; | ||
683 | int border; | ||
684 | int outerborder; | ||
685 | int stretch; | ||
686 | int innerborder; | ||
687 | int us_cp, us_ib, us_b, us_ob, us_cs; | ||
688 | QMap<QString, QString> attributes; | ||
689 | QMap<QTextCursor*, int> currCell; | ||
690 | Placement place; | ||
691 | void adjustCells( int y , int shift ); | ||
692 | int pageBreakFor; | ||
693 | }; | ||
694 | #endif | ||
695 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
696 | |||
697 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
698 | class QTextTableCell; | ||
699 | class QTextParagraph; | ||
700 | #endif | ||
701 | |||
702 | struct Q_EXPORT QTextDocumentSelection | ||
703 | { | ||
704 | QTextCursor startCursor, endCursor; | ||
705 | bool swapped; | ||
706 | }; | ||
707 | |||
708 | #if defined(Q_TEMPLATEDLL) | ||
709 | // MOC_SKIP_BEGIN | ||
710 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QColor>; | ||
711 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, bool>; | ||
712 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextDocumentSelection>; | ||
713 | Q_TEMPLATE_EXTERN template class Q_EXPORT QPtrList<QTextDocument>; | ||
714 | // MOC_SKIP_END | ||
715 | #endif | ||
716 | |||
717 | class Q_EXPORT QTextDocument : public QObject | ||
718 | { | ||
719 | Q_OBJECT | ||
720 | |||
721 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
722 | friend class QTextTableCell; | ||
723 | #endif | ||
724 | friend class QTextCursor; | ||
725 | friend class QTextEdit; | ||
726 | friend class QTextParagraph; | ||
727 | |||
728 | public: | ||
729 | enum SelectionIds { | ||
730 | Standard = 0, | ||
731 | IMSelectionText = 31998, | ||
732 | IMCompositionText= 31999, // this must be higher! | ||
733 | Temp = 32000 // This selection must not be drawn, it's used e.g. by undo/redo to | ||
734 | // remove multiple lines with removeSelectedText() | ||
735 | }; | ||
736 | |||
737 | QTextDocument( QTextDocument *p ); | ||
738 | QTextDocument( QTextDocument *d, QTextFormatCollection *f ); | ||
739 | virtual ~QTextDocument(); | ||
740 | |||
741 | QTextDocument *parent() const { return par; } | ||
742 | QTextParagraph *parentParagraph() const { return parentPar; } | ||
743 | |||
744 | void setText( const QString &text, const QString &context ); | ||
745 | QMap<QString, QString> attributes() const { return attribs; } | ||
746 | void setAttributes( const QMap<QString, QString> &attr ) { attribs = attr; } | ||
747 | |||
748 | QString text() const; | ||
749 | QString text( int parag ) const; | ||
750 | QString originalText() const; | ||
751 | |||
752 | int x() const; | ||
753 | int y() const; | ||
754 | int width() const; | ||
755 | int widthUsed() const; | ||
756 | int visibleWidth() const; | ||
757 | int height() const; | ||
758 | void setWidth( int w ); | ||
759 | int minimumWidth() const; | ||
760 | bool setMinimumWidth( int needed, int used = -1, QTextParagraph *parag = 0 ); | ||
761 | |||
762 | void setY( int y ); | ||
763 | int leftMargin() const; | ||
764 | void setLeftMargin( int lm ); | ||
765 | int rightMargin() const; | ||
766 | void setRightMargin( int rm ); | ||
767 | |||
768 | QTextParagraph *firstParagraph() const; | ||
769 | QTextParagraph *lastParagraph() const; | ||
770 | void setFirstParagraph( QTextParagraph *p ); | ||
771 | void setLastParagraph( QTextParagraph *p ); | ||
772 | |||
773 | void invalidate(); | ||
774 | |||
775 | void setPreProcessor( QTextPreProcessor *sh ); | ||
776 | QTextPreProcessor *preProcessor() const; | ||
777 | |||
778 | void setFormatter( QTextFormatter *f ); | ||
779 | QTextFormatter *formatter() const; | ||
780 | |||
781 | void setIndent( QTextIndent *i ); | ||
782 | QTextIndent *indent() const; | ||
783 | |||
784 | QColor selectionColor( int id ) const; | ||
785 | bool invertSelectionText( int id ) const; | ||
786 | void setSelectionColor( int id, const QColor &c ); | ||
787 | void setInvertSelectionText( int id, bool b ); | ||
788 | bool hasSelection( int id, bool visible = FALSE ) const; | ||
789 | void setSelectionStart( int id, const QTextCursor &cursor ); | ||
790 | bool setSelectionEnd( int id, const QTextCursor &cursor ); | ||
791 | void selectAll( int id ); | ||
792 | bool removeSelection( int id ); | ||
793 | void selectionStart( int id, int ¶gId, int &index ); | ||
794 | QTextCursor selectionStartCursor( int id ); | ||
795 | QTextCursor selectionEndCursor( int id ); | ||
796 | void selectionEnd( int id, int ¶gId, int &index ); | ||
797 | void setFormat( int id, QTextFormat *f, int flags ); | ||
798 | int numSelections() const { return nSelections; } | ||
799 | void addSelection( int id ); | ||
800 | |||
801 | QString selectedText( int id, bool asRichText = FALSE ) const; | ||
802 | void removeSelectedText( int id, QTextCursor *cursor ); | ||
803 | void indentSelection( int id ); | ||
804 | |||
805 | QTextParagraph *paragAt( int i ) const; | ||
806 | |||
807 | void addCommand( QTextCommand *cmd ); | ||
808 | QTextCursor *undo( QTextCursor *c = 0 ); | ||
809 | QTextCursor *redo( QTextCursor *c = 0 ); | ||
810 | QTextCommandHistory *commands() const { return commandHistory; } | ||
811 | |||
812 | QTextFormatCollection *formatCollection() const; | ||
813 | |||
814 | bool find( QTextCursor &cursor, const QString &expr, bool cs, bool wo, bool forward); | ||
815 | |||
816 | void setTextFormat( Qt::TextFormat f ); | ||
817 | Qt::TextFormat textFormat() const; | ||
818 | |||
819 | bool inSelection( int selId, const QPoint &pos ) const; | ||
820 | |||
821 | QStyleSheet *styleSheet() const { return sheet_; } | ||
822 | #ifndef QT_NO_MIME | ||
823 | QMimeSourceFactory *mimeSourceFactory() const { return factory_; } | ||
824 | #endif | ||
825 | QString context() const { return contxt; } | ||
826 | |||
827 | void setStyleSheet( QStyleSheet *s ); | ||
828 | void setDefaultFormat( const QFont &font, const QColor &color ); | ||
829 | #ifndef QT_NO_MIME | ||
830 | void setMimeSourceFactory( QMimeSourceFactory *f ) { if ( f ) factory_ = f; } | ||
831 | #endif | ||
832 | void setContext( const QString &c ) { if ( !c.isEmpty() ) contxt = c; } | ||
833 | |||
834 | void setUnderlineLinks( bool b ); | ||
835 | bool underlineLinks() const { return underlLinks; } | ||
836 | |||
837 | void setPaper( QBrush *brush ) { if ( backBrush ) delete backBrush; backBrush = brush; } | ||
838 | QBrush *paper() const { return backBrush; } | ||
839 | |||
840 | void doLayout( QPainter *p, int w ); | ||
841 | void draw( QPainter *p, const QRect& rect, const QColorGroup &cg, const QBrush *paper = 0 ); | ||
842 | void drawParagraph( QPainter *p, QTextParagraph *parag, int cx, int cy, int cw, int ch, | ||
843 | QPixmap *&doubleBuffer, const QColorGroup &cg, | ||
844 | bool drawCursor, QTextCursor *cursor, bool resetChanged = TRUE ); | ||
845 | QTextParagraph *draw( QPainter *p, int cx, int cy, int cw, int ch, const QColorGroup &cg, | ||
846 | bool onlyChanged = FALSE, bool drawCursor = FALSE, QTextCursor *cursor = 0, | ||
847 | bool resetChanged = TRUE ); | ||
848 | |||
849 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
850 | void registerCustomItem( QTextCustomItem *i, QTextParagraph *p ); | ||
851 | void unregisterCustomItem( QTextCustomItem *i, QTextParagraph *p ); | ||
852 | #endif | ||
853 | |||
854 | void setFlow( QTextFlow *f ); | ||
855 | void takeFlow(); | ||
856 | QTextFlow *flow() const { return flow_; } | ||
857 | bool isPageBreakEnabled() const { return pages; } | ||
858 | void setPageBreakEnabled( bool b ) { pages = b; } | ||
859 | |||
860 | void setUseFormatCollection( bool b ) { useFC = b; } | ||
861 | bool useFormatCollection() const { return useFC; } | ||
862 | |||
863 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
864 | QTextTableCell *tableCell() const { return tc; } | ||
865 | void setTableCell( QTextTableCell *c ) { tc = c; } | ||
866 | #endif | ||
867 | |||
868 | void setPlainText( const QString &text ); | ||
869 | void setRichText( const QString &text, const QString &context ); | ||
870 | QString richText() const; | ||
871 | QString plainText() const; | ||
872 | |||
873 | bool focusNextPrevChild( bool next ); | ||
874 | |||
875 | int alignment() const; | ||
876 | void setAlignment( int a ); | ||
877 | |||
878 | int *tabArray() const; | ||
879 | int tabStopWidth() const; | ||
880 | void setTabArray( int *a ); | ||
881 | void setTabStops( int tw ); | ||
882 | |||
883 | void setUndoDepth( int d ) { commandHistory->setUndoDepth( d ); } | ||
884 | int undoDepth() const { return commandHistory->undoDepth(); } | ||
885 | |||
886 | int length() const; | ||
887 | void clear( bool createEmptyParag = FALSE ); | ||
888 | |||
889 | virtual QTextParagraph *createParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); | ||
890 | void insertChild( QObject *o ) { QObject::insertChild( o ); } | ||
891 | void removeChild( QObject *o ) { QObject::removeChild( o ); } | ||
892 | void insertChild( QTextDocument *d ) { childList.append( d ); } | ||
893 | void removeChild( QTextDocument *d ) { childList.removeRef( d ); } | ||
894 | QPtrList<QTextDocument> children() const { return childList; } | ||
895 | |||
896 | bool hasFocusParagraph() const; | ||
897 | QString focusHref() const; | ||
898 | QString focusName() const; | ||
899 | |||
900 | void invalidateOriginalText() { oTextValid = FALSE; oText = ""; } | ||
901 | |||
902 | signals: | ||
903 | void minimumWidthChanged( int ); | ||
904 | |||
905 | private: | ||
906 | void init(); | ||
907 | QPixmap *bufferPixmap( const QSize &s ); | ||
908 | // HTML parser | ||
909 | bool hasPrefix(const QChar* doc, int length, int pos, QChar c); | ||
910 | bool hasPrefix(const QChar* doc, int length, int pos, const QString& s); | ||
911 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
912 | QTextCustomItem* parseTable( const QMap<QString, QString> &attr, const QTextFormat &fmt, | ||
913 | const QChar* doc, int length, int& pos, QTextParagraph *curpar ); | ||
914 | #endif | ||
915 | bool eatSpace(const QChar* doc, int length, int& pos, bool includeNbsp = FALSE ); | ||
916 | bool eat(const QChar* doc, int length, int& pos, QChar c); | ||
917 | QString parseOpenTag(const QChar* doc, int length, int& pos, QMap<QString, QString> &attr, bool& emptyTag); | ||
918 | QString parseCloseTag( const QChar* doc, int length, int& pos ); | ||
919 | QChar parseHTMLSpecialChar(const QChar* doc, int length, int& pos); | ||
920 | QString parseWord(const QChar* doc, int length, int& pos, bool lower = TRUE); | ||
921 | QChar parseChar(const QChar* doc, int length, int& pos, QStyleSheetItem::WhiteSpaceMode wsm ); | ||
922 | void setRichTextInternal( const QString &text, QTextCursor* cursor = 0 ); | ||
923 | void setRichTextMarginsInternal( QPtrList< QPtrVector<QStyleSheetItem> >& styles, QTextParagraph* stylesPar ); | ||
924 | |||
925 | private: | ||
926 | struct Q_EXPORT Focus { | ||
927 | QTextParagraph *parag; | ||
928 | int start, len; | ||
929 | QString href; | ||
930 | QString name; | ||
931 | }; | ||
932 | |||
933 | int cx, cy, cw, vw; | ||
934 | QTextParagraph *fParag, *lParag; | ||
935 | QTextPreProcessor *pProcessor; | ||
936 | QMap<int, QColor> selectionColors; | ||
937 | QMap<int, QTextDocumentSelection> selections; | ||
938 | QMap<int, bool> selectionText; | ||
939 | QTextCommandHistory *commandHistory; | ||
940 | QTextFormatter *pFormatter; | ||
941 | QTextIndent *indenter; | ||
942 | QTextFormatCollection *fCollection; | ||
943 | Qt::TextFormat txtFormat; | ||
944 | uint preferRichText : 1; | ||
945 | uint pages : 1; | ||
946 | uint useFC : 1; | ||
947 | uint withoutDoubleBuffer : 1; | ||
948 | uint underlLinks : 1; | ||
949 | uint nextDoubleBuffered : 1; | ||
950 | uint oTextValid : 1; | ||
951 | uint mightHaveCustomItems : 1; | ||
952 | int align; | ||
953 | int nSelections; | ||
954 | QTextFlow *flow_; | ||
955 | QTextDocument *par; | ||
956 | QTextParagraph *parentPar; | ||
957 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
958 | QTextTableCell *tc; | ||
959 | #endif | ||
960 | QBrush *backBrush; | ||
961 | QPixmap *buf_pixmap; | ||
962 | Focus focusIndicator; | ||
963 | int minw; | ||
964 | int wused; | ||
965 | int leftmargin; | ||
966 | int rightmargin; | ||
967 | QTextParagraph *minwParag, *curParag; | ||
968 | QStyleSheet* sheet_; | ||
969 | #ifndef QT_NO_MIME | ||
970 | QMimeSourceFactory* factory_; | ||
971 | #endif | ||
972 | QString contxt; | ||
973 | QMap<QString, QString> attribs; | ||
974 | int *tArray; | ||
975 | int tStopWidth; | ||
976 | int uDepth; | ||
977 | QString oText; | ||
978 | QPtrList<QTextDocument> childList; | ||
979 | QColor linkColor; | ||
980 | double scaleFontsFactor; | ||
981 | |||
982 | short list_tm,list_bm, list_lm, li_tm, li_bm, par_tm, par_bm; | ||
983 | #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= | ||
984 | QTextDocument( const QTextDocument & ); | ||
985 | QTextDocument &operator=( const QTextDocument & ); | ||
986 | #endif | ||
987 | }; | ||
988 | |||
989 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
990 | |||
991 | |||
992 | class Q_EXPORT QTextDeleteCommand : public QTextCommand | ||
993 | { | ||
994 | public: | ||
995 | QTextDeleteCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, | ||
996 | const QByteArray& oldStyle ); | ||
997 | QTextDeleteCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ); | ||
998 | virtual ~QTextDeleteCommand(); | ||
999 | |||
1000 | Commands type() const { return Delete; } | ||
1001 | QTextCursor *execute( QTextCursor *c ); | ||
1002 | QTextCursor *unexecute( QTextCursor *c ); | ||
1003 | |||
1004 | protected: | ||
1005 | int id, index; | ||
1006 | QTextParagraph *parag; | ||
1007 | QMemArray<QTextStringChar> text; | ||
1008 | QByteArray styleInformation; | ||
1009 | |||
1010 | }; | ||
1011 | |||
1012 | class Q_EXPORT QTextInsertCommand : public QTextDeleteCommand | ||
1013 | { | ||
1014 | public: | ||
1015 | QTextInsertCommand( QTextDocument *d, int i, int idx, const QMemArray<QTextStringChar> &str, | ||
1016 | const QByteArray& oldStyleInfo ) | ||
1017 | : QTextDeleteCommand( d, i, idx, str, oldStyleInfo ) {} | ||
1018 | QTextInsertCommand( QTextParagraph *p, int idx, const QMemArray<QTextStringChar> &str ) | ||
1019 | : QTextDeleteCommand( p, idx, str ) {} | ||
1020 | virtual ~QTextInsertCommand() {} | ||
1021 | |||
1022 | Commands type() const { return Insert; } | ||
1023 | QTextCursor *execute( QTextCursor *c ) { return QTextDeleteCommand::unexecute( c ); } | ||
1024 | QTextCursor *unexecute( QTextCursor *c ) { return QTextDeleteCommand::execute( c ); } | ||
1025 | |||
1026 | }; | ||
1027 | |||
1028 | class Q_EXPORT QTextFormatCommand : public QTextCommand | ||
1029 | { | ||
1030 | public: | ||
1031 | QTextFormatCommand( QTextDocument *d, int sid, int sidx, int eid, int eidx, const QMemArray<QTextStringChar> &old, QTextFormat *f, int fl ); | ||
1032 | virtual ~QTextFormatCommand(); | ||
1033 | |||
1034 | Commands type() const { return Format; } | ||
1035 | QTextCursor *execute( QTextCursor *c ); | ||
1036 | QTextCursor *unexecute( QTextCursor *c ); | ||
1037 | |||
1038 | protected: | ||
1039 | int startId, startIndex, endId, endIndex; | ||
1040 | QTextFormat *format; | ||
1041 | QMemArray<QTextStringChar> oldFormats; | ||
1042 | int flags; | ||
1043 | |||
1044 | }; | ||
1045 | |||
1046 | class Q_EXPORT QTextStyleCommand : public QTextCommand | ||
1047 | { | ||
1048 | public: | ||
1049 | QTextStyleCommand( QTextDocument *d, int fParag, int lParag, const QByteArray& beforeChange ); | ||
1050 | virtual ~QTextStyleCommand() {} | ||
1051 | |||
1052 | Commands type() const { return Style; } | ||
1053 | QTextCursor *execute( QTextCursor *c ); | ||
1054 | QTextCursor *unexecute( QTextCursor *c ); | ||
1055 | |||
1056 | static QByteArray readStyleInformation( QTextDocument* d, int fParag, int lParag ); | ||
1057 | static void writeStyleInformation( QTextDocument* d, int fParag, const QByteArray& style ); | ||
1058 | |||
1059 | private: | ||
1060 | int firstParag, lastParag; | ||
1061 | QByteArray before; | ||
1062 | QByteArray after; | ||
1063 | }; | ||
1064 | |||
1065 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1066 | |||
1067 | struct Q_EXPORT QTextParagraphSelection | ||
1068 | { | ||
1069 | int start, end; | ||
1070 | }; | ||
1071 | |||
1072 | struct Q_EXPORT QTextLineStart | ||
1073 | { | ||
1074 | QTextLineStart() : y( 0 ), baseLine( 0 ), h( 0 ) | ||
1075 | #ifndef QT_NO_COMPLEXTEXT | ||
1076 | , bidicontext( 0 ) | ||
1077 | #endif | ||
1078 | { } | ||
1079 | QTextLineStart( ushort y_, ushort bl, ushort h_ ) : y( y_ ), baseLine( bl ), h( h_ ), | ||
1080 | w( 0 ) | ||
1081 | #ifndef QT_NO_COMPLEXTEXT | ||
1082 | , bidicontext( 0 ) | ||
1083 | #endif | ||
1084 | { } | ||
1085 | #ifndef QT_NO_COMPLEXTEXT | ||
1086 | QTextLineStart( QBidiContext *c, QBidiStatus s ) : y(0), baseLine(0), h(0), | ||
1087 | status( s ), bidicontext( c ) { if ( bidicontext ) bidicontext->ref(); } | ||
1088 | #endif | ||
1089 | |||
1090 | virtual ~QTextLineStart() | ||
1091 | { | ||
1092 | #ifndef QT_NO_COMPLEXTEXT | ||
1093 | if ( bidicontext && bidicontext->deref() ) | ||
1094 | delete bidicontext; | ||
1095 | #endif | ||
1096 | } | ||
1097 | |||
1098 | #ifndef QT_NO_COMPLEXTEXT | ||
1099 | void setContext( QBidiContext *c ) { | ||
1100 | if ( c == bidicontext ) | ||
1101 | return; | ||
1102 | if ( bidicontext && bidicontext->deref() ) | ||
1103 | delete bidicontext; | ||
1104 | bidicontext = c; | ||
1105 | if ( bidicontext ) | ||
1106 | bidicontext->ref(); | ||
1107 | } | ||
1108 | QBidiContext *context() const { return bidicontext; } | ||
1109 | #endif | ||
1110 | |||
1111 | public: | ||
1112 | ushort y, baseLine, h; | ||
1113 | #ifndef QT_NO_COMPLEXTEXT | ||
1114 | QBidiStatus status; | ||
1115 | #endif | ||
1116 | int w; | ||
1117 | |||
1118 | private: | ||
1119 | #ifndef QT_NO_COMPLEXTEXT | ||
1120 | QBidiContext *bidicontext; | ||
1121 | #endif | ||
1122 | }; | ||
1123 | |||
1124 | #if defined(Q_TEMPLATEDLL) | ||
1125 | // MOC_SKIP_BEGIN | ||
1126 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextParagraphSelection>; | ||
1127 | Q_TEMPLATE_EXTERN template class Q_EXPORT QMap<int, QTextLineStart*>; | ||
1128 | // MOC_SKIP_END | ||
1129 | #endif | ||
1130 | |||
1131 | class Q_EXPORT QTextParagraphData | ||
1132 | { | ||
1133 | public: | ||
1134 | QTextParagraphData() {} | ||
1135 | virtual ~QTextParagraphData(); | ||
1136 | virtual void join( QTextParagraphData * ); | ||
1137 | }; | ||
1138 | |||
1139 | class Q_EXPORT QTextParagraphPseudoDocument | ||
1140 | { | ||
1141 | public: | ||
1142 | QTextParagraphPseudoDocument(); | ||
1143 | ~QTextParagraphPseudoDocument(); | ||
1144 | QRect docRect; | ||
1145 | QTextFormatter *pFormatter; | ||
1146 | QTextCommandHistory *commandHistory; | ||
1147 | int minw; | ||
1148 | int wused; | ||
1149 | }; | ||
1150 | |||
1151 | //nase | ||
1152 | class Q_EXPORT QTextParagraph | ||
1153 | { | ||
1154 | friend class QTextDocument; | ||
1155 | friend class QTextCursor; | ||
1156 | |||
1157 | public: | ||
1158 | QTextParagraph( QTextDocument *d, QTextParagraph *pr = 0, QTextParagraph *nx = 0, bool updateIds = TRUE ); | ||
1159 | virtual ~QTextParagraph(); | ||
1160 | |||
1161 | QTextString *string() const; | ||
1162 | QTextStringChar *at( int i ) const; // maybe remove later | ||
1163 | int leftGap() const; | ||
1164 | int length() const; // maybe remove later | ||
1165 | |||
1166 | void setListStyle( QStyleSheetItem::ListStyle ls ) { lstyle = ls; changed = TRUE; } | ||
1167 | QStyleSheetItem::ListStyle listStyle() const { return lstyle; } | ||
1168 | void setListItem( bool li ); | ||
1169 | bool isListItem() const { return litem; } | ||
1170 | void setListValue( int v ) { list_val = v; } | ||
1171 | int listValue() const { return list_val > 0 ? list_val : -1; } | ||
1172 | |||
1173 | void setListDepth( int depth ); | ||
1174 | int listDepth() const { return ldepth; } | ||
1175 | |||
1176 | // void setFormat( QTextFormat *fm ); | ||
1177 | // QTextFormat *paragFormat() const; | ||
1178 | |||
1179 | QTextDocument *document() const; | ||
1180 | QTextParagraphPseudoDocument *pseudoDocument() const; | ||
1181 | |||
1182 | QRect rect() const; | ||
1183 | void setHeight( int h ) { r.setHeight( h ); } | ||
1184 | void show(); | ||
1185 | void hide(); | ||
1186 | bool isVisible() const { return visible; } | ||
1187 | |||
1188 | QTextParagraph *prev() const; | ||
1189 | QTextParagraph *next() const; | ||
1190 | void setPrev( QTextParagraph *s ); | ||
1191 | void setNext( QTextParagraph *s ); | ||
1192 | |||
1193 | void insert( int index, const QString &s ); | ||
1194 | void insert( int index, const QChar *unicode, int len ); | ||
1195 | void append( const QString &s, bool reallyAtEnd = FALSE ); | ||
1196 | void truncate( int index ); | ||
1197 | void remove( int index, int len ); | ||
1198 | void join( QTextParagraph *s ); | ||
1199 | |||
1200 | void invalidate( int chr ); | ||
1201 | |||
1202 | void move( int &dy ); | ||
1203 | void format( int start = -1, bool doMove = TRUE ); | ||
1204 | |||
1205 | bool isValid() const; | ||
1206 | bool hasChanged() const; | ||
1207 | void setChanged( bool b, bool recursive = FALSE ); | ||
1208 | |||
1209 | int lineHeightOfChar( int i, int *bl = 0, int *y = 0 ) const; | ||
1210 | QTextStringChar *lineStartOfChar( int i, int *index = 0, int *line = 0 ) const; | ||
1211 | int lines() const; | ||
1212 | QTextStringChar *lineStartOfLine( int line, int *index = 0 ) const; | ||
1213 | int lineY( int l ) const; | ||
1214 | int lineBaseLine( int l ) const; | ||
1215 | int lineHeight( int l ) const; | ||
1216 | void lineInfo( int l, int &y, int &h, int &bl ) const; | ||
1217 | |||
1218 | void setSelection( int id, int start, int end ); | ||
1219 | void removeSelection( int id ); | ||
1220 | int selectionStart( int id ) const; | ||
1221 | int selectionEnd( int id ) const; | ||
1222 | bool hasSelection( int id ) const; | ||
1223 | bool hasAnySelection() const; | ||
1224 | bool fullSelected( int id ) const; | ||
1225 | |||
1226 | void setEndState( int s ); | ||
1227 | int endState() const; | ||
1228 | |||
1229 | void setParagId( int i ); | ||
1230 | int paragId() const; | ||
1231 | |||
1232 | bool firstPreProcess() const; | ||
1233 | void setFirstPreProcess( bool b ); | ||
1234 | |||
1235 | void indent( int *oldIndent = 0, int *newIndent = 0 ); | ||
1236 | |||
1237 | void setExtraData( QTextParagraphData *data ); | ||
1238 | QTextParagraphData *extraData() const; | ||
1239 | |||
1240 | QMap<int, QTextLineStart*> &lineStartList(); | ||
1241 | |||
1242 | void setFormat( int index, int len, QTextFormat *f, bool useCollection = TRUE, int flags = -1 ); | ||
1243 | |||
1244 | void setAlignment( int a ); | ||
1245 | int alignment() const; | ||
1246 | |||
1247 | virtual void paint( QPainter &painter, const QColorGroup &cg, QTextCursor *cursor = 0, bool drawSelections = FALSE, | ||
1248 | int clipx = -1, int clipy = -1, int clipw = -1, int cliph = -1 ); | ||
1249 | |||
1250 | virtual int topMargin() const; | ||
1251 | virtual int bottomMargin() const; | ||
1252 | virtual int leftMargin() const; | ||
1253 | virtual int firstLineMargin() const; | ||
1254 | virtual int rightMargin() const; | ||
1255 | virtual int lineSpacing() const; | ||
1256 | |||
1257 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
1258 | void registerFloatingItem( QTextCustomItem *i ); | ||
1259 | void unregisterFloatingItem( QTextCustomItem *i ); | ||
1260 | #endif | ||
1261 | |||
1262 | void setFullWidth( bool b ) { fullWidth = b; } | ||
1263 | bool isFullWidth() const { return fullWidth; } | ||
1264 | |||
1265 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
1266 | QTextTableCell *tableCell() const; | ||
1267 | #endif | ||
1268 | |||
1269 | QBrush *background() const; | ||
1270 | |||
1271 | int documentWidth() const; | ||
1272 | int documentVisibleWidth() const; | ||
1273 | int documentX() const; | ||
1274 | int documentY() const; | ||
1275 | QTextFormatCollection *formatCollection() const; | ||
1276 | QTextFormatter *formatter() const; | ||
1277 | |||
1278 | virtual int nextTab( int i, int x ); | ||
1279 | int *tabArray() const; | ||
1280 | void setTabArray( int *a ); | ||
1281 | void setTabStops( int tw ); | ||
1282 | |||
1283 | void adjustToPainter( QPainter *p ); | ||
1284 | |||
1285 | void setNewLinesAllowed( bool b ); | ||
1286 | bool isNewLinesAllowed() const; | ||
1287 | |||
1288 | QString richText() const; | ||
1289 | |||
1290 | void addCommand( QTextCommand *cmd ); | ||
1291 | QTextCursor *undo( QTextCursor *c = 0 ); | ||
1292 | QTextCursor *redo( QTextCursor *c = 0 ); | ||
1293 | QTextCommandHistory *commands() const; | ||
1294 | virtual void copyParagData( QTextParagraph *parag ); | ||
1295 | |||
1296 | void setBreakable( bool b ) { breakable = b; } | ||
1297 | bool isBreakable() const { return breakable; } | ||
1298 | |||
1299 | void setBackgroundColor( const QColor &c ); | ||
1300 | QColor *backgroundColor() const { return bgcol; } | ||
1301 | void clearBackgroundColor(); | ||
1302 | |||
1303 | void setMovedDown( bool b ) { movedDown = b; } | ||
1304 | bool wasMovedDown() const { return movedDown; } | ||
1305 | |||
1306 | void setDirection( QChar::Direction d ); | ||
1307 | QChar::Direction direction() const; | ||
1308 | void setPaintDevice( QPaintDevice *pd ) { paintdevice = pd; } | ||
1309 | |||
1310 | void readStyleInformation( QDataStream& stream ); | ||
1311 | void writeStyleInformation( QDataStream& stream ) const; | ||
1312 | |||
1313 | protected: | ||
1314 | virtual void setColorForSelection( QColor &c, QPainter &p, const QColorGroup& cg, int selection ); | ||
1315 | virtual void drawLabel( QPainter* p, int x, int y, int w, int h, int base, const QColorGroup& cg ); | ||
1316 | virtual void drawString( QPainter &painter, const QString &str, int start, int len, int xstart, | ||
1317 | int y, int baseLine, int w, int h, int selection, | ||
1318 | QTextStringChar *formatChar, const QColorGroup& cg, | ||
1319 | bool rightToLeft ); | ||
1320 | |||
1321 | private: | ||
1322 | QMap<int, QTextParagraphSelection> &selections() const; | ||
1323 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
1324 | QPtrList<QTextCustomItem> &floatingItems() const; | ||
1325 | #endif | ||
1326 | QBrush backgroundBrush( const QColorGroup&cg ) { if ( bgcol ) return *bgcol; return cg.brush( QColorGroup::Base ); } | ||
1327 | void invalidateStyleCache(); | ||
1328 | |||
1329 | QMap<int, QTextLineStart*> lineStarts; | ||
1330 | int invalid; | ||
1331 | QRect r; | ||
1332 | QTextParagraph *p, *n; | ||
1333 | void *docOrPseudo; | ||
1334 | uint changed : 1; | ||
1335 | uint firstFormat : 1; | ||
1336 | uint firstPProcess : 1; | ||
1337 | uint needPreProcess : 1; | ||
1338 | uint fullWidth : 1; | ||
1339 | uint lastInFrame : 1; | ||
1340 | uint visible : 1; | ||
1341 | uint breakable : 1; | ||
1342 | uint movedDown : 1; | ||
1343 | uint mightHaveCustomItems : 1; | ||
1344 | uint hasdoc : 1; | ||
1345 | uint litem : 1; // whether the paragraph is a list item | ||
1346 | uint rtext : 1; // whether the paragraph needs rich text margin | ||
1347 | int align : 4; | ||
1348 | int state, id; | ||
1349 | QTextString *str; | ||
1350 | QMap<int, QTextParagraphSelection> *mSelections; | ||
1351 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
1352 | QPtrList<QTextCustomItem> *mFloatingItems; | ||
1353 | #endif | ||
1354 | QStyleSheetItem::ListStyle lstyle; | ||
1355 | short utm, ubm, ulm, urm, uflm, ulinespacing; | ||
1356 | int *tArray; | ||
1357 | short tabStopWidth; | ||
1358 | QTextParagraphData *eData; | ||
1359 | short list_val; | ||
1360 | QColor *bgcol; | ||
1361 | ushort ldepth; | ||
1362 | QPaintDevice *paintdevice; | ||
1363 | }; | ||
1364 | |||
1365 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1366 | |||
1367 | class Q_EXPORT QTextFormatter | ||
1368 | { | ||
1369 | public: | ||
1370 | QTextFormatter(); | ||
1371 | virtual ~QTextFormatter(); | ||
1372 | |||
1373 | virtual int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts ) = 0; | ||
1374 | virtual int formatVertically( QTextDocument* doc, QTextParagraph* parag ); | ||
1375 | |||
1376 | bool isWrapEnabled( QTextParagraph *p ) const { if ( !wrapEnabled ) return FALSE; if ( p && !p->isBreakable() ) return FALSE; return TRUE;} | ||
1377 | int wrapAtColumn() const { return wrapColumn;} | ||
1378 | virtual void setWrapEnabled( bool b ); | ||
1379 | virtual void setWrapAtColumn( int c ); | ||
1380 | virtual void setAllowBreakInWords( bool b ) { biw = b; } | ||
1381 | bool allowBreakInWords() const { return biw; } | ||
1382 | |||
1383 | int minimumWidth() const { return thisminw; } | ||
1384 | int widthUsed() const { return thiswused; } | ||
1385 | |||
1386 | static bool isBreakable( QTextString *string, int pos ); | ||
1387 | |||
1388 | protected: | ||
1389 | virtual QTextLineStart *formatLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, | ||
1390 | QTextStringChar *last, int align = Qt::AlignAuto, int space = 0 ); | ||
1391 | #ifndef QT_NO_COMPLEXTEXT | ||
1392 | virtual QTextLineStart *bidiReorderLine( QTextParagraph *parag, QTextString *string, QTextLineStart *line, QTextStringChar *start, | ||
1393 | QTextStringChar *last, int align, int space ); | ||
1394 | #endif | ||
1395 | void insertLineStart( QTextParagraph *parag, int index, QTextLineStart *ls ); | ||
1396 | |||
1397 | int thisminw; | ||
1398 | int thiswused; | ||
1399 | |||
1400 | private: | ||
1401 | bool wrapEnabled; | ||
1402 | int wrapColumn; | ||
1403 | bool biw; | ||
1404 | |||
1405 | #ifdef HAVE_THAI_BREAKS | ||
1406 | static QCString *thaiCache; | ||
1407 | static QTextString *cachedString; | ||
1408 | static ThBreakIterator *thaiIt; | ||
1409 | #endif | ||
1410 | }; | ||
1411 | |||
1412 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1413 | |||
1414 | class Q_EXPORT QTextFormatterBreakInWords : public QTextFormatter | ||
1415 | { | ||
1416 | public: | ||
1417 | QTextFormatterBreakInWords(); | ||
1418 | virtual ~QTextFormatterBreakInWords() {} | ||
1419 | |||
1420 | int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts ); | ||
1421 | |||
1422 | }; | ||
1423 | |||
1424 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1425 | |||
1426 | class Q_EXPORT QTextFormatterBreakWords : public QTextFormatter | ||
1427 | { | ||
1428 | public: | ||
1429 | QTextFormatterBreakWords(); | ||
1430 | virtual ~QTextFormatterBreakWords() {} | ||
1431 | |||
1432 | int format( QTextDocument *doc, QTextParagraph *parag, int start, const QMap<int, QTextLineStart*> &oldLineStarts ); | ||
1433 | |||
1434 | }; | ||
1435 | |||
1436 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1437 | |||
1438 | class Q_EXPORT QTextIndent | ||
1439 | { | ||
1440 | public: | ||
1441 | QTextIndent(); | ||
1442 | virtual ~QTextIndent() {} | ||
1443 | |||
1444 | virtual void indent( QTextDocument *doc, QTextParagraph *parag, int *oldIndent = 0, int *newIndent = 0 ) = 0; | ||
1445 | |||
1446 | }; | ||
1447 | |||
1448 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1449 | |||
1450 | class Q_EXPORT QTextPreProcessor | ||
1451 | { | ||
1452 | public: | ||
1453 | enum Ids { | ||
1454 | Standard = 0 | ||
1455 | }; | ||
1456 | |||
1457 | QTextPreProcessor(); | ||
1458 | virtual ~QTextPreProcessor() {} | ||
1459 | |||
1460 | virtual void process( QTextDocument *doc, QTextParagraph *, int, bool = TRUE ) = 0; | ||
1461 | virtual QTextFormat *format( int id ) = 0; | ||
1462 | |||
1463 | }; | ||
1464 | |||
1465 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1466 | |||
1467 | class Q_EXPORT QTextFormat | ||
1468 | { | ||
1469 | friend class QTextFormatCollection; | ||
1470 | friend class QTextDocument; | ||
1471 | |||
1472 | public: | ||
1473 | enum Flags { | ||
1474 | NoFlags, | ||
1475 | Bold = 1, | ||
1476 | Italic = 2, | ||
1477 | Underline = 4, | ||
1478 | Family = 8, | ||
1479 | Size = 16, | ||
1480 | Color = 32, | ||
1481 | Misspelled = 64, | ||
1482 | VAlign = 128, | ||
1483 | StrikeOut= 256, | ||
1484 | Font = Bold | Italic | Underline | Family | Size | StrikeOut, | ||
1485 | Format = Font | Color | Misspelled | VAlign | ||
1486 | }; | ||
1487 | |||
1488 | enum VerticalAlignment { AlignNormal, AlignSuperScript, AlignSubScript }; | ||
1489 | |||
1490 | QTextFormat(); | ||
1491 | virtual ~QTextFormat(); | ||
1492 | |||
1493 | QTextFormat( const QStyleSheetItem *s ); | ||
1494 | QTextFormat( const QFont &f, const QColor &c, QTextFormatCollection *parent = 0 ); | ||
1495 | QTextFormat( const QTextFormat &fm ); | ||
1496 | QTextFormat makeTextFormat( const QStyleSheetItem *style, const QMap<QString,QString>& attr, double scaleFontsFactor ) const; | ||
1497 | QTextFormat& operator=( const QTextFormat &fm ); | ||
1498 | QColor color() const; | ||
1499 | QFont font() const; | ||
1500 | bool isMisspelled() const; | ||
1501 | VerticalAlignment vAlign() const; | ||
1502 | int minLeftBearing() const; | ||
1503 | int minRightBearing() const; | ||
1504 | int width( const QChar &c ) const; | ||
1505 | int width( const QString &str, int pos ) const; | ||
1506 | int height() const; | ||
1507 | int ascent() const; | ||
1508 | int descent() const; | ||
1509 | int leading() const; | ||
1510 | bool useLinkColor() const; | ||
1511 | |||
1512 | void setBold( bool b ); | ||
1513 | void setItalic( bool b ); | ||
1514 | void setUnderline( bool b ); | ||
1515 | void setStrikeOut( bool b ); | ||
1516 | void setFamily( const QString &f ); | ||
1517 | void setPointSize( int s ); | ||
1518 | void setFont( const QFont &f ); | ||
1519 | void setColor( const QColor &c ); | ||
1520 | void setMisspelled( bool b ); | ||
1521 | void setVAlign( VerticalAlignment a ); | ||
1522 | |||
1523 | bool operator==( const QTextFormat &f ) const; | ||
1524 | QTextFormatCollection *parent() const; | ||
1525 | const QString &key() const; | ||
1526 | |||
1527 | static QString getKey( const QFont &f, const QColor &c, bool misspelled, VerticalAlignment vAlign ); | ||
1528 | |||
1529 | void addRef(); | ||
1530 | void removeRef(); | ||
1531 | |||
1532 | QString makeFormatChangeTags( QTextFormat* defaultFormat, QTextFormat *f, const QString& oldAnchorHref, const QString& anchorHref ) const; | ||
1533 | QString makeFormatEndTags( QTextFormat* defaultFormat, const QString& anchorHref ) const; | ||
1534 | |||
1535 | static void setPainter( QPainter *p ); | ||
1536 | static QPainter* painter(); | ||
1537 | |||
1538 | bool fontSizesInPixels() { return usePixelSizes; } | ||
1539 | |||
1540 | protected: | ||
1541 | virtual void generateKey(); | ||
1542 | |||
1543 | private: | ||
1544 | void update(); | ||
1545 | static void applyFont( const QFont &f ); | ||
1546 | |||
1547 | private: | ||
1548 | QFont fn; | ||
1549 | QColor col; | ||
1550 | QFontMetrics fm; | ||
1551 | uint missp : 1; | ||
1552 | uint linkColor : 1; | ||
1553 | uint usePixelSizes : 1; | ||
1554 | int leftBearing, rightBearing; | ||
1555 | VerticalAlignment ha; | ||
1556 | uchar widths[ 256 ]; | ||
1557 | int hei, asc, dsc; | ||
1558 | QTextFormatCollection *collection; | ||
1559 | int ref; | ||
1560 | QString k; | ||
1561 | int logicalFontSize; | ||
1562 | int stdSize; | ||
1563 | static QPainter *pntr; | ||
1564 | static QFontMetrics *pntr_fm; | ||
1565 | static int pntr_asc; | ||
1566 | static int pntr_hei; | ||
1567 | static int pntr_ldg; | ||
1568 | static int pntr_dsc; | ||
1569 | |||
1570 | }; | ||
1571 | |||
1572 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1573 | |||
1574 | #if defined(Q_TEMPLATEDLL) | ||
1575 | // MOC_SKIP_BEGIN | ||
1576 | Q_TEMPLATE_EXTERN template class Q_EXPORT QDict<QTextFormat>; | ||
1577 | // MOC_SKIP_END | ||
1578 | #endif | ||
1579 | |||
1580 | class Q_EXPORT QTextFormatCollection | ||
1581 | { | ||
1582 | friend class QTextDocument; | ||
1583 | friend class QTextFormat; | ||
1584 | |||
1585 | public: | ||
1586 | QTextFormatCollection(); | ||
1587 | virtual ~QTextFormatCollection(); | ||
1588 | |||
1589 | void setDefaultFormat( QTextFormat *f ); | ||
1590 | QTextFormat *defaultFormat() const; | ||
1591 | virtual QTextFormat *format( QTextFormat *f ); | ||
1592 | virtual QTextFormat *format( QTextFormat *of, QTextFormat *nf, int flags ); | ||
1593 | virtual QTextFormat *format( const QFont &f, const QColor &c ); | ||
1594 | virtual void remove( QTextFormat *f ); | ||
1595 | virtual QTextFormat *createFormat( const QTextFormat &f ) { return new QTextFormat( f ); } | ||
1596 | virtual QTextFormat *createFormat( const QFont &f, const QColor &c ) { return new QTextFormat( f, c, this ); } | ||
1597 | |||
1598 | void updateDefaultFormat( const QFont &font, const QColor &c, QStyleSheet *sheet ); | ||
1599 | QDict<QTextFormat> dict() const { return cKey; } | ||
1600 | |||
1601 | QPaintDevice *paintDevice() const { return paintdevice; } | ||
1602 | void setPaintDevice( QPaintDevice * ); | ||
1603 | |||
1604 | private: | ||
1605 | void updateKeys(); | ||
1606 | |||
1607 | private: | ||
1608 | QTextFormat *defFormat, *lastFormat, *cachedFormat; | ||
1609 | QDict<QTextFormat> cKey; | ||
1610 | QTextFormat *cres; | ||
1611 | QFont cfont; | ||
1612 | QColor ccol; | ||
1613 | QString kof, knf; | ||
1614 | int cflags; | ||
1615 | |||
1616 | QPaintDevice *paintdevice; | ||
1617 | }; | ||
1618 | |||
1619 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1620 | |||
1621 | inline int QTextString::length() const | ||
1622 | { | ||
1623 | return data.size(); | ||
1624 | } | ||
1625 | |||
1626 | inline int QTextParagraph::length() const | ||
1627 | { | ||
1628 | return str->length(); | ||
1629 | } | ||
1630 | |||
1631 | inline QRect QTextParagraph::rect() const | ||
1632 | { | ||
1633 | return r; | ||
1634 | } | ||
1635 | |||
1636 | inline QTextParagraph *QTextCursor::paragraph() const | ||
1637 | { | ||
1638 | return para; | ||
1639 | } | ||
1640 | |||
1641 | inline int QTextCursor::index() const | ||
1642 | { | ||
1643 | return idx; | ||
1644 | } | ||
1645 | |||
1646 | |||
1647 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1648 | |||
1649 | inline int QTextDocument::x() const | ||
1650 | { | ||
1651 | return cx; | ||
1652 | } | ||
1653 | |||
1654 | inline int QTextDocument::y() const | ||
1655 | { | ||
1656 | return cy; | ||
1657 | } | ||
1658 | |||
1659 | inline int QTextDocument::width() const | ||
1660 | { | ||
1661 | return QMAX( cw, flow_->width() ); | ||
1662 | } | ||
1663 | |||
1664 | inline int QTextDocument::visibleWidth() const | ||
1665 | { | ||
1666 | return vw; | ||
1667 | } | ||
1668 | |||
1669 | inline QTextParagraph *QTextDocument::firstParagraph() const | ||
1670 | { | ||
1671 | return fParag; | ||
1672 | } | ||
1673 | |||
1674 | inline QTextParagraph *QTextDocument::lastParagraph() const | ||
1675 | { | ||
1676 | return lParag; | ||
1677 | } | ||
1678 | |||
1679 | inline void QTextDocument::setFirstParagraph( QTextParagraph *p ) | ||
1680 | { | ||
1681 | fParag = p; | ||
1682 | } | ||
1683 | |||
1684 | inline void QTextDocument::setLastParagraph( QTextParagraph *p ) | ||
1685 | { | ||
1686 | lParag = p; | ||
1687 | } | ||
1688 | |||
1689 | inline void QTextDocument::setWidth( int w ) | ||
1690 | { | ||
1691 | cw = QMAX( w, minw ); | ||
1692 | flow_->setWidth( cw ); | ||
1693 | vw = w; | ||
1694 | } | ||
1695 | |||
1696 | inline int QTextDocument::minimumWidth() const | ||
1697 | { | ||
1698 | return minw; | ||
1699 | } | ||
1700 | |||
1701 | inline void QTextDocument::setY( int y ) | ||
1702 | { | ||
1703 | cy = y; | ||
1704 | } | ||
1705 | |||
1706 | inline int QTextDocument::leftMargin() const | ||
1707 | { | ||
1708 | return leftmargin; | ||
1709 | } | ||
1710 | |||
1711 | inline void QTextDocument::setLeftMargin( int lm ) | ||
1712 | { | ||
1713 | leftmargin = lm; | ||
1714 | } | ||
1715 | |||
1716 | inline int QTextDocument::rightMargin() const | ||
1717 | { | ||
1718 | return rightmargin; | ||
1719 | } | ||
1720 | |||
1721 | inline void QTextDocument::setRightMargin( int rm ) | ||
1722 | { | ||
1723 | rightmargin = rm; | ||
1724 | } | ||
1725 | |||
1726 | inline QTextPreProcessor *QTextDocument::preProcessor() const | ||
1727 | { | ||
1728 | return pProcessor; | ||
1729 | } | ||
1730 | |||
1731 | inline void QTextDocument::setPreProcessor( QTextPreProcessor * sh ) | ||
1732 | { | ||
1733 | pProcessor = sh; | ||
1734 | } | ||
1735 | |||
1736 | inline void QTextDocument::setFormatter( QTextFormatter *f ) | ||
1737 | { | ||
1738 | delete pFormatter; | ||
1739 | pFormatter = f; | ||
1740 | } | ||
1741 | |||
1742 | inline QTextFormatter *QTextDocument::formatter() const | ||
1743 | { | ||
1744 | return pFormatter; | ||
1745 | } | ||
1746 | |||
1747 | inline void QTextDocument::setIndent( QTextIndent *i ) | ||
1748 | { | ||
1749 | indenter = i; | ||
1750 | } | ||
1751 | |||
1752 | inline QTextIndent *QTextDocument::indent() const | ||
1753 | { | ||
1754 | return indenter; | ||
1755 | } | ||
1756 | |||
1757 | inline QColor QTextDocument::selectionColor( int id ) const | ||
1758 | { | ||
1759 | return selectionColors[ id ]; | ||
1760 | } | ||
1761 | |||
1762 | inline bool QTextDocument::invertSelectionText( int id ) const | ||
1763 | { | ||
1764 | return selectionText[ id ]; | ||
1765 | } | ||
1766 | |||
1767 | inline void QTextDocument::setSelectionColor( int id, const QColor &c ) | ||
1768 | { | ||
1769 | selectionColors[ id ] = c; | ||
1770 | } | ||
1771 | |||
1772 | inline void QTextDocument::setInvertSelectionText( int id, bool b ) | ||
1773 | { | ||
1774 | selectionText[ id ] = b; | ||
1775 | } | ||
1776 | |||
1777 | inline QTextFormatCollection *QTextDocument::formatCollection() const | ||
1778 | { | ||
1779 | return fCollection; | ||
1780 | } | ||
1781 | |||
1782 | inline int QTextDocument::alignment() const | ||
1783 | { | ||
1784 | return align; | ||
1785 | } | ||
1786 | |||
1787 | inline void QTextDocument::setAlignment( int a ) | ||
1788 | { | ||
1789 | align = a; | ||
1790 | } | ||
1791 | |||
1792 | inline int *QTextDocument::tabArray() const | ||
1793 | { | ||
1794 | return tArray; | ||
1795 | } | ||
1796 | |||
1797 | inline int QTextDocument::tabStopWidth() const | ||
1798 | { | ||
1799 | return tStopWidth; | ||
1800 | } | ||
1801 | |||
1802 | inline void QTextDocument::setTabArray( int *a ) | ||
1803 | { | ||
1804 | tArray = a; | ||
1805 | } | ||
1806 | |||
1807 | inline void QTextDocument::setTabStops( int tw ) | ||
1808 | { | ||
1809 | tStopWidth = tw; | ||
1810 | } | ||
1811 | |||
1812 | inline QString QTextDocument::originalText() const | ||
1813 | { | ||
1814 | if ( oTextValid ) | ||
1815 | return oText; | ||
1816 | return text(); | ||
1817 | } | ||
1818 | |||
1819 | inline void QTextDocument::setFlow( QTextFlow *f ) | ||
1820 | { | ||
1821 | if ( flow_ ) | ||
1822 | delete flow_; | ||
1823 | flow_ = f; | ||
1824 | } | ||
1825 | |||
1826 | inline void QTextDocument::takeFlow() | ||
1827 | { | ||
1828 | flow_ = 0; | ||
1829 | } | ||
1830 | |||
1831 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1832 | |||
1833 | inline QColor QTextFormat::color() const | ||
1834 | { | ||
1835 | return col; | ||
1836 | } | ||
1837 | |||
1838 | inline QFont QTextFormat::font() const | ||
1839 | { | ||
1840 | return fn; | ||
1841 | } | ||
1842 | |||
1843 | inline bool QTextFormat::isMisspelled() const | ||
1844 | { | ||
1845 | return missp; | ||
1846 | } | ||
1847 | |||
1848 | inline QTextFormat::VerticalAlignment QTextFormat::vAlign() const | ||
1849 | { | ||
1850 | return ha; | ||
1851 | } | ||
1852 | |||
1853 | inline bool QTextFormat::operator==( const QTextFormat &f ) const | ||
1854 | { | ||
1855 | return k == f.k; | ||
1856 | } | ||
1857 | |||
1858 | inline QTextFormatCollection *QTextFormat::parent() const | ||
1859 | { | ||
1860 | return collection; | ||
1861 | } | ||
1862 | |||
1863 | inline void QTextFormat::addRef() | ||
1864 | { | ||
1865 | ref++; | ||
1866 | } | ||
1867 | |||
1868 | inline void QTextFormat::removeRef() | ||
1869 | { | ||
1870 | ref--; | ||
1871 | if ( !collection ) | ||
1872 | return; | ||
1873 | if ( this == collection->defFormat ) | ||
1874 | return; | ||
1875 | if ( ref == 0 ) | ||
1876 | collection->remove( this ); | ||
1877 | } | ||
1878 | |||
1879 | inline const QString &QTextFormat::key() const | ||
1880 | { | ||
1881 | return k; | ||
1882 | } | ||
1883 | |||
1884 | inline bool QTextFormat::useLinkColor() const | ||
1885 | { | ||
1886 | return linkColor; | ||
1887 | } | ||
1888 | |||
1889 | |||
1890 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1891 | |||
1892 | inline QTextStringChar &QTextString::at( int i ) const | ||
1893 | { | ||
1894 | return data[ i ]; | ||
1895 | } | ||
1896 | |||
1897 | // +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
1898 | |||
1899 | inline QTextStringChar *QTextParagraph::at( int i ) const | ||
1900 | { | ||
1901 | return &str->at( i ); | ||
1902 | } | ||
1903 | |||
1904 | inline bool QTextParagraph::isValid() const | ||
1905 | { | ||
1906 | return invalid == -1; | ||
1907 | } | ||
1908 | |||
1909 | inline bool QTextParagraph::hasChanged() const | ||
1910 | { | ||
1911 | return changed; | ||
1912 | } | ||
1913 | |||
1914 | inline void QTextParagraph::setBackgroundColor( const QColor & c ) | ||
1915 | { | ||
1916 | delete bgcol; | ||
1917 | bgcol = new QColor( c ); | ||
1918 | setChanged( TRUE ); | ||
1919 | } | ||
1920 | |||
1921 | inline void QTextParagraph::clearBackgroundColor() | ||
1922 | { | ||
1923 | delete bgcol; bgcol = 0; setChanged( TRUE ); | ||
1924 | } | ||
1925 | |||
1926 | inline void QTextParagraph::append( const QString &s, bool reallyAtEnd ) | ||
1927 | { | ||
1928 | if ( reallyAtEnd ) | ||
1929 | insert( str->length(), s ); | ||
1930 | else | ||
1931 | insert( QMAX( str->length() - 1, 0 ), s ); | ||
1932 | } | ||
1933 | |||
1934 | inline QTextParagraph *QTextParagraph::prev() const | ||
1935 | { | ||
1936 | return p; | ||
1937 | } | ||
1938 | |||
1939 | inline QTextParagraph *QTextParagraph::next() const | ||
1940 | { | ||
1941 | return n; | ||
1942 | } | ||
1943 | |||
1944 | inline bool QTextParagraph::hasAnySelection() const | ||
1945 | { | ||
1946 | return mSelections ? !selections().isEmpty() : FALSE; | ||
1947 | } | ||
1948 | |||
1949 | inline void QTextParagraph::setEndState( int s ) | ||
1950 | { | ||
1951 | if ( s == state ) | ||
1952 | return; | ||
1953 | state = s; | ||
1954 | } | ||
1955 | |||
1956 | inline int QTextParagraph::endState() const | ||
1957 | { | ||
1958 | return state; | ||
1959 | } | ||
1960 | |||
1961 | inline void QTextParagraph::setParagId( int i ) | ||
1962 | { | ||
1963 | id = i; | ||
1964 | } | ||
1965 | |||
1966 | inline int QTextParagraph::paragId() const | ||
1967 | { | ||
1968 | if ( id == -1 ) | ||
1969 | qWarning( "invalid parag id!!!!!!!! (%p)", (void*)this ); | ||
1970 | return id; | ||
1971 | } | ||
1972 | |||
1973 | inline bool QTextParagraph::firstPreProcess() const | ||
1974 | { | ||
1975 | return firstPProcess; | ||
1976 | } | ||
1977 | |||
1978 | inline void QTextParagraph::setFirstPreProcess( bool b ) | ||
1979 | { | ||
1980 | firstPProcess = b; | ||
1981 | } | ||
1982 | |||
1983 | inline QMap<int, QTextLineStart*> &QTextParagraph::lineStartList() | ||
1984 | { | ||
1985 | return lineStarts; | ||
1986 | } | ||
1987 | |||
1988 | inline QTextString *QTextParagraph::string() const | ||
1989 | { | ||
1990 | return str; | ||
1991 | } | ||
1992 | |||
1993 | inline QTextDocument *QTextParagraph::document() const | ||
1994 | { | ||
1995 | if ( hasdoc ) | ||
1996 | return (QTextDocument*) docOrPseudo; | ||
1997 | return 0; | ||
1998 | } | ||
1999 | |||
2000 | inline QTextParagraphPseudoDocument *QTextParagraph::pseudoDocument() const | ||
2001 | { | ||
2002 | if ( hasdoc ) | ||
2003 | return 0; | ||
2004 | return (QTextParagraphPseudoDocument*) docOrPseudo; | ||
2005 | } | ||
2006 | |||
2007 | |||
2008 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2009 | inline QTextTableCell *QTextParagraph::tableCell() const | ||
2010 | { | ||
2011 | return hasdoc ? document()->tableCell () : 0; | ||
2012 | } | ||
2013 | #endif | ||
2014 | |||
2015 | inline QTextCommandHistory *QTextParagraph::commands() const | ||
2016 | { | ||
2017 | return hasdoc ? document()->commands() : pseudoDocument()->commandHistory; | ||
2018 | } | ||
2019 | |||
2020 | |||
2021 | inline int QTextParagraph::alignment() const | ||
2022 | { | ||
2023 | return align; | ||
2024 | } | ||
2025 | |||
2026 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2027 | inline void QTextParagraph::registerFloatingItem( QTextCustomItem *i ) | ||
2028 | { | ||
2029 | floatingItems().append( i ); | ||
2030 | } | ||
2031 | |||
2032 | inline void QTextParagraph::unregisterFloatingItem( QTextCustomItem *i ) | ||
2033 | { | ||
2034 | floatingItems().removeRef( i ); | ||
2035 | } | ||
2036 | #endif | ||
2037 | |||
2038 | inline QBrush *QTextParagraph::background() const | ||
2039 | { | ||
2040 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2041 | return tableCell() ? tableCell()->backGround() : 0; | ||
2042 | #else | ||
2043 | return 0; | ||
2044 | #endif | ||
2045 | } | ||
2046 | |||
2047 | inline int QTextParagraph::documentWidth() const | ||
2048 | { | ||
2049 | return hasdoc ? document()->width() : pseudoDocument()->docRect.width(); | ||
2050 | } | ||
2051 | |||
2052 | inline int QTextParagraph::documentVisibleWidth() const | ||
2053 | { | ||
2054 | return hasdoc ? document()->visibleWidth() : pseudoDocument()->docRect.width(); | ||
2055 | } | ||
2056 | |||
2057 | inline int QTextParagraph::documentX() const | ||
2058 | { | ||
2059 | return hasdoc ? document()->x() : pseudoDocument()->docRect.x(); | ||
2060 | } | ||
2061 | |||
2062 | inline int QTextParagraph::documentY() const | ||
2063 | { | ||
2064 | return hasdoc ? document()->y() : pseudoDocument()->docRect.y(); | ||
2065 | } | ||
2066 | |||
2067 | inline void QTextParagraph::setExtraData( QTextParagraphData *data ) | ||
2068 | { | ||
2069 | eData = data; | ||
2070 | } | ||
2071 | |||
2072 | inline QTextParagraphData *QTextParagraph::extraData() const | ||
2073 | { | ||
2074 | return eData; | ||
2075 | } | ||
2076 | |||
2077 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
2078 | |||
2079 | inline void QTextFormatCollection::setDefaultFormat( QTextFormat *f ) | ||
2080 | { | ||
2081 | defFormat = f; | ||
2082 | } | ||
2083 | |||
2084 | inline QTextFormat *QTextFormatCollection::defaultFormat() const | ||
2085 | { | ||
2086 | return defFormat; | ||
2087 | } | ||
2088 | |||
2089 | // ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
2090 | |||
2091 | inline QTextFormat *QTextStringChar::format() const | ||
2092 | { | ||
2093 | return (type == Regular) ? d.format : d.custom->format; | ||
2094 | } | ||
2095 | |||
2096 | |||
2097 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2098 | inline QTextCustomItem *QTextStringChar::customItem() const | ||
2099 | { | ||
2100 | return isCustom() ? d.custom->custom : 0; | ||
2101 | } | ||
2102 | #endif | ||
2103 | |||
2104 | inline int QTextStringChar::height() const | ||
2105 | { | ||
2106 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2107 | return !isCustom() ? format()->height() : ( customItem()->placement() == QTextCustomItem::PlaceInline ? customItem()->height : 0 ); | ||
2108 | #else | ||
2109 | return format()->height(); | ||
2110 | #endif | ||
2111 | } | ||
2112 | |||
2113 | inline int QTextStringChar::ascent() const | ||
2114 | { | ||
2115 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2116 | return !isCustom() ? format()->ascent() : ( customItem()->placement() == QTextCustomItem::PlaceInline ? customItem()->ascent() : 0 ); | ||
2117 | #else | ||
2118 | return format()->ascent(); | ||
2119 | #endif | ||
2120 | } | ||
2121 | |||
2122 | inline int QTextStringChar::descent() const | ||
2123 | { | ||
2124 | #ifndef QT_NO_TEXTCUSTOMITEM | ||
2125 | return !isCustom() ? format()->descent() : 0; | ||
2126 | #else | ||
2127 | return format()->descent(); | ||
2128 | #endif | ||
2129 | } | ||
2130 | |||
2131 | #endif //QT_NO_RICHTEXT | ||
2132 | |||
2133 | #endif | ||
diff --git a/qmake/include/private/qsettings_p.h b/qmake/include/private/qsettings_p.h new file mode 100644 index 0000000..18d118b --- a/dev/null +++ b/qmake/include/private/qsettings_p.h | |||
@@ -0,0 +1,133 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QSettings related classes | ||
5 | ** | ||
6 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
11 | ** licenses for Windows may use this file in accordance with the Qt Commercial | ||
12 | ** License Agreement provided with the Software. | ||
13 | ** | ||
14 | ** This file is not available for use under any other license without | ||
15 | ** express written permission from the copyright holder. | ||
16 | ** | ||
17 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
18 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
19 | ** | ||
20 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
21 | ** information about Qt Commercial License Agreements. | ||
22 | ** | ||
23 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
24 | ** not clear to you. | ||
25 | ** | ||
26 | **********************************************************************/ | ||
27 | |||
28 | #ifndef QSETTINGS_P_H | ||
29 | #define QSETTINGS_P_H | ||
30 | |||
31 | // | ||
32 | // W A R N I N G | ||
33 | // ------------- | ||
34 | // | ||
35 | // This file is not part of the Qt API. It exists for the convenience | ||
36 | // of QSettings. This header file may change from version to | ||
37 | // version without notice, or even be removed. | ||
38 | // | ||
39 | // We mean it. | ||
40 | // | ||
41 | // | ||
42 | |||
43 | #ifndef QT_H | ||
44 | #include "qstringlist.h" | ||
45 | #include "qmap.h" | ||
46 | #include "qvaluestack.h" | ||
47 | #endif // QT_H | ||
48 | |||
49 | class QSettingsSysPrivate; | ||
50 | |||
51 | // QSettingsGroup is a map of key/value pairs | ||
52 | class QSettingsGroup : public QMap<QString,QString> | ||
53 | { | ||
54 | public: | ||
55 | QSettingsGroup(); | ||
56 | |||
57 | bool modified; | ||
58 | }; | ||
59 | |||
60 | // QSettingsHeading is a map of heading/group pairs | ||
61 | class QSettingsHeading : public QMap<QString,QSettingsGroup> | ||
62 | { | ||
63 | public: | ||
64 | QSettingsHeading::Iterator git; | ||
65 | void read(const QString &); | ||
66 | void parseLine(QTextStream &); | ||
67 | }; | ||
68 | |||
69 | |||
70 | class QSettingsPrivate | ||
71 | { | ||
72 | public: | ||
73 | QSettingsPrivate( QSettings::Format format ); | ||
74 | ~QSettingsPrivate(); | ||
75 | |||
76 | QSettingsGroup readGroup(); | ||
77 | void removeGroup(const QString &); | ||
78 | void writeGroup(const QString &, const QString &); | ||
79 | QDateTime modificationTime(); | ||
80 | |||
81 | QStringList searchPaths; | ||
82 | QMap<QString,QSettingsHeading> headings; | ||
83 | QString group; | ||
84 | QString heading; | ||
85 | |||
86 | /*### static data brings threading trouble | ||
87 | static QString *defProduct; | ||
88 | static QString *defDomain; | ||
89 | */ | ||
90 | QValueStack<QString> groupStack; | ||
91 | QString groupPrefix; | ||
92 | |||
93 | bool groupDirty :1; | ||
94 | bool modified :1; | ||
95 | bool globalScope :1; | ||
96 | |||
97 | #if defined(Q_WS_WIN) || defined(Q_OS_MAC) | ||
98 | // system dependent implementations to use the | ||
99 | // system specific setting database (ie. registry on Windows) | ||
100 | |||
101 | QSettingsSysPrivate *sysd; | ||
102 | voidsysInit(); | ||
103 | voidsysClear(); | ||
104 | |||
105 | #if !defined(Q_NO_BOOL_TYPE) | ||
106 | boolsysWriteEntry( const QString &, bool ); | ||
107 | #endif | ||
108 | boolsysWriteEntry( const QString &, double ); | ||
109 | boolsysWriteEntry( const QString &, int ); | ||
110 | boolsysWriteEntry( const QString &, const QString & ); | ||
111 | boolsysWriteEntry( const QString &, const QStringList & ); | ||
112 | boolsysWriteEntry( const QString &, const QStringList &, const QChar& sep ); | ||
113 | |||
114 | QStringList sysEntryList(const QString &) const; | ||
115 | QStringList sysSubkeyList(const QString &) const; | ||
116 | |||
117 | QStringList sysReadListEntry( const QString &, bool * = 0 ) const; | ||
118 | QStringList sysReadListEntry( const QString &, const QChar& sep, bool * = 0 ) const; | ||
119 | QStringsysReadEntry( const QString &, const QString &def = QString::null, bool * = 0 ) const; | ||
120 | int sysReadNumEntry( const QString &, int def = 0, bool * = 0 ) const; | ||
121 | doublesysReadDoubleEntry( const QString &, double def = 0, bool * = 0 ) const; | ||
122 | boolsysReadBoolEntry( const QString &, bool def = 0, bool * = 0 ) const; | ||
123 | |||
124 | boolsysRemoveEntry( const QString & ); | ||
125 | |||
126 | boolsysSync(); | ||
127 | |||
128 | voidsysInsertSearchPath( QSettings::System, const QString & ); | ||
129 | voidsysRemoveSearchPath( QSettings::System, const QString & ); | ||
130 | #endif | ||
131 | }; | ||
132 | |||
133 | #endif // QSETTINGS_P_H | ||
diff --git a/qmake/include/private/qsharedmemory_p.h b/qmake/include/private/qsharedmemory_p.h new file mode 100644 index 0000000..4a8339d --- a/dev/null +++ b/qmake/include/private/qsharedmemory_p.h | |||
@@ -0,0 +1,84 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Includes system files for shared memory | ||
5 | ** | ||
6 | ** Created : 020124 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed and/or modified under the terms of the | ||
13 | ** GNU General Public License version 2 as published by the Free Software | ||
14 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
15 | ** packaging of this file. | ||
16 | ** | ||
17 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
18 | ** licenses for Qt/Embedded may use this file in accordance with the | ||
19 | ** Qt Embedded Commercial License Agreement provided with the Software. | ||
20 | ** | ||
21 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
22 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
23 | ** | ||
24 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
25 | ** information about Qt Commercial License Agreements. | ||
26 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
27 | ** | ||
28 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
29 | ** not clear to you. | ||
30 | ** | ||
31 | **********************************************************************/ | ||
32 | |||
33 | // | ||
34 | // W A R N I N G | ||
35 | // ------------- | ||
36 | // | ||
37 | // This file is not part of the Qt API. It exists for the convenience | ||
38 | // of qapplication_qws.cpp and qgfxvnc_qws.cpp. This header file may | ||
39 | // change from version to version without notice, or even be removed. | ||
40 | // | ||
41 | // | ||
42 | |||
43 | #if !defined(QT_QSHM_H) | ||
44 | #define QT_QSHM_H | ||
45 | |||
46 | #include <qstring.h> | ||
47 | |||
48 | #if !defined (QT_QWS_NO_SHM) | ||
49 | |||
50 | #include <sys/types.h> | ||
51 | #include <sys/ipc.h> | ||
52 | |||
53 | class QSharedMemory { | ||
54 | public: | ||
55 | QSharedMemory(){}; | ||
56 | QSharedMemory(int, QString, char c = 'Q'); | ||
57 | ~QSharedMemory(){}; | ||
58 | |||
59 | bool create(); | ||
60 | void destroy(); | ||
61 | |||
62 | bool attach(); | ||
63 | void detach(); | ||
64 | |||
65 | void setPermissions(mode_t mode); | ||
66 | int size(); | ||
67 | void * base() { return shmBase; }; | ||
68 | |||
69 | private: | ||
70 | void *shmBase; | ||
71 | int shmSize; | ||
72 | QString shmFile; | ||
73 | char character; | ||
74 | #if defined(QT_POSIX_QSHM) | ||
75 | int shmFD; | ||
76 | #else | ||
77 | int shmId; | ||
78 | key_t key; | ||
79 | int idInitted; | ||
80 | #endif | ||
81 | }; | ||
82 | |||
83 | #endif | ||
84 | #endif | ||
diff --git a/qmake/include/private/qsqldriverinterface_p.h b/qmake/include/private/qsqldriverinterface_p.h new file mode 100644 index 0000000..8957b86 --- a/dev/null +++ b/qmake/include/private/qsqldriverinterface_p.h | |||
@@ -0,0 +1,69 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Definition of QSqlDriverInterface class | ||
4 | ** | ||
5 | ** Created : 2000-11-03 | ||
6 | ** | ||
7 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
8 | ** | ||
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | ||
10 | ** | ||
11 | ** This file may be distributed under the terms of the Q Public License | ||
12 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
13 | ** LICENSE.QPL included in the packaging of this file. | ||
14 | ** | ||
15 | ** This file may be distributed and/or modified under the terms of the | ||
16 | ** GNU General Public License version 2 as published by the Free Software | ||
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
18 | ** packaging of this file. | ||
19 | ** | ||
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
21 | ** file in accordance with the Qt Commercial License Agreement provided | ||
22 | ** with the Software. | ||
23 | ** | ||
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
26 | ** | ||
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
28 | ** information about Qt Commercial License Agreements. | ||
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
31 | ** | ||
32 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
33 | ** not clear to you. | ||
34 | ** | ||
35 | **********************************************************************/ | ||
36 | |||
37 | #ifndef QSQLDRIVERINTERFACE_H | ||
38 | #define QSQLDRIVERINTERFACE_H | ||
39 | |||
40 | #ifndef QT_H | ||
41 | #include <private/qcom_p.h> | ||
42 | #endif // QT_H | ||
43 | |||
44 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | ||
45 | #define QM_EXPORT_SQL | ||
46 | #else | ||
47 | #define QM_EXPORT_SQL Q_EXPORT | ||
48 | #endif | ||
49 | |||
50 | #ifndef QT_NO_SQL | ||
51 | |||
52 | #ifndef QT_NO_COMPONENT | ||
53 | |||
54 | // {EDDD5AD5-DF3C-400c-A711-163B72FE5F61} | ||
55 | #ifndef IID_QSqlDriverFactory | ||
56 | #define IID_QSqlDriverFactory QUuid(0xeddd5ad5, 0xdf3c, 0x400c, 0xa7, 0x11, 0x16, 0x3b, 0x72, 0xfe, 0x5f, 0x61) | ||
57 | #endif | ||
58 | |||
59 | class QSqlDriver; | ||
60 | |||
61 | struct QM_EXPORT_SQL QSqlDriverFactoryInterface : public QFeatureListInterface | ||
62 | { | ||
63 | virtual QSqlDriver* create( const QString& name ) = 0; | ||
64 | }; | ||
65 | |||
66 | #endif //QT_NO_COMPONENT | ||
67 | #endif // QT_NO_SQL | ||
68 | |||
69 | #endif // QSQLDRIVERINTERFACE_H | ||
diff --git a/qmake/include/private/qsqlextension_p.h b/qmake/include/private/qsqlextension_p.h new file mode 100644 index 0000000..597b266 --- a/dev/null +++ b/qmake/include/private/qsqlextension_p.h | |||
@@ -0,0 +1,101 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Definition of the QSqlExtension class | ||
4 | ** | ||
5 | ** Created : 2002-06-03 | ||
6 | ** | ||
7 | ** Copyright (C) 2002 Trolltech AS. All rights reserved. | ||
8 | ** | ||
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | ||
10 | ** | ||
11 | ** This file may be distributed under the terms of the Q Public License | ||
12 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
13 | ** LICENSE.QPL included in the packaging of this file. | ||
14 | ** | ||
15 | ** This file may be distributed and/or modified under the terms of the | ||
16 | ** GNU General Public License version 2 as published by the Free Software | ||
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
18 | ** packaging of this file. | ||
19 | ** | ||
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
21 | ** file in accordance with the Qt Commercial License Agreement provided | ||
22 | ** with the Software. | ||
23 | ** | ||
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
26 | ** | ||
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
28 | ** information about Qt Commercial License Agreements. | ||
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
31 | ** | ||
32 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
33 | ** not clear to you. | ||
34 | ** | ||
35 | **********************************************************************/ | ||
36 | |||
37 | #ifndef QSQLEXTENSION_P_H | ||
38 | #define QSQLEXTENSION_P_H | ||
39 | |||
40 | // | ||
41 | // W A R N I N G | ||
42 | // ------------- | ||
43 | // | ||
44 | // This file is not part of the Qt API. It exists for the convenience | ||
45 | // of other Qt classes. This header file may change from version to | ||
46 | // version without notice, or even be removed. | ||
47 | // | ||
48 | // We mean it. | ||
49 | // | ||
50 | // | ||
51 | |||
52 | #ifndef QT_H | ||
53 | #include "qmap.h" | ||
54 | #include "qstring.h" | ||
55 | #include "qvariant.h" | ||
56 | #endif // QT_H | ||
57 | |||
58 | #ifndef QT_NO_SQL | ||
59 | |||
60 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | ||
61 | #define QM_EXPORT_SQL | ||
62 | #else | ||
63 | #define QM_EXPORT_SQL Q_EXPORT | ||
64 | #endif | ||
65 | |||
66 | #if defined(Q_TEMPLATEDLL) | ||
67 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<QString,QVariant>; | ||
68 | Q_TEMPLATE_EXTERN template class QM_EXPORT_SQL QMap<int,QString>; | ||
69 | #endif | ||
70 | |||
71 | class QM_EXPORT_SQL QSqlExtension { | ||
72 | public: | ||
73 | QSqlExtension(); | ||
74 | virtual ~QSqlExtension(); | ||
75 | virtual bool prepare( const QString& query ); | ||
76 | virtual bool exec(); | ||
77 | virtual void bindValue( const QString& holder, const QVariant& value ); | ||
78 | virtual void bindValue( int pos, const QVariant& value ); | ||
79 | virtual void addBindValue( const QVariant& value ); | ||
80 | void clearValues(); | ||
81 | void clearIndex(); | ||
82 | |||
83 | enum BindMethod { BindByPosition, BindByName }; | ||
84 | BindMethod bindMethod(); | ||
85 | BindMethod bindm; | ||
86 | int bindCount; | ||
87 | |||
88 | QMap<int, QString> index; | ||
89 | QMap<QString, QVariant> values; | ||
90 | }; | ||
91 | |||
92 | class QM_EXPORT_SQL QSqlDriverExtension | ||
93 | { | ||
94 | public: | ||
95 | QSqlDriverExtension(); | ||
96 | virtual ~QSqlDriverExtension(); | ||
97 | virtual bool isOpen() const = 0; | ||
98 | }; | ||
99 | |||
100 | #endif | ||
101 | #endif | ||
diff --git a/qmake/include/private/qsqlmanager_p.h b/qmake/include/private/qsqlmanager_p.h new file mode 100644 index 0000000..e5f45b8 --- a/dev/null +++ b/qmake/include/private/qsqlmanager_p.h | |||
@@ -0,0 +1,159 @@ | |||
1 | /**************************************************************************** | ||
2 | ** | ||
3 | ** Definition of QSqlManager class | ||
4 | ** | ||
5 | ** Created : 2000-11-03 | ||
6 | ** | ||
7 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
8 | ** | ||
9 | ** This file is part of the sql module of the Qt GUI Toolkit. | ||
10 | ** | ||
11 | ** This file may be distributed under the terms of the Q Public License | ||
12 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
13 | ** LICENSE.QPL included in the packaging of this file. | ||
14 | ** | ||
15 | ** This file may be distributed and/or modified under the terms of the | ||
16 | ** GNU General Public License version 2 as published by the Free Software | ||
17 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
18 | ** packaging of this file. | ||
19 | ** | ||
20 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
21 | ** file in accordance with the Qt Commercial License Agreement provided | ||
22 | ** with the Software. | ||
23 | ** | ||
24 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
25 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
26 | ** | ||
27 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
28 | ** information about Qt Commercial License Agreements. | ||
29 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
30 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
31 | ** | ||
32 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
33 | ** not clear to you. | ||
34 | ** | ||
35 | **********************************************************************/ | ||
36 | |||
37 | #ifndef QSQLMANAGER_P_H | ||
38 | #define QSQLMANAGER_P_H | ||
39 | |||
40 | // | ||
41 | // W A R N I N G | ||
42 | // ------------- | ||
43 | // | ||
44 | // This file is not part of the Qt API. It exists for the convenience | ||
45 | // of other Qt classes. This header file may change from version to | ||
46 | // version without notice, or even be removed. | ||
47 | // | ||
48 | // We mean it. | ||
49 | // | ||
50 | // | ||
51 | |||
52 | #ifndef QT_H | ||
53 | #include "qglobal.h" | ||
54 | #include "qstring.h" | ||
55 | #include "qstringlist.h" | ||
56 | #include "qsql.h" | ||
57 | #include "qsqlerror.h" | ||
58 | #include "qsqlindex.h" | ||
59 | #include "qsqlcursor.h" | ||
60 | #endif // QT_H | ||
61 | |||
62 | #if !defined( QT_MODULE_SQL ) || defined( QT_LICENSE_PROFESSIONAL ) | ||
63 | #define QM_EXPORT_SQL | ||
64 | #else | ||
65 | #define QM_EXPORT_SQL Q_EXPORT | ||
66 | #endif | ||
67 | |||
68 | #ifndef QT_NO_SQL | ||
69 | |||
70 | class QSqlCursor; | ||
71 | class QSqlForm; | ||
72 | class QSqlCursorManagerPrivate; | ||
73 | |||
74 | class QM_EXPORT_SQL QSqlCursorManager | ||
75 | { | ||
76 | public: | ||
77 | QSqlCursorManager(); | ||
78 | virtual ~QSqlCursorManager(); | ||
79 | |||
80 | virtual void setSort( const QSqlIndex& sort ); | ||
81 | virtual void setSort( const QStringList& sort ); | ||
82 | QStringList sort() const; | ||
83 | virtual void setFilter( const QString& filter ); | ||
84 | QString filter() const; | ||
85 | virtual void setCursor( QSqlCursor* cursor, bool autoDelete = FALSE ); | ||
86 | QSqlCursor* cursor() const; | ||
87 | |||
88 | virtual void setAutoDelete( bool enable ); | ||
89 | bool autoDelete() const; | ||
90 | |||
91 | virtual bool refresh(); | ||
92 | virtual bool findBuffer( const QSqlIndex& idx, int atHint = 0 ); | ||
93 | |||
94 | private: | ||
95 | QSqlCursorManagerPrivate* d; | ||
96 | }; | ||
97 | |||
98 | #ifndef QT_NO_SQL_FORM | ||
99 | |||
100 | class QSqlFormManagerPrivate; | ||
101 | |||
102 | class QM_EXPORT_SQL QSqlFormManager | ||
103 | { | ||
104 | public: | ||
105 | QSqlFormManager(); | ||
106 | virtual ~QSqlFormManager(); | ||
107 | |||
108 | virtual void setForm( QSqlForm* form ); | ||
109 | QSqlForm* form(); | ||
110 | virtual void setRecord( QSqlRecord* record ); | ||
111 | QSqlRecord* record(); | ||
112 | |||
113 | virtual void clearValues(); | ||
114 | virtual void readFields(); | ||
115 | virtual void writeFields(); | ||
116 | |||
117 | private: | ||
118 | QSqlFormManagerPrivate* d; | ||
119 | }; | ||
120 | |||
121 | #endif | ||
122 | |||
123 | class QWidget; | ||
124 | class QDataManagerPrivate; | ||
125 | |||
126 | class QM_EXPORT_SQL QDataManager | ||
127 | { | ||
128 | public: | ||
129 | QDataManager(); | ||
130 | virtual ~QDataManager(); | ||
131 | |||
132 | virtual void setMode( QSql::Op m ); | ||
133 | QSql::Op mode() const; | ||
134 | virtual void setAutoEdit( bool autoEdit ); | ||
135 | bool autoEdit() const; | ||
136 | |||
137 | virtual void handleError( QWidget* parent, const QSqlError& error ); | ||
138 | virtual QSql::Confirm confirmEdit( QWidget* parent, QSql::Op m ); | ||
139 | virtual QSql::Confirm confirmCancel( QWidget* parent, QSql::Op m ); | ||
140 | |||
141 | virtual void setConfirmEdits( bool confirm ); | ||
142 | virtual void setConfirmInsert( bool confirm ); | ||
143 | virtual void setConfirmUpdate( bool confirm ); | ||
144 | virtual void setConfirmDelete( bool confirm ); | ||
145 | virtual void setConfirmCancels( bool confirm ); | ||
146 | |||
147 | bool confirmEdits() const; | ||
148 | bool confirmInsert() const; | ||
149 | bool confirmUpdate() const; | ||
150 | bool confirmDelete() const; | ||
151 | bool confirmCancels() const; | ||
152 | |||
153 | private: | ||
154 | QDataManagerPrivate* d; | ||
155 | }; | ||
156 | |||
157 | |||
158 | #endif | ||
159 | #endif | ||
diff --git a/qmake/include/private/qstyleinterface_p.h b/qmake/include/private/qstyleinterface_p.h new file mode 100644 index 0000000..4aaedc7 --- a/dev/null +++ b/qmake/include/private/qstyleinterface_p.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** ... | ||
5 | ** | ||
6 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the widgets module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QSTYLEINTERFACE_H | ||
37 | #define QSTYLEINTERFACE_H | ||
38 | |||
39 | #ifndef QT_H | ||
40 | #include <private/qcom_p.h> | ||
41 | #endif // QT_H | ||
42 | |||
43 | #ifndef QT_NO_STYLE | ||
44 | #ifndef QT_NO_COMPONENT | ||
45 | |||
46 | class QStyle; | ||
47 | |||
48 | // {FC1B6EBE-053C-49c1-A483-C377739AB9A5} | ||
49 | #ifndef IID_QStyleFactory | ||
50 | #define IID_QStyleFactory QUuid(0xfc1b6ebe, 0x53c, 0x49c1, 0xa4, 0x83, 0xc3, 0x77, 0x73, 0x9a, 0xb9, 0xa5) | ||
51 | #endif | ||
52 | |||
53 | struct Q_EXPORT QStyleFactoryInterface : public QFeatureListInterface | ||
54 | { | ||
55 | virtual QStyle* create( const QString& style ) = 0; | ||
56 | }; | ||
57 | |||
58 | #endif //QT_NO_COMPONENT | ||
59 | #endif //QT_NO_STYLE | ||
60 | |||
61 | #endif //QSTYLEINTERFACE_H | ||
diff --git a/qmake/include/private/qsvgdevice_p.h b/qmake/include/private/qsvgdevice_p.h new file mode 100644 index 0000000..c1cc389 --- a/dev/null +++ b/qmake/include/private/qsvgdevice_p.h | |||
@@ -0,0 +1,134 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of the QSvgDevice class | ||
5 | ** | ||
6 | ** Created : 20001024 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the xml module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
22 | ** file in accordance with the Qt Commercial License Agreement provided | ||
23 | ** with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | *****************************************************************************/ | ||
37 | |||
38 | #ifndef QSVGDEVICE_H | ||
39 | #define QSVGDEVICE_H | ||
40 | |||
41 | // | ||
42 | // W A R N I N G | ||
43 | // ------------- | ||
44 | // | ||
45 | // This file is not part of the Qt API. It exists for the convenience | ||
46 | // of the QPicture class. This header file may change from | ||
47 | // version to version without notice, or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | #ifndef QT_H | ||
54 | #include "qpaintdevice.h" | ||
55 | #include "qrect.h" | ||
56 | #include "qdom.h" | ||
57 | #endif // QT_H | ||
58 | |||
59 | #if !defined(QT_MODULE_XML) || defined( QT_LICENSE_PROFESSIONAL ) || defined( QT_INTERNAL_XML ) | ||
60 | #define QM_EXPORT_SVG | ||
61 | #else | ||
62 | #define QM_EXPORT_SVG Q_EXPORT | ||
63 | #endif | ||
64 | |||
65 | #ifndef QT_NO_SVG | ||
66 | |||
67 | class QPainter; | ||
68 | class QDomNode; | ||
69 | class QDomNamedNodeMap; | ||
70 | struct QSvgDeviceState; | ||
71 | class QSvgDevicePrivate; | ||
72 | |||
73 | class QM_EXPORT_SVG QSvgDevice : public QPaintDevice | ||
74 | { | ||
75 | public: | ||
76 | QSvgDevice(); | ||
77 | ~QSvgDevice(); | ||
78 | |||
79 | bool play( QPainter *p ); | ||
80 | |||
81 | QString toString() const; | ||
82 | |||
83 | bool load( QIODevice *dev ); | ||
84 | bool save( QIODevice *dev ); | ||
85 | bool save( const QString &fileName ); | ||
86 | |||
87 | QRect boundingRect() const; | ||
88 | void setBoundingRect( const QRect &r ); | ||
89 | |||
90 | protected: | ||
91 | virtual bool cmd ( int, QPainter*, QPDevCmdParam* ); | ||
92 | virtual int metric( int ) const; | ||
93 | |||
94 | private: | ||
95 | // reading | ||
96 | bool play( const QDomNode &node ); | ||
97 | void saveAttributes(); | ||
98 | void restoreAttributes(); | ||
99 | QColor parseColor( const QString &col ); | ||
100 | double parseLen( const QString &str, bool *ok=0, bool horiz=TRUE ) const; | ||
101 | int lenToInt( const QDomNamedNodeMap &map, const QString &attr, | ||
102 | int def=0 ) const; | ||
103 | void setStyleProperty( const QString &prop, const QString &val, | ||
104 | QPen *pen, QFont *font, int *talign ); | ||
105 | void setStyle( const QString &s ); | ||
106 | void setTransform( const QString &tr ); | ||
107 | void drawPath( const QString &data ); | ||
108 | |||
109 | // writing | ||
110 | void applyStyle( QDomElement *e, int c ) const; | ||
111 | void applyTransform( QDomElement *e ) const; | ||
112 | |||
113 | // reading | ||
114 | QRect brect; // bounding rectangle | ||
115 | QDomDocument doc; // document tree | ||
116 | QDomNode current; | ||
117 | QPoint curPt; | ||
118 | QSvgDeviceState *curr; | ||
119 | QPainter *pt; // used by play() et al | ||
120 | |||
121 | // writing | ||
122 | bool dirtyTransform, dirtyStyle; | ||
123 | |||
124 | QSvgDevicePrivate *d; | ||
125 | }; | ||
126 | |||
127 | inline QRect QSvgDevice::boundingRect() const | ||
128 | { | ||
129 | return brect; | ||
130 | } | ||
131 | |||
132 | #endif // QT_NO_SVG | ||
133 | |||
134 | #endif // QSVGDEVICE_H | ||
diff --git a/qmake/include/private/qtextcodecinterface_p.h b/qmake/include/private/qtextcodecinterface_p.h new file mode 100644 index 0000000..d2a2cb9 --- a/dev/null +++ b/qmake/include/private/qtextcodecinterface_p.h | |||
@@ -0,0 +1,79 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of QTextCodecFactoryInterface interface | ||
5 | ** | ||
6 | ** Copyright (C) 2001-2002 Trolltech AS. All rights reserved. | ||
7 | ** | ||
8 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
9 | ** | ||
10 | ** This file may be distributed under the terms of the Q Public License | ||
11 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
12 | ** LICENSE.QPL included in the packaging of this file. | ||
13 | ** | ||
14 | ** This file may be distributed and/or modified under the terms of the | ||
15 | ** GNU General Public License version 2 as published by the Free Software | ||
16 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
17 | ** packaging of this file. | ||
18 | ** | ||
19 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
20 | ** licenses may use this file in accordance with the Qt Commercial License | ||
21 | ** Agreement provided with the Software. | ||
22 | ** | ||
23 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
24 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
25 | ** | ||
26 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
27 | ** information about Qt Commercial License Agreements. | ||
28 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
29 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
30 | ** | ||
31 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
32 | ** not clear to you. | ||
33 | ** | ||
34 | **********************************************************************/ | ||
35 | |||
36 | #ifndef QTEXTCODECINTERFACE_P_H | ||
37 | #define QTEXTCODECINTERFACE_P_H | ||
38 | |||
39 | |||
40 | // | ||
41 | // W A R N I N G | ||
42 | // ------------- | ||
43 | // | ||
44 | // This file is not part of the Qt API. It exists for the convenience | ||
45 | // of qpsprinter.cpp and qprinter_x11.cpp. | ||
46 | // This header file may change from version to version without notice, | ||
47 | // or even be removed. | ||
48 | // | ||
49 | // We mean it. | ||
50 | // | ||
51 | // | ||
52 | |||
53 | |||
54 | #ifndef QT_H | ||
55 | #include <private/qcom_p.h> | ||
56 | #endif // QT_H | ||
57 | |||
58 | #ifndef QT_NO_TEXTCODEC | ||
59 | #ifndef QT_NO_COMPONENT | ||
60 | |||
61 | class QTextCodec; | ||
62 | |||
63 | |||
64 | // {F55BFA60-F695-11D4-823E-009027DC0F37} | ||
65 | #ifndef IID_QTextCodecFactory | ||
66 | #define IID_QTextCodecFactory QUuid( 0xf55bfa60, 0xf695, 0x11d4, 0x82, 0x3e, 0x00, 0x90, 0x27, 0xdc, 0x0f, 0x37) | ||
67 | #endif | ||
68 | |||
69 | |||
70 | struct Q_EXPORT QTextCodecFactoryInterface : public QFeatureListInterface | ||
71 | { | ||
72 | virtual QTextCodec *createForMib( int mib ) = 0; | ||
73 | virtual QTextCodec *createForName( const QString &name ) = 0; | ||
74 | }; | ||
75 | |||
76 | #endif // QT_NO_COMPONENT | ||
77 | #endif // QT_NO_TEXTCODEC | ||
78 | |||
79 | #endif // QTEXTCODECINTERFACE_P_H | ||
diff --git a/qmake/include/private/qtitlebar_p.h b/qmake/include/private/qtitlebar_p.h new file mode 100644 index 0000000..dabb6bf --- a/dev/null +++ b/qmake/include/private/qtitlebar_p.h | |||
@@ -0,0 +1,136 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some Qt private functions. | ||
5 | ** | ||
6 | ** Created : 2000-01-01 | ||
7 | ** | ||
8 | ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the widgets module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QTITLEBAR_P_H | ||
39 | #define QTITLEBAR_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qworkspace.cpp and qdockwindow.cpp. This header file may change | ||
48 | // from version to version without notice, or even be removed. | ||
49 | // | ||
50 | // We mean it. | ||
51 | // | ||
52 | // | ||
53 | |||
54 | |||
55 | #ifndef QT_H | ||
56 | #include "qbutton.h" | ||
57 | #include "qlabel.h" | ||
58 | #endif // QT_H | ||
59 | |||
60 | #if !defined(QT_NO_TITLEBAR) | ||
61 | |||
62 | class QToolTip; | ||
63 | class QTitleBarPrivate; | ||
64 | class QPixmap; | ||
65 | |||
66 | class Q_EXPORT QTitleBar : public QWidget | ||
67 | { | ||
68 | Q_OBJECT | ||
69 | Q_PROPERTY( bool autoRaise READ autoRaise WRITE setAutoRaise ) | ||
70 | Q_PROPERTY( bool movable READ isMovable WRITE setMovable ) | ||
71 | |||
72 | public: | ||
73 | QTitleBar (QWidget* w, QWidget* parent, const char* name=0); | ||
74 | ~QTitleBar(); | ||
75 | |||
76 | bool isActive() const; | ||
77 | bool usesActiveColor() const; | ||
78 | virtual QString visibleText() const; | ||
79 | |||
80 | bool isMovable() const; | ||
81 | void setMovable(bool); | ||
82 | |||
83 | bool autoRaise() const; | ||
84 | void setAutoRaise(bool); | ||
85 | |||
86 | QWidget *window() const; | ||
87 | |||
88 | QSize sizeHint() const; | ||
89 | |||
90 | #ifdef QT_NO_WIDGET_TOPEXTRA | ||
91 | // We provide one, since titlebar is useless otherwise. | ||
92 | QString caption() const; | ||
93 | #endif | ||
94 | |||
95 | public slots: | ||
96 | void setActive( bool ); | ||
97 | void setCaption( const QString& title ); | ||
98 | void setIcon( const QPixmap& icon ); | ||
99 | |||
100 | signals: | ||
101 | void doActivate(); | ||
102 | void doNormal(); | ||
103 | void doClose(); | ||
104 | void doMaximize(); | ||
105 | void doMinimize(); | ||
106 | void doShade(); | ||
107 | void showOperationMenu(); | ||
108 | void popupOperationMenu( const QPoint& ); | ||
109 | void doubleClicked(); | ||
110 | |||
111 | protected: | ||
112 | bool event( QEvent *); | ||
113 | void resizeEvent( QResizeEvent *); | ||
114 | void contextMenuEvent( QContextMenuEvent * ); | ||
115 | void mousePressEvent( QMouseEvent * ); | ||
116 | void mouseDoubleClickEvent( QMouseEvent * ); | ||
117 | void mouseReleaseEvent( QMouseEvent * ); | ||
118 | void mouseMoveEvent( QMouseEvent * ); | ||
119 | void enterEvent( QEvent *e ); | ||
120 | void leaveEvent( QEvent *e ); | ||
121 | void paintEvent( QPaintEvent *p ); | ||
122 | |||
123 | virtual void cutText(); | ||
124 | |||
125 | private: | ||
126 | void readColors(); | ||
127 | |||
128 | QTitleBarPrivate *d; | ||
129 | #if defined(Q_DISABLE_COPY) // Disabled copy constructor and operator= | ||
130 | QTitleBar( const QTitleBar & ); | ||
131 | QTitleBar &operator=( const QTitleBar & ); | ||
132 | #endif | ||
133 | }; | ||
134 | |||
135 | #endif | ||
136 | #endif //QTITLEBAR_P_H | ||
diff --git a/qmake/include/private/qucom_p.h b/qmake/include/private/qucom_p.h new file mode 100644 index 0000000..d2ff48e --- a/dev/null +++ b/qmake/include/private/qucom_p.h | |||
@@ -0,0 +1,499 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of the QUcom interfaces | ||
5 | ** | ||
6 | ** Created : 990101 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the tools module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QUCOM_H | ||
39 | #define QUCOM_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include <qstring.h> | ||
43 | #include "quuid.h" | ||
44 | #endif // QT_H | ||
45 | |||
46 | // | ||
47 | // W A R N I N G | ||
48 | // ------------- | ||
49 | // | ||
50 | // This file is not part of the Qt API. It exists for the convenience | ||
51 | // of a number of Qt sources files. This header file may change from | ||
52 | // version to version without notice, or even be removed. | ||
53 | // | ||
54 | // We mean it. | ||
55 | // | ||
56 | // | ||
57 | |||
58 | #ifdef check | ||
59 | #undef check | ||
60 | #endif | ||
61 | |||
62 | struct QUObject; | ||
63 | struct QUInterfaceDescription; | ||
64 | struct QUnknownInterface; | ||
65 | struct QDispatchInterface; | ||
66 | |||
67 | |||
68 | struct Q_EXPORT QUBuffer | ||
69 | { | ||
70 | virtual long read( char *data, ulong maxlen ) = 0; | ||
71 | virtual long write( const char *data, ulong len ) = 0; | ||
72 | }; | ||
73 | |||
74 | |||
75 | // A type for a QUObject | ||
76 | struct Q_EXPORT QUType | ||
77 | { | ||
78 | virtual const QUuid *uuid() const = 0; | ||
79 | virtual const char *desc() const = 0; | ||
80 | |||
81 | |||
82 | virtual bool canConvertFrom( QUObject *, QUType * ) = 0; | ||
83 | // virtual private, only called by canConvertFrom | ||
84 | virtual bool canConvertTo( QUObject *, QUType * ) = 0; | ||
85 | |||
86 | |||
87 | virtual bool convertFrom( QUObject *, QUType * ) = 0; | ||
88 | // virtual private, only called by convertFrom | ||
89 | virtual bool convertTo( QUObject *, QUType * ) = 0; | ||
90 | |||
91 | virtual void clear( QUObject * ) = 0; | ||
92 | |||
93 | virtual int serializeTo( QUObject *, QUBuffer * ) = 0; | ||
94 | virtual int serializeFrom( QUObject *, QUBuffer * ) = 0; | ||
95 | |||
96 | static bool isEqual( const QUType *t1, const QUType *t2 ); | ||
97 | static bool check( QUObject* o, QUType* t ); | ||
98 | }; | ||
99 | |||
100 | |||
101 | // {DE56510E-4E9F-4b76-A3C2-D1E2EF42F1AC} | ||
102 | extern Q_EXPORT const QUuid TID_QUType_Null; | ||
103 | struct Q_EXPORT QUType_Null : public QUType | ||
104 | { | ||
105 | const QUuid *uuid() const; | ||
106 | const char *desc() const; | ||
107 | |||
108 | bool canConvertFrom( QUObject *, QUType * ); | ||
109 | bool canConvertTo( QUObject *, QUType * ); | ||
110 | bool convertFrom( QUObject *, QUType * ); | ||
111 | bool convertTo( QUObject *, QUType * ); | ||
112 | void clear( QUObject * ); | ||
113 | int serializeTo( QUObject *, QUBuffer * ); | ||
114 | int serializeFrom( QUObject *, QUBuffer * ); | ||
115 | }; | ||
116 | extern Q_EXPORT QUType_Null static_QUType_Null; | ||
117 | |||
118 | |||
119 | // The magic QUObject | ||
120 | struct Q_EXPORT QUObject | ||
121 | { | ||
122 | public: // scary MSVC bug makes this necessary | ||
123 | QUObject() : type( &static_QUType_Null ) {} | ||
124 | ~QUObject() { type->clear( this ); } | ||
125 | |||
126 | QUType *type; | ||
127 | |||
128 | // the unavoidable union | ||
129 | union | ||
130 | { | ||
131 | bool b; | ||
132 | |||
133 | char c; | ||
134 | short s; | ||
135 | int i; | ||
136 | long l; | ||
137 | |||
138 | unsigned char uc; | ||
139 | unsigned short us; | ||
140 | unsigned int ui; | ||
141 | unsigned long ul; | ||
142 | |||
143 | float f; | ||
144 | double d; | ||
145 | |||
146 | char byte[16]; | ||
147 | |||
148 | struct { | ||
149 | char* data; | ||
150 | unsigned long size; | ||
151 | } bytearray; | ||
152 | |||
153 | void* ptr; | ||
154 | |||
155 | struct { | ||
156 | void *ptr; | ||
157 | bool owner; | ||
158 | } voidstar; | ||
159 | |||
160 | struct { | ||
161 | char *ptr; | ||
162 | bool owner; | ||
163 | } charstar; | ||
164 | |||
165 | struct { | ||
166 | char *ptr; | ||
167 | bool owner; | ||
168 | } utf8; | ||
169 | |||
170 | struct { | ||
171 | char *ptr; | ||
172 | bool owner; | ||
173 | } local8bit; | ||
174 | |||
175 | QUnknownInterface* iface; | ||
176 | QDispatchInterface* idisp; | ||
177 | |||
178 | } payload; | ||
179 | |||
180 | }; | ||
181 | |||
182 | |||
183 | // A parameter description describes one method parameters. A | ||
184 | // parameter has a name, a type and a flag describing whether it's an | ||
185 | // in parameter, an out parameter, or both ways | ||
186 | struct Q_EXPORT QUParameter | ||
187 | { | ||
188 | const char* name; | ||
189 | QUType *type; | ||
190 | const void* typeExtra; //Usually 0, UEnum* for QUType_enum, const char* for QUType_ptr, int* for QUType_varptr | ||
191 | enum { In = 1, Out = 2, InOut = In | Out }; | ||
192 | int inOut; | ||
193 | }; | ||
194 | |||
195 | // A method description describes one method. A method has a name and | ||
196 | // an array of parameters. | ||
197 | struct Q_EXPORT QUMethod | ||
198 | { | ||
199 | const char* name; | ||
200 | int count; | ||
201 | const QUParameter* parameters; | ||
202 | }; | ||
203 | |||
204 | // A Property description. Not used yet in the example. | ||
205 | struct Q_EXPORT QUProperty | ||
206 | { | ||
207 | const char* name; | ||
208 | QUType* type; | ||
209 | const void* typeExtra; //type dependend. Usually 0, but UEnum for QUTypeenum or const char* for QUTypeptr | ||
210 | |||
211 | int set; // -1 undefined | ||
212 | int get; // -1 undefined | ||
213 | |||
214 | int designable; // -1 FALSE, -2 TRUE, else method | ||
215 | int stored; // -1 FALSE, -2 TRUE, else method | ||
216 | }; | ||
217 | |||
218 | // An interface description describes one interface, that is all its | ||
219 | // methods and properties. | ||
220 | struct Q_EXPORT QUInterfaceDescription | ||
221 | { | ||
222 | int methodCount; | ||
223 | const QUMethod* methods; | ||
224 | int propertyCount; | ||
225 | const QUProperty* properties; | ||
226 | }; | ||
227 | |||
228 | |||
229 | // A component description describe one component, that is its name, | ||
230 | // vendor, release, info, its component uuid and all its interface | ||
231 | // uuids. | ||
232 | struct Q_EXPORT QUComponentDescription | ||
233 | { | ||
234 | const char* name; | ||
235 | const char* vendor; | ||
236 | const char* release; | ||
237 | const char* info; | ||
238 | QUuid cid; | ||
239 | int count; | ||
240 | const QUuid* interfaces; | ||
241 | }; | ||
242 | |||
243 | |||
244 | // A component server description describe one component server, that | ||
245 | // is its name, vendor, release, info and the descriptions of all | ||
246 | // components it can instantiate. | ||
247 | struct Q_EXPORT QUComponentServerDescription | ||
248 | { | ||
249 | const char* name; | ||
250 | const char* vendor; | ||
251 | const char* release; | ||
252 | const char* info; | ||
253 | int count; | ||
254 | const QUComponentDescription* components; | ||
255 | }; | ||
256 | |||
257 | |||
258 | |||
259 | struct Q_EXPORT QUEnumItem // - a name/value pair | ||
260 | { | ||
261 | const char *key; | ||
262 | int value; | ||
263 | }; | ||
264 | |||
265 | struct Q_EXPORT QUEnum | ||
266 | { | ||
267 | const char *name; // - enumerator name | ||
268 | unsigned int count; // - number of values | ||
269 | const QUEnumItem *items; // - the name/value pairs | ||
270 | bool set; // whether enum has to be treated as a set | ||
271 | }; | ||
272 | |||
273 | inline bool QUType::isEqual( const QUType *t1, const QUType *t2 ) { | ||
274 | return t1 == t2 || t1->uuid() == t2->uuid() || | ||
275 | *(t1->uuid()) == *(t2->uuid()); | ||
276 | } | ||
277 | |||
278 | inline bool QUType::check( QUObject* o, QUType* t ) { | ||
279 | return isEqual( o->type, t ) || t->convertFrom( o, o->type ); | ||
280 | } | ||
281 | |||
282 | |||
283 | |||
284 | // {7EE17B08-5419-47e2-9776-8EEA112DCAEC} | ||
285 | extern Q_EXPORT const QUuid TID_QUType_enum; | ||
286 | struct Q_EXPORT QUType_enum : public QUType | ||
287 | { | ||
288 | const QUuid *uuid() const; | ||
289 | const char *desc() const; | ||
290 | |||
291 | void set( QUObject *, int ); | ||
292 | int &get( QUObject * o ) { return o->payload.i; } | ||
293 | bool canConvertFrom( QUObject *, QUType * ); | ||
294 | bool canConvertTo( QUObject *, QUType * ); | ||
295 | bool convertFrom( QUObject *, QUType * ); | ||
296 | bool convertTo( QUObject *, QUType * ); | ||
297 | void clear( QUObject * ) {} | ||
298 | int serializeTo( QUObject *, QUBuffer * ); | ||
299 | int serializeFrom( QUObject *, QUBuffer * ); | ||
300 | }; | ||
301 | extern Q_EXPORT QUType_enum static_QUType_enum; | ||
302 | |||
303 | |||
304 | // {8AC26448-5AB4-49eb-968C-8F30AB13D732} | ||
305 | extern Q_EXPORT const QUuid TID_QUType_ptr; | ||
306 | struct Q_EXPORT QUType_ptr : public QUType | ||
307 | { | ||
308 | const QUuid *uuid() const; | ||
309 | const char *desc() const; | ||
310 | |||
311 | void set( QUObject *, const void* ); | ||
312 | void* &get( QUObject * o ) { return o->payload.ptr; } | ||
313 | bool canConvertFrom( QUObject *, QUType * ); | ||
314 | bool canConvertTo( QUObject *, QUType * ); | ||
315 | bool convertFrom( QUObject *, QUType * ); | ||
316 | bool convertTo( QUObject *, QUType * ); | ||
317 | void clear( QUObject * ) {} | ||
318 | int serializeTo( QUObject *, QUBuffer * ); | ||
319 | int serializeFrom( QUObject *, QUBuffer * ); | ||
320 | }; | ||
321 | extern Q_EXPORT QUType_ptr static_QUType_ptr; | ||
322 | |||
323 | // {97A2594D-6496-4402-A11E-55AEF2D4D25C} | ||
324 | extern Q_EXPORT const QUuid TID_QUType_iface; | ||
325 | struct Q_EXPORT QUType_iface : public QUType | ||
326 | { | ||
327 | const QUuid *uuid() const; | ||
328 | const char *desc() const; | ||
329 | |||
330 | void set( QUObject *, QUnknownInterface* ); | ||
331 | QUnknownInterface* &get( QUObject *o ){ return o->payload.iface; } | ||
332 | bool canConvertFrom( QUObject *, QUType * ); | ||
333 | bool canConvertTo( QUObject *, QUType * ); | ||
334 | bool convertFrom( QUObject *, QUType * ); | ||
335 | bool convertTo( QUObject *, QUType * ); | ||
336 | void clear( QUObject * ) {} | ||
337 | int serializeTo( QUObject *, QUBuffer * ); | ||
338 | int serializeFrom( QUObject *, QUBuffer * ); | ||
339 | }; | ||
340 | extern Q_EXPORT QUType_iface static_QUType_iface; | ||
341 | |||
342 | // {2F358164-E28F-4bf4-9FA9-4E0CDCABA50B} | ||
343 | extern Q_EXPORT const QUuid TID_QUType_idisp; | ||
344 | struct Q_EXPORT QUType_idisp : public QUType | ||
345 | { | ||
346 | const QUuid *uuid() const; | ||
347 | const char *desc() const; | ||
348 | |||
349 | void set( QUObject *, QDispatchInterface* ); | ||
350 | QDispatchInterface* &get( QUObject *o ){ return o->payload.idisp; } | ||
351 | bool canConvertFrom( QUObject *, QUType * ); | ||
352 | bool canConvertTo( QUObject *, QUType * ); | ||
353 | bool convertFrom( QUObject *, QUType * ); | ||
354 | bool convertTo( QUObject *, QUType * ); | ||
355 | void clear( QUObject * ) {} | ||
356 | int serializeTo( QUObject *, QUBuffer * ); | ||
357 | int serializeFrom( QUObject *, QUBuffer * ); | ||
358 | }; | ||
359 | extern Q_EXPORT QUType_idisp static_QUType_idisp; | ||
360 | |||
361 | // {CA42115D-13D0-456c-82B5-FC10187F313E} | ||
362 | extern Q_EXPORT const QUuid TID_QUType_bool; | ||
363 | struct Q_EXPORT QUType_bool : public QUType | ||
364 | { | ||
365 | const QUuid *uuid() const; | ||
366 | const char *desc() const; | ||
367 | |||
368 | void set( QUObject *, bool ); | ||
369 | bool &get( QUObject *o ) { return o->payload.b; } | ||
370 | bool canConvertFrom( QUObject *, QUType * ); | ||
371 | bool canConvertTo( QUObject *, QUType * ); | ||
372 | bool convertFrom( QUObject *, QUType * ); | ||
373 | bool convertTo( QUObject *, QUType * ); | ||
374 | void clear( QUObject * ) {} | ||
375 | int serializeTo( QUObject *, QUBuffer * ); | ||
376 | int serializeFrom( QUObject *, QUBuffer * ); | ||
377 | }; | ||
378 | extern Q_EXPORT QUType_bool static_QUType_bool; | ||
379 | |||
380 | // {53C1F3BE-73C3-4c7d-9E05-CCF09EB676B5} | ||
381 | extern Q_EXPORT const QUuid TID_QUType_int; | ||
382 | struct Q_EXPORT QUType_int : public QUType | ||
383 | { | ||
384 | const QUuid *uuid() const; | ||
385 | const char *desc() const; | ||
386 | |||
387 | void set( QUObject *, int ); | ||
388 | int &get( QUObject *o ) { return o->payload.i; } | ||
389 | bool canConvertFrom( QUObject *, QUType * ); | ||
390 | bool canConvertTo( QUObject *, QUType * ); | ||
391 | bool convertFrom( QUObject *, QUType * ); | ||
392 | bool convertTo( QUObject *, QUType * ); | ||
393 | void clear( QUObject * ) {} | ||
394 | int serializeTo( QUObject *, QUBuffer * ); | ||
395 | int serializeFrom( QUObject *, QUBuffer * ); | ||
396 | }; | ||
397 | extern Q_EXPORT QUType_int static_QUType_int; | ||
398 | |||
399 | // {5938712A-C496-11D5-8CB2-00C0F03BC0F3} | ||
400 | extern Q_EXPORT const QUuid TID_QUType_uint; | ||
401 | struct Q_EXPORT QUType_uint : public QUType | ||
402 | { | ||
403 | const QUuid *uuid() const; | ||
404 | const char *desc() const; | ||
405 | |||
406 | void set( QUObject *, uint ); | ||
407 | uint &get( QUObject *o ) { return o->payload.ui; } | ||
408 | bool canConvertFrom( QUObject *, QUType * ); | ||
409 | bool canConvertTo( QUObject *, QUType * ); | ||
410 | bool convertFrom( QUObject *, QUType * ); | ||
411 | bool convertTo( QUObject *, QUType * ); | ||
412 | void clear( QUObject * ) {} | ||
413 | int serializeTo( QUObject *, QUBuffer * ); | ||
414 | int serializeFrom( QUObject *, QUBuffer * ); | ||
415 | }; | ||
416 | extern Q_EXPORT QUType_uint static_QUType_uint; | ||
417 | |||
418 | // {2D0974E5-0BA6-4ec2-8837-C198972CB48C} | ||
419 | extern Q_EXPORT const QUuid TID_QUType_double; | ||
420 | struct Q_EXPORT QUType_double : public QUType | ||
421 | { | ||
422 | const QUuid *uuid() const; | ||
423 | const char *desc() const; | ||
424 | |||
425 | void set( QUObject *, double ); | ||
426 | double &get( QUObject *o ) { return o->payload.d; } | ||
427 | bool canConvertFrom( QUObject *, QUType * ); | ||
428 | bool canConvertTo( QUObject *, QUType * ); | ||
429 | bool convertFrom( QUObject *, QUType * ); | ||
430 | bool convertTo( QUObject *, QUType * ); | ||
431 | void clear( QUObject * ) {} | ||
432 | int serializeTo( QUObject *, QUBuffer * ); | ||
433 | int serializeFrom( QUObject *, QUBuffer * ); | ||
434 | }; | ||
435 | extern Q_EXPORT QUType_double static_QUType_double; | ||
436 | |||
437 | // {544C5175-6993-4486-B04D-CEC4D21BF4B9 } | ||
438 | extern Q_EXPORT const QUuid TID_QUType_float; | ||
439 | struct Q_EXPORT QUType_float : public QUType | ||
440 | { | ||
441 | const QUuid *uuid() const; | ||
442 | const char *desc() const; | ||
443 | |||
444 | void set( QUObject *, float ); | ||
445 | float &get( QUObject *o ) { return o->payload.f; } | ||
446 | bool canConvertFrom( QUObject *, QUType * ); | ||
447 | bool canConvertTo( QUObject *, QUType * ); | ||
448 | bool convertFrom( QUObject *, QUType * ); | ||
449 | bool convertTo( QUObject *, QUType * ); | ||
450 | void clear( QUObject * ) {} | ||
451 | int serializeTo( QUObject *, QUBuffer * ); | ||
452 | int serializeFrom( QUObject *, QUBuffer * ); | ||
453 | }; | ||
454 | extern Q_EXPORT QUType_float static_QUType_float; | ||
455 | |||
456 | // {EFCDD1D4-77A3-4b8e-8D46-DC14B8D393E9} | ||
457 | extern Q_EXPORT const QUuid TID_QUType_charstar; | ||
458 | struct Q_EXPORT QUType_charstar : public QUType | ||
459 | { | ||
460 | const QUuid *uuid() const; | ||
461 | const char *desc() const; | ||
462 | |||
463 | void set( QUObject *, const char*, bool take = FALSE ); | ||
464 | char* get( QUObject *o ){ return o->payload.charstar.ptr; } | ||
465 | bool canConvertFrom( QUObject *, QUType * ); | ||
466 | bool canConvertTo( QUObject *, QUType * ); | ||
467 | bool convertFrom( QUObject *, QUType * ); | ||
468 | bool convertTo( QUObject *, QUType * ); | ||
469 | void clear( QUObject * ); | ||
470 | int serializeTo( QUObject *, QUBuffer * ); | ||
471 | int serializeFrom( QUObject *, QUBuffer * ); | ||
472 | |||
473 | }; | ||
474 | extern Q_EXPORT QUType_charstar static_QUType_charstar; | ||
475 | |||
476 | // {44C2A547-01E7-4e56-8559-35AF9D2F42B7} | ||
477 | extern const QUuid TID_QUType_QString; | ||
478 | |||
479 | struct Q_EXPORT QUType_QString : public QUType | ||
480 | { | ||
481 | const QUuid *uuid() const; | ||
482 | const char *desc() const; | ||
483 | |||
484 | void set( QUObject *, const QString & ); | ||
485 | QString &get( QUObject * o ) { return *(QString*)o->payload.ptr; } | ||
486 | |||
487 | bool canConvertFrom( QUObject *, QUType * ); | ||
488 | bool canConvertTo( QUObject *, QUType * ); | ||
489 | bool convertFrom( QUObject *, QUType * ); | ||
490 | bool convertTo( QUObject *, QUType * ); | ||
491 | void clear( QUObject * ); | ||
492 | int serializeTo( QUObject *, QUBuffer * ); | ||
493 | int serializeFrom( QUObject *, QUBuffer * ); | ||
494 | |||
495 | }; | ||
496 | extern Q_EXPORT QUType_QString static_QUType_QString; | ||
497 | |||
498 | |||
499 | #endif // QUCOM_H | ||
diff --git a/qmake/include/private/qucomextra_p.h b/qmake/include/private/qucomextra_p.h new file mode 100644 index 0000000..3de6104 --- a/dev/null +++ b/qmake/include/private/qucomextra_p.h | |||
@@ -0,0 +1,93 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of extra QUcom classes | ||
5 | ** | ||
6 | ** Created : 990101 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2002 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QUCOMEXTRA_H | ||
39 | #define QUCOMEXTRA_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include <private/qucom_p.h> | ||
43 | #endif // QT_H | ||
44 | |||
45 | |||
46 | class QVariant; | ||
47 | |||
48 | #ifndef QT_NO_VARIANT | ||
49 | // 6dc75d58-a1d9-4417-b591-d45c63a3a4ea | ||
50 | extern const QUuid TID_QUType_QVariant; | ||
51 | |||
52 | struct Q_EXPORT QUType_QVariant : public QUType | ||
53 | { | ||
54 | const QUuid *uuid() const; | ||
55 | const char *desc() const; | ||
56 | |||
57 | void set( QUObject *, const QVariant & ); | ||
58 | QVariant &get( QUObject * o ); | ||
59 | |||
60 | bool canConvertFrom( QUObject *, QUType * ); | ||
61 | bool canConvertTo( QUObject *, QUType * ); | ||
62 | bool convertFrom( QUObject *, QUType * ); | ||
63 | bool convertTo( QUObject *, QUType * ); | ||
64 | void clear( QUObject * ); | ||
65 | int serializeTo( QUObject *, QUBuffer * ); | ||
66 | int serializeFrom( QUObject *, QUBuffer * ); | ||
67 | }; | ||
68 | extern Q_EXPORT QUType_QVariant static_QUType_QVariant; | ||
69 | #endif //QT_NO_VARIANT | ||
70 | |||
71 | |||
72 | // {0x8d48b3a8, 0xbd7f, 0x11d5, 0x8d, 0x74, 0x00, 0xc0, 0xf0, 0x3b, 0xc0, 0xf3 } | ||
73 | extern Q_EXPORT const QUuid TID_QUType_varptr; | ||
74 | struct Q_EXPORT QUType_varptr : public QUType | ||
75 | { | ||
76 | const QUuid *uuid() const; | ||
77 | const char *desc() const; | ||
78 | |||
79 | void set( QUObject *, const void* ); | ||
80 | void* &get( QUObject * o ) { return o->payload.ptr; } | ||
81 | bool canConvertFrom( QUObject *, QUType * ); | ||
82 | bool canConvertTo( QUObject *, QUType * ); | ||
83 | bool convertFrom( QUObject *, QUType * ); | ||
84 | bool convertTo( QUObject *, QUType * ); | ||
85 | void clear( QUObject * ) {} | ||
86 | int serializeTo( QUObject *, QUBuffer * ); | ||
87 | int serializeFrom( QUObject *, QUBuffer * ); | ||
88 | }; | ||
89 | extern Q_EXPORT QUType_varptr static_QUType_varptr; | ||
90 | |||
91 | |||
92 | #endif // QUCOMEXTRA_H | ||
93 | |||
diff --git a/qmake/include/private/qwidget_p.h b/qmake/include/private/qwidget_p.h new file mode 100644 index 0000000..80368d0 --- a/dev/null +++ b/qmake/include/private/qwidget_p.h | |||
@@ -0,0 +1,61 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of some Qt private functions. | ||
5 | ** | ||
6 | ** Created : 000903 | ||
7 | ** | ||
8 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the kernel module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition | ||
22 | ** licenses may use this file in accordance with the Qt Commercial License | ||
23 | ** Agreement provided with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QWIDGET_P_H | ||
39 | #define QWIDGET_P_H | ||
40 | |||
41 | |||
42 | // | ||
43 | // W A R N I N G | ||
44 | // ------------- | ||
45 | // | ||
46 | // This file is not part of the Qt API. It exists for the convenience | ||
47 | // of qapplication_*.cpp, qwidget*.cpp and qfiledialog.cpp. This header | ||
48 | // file may change from version to version without notice, or even be removed. | ||
49 | // | ||
50 | // We mean it. | ||
51 | // | ||
52 | // | ||
53 | |||
54 | #ifndef QT_H | ||
55 | #endif // QT_H | ||
56 | |||
57 | #if defined (Q_WS_X11) || defined (Q_WS_QWS) | ||
58 | extern int qt_widget_tlw_gravity; | ||
59 | #endif | ||
60 | |||
61 | #endif | ||
diff --git a/qmake/include/private/qwidgetinterface_p.h b/qmake/include/private/qwidgetinterface_p.h new file mode 100644 index 0000000..5b5776b --- a/dev/null +++ b/qmake/include/private/qwidgetinterface_p.h | |||
@@ -0,0 +1,111 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qt Designer. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #ifndef QWIDGETINTERFACE_H | ||
22 | #define QWIDGETINTERFACE_H | ||
23 | |||
24 | |||
25 | #ifndef QT_H | ||
26 | #include <private/qcom_p.h> | ||
27 | #include <qiconset.h> | ||
28 | #endif // QT_H | ||
29 | |||
30 | #ifndef QT_NO_WIDGETPLUGIN | ||
31 | |||
32 | // | ||
33 | // W A R N I N G | ||
34 | // ------------- | ||
35 | // | ||
36 | // This file is not part of the Qt API. It exists for the convenience | ||
37 | // of a number of Qt sources files. This header file may change from | ||
38 | // version to version without notice, or even be removed. | ||
39 | // | ||
40 | // We mean it. | ||
41 | // | ||
42 | // | ||
43 | |||
44 | class QWidget; | ||
45 | |||
46 | // {55184143-f18f-42c0-a8eb-71c01516019a} | ||
47 | #ifndef IID_QWidgetFactory | ||
48 | #define IID_QWidgetFactory QUuid( 0x55184143, 0xf18f, 0x42c0, 0xa8, 0xeb, 0x71, 0xc0, 0x15, 0x16, 0x1, 0x9a ) | ||
49 | #endif | ||
50 | |||
51 | /*! To add custom widgets to the Qt Designer, implement that interface | ||
52 | in your custom widget plugin. | ||
53 | |||
54 | You also have to implement the function featureList() (\sa | ||
55 | QFeatureListInterface) and return there all widgets (names of it) | ||
56 | which this interface provides. | ||
57 | */ | ||
58 | |||
59 | struct QWidgetFactoryInterface : public QFeatureListInterface | ||
60 | { | ||
61 | public: | ||
62 | |||
63 | /*! In the implementation create and return the widget \a widget | ||
64 | here, use \a parent and \a name when creating the widget */ | ||
65 | virtual QWidget* create( const QString &widget, QWidget* parent = 0, const char* name = 0 ) = 0; | ||
66 | |||
67 | /*! In the implementation return the name of the group of the | ||
68 | widget \a widget */ | ||
69 | virtual QString group( const QString &widget ) const = 0; | ||
70 | |||
71 | /*! In the implementation return the iconset, which should be used | ||
72 | in the Qt Designer menubar and toolbar to represent the widget | ||
73 | \a widget */ | ||
74 | virtual QIconSet iconSet( const QString &widget ) const = 0; | ||
75 | |||
76 | /*! In the implementation return the include file which is needed | ||
77 | for the widget \a widget in the generated code which uic | ||
78 | generates. */ | ||
79 | virtual QString includeFile( const QString &widget ) const = 0; | ||
80 | |||
81 | /*! In the implementation return the text which should be | ||
82 | displayed as tooltip for the widget \a widget */ | ||
83 | virtual QString toolTip( const QString &widget ) const = 0; | ||
84 | |||
85 | /*! In the implementation return the text which should be used for | ||
86 | what's this help for the widget \a widget. */ | ||
87 | virtual QString whatsThis( const QString &widget ) const = 0; | ||
88 | |||
89 | /*! In the implementation return TRUE here, of the \a widget | ||
90 | should be able to contain other widget in the Qt Designer, else | ||
91 | FALSE. */ | ||
92 | virtual bool isContainer( const QString &widget ) const = 0; | ||
93 | }; | ||
94 | |||
95 | #if CONTAINER_CUSTOM_WIDGETS | ||
96 | // {15976628-e3c3-47f4-b525-d124a3caf30e} | ||
97 | #ifndef IID_QWidgetContainer | ||
98 | #define IID_QWidgetContainer QUuid( 0x15976628, 0xe3c3, 0x47f4, 0xb5, 0x25, 0xd1, 0x24, 0xa3, 0xca, 0xf3, 0x0e ) | ||
99 | #endif | ||
100 | |||
101 | struct QWidgetContainerInterfacePrivate : public QUnknownInterface | ||
102 | { | ||
103 | public: | ||
104 | virtual QWidget *containerOfWidget( QWidget *widget ) const = 0; | ||
105 | virtual QWidgetList containersOf( QWidget *widget ) const = 0; | ||
106 | virtual bool isPassiveInteractor( QWidget *widget ) const = 0; | ||
107 | }; | ||
108 | #endif | ||
109 | |||
110 | #endif // QT_NO_WIDGETPLUGIN | ||
111 | #endif // QWIDGETINTERFACE_H | ||
diff --git a/qmake/include/private/qwidgetresizehandler_p.h b/qmake/include/private/qwidgetresizehandler_p.h new file mode 100644 index 0000000..ca229db --- a/dev/null +++ b/qmake/include/private/qwidgetresizehandler_p.h | |||
@@ -0,0 +1,113 @@ | |||
1 | /**************************************************************************** | ||
2 | ** $Id$ | ||
3 | ** | ||
4 | ** Definition of the QWidgetResizeHandler class | ||
5 | ** | ||
6 | ** Created : 001010 | ||
7 | ** | ||
8 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved. | ||
9 | ** | ||
10 | ** This file is part of the workspace module of the Qt GUI Toolkit. | ||
11 | ** | ||
12 | ** This file may be distributed under the terms of the Q Public License | ||
13 | ** as defined by Trolltech AS of Norway and appearing in the file | ||
14 | ** LICENSE.QPL included in the packaging of this file. | ||
15 | ** | ||
16 | ** This file may be distributed and/or modified under the terms of the | ||
17 | ** GNU General Public License version 2 as published by the Free Software | ||
18 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
19 | ** packaging of this file. | ||
20 | ** | ||
21 | ** Licensees holding valid Qt Enterprise Edition licenses may use this | ||
22 | ** file in accordance with the Qt Commercial License Agreement provided | ||
23 | ** with the Software. | ||
24 | ** | ||
25 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
26 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
27 | ** | ||
28 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for | ||
29 | ** information about Qt Commercial License Agreements. | ||
30 | ** See http://www.trolltech.com/qpl/ for QPL licensing information. | ||
31 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
32 | ** | ||
33 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
34 | ** not clear to you. | ||
35 | ** | ||
36 | **********************************************************************/ | ||
37 | |||
38 | #ifndef QWIDGETRESIZEHANDLER_H | ||
39 | #define QWIDGETRESIZEHANDLER_H | ||
40 | |||
41 | #ifndef QT_H | ||
42 | #include "qobject.h" | ||
43 | #endif // QT_H | ||
44 | #ifndef QT_NO_RESIZEHANDLER | ||
45 | class QMouseEvent; | ||
46 | class QKeyEvent; | ||
47 | |||
48 | class Q_EXPORT QWidgetResizeHandler : public QObject | ||
49 | { | ||
50 | Q_OBJECT | ||
51 | |||
52 | public: | ||
53 | QWidgetResizeHandler( QWidget *parent, QWidget *cw = 0, const char *name = 0 ); | ||
54 | void setActive( bool b ) { active = b; if ( !active ) setMouseCursor( Nowhere ); } | ||
55 | bool isActive() const { return active; } | ||
56 | void setMovingEnabled( bool b ) { moving = b; } | ||
57 | bool isMovingEnabled() const { return moving; } | ||
58 | |||
59 | bool isButtonDown() const { return buttonDown; } | ||
60 | |||
61 | void setExtraHeight( int h ) { extrahei = h; } | ||
62 | void setSizeProtection( bool b ) { sizeprotect = b; } | ||
63 | |||
64 | void doResize(); | ||
65 | void doMove(); | ||
66 | |||
67 | signals: | ||
68 | void activate(); | ||
69 | |||
70 | protected: | ||
71 | bool eventFilter( QObject *o, QEvent *e ); | ||
72 | void mouseMoveEvent( QMouseEvent *e ); | ||
73 | void keyPressEvent( QKeyEvent *e ); | ||
74 | |||
75 | private: | ||
76 | enum MousePosition { | ||
77 | Nowhere, | ||
78 | TopLeft, BottomRight, BottomLeft, TopRight, | ||
79 | Top, Bottom, Left, Right, | ||
80 | Center | ||
81 | }; | ||
82 | |||
83 | QWidget *widget; | ||
84 | QWidget *childWidget; | ||
85 | QPoint moveOffset; | ||
86 | QPoint invertedMoveOffset; | ||
87 | MousePosition mode; | ||
88 | int extrahei; | ||
89 | int range; | ||
90 | uint buttonDown :1; | ||
91 | uint moveResizeMode :1; | ||
92 | uint active :1; | ||
93 | uint sizeprotect :1; | ||
94 | uint moving :1; | ||
95 | |||
96 | void setMouseCursor( MousePosition m ); | ||
97 | bool isMove() const { | ||
98 | return moveResizeMode && mode == Center; | ||
99 | } | ||
100 | bool isResize() const { | ||
101 | return moveResizeMode && !isMove(); | ||
102 | } | ||
103 | |||
104 | private:// Disabled copy constructor and operator= | ||
105 | #if defined(Q_DISABLE_COPY) | ||
106 | QWidgetResizeHandler( const QWidgetResizeHandler & ); | ||
107 | QWidgetResizeHandler& operator=( const QWidgetResizeHandler & ); | ||
108 | #endif | ||
109 | |||
110 | }; | ||
111 | |||
112 | #endif //QT_NO_RESIZEHANDLER | ||
113 | #endif | ||