diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-09 02:23:29 +0000 |
commit | 539a1fd1ae6290cc3eec745226c0ce45b02c1545 (patch) | |
tree | e1cf785f3b349d568bade07dccdb5b39eb862331 /kdevdesigner | |
parent | 82324bf130254bac6932131a55607c866773ca84 (diff) | |
download | tdevelop-539a1fd1ae6290cc3eec745226c0ce45b02c1545.tar.gz tdevelop-539a1fd1ae6290cc3eec745226c0ce45b02c1545.zip |
Remove the tq in front of these incorrectly TQt4-converted methods/data members:
tqrepaint[...]
tqinvalidate[...]
tqparent[...]
tqmask[...]
tqlayout[...]
tqalignment[...]
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1240522 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdevdesigner')
63 files changed, 611 insertions, 611 deletions
diff --git a/kdevdesigner/designer/about.ui b/kdevdesigner/designer/about.ui index dd27fca8..7034bca4 100644 --- a/kdevdesigner/designer/about.ui +++ b/kdevdesigner/designer/about.ui @@ -215,5 +215,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp index a94b74ff..f40739f4 100644 --- a/kdevdesigner/designer/actiondnd.cpp +++ b/kdevdesigner/designer/actiondnd.cpp @@ -253,7 +253,7 @@ void QDesignerToolBar::findFormWindow() formWindow = ::tqqt_cast<FormWindow*>(w); if ( formWindow ) break; - w = w->tqparentWidget(); + w = w->parentWidget(); } } diff --git a/kdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui index 7db4050b..38d1f966 100644 --- a/kdevdesigner/designer/actioneditor.ui +++ b/kdevdesigner/designer/actioneditor.ui @@ -40,7 +40,7 @@ <property name="caption"> <string>Edit Actions</string> </property> - <property name="tqlayoutMargin" stdset="0"> + <property name="layoutMargin" stdset="0"> </property> <vbox> <property name="name"> @@ -223,5 +223,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp index f461a877..63ed9e0a 100644 --- a/kdevdesigner/designer/command.cpp +++ b/kdevdesigner/designer/command.cpp @@ -244,7 +244,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 ); } @@ -253,7 +253,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 ); } @@ -320,7 +320,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 ); @@ -341,7 +341,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 ); @@ -546,7 +546,7 @@ bool SetPropertyCommand::checkProperty() } if ( ::tqqt_cast<FormWindow*>(widget->tqparent()) ) - formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->tqparentWidget() ); + formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); } return TRUE; } @@ -583,12 +583,12 @@ 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" ) { TQVariant val = v; if ( val.toString() == "default" ) val = -1; MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); - } else if ( propName == "tqlayoutMargin" ) { + } else if ( propName == "layoutMargin" ) { TQVariant val = v; if ( val.toString() == "default" ) val = -1; @@ -672,9 +672,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 ) { } @@ -695,9 +695,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 ) { } @@ -718,9 +718,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 ) { } @@ -741,9 +741,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 ) { } @@ -764,9 +764,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) ) ) { } @@ -787,19 +787,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, ::tqqt_cast<TQSplitter*>(tqlayoutBase) != 0 ); + tqlayout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 ); else if ( lay == WidgetFactory::VBox ) - tqlayout = new VerticalLayout( wl, tqlayoutBase, fw, tqlayoutBase, FALSE, ::tqqt_cast<TQSplitter*>(tqlayoutBase) != 0 ); + tqlayout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 ); 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() diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h index 3aa1a919..2bd296bc 100644 --- a/kdevdesigner/designer/command.h +++ b/kdevdesigner/designer/command.h @@ -282,7 +282,7 @@ class LayoutHorizontalCommand : public Command { public: LayoutHorizontalCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); @@ -298,7 +298,7 @@ class LayoutHorizontalSplitCommand : public Command { public: LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); @@ -314,7 +314,7 @@ class LayoutVerticalCommand : public Command { public: LayoutVerticalCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); @@ -330,7 +330,7 @@ class LayoutVerticalSplitCommand : public Command { public: LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); @@ -346,7 +346,7 @@ class LayoutGridCommand : public Command { public: LayoutGridCommand( const TQString &n, FormWindow *fw, - TQWidget *tqparent, TQWidget *tqlayoutBase, + TQWidget *tqparent, TQWidget *layoutBase, const TQWidgetList &wl, int xres, int yres ); void execute(); @@ -362,7 +362,7 @@ class BreakLayoutCommand : public Command { public: BreakLayoutCommand( const TQString &n, FormWindow *fw, - TQWidget *tqlayoutBase, const TQWidgetList &wl ); + TQWidget *layoutBase, const TQWidgetList &wl ); void execute(); void unexecute(); diff --git a/kdevdesigner/designer/configtoolboxdialog.ui b/kdevdesigner/designer/configtoolboxdialog.ui index 4ff3c19d..05a1e52f 100644 --- a/kdevdesigner/designer/configtoolboxdialog.ui +++ b/kdevdesigner/designer/configtoolboxdialog.ui @@ -322,5 +322,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/connectiondialog.ui b/kdevdesigner/designer/connectiondialog.ui index 24b32266..cfc590a5 100644 --- a/kdevdesigner/designer/connectiondialog.ui +++ b/kdevdesigner/designer/connectiondialog.ui @@ -215,5 +215,5 @@ <slot>updateConnectionContainers()</slot> <slot>ensureConnectionVisible()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/createtemplate.ui b/kdevdesigner/designer/createtemplate.ui index 255a9301..60f6a3b6 100644 --- a/kdevdesigner/designer/createtemplate.ui +++ b/kdevdesigner/designer/createtemplate.ui @@ -188,7 +188,7 @@ <slot>reject()</slot> </connection> </connections> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> </includehints> diff --git a/kdevdesigner/designer/dbconnection.ui b/kdevdesigner/designer/dbconnection.ui index 1ad273a9..75b7d5cb 100644 --- a/kdevdesigner/designer/dbconnection.ui +++ b/kdevdesigner/designer/dbconnection.ui @@ -218,5 +218,5 @@ <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp index 1cf01d4d..0d4a5883 100644 --- a/kdevdesigner/designer/designerappiface.cpp +++ b/kdevdesigner/designer/designerappiface.cpp @@ -631,41 +631,41 @@ void DesignerFormWindowImpl::checkAccels() { } -void DesignerFormWindowImpl::tqlayoutH() +void DesignerFormWindowImpl::layoutH() { - formWindow->tqlayoutHorizontal(); + formWindow->layoutHorizontal(); } -void DesignerFormWindowImpl::tqlayoutV() +void DesignerFormWindowImpl::layoutV() { } -void DesignerFormWindowImpl::tqlayoutHSplit() +void DesignerFormWindowImpl::layoutHSplit() { } -void DesignerFormWindowImpl::tqlayoutVSplit() +void DesignerFormWindowImpl::layoutVSplit() { } -void DesignerFormWindowImpl::tqlayoutG() +void DesignerFormWindowImpl::layoutG() { - formWindow->tqlayoutGrid(); + formWindow->layoutGrid(); } -void DesignerFormWindowImpl::tqlayoutHContainer( TQWidget* w ) +void DesignerFormWindowImpl::layoutHContainer( TQWidget* w ) { - formWindow->tqlayoutHorizontalContainer( w ); + formWindow->layoutHorizontalContainer( w ); } -void DesignerFormWindowImpl::tqlayoutVContainer( TQWidget* w ) +void DesignerFormWindowImpl::layoutVContainer( TQWidget* w ) { - formWindow->tqlayoutVerticalContainer( w ); + formWindow->layoutVerticalContainer( w ); } -void DesignerFormWindowImpl::tqlayoutGContainer( TQWidget* w ) +void DesignerFormWindowImpl::layoutGContainer( TQWidget* w ) { - formWindow->tqlayoutGridContainer( w ); + formWindow->layoutGridContainer( w ); } void DesignerFormWindowImpl::breakLayout() diff --git a/kdevdesigner/designer/designerappiface.h b/kdevdesigner/designer/designerappiface.h index 25b5b896..de048be1 100644 --- a/kdevdesigner/designer/designerappiface.h +++ b/kdevdesigner/designer/designerappiface.h @@ -186,14 +186,14 @@ public: void adjustSize(); void editConnections(); void checkAccels(); - void tqlayoutH(); - void tqlayoutV(); - void tqlayoutHSplit(); - void tqlayoutVSplit(); - void tqlayoutG(); - void tqlayoutHContainer( TQWidget* w ); - void tqlayoutVContainer( TQWidget* w ); - void tqlayoutGContainer( TQWidget* w ); + void layoutH(); + void layoutV(); + void layoutHSplit(); + void layoutVSplit(); + void layoutG(); + void layoutHContainer( TQWidget* w ); + void layoutVContainer( TQWidget* w ); + void layoutGContainer( TQWidget* w ); void breakLayout(); void selectWidget( TQWidget * ); void selectAll(); diff --git a/kdevdesigner/designer/editfunctions.ui b/kdevdesigner/designer/editfunctions.ui index 91a7fadf..1119282a 100644 --- a/kdevdesigner/designer/editfunctions.ui +++ b/kdevdesigner/designer/editfunctions.ui @@ -710,5 +710,5 @@ <slot access="protected">functionRemove()</slot> <slot access="protected">displaySlots( bool )</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/finddialog.ui b/kdevdesigner/designer/finddialog.ui index 39a4c74a..f806a3aa 100644 --- a/kdevdesigner/designer/finddialog.ui +++ b/kdevdesigner/designer/finddialog.ui @@ -270,5 +270,5 @@ <slot>doFind()</slot> <slot>setEditor( EditorInterface * e, TQObject * fw )</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/formsettings.ui b/kdevdesigner/designer/formsettings.ui index dd6b9d19..6337e8cf 100644 --- a/kdevdesigner/designer/formsettings.ui +++ b/kdevdesigner/designer/formsettings.ui @@ -113,10 +113,10 @@ <bool>false</bool> </property> <property name="toolTip" stdset="0"> - <string>Specify Pixmap-Loader function (only the function's name, no tqparentheses.)</string> + <string>Specify Pixmap-Loader function (only the function's name, no parentheses.)</string> </property> <property name="whatsThis" stdset="0"> - <string><b>Specify Pixmap-Loader function</b><p>Specify the function which should be used for loading a pixmap in the generated code. <em>Only enter the function's name, without tqparentheses.</em></string> + <string><b>Specify Pixmap-Loader function</b><p>Specify the function which should be used for loading a pixmap in the generated code. <em>Only enter the function's name, without parentheses.</em></string> </property> </widget> <widget class="TQRadioButton" row="1" column="0"> @@ -380,10 +380,10 @@ <bool>false</bool> </property> <property name="toolTip" stdset="0"> - <string>Specify spacing function (only the function's name, no tqparentheses.)</string> + <string>Specify spacing function (only the function's name, no parentheses.)</string> </property> <property name="whatsThis" stdset="0"> - <string><b>Specify spacing function</b><p>Specify the function which should be used for getting the spacing in the generated code. <em>Only enter the function's name, without tqparentheses.</em></string> + <string><b>Specify spacing function</b><p>Specify the function which should be used for getting the spacing in the generated code. <em>Only enter the function's name, without parentheses.</em></string> </property> </widget> <widget class="KLineEdit" row="3" column="1" rowspan="1" colspan="3"> @@ -402,10 +402,10 @@ </sizepolicy> </property> <property name="toolTip" stdset="0"> - <string>Specify margin function (only the function's name, no tqparentheses.)</string> + <string>Specify margin function (only the function's name, no parentheses.)</string> </property> <property name="whatsThis" stdset="0"> - <string><b>Specify margin function</b><p>Specify the function which should be used for getting the margin in the generated code. <em>Only enter the function's name, without tqparentheses.</em></string> + <string><b>Specify margin function</b><p>Specify the function which should be used for getting the margin in the generated code. <em>Only enter the function's name, without parentheses.</em></string> </property> </widget> </grid> @@ -545,5 +545,5 @@ <Q_SLOTS> <slot>okClicked()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp index 2878d62d..fc2e4445 100644 --- a/kdevdesigner/designer/formsettingsimpl.cpp +++ b/kdevdesigner/designer/formsettingsimpl.cpp @@ -63,8 +63,8 @@ FormSettings::FormSettings( TQWidget *tqparent, FormWindow *fw ) radioPixmapFunction->setChecked( TRUE ); editPixmapFunction->setText( formwindow->pixmapLoaderFunction() ); radioProjectImageFile->setEnabled( !fw->project()->isDummy() ); - spinSpacing->setValue( formwindow->tqlayoutDefaultSpacing() ); - spinMargin->setValue( formwindow->tqlayoutDefaultMargin() ); + spinSpacing->setValue( formwindow->layoutDefaultSpacing() ); + spinMargin->setValue( formwindow->layoutDefaultMargin() ); editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) ); editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) ); checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() ); diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp index e2520fde..312b543f 100644 --- a/kdevdesigner/designer/formwindow.cpp +++ b/kdevdesigner/designer/formwindow.cpp @@ -540,10 +540,10 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) selectWidget( TQT_TQOBJECT(w) ); // if widget is laid out, find the first non-laid out super-widget TQWidget *realWidget = w; // but store the original one - while ( w->tqparentWidget() && - ( WidgetFactory::tqlayoutType( w->tqparentWidget()) != WidgetFactory::NoLayout || + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w) ) ) - w = w->tqparentWidget(); + w = w->parentWidget(); if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { e->accept(); mainwindow->popupFormWindowMenu( e->globalPos(), this ); @@ -578,7 +578,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) case POINTER_TOOL: if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget // if the clicked widget is not in a tqlayout, raise it - if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection drawRubber = TRUE; @@ -593,7 +593,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) clearSelection( FALSE ); } else { // ...widget selected // only if widget has a tqlayout (it is a tqlayout meta widget or a laid out container!), unselect its childs - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); setPropertyShowingBlocked( TRUE ); for ( TQObject *o = l->first(); o; o = l->next() ) { @@ -618,9 +618,9 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) selectWidget( TQT_TQOBJECT(w) ); // if widget is laid out, find the first non-laid out super-widget - while ( w->tqparentWidget() && - ( WidgetFactory::tqlayoutType( w->tqparentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w) ) ) - w = w->tqparentWidget(); + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w) ) ) + w = w->parentWidget(); if ( e->button() == Qt::LeftButton ) { // left button: store original tqgeometry and more as the widget might start moving widgetPressed = TRUE; @@ -629,10 +629,10 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) origPressPos = oldPressPos; checkedSelectionsForMove = FALSE; moving.clear(); - if ( w->tqparentWidget() && !isMainContainer( TQT_TQOBJECT(w->tqparentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->tqparentWidget()) ) ) { - targetContainer = w->tqparentWidget(); - hadOwnPalette = w->tqparentWidget()->ownPalette(); - restorePalette = w->tqparentWidget()->palette(); + if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { + targetContainer = w->parentWidget(); + hadOwnPalette = w->parentWidget()->ownPalette(); + restorePalette = w->parentWidget()->palette(); } } } else { // press was on the formwindow @@ -702,7 +702,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) insertParent = WidgetFactory::containerOfWidget( wid ); // found another tqparent, store it break; } else { - wid = wid->tqparentWidget(); + wid = wid->parentWidget(); if ( !wid ) break; } @@ -756,9 +756,9 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) if ( widgetPressed && allowMove( w ) ) { // we are prepated for a move // if widget is laid out, find the first non-laid out super-widget - while ( w->tqparentWidget() && - ( WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w ) ) ) - w = w->tqparentWidget(); + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.tqfind(w ) ) ) + w = w->parentWidget(); // calc correct position TQPoint pos = w->mapFromGlobal( e->globalPos() ); @@ -770,10 +770,10 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() ); if ( mpos.y() < 0 ) pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() ); - if ( mpos.x() > w->tqparentWidget()->width() ) - pos.setX( w->mapFromParent( TQPoint( w->tqparentWidget()->width(), mpos.y() ) ).x() ); - if ( mpos.y() > w->tqparentWidget()->height() ) - pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->tqparentWidget()->height() ) ).y() ); + if ( mpos.x() > w->parentWidget()->width() ) + pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() ); + if ( mpos.y() > w->parentWidget()->height() ) + pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() ); #endif // calc move distance and store it @@ -876,7 +876,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) currentPos = mapFromGlobal( e->globalPos() ); tqApp->processEvents(); if ( drawRecRect ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->tqparentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), ( (TQWidget*)oldendWidget )->size() ) ); drawConnectionLine(); break; @@ -906,7 +906,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) currentPos = mapFromGlobal( e->globalPos() ); tqApp->processEvents(); if ( drawRecRect && oldendWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->tqparentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), ( (TQWidget*)oldendWidget )->size() ) ); drawConnectionLine(); break; @@ -946,7 +946,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) emitUpdateProperties( propertyWidget ); TQMapConstIterator<TQWidget*,TQPoint> it = moving.begin(); - TQWidget *oldParent = it.key()->tqparentWidget(); + TQWidget *oldParent = it.key()->parentWidget(); TQWidget *newParent = oldParent; // check whether we have to reparent the selection TQWidget* wa = containerAt( e->globalPos(), it.key() ); @@ -954,12 +954,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) wa = WidgetFactory::containerOfWidget( wa ); // ok, looks like we moved onto a container - // check whether we really have different tqparents. - if ( wa == it.key()->tqparentWidget() ) + // check whether we really have different parents. + if ( wa == it.key()->parentWidget() ) goto make_move_command; // break tqlayout if necessary - if ( WidgetFactory::tqlayoutType( wa ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) { if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), i18n( "You tried to insert a widget into the " "tqlayout Container Widget '%1'.\n" @@ -978,12 +978,12 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) { TQWidget *i = it.key(); if ( !emitSelChanged && ::tqqt_cast<TQButton*>(i) ) { - if ( ::tqqt_cast<TQButtonGroup*>(i->tqparentWidget()) || ::tqqt_cast<TQButtonGroup*>(wa) ) + if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqqt_cast<TQButtonGroup*>(wa) ) emitSelChanged = TRUE; if ( !::tqqt_cast<TQButtonGroup*>(wa) ) { MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); - if ( ::tqqt_cast<TQButtonGroup*>(i->tqparentWidget()) ) - ( (TQButtonGroup*)i->tqparentWidget() )->remove( (TQButton*)i ); + if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) ) + ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); } } TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); @@ -1027,11 +1027,11 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) case BUDDY_TOOL: restoreConnectionLine(); if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->tqparentWidget(), + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), ( (TQWidget*)startWidget )->pos() ), ((TQWidget*)startWidget )->size() ) ); if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->tqparentWidget(), + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), ( (TQWidget*)endWidget )->pos() ), ( (TQWidget*)endWidget )->size() ) ); endUnclippedPainter(); @@ -1064,7 +1064,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) default: // any insert widget tool is active if ( insertParent ) { // we should insert the new widget now endRectDraw(); - if ( WidgetFactory::tqlayoutType( insertParent ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) { if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), i18n( "You tried to insert a widget into the " "tqlayout Container Widget '%1'.\n" @@ -1395,7 +1395,7 @@ void FormWindow::moveSelectedWidgets( int dx, int dy ) for ( ; it.current(); ++it ) { WidgetSelection *s = it.current(); TQWidget *w = s->widget(); - if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) continue; w->move( w->x() + dx, w->y() + dy ); s->updateGeometry(); @@ -1451,7 +1451,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) { checkedSelectionsForMove = TRUE; - TQObjectList *l = w->tqparentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); moving.clear(); if ( l ) { TQPtrDictIterator<WidgetSelection> it( usedSelections ); @@ -1461,10 +1461,10 @@ void FormWindow::checkSelectionsForMove( TQWidget *w ) continue; ++it; if ( l->tqfind( TQT_TQOBJECT(sel->widget()) ) == -1 ) { - if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) sel->setWidget( 0 ); } else { - if ( WidgetFactory::tqlayoutType( sel->widget()->tqparentWidget() ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) { moving.insert( sel->widget(), sel->widget()->pos() ); sel->widget()->raise(); raiseChildSelections( sel->widget() ); @@ -1516,7 +1516,7 @@ void FormWindow::editAdjustSize() return; } 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 ) continue; TQRect oldr = w->tqgeometry(); w->adjustSize(); @@ -1700,11 +1700,11 @@ void FormWindow::currentToolChanged() case BUDDY_TOOL: restoreConnectionLine(); if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->tqparentWidget(), + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), ( (TQWidget*)startWidget )->pos() ), ( (TQWidget*)startWidget )->size() ) ); if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->tqparentWidget(), + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), ( (TQWidget*)endWidget )->pos() ), ( (TQWidget*)endWidget )->size() ) ); endUnclippedPainter(); @@ -1996,7 +1996,7 @@ void FormWindow::selectAll() emitSelectionChanged(); } -void FormWindow::tqlayoutHorizontal() +void FormWindow::layoutHorizontal() { TQWidgetList widgets( selectedWidgets() ); LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay OutQt::Horizontally" ), @@ -2006,7 +2006,7 @@ void FormWindow::tqlayoutHorizontal() cmd->execute(); } -void FormWindow::tqlayoutVertical() +void FormWindow::layoutVertical() { TQWidgetList widgets( selectedWidgets() ); LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay OutQt::Vertically" ), @@ -2016,7 +2016,7 @@ void FormWindow::tqlayoutVertical() cmd->execute(); } -void FormWindow::tqlayoutHorizontalSplit() +void FormWindow::layoutHorizontalSplit() { TQWidgetList widgets( selectedWidgets() ); LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay OutQt::Horizontally (in splitter)" ), @@ -2026,7 +2026,7 @@ void FormWindow::tqlayoutHorizontalSplit() cmd->execute(); } -void FormWindow::tqlayoutVerticalSplit() +void FormWindow::layoutVerticalSplit() { TQWidgetList widgets( selectedWidgets() ); LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay OutQt::Vertically (in splitter)" ), @@ -2036,7 +2036,7 @@ void FormWindow::tqlayoutVerticalSplit() cmd->execute(); } -void FormWindow::tqlayoutGrid() +void FormWindow::layoutGrid() { int xres = grid().x(); int yres = grid().y(); @@ -2049,7 +2049,7 @@ void FormWindow::tqlayoutGrid() cmd->execute(); } -void FormWindow::tqlayoutHorizontalContainer( TQWidget *w ) +void FormWindow::layoutHorizontalContainer( TQWidget *w ) { if ( w == this ) w = mainContainer(); @@ -2070,7 +2070,7 @@ void FormWindow::tqlayoutHorizontalContainer( TQWidget *w ) cmd->execute(); } -void FormWindow::tqlayoutVerticalContainer( TQWidget *w ) +void FormWindow::layoutVerticalContainer( TQWidget *w ) { if ( w == this ) w = mainContainer(); @@ -2091,7 +2091,7 @@ void FormWindow::tqlayoutVerticalContainer( TQWidget *w ) cmd->execute(); } -void FormWindow::tqlayoutGridContainer( TQWidget *w ) +void FormWindow::layoutGridContainer( TQWidget *w ) { if ( w == this ) w = mainContainer(); @@ -2125,7 +2125,7 @@ void FormWindow::breakLayout( TQWidget *w ) for (;;) { if ( !w || w == this ) break; - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout && + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { Command *cmd = breakLayoutCommand( w ); if ( cmd ) @@ -2133,7 +2133,7 @@ void FormWindow::breakLayout( TQWidget *w ) if ( !::tqqt_cast<TQLayoutWidget*>(w) && !::tqqt_cast<TQSplitter*>(w) ) break; } - w = w->tqparentWidget(); + w = w->parentWidget(); } if ( commands.isEmpty() ) @@ -2202,11 +2202,11 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const bool FormWindow::allowMove( TQWidget *w ) { - w = w->tqparentWidget(); + w = w->parentWidget(); while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.tqfind( w ) ) && WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) + if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.tqfind( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) return TRUE; - w = w->tqparentWidget(); + w = w->parentWidget(); } return FALSE; } @@ -2493,7 +2493,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const const TQWidget* i = w; while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) { p = i->mapToParent( p ); - i = i->tqparentWidget(); + i = i->parentWidget(); } return mapFromGlobal( w->mapToGlobal( pos ) ); } @@ -2503,7 +2503,7 @@ static int widgetDepth( TQWidget *w ) int d = -1; while ( w && !w->isTopLevel() ) { d++; - w = w->tqparentWidget(); + w = w->parentWidget(); } return d; @@ -2514,7 +2514,7 @@ static bool isChildOf( TQWidget *c, TQWidget *p ) while ( c && !c->isTopLevel() ) { if ( c == p ) return TRUE; - c = c->tqparentWidget(); + c = c->parentWidget(); } return FALSE; } @@ -2547,14 +2547,14 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) while ( w && !w->isTopLevel() ) { if ( !TQT_TQRECT_OBJECT(w->rect()).tqcontains( ( w->mapFromGlobal( pos ) ) ) ) break; - w = w->tqparentWidget(); + w = w->parentWidget(); } if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop int wd = widgetDepth( it.current() ); if ( wd == depth && container ) { - if ( ( it.current()->tqparentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(it.current()) ) > - ( container->tqparentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(container) ) ) + if ( ( it.current()->parentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(it.current()) ) > + ( container->parentWidget()->childrenListObject() ).tqfind( TQT_TQOBJECT(container) ) ) wd++; } if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { @@ -2694,12 +2694,12 @@ bool FormWindow::isCentralWidget( TQObject *w ) const return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); } -int FormWindow::tqlayoutDefaultSpacing() const +int FormWindow::layoutDefaultSpacing() const { return defSpacing; } -int FormWindow::tqlayoutDefaultMargin() const +int FormWindow::layoutDefaultMargin() const { return defMargin; } diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h index 9e60806c..0f7d6938 100644 --- a/kdevdesigner/designer/formwindow.h +++ b/kdevdesigner/designer/formwindow.h @@ -92,15 +92,15 @@ public: virtual void raiseWidgets(); virtual void checkAccels(); - virtual void tqlayoutHorizontal(); - virtual void tqlayoutVertical(); - virtual void tqlayoutHorizontalSplit(); - virtual void tqlayoutVerticalSplit(); - virtual void tqlayoutGrid(); + virtual void layoutHorizontal(); + virtual void layoutVertical(); + virtual void layoutHorizontalSplit(); + virtual void layoutVerticalSplit(); + virtual void layoutGrid(); - virtual void tqlayoutHorizontalContainer( TQWidget *w ); - virtual void tqlayoutVerticalContainer( TQWidget *w ); - virtual void tqlayoutGridContainer( TQWidget *w ); + virtual void layoutHorizontalContainer( TQWidget *w ); + virtual void layoutVerticalContainer( TQWidget *w ); + virtual void layoutGridContainer( TQWidget *w ); virtual void breakLayout( TQWidget *w ); @@ -192,8 +192,8 @@ public: DesignerFormWindow *iFace(); - int tqlayoutDefaultSpacing() const; - int tqlayoutDefaultMargin() const; + int layoutDefaultSpacing() const; + int layoutDefaultMargin() const; void setLayoutDefaultSpacing( int s ); void setLayoutDefaultMargin( int s ); TQString spacingFunction() const; diff --git a/kdevdesigner/designer/gotolinedialog.ui b/kdevdesigner/designer/gotolinedialog.ui index dbd319c8..28c1005e 100644 --- a/kdevdesigner/designer/gotolinedialog.ui +++ b/kdevdesigner/designer/gotolinedialog.ui @@ -29,7 +29,7 @@ <include location="local" implDecl="in declaration">gotolinedialog.ui.h</include> <forward>struct EditorInterface;</forward> <variable>EditorInterface *editor;</variable> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <widget class="TQDialog"> <property name="name"> <cstring>GotoLineDialog</cstring> diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp index 2deb21b2..5f747a37 100644 --- a/kdevdesigner/designer/hierarchyview.cpp +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -300,8 +300,8 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i ) return; if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { TQWidget *w = (TQWidget*)o; - if ( !w->tqparentWidget() || - WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) + if ( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) w->raise(); formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); } @@ -412,7 +412,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent ) TQListViewItem *item = 0; TQString className = WidgetFactory::classNameOf( o ); if ( ::tqqt_cast<TQLayoutWidget*>(o) ) { - switch ( WidgetFactory::tqlayoutType( (TQWidget*)o ) ) { + switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { case WidgetFactory::HBox: className = "HBox"; break; diff --git a/kdevdesigner/designer/iconvieweditor.ui b/kdevdesigner/designer/iconvieweditor.ui index b36341b2..369fdb67 100644 --- a/kdevdesigner/designer/iconvieweditor.ui +++ b/kdevdesigner/designer/iconvieweditor.ui @@ -457,5 +457,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp index 8cbf9a7c..b79604bf 100644 --- a/kdevdesigner/designer/kdevdesigner_part.cpp +++ b/kdevdesigner/designer/kdevdesigner_part.cpp @@ -40,7 +40,7 @@ #include "designeraction.h" #include "formwindow.h" -KDevDesignerPart::KDevDesignerPart( TQWidget *tqparentWidget, const char *// widgetName +KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widgetName , TQObject *tqparent, const char *name, const TQStringList &args ) : KInterfaceDesigner::Designer(tqparent, name) @@ -48,7 +48,7 @@ KDevDesignerPart::KDevDesignerPart( TQWidget *tqparentWidget, const char *// wid setInstance( KDevDesignerPartFactory::instance() ); m_widget = new MainWindow( this, true ); - m_widget->reparent(tqparentWidget, TQPoint(0,0)); + m_widget->reparent(parentWidget, TQPoint(0,0)); setupDesignerWindow(); setWidget(m_widget); @@ -68,7 +68,7 @@ KDevDesignerPart::KDevDesignerPart( TQWidget *tqparentWidget, const char *// wid void KDevDesignerPart::setupDesignerWindow() { m_widget->menuBar()->hide(); - m_widget->tqlayoutToolBar->hide(); + m_widget->layoutToolBar->hide(); m_widget->projectToolBar->hide(); m_widget->toolsToolBar->hide(); m_widget->statusBar()->hide(); @@ -144,21 +144,21 @@ void KDevDesignerPart::setupActions( ) new KAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); new KAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); - action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(tqlayoutAdjustSize()), actionCollection(), "tqlayout_adjustsize"); + action = new KAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); stateSync(action, m_widget->actionEditAdjustSize); - action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithtqlayout.png"), CTRL + Key_H, this, TQT_SLOT(tqlayoutHLayout()), actionCollection(), "tqlayout_h"); + action = new KAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithtqlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); stateSync(action, m_widget->actionEditHLayout); - action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvtqlayout.png"), CTRL + Key_V, this, TQT_SLOT(tqlayoutVLayout()), actionCollection(), "tqlayout_v"); + action = new KAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvtqlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); stateSync(action, m_widget->actionEditVLayout); - action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(tqlayoutGridLayout()), actionCollection(), "tqlayout_grid"); + action = new KAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); stateSync(action, m_widget->actionEditGridLayout); - action = new KAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvtqlayoutsplit.png"), 0, this, TQT_SLOT(tqlayoutSplitHLayout()), actionCollection(), "tqlayout_splith"); + action = new KAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); stateSync(action, m_widget->actionEditSplitHorizontal); - action = new KAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithtqlayoutsplit.png"), 0, this, TQT_SLOT(tqlayoutSplitVLayout()), actionCollection(), "tqlayout_splitv"); + action = new KAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); stateSync(action, m_widget->actionEditSplitVertical); - action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(tqlayoutBreak()), actionCollection(), "tqlayout_break"); + action = new KAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); stateSync(action, m_widget->actionEditBreakLayout); - toggle = new KRadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "tqlayout_spacer"); + toggle = new KRadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); setupToolsAction(toggle, m_widget->actionInsertSpacer); action = new KAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); @@ -256,12 +256,12 @@ KDevDesignerPartFactory::~KDevDesignerPartFactory() s_instance = 0L; } -KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, +KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ) { // Create an instance of our Part - KDevDesignerPart* obj = new KDevDesignerPart( tqparentWidget, widgetName, tqparent, name, args ); + KDevDesignerPart* obj = new KDevDesignerPart( parentWidget, widgetName, tqparent, name, args ); // See if we are to be read-write or not if (TQCString(classname) == "KParts::ReadOnlyPart") @@ -407,37 +407,37 @@ void KDevDesignerPart::toolsConfigureToolbox( ) m_widget->toolsConfigure(); } -void KDevDesignerPart::tqlayoutAdjustSize( ) +void KDevDesignerPart::layoutAdjustSize( ) { m_widget->actionEditAdjustSize->activate(); } -void KDevDesignerPart::tqlayoutHLayout( ) +void KDevDesignerPart::layoutHLayout( ) { m_widget->actionEditHLayout->activate(); } -void KDevDesignerPart::tqlayoutVLayout( ) +void KDevDesignerPart::layoutVLayout( ) { m_widget->actionEditVLayout->activate(); } -void KDevDesignerPart::tqlayoutGridLayout( ) +void KDevDesignerPart::layoutGridLayout( ) { m_widget->actionEditGridLayout->activate(); } -void KDevDesignerPart::tqlayoutSplitHLayout( ) +void KDevDesignerPart::layoutSplitHLayout( ) { m_widget->actionEditSplitHorizontal->activate(); } -void KDevDesignerPart::tqlayoutSplitVLayout( ) +void KDevDesignerPart::layoutSplitVLayout( ) { m_widget->actionEditSplitVertical->activate(); } -void KDevDesignerPart::tqlayoutBreak( ) +void KDevDesignerPart::layoutBreak( ) { m_widget->actionEditBreakLayout->activate(); } diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h index a3a759e4..314af47b 100644 --- a/kdevdesigner/designer/kdevdesigner_part.h +++ b/kdevdesigner/designer/kdevdesigner_part.h @@ -41,7 +41,7 @@ class KDevDesignerPart : public KInterfaceDesigner::Designer Q_OBJECT TQ_OBJECT public: - KDevDesignerPart(TQWidget *tqparentWidget, const char *widgetName, + KDevDesignerPart(TQWidget *parentWidget, const char *widgetName, TQObject *tqparent, const char *name, const TQStringList &args); virtual ~KDevDesignerPart(); @@ -104,13 +104,13 @@ protected slots: void toolsConfigureToolbox(); void toolsEditCustomWidgets(); - void tqlayoutAdjustSize(); - void tqlayoutHLayout(); - void tqlayoutVLayout(); - void tqlayoutGridLayout(); - void tqlayoutSplitHLayout(); - void tqlayoutSplitVLayout(); - void tqlayoutBreak(); + void layoutAdjustSize(); + void layoutHLayout(); + void layoutVLayout(); + void layoutGridLayout(); + void layoutSplitHLayout(); + void layoutSplitVLayout(); + void layoutBreak(); void windowPreview(); void windowNext(); @@ -135,7 +135,7 @@ class KDevDesignerPartFactory : public KParts::Factory public: KDevDesignerPartFactory(); virtual ~KDevDesignerPartFactory(); - virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, + virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ); static KInstance* instance(); diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp index 17592f0f..450f4633 100644 --- a/kdevdesigner/designer/layout.cpp +++ b/kdevdesigner/designer/layout.cpp @@ -45,18 +45,18 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> & /*! \class Layout tqlayout.h - \brief Baseclass for tqlayouting widgets in the Designer + \brief Baseclass for layouting widgets in the Designer - Classes derived from this abstract base class are used for tqlayouting + Classes derived from this abstract base class are used for layouting operations in the Designer. */ -/*! \a p specifies the tqparent of the tqlayoutBase \a lb. The tqparent - might be changed in setup(). If the tqlayoutBase is a - container, the tqparent and the tqlayoutBase are the same. Also they +/*! \a p specifies the tqparent of the layoutBase \a lb. The tqparent + might be changed in setup(). If the layoutBase is a + container, the tqparent and the layoutBase are the same. Also they always have to be a widget known to the designer (e.g. in the case - of the tabwidget tqparent and tqlayoutBase are the tabwidget and not the + of the tabwidget tqparent and layoutBase are the tabwidget and not the page which actually gets laid out. For actual usage the correct widget is found later by Layout.) */ @@ -65,13 +65,13 @@ Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *l : widgets( wl ), tqparent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter ) { widgets.setAutoDelete( FALSE ); - tqlayoutBase = lb; - if ( !doSetup && tqlayoutBase ) - oldGeometry = tqlayoutBase->tqgeometry(); + layoutBase = lb; + if ( !doSetup && layoutBase ) + oldGeometry = layoutBase->tqgeometry(); } /*! The widget list we got in the constructor might contain too much - widgets (like widgets with different tqparents, already laid out + widgets (like widgets with different parents, already laid out widgets, etc.). Here we set up the list and so the only the "best" widgets get laid out. */ @@ -91,14 +91,14 @@ void Layout::setup() // childs which has the most entries. // Widgets which are already laid out are thrown away here too for ( 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 ) continue; - if ( lastParent != w->tqparentWidget() ) { + if ( lastParent != w->parentWidget() ) { lastList = 0; - lastParent = w->tqparentWidget(); + lastParent = w->parentWidget(); TQValueList<TQWidgetList>::Iterator it = lists.begin(); for ( ; it != lists.end(); ++it ) { - if ( ( *it ).first()->tqparentWidget() == w->tqparentWidget() ) + if ( ( *it ).first()->parentWidget() == w->parentWidget() ) lastList = &( *it ); } if ( !lastList ) { @@ -123,9 +123,9 @@ void Layout::setup() // best list has only one entry and we do not tqlayout a container, // we leave here. if ( !lastList || ( lastList->count() < 2 && - ( !tqlayoutBase || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(tqlayoutBase) ) ) ) && - tqlayoutBase != formWindow->mainContainer() ) ) + ( !layoutBase || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + layoutBase != formWindow->mainContainer() ) ) ) ) { widgets.clear(); startPoint = TQPoint( 0, 0 ); @@ -136,7 +136,7 @@ void Layout::setup() // to tqlayout widgets = *lastList; // Also use the only correct tqparent later, so store it - tqparent = WidgetFactory::widgetOfContainer( widgets.first()->tqparentWidget() ); + tqparent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() ); // Now calculate the position where the tqlayout-meta-widget should // be placed and connect to widgetDestroyed() signals of the // widgets to get informed if one gets deleted to be able to @@ -166,17 +166,17 @@ bool Layout::prepareLayout( bool &needMove, bool &needRetqparent ) return FALSE; for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) w->raise(); - needMove = !tqlayoutBase; - needRetqparent = needMove || ::tqqt_cast<TQLayoutWidget*>(tqlayoutBase) || ::tqqt_cast<TQSplitter*>(tqlayoutBase); - if ( !tqlayoutBase ) { + needMove = !layoutBase; + needRetqparent = needMove || ::tqqt_cast<TQLayoutWidget*>(layoutBase) || ::tqqt_cast<TQSplitter*>(layoutBase); + if ( !layoutBase ) { if ( !useSplitter ) - tqlayoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ), WidgetFactory::containerOfWidget( tqparent ) ); else - tqlayoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), + layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ), WidgetFactory::containerOfWidget( tqparent ) ); } else { - WidgetFactory::deleteLayout( tqlayoutBase ); + WidgetFactory::deleteLayout( layoutBase ); } return TRUE; @@ -185,21 +185,21 @@ bool Layout::prepareLayout( bool &needMove, bool &needRetqparent ) void Layout::finishLayout( bool needMove, TQLayout *tqlayout ) { if ( needMove ) - tqlayoutBase->move( startPoint ); - TQRect g( TQRect( tqlayoutBase->pos(), tqlayoutBase->size() ) ); - if ( WidgetFactory::tqlayoutType( tqlayoutBase->tqparentWidget() ) == WidgetFactory::NoLayout && !isBreak ) - tqlayoutBase->adjustSize(); + layoutBase->move( startPoint ); + TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) ); + if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak ) + layoutBase->adjustSize(); else if ( isBreak ) - tqlayoutBase->setGeometry( oldGeometry ); + layoutBase->setGeometry( oldGeometry ); oldGeometry = g; - tqlayoutBase->show(); + layoutBase->show(); tqlayout->activate(); - formWindow->insertWidget( tqlayoutBase ); - formWindow->selectWidget( TQT_TQOBJECT(tqlayoutBase) ); - TQString n = tqlayoutBase->name(); + formWindow->insertWidget( layoutBase ); + formWindow->selectWidget( TQT_TQOBJECT(layoutBase) ); + TQString n = layoutBase->name(); if ( n.tqfind( "qt_dead_widget_" ) != -1 ) { n.remove( 0, TQString( "qt_dead_widget_" ).length() ); - tqlayoutBase->setName( n ); + layoutBase->setName( n ); } } @@ -214,15 +214,15 @@ void Layout::undoLayout() it.key()->reparent( WidgetFactory::containerOfWidget( tqparent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) ); it.key()->resize( ( *it ).size() ); } - formWindow->selectWidget( TQT_TQOBJECT(tqlayoutBase), FALSE ); - WidgetFactory::deleteLayout( tqlayoutBase ); - if ( tqparent != tqlayoutBase && !::tqqt_cast<TQMainWindow*>(tqlayoutBase) ) { - tqlayoutBase->hide(); - TQString n = tqlayoutBase->name(); + formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE ); + WidgetFactory::deleteLayout( layoutBase ); + if ( tqparent != layoutBase && !::tqqt_cast<TQMainWindow*>(layoutBase) ) { + layoutBase->hide(); + TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); - tqlayoutBase->setName( n ); + layoutBase->setName( n ); } else { - tqlayoutBase->setGeometry( oldGeometry ); + layoutBase->setGeometry( oldGeometry ); } if ( widgets.first() ) formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); @@ -238,33 +238,33 @@ void Layout::breakLayout() for ( w = widgets.first(); w; w = widgets.next() ) rects.insert( w, w->tqgeometry() ); } - WidgetFactory::deleteLayout( tqlayoutBase ); - bool needRetqparent = qstrcmp( tqlayoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || - qstrcmp( tqlayoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(tqlayoutBase) ) ) ) && - tqlayoutBase != formWindow->mainContainer() ); - bool needResize = qstrcmp( tqlayoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; + WidgetFactory::deleteLayout( layoutBase ); + bool needRetqparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 || + qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) && + layoutBase != formWindow->mainContainer() ); + bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0; bool add = geometries.isEmpty(); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { if ( needRetqparent ) - w->reparent( tqlayoutBase->tqparentWidget(), 0, - tqlayoutBase->pos() + w->pos(), TRUE ); + w->reparent( layoutBase->parentWidget(), 0, + layoutBase->pos() + w->pos(), TRUE ); if ( needResize ) { TQMap<TQWidget*, TQRect>::Iterator it = rects.tqfind( w ); if ( it != rects.end() ) - w->setGeometry( TQRect( tqlayoutBase->pos() + (*it).topLeft(), (*it).size() ) ); + w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) ); } if ( add ) geometries.insert( w, TQRect( w->pos(), w->size() ) ); } if ( needRetqparent ) { - tqlayoutBase->hide(); - tqparent = tqlayoutBase->tqparentWidget(); - TQString n = tqlayoutBase->name(); + layoutBase->hide(); + tqparent = layoutBase->parentWidget(); + TQString n = layoutBase->name(); n.prepend( "qt_dead_widget_" ); - tqlayoutBase->setName( n ); + layoutBase->setName( n ); } else { - tqparent = tqlayoutBase; + tqparent = layoutBase; } if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) ) formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) ); @@ -311,11 +311,11 @@ void HorizontalLayout::doLayout() if ( !prepareLayout( needMove, needRetqparent ) ) return; - TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::HBox ); + TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) ) - w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() ); @@ -327,8 +327,8 @@ void HorizontalLayout::doLayout() w->show(); } - if ( ::tqqt_cast<TQSplitter*>(tqlayoutBase) ) - ( (TQSplitter*)tqlayoutBase )->setOrientation( Qt::Horizontal ); + if ( ::tqqt_cast<TQSplitter*>(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal ); finishLayout( needMove, tqlayout ); } @@ -375,11 +375,11 @@ void VerticalLayout::doLayout() if ( !prepareLayout( needMove, needRetqparent ) ) return; - TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::VBox ); + TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) ) - w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( !useSplitter ) { if ( qstrcmp( w->className(), "Spacer" ) == 0 ) tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() ); @@ -391,8 +391,8 @@ void VerticalLayout::doLayout() w->show(); } - if ( ::tqqt_cast<TQSplitter*>(tqlayoutBase) ) - ( (TQSplitter*)tqlayoutBase )->setOrientation( Qt::Vertical ); + if ( ::tqqt_cast<TQSplitter*>(layoutBase) ) + ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical ); finishLayout( needMove, tqlayout ); } @@ -747,7 +747,7 @@ void GridLayout::doLayout() if ( !prepareLayout( needMove, needRetqparent ) ) return; - QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid ); + QDesignerGridLayout *tqlayout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid ); if ( !grid ) buildGrid(); @@ -756,8 +756,8 @@ void GridLayout::doLayout() int r, c, rs, cs; for ( w = widgets.first(); w; w = widgets.next() ) { if ( grid->locateWidget( w, r, c, rs, cs) ) { - if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) ) - w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), FALSE ); + if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(layoutBase) ) + w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE ); if ( rs * cs == 1 ) { tqlayout->addWidget( w, r, c, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->tqalignment() : 0 ); } else { @@ -908,7 +908,7 @@ void Spacer::paintEvent( TQPaintEvent * ) void Spacer::resizeEvent( TQResizeEvent* e) { TQWidget::resizeEvent( e ); - if ( !tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout ) + if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) sh = size(); } @@ -974,7 +974,7 @@ TQSize Spacer::tqsizeHint() const void Spacer::setSizeHint( const TQSize &s ) { sh = s; - if ( !tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout ) + if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) resize( tqsizeHint() ); updateGeometry(); } @@ -994,7 +994,7 @@ void Spacer::setOrientation( Qt::Orientation o ) setSizeType( st ); if ( interactive ) { sh = TQSize( sh.height(), sh.width() ); - if (!tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout ) + if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout ) resize( height(), width() ); } updateMask(); diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h index ac4aabb2..51e9d48b 100644 --- a/kdevdesigner/designer/layout.h +++ b/kdevdesigner/designer/layout.h @@ -58,7 +58,7 @@ protected: TQWidget *tqparent; TQPoint startPoint; TQMap<TQGuardedPtr<TQWidget>, TQRect> geometries; - TQWidget *tqlayoutBase; + TQWidget *layoutBase; FormWindow *formWindow; TQRect oldGeometry; bool isBreak; @@ -167,7 +167,7 @@ class QDesignerGridLayout : public TQGridLayout TQ_OBJECT public: QDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){}; - QDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){}; + QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){}; void addWidget( TQWidget *, int row, int col, int align = 0 ); void addMultiCellWidget( TQWidget *, int fromRow, int toRow, diff --git a/kdevdesigner/designer/listboxeditor.ui b/kdevdesigner/designer/listboxeditor.ui index bb904236..2827c93d 100644 --- a/kdevdesigner/designer/listboxeditor.ui +++ b/kdevdesigner/designer/listboxeditor.ui @@ -453,5 +453,5 @@ <include location="local" impldecl="in implementation">myiconloader.h</include> </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/listeditor.ui b/kdevdesigner/designer/listeditor.ui index 02d60cb9..30b766a0 100644 --- a/kdevdesigner/designer/listeditor.ui +++ b/kdevdesigner/designer/listeditor.ui @@ -175,5 +175,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/listvieweditor.ui b/kdevdesigner/designer/listvieweditor.ui index c3e4df1b..e2f3447f 100644 --- a/kdevdesigner/designer/listvieweditor.ui +++ b/kdevdesigner/designer/listvieweditor.ui @@ -931,5 +931,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp index 53706d40..87e15a74 100644 --- a/kdevdesigner/designer/mainwindow.cpp +++ b/kdevdesigner/designer/mainwindow.cpp @@ -219,9 +219,9 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons setupEditActions(); setupProjectActions(); setupSearchActions(); - tqlayoutToolBar = new TQToolBar( this, "Layout" ); - tqlayoutToolBar->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tqlayoutToolBar, i18n( "Layout" ) ); + layoutToolBar = new TQToolBar( this, "Layout" ); + layoutToolBar->setCloseMode( TQDockWindow::Undocked ); + addToolBar( layoutToolBar, i18n( "Layout" ) ); interpreterPluginManager = 0; setupToolActions(); setupLayoutActions(); @@ -255,8 +255,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), this, TQT_SLOT( clipboardChanged() ) ); clipboardChanged(); - tqlayoutChilds = FALSE; - tqlayoutSelected = FALSE; + layoutChilds = FALSE; + layoutSelected = FALSE; breakLayout = FALSE; backPix = TRUE; @@ -273,8 +273,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons delete w; w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); delete w; - setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), FALSE ); - actionEditor->tqparentWidget()->hide(); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + actionEditor->parentWidget()->hide(); assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); @@ -408,7 +408,7 @@ void MainWindow::setupHierarchyView() "<p>The Object Explorer provides an overview of the relationships " "between the widgets in a form. You can use the clipboard functions using " "a context menu for each item in the view. It is also useful for selecting widgets " - "in forms that have complex tqlayouts.</p>" + "in forms that have complex layouts.</p>" "<p>The columns can be resized by dragging the separator in the list's header.</p>" "<p>The second tab shows all the form's slots, class variables, includes, etc.</p>") ); dw->show(); @@ -742,7 +742,7 @@ void MainWindow::helpContents() showClassDocu = FALSE; break; } - tqfocusWidget = tqfocusWidget->tqparentWidget(); + tqfocusWidget = tqfocusWidget->parentWidget(); } TQString source = "designer-manual.html"; @@ -770,9 +770,9 @@ void MainWindow::helpContents() TQMetaObject* mo = propertyEditor->tqmetaObjectOfCurrentProperty(); TQString s; TQString cp = propertyEditor->currentProperty(); - if ( cp == "tqlayoutMargin" ) { + if ( cp == "layoutMargin" ) { source = propertyDocumentation[ "TQLayout/margin" ]; - } else if ( cp == "tqlayoutSpacing" ) { + } else if ( cp == "layoutSpacing" ) { source = propertyDocumentation[ "TQLayout/spacing" ]; } else if ( cp == "toolTip" ) { source = "tqtooltip.html#details"; @@ -964,7 +964,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqqt_cast<PropertyList*>(w) ) break; - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } if ( w ) { propertyEditor->propertyList()->showCurrentWhatsThis(); @@ -1001,8 +1001,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqqt_cast<TQComboBox*>(w) || ::tqqt_cast<PopupMenuEditor*>(w) || ::tqqt_cast<QDesignerToolBarSeparator*>(w) ) - w = w->tqparentWidget(); - TQWidget *pw = w->tqparentWidget(); + w = w->parentWidget(); + TQWidget *pw = w->parentWidget(); while ( pw ) { if ( ::tqqt_cast<FormWindow*>(pw) ) { ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); @@ -1012,7 +1012,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) !::tqqt_cast<TQComboBox*>(o) && !::tqqt_cast<QDesignerToolBarSeparator*>(o) ); } - pw = pw->tqparentWidget(); + pw = pw->parentWidget(); } } if ( o && ( ::tqqt_cast<QDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) @@ -1151,7 +1151,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) ::tqqt_cast<SizeHandle*>(o) || ::tqqt_cast<OrderIndicator*>(o) ) break; - if ( WidgetFactory::tqlayoutType( (TQWidget*)o->tqparent() ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( (TQWidget*)o->tqparent() ) != WidgetFactory::NoLayout ) { ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); if ( e->type() != TQEvent::Resize ) ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); @@ -1210,7 +1210,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) while ( w ) { if ( ::tqqt_cast<SourceEditor*>(w) ) break; - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } if ( ::tqqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->checkTimeStamp(); @@ -1362,7 +1362,7 @@ bool MainWindow::unregisterClient( FormWindow *w ) if ( actionEditor->form() == w ) { actionEditor->setFormWindow( 0 ); - actionEditor->tqparentWidget()->hide(); + actionEditor->parentWidget()->hide(); } return TRUE; @@ -1384,16 +1384,16 @@ void MainWindow::activeWindowChanged( TQWidget *w ) formWindow()->clearSelection(); } workspace()->activeFormChanged( fw ); - setAppropriate( (TQDockWindow*)actionEditor->tqparentWidget(), + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), ::tqqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) ); - if ( appropriate( (TQDockWindow*)actionEditor->tqparentWidget() ) ) { + if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { if ( actionEditor->wantToBeShown() ) - actionEditor->tqparentWidget()->show(); + actionEditor->parentWidget()->show(); } else { TQWidget *mc = 0; if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast<TQMainWindow*>(mc) ) - actionEditor->setWantToBeShown( !actionEditor->tqparentWidget()->isHidden() ); - actionEditor->tqparentWidget()->hide(); + actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); + actionEditor->parentWidget()->hide(); } actionEditor->setFormWindow( lastActiveFormWindow ); @@ -2003,8 +2003,8 @@ void MainWindow::clipboardChanged() void MainWindow::selectionChanged() { - tqlayoutChilds = FALSE; - tqlayoutSelected = FALSE; + layoutChilds = FALSE; + layoutSelected = FALSE; breakLayout = FALSE; if ( !formWindow() ) { actionEditCut->setEnabled( FALSE ); @@ -2041,7 +2041,7 @@ void MainWindow::selectionChanged() int unlaidout = 0; int laidout = 0; 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 ) unlaidout++; else laidout++; @@ -2053,27 +2053,27 @@ void MainWindow::selectionChanged() actionEditGridLayout->setEnabled( unlaidout > 1 ); actionEditBreakLayout->setEnabled( laidout > 0 ); actionEditAdjustSize->setEnabled( laidout > 0 ); - tqlayoutSelected = unlaidout > 1; + layoutSelected = unlaidout > 1; breakLayout = laidout > 0; } else if ( selectedWidgets == 1 ) { TQWidget *w = widgets.first(); bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || w == formWindow()->mainContainer(); - actionEditAdjustSize->setEnabled( !w->tqparentWidget() || - WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ); + actionEditAdjustSize->setEnabled( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); if ( !isContainer ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); actionEditGridLayout->setEnabled( FALSE ); - if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } else { actionEditBreakLayout->setEnabled( FALSE ); } } else { - if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2084,9 +2084,9 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - tqlayoutChilds = TRUE; + layoutChilds = TRUE; } - if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); breakLayout = TRUE; } @@ -2101,7 +2101,7 @@ void MainWindow::selectionChanged() } else if ( selectedWidgets == 0 ) { actionEditAdjustSize->setEnabled( TRUE ); TQWidget *w = formWindow()->mainContainer(); - if ( WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { if ( !formWindow()->hasInsertedChildren( w ) ) { actionEditHLayout->setEnabled( FALSE ); actionEditVLayout->setEnabled( FALSE ); @@ -2112,7 +2112,7 @@ void MainWindow::selectionChanged() actionEditVLayout->setEnabled( TRUE ); actionEditGridLayout->setEnabled( TRUE ); actionEditBreakLayout->setEnabled( FALSE ); - tqlayoutChilds = TRUE; + layoutChilds = TRUE; } } else { actionEditHLayout->setEnabled( FALSE ); @@ -2177,18 +2177,18 @@ void MainWindow::writeConfig() config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); - config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->tqparentWidget()->height() ); - config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->tqparentWidget()->height() ); - config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->tqparentWidget()->x() ); - config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->tqparentWidget()->y() ); - config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->tqparentWidget()->width() ); - config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->tqparentWidget()->height() ); + config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); @@ -3204,7 +3204,7 @@ void MainWindow::setModified( bool b, TQWidget *window ) } return; } - w = w->tqparentWidget( TRUE ); + w = w->parentWidget( TRUE ); } } @@ -3300,9 +3300,9 @@ void MainWindow::enableAll( bool enable ) menuBar()->setEnabled( enable ); TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->tqparentWidget() || - TQT_BASE_OBJECT(o) == oWindow->tqparentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->tqparentWidget() ) + if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || + TQT_BASE_OBJECT(o) == oWindow->parentWidget() || + TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) continue; ( (TQWidget*)o )->setEnabled( enable ); } @@ -3520,14 +3520,14 @@ void MainWindow::breakPointsChanged() int MainWindow::currentLayoutDefaultSpacing() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultSpacing(); + return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); return BOXLAYOUT_DEFAULT_SPACING; } int MainWindow::currentLayoutDefaultMargin() const { if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->tqlayoutDefaultMargin(); + return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); return BOXLAYOUT_DEFAULT_MARGIN; } @@ -3682,15 +3682,15 @@ void MainWindow::showGUIStuff( bool b ) return; guiStuffVisible = b; if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), FALSE ); - toolBox->tqparentWidget()->hide(); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + toolBox->parentWidget()->hide(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { tb->hide(); setAppropriate( tb, FALSE ); } propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( tqlayoutToolBar, FALSE ); - tqlayoutToolBar->hide(); + setAppropriate( layoutToolBar, FALSE ); + layoutToolBar->hide(); setAppropriate( toolsToolBar, FALSE ); toolsToolBar->hide(); menubar->removeItem( toolsMenuId ); @@ -3706,7 +3706,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( FALSE ); actionEditFunctions->setEnabled( FALSE ); actionEditAccels->setEnabled( FALSE ); - ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> + ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Signal Handlers" ) ); actionGroupNew->removeFrom( fileMenu ); actionGroupNew->removeFrom( projectToolBar ); @@ -3719,19 +3719,19 @@ void MainWindow::showGUIStuff( bool b ) actionFileSave->addTo( projectToolBar ); actionFileExit->addTo( fileMenu ); } else { - setAppropriate( (TQDockWindow*)toolBox->tqparentWidget(), TRUE ); - toolBox->tqparentWidget()->show(); + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + toolBox->parentWidget()->show(); for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { setAppropriate( tb, TRUE ); tb->hide(); } propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( tqlayoutToolBar, TRUE ); - tqlayoutToolBar->show(); + setAppropriate( layoutToolBar, TRUE ); + layoutToolBar->show(); setAppropriate( toolsToolBar, TRUE ); toolsToolBar->show(); menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); - menubar->insertItem( i18n( "&Layout" ), tqlayoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); + menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); @@ -3743,7 +3743,7 @@ void MainWindow::showGUIStuff( bool b ) actionEditConnections->setEnabled( TRUE ); actionEditFunctions->setEnabled( TRUE ); actionEditAccels->setEnabled( TRUE ); - ( (TQDockWindow*)propertyEditor->tqparentWidget() )-> + ( (TQDockWindow*)propertyEditor->parentWidget() )-> setCaption( i18n( "Property Editor/Signal Handlers" ) ); actionFileSave->removeFrom( fileMenu ); actionFileSave->removeFrom( projectToolBar ); diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h index 950cf241..359f1b67 100644 --- a/kdevdesigner/designer/mainwindow.h +++ b/kdevdesigner/designer/mainwindow.h @@ -386,7 +386,7 @@ private: TQWorkspace *qworkspace; TQMenuBar *menubar; TQGuardedPtr<FormWindow> lastActiveFormWindow; - bool breakLayout, tqlayoutChilds, tqlayoutSelected; + bool breakLayout, layoutChilds, layoutSelected; TQPoint grd; bool sGrid, snGrid; bool restoreConfig; @@ -425,8 +425,8 @@ private: TQPopupMenu *rmbWidgets; TQPopupMenu *rmbFormWindow; TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu; - TQPopupMenu *toolsMenu, *tqlayoutMenu, *previewMenu; - TQToolBar *customWidgetToolBar, *tqlayoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; + TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu; + TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; TQToolBar *commonWidgetsToolBar; TQPtrList<TQToolBar> widgetToolBars; diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index ed4ed2bf..2bf3c798 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -351,14 +351,14 @@ void MainWindow::setupLayoutActions() connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); actionEditGridLayout->setEnabled( FALSE ); - actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvtqlayoutsplit.png"), + actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), i18n( "Lay OutQt::Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally (in Splitter)" ) ); connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithtqlayoutsplit.png"), + actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), i18n( "Lay OutQt::Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically (in Splitter)" ) ); @@ -392,20 +392,20 @@ void MainWindow::setupLayoutActions() TQWidget *w; commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - TQWhatsThis::add( tqlayoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).tqarg(i18n(toolbarHelp).tqarg("")) ); - actionEditAdjustSize->addTo( tqlayoutToolBar ); - tqlayoutToolBar->addSeparator(); - actionEditHLayout->addTo( tqlayoutToolBar ); - actionEditVLayout->addTo( tqlayoutToolBar ); - actionEditGridLayout->addTo( tqlayoutToolBar ); - actionEditSplitHorizontal->addTo( tqlayoutToolBar ); - actionEditSplitVertical->addTo( tqlayoutToolBar ); - actionEditBreakLayout->addTo( tqlayoutToolBar ); - tqlayoutToolBar->addSeparator(); - actionInsertSpacer->addTo( tqlayoutToolBar ); + TQWhatsThis::add( layoutToolBar, i18n( "<b>The Layout toolbar</b>%1" ).tqarg(i18n(toolbarHelp).tqarg("")) ); + actionEditAdjustSize->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionEditHLayout->addTo( layoutToolBar ); + actionEditVLayout->addTo( layoutToolBar ); + actionEditGridLayout->addTo( layoutToolBar ); + actionEditSplitHorizontal->addTo( layoutToolBar ); + actionEditSplitVertical->addTo( layoutToolBar ); + actionEditBreakLayout->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionInsertSpacer->addTo( layoutToolBar ); TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); - tqlayoutMenu = menu; + layoutMenu = menu; menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); actionEditAdjustSize->addTo( menu ); menu->insertSeparator(); @@ -851,7 +851,7 @@ void MainWindow::setupPreviewActions() { DesignerAction* a = 0; TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); - tqlayoutMenu = menu; + layoutMenu = menu; menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); @@ -1554,13 +1554,13 @@ void MainWindow::editPaste() TQWidgetList l( formWindow()->selectedWidgets() ); if ( l.count() == 1 ) { w = l.first(); - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout || + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && w != formWindow()->mainContainer() ) ) w = formWindow()->mainContainer(); } - if ( w && WidgetFactory::tqlayoutType( w ) == WidgetFactory::NoLayout ) { + if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); hierarchyView->widgetInserted( 0 ); formWindow()->commandHistory()->setModified( TRUE ); @@ -1611,42 +1611,42 @@ void MainWindow::editAdjustSize() void MainWindow::editLayoutHorizontal() { - if ( tqlayoutChilds ) + if ( layoutChilds ) editLayoutContainerHorizontal(); - else if ( tqlayoutSelected && formWindow() ) - formWindow()->tqlayoutHorizontal(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontal(); } void MainWindow::editLayoutVertical() { - if ( tqlayoutChilds ) + if ( layoutChilds ) editLayoutContainerVertical(); - else if ( tqlayoutSelected && formWindow() ) - formWindow()->tqlayoutVertical(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVertical(); } void MainWindow::editLayoutHorizontalSplit() { - if ( tqlayoutChilds ) + if ( layoutChilds ) ; // no way to do that - else if ( tqlayoutSelected && formWindow() ) - formWindow()->tqlayoutHorizontalSplit(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontalSplit(); } void MainWindow::editLayoutVerticalSplit() { - if ( tqlayoutChilds ) + if ( layoutChilds ) ; // no way to do that - else if ( tqlayoutSelected && formWindow() ) - formWindow()->tqlayoutVerticalSplit(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVerticalSplit(); } void MainWindow::editLayoutGrid() { - if ( tqlayoutChilds ) + if ( layoutChilds ) editLayoutContainerGrid(); - else if ( tqlayoutSelected && formWindow() ) - formWindow()->tqlayoutGrid(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutGrid(); } void MainWindow::editLayoutContainerVertical() @@ -1658,7 +1658,7 @@ void MainWindow::editLayoutContainerVertical() if ( l.count() == 1 ) w = l.first(); if ( w ) - formWindow()->tqlayoutVerticalContainer( w ); + formWindow()->layoutVerticalContainer( w ); } void MainWindow::editLayoutContainerHorizontal() @@ -1670,7 +1670,7 @@ void MainWindow::editLayoutContainerHorizontal() if ( l.count() == 1 ) w = l.first(); if ( w ) - formWindow()->tqlayoutHorizontalContainer( w ); + formWindow()->layoutHorizontalContainer( w ); } void MainWindow::editLayoutContainerGrid() @@ -1682,7 +1682,7 @@ void MainWindow::editLayoutContainerGrid() if ( l.count() == 1 ) w = l.first(); if ( w ) - formWindow()->tqlayoutGridContainer( w ); + formWindow()->layoutGridContainer( w ); } void MainWindow::editBreakLayout() @@ -1692,15 +1692,15 @@ void MainWindow::editBreakLayout() TQWidget *w = formWindow()->mainContainer(); if ( formWindow()->currentWidget() ) w = formWindow()->currentWidget(); - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout || - w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) { + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { formWindow()->breakLayout( w ); return; } else { TQWidgetList widgets = formWindow()->selectedWidgets(); for ( w = widgets.first(); w; w = widgets.next() ) { - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout || - w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) break; } if ( w ) { @@ -1710,8 +1710,8 @@ void MainWindow::editBreakLayout() } w = formWindow()->mainContainer(); - if ( WidgetFactory::tqlayoutType( w ) != WidgetFactory::NoLayout || - w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) formWindow()->breakLayout( w ); } diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp index c6fa7fb4..e2098b5a 100644 --- a/kdevdesigner/designer/menubareditor.cpp +++ b/kdevdesigner/designer/menubareditor.cpp @@ -199,7 +199,7 @@ MenuBarEditorItem * MenuBarEditor::createItem( int index, bool addToCmdStack ) void MenuBarEditor::insertItem( MenuBarEditorItem * item, int index ) { - item->menu()->tqparentMenu = this; + item->menu()->parentMenu = this; if ( index != -1 ) itemList.insert( index, item ); @@ -504,7 +504,7 @@ void MenuBarEditor::deleteItem( int index ) TQSize MenuBarEditor::tqsizeHint() const { - return TQSize( tqparentWidget()->width(), heightForWidth( tqparentWidget()->width() ) ); + return TQSize( parentWidget()->width(), heightForWidth( parentWidget()->width() ) ); } int MenuBarEditor::heightForWidth( int max_width ) const @@ -534,8 +534,8 @@ void MenuBarEditor::show() TQWidget::show(); resizeInternals(); - TQResizeEvent e( tqparentWidget()->size(), tqparentWidget()->size() ); - TQApplication::sendEvent( tqparentWidget(), &e ); + TQResizeEvent e( parentWidget()->size(), parentWidget()->size() ); + TQApplication::sendEvent( parentWidget(), &e ); } void MenuBarEditor::checkAccels( TQMap<TQChar, TQWidgetList > &accels ) diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp index 68f721e8..72c2fa2f 100644 --- a/kdevdesigner/designer/metadatabase.cpp +++ b/kdevdesigner/designer/metadatabase.cpp @@ -304,11 +304,11 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing ) r->spacing = spacing; TQLayout * tqlayout = 0; - WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout ); + WidgetFactory::layoutType( (TQWidget*)o, tqlayout ); if ( tqlayout ) { int spadef = 6; if ( MainWindow::self->formWindow() ) - spadef = MainWindow::self->formWindow()->tqlayoutDefaultSpacing(); + spadef = MainWindow::self->formWindow()->layoutDefaultSpacing(); if ( spacing == -1 ) tqlayout->setSpacing( spadef ); else @@ -347,21 +347,21 @@ void MetaDataBase::setMargin( TQObject *o, int margin ) r->margin = margin; TQLayout * tqlayout = 0; - WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout ); + WidgetFactory::layoutType( (TQWidget*)o, tqlayout ); bool isInnerLayout = TRUE; TQWidget *widget = (TQWidget*)o; if ( widget && !::tqqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->tqparentWidget() && ::tqqt_cast<FormWindow*>(widget->tqparentWidget()) ) ) + widget && widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) isInnerLayout = FALSE; if ( tqlayout ) { int mardef = 11; if ( MainWindow::self->formWindow() ) - mardef = MainWindow::self->formWindow()->tqlayoutDefaultMargin(); + mardef = MainWindow::self->formWindow()->layoutDefaultMargin(); if ( margin == -1 ) { if ( isInnerLayout ) tqlayout->setMargin( 1 ); diff --git a/kdevdesigner/designer/multilineeditor.ui b/kdevdesigner/designer/multilineeditor.ui index b7789288..1fe1ea63 100644 --- a/kdevdesigner/designer/multilineeditor.ui +++ b/kdevdesigner/designer/multilineeditor.ui @@ -177,5 +177,5 @@ <slot>okClicked()</slot> <slot>cancelClicked()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp index 82378a84..75eb2acd 100644 --- a/kdevdesigner/designer/multilineeditorimpl.cpp +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -126,45 +126,45 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget basicToolBar->addSeparator(); - TQPopupMenu *tqlayoutMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Layout" ), tqlayoutMenu ); + TQPopupMenu *layoutMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Layout" ), layoutMenu ); TQAction *brAction = new TQAction( this ); brAction->setIconSet( BarIcon( "designer_textlinebreak.png", KDevDesignerPartFactory::instance() ) ); brAction->setText( i18n("Break" ) ); brAction->addTo( basicToolBar ); - brAction->addTo( tqlayoutMenu ); + brAction->addTo( layoutMenu ); connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), "p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) ); - p->addTo( tqlayoutMenu ); + p->addTo( layoutMenu ); connect( p, TQT_SIGNAL( clicked( const TQString& ) ), this, TQT_SLOT( insertTags( const TQString& ))); - tqlayoutMenu->insertSeparator(); + layoutMenu->insertSeparator(); basicToolBar->addSeparator(); ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), "p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) ); - al->addTo( tqlayoutMenu ); + al->addTo( layoutMenu ); connect( al, TQT_SIGNAL( clicked( const TQString& ) ), this, TQT_SLOT( insertTags( const TQString& ))); ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), "p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) ); - ac->addTo( tqlayoutMenu ); + ac->addTo( layoutMenu ); connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), this, TQT_SLOT( insertTags( const TQString& ))); ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), "p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) ); - ar->addTo( tqlayoutMenu ); + ar->addTo( layoutMenu ); connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), this, TQT_SLOT( insertTags( const TQString& ))); ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), "blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) ); - block->addTo( tqlayoutMenu ); + block->addTo( layoutMenu ); connect( block, TQT_SIGNAL( clicked( const TQString& ) ), this, TQT_SLOT( insertTags( const TQString& ))); diff --git a/kdevdesigner/designer/newform.ui b/kdevdesigner/designer/newform.ui index c5f8f202..3fcbd914 100644 --- a/kdevdesigner/designer/newform.ui +++ b/kdevdesigner/designer/newform.ui @@ -234,5 +234,5 @@ <slot access="protected">itemChanged( TQIconViewItem * )</slot> <slot access="protected">projectChanged( const TQString & )</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/orderindicator.cpp b/kdevdesigner/designer/orderindicator.cpp index 115d68f8..2904cfbf 100644 --- a/kdevdesigner/designer/orderindicator.cpp +++ b/kdevdesigner/designer/orderindicator.cpp @@ -78,7 +78,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid ) void OrderIndicator::reposition() { - TQPoint p =tqparentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); + TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) ); move( p - TQPoint( width()/3, height()/3 ) ); } diff --git a/kdevdesigner/designer/paletteeditoradvanced.ui b/kdevdesigner/designer/paletteeditoradvanced.ui index 13c4615e..a8ba6c03 100644 --- a/kdevdesigner/designer/paletteeditoradvanced.ui +++ b/kdevdesigner/designer/paletteeditoradvanced.ui @@ -47,7 +47,7 @@ <bool>true</bool> </property> <property name="whatsThis" stdset="0"> - <string><b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget tqlayouts in the preview section.</p></string> + <string><b>Edit Palette</b><p>Change the current widget or form's palette.</p><p>Use a generated palette or select colors for each color group and each color role.</p><p>The palette can be tested with different widget layouts in the preview section.</p></string> </property> <vbox> <property name="name"> diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui b/kdevdesigner/designer/pixmapcollectioneditor.ui index 5d7608fd..a6ed1bd6 100644 --- a/kdevdesigner/designer/pixmapcollectioneditor.ui +++ b/kdevdesigner/designer/pixmapcollectioneditor.ui @@ -214,5 +214,5 @@ <slot>setProject(Project * pro)</slot> <slot returnType="TQPixmap">scaledPixmap(const TQPixmap & p)</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/pixmapfunction.ui b/kdevdesigner/designer/pixmapfunction.ui index 5f34bf37..e5f13817 100644 --- a/kdevdesigner/designer/pixmapfunction.ui +++ b/kdevdesigner/designer/pixmapfunction.ui @@ -77,9 +77,9 @@ <property name="lineWidth"> <number>2</number> </property> - <property name="tqlayoutMargin" stdset="0"> + <property name="layoutMargin" stdset="0"> </property> - <property name="tqlayoutSpacing" stdset="0"> + <property name="layoutSpacing" stdset="0"> </property> <hbox> <property name="name"> @@ -969,7 +969,7 @@ <slot>reject()</slot> </connection> </connections> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>klineedit.h</includehint> </includehints> diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp index 8c16be98..c5dcd8bf 100644 --- a/kdevdesigner/designer/popupmenueditor.cpp +++ b/kdevdesigner/designer/popupmenueditor.cpp @@ -258,7 +258,7 @@ PopupMenuEditorItem * PopupMenuEditor::clipboardItem = 0; PopupMenuEditor::PopupMenuEditor( FormWindow * fw, TQWidget * tqparent, const char * name ) : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase | WResizeNoErase ), formWnd( fw ), - tqparentMenu( tqparent ), + parentMenu( tqparent ), iconWidth( 0 ), textWidth( 0 ), accelWidth( 0 ), @@ -274,7 +274,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu, TQWidget * tqparent, const char * name ) : TQWidget( 0, name, WStyle_Customize | WStyle_NoBorder | WRepaintNoErase ), formWnd( fw ), - tqparentMenu( tqparent ), + parentMenu( tqparent ), iconWidth( menu->iconWidth ), textWidth( menu->textWidth ), accelWidth( menu->accelWidth ), @@ -335,10 +335,10 @@ void PopupMenuEditor::insert( PopupMenuEditorItem * item, int index ) currentIndex = index; } item->m = this; - item->s->tqparentMenu = this; + item->s->parentMenu = this; resizeToContents(); - if ( isVisible() && tqparentMenu ) - tqparentMenu->update(); // draw arrow in tqparent menu + if ( isVisible() && parentMenu ) + parentMenu->update(); // draw arrow in tqparent menu emit inserted( item->action() ); } @@ -644,8 +644,8 @@ void PopupMenuEditor::removeItem( int index ) idx ); formWnd->commandHistory()->addCommand( cmd ); cmd->execute(); - if ( itemList.count() == 0 && tqparentMenu ) - tqparentMenu->update(); + if ( itemList.count() == 0 && parentMenu ) + parentMenu->update(); resizeToContents(); } } @@ -1006,7 +1006,7 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * ) { showSubMenu(); update(); - tqparentMenu->update(); + parentMenu->update(); } void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) @@ -1019,7 +1019,7 @@ void PopupMenuEditor::focusOutEvent( TQFocusEvent * ) TQWidget * w = this; while ( w && w != fw && ::tqqt_cast<PopupMenuEditor*>(w) ) { // hide all popups w->hide(); - w = ((PopupMenuEditor *)w)->tqparentEditor(); + w = ((PopupMenuEditor *)w)->parentEditor(); } } } @@ -1259,8 +1259,8 @@ void PopupMenuEditor::safeDec() } while ( currentIndex > 0 && !currentItem()->isVisible() ); if ( currentIndex == 0 && !currentItem()->isVisible() && - tqparentMenu ) { - tqparentMenu->setFocus(); + parentMenu ) { + parentMenu->setFocus(); } } @@ -1317,9 +1317,9 @@ void PopupMenuEditor::navigateUp( bool ctrl ) safeDec(); } showSubMenu(); - } else if ( tqparentMenu ) { - tqparentMenu->setFocus(); - tqparentMenu->update(); + } else if ( parentMenu ) { + parentMenu->setFocus(); + parentMenu->update(); } } @@ -1351,9 +1351,9 @@ void PopupMenuEditor::navigateLeft() if ( currentItem()->isSeparator() || currentIndex >= (int)itemList.count() || currentField == 0 ) { - if ( tqparentMenu ) { + if ( parentMenu ) { hideSubMenu(); - tqparentMenu->setFocus(); + parentMenu->setFocus(); } else if ( !currentItem()->isSeparator() ) { currentField = 2; } @@ -1448,7 +1448,7 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item ) { TQString s; TQString name = item->action()->menuText(); - TQWidget *e = tqparentEditor(); + TQWidget *e = parentEditor(); PopupMenuEditor *p = ::tqqt_cast<PopupMenuEditor*>(e); if ( p ) { int idx = p->tqfind( item->m ); diff --git a/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h index 29ffcf4c..e9e4e1c2 100644 --- a/kdevdesigner/designer/popupmenueditor.h +++ b/kdevdesigner/designer/popupmenueditor.h @@ -140,7 +140,7 @@ public: TQPtrList<PopupMenuEditorItem> * items() { return &itemList; } - TQWidget * tqparentEditor() { return tqparentMenu; } + TQWidget * parentEditor() { return parentMenu; } signals: void inserted( TQAction * ); @@ -212,7 +212,7 @@ private: TQPtrList<PopupMenuEditorItem> itemList; PopupMenuEditorItem addItem; PopupMenuEditorItem addSeparator; - TQWidget * tqparentMenu; + TQWidget * parentMenu; int iconWidth; int textWidth; diff --git a/kdevdesigner/designer/preferences.ui b/kdevdesigner/designer/preferences.ui index ea57a056..a4335bc7 100644 --- a/kdevdesigner/designer/preferences.ui +++ b/kdevdesigner/designer/preferences.ui @@ -640,7 +640,7 @@ <slot access="protected">init()</slot> <slot access="protected">destroy()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>styledbutton.h</includehint> <includehint>styledbutton.h</includehint> diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp index 5c700a0f..61143c95 100644 --- a/kdevdesigner/designer/project.cpp +++ b/kdevdesigner/designer/project.cpp @@ -1316,8 +1316,8 @@ void Project::addObject( TQObject *o ) TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); } - if ( fw->tqparentWidget() ) { - fw->tqparentWidget()->setFixedSize( 1, 1 ); + if ( fw->parentWidget() ) { + fw->parentWidget()->setFixedSize( 1, 1 ); fw->show(); } } else { @@ -1494,7 +1494,7 @@ void Project::designerCreated() fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE ); TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted ); - fw->tqparentWidget()->setFixedSize( 1, 1 ); + fw->parentWidget()->setFixedSize( 1, 1 ); fw->show(); } } diff --git a/kdevdesigner/designer/projectsettings.ui b/kdevdesigner/designer/projectsettings.ui index 14ce1f0a..486ce960 100644 --- a/kdevdesigner/designer/projectsettings.ui +++ b/kdevdesigner/designer/projectsettings.ui @@ -297,5 +297,5 @@ <slot access="protected">languageChanged( const QString & )</slot> <slot access="protected">okClicked()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp index 49eac9eb..01ac4295 100644 --- a/kdevdesigner/designer/propertyeditor.cpp +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -184,7 +184,7 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem * PropertyItem::~PropertyItem() { if ( resetButton ) - delete resetButton->tqparentWidget(); + delete resetButton->parentWidget(); resetButton = 0; } @@ -349,7 +349,7 @@ void PropertyItem::setOpen( bool b ) void PropertyItem::showEditor() { createResetButton(); - resetButton->tqparentWidget()->show(); + resetButton->parentWidget()->show(); } /*! Subclasses have to hide the editor of the item here @@ -358,7 +358,7 @@ void PropertyItem::showEditor() void PropertyItem::hideEditor() { createResetButton(); - resetButton->tqparentWidget()->hide(); + resetButton->parentWidget()->hide(); } /*! This is called to init the value of the item. Reimplement in @@ -402,7 +402,7 @@ TQString PropertyItem::name() const void PropertyItem::createResetButton() { if ( resetButton ) { - resetButton->tqparentWidget()->lower(); + resetButton->parentWidget()->lower(); return; } const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance()); @@ -455,8 +455,8 @@ void PropertyItem::placeEditor( TQWidget *w ) r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); w->resize( r.size() ); listview->moveChild( w, r.x(), r.y() ); - resetButton->tqparentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() ); - listview->moveChild( resetButton->tqparentWidget(), r.x() + r.width() - 8, r.y() ); + resetButton->parentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() ); + listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) ); } @@ -3019,13 +3019,13 @@ static TQVariant::Type type_to_variant( const TQString &s ) } #ifndef TQT_NO_SQL -static bool tqparent_is_data_aware( TQWidget *w ) +static bool parent_is_data_aware( TQWidget *w ) { - TQWidget *p = w ? w->tqparentWidget() : 0; + TQWidget *p = w ? w->parentWidget() : 0; while ( p && !p->isTopLevel() ) { if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) ) return TRUE; - p = p->tqparentWidget(); + p = p->parentWidget(); } return FALSE; } @@ -3045,10 +3045,10 @@ void PropertyList::setupProperties() TQMap<TQString, bool> unique; TQObject *w = editor->widget(); TQStringList valueSet; - bool tqparentHasLayout = + bool parentHasLayout = w->isWidgetType() && - !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->tqparentWidget() && - WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout; + !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { const TQMetaProperty* p = editor->widget()->tqmetaObject()-> @@ -3092,7 +3092,7 @@ void PropertyList::setupProperties() continue; if ( qstrcmp( p->name(), "baseSize" ) == 0 ) continue; - if ( tqparentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) + if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) continue; if ( ::tqqt_cast<TQLayoutWidget*>(w) || ::tqqt_cast<Spacer*>(w) ) { if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) @@ -3212,7 +3212,7 @@ void PropertyList::setupProperties() TQStringList lst; for ( uint i = 0; i < l.count(); ++i ) { TQString k = l.at( i ); - // filter out enum-tqmasks + // filter out enum-masks if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) continue; lst << k; @@ -3236,24 +3236,24 @@ void PropertyList::setupProperties() } if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) && - w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { - item = new PropertyLayoutItem( this, item, 0, "tqlayoutSpacing" ); + w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { + item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "tqlayoutSpacing" ) + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) || MetaDataBase::spacing( editor->widget() ) != -1 ) - tqlayoutInitValue( item, TRUE ); + layoutInitValue( item, TRUE ); else - tqlayoutInitValue( item ); - item = new PropertyLayoutItem( this, item, 0, "tqlayoutMargin" ); + layoutInitValue( item ); + item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "tqlayoutMargin" ) + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) || MetaDataBase::margin( editor->widget() ) != -1 ) - tqlayoutInitValue( item, TRUE ); + layoutInitValue( item, TRUE ); else - tqlayoutInitValue( item ); + layoutInitValue( item ); TQWidget *widget = (TQWidget*)w; if ( ( !::tqqt_cast<TQLayoutWidget*>(widget) && - widget->tqparentWidget() && ::tqqt_cast<FormWindow*>(widget->tqparentWidget()) ) ) { + widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) { item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); TQStringList lst; lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; @@ -3282,7 +3282,7 @@ void PropertyList::setupProperties() #ifndef TQT_NO_SQL if ( !::tqqt_cast<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) && - !::tqqt_cast<TQDataView*>(editor->widget()) && tqparent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) { + !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) { item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); setPropertyValue( item ); if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) @@ -3392,7 +3392,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, case TQVariant::Int: if ( name == "accel" ) item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); - else if ( name == "tqlayoutSpacing" || name == "tqlayoutMargin" ) + else if ( name == "layoutSpacing" || name == "layoutMargin" ) item = new PropertyLayoutItem( this, item, 0, name ); else if ( name == "resizeMode" ) item = new PropertyListItem( this, item, 0, name, TRUE ); @@ -3496,7 +3496,7 @@ void PropertyList::valueChanged( PropertyItem *i ) editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); } -void PropertyList::tqlayoutInitValue( PropertyItem *i, bool changed ) +void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) { if ( !editor->widget() ) return; @@ -3663,7 +3663,7 @@ void PropertyList::refetchData() if ( i->hasSubItems() ) i->initChildren(); bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); - if ( ( i->name() == "tqlayoutSpacing" || i->name() == "tqlayoutMargin" ) ) { + if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { if ( i->value().toString() != "-1" ) i->setChanged( TRUE, FALSE ); else @@ -3715,9 +3715,9 @@ void PropertyList::setPropertyValue( PropertyItem *i ) i->setValue( TQVariant( TRUE, 0 ) ); else i->setValue( TQVariant( FALSE, 0 ) ); - } else if ( i->name() == "tqlayoutSpacing" ) { + } else if ( i->name() == "layoutSpacing" ) { ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); - } else if ( i->name() == "tqlayoutMargin" ) { + } else if ( i->name() == "layoutMargin" ) { ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); } else if ( i->name() == "resizeMode" ) { ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); @@ -4165,11 +4165,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) // if there is no properties displayed then we really should show them. // to do this check the number of properties in the list. bool ret = (listview->childCount() > 0) ? TRUE : FALSE; - if ( wid->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { + if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { TQListViewItemIterator it( listview ); ret = FALSE; while ( it.current() ) { - if ( it.current()->text( 0 ) == "tqlayoutSpacing" || it.current()->text( 0 ) == "tqlayoutMargin" ) { + if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { ret = TRUE; break; } @@ -4323,10 +4323,10 @@ void PropertyEditor::setSignalHandlersEnabled( bool b ) void PropertyEditor::updateWindow() { if ( isHidden() && count() ) { - tqparentWidget()->show(); - MainWindow::self->setAppropriate( (TQDockWindow*)tqparentWidget(), TRUE ); + parentWidget()->show(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); } else if ( isShown() && !count() ) { - tqparentWidget()->hide(); - MainWindow::self->setAppropriate( (TQDockWindow*)tqparentWidget(), FALSE ); + parentWidget()->hide(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); } } diff --git a/kdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h index 55341fb4..9c3250d2 100644 --- a/kdevdesigner/designer/propertyeditor.h +++ b/kdevdesigner/designer/propertyeditor.h @@ -690,7 +690,7 @@ public: virtual void setPropertyValue( PropertyItem *i ); virtual void setCurrentProperty( const TQString &n ); - void tqlayoutInitValue( PropertyItem *i, bool changed = FALSE ); + void layoutInitValue( PropertyItem *i, bool changed = FALSE ); PropertyEditor *propertyEditor() const; TQString whatsThisAt( const TQPoint &p ); void showCurrentWhatsThis(); diff --git a/kdevdesigner/designer/replacedialog.ui b/kdevdesigner/designer/replacedialog.ui index 546cdeaa..635b2315 100644 --- a/kdevdesigner/designer/replacedialog.ui +++ b/kdevdesigner/designer/replacedialog.ui @@ -314,5 +314,5 @@ <slot>doReplaceAll()</slot> <slot>setEditor( EditorInterface * e, TQObject * fw )</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp index 5f89b7cf..e511f7f1 100644 --- a/kdevdesigner/designer/resource.cpp +++ b/kdevdesigner/designer/resource.cpp @@ -460,10 +460,10 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) } } else if ( e.tagName() == "exportmacro" ) { exportMacro = e.firstChild().toText().data(); - } else if ( e.tagName() == "tqlayoutdefaults" ) { - formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->tqlayoutDefaultSpacing() ) ).toInt() ); - formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->tqlayoutDefaultMargin() ) ).toInt() ); - } else if ( e.tagName() == "tqlayoutfunctions" ) { + } else if ( e.tagName() == "layoutdefaults" ) { + formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); + formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); + } else if ( e.tagName() == "layoutfunctions" ) { formwindow->setSpacingFunction( e.attribute( "spacing" ) ); formwindow->setMarginFunction( e.attribute( "margin" ) ); if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) @@ -739,14 +739,14 @@ TQString Resource::copy() TQWidgetList widgets = formwindow->selectedWidgets(); TQWidgetList tmp( widgets ); for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQWidget *p = w->tqparentWidget(); + TQWidget *p = w->parentWidget(); bool save = TRUE; while ( p ) { if ( tmp.tqfindRef( p ) != -1 ) { save = FALSE; break; } - p = p->tqparentWidget(); + p = p->parentWidget(); } if ( save ) saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); @@ -1353,8 +1353,8 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) if ( !::tqqt_cast<TQSplitter*>(obj) && WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && obj->isWidgetType() && - WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ); + WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, tqlayout ); switch ( lay ) { case WidgetFactory::HBox: closeTag = makeIndent( indent ) + "</hbox>"; @@ -1410,12 +1410,12 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) } } } else if ( ::tqqt_cast<TQLayout*>(w) ) { - if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) changed << "spacing"; - if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) changed << "margin"; - if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" - && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) + if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" + && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) changed << "resizeMode"; } @@ -1429,8 +1429,8 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) if ( changed.isEmpty() ) return; - bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->tqparentWidget() && - WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout; + bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; TQStrList lst = w->tqmetaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) ); for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { @@ -1516,7 +1516,7 @@ void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::T void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ) { if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || - name == "tqlayoutMargin" || name =="tqlayoutSpacing" ) + name == "layoutMargin" || name =="layoutSpacing" ) return; int num; uint unum; @@ -1527,7 +1527,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant switch ( t ) { case TQVariant::String: if ( name == "resizeMode" ) { - TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ); + TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); if ( !resmod.isNull() && resmod != "Auto" ) { ts << makeIndent( indent ) << "<enum>"; ts << resmod; @@ -1550,9 +1550,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant if ( ::tqqt_cast<TQLayout*>(w) ) { num = -1; if ( name == "spacing" ) - num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); else if ( name == "margin" ) - num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(w) ) ) ) ); + num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); if ( num != -1 ) ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl; } else { @@ -1613,8 +1613,8 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant TQVariant v( value ); ts << makeIndent( indent ) << "<font>" << endl; TQFont f( tqApp->font() ); - if ( w && w->isWidgetType() && ((TQWidget*)w)->tqparentWidget() ) - f = ((TQWidget*)w)->tqparentWidget()->font(); + if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) + f = ((TQWidget*)w)->parentWidget()->font(); TQFont f2( v.toFont() ); indent++; if ( f.family() != f2.family() ) @@ -1774,9 +1774,9 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); #ifdef TQT_CONTAINER_CUSTOM_WIDGETS - TQString tqparentClassName = WidgetFactory::classNameOf( tqparent ); + TQString parentClassName = WidgetFactory::classNameOf( tqparent ); bool isPlugin = - WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( tqparentClassName ) ); + WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) ); if ( isPlugin ) qWarning( "####### loading custom container widgets without page support not implemented!" ); // ### TODO loading for custom container widgets without pages @@ -1799,7 +1799,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL if ( ::tqqt_cast<TQMainWindow*>(w) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( tqlayout ) { - switch ( WidgetFactory::tqlayoutType( tqlayout ) ) { + switch ( WidgetFactory::layoutType( tqlayout ) ) { case WidgetFactory::HBox: ( (TQHBoxLayout*)tqlayout )->addWidget( w ); break; @@ -1893,12 +1893,12 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQL } else if ( isPlugin ) { if ( attrib == "label" ) { WidgetInterface *iface = 0; - widgetManager()->queryInterface( tqparentClassName, &iface ); + widgetManager()->queryInterface( parentClassName, &iface ); if ( iface ) { TQWidgetContainerInterfacePrivate *iface2 = 0; iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); if ( iface2 ) { - iface2->insertPage( tqparentClassName, + iface2->insertPage( parentClassName, (TQWidget*)tqparent, v.toString(), -1, w ); iface2->release(); } @@ -2145,7 +2145,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD { const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, TRUE ), TRUE ); - if ( !::tqqt_cast<TQLayout*>(obj) ) {// no tqlayouts in metadatabase... (RS) + if ( !::tqqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS) if ( obj->inherits( "CustomWidget" ) ) { MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) @@ -2157,8 +2157,8 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD TQVariant defVarient; if ( e.tagName() == "font" ) { TQFont f( tqApp->font() ); - if ( obj->isWidgetType() && ( (TQWidget*)obj )->tqparentWidget() ) - f = ( (TQWidget*)obj )->tqparentWidget()->font(); + if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) + f = ( (TQWidget*)obj )->parentWidget()->font(); defVarient = TQVariant( f ); } @@ -2260,13 +2260,13 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD if ( ::tqqt_cast<TQLayout*>(obj) ) { if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); return; } else if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); return; } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); + MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); return; } } @@ -2891,8 +2891,8 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl; if ( formwindow ) { - ts << makeIndent( indent ) << "<tqlayoutdefaults spacing=\"" << formwindow->tqlayoutDefaultSpacing() - << "\" margin=\"" << formwindow->tqlayoutDefaultMargin() << "\"/>" << endl; + ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing() + << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl; if ( formwindow->hasLayoutFunctions() ) { TQString s = ""; TQString m = ""; @@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) s = TQString( " spacing=\"%1\"" ).tqarg( formwindow->spacingFunction() ); if ( !formwindow->marginFunction().isEmpty() ) m = TQString( " margin=\"%1\"" ).tqarg( formwindow->marginFunction() ); - ts << makeIndent( indent ) << "<tqlayoutfunctions" << s << m << "/>" << endl; + ts << makeIndent( indent ) << "<layoutfunctions" << s << m << "/>" << endl; } } } diff --git a/kdevdesigner/designer/richtextfontdialog.ui b/kdevdesigner/designer/richtextfontdialog.ui index ae93f58c..0eaef760 100644 --- a/kdevdesigner/designer/richtextfontdialog.ui +++ b/kdevdesigner/designer/richtextfontdialog.ui @@ -343,5 +343,5 @@ <slot returnType="TQString">getColor()</slot> <slot returnType="TQString">getFont()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp index 42b1f665..c7134e97 100644 --- a/kdevdesigner/designer/sizehandle.cpp +++ b/kdevdesigner/designer/sizehandle.cpp @@ -98,7 +98,7 @@ void SizeHandle::setWidget( TQWidget *w ) void SizeHandle::paintEvent( TQPaintEvent * ) { - if ( ( (FormWindow*)tqparentWidget() )->currentWidget() != widget ) + if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget ) return; TQPainter p( this ); p.setPen( blue ); @@ -120,8 +120,8 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) TQPoint rp = mapFromGlobal( e->globalPos() ); TQPoint d = oldPressPos - rp; oldPressPos = rp; - TQPoint checkPos = widget->tqparentWidget()->mapFromGlobal( e->globalPos() ); - TQRect pr = widget->tqparentWidget()->rect(); + TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() ); + TQRect pr = widget->parentWidget()->rect(); // ##### move code around a bit to reduce duplicated code here switch ( dir ) { @@ -221,7 +221,7 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e ) formWindow->sizePreview()->setGeometry( lg ); formWindow->sizePreview()->show(); formWindow->sizePreview()->raise(); - if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout ) + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) formWindow->updateChildSelections( widget ); } @@ -287,7 +287,7 @@ void WidgetSelection::setWidget( TQWidget *w, bool updateDict ) } wid = w; - bool active = !wid->tqparentWidget() || WidgetFactory::tqlayoutType( wid->tqparentWidget() ) == WidgetFactory::NoLayout; + bool active = !wid->parentWidget() || WidgetFactory::layoutType( wid->parentWidget() ) == WidgetFactory::NoLayout; for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) { SizeHandle *h = handles[ i ]; if ( h ) { @@ -308,10 +308,10 @@ bool WidgetSelection::isUsed() const void WidgetSelection::updateGeometry() { - if ( !wid || !wid->tqparentWidget() ) + if ( !wid || !wid->parentWidget() ) return; - TQPoint p = wid->tqparentWidget()->mapToGlobal( wid->pos() ); + TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() ); p = formWindow->mapFromGlobal( p ); TQRect r( p, wid->size() ); diff --git a/kdevdesigner/designer/startdialog.ui b/kdevdesigner/designer/startdialog.ui index 150989d0..8843ba87 100644 --- a/kdevdesigner/designer/startdialog.ui +++ b/kdevdesigner/designer/startdialog.ui @@ -320,5 +320,5 @@ <slot>accept()</slot> <slot>reject()</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp index a217fbe0..709cb035 100644 --- a/kdevdesigner/designer/styledbutton.cpp +++ b/kdevdesigner/designer/styledbutton.cpp @@ -258,7 +258,7 @@ void StyledButton::dragEnterEvent( TQDragEnterEvent *e ) void StyledButton::dragLeaveEvent( TQDragLeaveEvent * ) { if ( hasFocus() ) - tqparentWidget()->setFocus(); + parentWidget()->setFocus(); } void StyledButton::dragMoveEvent( TQDragMoveEvent *e ) diff --git a/kdevdesigner/designer/tableeditor.ui b/kdevdesigner/designer/tableeditor.ui index 96a3df6e..b278019b 100644 --- a/kdevdesigner/designer/tableeditor.ui +++ b/kdevdesigner/designer/tableeditor.ui @@ -824,5 +824,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/variabledialog.ui b/kdevdesigner/designer/variabledialog.ui index ec75c8d5..4e4fbd83 100644 --- a/kdevdesigner/designer/variabledialog.ui +++ b/kdevdesigner/designer/variabledialog.ui @@ -290,5 +290,5 @@ <slot>okClicked()</slot> <slot>currentItemChanged( TQListViewItem * i )</slot> </Q_SLOTS> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp index 5d47c863..c4b0b947 100644 --- a/kdevdesigner/designer/widgetfactory.cpp +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -109,9 +109,9 @@ FormWindow *find_formwindow( TQWidget *w ) for (;;) { if ( ::tqqt_cast<FormWindow*>(w) ) return (FormWindow*)w; - if ( !w->tqparentWidget() ) + if ( !w->parentWidget() ) return 0; - w = w->tqparentWidget(); + w = w->parentWidget(); } } @@ -486,10 +486,10 @@ TQMap< int, TQStringList > *changedProperties = 0; /*! \class WidgetFactory widgetfactory.h - \brief Set of static functions for creating widgets, tqlayouts and do other stuff + \brief Set of static functions for creating widgets, layouts and do other stuff The widget factory offers functions to create widgets, create and - delete tqlayouts find out other details - all based on the + delete layouts find out other details - all based on the WidgetDatabase's data. So the functions that use ids use the same ids as in the WidgetDatabase. */ @@ -567,7 +567,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, Lay if ( ::tqqt_cast<TQLayoutWidget*>(widget) && ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast<FormWindow*>(widget->tqparentWidget()) ) ) + widget && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) margin = MainWindow::self->currentLayoutDefaultMargin(); if ( !tqlayout && ::tqqt_cast<TQTabWidget*>(widget) ) @@ -1006,7 +1006,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqpa TQWidget::tqlayout() of \a w or to 0 after the function call. */ -WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w, TQLayout *&tqlayout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&tqlayout ) { tqlayout = 0; @@ -1048,7 +1048,7 @@ WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w, TQLayout *&t /*! \overload */ -WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQLayout *tqlayout ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *tqlayout ) { if ( ::tqqt_cast<TQHBoxLayout*>(tqlayout) ) return HBox; @@ -1062,14 +1062,14 @@ WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQLayout *tqlayout ) /*! \overload */ -WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w ) +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) { TQLayout *l = 0; - return tqlayoutType( w, l ); + return layoutType( w, l ); } -TQWidget *WidgetFactory::tqlayoutParent( TQLayout *tqlayout ) +TQWidget *WidgetFactory::layoutParent( TQLayout *tqlayout ) { TQObject *o = TQT_TQOBJECT(tqlayout); while ( o ) { @@ -1126,25 +1126,25 @@ 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 (e.g. when working with a tabwidget and \a w is the container which - contains and tqlayouts childs, but the actual widget known to the + contains and layouts childs, but the actual widget known to the designer is the tabwidget which is the tqparent of \a w. So this function returns the tabwidget then.) */ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) { - if ( w && ::tqqt_cast<TQWidgetStack*>(w->tqparentWidget()) ) - w = w->tqparentWidget(); - if ( w->tqparentWidget() && w->tqparentWidget()->tqparentWidget() && - w->tqparentWidget()->tqparentWidget()->tqparentWidget() && - ::tqqt_cast<TQToolBox*>(w->tqparentWidget()->tqparentWidget()->tqparentWidget()) ) - return w->tqparentWidget()->tqparentWidget()->tqparentWidget(); + if ( w && ::tqqt_cast<TQWidgetStack*>(w->parentWidget()) ) + w = w->parentWidget(); + if ( w->parentWidget() && w->parentWidget()->parentWidget() && + w->parentWidget()->parentWidget()->parentWidget() && + ::tqqt_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->tqparentWidget()) ) + w && ::tqqt_cast<FormWindow*>(w->parentWidget()) ) return w; - w = w->tqparentWidget(); + w = w->parentWidget(); } return w; } @@ -1191,7 +1191,7 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o ) TQWidget *w = (TQWidget*)o; while ( !iface && w && !::tqqt_cast<FormWindow*>(w) ) { widgetManager()->queryInterface( classNameOf( w ), &iface ); - w = w->tqparentWidget(); + w = w->parentWidget(); } if ( !iface ) return ( lastWasAPassiveInteractor = FALSE ); @@ -1487,7 +1487,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) return TQVariant(); } else if ( propName == "frameworkCode" ) { return TQVariant( TRUE, 0 ); - } else if ( propName == "tqlayoutMargin" || propName == "tqlayoutSpacing" ) { + } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { return TQVariant( -1 ); } @@ -1602,7 +1602,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 - to a TQVBoxLayout), because of the (illogical) way tqlayouting works. + to a TQVBoxLayout), because of the (illogical) way layouting works. */ void TQLayoutWidget::updateSizePolicy() { @@ -1626,22 +1626,22 @@ void TQLayoutWidget::updateSizePolicy() if ( tqlayout() ) { /* - tqparentLayout is set to the tqparent tqlayout if there is one and if it is - top level, in which case tqlayouting is illogical. + parentLayout is set to the tqparent tqlayout if there is one and if it is + top level, in which case layouting is illogical. */ - TQLayout *tqparentLayout = 0; + TQLayout *parentLayout = 0; if ( tqparent() && tqparent()->isWidgetType() ) { - tqparentLayout = ((TQWidget *)tqparent())->tqlayout(); - if ( tqparentLayout && - ::tqqt_cast<TQLayoutWidget*>(tqparentLayout->mainWidget()) ) - tqparentLayout = 0; + parentLayout = ((TQWidget *)tqparent())->tqlayout(); + if ( parentLayout && + ::tqqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) ) + parentLayout = 0; } TQObjectListIt it( childrenListObject() ); TQObject *o; if ( ::tqqt_cast<TQVBoxLayout*>(tqlayout()) ) { - if ( ::tqqt_cast<TQHBoxLayout*>(tqparentLayout) ) + if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; else vt = TQSizePolicy::Fixed; @@ -1662,7 +1662,7 @@ void TQLayoutWidget::updateSizePolicy() vt |= TQSizePolicy::Maximum; } } else if ( ::tqqt_cast<TQHBoxLayout*>(tqlayout()) ) { - if ( ::tqqt_cast<TQVBoxLayout*>(tqparentLayout) ) + if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; else ht = TQSizePolicy::Fixed; @@ -1685,10 +1685,10 @@ void TQLayoutWidget::updateSizePolicy() } else if ( ::tqqt_cast<TQGridLayout*>(tqlayout()) ) { ht = TQSizePolicy::Fixed; vt = TQSizePolicy::Fixed; - if ( tqparentLayout ) { - if ( ::tqqt_cast<TQVBoxLayout*>(tqparentLayout) ) + if ( parentLayout ) { + if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) ) ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast<TQHBoxLayout*>(tqparentLayout) ) + else if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) ) vt = TQSizePolicy::Minimum; } @@ -1730,8 +1730,8 @@ void TQLayoutWidget::updateSizePolicy() void CustomWidget::paintEvent( TQPaintEvent *e ) { - if ( ::tqqt_cast<FormWindow*>(tqparentWidget()) ) { - ( (FormWindow*)tqparentWidget() )->paintGrid( this, e ); + if ( ::tqqt_cast<FormWindow*>(parentWidget()) ) { + ( (FormWindow*)parentWidget() )->paintGrid( this, e ); } else { TQPainter p( this ); p.fillRect( rect(), tqcolorGroup().dark() ); diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h index 1100418c..b25e506e 100644 --- a/kdevdesigner/designer/widgetfactory.h +++ b/kdevdesigner/designer/widgetfactory.h @@ -81,10 +81,10 @@ public: static TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type ); static void deleteLayout( TQWidget *widget ); - static LayoutType tqlayoutType( TQWidget *w ); - static LayoutType tqlayoutType( TQWidget *w, TQLayout *&tqlayout ); - static LayoutType tqlayoutType( TQLayout *tqlayout ); - static TQWidget *tqlayoutParent( TQLayout *tqlayout ); + static LayoutType layoutType( TQWidget *w ); + static LayoutType layoutType( TQWidget *w, TQLayout *&tqlayout ); + static LayoutType layoutType( TQLayout *tqlayout ); + static TQWidget *layoutParent( TQLayout *tqlayout ); static TQWidget* containerOfWidget( TQWidget *w ); static TQWidget* widgetOfContainer( TQWidget *w ); @@ -263,7 +263,7 @@ class CustomWidget : public TQWidget public: CustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *cw ) : TQWidget( tqparent, name ), cusw( cw ) { - alwaysExpand = tqparentWidget() && tqparentWidget()->inherits( "FormWindow" ); + alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" ); tqsetSizePolicy( cw->sizePolicy ); if ( !alwaysExpand ) setBackgroundMode( PaletteDark ); @@ -402,15 +402,15 @@ public: : TQToolButton( tqparent, name ) {} bool isInButtonGroup() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); } int buttonGroupId() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)tqparentWidget() )->remove( this ); - ( (TQButtonGroup*)tqparentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } }; @@ -426,15 +426,15 @@ public: : TQRadioButton( tqparent, name ) {} bool isInButtonGroup() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); } int buttonGroupId() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)tqparentWidget() )->remove( this ); - ( (TQButtonGroup*)tqparentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } @@ -451,15 +451,15 @@ public: : TQPushButton( tqparent, name ) {} bool isInButtonGroup() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); } int buttonGroupId() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)tqparentWidget() )->remove( this ); - ( (TQButtonGroup*)tqparentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } @@ -476,15 +476,15 @@ public: : TQCheckBox( tqparent, name ) {} bool isInButtonGroup() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ); } int buttonGroupId() const { - return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1; + return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1; } void setButtonGroupId( int id ) { - if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { - ( (TQButtonGroup*)tqparentWidget() )->remove( this ); - ( (TQButtonGroup*)tqparentWidget() )->insert( this, id ); + if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) { + ( (TQButtonGroup*)parentWidget() )->remove( this ); + ( (TQButtonGroup*)parentWidget() )->insert( this, id ); } } diff --git a/kdevdesigner/designer/wizardeditor.ui b/kdevdesigner/designer/wizardeditor.ui index 745115ca..028a1341 100644 --- a/kdevdesigner/designer/wizardeditor.ui +++ b/kdevdesigner/designer/wizardeditor.ui @@ -338,5 +338,5 @@ </includes> <pixmapfunction>BarIcon2</pixmapfunction> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/kdevdesigner/interfaces/designerinterface.h b/kdevdesigner/interfaces/designerinterface.h index d96cc388..d6d980cc 100644 --- a/kdevdesigner/interfaces/designerinterface.h +++ b/kdevdesigner/interfaces/designerinterface.h @@ -190,14 +190,14 @@ struct DesignerFormWindow virtual void adjustSize() = 0; virtual void editConnections() = 0; virtual void checkAccels() = 0; - virtual void tqlayoutH() = 0; - virtual void tqlayoutV() = 0; - virtual void tqlayoutHSplit() = 0; - virtual void tqlayoutVSplit() = 0; - virtual void tqlayoutG() = 0; - virtual void tqlayoutHContainer( TQWidget* w ) = 0; - virtual void tqlayoutVContainer( TQWidget* w ) = 0; - virtual void tqlayoutGContainer( TQWidget* w ) = 0; + virtual void layoutH() = 0; + virtual void layoutV() = 0; + virtual void layoutHSplit() = 0; + virtual void layoutVSplit() = 0; + virtual void layoutG() = 0; + virtual void layoutHContainer( TQWidget* w ) = 0; + virtual void layoutVContainer( TQWidget* w ) = 0; + virtual void layoutGContainer( TQWidget* w ) = 0; virtual void breakLayout() = 0; virtual void selectWidget( TQWidget * w ) = 0; virtual void selectAll() = 0; diff --git a/kdevdesigner/shared/domtool.cpp b/kdevdesigner/shared/domtool.cpp index 4293224f..f8ed4ec5 100644 --- a/kdevdesigner/shared/domtool.cpp +++ b/kdevdesigner/shared/domtool.cpp @@ -404,9 +404,9 @@ void DomTool::fixDocument( TQDomDocument& doc ) bool stdset = toBool( e.attribute( "stdset" ) ); if ( stdset || name == "toolTip" || name == "whatsThis" || name == "buddy" || - e.tqparentNode().toElement().tagName() == "item" || - e.tqparentNode().toElement().tagName() == "spacer" || - e.tqparentNode().toElement().tagName() == "column" + e.parentNode().toElement().tagName() == "item" || + e.parentNode().toElement().tagName() == "spacer" || + e.parentNode().toElement().tagName() == "column" ) e.removeAttribute( "stdset" ); else diff --git a/kdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp index 76c522f9..7e56dfa1 100644 --- a/kdevdesigner/shared/ui2uib.cpp +++ b/kdevdesigner/shared/ui2uib.cpp @@ -134,7 +134,7 @@ use UibMagic + 1 for version 2, UibMagic + 2 for version 3, etc. */ -static TQCString tqlayoutForTag( const TQString& tag ) +static TQCString layoutForTag( const TQString& tag ) { if ( tag == "grid" ) { return TQGRIDLAYOUT_OBJECT_NAME_STRING; @@ -458,7 +458,7 @@ static void outputLayoutWidgetsSubLayout( TQMap<int, TQStringList>& buddies, if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { out << (TQ_UINT8) Object_SubLayout; subLayoutNo = outputObject( buddies, objects, strings, out, f, - tqlayoutForTag(tag) ); + layoutForTag(tag) ); } else if ( tag == "property" ) { if ( f.attribute("name") == "name" ) { name = DomTool::elementToVariant( f, name ).asCString(); @@ -542,7 +542,7 @@ static int outputObject( TQMap<int, TQStringList>& buddies, } else if ( tag == "grid" || tag == "hbox" || tag == "vbox" ) { out << (TQ_UINT8) Object_SubLayout; outputObject( buddies, objects, strings, out, f, - tqlayoutForTag(tag) ); + layoutForTag(tag) ); } else if ( tag == "item" ) { if ( elem.tagName() == "menubar" ) { out << (TQ_UINT8) Object_MenuItem; @@ -682,7 +682,7 @@ void convertUiToUib( TQDomDocument& doc, TQDataStream& out ) } break; case 'l': - if ( tag == "tqlayoutdefaults" ) { + if ( tag == "layoutdefaults" ) { TQString margin = elem.attribute( "margin" ); if ( !margin.isEmpty() ) defaultMargin = margin.toInt(); diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp index 88785cdc..1950ddbb 100644 --- a/kdevdesigner/shared/widgetdatabase.cpp +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -91,7 +91,7 @@ WidgetDatabaseRecord::~WidgetDatabaseRecord() one application doesn't make sense anyway and so you don't need more than an instance of the widgetdatabase. - For creating widgets, tqlayouts, etc. see WidgetFactory. + For creating widgets, layouts, etc. see WidgetFactory. */ /*! @@ -440,7 +440,7 @@ void WidgetDatabase::setupDataBase( int id ) r->name = "Spacer"; r->group = widgetGroup( "Temp" ); r->toolTip = "Spacer"; - r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of tqlayouts."; + r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts."; append( r ); diff --git a/kdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp index 7b5cf28b..d8930366 100644 --- a/kdevdesigner/uilib/qwidgetfactory.cpp +++ b/kdevdesigner/uilib/qwidgetfactory.cpp @@ -456,7 +456,7 @@ TQWidget *TQWidgetFactory::createFromUiFile( TQDomDocument doc, TQObject *connec widget = e; } else if ( e.tagName() == "pixmapinproject" ) { usePixmapCollection = TRUE; - } else if ( e.tagName() == "tqlayoutdefaults" ) { + } else if ( e.tagName() == "layoutdefaults" ) { defSpacing = e.attribute( "spacing", TQString::number( defSpacing ) ).toInt(); defMargin = e.attribute( "margin", TQString::number( defMargin ) ).toInt(); } @@ -776,7 +776,7 @@ void TQWidgetFactory::inputColumnOrRow( const UibStrTable& strings, } void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, - TQObject *tqparent, TQListViewItem *tqparentItem ) + TQObject *tqparent, TQListViewItem *parentItem ) { TQStringList texts; TQValueList<TQPixmap> pixmaps; @@ -790,10 +790,10 @@ void TQWidgetFactory::inputItem( const UibStrTable& strings, TQDataStream& in, tqparent = TQT_TQOBJECT((TQListView *) tqparent); TQListViewItem *item = 0; if ( listView != 0 ) { - if ( tqparentItem == 0 ) { + if ( parentItem == 0 ) { item = new TQListViewItem( listView, d->lastItem ); } else { - item = new TQListViewItem( tqparentItem, d->lastItem ); + item = new TQListViewItem( parentItem, d->lastItem ); } d->lastItem = item; } @@ -880,7 +880,7 @@ void TQWidgetFactory::inputMenuItem( TQObject **objects, unpackCString( strings, in, name ); unpackCString( strings, in, text ); - TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->tqparentWidget(), name ); + TQPopupMenu *popupMenu = new TQPopupMenu( menuBar->parentWidget(), name ); in >> objectTag; while ( !in.atEnd() && objectTag != Object_End ) { @@ -908,21 +908,21 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, TQObject *obj = 0; TQWidget *widget = 0; TQLayout *tqlayout = 0; - TQWidget *tqparentWidget = 0; - TQLayout *tqparentLayout = 0; + TQWidget *parentWidget = 0; + TQLayout *parentLayout = 0; bool isTQObject = !className.isEmpty(); if ( isTQObject ) { if ( tqparent != 0 ) { if ( tqparent->isWidgetType() ) { if ( tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) ) { - tqparentWidget = ((TQMainWindow *) tqparent)->centralWidget(); + parentWidget = ((TQMainWindow *) tqparent)->centralWidget(); } else { - tqparentWidget = (TQWidget *) tqparent; + parentWidget = (TQWidget *) tqparent; } } else if ( tqparent->inherits(TQLAYOUT_OBJECT_NAME_STRING) ) { - tqparentLayout = (TQLayout *) tqparent; - tqparentWidget = ancestorWidget; + parentLayout = (TQLayout *) tqparent; + parentWidget = ancestorWidget; } } @@ -941,10 +941,10 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, } else if ( className == TQVBOXLAYOUT_OBJECT_NAME_STRING ) { type = VBox; } - if ( tqparentLayout != 0 && tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + if ( parentLayout != 0 && parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { tqlayout = createLayout( 0, 0, type ); } else { - tqlayout = createLayout( tqparentWidget, tqparentLayout, type ); + tqlayout = createLayout( parentWidget, parentLayout, type ); } obj = TQT_TQOBJECT(tqlayout); } else if ( className == TQMENUBAR_OBJECT_NAME_STRING ) { @@ -960,7 +960,7 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, obj = TQT_TQOBJECT(widget); } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { unpackCString( strings, in, className ); - widget = createWidget( className, tqparentWidget, 0 ); + widget = createWidget( className, parentWidget, 0 ); obj = TQT_TQOBJECT(widget); } @@ -1098,15 +1098,15 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, ((TQToolBar *) widget)->addSeparator(); break; case Object_SubAction: - inputObject( objects, numObjects, strings, in, tqparentWidget, + inputObject( objects, numObjects, strings, in, parentWidget, obj != 0 ? obj : tqparent, TQACTION_OBJECT_NAME_STRING ); break; case Object_SubLayout: - inputObject( objects, numObjects, strings, in, tqparentWidget, obj, + inputObject( objects, numObjects, strings, in, parentWidget, obj, TQLAYOUT_OBJECT_NAME_STRING ); break; case Object_SubWidget: - inputObject( objects, numObjects, strings, in, tqparentWidget, obj, + inputObject( objects, numObjects, strings, in, parentWidget, obj, TQWIDGET_OBJECT_NAME_STRING ); break; case Object_TextProperty: @@ -1151,18 +1151,18 @@ TQObject *TQWidgetFactory::inputObject( TQObject **objects, int& numObjects, metAttribute--; } - if ( tqparentLayout != 0 ) { + if ( parentLayout != 0 ) { if ( widget != 0 ) { - if ( tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - ((TQGridLayout *) tqparentLayout)->addMultiCellWidget( + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + ((TQGridLayout *) parentLayout)->addMultiCellWidget( widget, row, row + rowspan - 1, column, column + colspan - 1 ); } else { - ((TQBoxLayout *) tqparentLayout)->addWidget( widget ); + ((TQBoxLayout *) parentLayout)->addWidget( widget ); } } else if ( tqlayout != 0 ) { - if ( tqparentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { - ((TQGridLayout *) tqparentLayout)->addMultiCellLayout( + if ( parentLayout->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) { + ((TQGridLayout *) parentLayout)->addMultiCellLayout( tqlayout, row, row + rowspan - 1, column, column + colspan - 1 ); } @@ -1606,7 +1606,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) w = ( (TQMainWindow*)w )->centralWidget(); if ( tqlayout ) { - switch( tqlayoutType( tqlayout ) ) { + switch( layoutType( tqlayout ) ) { case HBox: ( (TQHBoxLayout*)tqlayout )->addWidget( w ); break; @@ -1626,7 +1626,7 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget } } #ifdef TQT_CONTAINER_CUSTOM_WIDGETS - TQString tqparentClassName = tqparent ? tqparent->className() : 0; + TQString parentClassName = tqparent ? tqparent->className() : 0; bool isPlugin = tqparent ? !!d->customWidgets.tqfind( tqparent->className() ) : FALSE; if ( isPlugin ) qWarning( "####### loading custom container widgets without page support not implemented!" ); @@ -1642,39 +1642,39 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget createWidgetInternal( n, w, tqlayout, n.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ) ); dbControls = oldDbControls; } else if ( n.tagName() == "hbox" ) { - TQLayout *tqparentLayout = tqlayout; + TQLayout *parentLayout = tqlayout; if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) tqlayout = createLayout( 0, 0, TQWidgetFactory::HBox, isTQLayoutWidget ); else tqlayout = createLayout( w, tqlayout, TQWidgetFactory::HBox, isTQLayoutWidget ); obj = TQT_TQOBJECT(tqlayout); n = n.firstChild().toElement(); - if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "grid" ) { - TQLayout *tqparentLayout = tqlayout; + TQLayout *parentLayout = tqlayout; if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) tqlayout = createLayout( 0, 0, TQWidgetFactory::Grid, isTQLayoutWidget ); else tqlayout = createLayout( w, tqlayout, TQWidgetFactory::Grid, isTQLayoutWidget ); obj = TQT_TQOBJECT(tqlayout); n = n.firstChild().toElement(); - if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "vbox" ) { - TQLayout *tqparentLayout = tqlayout; + TQLayout *parentLayout = tqlayout; if ( tqlayout && tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) tqlayout = createLayout( 0, 0, TQWidgetFactory::VBox, isTQLayoutWidget ); else tqlayout = createLayout( w, tqlayout, TQWidgetFactory::VBox, isTQLayoutWidget ); obj = TQT_TQOBJECT(tqlayout); n = n.firstChild().toElement(); - if ( tqparentLayout && tqparentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) - ( (TQGridLayout*)tqparentLayout )->addMultiCellLayout( tqlayout, row, + if ( parentLayout && parentLayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) ) + ( (TQGridLayout*)parentLayout )->addMultiCellLayout( tqlayout, row, row + rowspan - 1, col, col + colspan - 1 ); continue; } else if ( n.tagName() == "property" && obj ) { @@ -1699,13 +1699,13 @@ TQWidget *TQWidgetFactory::createWidgetInternal( const TQDomElement &e, TQWidget } else if ( isPlugin ) { if ( attrib == "label" ) { WidgetInterface *iface = 0; - widgetInterfaceManager->queryInterface( tqparentClassName, &iface ); + widgetInterfaceManager->queryInterface( parentClassName, &iface ); if ( iface ) { TQWidgetContainerInterfacePrivate *iface2 = 0; iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); if ( iface2 ) { - iface2->insertPage( tqparentClassName, + iface2->insertPage( parentClassName, (TQWidget*)tqparent, translate( v.toString() ), -1, w ); iface2->release(); } @@ -1794,7 +1794,7 @@ TQLayout *TQWidgetFactory::createLayout( TQWidget *widget, TQLayout* tqlayout, return l; } -TQWidgetFactory::LayoutType TQWidgetFactory::tqlayoutType( TQLayout *tqlayout ) const +TQWidgetFactory::LayoutType TQWidgetFactory::layoutType( TQLayout *tqlayout ) const { if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) ) return HBox; diff --git a/kdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h index 575a3630..ebdb38c0 100644 --- a/kdevdesigner/uilib/qwidgetfactory.h +++ b/kdevdesigner/uilib/qwidgetfactory.h @@ -68,7 +68,7 @@ private: void loadTabOrder( const TQDomElement &e ); TQWidget *createWidgetInternal( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout, const TQString &classNameArg ); TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type, bool isTQLayoutWidget = FALSE ); - LayoutType tqlayoutType( TQLayout *l ) const; + LayoutType layoutType( TQLayout *l ) const; void setProperty( TQObject* widget, const TQString &prop, TQVariant value ); void setProperty( TQObject* widget, const TQString &prop, const TQDomElement &e ); void createSpacer( const TQDomElement &e, TQLayout *tqlayout ); @@ -114,7 +114,7 @@ private: void inputColumnOrRow( const UibStrTable& strings, TQDataStream& in, TQObject *tqparent, bool isRow ); void inputItem( const UibStrTable& strings, TQDataStream& in, - TQObject *tqparent, TQListViewItem *tqparentItem = 0 ); + TQObject *tqparent, TQListViewItem *parentItem = 0 ); void inputMenuItem( TQObject **objects, const UibStrTable& strings, TQDataStream& in, TQMenuBar *menuBar ); TQObject *inputObject( TQObject **objects, int& numObjects, |