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.cpp94
1 files changed, 47 insertions, 47 deletions
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp
index 50c604bd..60a14cdf 100644
--- a/kdevdesigner/designer/command.cpp
+++ b/kdevdesigner/designer/command.cpp
@@ -43,11 +43,11 @@
#include <tqwidget.h>
#include <tqmetaobject.h>
#include <tqapplication.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqmessagebox.h>
#include <tqlistbox.h>
#include <tqiconview.h>
-#include <textedit.h>
+#include <tqtextedit.h>
#include <tqptrstack.h>
#include <tqheader.h>
#include <tqsplitter.h>
@@ -261,19 +261,19 @@ void ResizeCommand::unexecute()
InsertCommand::InsertCommand( const TQString &n, FormWindow *fw,
TQWidget *w, const TQRect &g )
- : Command( n, fw ), widget( w ), geometry( g )
+ : Command( n, fw ), widget( w ), tqgeometry( g )
{
}
void InsertCommand::execute()
{
- if ( geometry.size() == TQSize( 0, 0 ) ) {
- widget->move( geometry.topLeft() );
+ if ( tqgeometry.size() == TQSize( 0, 0 ) ) {
+ widget->move( tqgeometry.topLeft() );
widget->adjustSize();
} else {
- TQSize s = geometry.size().expandedTo( widget->minimumSize() );
- s = s.expandedTo( widget->minimumSizeHint() );
- TQRect r( geometry.topLeft(), s );
+ TQSize s = tqgeometry.size().expandedTo( widget->tqminimumSize() );
+ s = s.expandedTo( widget->tqminimumSizeHint() );
+ TQRect r( tqgeometry.topLeft(), s );
widget->setGeometry( r );
}
widget->show();
@@ -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() ) {
+ TQObjectList *tqchildren = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ for ( TQWidget *c = (TQWidget *)tqchildren->first(); c; c = (TQWidget *)tqchildren->next() ) {
if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) {
widgets.insert(widgets.at() + 1, c);
widgets.prev();
copyOfWidgets.append(c);
}
}
- delete children;
+ delete tqchildren;
}
}
@@ -490,7 +490,7 @@ 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()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
return TRUE;
@@ -563,26 +563,26 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( select )
editor->propertyList()->setCurrentProperty( propName );
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( propName, TRUE ), TRUE );
if ( !p ) {
if ( propName == "hAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
- int align = widget->property( "alignment" ).toInt();
+ p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE );
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", TQVariant( align ) );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
- int align = widget->property( "alignment" ).toInt();
+ p = widget->tqmetaObject()->property( widget->tqmetaObject()->findProperty( "tqalignment", TRUE ), TRUE );
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
- widget->setProperty( "alignment", TQVariant( align ) );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
} else if ( propName == "wordwrap" ) {
- int align = widget->property( "alignment" ).toInt();
+ int align = widget->property( "tqalignment" ).toInt();
align &= ~WordBreak;
if ( v.toBool() )
align |= WordBreak;
- widget->setProperty( "alignment", TQVariant( align ) );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
} else if ( propName == "layoutSpacing" ) {
TQVariant val = v;
if ( val.toString() == "default" )
@@ -674,21 +674,21 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+ : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase )
{
}
void LayoutHorizontalCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -697,21 +697,21 @@ void LayoutHorizontalCommand::unexecute()
LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, TRUE, TRUE )
{
}
void LayoutHorizontalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -720,21 +720,21 @@ void LayoutHorizontalSplitCommand::unexecute()
LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase )
+ : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase )
{
}
void LayoutVerticalCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -743,21 +743,21 @@ void LayoutVerticalCommand::unexecute()
LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, TRUE, TRUE )
{
}
void LayoutVerticalSplitCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalSplitCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -766,21 +766,21 @@ void LayoutVerticalSplitCommand::unexecute()
LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl, int xres, int yres )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) )
+ : Command( n, fw ), tqlayout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) )
{
}
void LayoutGridCommand::execute()
{
formWindow()->clearSelection( FALSE );
- layout.doLayout();
+ tqlayout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutGridCommand::unexecute()
{
formWindow()->clearSelection( FALSE );
- layout.undoLayout();
+ tqlayout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -793,21 +793,21 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) );
margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) );
- layout = 0;
+ tqlayout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ tqlayout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ tqlayout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_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 );
+ tqlayout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
}
void BreakLayoutCommand::execute()
{
- if ( !layout )
+ if ( !tqlayout )
return;
formWindow()->clearSelection( FALSE );
- layout->breakLayout();
+ tqlayout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) );
@@ -815,10 +815,10 @@ void BreakLayoutCommand::execute()
void BreakLayoutCommand::unexecute()
{
- if ( !layout )
+ if ( !tqlayout )
return;
formWindow()->clearSelection( FALSE );
- layout->doLayout();
+ tqlayout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing );
MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin );
@@ -2390,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' )