// This is the SIP interface definition for QObject.
//
// Copyright (c) 2003
// 	Riverbank Computing Limited <info@riverbankcomputing.co.uk>
// 
// This file is part of PyQt.
// 
// This copy of PyQt is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by the Free
// Software Foundation; either version 2, or (at your option) any later
// version.
// 
// PyQt is supplied in the hope that it will be useful, but WITHOUT ANY
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
// FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
// details.
// 
// You should have received a copy of the GNU General Public License along with
// PyQt; see the file LICENSE.  If not, write to the Free Software Foundation,
// Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


%ExportedDoc
<Sect2><Title>QObject</Title>
<FuncSynopsis>
	<FuncDef>bool <Function>disconnect</Function></FuncDef>
	<ParamDef>const QObject *<Parameter>receiver</Parameter></ParamDef>
	<ParamDef>const char *<Parameter>member</Parameter> = 0</ParamDef>
</FuncSynopsis>
<Para>
Not yet implemented.
</Para>

<FuncSynopsis>
	<FuncDef>bool <Function>disconnect</Function></FuncDef>
	<ParamDef>const char *<Parameter>signal</Parameter> = 0</ParamDef>
	<ParamDef>const QObject *<Parameter>receiver</Parameter> = 0</ParamDef>
	<ParamDef>const char *<Parameter>member</Parameter> = 0</ParamDef>
</FuncSynopsis>
<Para>
Not yet implemented.
</Para>

<FuncSynopsis>
	<FuncDef>static bool <Function>disconnect</Function></FuncDef>
	<ParamDef>const QObject *<Parameter>sender</Parameter></ParamDef>
	<ParamDef>const char *<Parameter>signal</Parameter></ParamDef>
	<ParamDef>const QObject *<Parameter>receiver</Parameter></ParamDef>
	<ParamDef>const char *<Parameter>member</Parameter></ParamDef>
</FuncSynopsis>
<Para>
At the moment PyQt does not support the full behaviour of the corresponding Qt
method. In particular, specifying None (ie. 0 in C++) for the
<Literal>signal</Literal> and <Literal>receiver</Literal> parameters is not yet
supported.
</Para>

<FuncSynopsis>
	<FuncDef>virtual QMetaObject *<Function>metaObject</Function></FuncDef>
	<ParamDef></ParamDef>
</FuncSynopsis>
<Para>
Not yet implemented.
</Para>
</Sect2>
%End


%If (Qt_2_00 -)

class QObject : Qt
{
%HeaderCode
#include <qobject.h>
#include <qapplication.h>
%End

public:
	QObject(QObject * /TransferThis/ = 0,const char * = 0);

%ConvertToSubClassCode
	// The table of Python class objects indexed by their names.  The table
	// must be sorted by name.

