From d296f1d337dabfeae5191955fdadb874965dbbe9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 10 Aug 2011 12:13:27 -0500 Subject: rename the following methods: tqparent parent tqmask mask --- tqtinterface/qt4/src/kernel/tqobject.cpp | 90 ++++++++++++++++---------------- 1 file changed, 45 insertions(+), 45 deletions(-) (limited to 'tqtinterface/qt4/src/kernel/tqobject.cpp') diff --git a/tqtinterface/qt4/src/kernel/tqobject.cpp b/tqtinterface/qt4/src/kernel/tqobject.cpp index 4f465d1..6c93075 100644 --- a/tqtinterface/qt4/src/kernel/tqobject.cpp +++ b/tqtinterface/qt4/src/kernel/tqobject.cpp @@ -73,9 +73,9 @@ public: */ -TQObject::TQObject( TQT_BASE_OBJECT_NAME *tqparent, const char *name ) : TQT_BASE_OBJECT_NAME ( tqparent ) { +TQObject::TQObject( TQT_BASE_OBJECT_NAME *parent, const char *name ) : TQT_BASE_OBJECT_NAME ( parent ) { setObjectName(QString::fromAscii(name)); - TQT_TQOBJECT_REQUIRED_INITIALIZATION(tqparent) + TQT_TQOBJECT_REQUIRED_INITIALIZATION(parent) } const char * TQObject::name(const char *defaultName) const { @@ -166,7 +166,7 @@ const TQObjectList TQObject::objectTreesListObject() { return TQObjectList(); } -TQObject *TQObject::tqparent() const { +TQObject *TQObject::parent() const { return static_cast(parent()); } @@ -675,7 +675,7 @@ static void objSearch( TQObjectList *result, without notice (as soon as the user closes a window you may have dangling pointers, for example). - \sa child() childrenListObject(), tqparent(), inherits(), name(), TQRegExp + \sa child() childrenListObject(), parent(), inherits(), name(), TQRegExp */ TQObjectList *TQObject::queryList( const char *inheritsClass, @@ -851,7 +851,7 @@ void TQObject::customEvent( TQCustomEvent * ) class MyMainWindow : public TQMainWindow { public: - MyMainWindow( TQWidget *tqparent = 0, const char *name = 0 ); + MyMainWindow( TQWidget *parent = 0, const char *name = 0 ); protected: bool eventFilter( TQObject *obj, TQEvent *ev ); @@ -860,8 +860,8 @@ void TQObject::customEvent( TQCustomEvent * ) TQTextEdit *textEdit; }; - MyMainWindow::MyMainWindow( TQWidget *tqparent, const char *name ) - : TQMainWindow( tqparent, name ) + MyMainWindow::MyMainWindow( TQWidget *parent, const char *name ) + : TQMainWindow( parent, name ) { textEdit = new TQTextEdit( this ); setCentralWidget( textEdit ); @@ -879,7 +879,7 @@ void TQObject::customEvent( TQCustomEvent * ) return FALSE; } } else { - // pass the event on to the tqparent class + // pass the event on to the parent class return TQMainWindow::eventFilter( obj, ev ); } } @@ -906,7 +906,7 @@ bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ ) \relates TQObject Returns a pointer to the object named \a name that inherits \a - type and with a given \a tqparent. + type and with a given \a parent. Returns 0 if there is no such child. @@ -918,10 +918,10 @@ bool TQObject::eventFilter( TQObject * /* watched */, TQEvent * /* e */ ) \endcode */ -void *qt_find_obj_child( TQObject *tqparent, const char *type, const char *name ) +void *qt_find_obj_child( TQObject *parent, const char *type, const char *name ) { - if ( !tqparent->childrenListObject().isEmpty() ) { - TQObjectListIt it( tqparent->childrenListObject() ); + if ( !parent->childrenListObject().isEmpty() ) { + TQObjectListIt it( parent->childrenListObject() ); TQObject *obj; while ( (obj = it.current()) ) { ++it; @@ -1099,9 +1099,9 @@ public: possible to track connections. TQObjects organize themselves in object trees. When you create a - TQObject with another object as tqparent, the object will - automatically do an insertChild() on the tqparent and thus show up - in the tqparent's childrenListObject() list. The tqparent takes ownership of the + TQObject with another object as parent, the object will + automatically do an insertChild() on the parent and thus show up + in the parent's childrenListObject() list. The parent takes ownership of the object i.e. it will automatically delete its tqchildren in its destructor. You can look for an object by name and optionally type using child() or queryList(), and get the list of tree roots using @@ -1216,7 +1216,7 @@ static void removeObjFromList( TQObjectList *objList, const TQObject *obj, \relates TQObject Returns a pointer to the object named \a name that inherits \a - type and with a given \a tqparent. + type and with a given \a parent. Returns 0 if there is no such child. @@ -1228,10 +1228,10 @@ static void removeObjFromList( TQObjectList *objList, const TQObject *obj, \endcode */ -void *qt_find_obj_child( TQObject *tqparent, const char *type, const char *name ) +void *qt_find_obj_child( TQObject *parent, const char *type, const char *name ) { - if ( !tqparent->childrenListObject().isEmpty() ) { - TQObjectListIt it( tqparent->childrenListObject() ); + if ( !parent->childrenListObject().isEmpty() ) { + TQObjectListIt it( parent->childrenListObject() ); TQObject *obj; while ( (obj = it.current()) ) { ++it; @@ -1340,15 +1340,15 @@ static void remove_tree( TQObject* obj ) *****************************************************************************/ /*! - Constructs an object called \a name with tqparent object, \a tqparent. + Constructs an object called \a name with parent object, \a parent. - The tqparent of an object may be viewed as the object's owner. For - instance, a \link TQDialog dialog box\endlink is the tqparent of the + The parent of an object may be viewed as the object's owner. For + instance, a \link TQDialog dialog box\endlink is the parent of the "OK" and "Cancel" buttons it contains. - The destructor of a tqparent object destroys all child objects. + The destructor of a parent object destroys all child objects. - Setting \a tqparent to 0 constructs an object with no tqparent. If the + Setting \a parent to 0 constructs an object with no parent. If the object is a widget, it will become a top-level window. The object name is some text that can be used to identify a @@ -1357,10 +1357,10 @@ static void remove_tree( TQObject* obj ) object by name (and type) using child(). To find several objects use queryList(). - \sa tqparent(), name(), child(), queryList() + \sa parent(), name(), child(), queryList() */ -TQObject::TQObject( TQObject *tqparent, const char *name ) +TQObject::TQObject( TQObject *parent, const char *name ) : isSignal( FALSE ), // assume not a signal object isWidget( FALSE ), // assume not a widget object @@ -1369,7 +1369,7 @@ TQObject::TQObject( TQObject *tqparent, const char *name ) wasDeleted( FALSE ), // double-delete catcher isTree( FALSE ), // no tree yet objname( name ? qstrdup(name) : 0 ), // set object name - parentObj( 0 ), // no tqparent yet. It is set by insertChild() + parentObj( 0 ), // no parent yet. It is set by insertChild() childObjects( 0 ), // no tqchildren yet connections( 0 ), // no connections yet senderObjects( 0 ), // no Q_SIGNALS connected yet @@ -1380,8 +1380,8 @@ TQObject::TQObject( TQObject *tqparent, const char *name ) if ( !metaObj ) // will create object dict (void) staticMetaObject(); - if ( tqparent ) { // add object to tqparent - tqparent->insertChild( this ); + if ( parent ) { // add object to parent + parent->insertChild( this ); } else { insert_tree( this ); isTree = TRUE; @@ -1397,7 +1397,7 @@ TQObject::TQObject( TQObject *tqparent, const char *name ) \warning All child objects are deleted. If any of these objects are on the stack or global, sooner or later your program will crash. We do not recommend holding pointers to child objects from - outside the tqparent. If you still do, the TQObject::destroyed() + outside the parent. If you still do, the TQObject::destroyed() signal gives you an opportunity to detect when an object is destroyed. @@ -1431,7 +1431,7 @@ TQObject::~TQObject() remove_tree( this ); // remove from global root list isTree = FALSE; } - if ( parentObj ) // remove it from tqparent object + if ( parentObj ) // remove it from parent object parentObj->removeChild( this ); register TQObject *obj; if ( senderObjects ) { // disconnect from senders @@ -1810,7 +1810,7 @@ void TQObject::customEvent( TQCustomEvent * ) class MyMainWindow : public TQMainWindow { public: - MyMainWindow( TQWidget *tqparent = 0, const char *name = 0 ); + MyMainWindow( TQWidget *parent = 0, const char *name = 0 ); protected: bool eventFilter( TQObject *obj, TQEvent *ev ); @@ -1819,8 +1819,8 @@ void TQObject::customEvent( TQCustomEvent * ) TQTextEdit *textEdit; }; - MyMainWindow::MyMainWindow( TQWidget *tqparent, const char *name ) - : TQMainWindow( tqparent, name ) + MyMainWindow::MyMainWindow( TQWidget *parent, const char *name ) + : TQMainWindow( parent, name ) { textEdit = new TQTextEdit( this ); setCentralWidget( textEdit ); @@ -1838,7 +1838,7 @@ void TQObject::customEvent( TQCustomEvent * ) return FALSE; } } else { - // pass the event on to the tqparent class + // pass the event on to the parent class return TQMainWindow::eventFilter( obj, ev ); } } @@ -1938,14 +1938,14 @@ void TQObject::blockSignals( bool block ) { TQ_OBJECT public: - MyObject( TQObject *tqparent = 0, const char *name = 0 ); + MyObject( TQObject *parent = 0, const char *name = 0 ); protected: void timerEvent( TQTimerEvent * ); }; - MyObject::MyObject( TQObject *tqparent, const char *name ) - : TQObject( tqparent, name ) + MyObject::MyObject( TQObject *parent, const char *name ) + : TQObject( parent, name ) { startTimer( 50 ); // 50-millisecond timer startTimer( 1000 ); // 1-second timer @@ -2043,9 +2043,9 @@ static void objSearch( TQObjectList *result, } /*! - \fn TQObject *TQObject::tqparent() const + \fn TQObject *TQObject::parent() const - Returns a pointer to the tqparent object. + Returns a pointer to the parent object. \sa childrenListObject() */ @@ -2070,7 +2070,7 @@ static void objSearch( TQObjectList *result, in the list, and a widget that is lowered becomes the first object in the list. - \sa child(), queryList(), tqparent(), insertChild(), removeChild() + \sa child(), queryList(), parent(), insertChild(), removeChild() */ @@ -2085,7 +2085,7 @@ static void objSearch( TQObjectList *result, first\endlink object in the list and the first root object added is the \link TQPtrList::last() last\endlink object in the list. - \sa childrenListObject(), tqparent(), insertChild(), removeChild() + \sa childrenListObject(), parent(), insertChild(), removeChild() */ const TQObjectList *TQObject::objectTrees() { @@ -2140,7 +2140,7 @@ const TQObjectList *TQObject::objectTrees() without notice (as soon as the user closes a window you may have dangling pointers, for example). - \sa child() childrenListObject(), tqparent(), inherits(), name(), TQRegExp + \sa child() childrenListObject(), parent(), inherits(), name(), TQRegExp */ TQObjectList *TQObject::queryList( const char *inheritsClass, @@ -2220,7 +2220,7 @@ TQConnectionList *TQObject::tqreceivers( int signal ) const \warning This function cannot be used to make one widget the child widget of another widget. Child widgets can only be created by - setting the tqparent widget in the constructor or by calling + setting the parent widget in the constructor or by calling TQWidget::reparent(). \sa removeChild(), TQWidget::reparent() @@ -2262,7 +2262,7 @@ void TQObject::insertChild( TQObject *obj ) Removes the child object \a obj from the list of tqchildren. \warning This function will not remove a child widget from the - screen. It will only remove it from the tqparent widget's list of + screen. It will only remove it from the parent widget's list of tqchildren. \sa insertChild(), TQWidget::reparent() -- cgit v1.2.3