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.cpp390
1 files changed, 195 insertions, 195 deletions
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp
index b9b97827..4e4eab06 100644
--- a/kdevdesigner/designer/command.cpp
+++ b/kdevdesigner/designer/command.cpp
@@ -63,8 +63,8 @@
CommandHistory::CommandHistory( int s )
: current( -1 ), steps( s ), savedAt( -1 )
{
- history.setAutoDelete( TRUE );
- modified = FALSE;
+ history.setAutoDelete( true );
+ modified = false;
compressedCommand = 0;
}
@@ -80,7 +80,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
if ( compressedCommand ) {
compressedCommand->merge( cmd );
- modified = TRUE;
+ modified = true;
modificationChanged( modified );
return;
}
@@ -94,7 +94,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
savedAt = -2;
TQPtrList<Command> commands;
- commands.setAutoDelete( FALSE );
+ commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) );
@@ -104,7 +104,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
commands.append( cmd );
history.clear();
history = commands;
- history.setAutoDelete( TRUE );
+ history.setAutoDelete( true );
} else {
history.append( cmd );
}
@@ -117,7 +117,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
}
emitUndoRedo();
- modified = TRUE;
+ modified = true;
modificationChanged( modified );
}
@@ -228,7 +228,7 @@ void Command::merge( Command * )
bool Command::canMerge( Command * )
{
- return FALSE;
+ return false;
}
// ------------------------------------------------------------
@@ -243,7 +243,7 @@ void ResizeCommand::execute()
{
widget->setGeometry( newRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -252,7 +252,7 @@ void ResizeCommand::unexecute()
{
widget->setGeometry( oldRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -278,16 +278,16 @@ void InsertCommand::execute()
}
widget->show();
formWindow()->widgets()->insert( widget, widget );
- formWindow()->clearSelection( FALSE );
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ formWindow()->clearSelection( false );
+ formWindow()->selectWidget( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
}
void InsertCommand::unexecute()
{
widget->hide();
- formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE );
- formWindow()->widgets()->remove( TQT_TQOBJECT(widget) );
+ formWindow()->selectWidget( widget, false );
+ formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@@ -301,7 +301,7 @@ MoveCommand::MoveCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ),
oldParent( opr ), newParent( npr )
{
- widgets.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
}
void MoveCommand::merge( Command *c )
@@ -323,10 +323,10 @@ void MoveCommand::execute()
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 );
+ w->reparent( newParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( TQT_TQOBJECT(w) );
+ formWindow()->widgetChanged( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -334,7 +334,7 @@ void MoveCommand::execute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -344,10 +344,10 @@ void MoveCommand::unexecute()
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 );
+ w->reparent( oldParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( TQT_TQOBJECT(w) );
+ formWindow()->widgetChanged( 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( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -365,13 +365,13 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
const TQWidgetList &wl )
: Command( n, fw ), widgets( wl )
{
- widgets.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
TQWidgetList copyOfWidgets = widgets;
- copyOfWidgets.setAutoDelete(FALSE);
+ copyOfWidgets.setAutoDelete(false);
// Include the children of the selected items when deleting
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *children = w->queryList( "TQWidget" );
for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) {
if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) {
widgets.insert(widgets.at() + 1, c);
@@ -385,24 +385,24 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
void DeleteCommand::execute()
{
- formWindow()->setPropertyShowingBlocked( TRUE );
+ formWindow()->setPropertyShowingBlocked( true );
connections.clear();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s );
- formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE );
+ formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
- TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) );
+ TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
+ MetaDataBase::removeConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
- formWindow()->setPropertyShowingBlocked( FALSE );
+ formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets );
@@ -410,23 +410,23 @@ void DeleteCommand::execute()
void DeleteCommand::unexecute()
{
- formWindow()->setPropertyShowingBlocked( TRUE );
- formWindow()->clearSelection( FALSE );
+ formWindow()->setPropertyShowingBlocked( true );
+ formWindow()->clearSelection( false );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
TQString s = w->name();
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s );
formWindow()->widgets()->insert( w, w );
- formWindow()->selectWidget( TQT_TQOBJECT(w) );
+ formWindow()->selectWidget( w );
TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
+ MetaDataBase::addConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
- formWindow()->setPropertyShowingBlocked( FALSE );
+ formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets );
}
@@ -440,7 +440,7 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
const TQString &ocut, bool reset )
: Command( n, fw ), widget( w ), editor( e ), propName( pn ),
oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ),
- wasChanged( TRUE ), isResetCommand( reset )
+ wasChanged( true ), isResetCommand( reset )
{
wasChanged = MetaDataBase::isPropertyChanged( w, propName );
if ( oldCurrentItemText.isNull() )
@@ -453,12 +453,12 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
void SetPropertyCommand::execute()
{
if ( !wasChanged )
- MetaDataBase::setPropertyChanged( widget, propName, TRUE );
+ MetaDataBase::setPropertyChanged( widget, propName, true );
if ( isResetCommand ) {
- MetaDataBase::setPropertyChanged( widget, propName, FALSE );
+ MetaDataBase::setPropertyChanged( widget, propName, false );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
- if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) )
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget )
+ formWindow()->selectWidget( widget );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );
editor->propertyList()->setCurrentProperty( propName );
@@ -466,7 +466,7 @@ void SetPropertyCommand::execute()
if ( !i )
return;
i->setValue( widget->property( propName ) );
- i->setChanged( FALSE );
+ i->setChanged( false );
editor->refetchData();
editor->emitWidgetChanged();
return;
@@ -478,9 +478,9 @@ void SetPropertyCommand::execute()
void SetPropertyCommand::unexecute()
{
if ( !wasChanged )
- MetaDataBase::setPropertyChanged( widget, propName, FALSE );
+ MetaDataBase::setPropertyChanged( widget, propName, false );
if ( isResetCommand )
- MetaDataBase::setPropertyChanged( widget, propName, TRUE );
+ MetaDataBase::setPropertyChanged( widget, propName, true );
setProperty( oldValue, oldCurrentItemText );
}
@@ -488,24 +488,24 @@ bool SetPropertyCommand::canMerge( Command *c )
{
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
if ( !widget )
- return FALSE;
+ return false;
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
- return TRUE;
- if ( ::tqqt_cast<CustomWidget*>((TQObject *)widget) ) {
+ return true;
+ if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw )
- return FALSE;
+ return false;
for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
if ( TQString( (*it ).property ) == propName ) {
if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" )
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
TQVariant::Type t = TQVariant::nameToType( p->type() );
return ( cmd->propName == propName &&
@@ -523,7 +523,7 @@ bool SetPropertyCommand::checkProperty()
{
if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that
TQString s = newValue.toString();
- if ( !formWindow()->unify( widget, s, FALSE ) ) {
+ if ( !formWindow()->unify( widget, s, false ) ) {
TQMessageBox::information( formWindow()->mainWindow(),
i18n( "Set 'name' Property" ),
i18n( "The name of a widget must be unique.\n"
@@ -532,8 +532,8 @@ bool SetPropertyCommand::checkProperty()
arg( newValue.toString() ).
arg( formWindow()->name() ).
arg( oldValue.toString() ));
- setProperty( oldValue, oldCurrentItemText, FALSE );
- return FALSE;
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
}
if ( s.isEmpty() ) {
TQMessageBox::information( formWindow()->mainWindow(),
@@ -541,14 +541,14 @@ bool SetPropertyCommand::checkProperty()
i18n( "The name of a widget must not be null.\n"
"The name has been reverted to '%1'." ).
arg( oldValue.toString() ));
- setProperty( oldValue, oldCurrentItemText, FALSE );
- return FALSE;
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
}
- if ( ::tqqt_cast<FormWindow*>(widget->parent()) )
+ if ( ::tqt_cast<FormWindow*>(widget->parent()) )
formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
}
- return TRUE;
+ return true;
}
void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, bool select )
@@ -557,22 +557,22 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
return;
if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ formWindow()->selectWidget( 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->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "hAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
@@ -587,17 +587,17 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "layoutMargin" ) {
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "resizeMode" ) {
- MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText );
+ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
- } else if ( ::tqqt_cast<CustomWidget*>(editor->widget()) ) {
+ } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget();
if ( cw ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
@@ -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( TQT_TQOBJECT(formWindow()),
+ MetaDataBase::setPixmapKey( formWindow(),
widget->property( propName ).toPixmap().serialNumber(),
- MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) );
+ MetaDataBase::pixmapKey( 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" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "name" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
}
- if ( propName == "iconSet" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "iconSet" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget );
}
if ( propName == "caption" ) {
@@ -666,7 +666,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
}
editor->emitWidgetChanged();
- formWindow()->killAccels( TQT_TQOBJECT(widget) );
+ formWindow()->killAccels( widget );
}
// ------------------------------------------------------------
@@ -680,14 +680,14 @@ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow
void LayoutHorizontalCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -697,20 +697,20 @@ void LayoutHorizontalCommand::unexecute()
LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutHorizontalSplitCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalSplitCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -726,14 +726,14 @@ LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
void LayoutVerticalCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -743,20 +743,20 @@ void LayoutVerticalCommand::unexecute()
LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutVerticalSplitCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalSplitCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -772,14 +772,14 @@ LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
void LayoutGridCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutGridCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -791,22 +791,22 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), lb( layoutBase ), widgets( wl )
{
WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
- spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) );
- margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) );
+ spacing = MetaDataBase::spacing( layoutBase );
+ margin = MetaDataBase::margin( layoutBase );
layout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::Grid )
- layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
+ layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false );
}
void BreakLayoutCommand::execute()
{
if ( !layout )
return;
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
@@ -817,11 +817,11 @@ void BreakLayoutCommand::unexecute()
{
if ( !layout )
return;
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
- MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing );
- MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin );
}
// ------------------------------------------------------------
@@ -853,7 +853,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
tabPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
+ MetaDataBase::addEntry( tabPage );
}
void AddTabPageCommand::execute()
@@ -862,7 +862,7 @@ void AddTabPageCommand::execute()
index = ( (QDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -889,7 +889,7 @@ void MoveTabPageCommand::execute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -898,7 +898,7 @@ void MoveTabPageCommand::unexecute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -916,7 +916,7 @@ void DeleteTabPageCommand::execute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -924,7 +924,7 @@ void DeleteTabPageCommand::unexecute()
{
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -937,13 +937,13 @@ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWin
stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
stackPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
+ MetaDataBase::addEntry( stackPage );
}
void AddWidgetStackPageCommand::execute()
{
index = widgetStack->insertPage( stackPage, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
@@ -951,7 +951,7 @@ void AddWidgetStackPageCommand::unexecute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
@@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage );
}
@@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute()
{
index = widgetStack->insertPage( stackPage, index );
widgetStack->raiseWidget( stackPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage );
}
@@ -988,7 +988,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
page->hide();
index = i;
show = s;
- MetaDataBase::addEntry( TQT_TQOBJECT(page) );
+ MetaDataBase::addEntry( page );
}
void AddWizardPageCommand::execute()
@@ -998,7 +998,7 @@ void AddWizardPageCommand::execute()
wizard->insertPage( page, pageLabel, index );
if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute()
{
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( 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( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1034,7 +1034,7 @@ void DeleteWizardPageCommand::unexecute()
wizard->insertPage( page, pageLabel, index );
if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label );
label = oldLabel;
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( 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( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( 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( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( 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( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1126,17 +1126,17 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw
void AddConnectionCommand::execute()
{
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void AddConnectionCommand::unexecute()
{
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1150,17 +1150,17 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind
void RemoveConnectionCommand::execute()
{
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void RemoveConnectionCommand::unexecute()
{
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co
void AddFunctionCommand::execute()
{
- MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - execute)
@@ -1190,12 +1190,12 @@ void AddFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddFunctionCommand::unexecute()
{
- MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - unexecute)
@@ -1208,7 +1208,7 @@ void AddFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name,
void ChangeFunctionAttribCommand::execute()
{
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess,
+ MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess,
newType, newLang, newReturnType );
formWindow()->formFile()->functionNameChanged( oldName, newName );
formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType );
@@ -1252,12 +1252,12 @@ void ChangeFunctionAttribCommand::execute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void ChangeFunctionAttribCommand::unexecute()
{
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess,
+ MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess,
oldType, oldLang, oldReturnType );
formWindow()->formFile()->functionNameChanged( newName, oldName );
formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType );
@@ -1279,7 +1279,7 @@ void ChangeFunctionAttribCommand::unexecute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
returnType( rt )
{
if ( spec.isNull() ) {
- TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) );
+ TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( 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( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - execute)
@@ -1321,14 +1321,14 @@ void RemoveFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveFunctionCommand::unexecute()
{
- if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) )
+ if ( MetaDataBase::hasFunction( formWindow(), function ) )
return;
- MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - unexecute)
@@ -1342,7 +1342,7 @@ void RemoveFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1354,18 +1354,18 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co
void AddVariableCommand::execute()
{
- MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
+ MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddVariableCommand::unexecute()
{
- MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
+ MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1374,23 +1374,23 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw,
TQValueList<MetaDataBase::Variable> lst )
: Command( name, fw ), newList( lst )
{
- oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) );
+ oldList = MetaDataBase::variables( formWindow() );
}
void SetVariablesCommand::execute()
{
- MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList );
+ MetaDataBase::setVariables( formWindow(), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void SetVariablesCommand::unexecute()
{
- MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList );
+ MetaDataBase::setVariables( formWindow(), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ 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( TQT_TQOBJECT(fw) );
+ TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).varName == varName ) {
access = (*it).varAccess;
@@ -1409,18 +1409,18 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *
void RemoveVariableCommand::execute()
{
- MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
+ MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveVariableCommand::unexecute()
{
- MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
+ MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1438,7 +1438,7 @@ void EditDefinitionsCommand::execute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void EditDefinitionsCommand::unexecute()
@@ -1447,7 +1447,7 @@ void EditDefinitionsCommand::unexecute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1510,7 +1510,7 @@ void PasteCommand::execute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
- formWindow()->selectWidget( TQT_TQOBJECT(w) );
+ formWindow()->selectWidget( 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( TQT_TQOBJECT(w), FALSE );
+ formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
}
@@ -1542,7 +1542,7 @@ void TabOrderCommand::merge( Command *c )
bool TabOrderCommand::canMerge( Command * )
{
- return TRUE;
+ return true;
}
void TabOrderCommand::execute()
@@ -1704,7 +1704,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
} else {
if ( i->parent() == fromLast ) {
fromParents.push( fromLast );
@@ -1724,7 +1724,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
} else {
while ( fromParents.top() != i->parent() ) {
fromParents.pop();
@@ -1744,7 +1744,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
ni->setPixmap( c, *i->pixmap( c ) );
}
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
toLasts.pop();
toLasts.push( ni );
}
@@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
: Command( n, fw ), newText( txt ), mlined( mle )
{
oldText = mlined->text();
- wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" );
+ wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" );
}
void PopulateMultiLineEditCommand::execute()
{
mlined->setText( newText );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
+ MetaDataBase::setPropertyChanged( mlined, "text", true );
+ formWindow()->emitUpdateProperties( mlined );
}
void PopulateMultiLineEditCommand::unexecute()
{
mlined->setText( oldText );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
+ MetaDataBase::setPropertyChanged( mlined, "text", wasChanged );
+ formWindow()->emitUpdateProperties( mlined );
}
// ------------------------------------------------------------
@@ -1788,7 +1788,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T
{
#ifndef TQT_NO_TABLE
int i = 0;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i );
@@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
+ MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( newRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
@@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
+ MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( oldRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
@@ -1857,7 +1857,7 @@ void AddActionToToolBarCommand::execute()
{
action->addTo( toolBar );
- if ( ::tqqt_cast<QDesignerAction*>(action) ) {
+ if ( ::tqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (QDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
@@ -1865,22 +1865,22 @@ void AddActionToToolBarCommand::execute()
}
toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(action) ) {
if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
}
- } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
+ } else if ( ::tqt_cast<QSeparatorAction*>(action) ) {
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
- if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
toolBar->appendAction( action );
else
toolBar->insertAction( index, action );
toolBar->reInsert();
- TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
} else {
TQObjectList clo = action->childrenListObject();
if ( !clo.isEmpty() ) {
@@ -1889,10 +1889,10 @@ void AddActionToToolBarCommand::execute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
// ### fix it for nested actiongroups
- if ( ::tqqt_cast<QDesignerAction*>(o) ) {
+ if ( ::tqt_cast<QDesignerAction*>(o) ) {
QDesignerAction *ac = (QDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar );
@@ -1901,18 +1901,18 @@ void AddActionToToolBarCommand::execute()
else
toolBar->insertAction( index + (i++), ac );
}
- TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
}
toolBar->reInsert();
- TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void AddActionToToolBarCommand::unexecute()
{
- if ( ::tqqt_cast<QDesignerAction*>(action) ) {
+ if ( ::tqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (QDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
( (QDesignerAction*)action )->widget()->setName( s );
@@ -1920,8 +1920,8 @@ void AddActionToToolBarCommand::unexecute()
toolBar->removeAction( action );
action->removeFrom( toolBar );
- TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
- if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ TQObject::disconnect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
+ if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar );
} else {
TQObjectList clo = action->childrenListObject();
@@ -1930,13 +1930,13 @@ void AddActionToToolBarCommand::unexecute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
- if ( ::tqqt_cast<QDesignerAction*>(o) ) {
+ if ( ::tqt_cast<QDesignerAction*>(o) ) {
o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o );
}
- TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::disconnect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
}
}
@@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute()
if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar";
- formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE );
+ formWindow()->unify( toolBar, n, true );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
@@ -2011,7 +2011,7 @@ void AddContainerPageCommand::execute()
wiface->insertPage( wClassName, container, pageLabel, index, page );
MetaDataBase::addEntry( page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2020,7 +2020,7 @@ void AddContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2054,7 +2054,7 @@ void DeleteContainerPageCommand::execute()
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2066,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute()
index = wiface->count( wClassName, container );
wiface->insertPage( wClassName, container, pageLabel, index, page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2099,7 +2099,7 @@ void RenameContainerPageCommand::execute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, newLabel );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2108,7 +2108,7 @@ void RenameContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, oldLabel );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
#endif // TQT_CONTAINER_CUSTOM_WIDGETS
@@ -2233,7 +2233,7 @@ void SetActionIconsCommand::execute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
- MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
+ MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
void SetActionIconsCommand::unexecute()
@@ -2242,7 +2242,7 @@ void SetActionIconsCommand::unexecute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
- MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
+ MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
// ------------------------------------------------------------
@@ -2272,19 +2272,19 @@ void AddMenuCommand::execute()
if ( !mb ) {
mb = new MenuBarEditor( formWindow(), mw );
mb->setName( "MenuBarEditor" );
- formWindow()->insertWidget( mb, TRUE );
+ formWindow()->insertWidget( mb, true );
}
if ( !item ) {
PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw );
popup->setName( "PopupMenuEditor" );
- formWindow()->insertWidget( popup, TRUE );
+ formWindow()->insertWidget( popup, true );
mb->insertItem( name, popup, index );
index = mb->findItem( popup );
item = mb->item( index );
} else {
PopupMenuEditor *popup = item->menu();
popup->setName( item->menuText() );
- formWindow()->insertWidget( popup, TRUE );
+ formWindow()->insertWidget( popup, true );
mb->insertItem( item, index );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute()
PopupMenuEditor *popup = item->menu();
item->setMenuText( newName );
TQString legal = makeLegal( newName );
- formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE );
+ formWindow()->unify( popup, legal, true );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2429,14 +2429,14 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
toolBoxPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );
+ MetaDataBase::addEntry( toolBoxPage );
}
void AddToolBoxPageCommand::execute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel);
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2444,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2462,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2470,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel );
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}