	static sipStringTypeClassMap map[] = {
		{sipName_QAccel,		&sipClass_QAccel},
#if QT_VERSION >= 220 && !defined(QT_NO_ACTION)
		{sipName_QAction,		&sipClass_QAction},
		{sipName_QActionGroup,		&sipClass_QActionGroup},
#endif
		{sipName_QApplication,		&sipClass_QApplication},
#if QT_VERSION >= 0x030100
		{sipName_QAssistantClient,	&sipClass_QAssistantClient},
#endif
		{sipName_QBoxLayout,		&sipClass_QBoxLayout},
		{sipName_QButton,		&sipClass_QButton},
		{sipName_QButtonGroup,		&sipClass_QButtonGroup},
#if !defined(QT_NO_STYLE_CDE)
		{sipName_QCDEStyle,		&sipClass_QCDEStyle},
#endif
		{sipName_QCheckBox,		&sipClass_QCheckBox},
#if !defined(QT_NO_CLIPBOARD)
		{sipName_QClipboard,		&sipClass_QClipboard},
#endif
#if !defined(QT_NO_COLORDIALOG)
		{sipName_QColorDialog,		&sipClass_QColorDialog},
#endif
#if QT_VERSION >= 210
		{sipName_QColorDrag,		&sipClass_QColorDrag},
#endif
		{sipName_QComboBox,		&sipClass_QComboBox},
		{sipName_QCommonStyle,		&sipClass_QCommonStyle},
#if QT_VERSION >= 300
		{sipName_QDateEdit,		&sipClass_QDateEdit},
		{sipName_QDateTimeEdit,		&sipClass_QDateTimeEdit},
		{sipName_QDesktopWidget,	&sipClass_QDesktopWidget},
#endif
#if QT_VERSION >= 220 && !defined(QT_NO_DIAL)
		{sipName_QDial,			&sipClass_QDial},
#endif
		{sipName_QDialog,		&sipClass_QDialog},
#if QT_VERSION >= 300
		{sipName_QDockArea,		&sipClass_QDockArea},
		{sipName_QDockWindow,		&sipClass_QDockWindow},
#endif
		{sipName_QDoubleValidator,	&sipClass_QDoubleValidator},
		{sipName_QDragObject,		&sipClass_QDragObject},
#if QT_VERSION >= 300
		{sipName_QErrorMessage,		&sipClass_QErrorMessage},
#endif
#if QT_VERSION >= 0x030100
		{sipName_QEventLoop,		&sipClass_QEventLoop},
#endif
#if !defined(QT_NO_FILEDIALOG)
		{sipName_QFileDialog,		&sipClass_QFileDialog},
		{sipName_QFileIconProvider,	&sipClass_QFileIconProvider},
#endif
#if !defined(QT_NO_FONTDIALOG)
		{sipName_QFontDialog,		&sipClass_QFontDialog},
#endif
		{sipName_QFrame,		&sipClass_QFrame},
		{sipName_QGrid,			&sipClass_QGrid},
		{sipName_QGridLayout,		&sipClass_QGridLayout},
#if QT_VERSION >= 300
		{sipName_QGridView,		&sipClass_QGridView},
#endif
		{sipName_QGroupBox,		&sipClass_QGroupBox},
		{sipName_QHBox,			&sipClass_QHBox},
		{sipName_QHBoxLayout,		&sipClass_QHBoxLayout},
		{sipName_QHButtonGroup,		&sipClass_QHButtonGroup},
		{sipName_QHGroupBox,		&sipClass_QHGroupBox},
		{sipName_QHeader,		&sipClass_QHeader},
#if QT_VERSION >= 210 && !defined(QT_NO_ICONVIEW) && !defined(QT_NO_DRAGANDDROP)
		{sipName_QIconDrag,		&sipClass_QIconDrag},
#endif
#if QT_VERSION >= 210 && !defined(QT_NO_ICONVIEW)
		{sipName_QIconView,		&sipClass_QIconView},
#endif
		{sipName_QImageDrag,		&sipClass_QImageDrag},
#if QT_VERSION >= 210 && !defined(QT_NO_INPUTDIALOG)
		{sipName_QInputDialog,		&sipClass_QInputDialog},
#endif
		{sipName_QIntValidator,		&sipClass_QIntValidator},
		{sipName_QLCDNumber,		&sipClass_QLCDNumber},
		{sipName_QLabel,		&sipClass_QLabel},
		{sipName_QLayout,		&sipClass_QLayout},
		{sipName_QLineEdit,		&sipClass_QLineEdit},
		{sipName_QListBox,		&sipClass_QListBox},
		{sipName_QListView,		&sipClass_QListView},
		{sipName_QMainWindow,		&sipClass_QMainWindow},
		{sipName_QMenuBar,		&sipClass_QMenuBar},
#if !defined(QT_NO_MESSAGEBOX)
		{sipName_QMessageBox,		&sipClass_QMessageBox},
#endif
#if QT_VERSION >= 220 && !defined(QT_NO_STYLE_MOTIFPLUS)
		{sipName_QMotifPlusStyle,	&sipClass_QMotifPlusStyle},
#endif
#if !defined(QT_NO_STYLE_MOTIF)
		{sipName_QMotifStyle,		&sipClass_QMotifStyle},
#endif
		{sipName_QMultiLineEdit,	&sipClass_QMultiLineEdit},
#if QT_VERSION >= 210 && !defined(QT_NO_NETWORKPROTOCOL)
		{sipName_QNetworkOperation,	&sipClass_QNetworkOperation},
		{sipName_QNetworkProtocol,	&sipClass_QNetworkProtocol},
#endif
#if QT_VERSION >= 300
		{sipName_QObjectCleanupHandler,	&sipClass_QObjectCleanupHandler},
#endif
#if !defined(QT_NO_STYLE_PLATINUM)
		{sipName_QPlatinumStyle,	&sipClass_QPlatinumStyle},
#endif
		{sipName_QPopupMenu,		&sipClass_QPopupMenu},
#if defined(WS_X11) && !defined(QT_NO_PRINTDIALOG)
		{sipName_QPrintDialog,		&sipClass_QPrintDialog},
#endif
#if QT_VERSION >= 300
		{sipName_QProcess,		&sipClass_QProcess},
#endif
		{sipName_QProgressBar,		&sipClass_QProgressBar},
#if !defined(QT_NO_PROGRESSDIALOG)
		{sipName_QProgressDialog,	&sipClass_QProgressDialog},
#endif
		{sipName_QPushButton,		&sipClass_QPushButton},
		{sipName_QRadioButton,		&sipClass_QRadioButton},
#if QT_VERSION >= 300
		{sipName_QRegExpValidator,	&sipClass_QRegExpValidator},
#endif
#if QT_VERSION >= 220 && !defined(QT_NO_STYLE_SGI)
		{sipName_QSGIStyle,		&sipClass_QSGIStyle},
#endif
		{sipName_QScrollBar,		&sipClass_QScrollBar},
		{sipName_QScrollView,		&sipClass_QScrollView},
		{sipName_QSessionManager,	&sipClass_QSessionManager},
#if !defined(QT_NO_SIZEGRIP)
		{sipName_QSizeGrip,		&sipClass_QSizeGrip},
#endif
		{sipName_QSlider,		&sipClass_QSlider},
		{sipName_QSocketNotifier,	&sipClass_QSocketNotifier},
#if QT_VERSION >= 220 && !defined(QT_NO_SOUND)
		{sipName_QSound,		&sipClass_QSound},
#endif
		{sipName_QSpinBox,		&sipClass_QSpinBox},
#if !defined(QT_NO_SPLITTER)
		{sipName_QSplitter,		&sipClass_QSplitter},
#endif
		{sipName_QStatusBar,		&sipClass_QStatusBar},
		{sipName_QStoredDrag,		&sipClass_QStoredDrag},
		{sipName_QStyle,		&sipClass_QStyle},
		{sipName_QStyleSheet,		&sipClass_QStyleSheet},
		{sipName_QTabBar,		&sipClass_QTabBar},
#if !defined(QT_NO_TABDIALOG)
		{sipName_QTabDialog,		&sipClass_QTabDialog},
#endif
		{sipName_QTabWidget,		&sipClass_QTabWidget},
		{sipName_QTextBrowser,		&sipClass_QTextBrowser},
		{sipName_QTextDrag,		&sipClass_QTextDrag},
#if QT_VERSION >= 300
		{sipName_QTextEdit,		&sipClass_QTextEdit},
#endif
		{sipName_QTextView,		&sipClass_QTextView},
#if QT_VERSION >= 300
		{sipName_QTimeEdit,		&sipClass_QTimeEdit},
#endif
		{sipName_QTimer,		&sipClass_QTimer},
		{sipName_QToolBar,		&sipClass_QToolBar},
		{sipName_QToolButton,		&sipClass_QToolButton},
		{sipName_QToolTipGroup,		&sipClass_QToolTipGroup},
		{sipName_QTranslator,		&sipClass_QTranslator},
		{sipName_QUriDrag,		&sipClass_QUriDrag},
#if QT_VERSION >= 210 && !defined(QT_NO_NETWORKPROTOCOL)
		{sipName_QUrlOperator,		&sipClass_QUrlOperator},
#endif
		{sipName_QVBox,			&sipClass_QVBox},
		{sipName_QVBoxLayout,		&sipClass_QVBoxLayout},
		{sipName_QVButtonGroup,		&sipClass_QVButtonGroup},
		{sipName_QVGroupBox,		&sipClass_QVGroupBox},
		{sipName_QValidator,		&sipClass_QValidator},
		{sipName_QWidget,		&sipClass_QWidget},
		{sipName_QWidgetStack,		&sipClass_QWidgetStack},
#if !defined(QT_NO_STYLE_WINDOWS)
		{sipName_QWindowsStyle,		&sipClass_QWindowsStyle},
#endif
#if defined(PYQT_STYLE_WINDOWSXP)
		{sipName_QWindowsXPStyle,	&sipClass_QWindowsXPStyle},
#endif
#if !defined(QT_NO_WIZARD)
		{sipName_QWizard,		&sipClass_QWizard},
#endif
#if QT_VERSION >= 210 && !defined(QT_NO_WORKSPACE)
		{sipName_QWorkspace,		&sipClass_QWorkspace},
#endif
	};

