1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex,noarchive"><title>
Qt Toolkit - qobject.h include file
</title><style type="text/css"><!--
h3.fn,span.fn { margin-left: 15%; text-indent: -15%; }
a:link { text-decoration: none; }
--></style>
</head><body bgcolor="#ffffff">
<a href=index.html><img width=122 height=65 src=qtlogo.jpg alt="Qt logo" align=left border=0></a>
<center><img src=dochead.gif width=472 height=27></center>
<br clear=all>
<h1 align=center>qobject.h</h1><br clear="all">
This is the verbatim text of the qobject.h include file. It is is
provided only for illustration; the copyright
remains with Troll Tech.
<hr>
<pre>
/****************************************************************************
** $Id: qobject.h,v 2.11.2.3 1998/10/19 12:08:19 eiriken Exp $
**
** Definition of QObject class
**
** Created : 930418
**
** Copyright (C) 1992-1999 Troll Tech AS. All rights reserved.
**
** This file is part of Qt Free Edition, version 1.45.
**
** See the file LICENSE included in the distribution for the usage
** and distribution terms, or http://www.troll.no/free-license.html.
**
** IMPORTANT NOTE: You may NOT copy this file or any part of it into
** your own programs or libraries.
**
** Please see http://www.troll.no/pricing.html for information about
** Qt Professional Edition, which is this same library but with a
** license which allows creation of commercial/proprietary software.
**
*****************************************************************************/
#ifndef QOBJECT_H
#define QOBJECT_H
#ifndef QT_H
#include "qobjectdefs.h"
#include "qstring.h"
#include "qevent.h"
#endif // QT_H
class Q_EXPORT QObject // base class for Q objects
{
public:
QObject( QObject *parent=0, const char *name=0 );
virtual ~QObject();
virtual bool event( QEvent * );
virtual bool eventFilter( QObject *, QEvent * );
const char * tr( const char * ) const;
virtual QMetaObject *metaObject() const { return metaObj; }
virtual const char *className() const;
bool isA( const char * ) const;
bool inherits( const char * ) const;
const char *name() const { return objname; }
const char *name( const char * defaultName ) const { return objname
? objname
: defaultName; }
void setName( const char *name );
bool isWidgetType() const { return isWidget; }
bool highPriority() const { return hiPriority; }
bool signalsBlocked() const { return blockSig; }
void blockSignals( bool b );
int startTimer( int interval );
void killTimer( int id );
void killTimers();
const QObjectList *children() const { return childObjects; }
QObjectList *queryList( const char *inheritsClass = 0,
const char *objName = 0,
bool regexpMatch = TRUE,
bool recursiveSearch = TRUE );
void insertChild( QObject * );
void removeChild( QObject * );
void installEventFilter( const QObject * );
void removeEventFilter( const QObject * );
static bool connect( const QObject *sender, const char *signal,
const QObject *receiver, const char *member );
bool connect( const QObject *sender, const char *signal,
const char *member ) const;
static bool disconnect( const QObject *sender, const char *signal,
const QObject *receiver, const char *member );
bool disconnect( const char *signal=0,
const QObject *receiver=0, const char *member=0 );
bool disconnect( const QObject *receiver, const char *member=0 );
void dumpObjectTree();
void dumpObjectInfo();
signals:
void destroyed();
public:
QObject *parent() const { return parentObj; }
protected:
bool activate_filters( QEvent * );
QConnectionList *receivers( const char *signal ) const;
void activate_signal( const char *signal );
void activate_signal( const char *signal, short );
void activate_signal( const char *signal, int );
void activate_signal( const char *signal, long );
void activate_signal( const char *signal, const char * );
const QObject *sender();
virtual void initMetaObject();
virtual void timerEvent( QTimerEvent * );
virtual void connectNotify( const char *signal );
virtual void disconnectNotify( const char *signal );
virtual bool checkConnectArgs( const char *signal, const QObject *receiver,
const char *member );
static void badSuperclassWarning( const char *className,
const char *superclassName );
uint isSignal : 1;
uint isWidget : 1;
uint hiPriority : 1;
uint pendTimer : 1;
uint pendEvent : 1;
uint blockSig : 1;
private slots:
void cleanupEventFilter();
private:
QMetaObject *queryMetaObject() const;
static QMetaObject *metaObj;
char *objname;
QObject *parentObj;
QObjectList *childObjects;
QSignalDict *connections;
QObjectList *senderObjects;
QObjectList *eventFilters;
QObject *sigSender;
friend class QApplication;
friend class QWidget;
friend class QSignal;
friend class QSenderObject;
private: // Disabled copy constructor and operator=
#if defined(Q_DISABLE_COPY)
QObject( const QObject & );
QObject &operator=( const QObject & );
#endif
};
inline bool QObject::connect( const QObject *sender, const char *signal,
const char *member ) const
{
return connect( sender, signal, this, member );
}
inline bool QObject::disconnect( const char *signal,
const QObject *receiver, const char *member )
{
return disconnect( this, signal, receiver, member );
}
inline bool QObject::disconnect( const QObject *receiver, const char *member )
{
return disconnect( this, 0, receiver, member );
}
inline const QObject *QObject::sender()
{
return sigSender;
}
class Q_EXPORT QSenderObject : public QObject // object for sending signals
{
public:
void setSender( QObject *s ) { sigSender=s; }
};
#endif // QOBJECT_H
</pre>
<p><address><hr><div align="center">
<table width="100%" cellspacing="0" border="0"><tr>
<td>Copyright 1999 Troll Tech<td><a href="trademarks.html">Trademarks</a>
<td align="right"><div align="right">Qt version 1.45</div>
</table></div></address></body></html>
|