| 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/qobject.h:1 --> | 
|---|
| 3 | <html> | 
|---|
| 4 | <head> | 
|---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> | 
|---|
| 6 | <title>qobject.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>qobject.h</h1> | 
|---|
| 33 |  | 
|---|
| 34 | <p>This is the verbatim text of the qobject.h include file. It is provided only for illustration; the copyright remains with Trolltech. | 
|---|
| 35 | <hr> | 
|---|
| 36 | <pre> | 
|---|
| 37 | /**************************************************************************** | 
|---|
| 38 | ** $Id: qobject-h.html 2051 2007-02-21 10:04:20Z chehrlic $ | 
|---|
| 39 | ** | 
|---|
| 40 | ** Definition of QObject class | 
|---|
| 41 | ** | 
|---|
| 42 | ** Created : 930418 | 
|---|
| 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 QOBJECT_H | 
|---|
| 75 | #define QOBJECT_H | 
|---|
| 76 |  | 
|---|
| 77 | #ifndef QT_H | 
|---|
| 78 | #include "qobjectdefs.h" | 
|---|
| 79 | #include "qwindowdefs.h" | 
|---|
| 80 | #include "qstring.h" | 
|---|
| 81 | #include "qevent.h" | 
|---|
| 82 | #include "qnamespace.h" | 
|---|
| 83 | #endif // QT_H | 
|---|
| 84 |  | 
|---|
| 85 | #define QT_TR_NOOP(x) (x) | 
|---|
| 86 | #define QT_TRANSLATE_NOOP(scope,x) (x) | 
|---|
| 87 |  | 
|---|
| 88 | class QMetaObject; | 
|---|
| 89 | class QVariant; | 
|---|
| 90 | class QMetaProperty; | 
|---|
| 91 | class QPostEventList; | 
|---|
| 92 | class QSenderObjectList; | 
|---|
| 93 | class QObjectPrivate; | 
|---|
| 94 | #ifndef QT_NO_USERDATA | 
|---|
| 95 | class QObjectUserData; | 
|---|
| 96 | #endif | 
|---|
| 97 | struct QUObject; | 
|---|
| 98 |  | 
|---|
| 99 | class Q_EXPORT QObject: public Qt | 
|---|
| 100 | { | 
|---|
| 101 | Q_OBJECT | 
|---|
| 102 | Q_PROPERTY( QCString name READ name WRITE setName ) | 
|---|
| 103 |  | 
|---|
| 104 | public: | 
|---|
| 105 | QObject( QObject *parent=0, const char *name=0 ); | 
|---|
| 106 | virtual ~QObject(); | 
|---|
| 107 |  | 
|---|
| 108 | #ifdef Q_QDOC | 
|---|
| 109 | virtual const char *className() const; | 
|---|
| 110 | static QString tr( const char *, const char * ); | 
|---|
| 111 | static QString trUtf8( const char *, const char * ); | 
|---|
| 112 | virtual QMetaObject *metaObject() const; | 
|---|
| 113 | #endif | 
|---|
| 114 |  | 
|---|
| 115 | virtual bool event( QEvent * ); | 
|---|
| 116 | virtual bool eventFilter( QObject *, QEvent * ); | 
|---|
| 117 |  | 
|---|
| 118 | bool         isA( const char * )     const; | 
|---|
| 119 | bool         inherits( const char * ) const; | 
|---|
| 120 |  | 
|---|
| 121 | const char  *name() const; | 
|---|
| 122 | const char  *name( const char * defaultName ) const; | 
|---|
| 123 |  | 
|---|
| 124 | virtual void setName( const char *name ); | 
|---|
| 125 | bool         isWidgetType()   const { return isWidget; } | 
|---|
| 126 | bool         highPriority()   const { return FALSE; } | 
|---|
| 127 |  | 
|---|
| 128 | bool         signalsBlocked()  const { return blockSig; } | 
|---|
| 129 | void         blockSignals( bool b ); | 
|---|
| 130 |  | 
|---|
| 131 | int          startTimer( int interval ); | 
|---|
| 132 | void         killTimer( int id ); | 
|---|
| 133 | void         killTimers(); | 
|---|
| 134 |  | 
|---|
| 135 | QObject           *child( const char *objName, const char *inheritsClass = 0, bool recursiveSearch = TRUE ); //### const in 4.0 | 
|---|
| 136 | const QObjectList *children() const { return childObjects; } | 
|---|
| 137 |  | 
|---|
| 138 | static const QObjectList *objectTrees(); | 
|---|
| 139 |  | 
|---|
| 140 | QObjectList       *queryList( const char *inheritsClass = 0, | 
|---|
| 141 | const char *objName = 0, | 
|---|
| 142 | bool regexpMatch = TRUE, | 
|---|
| 143 | bool recursiveSearch = TRUE ) const; | 
|---|
| 144 |  | 
|---|
| 145 | virtual void insertChild( QObject * ); | 
|---|
| 146 | virtual void removeChild( QObject * ); | 
|---|
| 147 |  | 
|---|
| 148 | void         installEventFilter( const QObject * ); | 
|---|
| 149 | void         removeEventFilter( const QObject * ); | 
|---|
| 150 |  | 
|---|
| 151 | static bool  connect( const QObject *sender, const char *signal, | 
|---|
| 152 | const QObject *receiver, const char *member ); | 
|---|
| 153 | bool         connect( const QObject *sender, const char *signal, | 
|---|
| 154 | const char *member ) const; | 
|---|
| 155 | static bool  disconnect( const QObject *sender, const char *signal, | 
|---|
| 156 | const QObject *receiver, const char *member ); | 
|---|
| 157 | bool         disconnect( const char *signal=0, | 
|---|
| 158 | const QObject *receiver=0, const char *member=0 ); | 
|---|
| 159 | bool         disconnect( const QObject *receiver, const char *member=0 ); | 
|---|
| 160 | static void          connectInternal( const QObject *sender, int signal_index, | 
|---|
| 161 | const QObject *receiver, int membcode, int member_index ); | 
|---|
| 162 | static bool          disconnectInternal( const QObject *sender, int signal_index, | 
|---|
| 163 | const QObject *receiver, int membcode, int member_index ); | 
|---|
| 164 |  | 
|---|
| 165 | void         dumpObjectTree(); | 
|---|
| 166 | void         dumpObjectInfo(); | 
|---|
| 167 |  | 
|---|
| 168 | #ifndef QT_NO_PROPERTIES | 
|---|
| 169 | virtual bool setProperty( const char *name, const QVariant& value ); | 
|---|
| 170 | virtual QVariant property( const char *name ) const; | 
|---|
| 171 | #endif // QT_NO_PROPERTIES | 
|---|
| 172 | #ifdef QT_NO_TRANSLATION | 
|---|
| 173 | static QString tr( const char *sourceText, const char * = 0); | 
|---|
| 174 | #ifndef QT_NO_TEXTCODEC | 
|---|
| 175 | static QString trUtf8( const char *sourceText, const char * = 0); | 
|---|
| 176 | #endif | 
|---|
| 177 | #endif //QT_NO_TRANSLATION | 
|---|
| 178 |  | 
|---|
| 179 | #ifndef QT_NO_USERDATA | 
|---|
| 180 | static uint registerUserData(); | 
|---|
| 181 | void setUserData( uint id, QObjectUserData* data); | 
|---|
| 182 | QObjectUserData* userData( uint id ) const; | 
|---|
| 183 | #endif // QT_NO_USERDATA | 
|---|
| 184 |  | 
|---|
| 185 | signals: | 
|---|
| 186 | void         destroyed(); | 
|---|
| 187 | void         destroyed( QObject* obj ); | 
|---|
| 188 |  | 
|---|
| 189 | public: | 
|---|
| 190 | QObject     *parent() const { return parentObj; } | 
|---|
| 191 |  | 
|---|
| 192 | public slots: | 
|---|
| 193 | void        deleteLater(); | 
|---|
| 194 |  | 
|---|
| 195 | private slots: | 
|---|
| 196 | void         cleanupEventFilter( QObject* ); | 
|---|
| 197 |  | 
|---|
| 198 | protected: | 
|---|
| 199 | bool        activate_filters( QEvent * ); | 
|---|
| 200 | QConnectionList *receivers( const char* signal ) const; | 
|---|
| 201 | QConnectionList *receivers( int signal ) const; | 
|---|
| 202 | void        activate_signal( int signal ); | 
|---|
| 203 | void        activate_signal( int signal, int ); | 
|---|
| 204 | void        activate_signal( int signal, double ); | 
|---|
| 205 | void        activate_signal( int signal, QString ); | 
|---|
| 206 | void        activate_signal_bool( int signal, bool ); | 
|---|
| 207 | void        activate_signal( QConnectionList *clist, QUObject *o ); | 
|---|
| 208 |  | 
|---|
| 209 | const QObject *sender(); | 
|---|
| 210 |  | 
|---|
| 211 | virtual void timerEvent( QTimerEvent * ); | 
|---|
| 212 | virtual void childEvent( QChildEvent * ); | 
|---|
| 213 | virtual void customEvent( QCustomEvent * ); | 
|---|
| 214 |  | 
|---|
| 215 | virtual void connectNotify( const char *signal ); | 
|---|
| 216 | virtual void disconnectNotify( const char *signal ); | 
|---|
| 217 | virtual bool checkConnectArgs( const char *signal, const QObject *receiver, | 
|---|
| 218 | const char *member ); | 
|---|
| 219 | static QCString normalizeSignalSlot( const char *signalSlot ); | 
|---|
| 220 |  | 
|---|
| 221 | private: | 
|---|
| 222 | uint        isSignal   : 1; | 
|---|
| 223 | uint        isWidget   : 1; | 
|---|
| 224 | uint        pendTimer  : 1; | 
|---|
| 225 | uint        blockSig   : 1; | 
|---|
| 226 | uint        wasDeleted : 1; | 
|---|
| 227 | uint        isTree : 1; | 
|---|
| 228 |  | 
|---|
| 229 | const char  *objname; | 
|---|
| 230 | QObject     *parentObj; | 
|---|
| 231 | QObjectList *childObjects; | 
|---|
| 232 | QSignalVec *connections; | 
|---|
| 233 | QSenderObjectList *senderObjects; | 
|---|
| 234 | QObjectList *eventFilters; | 
|---|
| 235 | QPostEventList *postedEvents; | 
|---|
| 236 | QObjectPrivate* d; | 
|---|
| 237 |  | 
|---|
| 238 | static QMetaObject* staticQtMetaObject(); | 
|---|
| 239 |  | 
|---|
| 240 | friend class QApplication; | 
|---|
| 241 | friend class QBaseApplication; | 
|---|
| 242 | friend class QWidget; | 
|---|
| 243 | friend class QSignal; | 
|---|
| 244 |  | 
|---|
| 245 | private:        // Disabled copy constructor and operator= | 
|---|
| 246 | #if defined(Q_DISABLE_COPY) | 
|---|
| 247 | QObject( const QObject & ); | 
|---|
| 248 | QObject &operator=( const QObject & ); | 
|---|
| 249 | #endif | 
|---|
| 250 | }; | 
|---|
| 251 |  | 
|---|
| 252 |  | 
|---|
| 253 | #ifndef QT_NO_USERDATA | 
|---|
| 254 | class Q_EXPORT QObjectUserData { | 
|---|
| 255 | public: | 
|---|
| 256 | virtual ~QObjectUserData(); | 
|---|
| 257 | }; | 
|---|
| 258 | #endif | 
|---|
| 259 |  | 
|---|
| 260 |  | 
|---|
| 261 | inline bool QObject::connect( const QObject *sender, const char *signal, | 
|---|
| 262 | const char *member ) const | 
|---|
| 263 | { | 
|---|
| 264 | return connect( sender, signal, this, member ); | 
|---|
| 265 | } | 
|---|
| 266 |  | 
|---|
| 267 |  | 
|---|
| 268 | inline bool QObject::disconnect( const char *signal, | 
|---|
| 269 | const QObject *receiver, const char *member ) | 
|---|
| 270 | { | 
|---|
| 271 | return disconnect( this, signal, receiver, member ); | 
|---|
| 272 | } | 
|---|
| 273 |  | 
|---|
| 274 |  | 
|---|
| 275 | inline bool QObject::disconnect( const QObject *receiver, const char *member ) | 
|---|
| 276 | { | 
|---|
| 277 | return disconnect( this, 0, receiver, member ); | 
|---|
| 278 | } | 
|---|
| 279 |  | 
|---|
| 280 |  | 
|---|
| 281 | #ifdef QT_NO_TRANSLATION | 
|---|
| 282 | inline QString QObject::tr( const char *sourceText, const char * ) { | 
|---|
| 283 | return QString::fromLatin1( sourceText ); | 
|---|
| 284 | } | 
|---|
| 285 | #ifndef QT_NO_TEXTCODEC | 
|---|
| 286 | inline QString QObject::trUtf8( const char *sourceText, const char * ) { | 
|---|
| 287 | return QString::fromUtf8( sourceText ); | 
|---|
| 288 | } | 
|---|
| 289 | #endif | 
|---|
| 290 | #endif //QT_NO_TRANSLATION | 
|---|
| 291 |  | 
|---|
| 292 |  | 
|---|
| 293 | #define Q_DEFINED_QOBJECT | 
|---|
| 294 | #include "qwinexport.h" | 
|---|
| 295 | #endif // QOBJECT_H | 
|---|
| 296 | </pre> | 
|---|
| 297 | <!-- eof --> | 
|---|
| 298 | <p><address><hr><div align=center> | 
|---|
| 299 | <table width=100% cellspacing=0 border=0><tr> | 
|---|
| 300 | <td>Copyright © 2007 | 
|---|
| 301 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a> | 
|---|
| 302 | <td align=right><div align=right>Qt 3.3.8</div> | 
|---|
| 303 | </table></div></address></body> | 
|---|
| 304 | </html> | 
|---|