	sipClass = sipMapStringToClass(sipCpp -> className(),map,sizeof (map)/sizeof (map[0]));
%End

	// This is really virtual.  However, with the way we are implementing
	// it we can (and should) ignore it.
	const char *className() const;
%MemberCode
#if SIP_MAJOR_NR >= 4
	// FIXME
#else
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"t",sipThisObj,sipClass_QObject,&sipThis))
		{
			PyObject *cnameobj;

			// Get the class name.

			cnameobj = ((PyInstanceObject *)(sipThis -> sipSelf)) -> in_class -> cl_name;

			Py_XINCREF(cnameobj);
			return cnameobj;
		}
#endif
%End

%If (- Qt_3_0_0)
	static QString tr(const char *) /AutoGen=Qt_TRANSLATION/;
%End
%If (Qt_2_2_0 - Qt_2_3_1)
	// There was an apparent bug in moc prior to Qt v2.3.1 where this
	// method wasn't automatically generated.

	static QString tr(const char *,const char *);
%End
%If (Qt_2_3_1 - Qt_3_0_0)
	static QString tr(const char *,const char *) /AutoGen=Qt_TRANSLATION/;
%End
%If (Qt_3_0_0 -)
	// Note that tr() and trUtf8() are really static methods.  We pretend
	// they aren't so that we can use self to get hold of the class name.
	// We could mimic moc's behaviour more accurately by creating tr() and
	// trUtf8() methods for a Python sub-class instance in the sub-class's
	// ctor.

	QString tr(const char *,const char * = 0);
