diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-08-10 22:19:39 +0000 |
commit | 32b67ac0690de411b26b1d5e715b188c27442248 (patch) | |
tree | 43167816a3df6b3a877d71c9a7963ed270dcc8c9 /kdevdesigner/designer/widgetfactory.cpp | |
parent | 330c33ab6f97b279737bf9527c9add7bb1475450 (diff) | |
download | tdevelop-32b67ac0690de411b26b1d5e715b188c27442248.tar.gz tdevelop-32b67ac0690de411b26b1d5e715b188c27442248.zip |
rename the following methods:
tqparent parent
tqmask mask
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1246260 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner/designer/widgetfactory.cpp')
-rw-r--r-- | kdevdesigner/designer/widgetfactory.cpp | 228 |
1 files changed, 114 insertions, 114 deletions
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 55bb4c0d..e31f5d82 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -123,8 +123,8 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* ) } -QDesignerTabWidget::QDesignerTabWidget( TQWidget *tqparent, const char *name ) - : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) +QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) + : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) { tabBar()->setAcceptDrops( TRUE ); tabBar()->installEventFilter( this ); @@ -290,8 +290,8 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) } -QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *tqparent, const char *name ) - : TQWidgetStack( tqparent, name ) +QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) + : TQWidgetStack( parent, name ) { prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); prev->setAutoRaise( TRUE ); @@ -517,12 +517,12 @@ void WidgetFactory::saveChangedProperties( TQObject *w, int id ) } /*! Creates a widget of the type which is registered as \a id as - child of \a tqparent. The \a name is optional. If \a init is TRUE, the + child of \a parent. The \a name is optional. If \a init is TRUE, the widget is initialized with some defaults, else the plain widget is created. */ -TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) { TQString n = WidgetDatabase::className( id ); if ( n.isEmpty() ) @@ -536,11 +536,11 @@ TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, b TQWidget *w = 0; TQString str = WidgetDatabase::createWidgetName( id ); const char *s = str.latin1(); - w = createWidget( n, tqparent, name ? name : s, init, r, orient ); + w = createWidget( n, parent, name ? name : s, init, r, orient ); if ( ::tqqt_cast<TQScrollView*>(w) ) ( (TQScrollView*)w )->disableSizeHintCaching(); if ( !w && WidgetDatabase::isCustomWidget( id ) ) - w = createCustomWidget( tqparent, name ? name : s, MetaDataBase::customWidget( id ) ); + w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); if ( !w ) return 0; MetaDataBase::addEntry( TQT_TQOBJECT(w) ); @@ -677,30 +677,30 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) } /*! Factory functions for creating a widget of the type \a className - as child of \a tqparent with the name \a name. + as child of \a parent with the name \a name. If \a init is TRUE, some initial default properties are set. This has to be in sync with the initChangedProperties() function! */ -TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init, +TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) { if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { TQPushButton *b = 0; if ( init ) { - b = new QDesignerPushButton( tqparent, name ); + b = new QDesignerPushButton( parent, name ); b->setText( TQString::tqfromLatin1( name ) ); } else { - b = new QDesignerPushButton( tqparent, name ); + b = new QDesignerPushButton( parent, name ); } TQWidget *w = find_formwindow( b ); b->setAutoDefault( w && ::tqqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); return b; } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { if ( init ) { - QDesignerToolButton *tb = new QDesignerToolButton( tqparent, name ); - if ( ::tqqt_cast<TQToolBox*>(widgetOfContainer(tqparent))) { + QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); + if ( ::tqqt_cast<TQToolBox*>(widgetOfContainer(parent))) { tb->setUsesTextLabel(TRUE); tb->setTextLabel("..."); tb->setAutoRaise(TRUE); @@ -710,32 +710,32 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return tb; } - return new QDesignerToolButton( tqparent, name ); + return new QDesignerToolButton( parent, name ); } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { if ( init ) { - QDesignerCheckBox *cb = new QDesignerCheckBox( tqparent, name ); + QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); cb->setText( TQString::tqfromLatin1( name ) ); return cb; } - return new QDesignerCheckBox( tqparent, name ); + return new QDesignerCheckBox( parent, name ); } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { if ( init ) { - QDesignerRadioButton *rb = new QDesignerRadioButton( tqparent, name ); + QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); rb->setText( TQString::tqfromLatin1( name ) ); return rb; } - return new QDesignerRadioButton( tqparent, name ); + return new QDesignerRadioButton( parent, name ); } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { if ( init ) - return new TQGroupBox( TQString::tqfromLatin1( name ), tqparent, name ); - return new TQGroupBox( tqparent, name ); + return new TQGroupBox( TQString::tqfromLatin1( name ), parent, name ); + return new TQGroupBox( parent, name ); } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { if ( init ) - return new TQButtonGroup( TQString::tqfromLatin1( name ), tqparent, name ); - return new TQButtonGroup( tqparent, name ); + return new TQButtonGroup( TQString::tqfromLatin1( name ), parent, name ); + return new TQButtonGroup( parent, name ); } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { #if !defined(TQT_NO_ICONVIEW) - TQIconView* iv = new TQIconView( tqparent, name ); + TQIconView* iv = new TQIconView( parent, name ); if ( init ) (void) new TQIconViewItem( iv, i18n( "New Item" ) ); return iv; @@ -745,31 +745,31 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { #if !defined(TQT_NO_TABLE) if ( init ) - return new TQTable( 3, 3, tqparent, name ); - return new TQTable( tqparent, name ); + return new TQTable( 3, 3, parent, name ); + return new TQTable( parent, name ); #else return 0; #endif #ifndef TQT_NO_SQL } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { - return new TQDataTable( tqparent, name ); + return new TQDataTable( parent, name ); #endif //TQT_NO_SQL } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { - return new TQDateEdit( tqparent, name ); + return new TQDateEdit( parent, name ); } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { - return new TQTimeEdit( tqparent, name ); + return new TQTimeEdit( parent, name ); } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { - return new TQDateTimeEdit( tqparent, name ); + return new TQDateTimeEdit( parent, name ); } else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { - TQListBox* lb = new TQListBox( tqparent, name ); + TQListBox* lb = new TQListBox( parent, name ); if ( init ) { lb->insertItem( i18n( "New Item" ) ); lb->setCurrentItem( 0 ); } return lb; } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { - TQListView *lv = new TQListView( tqparent, name ); + TQListView *lv = new TQListView( parent, name ); lv->setSorting( -1 ); if ( init ) { lv->addColumn( i18n( "Column 1" ) ); @@ -777,17 +777,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return lv; } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) - return new TQLineEdit( tqparent, name ); + return new TQLineEdit( parent, name ); else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) - return new TQSpinBox( tqparent, name ); + return new TQSpinBox( parent, name ); else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) - return new TQSplitter( tqparent, name ); + return new TQSplitter( parent, name ); else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) - return new TQMultiLineEdit( tqparent, name ); + return new TQMultiLineEdit( parent, name ); else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) - return new TQTextEdit( tqparent, name ); + return new TQTextEdit( parent, name ); else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { - QDesignerLabel *l = new QDesignerLabel( tqparent, name ); + QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setText( TQString::tqfromLatin1( name ) ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); @@ -795,7 +795,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return l; } else if ( className == "PixmapLabel" ) { - QDesignerLabel *l = new QDesignerLabel( tqparent, name ); + QDesignerLabel *l = new QDesignerLabel( parent, name ); if ( init ) { l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); l->setScaledContents( TRUE ); @@ -805,11 +805,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return l; } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - return new TQLayoutWidget( tqparent, name ); + return new TQLayoutWidget( parent, name ); else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { - TQTabWidget *tw = new QDesignerTabWidget( tqparent, name ); + TQTabWidget *tw = new QDesignerTabWidget( parent, name ); if ( init ) { - FormWindow *fw = find_formwindow( tqparent ); + FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); tw->addTab( w, i18n("Tab 1") ); MetaDataBase::addEntry( TQT_TQOBJECT(w) ); @@ -820,9 +820,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return tw; } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { - QDesignerWidgetStack *ws = new QDesignerWidgetStack( tqparent, name ); + QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); if ( init ) { - FormWindow *fw = find_formwindow( tqparent ); + FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); ws->insertPage( w ); MetaDataBase::addEntry( TQT_TQOBJECT(w) ); @@ -830,53 +830,53 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } return ws; } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { - return new TQComboBox( FALSE, tqparent, name ); + return new TQComboBox( FALSE, parent, name ); } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { - if ( tqparent && - ( ::tqqt_cast<FormWindow*>(tqparent) || - ::tqqt_cast<TQWizard*>(tqparent) || - ::tqqt_cast<TQTabWidget*>(tqparent) || - ::tqqt_cast<TQWidgetStack*>(tqparent) || - ::tqqt_cast<TQToolBox*>(tqparent) || - ::tqqt_cast<TQMainWindow*>(tqparent) ) ) { - FormWindow *fw = find_formwindow( tqparent ); + if ( parent && + ( ::tqqt_cast<FormWindow*>(parent) || + ::tqqt_cast<TQWizard*>(parent) || + ::tqqt_cast<TQTabWidget*>(parent) || + ::tqqt_cast<TQWidgetStack*>(parent) || + ::tqqt_cast<TQToolBox*>(parent) || + ::tqqt_cast<TQMainWindow*>(parent) ) ) { + FormWindow *fw = find_formwindow( parent ); if ( fw ) { - QDesignerWidget *dw = new QDesignerWidget( fw, tqparent, name ); + QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); return dw; } } - return new TQWidget( tqparent, name ); + return new TQWidget( parent, name ); } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { TQDialog *dia = 0; - if ( ::tqqt_cast<FormWindow*>(tqparent) ) - dia = new QDesignerDialog( (FormWindow*)tqparent, tqparent, name ); + if ( ::tqqt_cast<FormWindow*>(parent) ) + dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); else - dia = new TQDialog( tqparent, name ); + dia = new TQDialog( parent, name ); #if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast<MainWindow*>(tqparent) ) + if ( ::tqqt_cast<MainWindow*>(parent) ) #else - if ( tqparent ) + if ( parent ) #endif - dia->reparent( tqparent, TQPoint( 0, 0 ), TRUE ); + dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); return dia; } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { - TQWizard *wiz = new QDesignerWizard( tqparent, name ); + TQWizard *wiz = new QDesignerWizard( parent, name ); #if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast<MainWindow*>(tqparent) ) + if ( ::tqqt_cast<MainWindow*>(parent) ) #else - if ( tqparent ) + if ( parent ) #endif - wiz->reparent( tqparent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast<FormWindow*>(tqparent) ) { - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)tqparent, wiz, "WizardPage" ); + wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); + if ( init && ::tqqt_cast<FormWindow*>(parent) ) { + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); wiz->addPage( dw, i18n( "Page" ) ); TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); } return wiz; } else if ( className == "Spacer" ) { - Spacer *s = new Spacer( tqparent, name ); + Spacer *s = new Spacer( parent, name ); MetaDataBase::addEntry( TQT_TQOBJECT(s) ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); @@ -890,17 +890,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa s->setOrientation( Qt::Horizontal ); return s; } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) - return new TQLCDNumber( tqparent, name ); + return new TQLCDNumber( parent, name ); else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) - return new TQProgressBar( tqparent, name ); + return new TQProgressBar( parent, name ); else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) - return new TQTextView( tqparent, name ); + return new TQTextView( parent, name ); else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) - return new TQTextBrowser( tqparent, name ); + return new TQTextBrowser( parent, name ); else if ( className == TQDIAL_OBJECT_NAME_STRING ) - return new TQDial( tqparent, name ); + return new TQDial( parent, name ); else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { - TQSlider *s = new TQSlider( tqparent, name ); + TQSlider *s = new TQSlider( parent, name ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -911,7 +911,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); return s; } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { - TQScrollBar *s = new TQScrollBar( tqparent, name ); + TQScrollBar *s = new TQScrollBar( parent, name ); if ( !r ) return s; if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) @@ -923,12 +923,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return s; } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { if ( !init ) - return new TQFrame( tqparent, name ); - TQFrame *f = new TQFrame( tqparent, name ); + return new TQFrame( parent, name ); + TQFrame *f = new TQFrame( parent, name ); f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); return f; } else if ( className == "Line" ) { - Line *l = new Line( tqparent, name ); + Line *l = new Line( parent, name ); MetaDataBase::addEntry( TQT_TQOBJECT(l) ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); @@ -941,9 +941,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa l->setOrientation( Qt::Vertical ); return l; } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { - TQMainWindow *mw = new TQMainWindow( tqparent, name, 0 ); + TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); mw->setDockEnabled( TQt::DockMinimized, FALSE ); - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)tqparent, mw, "central widget" ); + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); mw->setDockMenuEnabled( FALSE ); MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); mw->setCentralWidget( dw ); @@ -952,9 +952,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa return mw; } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { if ( !init ) - return new QDesignerToolBox( tqparent, name ); - TQToolBox *tb = new QDesignerToolBox( tqparent, name ); - FormWindow *fw = find_formwindow( tqparent ); + return new QDesignerToolBox( parent, name ); + TQToolBox *tb = new QDesignerToolBox( parent, name ); + FormWindow *fw = find_formwindow( parent ); TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : new TQWidget( tb, "page1" ); tb->addItem( w, i18n("Page 1") ); @@ -967,14 +967,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa } #ifndef TQT_NO_SQL else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataBrowser( tqparent, name ); - if ( tqparent ) - w->reparent( tqparent, TQPoint( 0, 0 ), TRUE ); + TQWidget *w = new QDesignerDataBrowser( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); return w; } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataView( tqparent, name ); - if ( tqparent ) - w->reparent( tqparent, TQPoint( 0, 0 ), TRUE ); + TQWidget *w = new QDesignerDataView( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); return w; } #endif @@ -984,7 +984,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa if ( !iface ) return 0; - TQWidget *w = iface->create( className, tqparent, name ); + TQWidget *w = iface->create( className, parent, name ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) { TQWidgetContainerInterfacePrivate *iface2 = 0; @@ -1075,7 +1075,7 @@ TQWidget *WidgetFactory::layoutParent( TQLayout *tqlayout ) while ( o ) { if ( o->isWidgetType() ) return (TQWidget*)o; - o = o->tqparent(); + o = o->parent(); } return 0; } @@ -1124,10 +1124,10 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) } /*! Returns the actual designer widget of the container \a w. This is - normally \a w itself, but might be a tqparent or grand tqparent of \a w + normally \a w itself, but might be a parent or grand parent of \a w (e.g. when working with a tabwidget and \a w is the container which contains and layouts childs, but the actual widget known to the - designer is the tabwidget which is the tqparent of \a w. So this + designer is the tabwidget which is the parent of \a w. So this function returns the tabwidget then.) */ @@ -1170,11 +1170,11 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) else if ( ::tqqt_cast<TQSizeGrip*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( ::tqqt_cast<TQButton*>(o) && - ( ::tqqt_cast<TQTabBar*>(o->tqparent()) || ::tqqt_cast<TQToolBox*>(o->tqparent()) ) ) + ( ::tqqt_cast<TQTabBar*>(o->parent()) || ::tqqt_cast<TQToolBox*>(o->parent()) ) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQPushButton*>(o) && ::tqqt_cast<TQWizard*>(o->tqparent()) ) + else if ( ::tqqt_cast<TQPushButton*>(o) && ::tqqt_cast<TQWizard*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQMenuBar*>(o) && ::tqqt_cast<TQMainWindow*>(o->tqparent()) ) + else if ( ::tqqt_cast<TQMenuBar*>(o) && ::tqqt_cast<TQMainWindow*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); // else if ( ::tqqt_cast<TQDockWindowHandle*>(o) ) else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) @@ -1314,7 +1314,7 @@ void WidgetFactory::initChangedProperties( TQObject *o ) ::tqqt_cast<TQRadioButton*>(o) || ::tqqt_cast<TQCheckBox*>(o) || ::tqqt_cast<TQToolButton*>(o) ) { - if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->tqparent()))) { + if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); @@ -1400,14 +1400,14 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) return FALSE; } -void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw ) +void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) { TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) { if ( !::tqqt_cast<TQListBox*>(editWidget) ) return; - ListBoxEditor *e = new ListBoxEditor( tqparent, editWidget, fw ); + ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); e->exec(); delete e; return; @@ -1417,7 +1417,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget if ( !::tqqt_cast<TQComboBox*>(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; - ListBoxEditor *e = new ListBoxEditor( tqparent, cb->listBox(), fw ); + ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); e->exec(); delete e; cb->update(); @@ -1428,7 +1428,7 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget if ( !::tqqt_cast<TQListView*>(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; - ListViewEditor *e = new ListViewEditor( tqparent, lv, fw ); + ListViewEditor *e = new ListViewEditor( parent, lv, fw ); e->exec(); delete e; return; @@ -1437,21 +1437,21 @@ void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget if ( className.contains( "IconView" ) ) { if ( !::tqqt_cast<TQIconView*>(editWidget) ) return; - IconViewEditor *e = new IconViewEditor( tqparent, editWidget, fw ); + IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); e->exec(); delete e; return; } if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { - MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, tqparent, editWidget, fw ); + MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); e->exec(); delete e; return; } #ifndef TQT_NO_TABLE if (::tqqt_cast<TQTable*>(editWidget) != 0) { - TableEditor *e = new TableEditor( tqparent, editWidget, fw ); + TableEditor *e = new TableEditor( parent, editWidget, fw ); e->exec(); delete e; return; @@ -1527,11 +1527,11 @@ TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propNam return p->valueToKey( defaultValue( w, propName ).toInt() ); } -TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w ) +TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) { if ( !w ) return 0; - return new CustomWidget( tqparent, name, w ); + return new CustomWidget( parent, name, w ); } TQVariant WidgetFactory::property( TQObject *w, const char *name ) @@ -1601,7 +1601,7 @@ bool TQLayoutWidget::event( TQEvent *e ) /* This function must be called on TQLayoutWidget creation and whenever - the TQLayoutWidget's tqparent tqlayout changes (e.g., from a TQHBoxLayout + the TQLayoutWidget's parent tqlayout changes (e.g., from a TQHBoxLayout to a TQVBoxLayout), because of the (illogical) way layouting works. */ void TQLayoutWidget::updateSizePolicy() @@ -1626,12 +1626,12 @@ void TQLayoutWidget::updateSizePolicy() if ( tqlayout() ) { /* - parentLayout is set to the tqparent tqlayout if there is one and if it is + parentLayout is set to the parent tqlayout if there is one and if it is top level, in which case layouting is illogical. */ TQLayout *parentLayout = 0; - if ( tqparent() && tqparent()->isWidgetType() ) { - parentLayout = ((TQWidget *)tqparent())->tqlayout(); + if ( parent() && parent()->isWidgetType() ) { + parentLayout = ((TQWidget *)parent())->tqlayout(); if ( parentLayout && ::tqqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) parentLayout = 0; @@ -1748,17 +1748,17 @@ CustomWidgetFactory::CustomWidgetFactory() { } -TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *tqparent, const char *name ) const +TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const { MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) ); if ( !w ) return 0; - return WidgetFactory::createCustomWidget( tqparent, name, w ); + return WidgetFactory::createCustomWidget( parent, name, w ); } -QDesignerToolBox::QDesignerToolBox( TQWidget *tqparent, const char *name ) - : TQToolBox( tqparent, name ) +QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) + : TQToolBox( parent, name ) { } |