1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/include/qmetaobject.h:1 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>qmetaobject.h Include File</title>
|
---|
7 | <style type="text/css"><!--
|
---|
8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
9 | a:link { color: #004faf; text-decoration: none }
|
---|
10 | a:visited { color: #672967; text-decoration: none }
|
---|
11 | body { background: #ffffff; color: black; }
|
---|
12 | --></style>
|
---|
13 | </head>
|
---|
14 | <body>
|
---|
15 |
|
---|
16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
17 | <tr bgcolor="#E5E5E5">
|
---|
18 | <td valign=center>
|
---|
19 | <a href="index.html">
|
---|
20 | <font color="#004faf">Home</font></a>
|
---|
21 | | <a href="classes.html">
|
---|
22 | <font color="#004faf">All Classes</font></a>
|
---|
23 | | <a href="mainclasses.html">
|
---|
24 | <font color="#004faf">Main Classes</font></a>
|
---|
25 | | <a href="annotated.html">
|
---|
26 | <font color="#004faf">Annotated</font></a>
|
---|
27 | | <a href="groups.html">
|
---|
28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
29 | | <a href="functions.html">
|
---|
30 | <font color="#004faf">Functions</font></a>
|
---|
31 | </td>
|
---|
32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>qmetaobject.h</h1>
|
---|
33 |
|
---|
34 | <p>This is the verbatim text of the qmetaobject.h include file. It is provided only for illustration; the copyright remains with Trolltech.
|
---|
35 | <hr>
|
---|
36 | <pre>
|
---|
37 | /****************************************************************************
|
---|
38 | ** $Id: qmetaobject-h.html 2051 2007-02-21 10:04:20Z chehrlic $
|
---|
39 | **
|
---|
40 | ** Definition of QMetaObject class
|
---|
41 | **
|
---|
42 | ** Created : 930419
|
---|
43 | **
|
---|
44 | ** Copyright (C) 1992-2007 Trolltech ASA. All rights reserved.
|
---|
45 | **
|
---|
46 | ** This file is part of the kernel module of the Qt GUI Toolkit.
|
---|
47 | **
|
---|
48 | ** This file may be distributed under the terms of the Q Public License
|
---|
49 | ** as defined by Trolltech ASA of Norway and appearing in the file
|
---|
50 | ** LICENSE.QPL included in the packaging of this file.
|
---|
51 | **
|
---|
52 | ** This file may be distributed and/or modified under the terms of the
|
---|
53 | ** GNU General Public License version 2 as published by the Free Software
|
---|
54 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
55 | ** packaging of this file.
|
---|
56 | **
|
---|
57 | ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
|
---|
58 | ** licenses may use this file in accordance with the Qt Commercial License
|
---|
59 | ** Agreement provided with the Software.
|
---|
60 | **
|
---|
61 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
---|
62 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
---|
63 | **
|
---|
64 | ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for
|
---|
65 | ** information about Qt Commercial License Agreements.
|
---|
66 | ** See http://www.trolltech.com/qpl/ for QPL licensing information.
|
---|
67 | ** See http://www.trolltech.com/gpl/ for GPL licensing information.
|
---|
68 | **
|
---|
69 | ** Contact info@trolltech.com if any conditions of this licensing are
|
---|
70 | ** not clear to you.
|
---|
71 | **
|
---|
72 | **********************************************************************/
|
---|
73 |
|
---|
74 | #ifndef QMETAOBJECT_H
|
---|
75 | #define QMETAOBJECT_H
|
---|
76 |
|
---|
77 | #ifndef QT_H
|
---|
78 | #include "qconnection.h"
|
---|
79 | #include "qstrlist.h"
|
---|
80 | #endif // QT_H
|
---|
81 |
|
---|
82 | #ifndef Q_MOC_OUTPUT_REVISION
|
---|
83 | #define Q_MOC_OUTPUT_REVISION 26
|
---|
84 | #endif
|
---|
85 |
|
---|
86 | class QObject;
|
---|
87 | struct QUMethod;
|
---|
88 | class QMetaObjectPrivate;
|
---|
89 |
|
---|
90 | struct QMetaData // - member function meta data
|
---|
91 | { // for signal and slots
|
---|
92 | const char *name; // - member name
|
---|
93 | const QUMethod* method; // - detailed method description
|
---|
94 | enum Access { Private, Protected, Public };
|
---|
95 | Access access; // - access permission
|
---|
96 | };
|
---|
97 |
|
---|
98 | #ifndef QT_NO_PROPERTIES
|
---|
99 | struct QMetaEnum // enumerator meta data
|
---|
100 | { // for properties
|
---|
101 | const char *name; // - enumerator name
|
---|
102 | uint count; // - number of values
|
---|
103 | struct Item // - a name/value pair
|
---|
104 | {
|
---|
105 | const char *key;
|
---|
106 | int value;
|
---|
107 | };
|
---|
108 | const Item *items; // - the name/value pairs
|
---|
109 | bool set; // whether enum has to be treated as a set
|
---|
110 | };
|
---|
111 | #endif
|
---|
112 |
|
---|
113 | #ifndef QT_NO_PROPERTIES
|
---|
114 |
|
---|
115 | class Q_EXPORT QMetaProperty // property meta data
|
---|
116 | {
|
---|
117 | public:
|
---|
118 | const char* type() const { return t; } // type of the property
|
---|
119 | const char* name() const { return n; } // name of the property
|
---|
120 |
|
---|
121 | bool writable() const;
|
---|
122 | bool isValid() const;
|
---|
123 |
|
---|
124 | bool isSetType() const;
|
---|
125 | bool isEnumType() const;
|
---|
126 | QStrList enumKeys() const; // enumeration names
|
---|
127 |
|
---|
128 | int keyToValue( const char* key ) const; // enum and set conversion functions
|
---|
129 | const char* valueToKey( int value ) const;
|
---|
130 | int keysToValue( const QStrList& keys ) const;
|
---|
131 | QStrList valueToKeys( int value ) const;
|
---|
132 |
|
---|
133 | bool designable( QObject* = 0 ) const;
|
---|
134 | bool scriptable( QObject* = 0 ) const;
|
---|
135 | bool stored( QObject* = 0 ) const;
|
---|
136 |
|
---|
137 | bool reset( QObject* ) const;
|
---|
138 |
|
---|
139 | const char* t; // internal
|
---|
140 | const char* n; // internal
|
---|
141 |
|
---|
142 | enum Flags {
|
---|
143 | Invalid = 0x00000000,
|
---|
144 | Readable = 0x00000001,
|
---|
145 | Writable = 0x00000002,
|
---|
146 | EnumOrSet = 0x00000004,
|
---|
147 | UnresolvedEnum = 0x00000008,
|
---|
148 | StdSet = 0x00000100,
|
---|
149 | Override = 0x00000200
|
---|
150 | };
|
---|
151 |
|
---|
152 | uint flags; // internal
|
---|
153 | bool testFlags( uint f ) const; // internal
|
---|
154 | bool stdSet() const; // internal
|
---|
155 | int id() const; // internal
|
---|
156 |
|
---|
157 | QMetaObject** meta; // internal
|
---|
158 |
|
---|
159 | const QMetaEnum* enumData; // internal
|
---|
160 | int _id; // internal
|
---|
161 | void clear(); // internal
|
---|
162 | };
|
---|
163 |
|
---|
164 | inline bool QMetaProperty::testFlags( uint f ) const
|
---|
165 | { return (flags & (uint)f) != (uint)0; }
|
---|
166 |
|
---|
167 | #endif // QT_NO_PROPERTIES
|
---|
168 |
|
---|
169 | struct QClassInfo // class info meta data
|
---|
170 | {
|
---|
171 | const char* name; // - name of the info
|
---|
172 | const char* value; // - value of the info
|
---|
173 | };
|
---|
174 |
|
---|
175 | class Q_EXPORT QMetaObject // meta object class
|
---|
176 | {
|
---|
177 | public:
|
---|
178 | QMetaObject( const char * const class_name, QMetaObject *superclass,
|
---|
179 | const QMetaData * const slot_data, int n_slots,
|
---|
180 | const QMetaData * const signal_data, int n_signals,
|
---|
181 | #ifndef QT_NO_PROPERTIES
|
---|
182 | const QMetaProperty *const prop_data, int n_props,
|
---|
183 | const QMetaEnum *const enum_data, int n_enums,
|
---|
184 | #endif
|
---|
185 | const QClassInfo *const class_info, int n_info );
|
---|
186 |
|
---|
187 | #ifndef QT_NO_PROPERTIES
|
---|
188 | QMetaObject( const char * const class_name, QMetaObject *superclass,
|
---|
189 | const QMetaData * const slot_data, int n_slots,
|
---|
190 | const QMetaData * const signal_data, int n_signals,
|
---|
191 | const QMetaProperty *const prop_data, int n_props,
|
---|
192 | const QMetaEnum *const enum_data, int n_enums,
|
---|
193 | bool (*qt_static_property)(QObject*, int, int, QVariant*),
|
---|
194 | const QClassInfo *const class_info, int n_info );
|
---|
195 | #endif
|
---|
196 |
|
---|
197 |
|
---|
198 | virtual ~QMetaObject();
|
---|
199 |
|
---|
200 | const char *className() const { return classname; }
|
---|
201 | const char *superClassName() const { return superclassname; }
|
---|
202 |
|
---|
203 | QMetaObject *superClass() const { return superclass; }
|
---|
204 |
|
---|
205 | bool inherits( const char* clname ) const;
|
---|
206 |
|
---|
207 | int numSlots( bool super = FALSE ) const;
|
---|
208 | int numSignals( bool super = FALSE ) const;
|
---|
209 |
|
---|
210 | int findSlot( const char *, bool super = FALSE ) const;
|
---|
211 | int findSignal( const char *, bool super = FALSE ) const;
|
---|
212 |
|
---|
213 | const QMetaData *slot( int index, bool super = FALSE ) const;
|
---|
214 | const QMetaData *signal( int index, bool super = FALSE ) const;
|
---|
215 |
|
---|
216 | QStrList slotNames( bool super = FALSE ) const;
|
---|
217 | QStrList signalNames( bool super = FALSE ) const;
|
---|
218 |
|
---|
219 | int slotOffset() const;
|
---|
220 | int signalOffset() const;
|
---|
221 | int propertyOffset() const;
|
---|
222 |
|
---|
223 | int numClassInfo( bool super = FALSE ) const;
|
---|
224 | const QClassInfo *classInfo( int index, bool super = FALSE ) const;
|
---|
225 | const char *classInfo( const char* name, bool super = FALSE ) const;
|
---|
226 |
|
---|
227 | #ifndef QT_NO_PROPERTIES
|
---|
228 | const QMetaProperty *property( int index, bool super = FALSE ) const;
|
---|
229 | int findProperty( const char *name, bool super = FALSE ) const;
|
---|
230 | int indexOfProperty( const QMetaProperty*, bool super = FALSE ) const;
|
---|
231 | const QMetaProperty* resolveProperty( const QMetaProperty* ) const;
|
---|
232 | int resolveProperty( int ) const;
|
---|
233 | QStrList propertyNames( bool super = FALSE ) const;
|
---|
234 | int numProperties( bool super = FALSE ) const;
|
---|
235 | #endif
|
---|
236 |
|
---|
237 | // static wrappers around constructors, necessary to work around a
|
---|
238 | // Windows-DLL limitation: objects can only be deleted within a
|
---|
239 | // DLL if they were actually created within that DLL.
|
---|
240 | static QMetaObject *new_metaobject( const char *, QMetaObject *,
|
---|
241 | const QMetaData *const, int,
|
---|
242 | const QMetaData *const, int,
|
---|
243 | #ifndef QT_NO_PROPERTIES
|
---|
244 | const QMetaProperty *const prop_data, int n_props,
|
---|
245 | const QMetaEnum *const enum_data, int n_enums,
|
---|
246 | #endif
|
---|
247 | const QClassInfo *const class_info, int n_info );
|
---|
248 | #ifndef QT_NO_PROPERTIES
|
---|
249 | static QMetaObject *new_metaobject( const char *, QMetaObject *,
|
---|
250 | const QMetaData *const, int,
|
---|
251 | const QMetaData *const, int,
|
---|
252 | const QMetaProperty *const prop_data, int n_props,
|
---|
253 | const QMetaEnum *const enum_data, int n_enums,
|
---|
254 | bool (*qt_static_property)(QObject*, int, int, QVariant*),
|
---|
255 | const QClassInfo *const class_info, int n_info );
|
---|
256 | QStrList enumeratorNames( bool super = FALSE ) const;
|
---|
257 | int numEnumerators( bool super = FALSE ) const;
|
---|
258 | const QMetaEnum *enumerator( const char* name, bool super = FALSE ) const;
|
---|
259 | #endif
|
---|
260 |
|
---|
261 | static QMetaObject *metaObject( const char *class_name );
|
---|
262 | static bool hasMetaObject( const char *class_name );
|
---|
263 |
|
---|
264 | private:
|
---|
265 | QMemberDict *init( const QMetaData *, int );
|
---|
266 |
|
---|
267 | const char *classname; // class name
|
---|
268 | const char *superclassname; // super class name
|
---|
269 | QMetaObject *superclass; // super class meta object
|
---|
270 | QMetaObjectPrivate *d; // private data for...
|
---|
271 | void *reserved; // ...binary compatibility
|
---|
272 | const QMetaData *slotData; // slot meta data
|
---|
273 | QMemberDict *slotDict; // slot dictionary
|
---|
274 | const QMetaData *signalData; // signal meta data
|
---|
275 | QMemberDict *signalDict; // signal dictionary
|
---|
276 | int signaloffset;
|
---|
277 | int slotoffset;
|
---|
278 | #ifndef QT_NO_PROPERTIES
|
---|
279 | int propertyoffset;
|
---|
280 | public:
|
---|
281 | bool qt_static_property( QObject* o, int id, int f, QVariant* v);
|
---|
282 | private:
|
---|
283 | friend class QMetaProperty;
|
---|
284 | #endif
|
---|
285 |
|
---|
286 | private: // Disabled copy constructor and operator=
|
---|
287 | #if defined(Q_DISABLE_COPY)
|
---|
288 | QMetaObject( const QMetaObject & );
|
---|
289 | QMetaObject &operator=( const QMetaObject & );
|
---|
290 | #endif
|
---|
291 | };
|
---|
292 |
|
---|
293 | inline int QMetaObject::slotOffset() const
|
---|
294 | { return slotoffset; }
|
---|
295 |
|
---|
296 | inline int QMetaObject::signalOffset() const
|
---|
297 | { return signaloffset; }
|
---|
298 |
|
---|
299 | #ifndef QT_NO_PROPERTIES
|
---|
300 | inline int QMetaObject::propertyOffset() const
|
---|
301 | { return propertyoffset; }
|
---|
302 | #endif
|
---|
303 |
|
---|
304 | typedef QMetaObject *(*QtStaticMetaObjectFunction)();
|
---|
305 |
|
---|
306 | class Q_EXPORT QMetaObjectCleanUp
|
---|
307 | {
|
---|
308 | public:
|
---|
309 | QMetaObjectCleanUp( const char *mo_name, QtStaticMetaObjectFunction );
|
---|
310 | QMetaObjectCleanUp();
|
---|
311 | ~QMetaObjectCleanUp();
|
---|
312 |
|
---|
313 | void setMetaObject( QMetaObject *&mo );
|
---|
314 |
|
---|
315 | private:
|
---|
316 | QMetaObject **metaObject;
|
---|
317 | };
|
---|
318 |
|
---|
319 | #endif // QMETAOBJECT_H
|
---|
320 | </pre>
|
---|
321 | <!-- eof -->
|
---|
322 | <p><address><hr><div align=center>
|
---|
323 | <table width=100% cellspacing=0 border=0><tr>
|
---|
324 | <td>Copyright © 2007
|
---|
325 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
326 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
327 | </table></div></address></body>
|
---|
328 | </html>
|
---|