%MemberCode
#if SIP_MAJOR_NR >= 4
	// FIXME
#else
		const char *s, *c = 0;
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"ts|s",sipThisObj,sipClass_QObject,&sipThis,&s,&c))
		{
			char *cname;

			// Get the class name.

			cname = PyString_AsString(((PyInstanceObject *)(sipThis -> sipSelf)) -> in_class -> cl_name);

			QString *res;

			Py_BEGIN_ALLOW_THREADS

			if (cname != NULL && qApp)
				res = new QString(qApp -> translate(cname,s,c,QApplication::DefaultCodec));
			else
				res = new QString(QString::fromLatin1(s));

			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QString,SIP_SIMPLE | SIP_PY_OWNED);
		}
#endif
%End

	QString trUtf8(const char *,const char * = 0);
%MemberCode
#if SIP_MAJOR_NR >= 4
	// FIXME
#else
		const char *s, *c = 0;
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"ts|s",sipThisObj,sipClass_QObject,&sipThis,&s,&c))
		{
			char *cname;

			// Get the class name.

			cname = PyString_AsString(((PyInstanceObject *)(sipThis -> sipSelf)) -> in_class -> cl_name);

			QString *res;

			Py_BEGIN_ALLOW_THREADS

			if (cname != NULL && qApp)
				res = new QString(qApp -> translate(cname,s,c,QApplication::UnicodeUTF8));
			else
				res = new QString(QString::fromUtf8(s));

			Py_END_ALLOW_THREADS

			return sipNewCppToSelf(res,sipClass_QString,SIP_SIMPLE | SIP_PY_OWNED);
		}
#endif
%End
%End
//	virtual QMetaObject *metaObject() const;
	virtual bool event(QEvent *);
	virtual bool eventFilter(QObject *,QEvent *);
	bool isA(const char *) const;
	bool inherits(const char *) const;
%If (- Qt_3_0_0)
	QStringList superClasses(bool = 0) const;
%End
	const char *name() const;
	const char *name(const char *) const;
	virtual void setName(const char *);
	bool isWidgetType() const;
	bool highPriority() const;
	bool signalsBlocked() const;
	void blockSignals(bool);
	int startTimer(int);
	void killTimer(int);
	void killTimers();
%If (- Qt_3_0_0)
	QObject *child(const char *,const char * = 0);
%End
%If (Qt_3_0_0 -)
	QObject *child(const char *,const char * = 0,bool = 1);
%End
	const QObjectList *children() const;
%If (Qt_2_1_0 -)
	static const QObjectList *objectTrees();
%End
%If (- Qt_3_0_0)
	QObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1);
%End
%If (Qt_3_0_0 -)
	QObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1) const;
