@ -677,29 +677,29 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int spacing = MainWindow : : self - > currentLayoutDefaultSpacing ( ) ;
int spacing = MainWindow : : self - > currentLayoutDefaultSpacing ( ) ;
int margin = 0 ;
int margin = 0 ;
if ( widget & & ! widget - > inherits ( " QLayoutWidget " ) & &
if ( widget & & ! widget - > inherits ( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) & &
( WidgetDatabase : : isContainer ( WidgetDatabase : : idFromClassName ( WidgetFactory : : classNameOf ( widget ) ) ) | |
( WidgetDatabase : : isContainer ( WidgetDatabase : : idFromClassName ( WidgetFactory : : classNameOf ( widget ) ) ) | |
widget & & widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > inherits ( " FormWindow " ) ) )
widget & & widget - > parentWidget ( ) & & widget - > parentWidget ( ) - > inherits ( " FormWindow " ) ) )
margin = MainWindow : : self - > currentLayoutDefaultMargin ( ) ;
margin = MainWindow : : self - > currentLayoutDefaultMargin ( ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQTabWidget " ) )
if ( ! layout & & widget & & widget - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ( ( TQTabWidget * ) widget ) - > currentPage ( ) ;
widget = ( ( TQTabWidget * ) widget ) - > currentPage ( ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQToolBox " ) )
if ( ! layout & & widget & & widget - > inherits ( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ( ( TQToolBox * ) widget ) - > currentItem ( ) ;
widget = ( ( TQToolBox * ) widget ) - > currentItem ( ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQWizard " ) )
if ( ! layout & & widget & & widget - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ( ( TQWizard * ) widget ) - > currentPage ( ) ;
widget = ( ( TQWizard * ) widget ) - > currentPage ( ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQMainWindow " ) )
if ( ! layout & & widget & & widget - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ( ( TQMainWindow * ) widget ) - > centralWidget ( ) ;
widget = ( ( TQMainWindow * ) widget ) - > centralWidget ( ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQWidgetStack " ) )
if ( ! layout & & widget & & widget - > inherits ( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ( ( TQWidgetStack * ) widget ) - > visibleWidget ( ) ;
widget = ( ( TQWidgetStack * ) widget ) - > visibleWidget ( ) ;
MetaDataBase : : addEntry ( widget ) ;
MetaDataBase : : addEntry ( widget ) ;
if ( ! layout & & widget & & widget - > inherits ( " TQGroupBox " ) ) {
if ( ! layout & & widget & & widget - > inherits ( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox * gb = ( TQGroupBox * ) widget ;
TQGroupBox * gb = ( TQGroupBox * ) widget ;
gb - > setColumnLayout ( 0 , Qt : : Vertical ) ;
gb - > setColumnLayout ( 0 , Qt : : Vertical ) ;
gb - > layout ( ) - > setMargin ( 0 ) ;
gb - > layout ( ) - > setMargin ( 0 ) ;
@ -811,13 +811,13 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
if ( ! widget )
if ( ! widget )
return ;
return ;
if ( widget - > inherits ( " TQTabWidget " ) )
if ( widget - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ( ( TQTabWidget * ) widget ) - > currentPage ( ) ;
widget = ( ( TQTabWidget * ) widget ) - > currentPage ( ) ;
if ( widget - > inherits ( " TQWizard " ) )
if ( widget - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ( ( TQWizard * ) widget ) - > currentPage ( ) ;
widget = ( ( TQWizard * ) widget ) - > currentPage ( ) ;
if ( widget - > inherits ( " TQMainWindow " ) )
if ( widget - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ( ( TQMainWindow * ) widget ) - > centralWidget ( ) ;
widget = ( ( TQMainWindow * ) widget ) - > centralWidget ( ) ;
if ( widget - > inherits ( " TQWidgetStack " ) )
if ( widget - > inherits ( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ( ( TQWidgetStack * ) widget ) - > visibleWidget ( ) ;
widget = ( ( TQWidgetStack * ) widget ) - > visibleWidget ( ) ;
delete widget - > layout ( ) ;
delete widget - > layout ( ) ;
}
}
@ -832,7 +832,7 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
TQWidget * WidgetFactory : : createWidget ( const TQString & className , TQWidget * parent , const char * name , bool init ,
TQWidget * WidgetFactory : : createWidget ( const TQString & className , TQWidget * parent , const char * name , bool init ,
const TQRect * r , Qt : : Orientation orient )
const TQRect * r , Qt : : Orientation orient )
{
{
if ( className = = " TQPushButton " )
if ( className = = TQPUSHBUTTON_OBJECT_NAME_STRING )
{
{
TQPushButton * b = 0 ;
TQPushButton * b = 0 ;
if ( init )
if ( init )
@ -844,9 +844,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
b = new QDesignerPushButton ( parent , name ) ;
b = new QDesignerPushButton ( parent , name ) ;
}
}
TQWidget * w = find_formwindow ( b ) ;
TQWidget * w = find_formwindow ( b ) ;
b - > setAutoDefault ( w & & ( ( FormWindow * ) w ) - > mainContainer ( ) - > inherits ( " TQDialog " ) ) ;
b - > setAutoDefault ( w & & ( ( FormWindow * ) w ) - > mainContainer ( ) - > inherits ( TQDIALOG_OBJECT_NAME_STRING ) ) ;
return b ;
return b ;
} else if ( className = = " TQToolButton " )
} else if ( className = = TQTOOLBUTTON_OBJECT_NAME_STRING )
{
{
if ( init )
if ( init )
{
{
@ -855,7 +855,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return tb ;
return tb ;
}
}
return new QDesignerToolButton ( parent , name ) ;
return new QDesignerToolButton ( parent , name ) ;
} else if ( className = = " TQCheckBox " )
} else if ( className = = TQCHECKBOX_OBJECT_NAME_STRING )
{
{
if ( init )
if ( init )
{
{
@ -864,7 +864,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return cb ;
return cb ;
}
}
return new QDesignerCheckBox ( parent , name ) ;
return new QDesignerCheckBox ( parent , name ) ;
} else if ( className = = " TQRadioButton " )
} else if ( className = = TQRADIOBUTTON_OBJECT_NAME_STRING )
{
{
if ( init )
if ( init )
{
{
@ -873,17 +873,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return rb ;
return rb ;
}
}
return new QDesignerRadioButton ( parent , name ) ;
return new QDesignerRadioButton ( parent , name ) ;
} else if ( className = = " TQGroupBox " )
} else if ( className = = TQGROUPBOX_OBJECT_NAME_STRING )
{
{
if ( init )
if ( init )
return new TQGroupBox ( TQString : : fromLatin1 ( name ) , parent , name ) ;
return new TQGroupBox ( TQString : : fromLatin1 ( name ) , parent , name ) ;
return new TQGroupBox ( parent , name ) ;
return new TQGroupBox ( parent , name ) ;
} else if ( className = = " TQButtonGroup " )
} else if ( className = = TQBUTTONGROUP_OBJECT_NAME_STRING )
{
{
if ( init )
if ( init )
return new TQButtonGroup ( TQString : : fromLatin1 ( name ) , parent , name ) ;
return new TQButtonGroup ( TQString : : fromLatin1 ( name ) , parent , name ) ;
return new TQButtonGroup ( parent , name ) ;
return new TQButtonGroup ( parent , name ) ;
} else if ( className = = " TQIconView " )
} else if ( className = = TQICONVIEW_OBJECT_NAME_STRING )
{
{
# if !defined(QT_NO_ICONVIEW)
# if !defined(QT_NO_ICONVIEW)
TQIconView * iv = new TQIconView ( parent , name ) ;
TQIconView * iv = new TQIconView ( parent , name ) ;
@ -893,7 +893,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
# else
# else
return 0 ;
return 0 ;
# endif
# endif
} else if ( className = = " TQTable " )
} else if ( className = = TQTABLE_OBJECT_NAME_STRING )
{
{
# if !defined(QT_NO_TABLE)
# if !defined(QT_NO_TABLE)
if ( init )
if ( init )
@ -903,20 +903,20 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return 0 ;
return 0 ;
# endif
# endif
# ifndef QT_NO_SQL
# ifndef QT_NO_SQL
} else if ( className = = " TQDataTable " )
} else if ( className = = TQDATATABLE_OBJECT_NAME_STRING )
{
{
return new TQDataTable ( parent , name ) ;
return new TQDataTable ( parent , name ) ;
# endif //QT_NO_SQL
# endif //QT_NO_SQL
} else if ( className = = " QDateEdit " )
} else if ( className = = TQDATEEDIT_OBJECT_NAME_STRING )
{
{
return new QDateEdit ( parent , name ) ;
return new QDateEdit ( parent , name ) ;
} else if ( className = = " QTimeEdit " )
} else if ( className = = TQTIMEEDIT_OBJECT_NAME_STRING )
{
{
return new QTimeEdit ( parent , name ) ;
return new QTimeEdit ( parent , name ) ;
} else if ( className = = " QDateTimeEdit " )
} else if ( className = = TQDATETIMEEDIT_OBJECT_NAME_STRING )
{
{
return new QDateTimeEdit ( parent , name ) ;
return new QDateTimeEdit ( parent , name ) ;
} else if ( className = = " TQListBox " )
} else if ( className = = TQLISTBOX_OBJECT_NAME_STRING )
{
{
TQListBox * lb = new TQListBox ( parent , name ) ;
TQListBox * lb = new TQListBox ( parent , name ) ;
if ( init )
if ( init )
@ -925,7 +925,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
lb - > setCurrentItem ( 0 ) ;
lb - > setCurrentItem ( 0 ) ;
}
}
return lb ;
return lb ;
} else if ( className = = " TQListView " )
} else if ( className = = TQLISTVIEW_OBJECT_NAME_STRING )
{
{
TQListView * lv = new TQListView ( parent , name ) ;
TQListView * lv = new TQListView ( parent , name ) ;
lv - > setSorting ( - 1 ) ;
lv - > setSorting ( - 1 ) ;
@ -935,17 +935,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
lv - > setCurrentItem ( new TQListViewItem ( lv , i18n ( " New Item " ) ) ) ;
lv - > setCurrentItem ( new TQListViewItem ( lv , i18n ( " New Item " ) ) ) ;
}
}
return lv ;
return lv ;
} else if ( className = = " TQLineEdit " )
} else if ( className = = TQLINEEDIT_OBJECT_NAME_STRING )
return new TQLineEdit ( parent , name ) ;
return new TQLineEdit ( parent , name ) ;
else if ( className = = " TQSpinBox " )
else if ( className = = TQSPINBOX_OBJECT_NAME_STRING )
return new TQSpinBox ( parent , name ) ;
return new TQSpinBox ( parent , name ) ;
else if ( className = = " TQSplitter " )
else if ( className = = TQSPLITTER_OBJECT_NAME_STRING )
return new TQSplitter ( parent , name ) ;
return new TQSplitter ( parent , name ) ;
else if ( className = = " TQMultiLineEdit " )
else if ( className = = TQMULTILINEEDIT_OBJECT_NAME_STRING )
return new TQMultiLineEdit ( parent , name ) ;
return new TQMultiLineEdit ( parent , name ) ;
else if ( className = = " TQTextEdit " )
else if ( className = = TQTEXTEDIT_OBJECT_NAME_STRING )
return new TQTextEdit ( parent , name ) ;
return new TQTextEdit ( parent , name ) ;
else if ( className = = " TQLabel " )
else if ( className = = TQLABEL_OBJECT_NAME_STRING )
{
{
QDesignerLabel * l = new QDesignerLabel ( parent , name ) ;
QDesignerLabel * l = new QDesignerLabel ( parent , name ) ;
if ( init )
if ( init )
@ -955,9 +955,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase : : setPropertyChanged ( l , " text " , true ) ;
MetaDataBase : : setPropertyChanged ( l , " text " , true ) ;
}
}
return l ;
return l ;
} else if ( className = = " QLayoutWidget " )
} else if ( className = = TQLAYOUTWIDGET_OBJECT_NAME_STRING )
return new QLayoutWidget ( parent , name ) ;
return new QLayoutWidget ( parent , name ) ;
else if ( className = = " TQTabWidget " )
else if ( className = = TQTABWIDGET_OBJECT_NAME_STRING )
{
{
TQTabWidget * tw = new QDesignerTabWidget ( parent , name ) ;
TQTabWidget * tw = new QDesignerTabWidget ( parent , name ) ;
if ( init )
if ( init )
@ -972,14 +972,14 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase : : addEntry ( w ) ;
MetaDataBase : : addEntry ( w ) ;
}
}
return tw ;
return tw ;
} else if ( className = = " TQComboBox " )
} else if ( className = = TQCOMBOBOX_OBJECT_NAME_STRING )
{
{
return new TQComboBox ( false , parent , name ) ;
return new TQComboBox ( false , parent , name ) ;
} else if ( className = = " TQWidget " )
} else if ( className = = TQWIDGET_OBJECT_NAME_STRING )
{
{
if ( parent & &
if ( parent & &
( parent - > inherits ( " FormWindow " ) | | parent - > inherits ( " TQWizard " )
( parent - > inherits ( " FormWindow " ) | | parent - > inherits ( TQWIZARD_OBJECT_NAME_STRING )
| | parent - > inherits ( " TQTabWidget " ) | | parent - > inherits ( " TQToolBox " ) | | parent - > inherits ( " TQMainWindow " ) ) )
| | parent - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) | | parent - > inherits ( TQTOOLBOX_OBJECT_NAME_STRING ) | | parent - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) ) )
{
{
FormWindow * fw = find_formwindow ( parent ) ;
FormWindow * fw = find_formwindow ( parent ) ;
if ( fw )
if ( fw )
@ -990,7 +990,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
}
}
}
return new TQWidget ( parent , name ) ;
return new TQWidget ( parent , name ) ;
} else if ( className = = " TQDialog " )
} else if ( className = = TQDIALOG_OBJECT_NAME_STRING )
{
{
TQDialog * dia = 0 ;
TQDialog * dia = 0 ;
if ( parent & & parent - > inherits ( " FormWindow " ) )
if ( parent & & parent - > inherits ( " FormWindow " ) )
@ -1000,7 +1000,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( parent & & ! parent - > inherits ( " MainWindow " ) )
if ( parent & & ! parent - > inherits ( " MainWindow " ) )
dia - > reparent ( parent , TQPoint ( 0 , 0 ) , true ) ;
dia - > reparent ( parent , TQPoint ( 0 , 0 ) , true ) ;
return dia ;
return dia ;
} else if ( className = = " TQWizard " )
} else if ( className = = TQWIZARD_OBJECT_NAME_STRING )
{
{
TQWizard * wiz = new QDesignerWizard ( parent , name ) ;
TQWizard * wiz = new QDesignerWizard ( parent , name ) ;
if ( parent & & ! parent - > inherits ( " MainWindow " ) )
if ( parent & & ! parent - > inherits ( " MainWindow " ) )
@ -1030,17 +1030,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else
else
s - > setOrientation ( Qt : : Horizontal ) ;
s - > setOrientation ( Qt : : Horizontal ) ;
return s ;
return s ;
} else if ( className = = " TQLCDNumber " )
} else if ( className = = TQLCDNUMBER_OBJECT_NAME_STRING )
return new TQLCDNumber ( parent , name ) ;
return new TQLCDNumber ( parent , name ) ;
else if ( className = = " TQProgressBar " )
else if ( className = = TQPROGRESSBAR_OBJECT_NAME_STRING )
return new TQProgressBar ( parent , name ) ;
return new TQProgressBar ( parent , name ) ;
else if ( className = = " TQTextView " )
else if ( className = = TQTEXTVIEW_OBJECT_NAME_STRING )
return new TQTextView ( parent , name ) ;
return new TQTextView ( parent , name ) ;
else if ( className = = " TQTextBrowser " )
else if ( className = = TQTEXTBROWSER_OBJECT_NAME_STRING )
return new TQTextBrowser ( parent , name ) ;
return new TQTextBrowser ( parent , name ) ;
else if ( className = = " TQDial " )
else if ( className = = TQDIAL_OBJECT_NAME_STRING )
return new TQDial ( parent , name ) ;
return new TQDial ( parent , name ) ;
else if ( className = = " TQSlider " )
else if ( className = = TQSLIDER_OBJECT_NAME_STRING )
{
{
TQSlider * s = new TQSlider ( parent , name ) ;
TQSlider * s = new TQSlider ( parent , name ) ;
if ( ! r )
if ( ! r )
@ -1052,7 +1052,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase : : addEntry ( s ) ;
MetaDataBase : : addEntry ( s ) ;
MetaDataBase : : setPropertyChanged ( s , " orientation " , true ) ;
MetaDataBase : : setPropertyChanged ( s , " orientation " , true ) ;
return s ;
return s ;
} else if ( className = = " TQScrollBar " )
} else if ( className = = TQSCROLLBAR_OBJECT_NAME_STRING )
{
{
TQScrollBar * s = new TQScrollBar ( parent , name ) ;
TQScrollBar * s = new TQScrollBar ( parent , name ) ;
if ( ! r )
if ( ! r )
@ -1064,7 +1064,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
MetaDataBase : : addEntry ( s ) ;
MetaDataBase : : addEntry ( s ) ;
MetaDataBase : : setPropertyChanged ( s , " orientation " , true ) ;
MetaDataBase : : setPropertyChanged ( s , " orientation " , true ) ;
return s ;
return s ;
} else if ( className = = " TQFrame " )
} else if ( className = = TQFRAME_OBJECT_NAME_STRING )
{
{
if ( ! init )
if ( ! init )
return new TQFrame ( parent , name ) ;
return new TQFrame ( parent , name ) ;
@ -1085,7 +1085,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( r - > width ( ) < r - > height ( ) )
else if ( r - > width ( ) < r - > height ( ) )
l - > setOrientation ( Qt : : Vertical ) ;
l - > setOrientation ( Qt : : Vertical ) ;
return l ;
return l ;
} else if ( className = = " TQMainWindow " )
} else if ( className = = TQMAINWINDOW_OBJECT_NAME_STRING )
{
{
TQMainWindow * mw = new KmdrMainWindow ( parent , name , 0 ) ;
TQMainWindow * mw = new KmdrMainWindow ( parent , name , 0 ) ;
mw - > setDockEnabled ( Qt : : DockMinimized , false ) ;
mw - > setDockEnabled ( Qt : : DockMinimized , false ) ;
@ -1098,13 +1098,13 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return mw ;
return mw ;
}
}
# ifndef QT_NO_SQL
# ifndef QT_NO_SQL
else if ( className = = " TQDataBrowser " )
else if ( className = = TQDATABROWSER_OBJECT_NAME_STRING )
{
{
TQWidget * w = new QDesignerDataBrowser ( parent , name ) ;
TQWidget * w = new QDesignerDataBrowser ( parent , name ) ;
if ( parent )
if ( parent )
w - > reparent ( parent , TQPoint ( 0 , 0 ) , true ) ;
w - > reparent ( parent , TQPoint ( 0 , 0 ) , true ) ;
return w ;
return w ;
} else if ( className = = " TQDataView " )
} else if ( className = = TQDATAVIEW_OBJECT_NAME_STRING )
{
{
TQWidget * w = new QDesignerDataView ( parent , name ) ;
TQWidget * w = new QDesignerDataView ( parent , name ) ;
if ( parent )
if ( parent )
@ -1266,37 +1266,37 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
{
{
layout = 0 ;
layout = 0 ;
if ( w & & w - > inherits ( " TQTabWidget " ) )
if ( w & & w - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) )
w = ( ( TQTabWidget * ) w ) - > currentPage ( ) ;
w = ( ( TQTabWidget * ) w ) - > currentPage ( ) ;
if ( w - > inherits ( " TQToolBox " ) )
if ( w - > inherits ( TQTOOLBOX_OBJECT_NAME_STRING ) )
w = ( ( TQToolBox * ) w ) - > currentItem ( ) ;
w = ( ( TQToolBox * ) w ) - > currentItem ( ) ;
if ( w & & w - > inherits ( " TQWizard " ) )
if ( w & & w - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) )
w = ( ( TQWizard * ) w ) - > currentPage ( ) ;
w = ( ( TQWizard * ) w ) - > currentPage ( ) ;
if ( w & & w - > inherits ( " TQMainWindow " ) )
if ( w & & w - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ( ( TQMainWindow * ) w ) - > centralWidget ( ) ;
w = ( ( TQMainWindow * ) w ) - > centralWidget ( ) ;
if ( w & & w - > inherits ( " TQWidgetStack " ) )
if ( w & & w - > inherits ( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
w = ( ( TQWidgetStack * ) w ) - > visibleWidget ( ) ;
w = ( ( TQWidgetStack * ) w ) - > visibleWidget ( ) ;
if ( w & & w - > inherits ( " TQSplitter " ) )
if ( w & & w - > inherits ( TQSPLITTER_OBJECT_NAME_STRING ) )
return ( ( TQSplitter * ) w ) - > orientation ( ) = = Horizontal ? HBox : VBox ;
return ( ( TQSplitter * ) w ) - > orientation ( ) = = Horizontal ? HBox : VBox ;
if ( ! w | | ! w - > layout ( ) )
if ( ! w | | ! w - > layout ( ) )
return NoLayout ;
return NoLayout ;
TQLayout * lay = w - > layout ( ) ;
TQLayout * lay = w - > layout ( ) ;
if ( w - > inherits ( " TQGroupBox " ) ) {
if ( w - > inherits ( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQObjectList * l = lay - > queryList ( " TQLayout " ) ;
TQObjectList * l = lay - > queryList ( TQLAYOUT_OBJECT_NAME_STRING ) ;
if ( l & & l - > first ( ) )
if ( l & & l - > first ( ) )
lay = ( TQLayout * ) l - > first ( ) ;
lay = ( TQLayout * ) l - > first ( ) ;
delete l ;
delete l ;
}
}
layout = lay ;
layout = lay ;
if ( lay - > inherits ( " TQHBoxLayout " ) )
if ( lay - > inherits ( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox ;
return HBox ;
else if ( lay - > inherits ( " TQVBoxLayout " ) )
else if ( lay - > inherits ( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox ;
return VBox ;
else if ( lay - > inherits ( " TQGridLayout " ) )
else if ( lay - > inherits ( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid ;
return Grid ;
return NoLayout ;
return NoLayout ;
}
}
@ -1306,11 +1306,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
*/
*/
WidgetFactory : : LayoutType WidgetFactory : : layoutType ( TQLayout * layout )
WidgetFactory : : LayoutType WidgetFactory : : layoutType ( TQLayout * layout )
{
{
if ( layout - > inherits ( " TQHBoxLayout " ) )
if ( layout - > inherits ( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox ;
return HBox ;
else if ( layout - > inherits ( " TQVBoxLayout " ) )
else if ( layout - > inherits ( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox ;
return VBox ;
else if ( layout - > inherits ( " TQGridLayout " ) )
else if ( layout - > inherits ( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid ;
return Grid ;
return NoLayout ;
return NoLayout ;
}
}
@ -1349,15 +1349,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
{
{
if ( ! w )
if ( ! w )
return w ;
return w ;
if ( w - > inherits ( " TQTabWidget " ) )
if ( w - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) )
return ( ( TQTabWidget * ) w ) - > currentPage ( ) ;
return ( ( TQTabWidget * ) w ) - > currentPage ( ) ;
if ( w - > inherits ( " TQToolBox " ) )
if ( w - > inherits ( TQTOOLBOX_OBJECT_NAME_STRING ) )
return ( ( TQToolBox * ) w ) - > currentItem ( ) ;
return ( ( TQToolBox * ) w ) - > currentItem ( ) ;
if ( w - > inherits ( " TQWizard " ) )
if ( w - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) )
return ( ( TQWizard * ) w ) - > currentPage ( ) ;
return ( ( TQWizard * ) w ) - > currentPage ( ) ;
if ( w - > inherits ( " TQWidgetStack " ) )
if ( w - > inherits ( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
return ( ( TQWidgetStack * ) w ) - > visibleWidget ( ) ;
return ( ( TQWidgetStack * ) w ) - > visibleWidget ( ) ;
if ( w - > inherits ( " TQMainWindow " ) )
if ( w - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) )
return ( ( TQMainWindow * ) w ) - > centralWidget ( ) ;
return ( ( TQMainWindow * ) w ) - > centralWidget ( ) ;
return w ;
return w ;
}
}
@ -1372,7 +1372,7 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
TQWidget * WidgetFactory : : widgetOfContainer ( TQWidget * w )
TQWidget * WidgetFactory : : widgetOfContainer ( TQWidget * w )
{
{
if ( w - > parentWidget ( ) & & w - > parentWidget ( ) - > inherits ( " TQWidgetStack " ) )
if ( w - > parentWidget ( ) & & w - > parentWidget ( ) - > inherits ( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
w = w - > parentWidget ( ) ;
w = w - > parentWidget ( ) ;
while ( w ) {
while ( w ) {
if ( WidgetDatabase : : isContainer ( WidgetDatabase : : idFromClassName ( WidgetFactory : : classNameOf ( w ) ) ) | |
if ( WidgetDatabase : : isContainer ( WidgetDatabase : : idFromClassName ( WidgetFactory : : classNameOf ( w ) ) ) | |
@ -1391,19 +1391,19 @@ 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
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 true ;
return true ;
if ( o - > inherits ( " TQTabBar " ) | | : : qt_cast < TQToolBox * > ( o - > parent ( ) ) )
if ( o - > inherits ( TQTABBAR_OBJECT_NAME_STRING ) | | : : qt_cast < TQToolBox * > ( o - > parent ( ) ) )
return true ;
return true ;
else if ( o - > inherits ( " TQSizeGrip " ) )
else if ( o - > inherits ( TQSIZEGRIP_OBJECT_NAME_STRING ) )
return true ;
return true ;
else if ( o - > inherits ( " TQToolButton " ) & & o - > parent ( ) & & o - > parent ( ) - > inherits ( " TQTabBar " ) )
else if ( o - > inherits ( TQTOOLBUTTON_OBJECT_NAME_STRING ) & & o - > parent ( ) & & o - > parent ( ) - > inherits ( TQTABBAR_OBJECT_NAME_STRING ) )
return true ;
return true ;
else if ( o - > parent ( ) & & o - > parent ( ) - > inherits ( " TQWizard " ) & & o - > inherits ( " TQPushButton " ) )
else if ( o - > parent ( ) & & o - > parent ( ) - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) & & o - > inherits ( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
return true ;
return true ;
else if ( o - > parent ( ) & & o - > parent ( ) - > inherits ( " TQMainWindow " ) & & o - > inherits ( " TQMenuBar " ) )
else if ( o - > parent ( ) & & o - > parent ( ) - > inherits ( TQMAINWINDOW_OBJECT_NAME_STRING ) & & o - > inherits ( TQMENUBAR_OBJECT_NAME_STRING ) )
return true ;
return true ;
else if ( o - > inherits ( " QDockWindowHandle " ) )
else if ( o - > inherits ( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
return true ;
return true ;
else if ( o - > inherits ( " QHideDock " ) )
else if ( o - > inherits ( TQHIDEDOCK_OBJECT_NAME_STRING ) )
return true ;
return true ;
return false ;
return false ;
@ -1469,23 +1469,23 @@ void WidgetFactory::initChangedProperties( TQObject *o )
if ( ! o - > inherits ( " QDesignerToolBar " ) & & ! o - > inherits ( " QDesignerMenuBar " ) )
if ( ! o - > inherits ( " QDesignerToolBar " ) & & ! o - > inherits ( " QDesignerMenuBar " ) )
MetaDataBase : : setPropertyChanged ( o , " geometry " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " geometry " , true ) ;
if ( o - > inherits ( " TQPushButton " ) | | o - > inherits ( " TQRadioButton " ) | | o - > inherits ( " TQCheckBox " ) | | o - > inherits ( " TQToolButton " ) )
if ( o - > inherits ( TQPUSHBUTTON_OBJECT_NAME_STRING ) | | o - > inherits ( TQRADIOBUTTON_OBJECT_NAME_STRING ) | | o - > inherits ( TQCHECKBOX_OBJECT_NAME_STRING ) | | o - > inherits ( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
MetaDataBase : : setPropertyChanged ( o , " text " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " text " , true ) ;
else if ( : : qt_cast < TQToolButton * > ( o ) & & : : qt_cast < TQToolBox * > ( widgetOfContainer ( ( TQWidget * ) o - > parent ( ) ) ) ) {
else if ( : : qt_cast < TQToolButton * > ( o ) & & : : qt_cast < TQToolBox * > ( widgetOfContainer ( ( TQWidget * ) o - > parent ( ) ) ) ) {
MetaDataBase : : setPropertyChanged ( o , " usesTextLabel " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " usesTextLabel " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " textLabel " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " textLabel " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " autoRaise " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " autoRaise " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " textPosition " , TRUE ) ;
MetaDataBase : : setPropertyChanged ( o , " textPosition " , TRUE ) ;
} else if ( o - > inherits ( " TQGroupBox " ) )
} else if ( o - > inherits ( TQGROUPBOX_OBJECT_NAME_STRING ) )
MetaDataBase : : setPropertyChanged ( o , " title " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " title " , true ) ;
else if ( o - > isA ( " TQFrame " ) ) {
else if ( o - > isA ( TQFRAME_OBJECT_NAME_STRING ) ) {
MetaDataBase : : setPropertyChanged ( o , " frameShadow " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " frameShadow " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " frameShape " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " frameShape " , true ) ;
} else if ( o - > inherits ( " TQTabWidget " ) | | o - > inherits ( " TQWizard " ) ) {
} else if ( o - > inherits ( TQTABWIDGET_OBJECT_NAME_STRING ) | | o - > inherits ( TQWIZARD_OBJECT_NAME_STRING ) ) {
MetaDataBase : : setPropertyChanged ( o , " pageTitle " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " pageTitle " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " pageName " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " pageName " , true ) ;
# ifndef QT_NO_TABLE
# ifndef QT_NO_TABLE
} else if ( o - > inherits ( " TQTable " ) & & ! o - > inherits ( " TQDataTable " ) ) {
} else if ( o - > inherits ( TQTABLE_OBJECT_NAME_STRING ) & & ! o - > inherits ( TQDATATABLE_OBJECT_NAME_STRING ) ) {
MetaDataBase : : setPropertyChanged ( o , " numRows " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " numRows " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " numCols " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " numCols " , true ) ;
TQTable * t = ( TQTable * ) o ;
TQTable * t = ( TQTable * ) o ;
@ -1501,7 +1501,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase : : setPropertyChanged ( o , " itemIconSet " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " itemIconSet " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " itemToolTip " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " itemToolTip " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " itemBackgroundMode " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " itemBackgroundMode " , true ) ;
} else if ( o - > inherits ( " TQSplitter " ) ) {
} else if ( o - > inherits ( TQSPLITTER_OBJECT_NAME_STRING ) ) {
MetaDataBase : : setPropertyChanged ( o , " orientation " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " orientation " , true ) ;
} else if ( o - > inherits ( " QDesignerToolBar " ) ) {
} else if ( o - > inherits ( " QDesignerToolBar " ) ) {
MetaDataBase : : setPropertyChanged ( o , " label " , true ) ;
MetaDataBase : : setPropertyChanged ( o , " label " , true ) ;
@ -1528,7 +1528,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
return true ;
return true ;
if ( className . mid ( 1 ) = = " IconView " )
if ( className . mid ( 1 ) = = " IconView " )
return true ;
return true ;
if ( className = = " TQTextEdit " | | className = = " TQMultiLineEdit " )
if ( className = = TQTEXTEDIT_OBJECT_NAME_STRING | | className = = TQMULTILINEEDIT_OBJECT_NAME_STRING )
return true ;
return true ;
if ( className . contains ( " Table " ) )
if ( className . contains ( " Table " ) )
return true ;
return true ;
@ -1557,7 +1557,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
# ifdef KOMMANDER
# ifdef KOMMANDER
if ( className = = " ComboBox " )
if ( className = = " ComboBox " )
{
{
if ( ! editWidget - > inherits ( " TQComboBox " ) )
if ( ! editWidget - > inherits ( TQCOMBOBOX_OBJECT_NAME_STRING ) )
return ;
return ;
TQComboBox * cb = ( TQComboBox * ) editWidget ;
TQComboBox * cb = ( TQComboBox * ) editWidget ;
@ -1579,7 +1579,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
}
if ( className = = " TreeWidget " )
if ( className = = " TreeWidget " )
{
{
if ( ! editWidget - > inherits ( " TQListView " ) )
if ( ! editWidget - > inherits ( TQLISTVIEW_OBJECT_NAME_STRING ) )
return ;
return ;
TQListView * lv = ( TQListView * ) editWidget ;
TQListView * lv = ( TQListView * ) editWidget ;
ListViewEditor * e = new ListViewEditor ( parent , lv , fw ) ;
ListViewEditor * e = new ListViewEditor ( parent , lv , fw ) ;
@ -1589,7 +1589,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
}
if ( className = = " ListBox " )
if ( className = = " ListBox " )
{
{
if ( ! editWidget - > inherits ( " TQListBox " ) )
if ( ! editWidget - > inherits ( TQLISTBOX_OBJECT_NAME_STRING ) )
return ;
return ;
ListBoxEditor * e = new ListBoxEditor ( parent , editWidget , fw ) ;
ListBoxEditor * e = new ListBoxEditor ( parent , editWidget , fw ) ;
e - > exec ( ) ;
e - > exec ( ) ;
@ -1599,7 +1599,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
# endif
# endif
if ( className . mid ( 1 ) = = " ListBox " )
if ( className . mid ( 1 ) = = " ListBox " )
{
{
if ( ! editWidget - > inherits ( " TQListBox " ) )
if ( ! editWidget - > inherits ( TQLISTBOX_OBJECT_NAME_STRING ) )
return ;
return ;
ListBoxEditor * e = new ListBoxEditor ( parent , editWidget , fw ) ;
ListBoxEditor * e = new ListBoxEditor ( parent , editWidget , fw ) ;
e - > exec ( ) ;
e - > exec ( ) ;
@ -1609,7 +1609,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if ( className . mid ( 1 ) = = " ComboBox " )
if ( className . mid ( 1 ) = = " ComboBox " )
{
{
if ( ! editWidget - > inherits ( " TQComboBox " ) )
if ( ! editWidget - > inherits ( TQCOMBOBOX_OBJECT_NAME_STRING ) )
return ;
return ;
TQComboBox * cb = ( TQComboBox * ) editWidget ;
TQComboBox * cb = ( TQComboBox * ) editWidget ;
ListBoxEditor * e = new ListBoxEditor ( parent , cb - > listBox ( ) , fw ) ;
ListBoxEditor * e = new ListBoxEditor ( parent , cb - > listBox ( ) , fw ) ;
@ -1621,7 +1621,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if ( className . mid ( 1 ) = = " ListView " )
if ( className . mid ( 1 ) = = " ListView " )
{
{
if ( ! editWidget - > inherits ( " TQListView " ) )
if ( ! editWidget - > inherits ( TQLISTVIEW_OBJECT_NAME_STRING ) )
return ;
return ;
TQListView * lv = ( TQListView * ) editWidget ;
TQListView * lv = ( TQListView * ) editWidget ;
ListViewEditor * e = new ListViewEditor ( parent , lv , fw ) ;
ListViewEditor * e = new ListViewEditor ( parent , lv , fw ) ;
@ -1632,7 +1632,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if ( className . mid ( 1 ) = = " IconView " )
if ( className . mid ( 1 ) = = " IconView " )
{
{
if ( ! editWidget - > inherits ( " TQIconView " ) )
if ( ! editWidget - > inherits ( TQICONVIEW_OBJECT_NAME_STRING ) )
return ;
return ;
IconViewEditor * e = new IconViewEditor ( parent , editWidget , fw ) ;
IconViewEditor * e = new IconViewEditor ( parent , editWidget , fw ) ;
e - > exec ( ) ;
e - > exec ( ) ;
@ -1640,7 +1640,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
return ;
return ;
}
}
if ( className = = " TQMultiLineEdit " | | className = = " TQTextEdit " )
if ( className = = TQMULTILINEEDIT_OBJECT_NAME_STRING | | className = = TQTEXTEDIT_OBJECT_NAME_STRING )
{
{
MultiLineEditor * e = new MultiLineEditor ( parent , editWidget , fw ) ;
MultiLineEditor * e = new MultiLineEditor ( parent , editWidget , fw ) ;
e - > exec ( ) ;
e - > exec ( ) ;
@ -1751,7 +1751,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy . isEmpty ( ) )
if ( myBuddy . isEmpty ( ) )
return ;
return ;
TQObjectList * l = topLevelWidget ( ) - > queryList ( " TQWidget " , myBuddy , false , true ) ;
TQObjectList * l = topLevelWidget ( ) - > queryList ( TQWIDGET_OBJECT_NAME_STRING , myBuddy , false , true ) ;
if ( ! l | | ! l - > first ( ) ) {
if ( ! l | | ! l - > first ( ) ) {
delete l ;
delete l ;
return ;
return ;
@ -1831,8 +1831,8 @@ void QLayoutWidget::updateSizePolicy()
TQObjectListIt it ( * children ( ) ) ;
TQObjectListIt it ( * children ( ) ) ;
TQObject * o ;
TQObject * o ;
if ( layout ( ) - > inherits ( " TQVBoxLayout " ) ) {
if ( layout ( ) - > inherits ( TQVBOXLAYOUT_OBJECT_NAME_STRING ) ) {
if ( parentLayout & & parentLayout - > inherits ( " TQHBoxLayout " ) )
if ( parentLayout & & parentLayout - > inherits ( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
vt = TQSizePolicy : : Minimum ;
vt = TQSizePolicy : : Minimum ;
else
else
vt = TQSizePolicy : : Fixed ;
vt = TQSizePolicy : : Fixed ;
@ -1852,8 +1852,8 @@ void QLayoutWidget::updateSizePolicy()
if ( w - > sizePolicy ( ) . mayShrinkVertically ( ) )
if ( w - > sizePolicy ( ) . mayShrinkVertically ( ) )
vt | = TQSizePolicy : : Maximum ;
vt | = TQSizePolicy : : Maximum ;
}
}
} else if ( layout ( ) - > inherits ( " TQHBoxLayout " ) ) {
} else if ( layout ( ) - > inherits ( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) {
if ( parentLayout & & parentLayout - > inherits ( " TQVBoxLayout " ) )
if ( parentLayout & & parentLayout - > inherits ( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
ht = TQSizePolicy : : Minimum ;
ht = TQSizePolicy : : Minimum ;
else
else
ht = TQSizePolicy : : Fixed ;
ht = TQSizePolicy : : Fixed ;
@ -1873,13 +1873,13 @@ void QLayoutWidget::updateSizePolicy()
if ( ! w - > sizePolicy ( ) . mayShrinkVertically ( ) )
if ( ! w - > sizePolicy ( ) . mayShrinkVertically ( ) )
vt & = ~ TQSizePolicy : : Maximum ;
vt & = ~ TQSizePolicy : : Maximum ;
}
}
} else if ( layout ( ) - > inherits ( " TQGridLayout " ) ) {
} else if ( layout ( ) - > inherits ( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) {
ht = TQSizePolicy : : Fixed ;
ht = TQSizePolicy : : Fixed ;
vt = TQSizePolicy : : Fixed ;
vt = TQSizePolicy : : Fixed ;
if ( parentLayout ) {
if ( parentLayout ) {
if ( parentLayout - > inherits ( " TQVBoxLayout " ) )
if ( parentLayout - > inherits ( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
ht = TQSizePolicy : : Minimum ;
ht = TQSizePolicy : : Minimum ;
else if ( parentLayout - > inherits ( " TQHBoxLayout " ) )
else if ( parentLayout - > inherits ( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
vt = TQSizePolicy : : Minimum ;
vt = TQSizePolicy : : Minimum ;
}
}