diff options
Diffstat (limited to 'kommander/editor/command.cpp')
-rw-r--r-- | kommander/editor/command.cpp | 80 |
1 files changed, 40 insertions, 40 deletions
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp index 41ea2b23..c1b8db31 100644 --- a/kommander/editor/command.cpp +++ b/kommander/editor/command.cpp @@ -36,7 +36,7 @@ #include <tqwidget.h> #include <tqmetaobject.h> #include <tqapplication.h> -#include <layout.h> +#include <tqlayout.h> #include <tqmessagebox.h> #include <tqlistbox.h> #include <tqiconview.h> @@ -253,19 +253,19 @@ void ResizeCommand::unexecute() InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, TQWidget *w, const TQRect &g ) - : Command( n, fw ), widget( w ), geometry( g ) + : Command( n, fw ), widget( w ), tqgeometry( g ) { } void InsertCommand::execute() { - if ( geometry.size() == TQSize( 0, 0 ) ) { - widget->move( geometry.topLeft() ); + if ( tqgeometry.size() == TQSize( 0, 0 ) ) { + widget->move( tqgeometry.topLeft() ); widget->adjustSize(); } else { - TQSize s = geometry.size().expandedTo( widget->minimumSize() ); - s = s.expandedTo( widget->minimumSizeHint() ); - TQRect r( geometry.topLeft(), s ); + TQSize s = tqgeometry.size().expandedTo( widget->tqminimumSize() ); + s = s.expandedTo( widget->tqminimumSizeHint() ); + TQRect r( tqgeometry.topLeft(), s ); widget->setGeometry( r ); } widget->show(); @@ -461,7 +461,7 @@ bool SetPropertyCommand::canMerge( Command *c ) { SetPropertyCommand *cmd = (SetPropertyCommand*)c; const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "toolTip" || propName == "whatsThis" ) return true; @@ -532,26 +532,26 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ editor->propertyList()->setCurrentProperty( propName ); const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true ); + widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, true ), true ); if ( !p ) { if ( propName == "hAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); - int align = widget->property( "alignment" ).toInt(); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", true ), true ); + int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignHorizontal_Mask ); align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); + widget->setProperty( "tqalignment", TQVariant( align ) ); } else if ( propName == "vAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true ); - int align = widget->property( "alignment" ).toInt(); + p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", true ), true ); + int align = widget->property( "tqalignment" ).toInt(); align &= ~( AlignVertical_Mask ); align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); + widget->setProperty( "tqalignment", TQVariant( align ) ); } else if ( propName == "wordwrap" ) { - int align = widget->property( "alignment" ).toInt(); + int align = widget->property( "tqalignment" ).toInt(); align &= ~WordBreak; if ( v.toBool() ) align |= WordBreak; - widget->setProperty( "alignment", TQVariant( align ) ); + widget->setProperty( "tqalignment", TQVariant( align ) ); } else if ( propName == "layoutSpacing" ) { MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() ); } else if ( propName == "layoutMargin" ) { @@ -630,21 +630,21 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) + : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase ) { } void LayoutHorizontalCommand::execute() { formWindow()->clearSelection( false ); - layout.doLayout(); + tqlayout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalCommand::unexecute() { formWindow()->clearSelection( false ); - layout.undoLayout(); + tqlayout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -653,21 +653,21 @@ void LayoutHorizontalCommand::unexecute() LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) + : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, true, true ) { } void LayoutHorizontalSplitCommand::execute() { formWindow()->clearSelection( false ); - layout.doLayout(); + tqlayout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutHorizontalSplitCommand::unexecute() { formWindow()->clearSelection( false ); - layout.undoLayout(); + tqlayout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -676,21 +676,21 @@ void LayoutHorizontalSplitCommand::unexecute() LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) + : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase ) { } void LayoutVerticalCommand::execute() { formWindow()->clearSelection( false ); - layout.doLayout(); + tqlayout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalCommand::unexecute() { formWindow()->clearSelection( false ); - layout.undoLayout(); + tqlayout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -699,21 +699,21 @@ void LayoutVerticalCommand::unexecute() LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true ) + : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, true, true ) { } void LayoutVerticalSplitCommand::execute() { formWindow()->clearSelection( false ); - layout.doLayout(); + tqlayout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutVerticalSplitCommand::unexecute() { formWindow()->clearSelection( false ); - layout.undoLayout(); + tqlayout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -722,21 +722,21 @@ void LayoutVerticalSplitCommand::unexecute() LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, TQWidget *parent, TQWidget *layoutBase, const TQWidgetList &wl, int xres, int yres ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) + : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) { } void LayoutGridCommand::execute() { formWindow()->clearSelection( false ); - layout.doLayout(); + tqlayout.doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } void LayoutGridCommand::unexecute() { formWindow()->clearSelection( false ); - layout.undoLayout(); + tqlayout.undoLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); } @@ -749,21 +749,21 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); - layout = 0; + tqlayout = 0; if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + tqlayout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); + tqlayout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ); else if ( lay == WidgetFactory::Grid ) - layout = new GridLayout( wl, layoutBase, fw, layoutBase, 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() { - if ( !layout ) + if ( !tqlayout ) return; formWindow()->clearSelection( false ); - layout->breakLayout(); + tqlayout->breakLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); @@ -771,10 +771,10 @@ void BreakLayoutCommand::execute() void BreakLayoutCommand::unexecute() { - if ( !layout ) + if ( !tqlayout ) return; formWindow()->clearSelection( false ); - layout->doLayout(); + tqlayout->doLayout(); formWindow()->mainWindow()->objectHierarchy()->rebuild(); MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); |