%End
	virtual void insertChild(QObject * /Transfer/);
	virtual void removeChild(QObject * /TransferBack/);
	void installEventFilter(const QObject *);
	void removeEventFilter(const QObject *);

	static bool connect(const QObject *,const char *,const QObject *,const char *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;
		char *slot;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGRS",&txSelf,&sig,&rxSelf,&slot))
			return sipConnectRx(txSelf,sig,rxSelf,slot);
%End

	static bool connect(const QObject *,const char *,const QObject *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGF",&txSelf,&sig,&rxSelf))
			return sipConnectRx(txSelf,sig,rxSelf,NULL);
%End

	bool connect(const QObject *,const char *,const char *) const;
%MemberCode
#if SIP_MAJOR_NR >= 4
	// FIXME
#else
		PyObject *txSelf;
		char *sig;
		char *slot;
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"tRGS",sipThisObj,sipClass_QObject,&sipThis,&txSelf,&sig,&slot))
			return sipConnectRx(txSelf,sig,sipThis -> sipSelf,slot);
#endif
%End

	static bool disconnect(const QObject *,const char *,const QObject *,const char *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;
		char *slot;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGRS",&txSelf,&sig,&rxSelf,&slot))
			return sipDisconnectRx(txSelf,sig,rxSelf,slot);
%End

	static bool disconnect(const QObject *,const char *,const QObject *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGF",&txSelf,&sig,&rxSelf))
			return sipDisconnectRx(txSelf,sig,rxSelf,NULL);
%End

//	bool disconnect(const char * = 0,const QObject * = 0,const char * = 0);
//	bool disconnect(const QObject *,const char * = 0);
	void dumpObjectTree();
	void dumpObjectInfo();
	QObject *parent() const;

	void emit();
%MemberCode
		char *sig;
		PyObject *sigargs;
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"tST",sipThisObj,sipClass_QObject,&sipThis,&sig,&PyTuple_Type,&sigargs))
		{
			if (sipEmitSignal(sipThis,sig,sigargs) < 0)
				return NULL;

			Py_INCREF(Py_None);
			return Py_None;
		}
%End

%If (Qt_PROPERTIES)
%If (Qt_2_1_0 - Qt_3_0_0)
	bool setProperty(const char *,const QVariant &);
	QVariant property(const char *) const;
%End
%If (Qt_3_0_0 -)
	virtual bool setProperty(const char *,const QVariant &);
	virtual QVariant property(const char *) const;
%End
%End

signals:
	void destroyed();
%If (Qt_3_0_0 -)
	void destroyed(QObject *);
%End

public slots:
%If (Qt_3_0_0 -)
	void deleteLater();
%End

protected:
	const QObject *sender();
%MemberCode
		QObject *ptr;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QObject,&ptr))
			return sipMapCppToSelfSubClass(sipGetSender(),sipClass_QObject);
%End

	virtual void timerEvent(QTimerEvent *);
	virtual void childEvent(QChildEvent *);
%If (Qt_3_0_0 -)
	virtual void customEvent(QCustomEvent *);
%End

private:
	QObject(const QObject &);
};


const char *QT_TR_NOOP(const char *);
%MemberCode
	PyObject *sobj;

	if (sipParseArgs(&sipArgsParsed,sipArgs,"O",&sobj))
	{
		Py_INCREF(sobj);
		return sobj;
	}
%End


const char *QT_TRANSLATE_NOOP(const char *,const char *);
%MemberCode
	PyObject *scope, *sobj;

	if (sipParseArgs(&sipArgsParsed,sipArgs,"OO",&scope,&sobj))
	{
		Py_INCREF(sobj);
		return sobj;
	}
%End

%End


%If (- Qt_2_00)

class QObject
{
%HeaderCode
#include <qobject.h>
%End

public:
	QObject(QObject * /TransferThis/ = 0,const char * = 0);

%ConvertToSubClassCode
	// The table of Python class objects indexed by their names.  The table
	// must be sorted by name.

