diff options
Diffstat (limited to 'kdevdesigner/designer/widgetfactory.cpp')
-rw-r--r-- | kdevdesigner/designer/widgetfactory.cpp | 238 |
1 files changed, 119 insertions, 119 deletions
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 8c58a328..00a4fa07 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -107,7 +107,7 @@ FormWindow *find_formwindow( TQWidget *w ) if ( !w ) return 0; for (;;) { - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) return (FormWindow*)w; if ( !w->parentWidget() ) return 0; @@ -537,7 +537,7 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo TQString str = WidgetDatabase::createWidgetName( id ); const char *s = str.latin1(); w = createWidget( n, parent, name ? name : s, init, r, orient ); - if ( ::tqqt_cast<TQScrollView*>(w) ) + if ( ::tqt_cast<TQScrollView*>(w) ) ( (TQScrollView*)w )->disableSizeHintCaching(); if ( !w && WidgetDatabase::isCustomWidget( id ) ) w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); @@ -565,31 +565,31 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); - if ( ::tqqt_cast<TQLayoutWidget*>(widget) && + if ( ::tqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) + widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); - if ( !layout && ::tqqt_cast<TQTabWidget*>(widget) ) + if ( !layout && ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( !layout && ::tqqt_cast<TQWizard*>(widget) ) + if ( !layout && ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( !layout && ::tqqt_cast<TQMainWindow*>(widget) ) + if ( !layout && ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( !layout && ::tqqt_cast<TQWidgetStack*>(widget) ) + if ( !layout && ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( !layout && ::tqqt_cast<TQToolBox*>(widget) ) + if ( !layout && ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); TQLayout *l = 0; int align = 0; - if ( !layout && ::tqqt_cast<TQGroupBox*>(widget) ) { + if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) { TQGroupBox *gb = (TQGroupBox*)widget; gb->setColumnLayout( 0, TQt::Vertical ); layout = gb->layout(); @@ -663,15 +663,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget ) if ( !widget ) return; - if ( ::tqqt_cast<TQTabWidget*>(widget) ) + if ( ::tqt_cast<TQTabWidget*>(widget) ) widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(widget) ) + if ( ::tqt_cast<TQWizard*>(widget) ) widget = ((TQWizard*)widget)->currentPage(); - if ( ::tqqt_cast<TQMainWindow*>(widget) ) + if ( ::tqt_cast<TQMainWindow*>(widget) ) widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::tqqt_cast<TQWidgetStack*>(widget) ) + if ( ::tqt_cast<TQWidgetStack*>(widget) ) widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(widget) ) + if ( ::tqt_cast<TQToolBox*>(widget) ) widget = ((TQToolBox*)widget)->currentItem(); delete widget->layout(); } @@ -695,12 +695,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare b = new QDesignerPushButton( parent, name ); } TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::tqqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); + b->setAutoDefault( w && ::tqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) ); return b; } else if ( className == "TQToolButton" ) { if ( init ) { QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); - if ( ::tqqt_cast<TQToolBox*>(widgetOfContainer(parent))) { + if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) { tb->setUsesTextLabel(TRUE); tb->setTextLabel("..."); tb->setAutoRaise(TRUE); @@ -833,12 +833,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQComboBox( FALSE, parent, name ); } else if ( className == "TQWidget" ) { 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) ) ) { + ( ::tqt_cast<FormWindow*>(parent) || + ::tqt_cast<TQWizard*>(parent) || + ::tqt_cast<TQTabWidget*>(parent) || + ::tqt_cast<TQWidgetStack*>(parent) || + ::tqt_cast<TQToolBox*>(parent) || + ::tqt_cast<TQMainWindow*>(parent) ) ) { FormWindow *fw = find_formwindow( parent ); if ( fw ) { QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); @@ -849,7 +849,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare return new TQWidget( parent, name ); } else if ( className == "TQDialog" ) { TQDialog *dia = 0; - if ( ::tqqt_cast<FormWindow*>(parent) ) + if ( ::tqt_cast<FormWindow*>(parent) ) dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); else dia = new TQDialog( parent, name ); @@ -860,7 +860,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare TQWizard *wiz = new QDesignerWizard( parent, name ); if ( parent ) wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast<FormWindow*>(parent) ) { + if ( init && ::tqt_cast<FormWindow*>(parent) ) { QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); wiz->addPage( dw, i18n( "Page" ) ); @@ -1002,25 +1002,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay { layout = 0; - if ( ::tqqt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) w = ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) w = ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) w = ((TQMainWindow*)w)->centralWidget(); - if ( ::tqqt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) w = ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast<TQSplitter*>(w) ) + if ( ::tqt_cast<TQSplitter*>(w) ) return ( (TQSplitter*)w )->orientation() ==TQt::Horizontal ? HBox : VBox; if ( !w || !w->layout() ) return NoLayout; TQLayout *lay = w->layout(); - if ( ::tqqt_cast<TQGroupBox*>(w) ) { + if ( ::tqt_cast<TQGroupBox*>(w) ) { TQObjectList *l = TQT_TQOBJECT(lay)->queryList( "TQLayout" ); if ( l && l->first() ) lay = (TQLayout*)l->first(); @@ -1028,11 +1028,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay } layout = lay; - if ( ::tqqt_cast<TQHBoxLayout*>(lay) ) + if ( ::tqt_cast<TQHBoxLayout*>(lay) ) return HBox; - else if ( ::tqqt_cast<TQVBoxLayout*>(lay) ) + else if ( ::tqt_cast<TQVBoxLayout*>(lay) ) return VBox; - else if ( ::tqqt_cast<TQGridLayout*>(lay) ) + else if ( ::tqt_cast<TQGridLayout*>(lay) ) return Grid; return NoLayout; } @@ -1042,11 +1042,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay */ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) { - if ( ::tqqt_cast<TQHBoxLayout*>(layout) ) + if ( ::tqt_cast<TQHBoxLayout*>(layout) ) return HBox; - else if ( ::tqqt_cast<TQVBoxLayout*>(layout) ) + else if ( ::tqt_cast<TQVBoxLayout*>(layout) ) return VBox; - else if ( ::tqqt_cast<TQGridLayout*>(layout) ) + else if ( ::tqt_cast<TQGridLayout*>(layout) ) return Grid; return NoLayout; } @@ -1085,15 +1085,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) { if ( !w ) return w; - if ( ::tqqt_cast<TQTabWidget*>(w) ) + if ( ::tqt_cast<TQTabWidget*>(w) ) return ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast<TQWizard*>(w) ) + if ( ::tqt_cast<TQWizard*>(w) ) return ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast<TQWidgetStack*>(w) ) + if ( ::tqt_cast<TQWidgetStack*>(w) ) return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast<TQToolBox*>(w) ) + if ( ::tqt_cast<TQToolBox*>(w) ) return ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast<TQMainWindow*>(w) ) + if ( ::tqt_cast<TQMainWindow*>(w) ) return ((TQMainWindow*)w)->centralWidget(); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) @@ -1125,16 +1125,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w && ::tqqt_cast<TQWidgetStack*>(w->parentWidget()) ) + if ( w && ::tqt_cast<TQWidgetStack*>(w->parentWidget()) ) w = w->parentWidget(); if ( w->parentWidget() && w->parentWidget()->parentWidget() && w->parentWidget()->parentWidget()->parentWidget() && - ::tqqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) + ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) ) return w->parentWidget()->parentWidget()->parentWidget(); while ( w ) { int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); if ( WidgetDatabase::isContainer( id ) || - w && ::tqqt_cast<FormWindow*>(w->parentWidget()) ) + w && ::tqt_cast<FormWindow*>(w->parentWidget()) ) return w; w = w->parentWidget(); } @@ -1157,21 +1157,21 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things return ( lastWasAPassiveInteractor = TRUE ); - if ( ::tqqt_cast<TQTabBar*>(o) ) + if ( ::tqt_cast<TQTabBar*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQSizeGrip*>(o) ) + else if ( ::tqt_cast<TQSizeGrip*>(o) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQButton*>(o) && - ( ::tqqt_cast<TQTabBar*>(o->parent()) || ::tqqt_cast<TQToolBox*>(o->parent()) ) ) + else if ( ::tqt_cast<TQButton*>(o) && + ( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQPushButton*>(o) && ::tqqt_cast<TQWizard*>(o->parent()) ) + else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast<TQMenuBar*>(o) && ::tqqt_cast<TQMainWindow*>(o->parent()) ) + else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast<TQDockWindowHandle*>(o) ) +// else if ( ::tqt_cast<TQDockWindowHandle*>(o) ) else if ( o->inherits( "TQDockWindowHandle" ) ) return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast<TQHideDock*>(o) ) +// else if ( ::tqt_cast<TQHideDock*>(o) ) else if ( o->inherits( "TQHideDock" ) ) return ( lastWasAPassiveInteractor = TRUE ); else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) @@ -1181,7 +1181,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) return ( lastWasAPassiveInteractor = FALSE ); WidgetInterface *iface = 0; TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::tqqt_cast<FormWindow*>(w) ) { + while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) { widgetManager()->queryInterface( classNameOf( w ), &iface ); w = w->parentWidget(); } @@ -1214,46 +1214,46 @@ const char* WidgetFactory::classNameOf( TQObject* o ) return o->className(); if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) return o->className(); - else if ( ::tqqt_cast<QDesignerTabWidget*>(o) ) + else if ( ::tqt_cast<QDesignerTabWidget*>(o) ) return "TQTabWidget"; - else if ( ::tqqt_cast<QDesignerWidgetStack*>(o) ) + else if ( ::tqt_cast<QDesignerWidgetStack*>(o) ) return "TQWidgetStack"; - else if ( ::tqqt_cast<TQWidgetStack*>(o) ) + else if ( ::tqt_cast<TQWidgetStack*>(o) ) return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::tqqt_cast<QDesignerDialog*>(o) ) + else if ( ::tqt_cast<QDesignerDialog*>(o) ) return "TQDialog"; - else if ( ::tqqt_cast<QDesignerWidget*>(o) ) + else if ( ::tqt_cast<QDesignerWidget*>(o) ) return "TQWidget"; else if ( o->inherits( "CustomWidget" ) ) return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::tqqt_cast<QDesignerLabel*>(o) ) + else if ( ::tqt_cast<QDesignerLabel*>(o) ) return "TQLabel"; - else if ( ::tqqt_cast<QDesignerWizard*>(o) ) + else if ( ::tqt_cast<QDesignerWizard*>(o) ) return "TQWizard"; - else if ( ::tqqt_cast<QDesignerPushButton*>(o) ) + else if ( ::tqt_cast<QDesignerPushButton*>(o) ) return "TQPushButton"; - else if ( ::tqqt_cast<QDesignerToolButton*>(o) ) + else if ( ::tqt_cast<QDesignerToolButton*>(o) ) return "TQToolButton"; - else if ( ::tqqt_cast<QDesignerRadioButton*>(o) ) + else if ( ::tqt_cast<QDesignerRadioButton*>(o) ) return "TQRadioButton"; - else if ( ::tqqt_cast<QDesignerCheckBox*>(o) ) + else if ( ::tqt_cast<QDesignerCheckBox*>(o) ) return "TQCheckBox"; - else if ( ::tqqt_cast<MenuBarEditor*>(o) ) + else if ( ::tqt_cast<MenuBarEditor*>(o) ) return "TQMenuBar"; - else if ( ::tqqt_cast<QDesignerToolBar*>(o) ) + else if ( ::tqt_cast<QDesignerToolBar*>(o) ) return "TQToolBar"; - else if ( ::tqqt_cast<QDesignerAction*>(o) ) + else if ( ::tqt_cast<QDesignerAction*>(o) ) return "TQAction"; - else if ( ::tqqt_cast<QDesignerActionGroup*>(o) ) + else if ( ::tqt_cast<QDesignerActionGroup*>(o) ) return "TQActionGroup"; - else if ( ::tqqt_cast<PopupMenuEditor*>(o) ) + else if ( ::tqt_cast<PopupMenuEditor*>(o) ) return "TQPopupMenu"; - else if ( ::tqqt_cast<QDesignerToolBox*>(o) ) + else if ( ::tqt_cast<QDesignerToolBox*>(o) ) return "TQToolBox"; #ifndef TQT_NO_SQL - else if ( ::tqqt_cast<QDesignerDataBrowser*>(o) ) + else if ( ::tqt_cast<QDesignerDataBrowser*>(o) ) return "TQDataBrowser"; - else if ( ::tqqt_cast<QDesignerDataView*>(o) ) + else if ( ::tqt_cast<QDesignerDataView*>(o) ) return "TQDataView"; #endif return o->className(); @@ -1261,29 +1261,29 @@ const char* WidgetFactory::classNameOf( TQObject* o ) TQString WidgetFactory::defaultSignal( TQObject *w ) { - if ( ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQCheckBox*>(w) ) + if ( ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQCheckBox*>(w) ) return "toggled"; - else if ( ::tqqt_cast<TQButton*>(w) || ::tqqt_cast<TQButtonGroup*>(w) ) + else if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQButtonGroup*>(w) ) return "clicked"; - else if ( ::tqqt_cast<TQTextBrowser*>(w) ) + else if ( ::tqt_cast<TQTextBrowser*>(w) ) return "linkClicked"; - else if ( ::tqqt_cast<TQLineEdit*>(w) || ::tqqt_cast<TQTextEdit*>(w) ) + else if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) ) return "textChanged"; - else if ( ::tqqt_cast<TQListView*>(w) || ::tqqt_cast<TQIconView*>(w) || - ::tqqt_cast<TQListBox*>(w) || ::tqqt_cast<TQTable*>(w) ) + else if ( ::tqt_cast<TQListView*>(w) || ::tqt_cast<TQIconView*>(w) || + ::tqt_cast<TQListBox*>(w) || ::tqt_cast<TQTable*>(w) ) return "selectionChanged"; - else if ( ::tqqt_cast<TQTabWidget*>(w) ) + else if ( ::tqt_cast<TQTabWidget*>(w) ) return "selected"; - else if ( ::tqqt_cast<TQToolBox*>(w) ) + else if ( ::tqt_cast<TQToolBox*>(w) ) return "currentChanged"; - else if ( ::tqqt_cast<TQWidgetStack*>(w) ) + else if ( ::tqt_cast<TQWidgetStack*>(w) ) return "aboutToShow"; - else if ( ::tqqt_cast<TQSpinBox*>(w) || ::tqqt_cast<TQSlider*>(w) || - ::tqqt_cast<TQScrollBar*>(w) || ::tqqt_cast<TQDateEdit*>(w) || - ::tqqt_cast<TQTimeEdit*>(w) || ::tqqt_cast<TQDateTimeEdit*>(w) || - ::tqqt_cast<TQDial*>(w) ) + else if ( ::tqt_cast<TQSpinBox*>(w) || ::tqt_cast<TQSlider*>(w) || + ::tqt_cast<TQScrollBar*>(w) || ::tqt_cast<TQDateEdit*>(w) || + ::tqt_cast<TQTimeEdit*>(w) || ::tqt_cast<TQDateTimeEdit*>(w) || + ::tqt_cast<TQDial*>(w) ) return "valueChanged"; - else if ( ::tqqt_cast<TQComboBox*>(w) ) + else if ( ::tqt_cast<TQComboBox*>(w) ) return "activated"; return TQString(); } @@ -1299,14 +1299,14 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MainWindow::self->currProject()->fakeFormFileFor( o ) ) return; MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::tqqt_cast<QDesignerToolBar*>(o) && !::tqqt_cast<MenuBarEditor*>(o) ) + if ( !::tqt_cast<QDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) ) MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - if ( ::tqqt_cast<TQPushButton*>(o) || - ::tqqt_cast<TQRadioButton*>(o) || - ::tqqt_cast<TQCheckBox*>(o) || - ::tqqt_cast<TQToolButton*>(o) ) { - if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { + if ( ::tqt_cast<TQPushButton*>(o) || + ::tqt_cast<TQRadioButton*>(o) || + ::tqt_cast<TQCheckBox*>(o) || + ::tqt_cast<TQToolButton*>(o) ) { + if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) { MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); @@ -1315,19 +1315,19 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "text", TRUE ); } } - else if ( ::tqqt_cast<TQGroupBox*>(o) ) + else if ( ::tqt_cast<TQGroupBox*>(o) ) MetaDataBase::setPropertyChanged( o, "title", TRUE ); else if ( o->isA( "TQFrame" ) ) { MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::tqqt_cast<TQTabWidget*>(o) || ::tqqt_cast<TQWizard*>(o) ) { + } else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) { MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - } else if ( ::tqqt_cast<TQWidgetStack*>(o) ) { + } else if ( ::tqt_cast<TQWidgetStack*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::tqqt_cast<TQToolBox*>(o) ) { + } else if ( ::tqt_cast<TQToolBox*>(o) ) { MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); @@ -1335,9 +1335,9 @@ void WidgetFactory::initChangedProperties( TQObject *o ) MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); #ifndef TQT_NO_TABLE - } else if ( ::tqqt_cast<TQTable*>(o) ) { + } else if ( ::tqt_cast<TQTable*>(o) ) { # ifndef TQT_NO_SQL - if (!::tqqt_cast<TQDataTable*>(o) ) + if (!::tqt_cast<TQDataTable*>(o) ) # endif { MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); @@ -1349,11 +1349,11 @@ void WidgetFactory::initChangedProperties( TQObject *o ) } } #endif - } else if ( ::tqqt_cast<TQSplitter*>(o) ) { + } else if ( ::tqt_cast<TQSplitter*>(o) ) { MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::tqqt_cast<QDesignerToolBar*>(o) ) { + } else if ( ::tqt_cast<QDesignerToolBar*>(o) ) { MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) { + } else if ( ::tqt_cast<MenuBarEditor*>(o) ) { MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); @@ -1374,7 +1374,7 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) return TRUE; if ( className == "TQTextEdit" || className == "TQMultiLineEdit" ) return TRUE; - if ( ::tqqt_cast<TQTable*>(editorWidget) != 0 ) + if ( ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1386,7 +1386,7 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::tqqt_cast<TQTable*>(editorWidget) != 0 ) + ::tqt_cast<TQTable*>(editorWidget) != 0 ) return TRUE; return FALSE; @@ -1397,7 +1397,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, TQString className = WidgetDatabase::className( id ); if ( className.contains( "ListBox" ) ) { - if ( !::tqqt_cast<TQListBox*>(editWidget) ) + if ( !::tqt_cast<TQListBox*>(editWidget) ) return; ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); e->exec(); @@ -1406,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ComboBox" ) ) { - if ( !::tqqt_cast<TQComboBox*>(editWidget) ) + if ( !::tqt_cast<TQComboBox*>(editWidget) ) return; TQComboBox *cb = (TQComboBox*)editWidget; ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); @@ -1417,7 +1417,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "ListView" ) ) { - if ( !::tqqt_cast<TQListView*>(editWidget) ) + if ( !::tqt_cast<TQListView*>(editWidget) ) return; TQListView *lv = (TQListView*)editWidget; ListViewEditor *e = new ListViewEditor( parent, lv, fw ); @@ -1427,7 +1427,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, } if ( className.contains( "IconView" ) ) { - if ( !::tqqt_cast<TQIconView*>(editWidget) ) + if ( !::tqt_cast<TQIconView*>(editWidget) ) return; IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); e->exec(); @@ -1442,7 +1442,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, return; } #ifndef TQT_NO_TABLE - if (::tqqt_cast<TQTable*>(editWidget) != 0) { + if (::tqt_cast<TQTable*>(editWidget) != 0) { TableEditor *e = new TableEditor( parent, editWidget, fw ); e->exec(); delete e; @@ -1625,15 +1625,15 @@ void TQLayoutWidget::updateSizePolicy() if ( parent() && parent()->isWidgetType() ) { parentLayout = ((TQWidget *)parent())->layout(); if ( parentLayout && - ::tqqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) + ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) parentLayout = 0; } TQObjectListIt it( childrenListObject() ); TQObject *o; - if ( ::tqqt_cast<TQVBoxLayout*>(layout()) ) { - if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; else vt = TQSizePolicy::Fixed; @@ -1653,8 +1653,8 @@ void TQLayoutWidget::updateSizePolicy() if ( w->sizePolicy().mayShrinkVertically() ) vt |= TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast<TQHBoxLayout*>(layout()) ) { - if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) + } else if ( ::tqt_cast<TQHBoxLayout*>(layout()) ) { + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; else ht = TQSizePolicy::Fixed; @@ -1674,13 +1674,13 @@ void TQLayoutWidget::updateSizePolicy() if ( !w->sizePolicy().mayShrinkVertically() ) vt &= ~TQSizePolicy::Maximum; } - } else if ( ::tqqt_cast<TQGridLayout*>(layout()) ) { + } else if ( ::tqt_cast<TQGridLayout*>(layout()) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; if ( parentLayout ) { - if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) + if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) + else if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; } @@ -1714,7 +1714,7 @@ void TQLayoutWidget::updateSizePolicy() void CustomWidget::paintEvent( TQPaintEvent *e ) { - if ( ::tqqt_cast<FormWindow*>(parentWidget()) ) { + if ( ::tqt_cast<FormWindow*>(parentWidget()) ) { ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); |