diff options
Diffstat (limited to 'kommander/editor/command.cpp')
-rw-r--r-- | kommander/editor/command.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index e20ba086..df4568fb 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -236,7 +236,7 @@ void ResizeCommand::execute() widget->setGeometry( newRect ); formWindow()->updateSelection( widget ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -245,7 +245,7 @@ void ResizeCommand::unexecute() widget->setGeometry( oldRect ); formWindow()->updateSelection( widget ); formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow()->updateChildSelections( widget ); } @@ -312,7 +312,7 @@ bool MoveCommand::canMerge( Command *c ) void MoveCommand::execute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { if ( newParent && oldParent && newParent != oldParent ) { TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); w->reparent( newParent, pos, true ); @@ -333,7 +333,7 @@ void MoveCommand::execute() void MoveCommand::unexecute() { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { if ( newParent && oldParent && newParent != oldParent ) { TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); w->reparent( oldParent, pos, true ); @@ -517,7 +517,7 @@ bool SetPropertyCommand::checkProperty() } if ( widget->tqparent() && widget->tqparent()->inherits( "FormWindow" ) ) - formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)widget )->tqparentWidget() ); + formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)widget )->parentWidget() ); } return true; } @@ -552,9 +552,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ if ( v.toBool() ) align |= WordBreak; widget->setProperty( "tqalignment", TQVariant( align ) ); - } else if ( propName == "tqlayoutSpacing" ) { + } else if ( propName == "layoutSpacing" ) { MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() ); - } else if ( propName == "tqlayoutMargin" ) { + } else if ( propName == "layoutMargin" ) { MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() ); } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { MetaDataBase::setFakeProperty( editor->widget(), propName, v ); @@ -628,9 +628,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ // ------------------------------------------------------------ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase ) + : Command( n, fw ), tqlayout( wl, tqparent, fw, layoutBase ) { } @@ -651,9 +651,9 @@ void LayoutHorizontalCommand::unexecute() // ------------------------------------------------------------ LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, true, true ) + : Command( n, fw ), tqlayout( wl, tqparent, fw, layoutBase, true, true ) { } @@ -674,9 +674,9 @@ void LayoutHorizontalSplitCommand::unexecute() // ------------------------------------------------------------ LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase ) + : Command( n, fw ), tqlayout( wl, tqparent, fw, layoutBase ) { } @@ -697,9 +697,9 @@ void LayoutVerticalCommand::unexecute() // ------------------------------------------------------------ LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, true, true ) + : Command( n, fw ), tqlayout( wl, tqparent, fw, layoutBase, true, true ) { } @@ -720,9 +720,9 @@ void LayoutVerticalSplitCommand::unexecute() // ------------------------------------------------------------ LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl, int xres, int yres ) - : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) + : Command( n, fw ), tqlayout( wl, tqparent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) { } @@ -743,19 +743,19 @@ void LayoutGridCommand::unexecute() // ------------------------------------------------------------ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, - TQWidget *tqlayoutBase, const TQWidgetList &wl ) - : Command( n, fw ), lb( tqlayoutBase ), widgets( wl ) + TQWidget *layoutBase, const TQWidgetList &wl ) + : Command( n, fw ), lb( layoutBase ), widgets( wl ) { - WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( tqlayoutBase ); - spacing = MetaDataBase::spacing( TQT_TQOBJECT(tqlayoutBase) ); - margin = MetaDataBase::margin( TQT_TQOBJECT(tqlayoutBase) ); + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); + spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); + margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); tqlayout = 0; if ( lay == WidgetFactory::HBox ) - tqlayout = new HorizontalLayout( wl, tqlayoutBase, fw, tqlayoutBase, false, tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + tqlayout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::VBox ) - tqlayout = new VerticalLayout( wl, tqlayoutBase, fw, tqlayoutBase, false, tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + tqlayout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::Grid ) - tqlayout = new GridLayout( wl, tqlayoutBase, fw, tqlayoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false ); + tqlayout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false ); } void BreakLayoutCommand::execute() |