	static sipStringTypeClassMap map[] = {
		{sipName_QAccel,		&sipClass_QAccel},
		{sipName_QApplication,		&sipClass_QApplication},
		{sipName_QBoxLayout,		&sipClass_QBoxLayout},
		{sipName_QButton,		&sipClass_QButton},
		{sipName_QButtonGroup,		&sipClass_QButtonGroup},
		{sipName_QCheckBox,		&sipClass_QCheckBox},
#if !defined(QT_NO_CLIPBOARD)
		{sipName_QClipboard,		&sipClass_QClipboard},
#endif
		{sipName_QComboBox,		&sipClass_QComboBox},
		{sipName_QDialog,		&sipClass_QDialog},
		{sipName_QDoubleValidator,	&sipClass_QDoubleValidator},
		{sipName_QDragObject,		&sipClass_QDragObject},
#if !defined(QT_NO_FILEDIALOG)
		{sipName_QFileDialog,		&sipClass_QFileDialog},
		{sipName_QFileIconProvider,	&sipClass_QFileIconProvider},
#endif
		{sipName_QFrame,		&sipClass_QFrame},
		{sipName_QGridLayout,		&sipClass_QGridLayout},
		{sipName_QGroupBox,		&sipClass_QGroupBox},
		{sipName_QHBoxLayout,		&sipClass_QHBoxLayout},
		{sipName_QHeader,		&sipClass_QHeader},
		{sipName_QImageDrag,		&sipClass_QImageDrag},
		{sipName_QIntValidator,		&sipClass_QIntValidator},
		{sipName_QLCDNumber,		&sipClass_QLCDNumber},
		{sipName_QLabel,		&sipClass_QLabel},
		{sipName_QLayout,		&sipClass_QLayout},
		{sipName_QLineEdit,		&sipClass_QLineEdit},
		{sipName_QListBox,		&sipClass_QListBox},
		{sipName_QListView,		&sipClass_QListView},
		{sipName_QMainWindow,		&sipClass_QMainWindow},
		{sipName_QMenuBar,		&sipClass_QMenuBar},
#if !defined(QT_NO_MESSAGEBOX)
		{sipName_QMessageBox,		&sipClass_QMessageBox},
#endif
		{sipName_QMultiLineEdit,	&sipClass_QMultiLineEdit},
		{sipName_QPopupMenu,		&sipClass_QPopupMenu},
#if defined(WS_X11) && !defined(QT_NO_PRINTDIALOG)
		{sipName_QPrintDialog,		&sipClass_QPrintDialog},
#endif
		{sipName_QProgressBar,		&sipClass_QProgressBar},
#if !defined(QT_NO_PROGRESSDIALOG)
		{sipName_QProgressDialog,	&sipClass_QProgressDialog},
#endif
		{sipName_QPushButton,		&sipClass_QPushButton},
		{sipName_QRadioButton,		&sipClass_QRadioButton},
		{sipName_QScrollBar,		&sipClass_QScrollBar},
		{sipName_QScrollView,		&sipClass_QScrollView},
		{sipName_QSlider,		&sipClass_QSlider},
		{sipName_QSocketNotifier,	&sipClass_QSocketNotifier},
		{sipName_QSpinBox,		&sipClass_QSpinBox},
#if !defined(QT_NO_SPLITTER)
		{sipName_QSplitter,		&sipClass_QSplitter},
#endif
		{sipName_QStatusBar,		&sipClass_QStatusBar},
		{sipName_QStoredDrag,		&sipClass_QStoredDrag},
		{sipName_QTabBar,		&sipClass_QTabBar},
		{sipName_QTextDrag,		&sipClass_QTextDrag},
		{sipName_QTimer,		&sipClass_QTimer},
		{sipName_QToolBar,		&sipClass_QToolBar},
		{sipName_QToolButton,		&sipClass_QToolButton},
		{sipName_QToolTipGroup,		&sipClass_QToolTipGroup},
		{sipName_QVBoxLayout,		&sipClass_QVBoxLayout},
		{sipName_QValidator,		&sipClass_QValidator},
		{sipName_QWidget,		&sipClass_QWidget},
		{sipName_QWidgetStack,		&sipClass_QWidgetStack}
	};

	sipClass = sipMapStringToClass(sipCpp -> className(),map,sizeof (map)/sizeof (map[0]));
%End

