summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/formwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/formwindow.cpp')
-rw-r--r--kdevdesigner/designer/formwindow.cpp96
1 files changed, 48 insertions, 48 deletions
diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp
index 05636e38..fbd7e1ad 100644
--- a/kdevdesigner/designer/formwindow.cpp
+++ b/kdevdesigner/designer/formwindow.cpp
@@ -31,7 +31,7 @@
#include "sizehandle.h"
#include "metadatabase.h"
#include "resource.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "connectiondialog.h"
#include <widgetdatabase.h>
#include "pixmapchooser.h"
@@ -55,11 +55,11 @@
#include <tqobjectlist.h>
#include <tqtimer.h>
#include <tqapplication.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqspinbox.h>
#include <tqstatusbar.h>
#include <tqapplication.h>
-#include <palette.h>
+#include <tqpalette.h>
#include <tqmessagebox.h>
#include <tqpopupmenu.h>
#include <tqsizegrip.h>
@@ -108,7 +108,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw )
}
}
-#if defined(TQ_WS_WIN32) // #### needed for the workaround for repaint problem on windows
+#if defined(TQ_WS_WIN32) // #### needed for the workaround for tqrepaint problem on windows
#include <tqt_windows.h>
static void flickerfree_update( TQWidget *w )
{
@@ -260,7 +260,7 @@ void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e )
grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
if( !TQPixmapCache::find( grid_name, grid ) ) {
grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) );
- grid.fill( colorGroup().color( TQColorGroup::Foreground ) );
+ grid.fill( tqcolorGroup().color( TQColorGroup::Foreground ) );
TQBitmap mask( grid.width(), grid.height() );
mask.fill( color0 );
TQPainter p( &mask );
@@ -321,7 +321,7 @@ TQPoint FormWindow::gridPoint( const TQPoint &p )
void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text )
{
unclippedPainter->save();
- unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 ));
+ unclippedPainter->setPen( TQPen( tqcolorGroup().foreground(), 1 ));
unclippedPainter->setRasterOp( CopyROP );
if ( !sizePreviewPixmap.isNull() )
unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap );
@@ -383,13 +383,13 @@ void FormWindow::insertWidget()
"properties as well as signals and slots to integrate custom widgets into "
"<i>TQt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
- .arg(WidgetDatabase::toolTip( id )) );
- TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
+ .tqarg(WidgetDatabase::toolTip( id )) );
+ TQToolTip::add( w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip( id )) );
} else {
TQString tt = WidgetDatabase::toolTip( id );
TQString wt = WidgetDatabase::whatsThis( id );
if ( !wt.isEmpty() && !tt.isEmpty() )
- TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
+ TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").tqarg( tt ).tqarg( wt ) );
}
TQString s = w->name();
@@ -416,8 +416,8 @@ void FormWindow::insertWidget()
r.setHeight( 20 );
}
} else {
- r.setWidth( w->sizeHint().width() );
- r.setHeight( w->sizeHint().height() );
+ r.setWidth( w->tqsizeHint().width() );
+ r.setHeight( w->tqsizeHint().height() );
}
}
@@ -463,13 +463,13 @@ void FormWindow::insertWidget()
else
setCursorToAll( CrossCursor, w );
- InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r );
+ InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).tqarg( w->name() ), this, w, r );
TQPtrList<Command> commands;
commands.append( mv );
commands.append( cmd );
- MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).arg( w->name() ), this, commands );
+ MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).tqarg( w->name() ), this, commands );
commandHistory()->addCommand( mc );
mc->execute();
}
@@ -479,7 +479,7 @@ void FormWindow::insertWidget()
else
setCursorToAll( CrossCursor, w );
- InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r );
+ InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).tqarg( w->name() ), this, w, r );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -510,13 +510,13 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
"properties as well as signals and slots to integrate custom widgets into "
"<i>TQt Designer</i>, and provide a pixmap which will be used to represent "
"the widget on the form.</p>")
- .arg(WidgetDatabase::toolTip( id )) );
- TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) );
+ .tqarg(WidgetDatabase::toolTip( id )) );
+ TQToolTip::add( w, i18n("A %1 (custom widget)").tqarg(WidgetDatabase::toolTip( id )) );
} else {
TQString tt = WidgetDatabase::toolTip( id );
TQString wt = WidgetDatabase::whatsThis( id );
if ( !wt.isEmpty() && !tt.isEmpty() )
- TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").arg( tt ).arg( wt ) );
+ TQWhatsThis::add( w, TQString("<b>A %1</b><p>%2</p>").tqarg( tt ).tqarg( wt ) );
}
restoreCursors( w, this );
@@ -577,7 +577,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
switch ( currTool ) {
case POINTER_TOOL:
if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
- // if the clicked widget is not in a layout, raise it
+ // if the clicked widget is not in a tqlayout, raise it
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection
@@ -592,7 +592,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
if ( !sel ) { // ...and widget no selectted: unselect all
clearSelection( FALSE );
} else { // ...widget selected
- // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs
+ // only if widget has a tqlayout (it is a tqlayout meta widget or a laid out container!), unselect its childs
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) {
TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
setPropertyShowingBlocked( TRUE );
@@ -622,7 +622,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) )
w = w->parentWidget();
- if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving
+ if ( e->button() == Qt::LeftButton ) { // left button: store original tqgeometry and more as the widget might start moving
widgetPressed = TRUE;
widgetGeom = TQRect( w->pos(), w->size() );
oldPressPos = w->mapFromGlobal( e->globalPos() );
@@ -660,9 +660,9 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
break;
clearSelection( FALSE );
validForBuddy = TRUE;
- mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) );
+ mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).tqarg( w->name() ) );
} else {
- mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) );
+ mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).tqarg( w->name() ) );
}
saveBackground();
startPos = mapFromGlobal( e->globalPos() );
@@ -824,7 +824,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
targetContainer = wa;
hadOwnPalette = wa->ownPalette();
restorePalette = wa->palette();
- wa->setPaletteBackgroundColor( wa->colorGroup().midlight() );
+ wa->setPaletteBackgroundColor( wa->tqcolorGroup().midlight() );
}
}
else if ( targetContainer ) {
@@ -837,7 +837,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
// finally move the selected widgets and show/update preview label
moveSelectedWidgets( x - p.x(), y - p.y() );
- sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) );
+ sizePreviewLabel->setText( i18n( "%1/%2" ).tqarg( w->pos().x() ).tqarg( w->pos().y() ) );
sizePreviewLabel->adjustSize();
TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() );
checkPreviewGeometry( lg );
@@ -871,7 +871,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( newendWidget &&
( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
endWidget = newendWidget;
- mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ).
+ mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).tqarg( startWidget->name() ).
arg( endWidget->name() ) );
currentPos = mapFromGlobal( e->globalPos() );
tqApp->processEvents();
@@ -899,10 +899,10 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
endWidget = newendWidget;
if ( endWidget )
- mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ).
+ mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).tqarg( startWidget->name() ).
arg( endWidget->name() ) );
else
- mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).arg( startWidget->name() ) );
+ mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).tqarg( startWidget->name() ) );
currentPos = mapFromGlobal( e->globalPos() );
tqApp->processEvents();
if ( drawRecRect && oldendWidget )
@@ -958,15 +958,15 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( wa == it.key()->parentWidget() )
goto make_move_command;
- // break layout if necessary
+ // break tqlayout if necessary
if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) {
if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
i18n( "You tried to insert a widget into the "
- "layout Container Widget '%1'.\n"
+ "tqlayout Container Widget '%1'.\n"
"This is not possible. "
- "In order to insert the widget, the layout of '%1'\n"
+ "In order to insert the widget, the tqlayout of '%1'\n"
"must first be broken.\n"
- "Break the layout or cancel the operation?" ).
+ "Break the tqlayout or cancel the operation?" ).
arg( wa->name() ).
arg( wa->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) )
goto make_move_command; // cancel
@@ -1044,7 +1044,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
TQString oldBuddy = startWidget->property( "buddy" ).toString();
if ( oldBuddy.isNull() )
oldBuddy = "";
- SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ),
+ SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).tqarg( startWidget->name() ),
this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(),
"buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(),
@@ -1067,11 +1067,11 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) {
if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ),
i18n( "You tried to insert a widget into the "
- "layout Container Widget '%1'.\n"
+ "tqlayout Container Widget '%1'.\n"
"This is not possible. "
- "In order to insert the widget, the layout of '%1'\n"
+ "In order to insert the widget, the tqlayout of '%1'\n"
"must first be broken.\n"
- "Break the layout or cancel the operation?" ).
+ "Break the tqlayout or cancel the operation?" ).
arg( insertParent->name() ).
arg( insertParent->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) == 0 ) {
breakLayout( insertParent );
@@ -1327,7 +1327,7 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
if ( currRect == r ) {
TQString t = i18n( "%1/%2" );
- t = t.arg( r.width() - 1 ).arg( r.height() - 1 );
+ t = t.tqarg( r.width() - 1 ).tqarg( r.height() - 1 );
drawSizePreview( pos, t );
return;
}
@@ -1339,7 +1339,7 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
currRect = r;
if ( t == Insert ) {
TQString t = i18n( "%1/%2" );
- t = t.arg( r.width() - 1 ).arg( r.height() - 1 );
+ t = t.tqarg( r.width() - 1 ).tqarg( r.height() - 1 );
drawSizePreview( pos, t );
}
unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) );
@@ -1502,13 +1502,13 @@ void FormWindow::editAdjustSize()
TQPtrList<Command> commands;
TQWidgetList widgets = selectedWidgets();
if ( widgets.isEmpty() ) {
- TQRect oldr = geometry();
+ TQRect oldr = tqgeometry();
mainContainer()->adjustSize();
resize( mainContainer()->size() );
// check whether our own size constraint hit us
if ( size() != mainContainer()->size() )
mainContainer()->resize( size() );
- TQRect nr = geometry();
+ TQRect nr = tqgeometry();
if ( oldr != nr ) {
ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr );
commandHistory()->addCommand( cmd );
@@ -1518,9 +1518,9 @@ void FormWindow::editAdjustSize()
for ( TQWidget* w = widgets.first(); w; w = widgets.next() ) {
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
continue;
- TQRect oldr = w->geometry();
+ TQRect oldr = w->tqgeometry();
w->adjustSize();
- TQRect nr = w->geometry();
+ TQRect nr = w->tqgeometry();
if ( oldr != nr )
commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) );
}
@@ -1759,7 +1759,7 @@ void FormWindow::currentToolChanged()
emitShowProperties( TQT_TQOBJECT(mainContainer()) );
break;
default:
- mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) );
+ mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).tqarg( WidgetDatabase::toolTip( currTool ).lower() ) );
setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this )
emitShowProperties( TQT_TQOBJECT(mainContainer()) );
@@ -1832,7 +1832,7 @@ bool FormWindow::checkCustomWidgets()
if ( !missingCustomWidgets.isEmpty() ) {
TQString txt = i18n( "The following custom widgets are used in '%1',\n"
- "but are not known to TQt Designer:\n" ).arg( name() );
+ "but are not known to TQt Designer:\n" ).tqarg( name() );
for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit )
txt += " " + *sit + "\n";
txt += i18n( "If you save this form and generate code for it using uic, \n"
@@ -1910,11 +1910,11 @@ void FormWindow::checkAccels()
insertedWidgets[ (void*)o ] ) {
TQWidget *w = (TQWidget*)o;
const TQMetaProperty* text =
- w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
+ w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "text", TRUE ), TRUE );
const TQMetaProperty* title =
- w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
+ w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "title", TRUE ), TRUE );
const TQMetaProperty* pageTitle =
- w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
+ w->tqmetaObject()->property( w->tqmetaObject()->findProperty( "pageTitle", TRUE ), TRUE );
if ( text )
find_accel( w->property( "text" ).toString(), accels, w );
if ( title )
@@ -1935,7 +1935,7 @@ void FormWindow::checkAccels()
ok = FALSE;
switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count()
- ).arg( it.key().upper() ),
+ ).tqarg( it.key().upper() ),
i18n( "&Select" ),
i18n( "&Cancel" ), TQString(), 2 ) ) {
case 0: // select
@@ -2581,7 +2581,7 @@ void FormWindow::setMainContainer( TQWidget *w )
delete mContainer;
mContainer = w;
insertedWidgets.insert( mContainer, mContainer );
- delete layout();
+ delete tqlayout();
TQHBoxLayout *l = new TQHBoxLayout( this );
l->addWidget( w );
if ( resetPropertyWidget ) {