summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/command.cpp')
-rw-r--r--kdevdesigner/designer/command.cpp480
1 files changed, 241 insertions, 239 deletions
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp
index e2e55061..5079fff4 100644
--- a/kdevdesigner/designer/command.cpp
+++ b/kdevdesigner/designer/command.cpp
@@ -1,15 +1,15 @@
/**********************************************************************
** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
**
-** This file is part of Qt Designer.
+** This file is part of TQt Designer.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
-** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition
-** licenses may use this file in accordance with the Qt Commercial License
+** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition
+** licenses may use this file in accordance with the TQt Commercial License
** Agreement provided with the Software.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
@@ -17,7 +17,7 @@
**
** See http://www.trolltech.com/gpl/ for GPL licensing information.
** See http://www.trolltech.com/pricing.html or email [email protected] for
-** information about Qt Commercial License Agreements.
+** information about TQt Commercial License Agreements.
**
** Contact [email protected] if any conditions of this licensing are
** not clear to you.
@@ -51,7 +51,7 @@
#include <tqptrstack.h>
#include <tqheader.h>
#include <tqsplitter.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
#include <tqaction.h>
@@ -243,8 +243,8 @@ void ResizeCommand::execute()
{
widget->setGeometry( newRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( widget );
- if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -252,8 +252,8 @@ void ResizeCommand::unexecute()
{
widget->setGeometry( oldRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( widget );
- if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -261,33 +261,33 @@ void ResizeCommand::unexecute()
InsertCommand::InsertCommand( const TQString &n, FormWindow *fw,
TQWidget *w, const TQRect &g )
- : Command( n, fw ), widget( w ), geometry( g )
+ : Command( n, fw ), widget( w ), tqgeometry( g )
{
}
void InsertCommand::execute()
{
- if ( geometry.size() == TQSize( 0, 0 ) ) {
- widget->move( geometry.topLeft() );
+ if ( tqgeometry.size() == TQSize( 0, 0 ) ) {
+ widget->move( tqgeometry.topLeft() );
widget->adjustSize();
} else {
- TQSize s = geometry.size().expandedTo( widget->minimumSize() );
- s = s.expandedTo( widget->minimumSizeHint() );
- TQRect r( geometry.topLeft(), s );
+ TQSize s = tqgeometry.size().expandedTo( widget->tqminimumSize() );
+ s = s.expandedTo( widget->tqminimumSizeHint() );
+ TQRect r( tqgeometry.topLeft(), s );
widget->setGeometry( r );
}
widget->show();
formWindow()->widgets()->insert( widget, widget );
formWindow()->clearSelection( FALSE );
- formWindow()->selectWidget( widget );
+ formWindow()->selectWidget( TQT_TQOBJECT(widget) );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
}
void InsertCommand::unexecute()
{
widget->hide();
- formWindow()->selectWidget( widget, FALSE );
- formWindow()->widgets()->remove( widget );
+ formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE );
+ formWindow()->widgets()->remove( TQT_TQOBJECT(widget) );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@@ -320,13 +320,13 @@ bool MoveCommand::canMerge( Command *c )
void MoveCommand::execute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
+ if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( newParent, pos, TRUE );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( w );
+ formWindow()->widgetChanged( TQT_TQOBJECT(w) );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -334,20 +334,20 @@ void MoveCommand::execute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( w );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
}
}
void MoveCommand::unexecute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
+ if ( !w->tqparentWidget() || WidgetFactory::tqlayoutType( w->tqparentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
w->reparent( oldParent, pos, TRUE );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( w );
+ formWindow()->widgetChanged( TQT_TQOBJECT(w) );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -355,7 +355,7 @@ void MoveCommand::unexecute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( w );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
}
}
@@ -369,17 +369,17 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
TQWidgetList copyOfWidgets = widgets;
copyOfWidgets.setAutoDelete(FALSE);
- // Include the children of the selected items when deleting
+ // Include the tqchildren of the selected items when deleting
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
- for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) {
- if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) {
+ TQObjectList *tqchildren = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for ( TQWidget *c = (TQWidget *)tqchildren->first(); c; c = (TQWidget *)tqchildren->next() ) {
+ if ( copyOfWidgets.tqfind( c ) == -1 && formWindow()->widgets()->tqfind( c ) ) {
widgets.insert(widgets.at() + 1, c);
widgets.prev();
copyOfWidgets.append(c);
}
}
- delete children;
+ delete tqchildren;
}
}
@@ -392,13 +392,13 @@ void DeleteCommand::execute()
TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s );
- formWindow()->selectWidget( w, FALSE );
+ formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE );
formWindow()->widgets()->remove( w );
- TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
+ TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) );
connections.insert( w, conns );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::removeConnection( formWindow(), (*it).sender,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
@@ -418,11 +418,11 @@ void DeleteCommand::unexecute()
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s );
formWindow()->widgets()->insert( w, w );
- formWindow()->selectWidget( w );
- TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
+ formWindow()->selectWidget( TQT_TQOBJECT(w) );
+ TQValueList<MetaDataBase::Connection> conns = *connections.tqfind( w );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::addConnection( formWindow(), (*it).sender,
+ MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
@@ -457,8 +457,8 @@ void SetPropertyCommand::execute()
if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, FALSE );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
- if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != (TQObject *)widget )
- formWindow()->selectWidget( (TQObject *)widget );
+ if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) )
+ formWindow()->selectWidget( TQT_TQOBJECT(widget) );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );
editor->propertyList()->setCurrentProperty( propName );
@@ -490,11 +490,11 @@ bool SetPropertyCommand::canMerge( Command *c )
if ( !widget )
return FALSE;
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
return TRUE;
- if ( ::qt_cast<CustomWidget*>((TQObject *)widget) ) {
+ if ( ::tqqt_cast<CustomWidget*>((TQObject *)widget) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw )
return FALSE;
@@ -545,8 +545,8 @@ bool SetPropertyCommand::checkProperty()
return FALSE;
}
- if ( ::qt_cast<FormWindow*>(widget->parent()) )
- formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
+ if ( ::tqqt_cast<FormWindow*>(widget->tqparent()) )
+ formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->tqparentWidget() );
}
return TRUE;
}
@@ -557,47 +557,47 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
return;
if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
- formWindow()->selectWidget( widget );
+ formWindow()->selectWidget( TQT_TQOBJECT(widget) );
if ( editor->widget() != widget && select )
editor->setWidget( widget, formWindow() );
if ( select )
editor->propertyList()->setCurrentProperty( propName );
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "hAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
- int align = widget->property( "alignment" ).toInt();
+ p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE );
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", TQVariant( align ) );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
- int align = widget->property( "alignment" ).toInt();
+ p = widget->tqmetaObject()->property( widget->tqmetaObject()->tqfindProperty( "tqalignment", TRUE ), TRUE );
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", TQVariant( align ) );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
} else if ( propName == "wordwrap" ) {
- int align = widget->property( "alignment" ).toInt();
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~WordBreak;
if ( v.toBool() )
align |= WordBreak;
- widget->setProperty( "alignment", TQVariant( align ) );
- } else if ( propName == "layoutSpacing" ) {
+ widget->setProperty( "tqalignment", TQVariant( align ) );
+ } else if ( propName == "tqlayoutSpacing" ) {
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), val.toInt() );
- } else if ( propName == "layoutMargin" ) {
+ MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
+ } else if ( propName == "tqlayoutMargin" ) {
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), val.toInt() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
} else if ( propName == "resizeMode" ) {
- MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), currentItemText );
+ MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
- } else if ( ::qt_cast<CustomWidget*>(editor->widget()) ) {
+ } else if ( ::tqqt_cast<CustomWidget*>(editor->widget()) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget();
if ( cw ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
@@ -606,7 +606,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
editor->refetchData();
editor->emitWidgetChanged();
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( propName == "database" ) {
formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
}
@@ -634,9 +634,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
oldSerNum = v.toPixmap().serialNumber();
widget->setProperty( propName, v );
if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() )
- MetaDataBase::setPixmapKey( formWindow(),
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()),
widget->property( propName ).toPixmap().serialNumber(),
- MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
+ MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) );
if ( propName == "cursor" ) {
MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() );
}
@@ -645,10 +645,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() );
}
- if ( propName == "name" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "name" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
}
- if ( propName == "iconSet" && ::qt_cast<TQAction*>((TQObject *)widget) && ::qt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "iconSet" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget );
}
if ( propName == "caption" ) {
@@ -666,162 +666,162 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
}
editor->emitWidgetChanged();
- formWindow()->killAccels( widget );
+ formWindow()->killAccels( TQT_TQOBJECT(widget) );
}
// ------------------------------------------------------------
LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+ : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase )
{
}
void LayoutHorizontalCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
// ------------------------------------------------------------
LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, TRUE, TRUE )
{
}
void LayoutHorizontalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
// ------------------------------------------------------------
LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+ : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase )
{
}
void LayoutVerticalCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
// ------------------------------------------------------------
LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, TRUE, TRUE )
{
}
void LayoutVerticalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
// ------------------------------------------------------------
LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl, int xres, int yres )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( QMAX(5,xres), QMAX(5,yres) ) )
+ : Command( n, fw ), tqlayout( wl, tqparent, fw, tqlayoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) )
{
}
void LayoutGridCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutGridCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
// ------------------------------------------------------------
BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
- TQWidget *layoutBase, const TQWidgetList &wl )
- : Command( n, fw ), lb( layoutBase ), widgets( wl )
+ TQWidget *tqlayoutBase, const TQWidgetList &wl )
+ : Command( n, fw ), lb( tqlayoutBase ), widgets( wl )
{
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
- spacing = MetaDataBase::spacing( layoutBase );
- margin = MetaDataBase::margin( layoutBase );
- layout = 0;
+ WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( tqlayoutBase );
+ spacing = MetaDataBase::spacing( TQT_TQOBJECT(tqlayoutBase) );
+ margin = MetaDataBase::margin( TQT_TQOBJECT(tqlayoutBase) );
+ tqlayout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 );
+ tqlayout = new HorizontalLayout( wl, tqlayoutBase, fw, tqlayoutBase, FALSE, ::tqqt_cast<TQSplitter*>(tqlayoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::qt_cast<TQSplitter*>(layoutBase) != 0 );
+ tqlayout = new VerticalLayout( wl, tqlayoutBase, fw, tqlayoutBase, FALSE, ::tqqt_cast<TQSplitter*>(tqlayoutBase) != 0 );
else if ( lay == WidgetFactory::Grid )
- layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( QMAX( 5, fw->grid().x()), QMAX( 5, fw->grid().y()) ), FALSE );
+ tqlayout = new GridLayout( wl, tqlayoutBase, fw, tqlayoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
}
void BreakLayoutCommand::execute()
{
- if ( !layout )
+ if ( !tqlayout )
return;
formWindow()->clearSelection( FALSE );
- layout->breakLayout();
+ tqlayout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
- w->resize( QMAX( 16, w->width() ), QMAX( 16, w->height() ) );
+ w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) );
}
void BreakLayoutCommand::unexecute()
{
- if ( !layout )
+ if ( !tqlayout )
return;
formWindow()->clearSelection( FALSE );
- layout->doLayout();
+ tqlayout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin );
}
// ------------------------------------------------------------
@@ -850,19 +850,19 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, const TQString &label )
: Command( n, fw ), tabWidget( tw ), tabLabel( label )
{
- tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
+ tabPage = new TQDesignerWidget( formWindow(), tabWidget, "TabPage" );
tabPage->hide();
index = -1;
- MetaDataBase::addEntry( tabPage );
+ MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
}
void AddTabPageCommand::execute()
{
if ( index == -1 )
- index = ( (QDesignerTabWidget*)tabWidget )->count();
+ index = ( (TQDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -886,19 +886,19 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw,
void MoveTabPageCommand::execute()
{
- ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
- ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
- ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
+ ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
void MoveTabPageCommand::unexecute()
{
- ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
- ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
- ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
+ ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -908,15 +908,15 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, TQWidget *page )
: Command( n, fw ), tabWidget( tw ), tabPage( page )
{
- tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
- index = ( (QDesignerTabWidget*)tabWidget )->currentPage();
+ tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle();
+ index = ( (TQDesignerTabWidget*)tabWidget )->currentPage();
}
void DeleteTabPageCommand::execute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -924,26 +924,26 @@ void DeleteTabPageCommand::unexecute()
{
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
// ------------------------------------------------------------
AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
- QDesignerWidgetStack *ws )
+ TQDesignerWidgetStack *ws )
: Command( n, fw ), widgetStack( ws )
{
- stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
+ stackPage = new TQDesignerWidget( formWindow(), widgetStack, "WStackPage" );
stackPage->hide();
index = -1;
- MetaDataBase::addEntry( stackPage );
+ MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
}
void AddWidgetStackPageCommand::execute()
{
index = widgetStack->insertPage( stackPage, index );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
@@ -951,12 +951,12 @@ void AddWidgetStackPageCommand::unexecute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
- QDesignerWidgetStack *ws, TQWidget *page )
+ TQDesignerWidgetStack *ws, TQWidget *page )
: Command( n, fw), widgetStack( ws ), stackPage( page )
{
index = -1;
@@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage );
}
@@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute()
{
index = widgetStack->insertPage( stackPage, index );
widgetStack->raiseWidget( stackPage );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage );
}
@@ -984,11 +984,11 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
TQWizard *w, const TQString &label, int i, bool s )
: Command( n, fw ), wizard( w ), pageLabel( label )
{
- page = new QDesignerWidget( formWindow(), wizard, "WizardPage" );
+ page = new TQDesignerWidget( formWindow(), wizard, "WizardPage" );
page->hide();
index = i;
show = s;
- MetaDataBase::addEntry( page );
+ MetaDataBase::addEntry( TQT_TQOBJECT(page) );
}
void AddWizardPageCommand::execute()
@@ -997,8 +997,8 @@ void AddWizardPageCommand::execute()
index = wizard->pageCount();
wizard->insertPage( page, pageLabel, index );
if ( show )
- ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute()
{
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1025,7 +1025,7 @@ void DeleteWizardPageCommand::execute()
pageLabel = wizard->title( page );
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1033,8 +1033,8 @@ void DeleteWizardPageCommand::unexecute()
{
wizard->insertPage( page, pageLabel, index );
if ( show )
- ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label );
label = oldLabel;
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
}
void RenameWizardPageCommand::unexecute()
@@ -1079,7 +1079,7 @@ void SwapWizardPagesCommand::execute()
wizard->removePage( page2 );
wizard->insertPage( page1, page1Label, index2 );
wizard->insertPage( page2, page2Label, index1 );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1101,7 +1101,7 @@ void MoveWizardPageCommand::execute()
TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index2 );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1112,7 +1112,7 @@ void MoveWizardPageCommand::unexecute()
TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index1 );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1126,17 +1126,17 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw
void AddConnectionCommand::execute()
{
- MetaDataBase::addConnection( formWindow(), connection.sender,
+ MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( connection.receiver == formWindow()->mainContainer() )
+ if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void AddConnectionCommand::unexecute()
{
- MetaDataBase::removeConnection( formWindow(), connection.sender,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( connection.receiver == formWindow()->mainContainer() )
+ if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1150,17 +1150,17 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind
void RemoveConnectionCommand::execute()
{
- MetaDataBase::removeConnection( formWindow(), connection.sender,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( connection.receiver == formWindow()->mainContainer() )
+ if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void RemoveConnectionCommand::unexecute()
{
- MetaDataBase::addConnection( formWindow(), connection.sender,
+ MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( connection.receiver == formWindow()->mainContainer() )
+ if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co
void AddFunctionCommand::execute()
{
- MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - execute)
@@ -1185,7 +1185,7 @@ void AddFunctionCommand::execute()
f.function = function;
f.specifier = specifier;
f.access = access;
- f.type = (functionType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->clearSelection(false);
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
@@ -1195,7 +1195,7 @@ void AddFunctionCommand::execute()
void AddFunctionCommand::unexecute()
{
- MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - unexecute)
@@ -1204,7 +1204,7 @@ void AddFunctionCommand::unexecute()
f.function = function;
f.specifier = specifier;
f.access = access;
- f.type = (functionType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
@@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name,
void ChangeFunctionAttribCommand::execute()
{
- MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess,
+ MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess,
newType, newLang, newReturnType );
formWindow()->formFile()->functionNameChanged( oldName, newName );
formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType );
@@ -1242,13 +1242,13 @@ void ChangeFunctionAttribCommand::execute()
f.function = newName;
f.specifier = newSpec;
f.access = newAccess;
- f.type = (newType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
KInterfaceDesigner::Function of;
f.returnType = oldReturnType;
f.function = oldName;
f.specifier = oldSpec;
f.access = oldAccess;
- f.type = (oldType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f);
if ( formWindow()->formFile() )
@@ -1257,7 +1257,7 @@ void ChangeFunctionAttribCommand::execute()
void ChangeFunctionAttribCommand::unexecute()
{
- MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess,
+ MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess,
oldType, oldLang, oldReturnType );
formWindow()->formFile()->functionNameChanged( newName, oldName );
formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType );
@@ -1269,13 +1269,13 @@ void ChangeFunctionAttribCommand::unexecute()
f.function = newName;
f.specifier = newSpec;
f.access = newAccess;
- f.type = (newType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
KInterfaceDesigner::Function of;
f.returnType = oldReturnType;
f.function = oldName;
f.specifier = oldSpec;
f.access = oldAccess;
- f.type = (oldType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of);
if ( formWindow()->formFile() )
@@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
returnType( rt )
{
if ( spec.isNull() ) {
- TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw );
+ TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) );
for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).function ) ==
MetaDataBase::normalizeFunction( function ) ) {
@@ -1308,7 +1308,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
void RemoveFunctionCommand::execute()
{
- MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - execute)
@@ -1317,7 +1317,7 @@ void RemoveFunctionCommand::execute()
f.function = function;
f.specifier = specifier;
f.access = access;
- f.type = (functionType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
@@ -1326,9 +1326,9 @@ void RemoveFunctionCommand::execute()
void RemoveFunctionCommand::unexecute()
{
- if ( MetaDataBase::hasFunction( formWindow(), function ) )
+ if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) )
return;
- MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - unexecute)
@@ -1337,7 +1337,7 @@ void RemoveFunctionCommand::unexecute()
f.function = function;
f.specifier = specifier;
f.access = access;
- f.type = (functionType == "slot") ? KInterfaceDesigner::ftQtSlot : KInterfaceDesigner::ftFunction ;
+ f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ;
formWindow()->clearSelection(false);
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
@@ -1354,7 +1354,7 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co
void AddVariableCommand::execute()
{
- MetaDataBase::addVariable( formWindow(), varName, access );
+ MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1362,7 +1362,7 @@ void AddVariableCommand::execute()
void AddVariableCommand::unexecute()
{
- MetaDataBase::removeVariable( formWindow(), varName );
+ MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1374,12 +1374,12 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw,
TQValueList<MetaDataBase::Variable> lst )
: Command( name, fw ), newList( lst )
{
- oldList = MetaDataBase::variables( formWindow() );
+ oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) );
}
void SetVariablesCommand::execute()
{
- MetaDataBase::setVariables( formWindow(), newList );
+ MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1387,7 +1387,7 @@ void SetVariablesCommand::execute()
void SetVariablesCommand::unexecute()
{
- MetaDataBase::setVariables( formWindow(), oldList );
+ MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1398,7 +1398,7 @@ void SetVariablesCommand::unexecute()
RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn )
: Command( name, fw ), varName( vn )
{
- TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
+ TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) );
for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).varName == varName ) {
access = (*it).varAccess;
@@ -1409,7 +1409,7 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *
void RemoveVariableCommand::execute()
{
- MetaDataBase::removeVariable( formWindow(), varName );
+ MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1417,7 +1417,7 @@ void RemoveVariableCommand::execute()
void RemoveVariableCommand::unexecute()
{
- MetaDataBase::addVariable( formWindow(), varName, access );
+ MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
formWindow()->formFile()->setModified( TRUE );
@@ -1510,7 +1510,7 @@ void PasteCommand::execute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
- formWindow()->selectWidget( w );
+ formWindow()->selectWidget( TQT_TQOBJECT(w) );
formWindow()->widgets()->insert( w, w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -1520,7 +1520,7 @@ void PasteCommand::unexecute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
- formWindow()->selectWidget( w, FALSE );
+ formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE );
formWindow()->widgets()->remove( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
}
@@ -1603,7 +1603,7 @@ PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow
TQIconView *iv, const TQValueList<Item> &items )
: Command( n, fw ), newItems( items ), iconview( iv )
{
-#ifndef QT_NO_ICONVIEW
+#ifndef TQT_NO_ICONVIEW
TQIconViewItem *i = 0;
for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
Item item;
@@ -1617,7 +1617,7 @@ PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow
void PopulateIconViewCommand::execute()
{
-#ifndef QT_NO_ICONVIEW
+#ifndef TQT_NO_ICONVIEW
iconview->clear();
for ( TQValueList<Item>::Iterator it = newItems.begin(); it != newItems.end(); ++it ) {
Item i = *it;
@@ -1628,7 +1628,7 @@ void PopulateIconViewCommand::execute()
void PopulateIconViewCommand::unexecute()
{
-#ifndef QT_NO_ICONVIEW
+#ifndef TQT_NO_ICONVIEW
iconview->clear();
for ( TQValueList<Item>::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) {
Item i = *it;
@@ -1689,7 +1689,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
from->setSorting( -1 );
for ( ; it.current(); ++it ) {
TQListViewItem *i = it.current();
- if ( i->parent() == fromParents.top() ) {
+ if ( i->tqparent() == fromParents.top() ) {
TQListViewItem *pi = toParents.top();
TQListViewItem *ni = 0;
if ( pi )
@@ -1706,7 +1706,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
if ( pi )
pi->setOpen( TRUE );
} else {
- if ( i->parent() == fromLast ) {
+ if ( i->tqparent() == fromLast ) {
fromParents.push( fromLast );
toParents.push( toLasts.top() );
toLasts.push( 0 );
@@ -1726,7 +1726,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
if ( pi )
pi->setOpen( TRUE );
} else {
- while ( fromParents.top() != i->parent() ) {
+ while ( fromParents.top() != i->tqparent() ) {
fromParents.pop();
toParents.pop();
toLasts.pop();
@@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
: Command( n, fw ), newText( txt ), mlined( mle )
{
oldText = mlined->text();
- wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" );
+ wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" );
}
void PopulateMultiLineEditCommand::execute()
{
mlined->setText( newText );
- MetaDataBase::setPropertyChanged( mlined, "text", TRUE );
- formWindow()->emitUpdateProperties( mlined );
+ MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
}
void PopulateMultiLineEditCommand::unexecute()
{
mlined->setText( oldText );
- MetaDataBase::setPropertyChanged( mlined, "text", wasChanged );
- formWindow()->emitUpdateProperties( mlined );
+ MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
}
// ------------------------------------------------------------
@@ -1786,15 +1786,15 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T
const TQValueList<Column> &columns )
: Command( n, fw ), newRows( rows ), newColumns( columns ), table( t )
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
int i = 0;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i );
if ( table->horizontalHeader()->iconSet( i ) )
col.pix = table->horizontalHeader()->iconSet( i )->pixmap();
- col.field = *columnFields.find( col.text );
+ col.field = *columnFields.tqfind( col.text );
oldColumns.append( col );
}
for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
@@ -1809,7 +1809,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T
void PopulateTableCommand::execute()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
TQMap<TQString, TQString> columnFields;
table->setNumCols( newColumns.count() );
int i = 0;
@@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( table, columnFields );
+ MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
table->setNumRows( newRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
@@ -1828,7 +1828,7 @@ void PopulateTableCommand::execute()
void PopulateTableCommand::unexecute()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
TQMap<TQString, TQString> columnFields;
table->setNumCols( oldColumns.count() );
int i = 0;
@@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( table, columnFields );
+ MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
table->setNumRows( oldRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
@@ -1848,7 +1848,7 @@ void PopulateTableCommand::unexecute()
// ------------------------------------------------------------
AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerToolBar *tb, int idx )
+ TQAction *a, TQDesignerToolBar *tb, int idx )
: Command( n, fw ), action( a ), toolBar( tb ), index( idx )
{
}
@@ -1857,24 +1857,24 @@ void AddActionToToolBarCommand::execute()
{
action->addTo( toolBar );
- if ( ::qt_cast<QDesignerAction*>(action) ) {
- TQString s = ( (QDesignerAction*)action )->widget()->name();
+ if ( ::tqqt_cast<TQDesignerAction*>(action) ) {
+ TQString s = ( (TQDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
- ( (QDesignerAction*)action )->widget()->setName( s );
+ ( (TQDesignerAction*)action )->widget()->setName( s );
}
- toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
- ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
- } else if ( ::qt_cast<QDesignerActionGroup*>(action) ) {
- if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
- toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
- ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
+ toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action );
+ ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( ::tqqt_cast<TQDesignerActionGroup*>(action) ) {
+ if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) {
+ toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action );
+ ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
}
- } else if ( ::qt_cast<QSeparatorAction*>(action) ) {
- toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
- ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( ::tqqt_cast<TQSeparatorAction*>(action) ) {
+ toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action );
+ ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
- if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
toolBar->appendAction( action );
else
@@ -1882,17 +1882,18 @@ void AddActionToToolBarCommand::execute()
toolBar->reInsert();
TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
} else {
- if ( action->children() ) {
- TQObjectListIt it( *action->children() );
+ TQObjectList clo = action->childrenListObject();
+ if ( !clo.isEmpty() ) {
+ TQObjectListIt it( clo );
int i = 0;
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::qt_cast<TQAction*>(o) )
+ if ( !::tqqt_cast<TQAction*>(o) )
continue;
// ### fix it for nested actiongroups
- if ( ::qt_cast<QDesignerAction*>(o) ) {
- QDesignerAction *ac = (QDesignerAction*)o;
+ if ( ::tqqt_cast<TQDesignerAction*>(o) ) {
+ TQDesignerAction *ac = (TQDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar );
if ( index == -1 )
@@ -1911,26 +1912,27 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute()
{
- if ( ::qt_cast<QDesignerAction*>(action) ) {
- TQString s = ( (QDesignerAction*)action )->widget()->name();
+ if ( ::tqqt_cast<TQDesignerAction*>(action) ) {
+ TQString s = ( (TQDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
- ( (QDesignerAction*)action )->widget()->setName( s );
+ ( (TQDesignerAction*)action )->widget()->setName( s );
}
toolBar->removeAction( action );
action->removeFrom( toolBar );
TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
- if ( !::qt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar );
} else {
- if ( action->children() ) {
- TQObjectListIt it( *action->children() );
+ TQObjectList clo = action->childrenListObject();
+ if ( !clo.isEmpty() ) {
+ TQObjectListIt it( clo );
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::qt_cast<TQAction*>(o) )
+ if ( !::tqqt_cast<TQAction*>(o) )
continue;
- if ( ::qt_cast<QDesignerAction*>(o) ) {
+ if ( ::tqqt_cast<TQDesignerAction*>(o) ) {
o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o );
}
@@ -1951,9 +1953,9 @@ AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainW
void AddToolBarCommand::execute()
{
if ( !toolBar ) {
- toolBar = new QDesignerToolBar( mainWindow );
+ toolBar = new TQDesignerToolBar( mainWindow );
TQString n = "Toolbar";
- formWindow()->unify( toolBar, n, TRUE );
+ formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
@@ -1976,7 +1978,7 @@ void AddToolBarCommand::unexecute()
// ------------------------------------------------------------
-#ifdef QT_CONTAINER_CUSTOM_WIDGETS
+#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw,
TQWidget *c, const TQString &label )
: Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 )
@@ -1985,7 +1987,7 @@ AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow
widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
if ( !iface )
return;
- iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&wiface );
+ iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface );
if ( !wiface )
return;
wClassName = WidgetFactory::classNameOf( container );
@@ -2009,7 +2011,7 @@ void AddContainerPageCommand::execute()
wiface->insertPage( wClassName, container, pageLabel, index, page );
MetaDataBase::addEntry( page );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
@@ -2018,7 +2020,7 @@ void AddContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
@@ -2032,7 +2034,7 @@ DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormW
widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
if ( !iface )
return;
- iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&wiface );
+ iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface );
if ( !wiface )
return;
wClassName = WidgetFactory::classNameOf( container );
@@ -2052,7 +2054,7 @@ void DeleteContainerPageCommand::execute()
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
@@ -2064,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute()
index = wiface->count( wClassName, container );
wiface->insertPage( wClassName, container, pageLabel, index, page );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
@@ -2079,7 +2081,7 @@ RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormW
widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface );
if ( !iface )
return;
- iface->queryInterface( IID_QWidgetContainer, (QUnknownInterface**)&wiface );
+ iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface );
if ( !wiface )
return;
wClassName = WidgetFactory::classNameOf( container );
@@ -2097,7 +2099,7 @@ void RenameContainerPageCommand::execute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, newLabel );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
@@ -2106,10 +2108,10 @@ void RenameContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, oldLabel );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
// #### show and update pages in object hierarchy view
}
-#endif // QT_CONTAINER_CUSTOM_WIDGETS
+#endif // TQT_CONTAINER_CUSTOM_WIDGETS
// ------------------------------------------------------------
AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n,
@@ -2129,7 +2131,7 @@ void AddActionToPopupCommand::execute()
void AddActionToPopupCommand::unexecute()
{
item->hideMenu();
- int i = menu->find( item->action() );
+ int i = menu->tqfind( item->action() );
menu->remove( i );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2198,7 +2200,7 @@ RenameActionCommand::RenameActionCommand( const TQString &n,
void RenameActionCommand::execute()
{
TQString actionText = newName;
- actionText.replace("&&", "&");
+ actionText.tqreplace("&&", "&");
TQString menuText = newName;
action->setText( actionText );
action->setMenuText( menuText );
@@ -2388,8 +2390,8 @@ TQString RenameMenuCommand::makeLegal( const TQString &str )
// remove illegal characters
TQString d;
char c = 0, i = 0;
- while ( !str.at(i).isNull() ) {
- c = str.at(i).latin1();
+ while ( !str.tqat(i).isNull() ) {
+ c = str.tqat(i).latin1();
if ( c == '-' || c == ' ' )
d += '_';
else if ( ( c >= '0' && c <= '9') || ( c >= 'A' && c <= 'Z' )
@@ -2405,7 +2407,7 @@ void RenameMenuCommand::execute()
PopupMenuEditor *popup = item->menu();
item->setMenuText( newName );
TQString legal = makeLegal( newName );
- formWindow()->unify( popup, legal, TRUE );
+ formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2424,17 +2426,17 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
TQToolBox *tw, const TQString &label )
: Command( n, fw ), toolBox( tw ), toolBoxLabel( label )
{
- toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
+ toolBoxPage = new TQDesignerWidget( formWindow(), toolBox, "page" );
toolBoxPage->hide();
index = -1;
- MetaDataBase::addEntry( toolBoxPage );
+ MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );
}
void AddToolBoxPageCommand::execute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel);
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2442,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2460,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2468,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel );
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}