	static bool connect(const QObject *,const char *,const QObject *,const char *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;
		char *slot;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGRS",&txSelf,&sig,&rxSelf,&slot))
			return sipConnectRx(txSelf,sig,rxSelf,slot);
%End

	static bool connect(const QObject *,const char *,const QObject *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGF",&txSelf,&sig,&rxSelf))
			return sipConnectRx(txSelf,sig,rxSelf,NULL);
%End

	static bool disconnect(const QObject *,const char *,const QObject *,const char *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;
		char *slot;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGRS",&txSelf,&sig,&rxSelf,&slot))
			return sipDisconnectRx(txSelf,sig,rxSelf,slot);
%End

	static bool disconnect(const QObject *,const char *,const QObject *);
%MemberCode
		PyObject *txSelf;
		char *sig;
		PyObject *rxSelf;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"RGF",&txSelf,&sig,&rxSelf))
			return sipDisconnectRx(txSelf,sig,rxSelf,NULL);
%End

	virtual bool event(QEvent *);
	virtual bool eventFilter(QObject *,QEvent *);
	const char *tr(const char *) const;
//	virtual QMetaObject *metaObject() const;

	// This is actually virtual.  However, with the way we are implementing
	// it we can ignore it.
	virtual const char *className() const;
%MemberCode
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"t",sipThisObj,sipClass_QObject,&sipThis))
		{
			PyObject *cname;

			// Get the class name.

			cname = ((PyInstanceObject *)(sipThis -> sipSelf)) -> in_class -> cl_name;

			Py_INCREF(cname);
			return cname;
		}
%End

	bool isA(const char *) const;
	bool inherits(const char *) const;
	const char *name() const;
	const char *name(const char *) const;
	void setName(const char *);
	bool isWidgetType() const;
	bool highPriority() const;
	bool signalsBlocked() const;
	void blockSignals(bool);
	int startTimer(int);
	void killTimer(int);
	void killTimers();
	const QObjectList *children() const;
	QObjectList *queryList(char * = 0,char * = 0,bool = 1,bool = 1);
	void insertChild(QObject * /Transfer/);
	void removeChild(QObject * /TransferBack/);
	void installEventFilter(const QObject *);
	void removeEventFilter(const QObject *);
//	bool connect(QObject *,const char *,const char *);
//	bool disconnect(const char * = 0,const QObject * = 0,const char * = 0);
//	bool disconnect(const QObject *,const char * = 0);
	void dumpObjectTree();
	void dumpObjectInfo();
	QObject *parent() const;

	void emit();
%MemberCode
		char *sig;
		PyObject *sigargs;
		sipThisType *sipThis;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"tST",sipThisObj,sipClass_QObject,&sipThis,&sig,&PyTuple_Type,&sigargs))
		{
			if (sipEmitSignal(sipThis,sig,sigargs) < 0)
				return NULL;

			Py_INCREF(Py_None);
			return Py_None;
		}
%End

signals:
	void destroyed();

protected:
	const QObject *sender();
%MemberCode
		QObject *ptr;

		if (sipParseArgs(&sipArgsParsed,sipArgs,"p",sipThisObj,sipClass_QObject,&ptr))
			return sipMapCppToSelfSubClass(sipGetSender(),sipClass_QObject);
%End

	virtual void timerEvent(QTimerEvent *);

private:
	QObject(const QObject &);
};

%End


const char *SLOT(const char *);
%MemberCode
	char *s;

	if (sipParseArgs(&sipArgsParsed,sipArgs,"s",&s) && s)
	{
		int len = strlen(s);

		PyObject *news = PyString_FromStringAndSize(NULL,1 + len);

		if (news == NULL)
			return NULL;

		char *dp = PyString_AS_STRING(news);
		*dp++ = '1';
		memcpy(dp,s,len + 1);

		return news;
	}
%End


const char *SIGNAL(const char *);
%MemberCode
	char *s;

	if (sipParseArgs(&sipArgsParsed,sipArgs,"s",&s) && s)
	{
		int len = strlen(s);

		PyObject *news = PyString_FromStringAndSize(NULL,1 + len);

		if (news == NULL)
			return NULL;

		char *dp = PyString_AS_STRING(news);
		*dp++ = '2';
		memcpy(dp,s,len + 1);

		return news;
	}
%End


const char *PYSIGNAL(const char *);
%MemberCode
	char *s;

	if (sipParseArgs(&sipArgsParsed,sipArgs,"s",&s) && s)
	{
		int len = strlen(s);

		PyObject *news = PyString_FromStringAndSize(NULL,1 + len);

		if (news == NULL)
			return NULL;

		char *dp = PyString_AS_STRING(news);
		*dp++ = '9';
		memcpy(dp,s,len + 1);

		return news;
	}
%End
