summaryrefslogtreecommitdiffstats
path: root/kommander/editor
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kommander/editor
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kommander/editor')
-rw-r--r--kommander/editor/actiondnd.cpp438
-rw-r--r--kommander/editor/actiondnd.h86
-rw-r--r--kommander/editor/actioneditor.ui16
-rw-r--r--kommander/editor/actioneditorimpl.cpp31
-rw-r--r--kommander/editor/actioneditorimpl.h5
-rw-r--r--kommander/editor/actionlistview.cpp14
-rw-r--r--kommander/editor/actionlistview.h29
-rw-r--r--kommander/editor/asciivalidator.cpp16
-rw-r--r--kommander/editor/asciivalidator.h11
-rw-r--r--kommander/editor/assistproc.cpp6
-rw-r--r--kommander/editor/assistproc.h9
-rw-r--r--kommander/editor/assoctexteditor.ui38
-rw-r--r--kommander/editor/assoctexteditorimpl.cpp48
-rw-r--r--kommander/editor/assoctexteditorimpl.h1
-rw-r--r--kommander/editor/choosewidget.ui24
-rw-r--r--kommander/editor/choosewidgetimpl.cpp14
-rw-r--r--kommander/editor/choosewidgetimpl.h3
-rw-r--r--kommander/editor/command.cpp384
-rw-r--r--kommander/editor/command.h81
-rw-r--r--kommander/editor/connectioneditor.ui42
-rw-r--r--kommander/editor/connectioneditorimpl.cpp82
-rw-r--r--kommander/editor/connectioneditorimpl.h10
-rw-r--r--kommander/editor/createtemplate.ui22
-rw-r--r--kommander/editor/defs.cpp2
-rw-r--r--kommander/editor/defs.h2
-rw-r--r--kommander/editor/filechooser.cpp14
-rw-r--r--kommander/editor/filechooser.h9
-rw-r--r--kommander/editor/formfile.cpp24
-rw-r--r--kommander/editor/formfile.h5
-rw-r--r--kommander/editor/formsettings.ui36
-rw-r--r--kommander/editor/formsettingsimpl.cpp14
-rw-r--r--kommander/editor/formsettingsimpl.h5
-rw-r--r--kommander/editor/formwindow.cpp576
-rw-r--r--kommander/editor/formwindow.h37
-rw-r--r--kommander/editor/functions.ui100
-rw-r--r--kommander/editor/functionsimpl.cpp40
-rw-r--r--kommander/editor/functionsimpl.h1
-rw-r--r--kommander/editor/globaldefs.h2
-rw-r--r--kommander/editor/hierarchyview.cpp144
-rw-r--r--kommander/editor/hierarchyview.h26
-rw-r--r--kommander/editor/iconvieweditor.ui58
-rw-r--r--kommander/editor/iconvieweditorimpl.cpp8
-rw-r--r--kommander/editor/iconvieweditorimpl.h5
-rw-r--r--kommander/editor/kommander-new.xml18
-rw-r--r--kommander/editor/kommander.xml26
-rw-r--r--kommander/editor/layout.cpp298
-rw-r--r--kommander/editor/layout.h45
-rw-r--r--kommander/editor/listboxeditor.ui56
-rw-r--r--kommander/editor/listboxeditorimpl.cpp8
-rw-r--r--kommander/editor/listboxeditorimpl.h5
-rw-r--r--kommander/editor/listeditor.ui22
-rw-r--r--kommander/editor/listvieweditor.ui120
-rw-r--r--kommander/editor/listvieweditorimpl.cpp44
-rw-r--r--kommander/editor/listvieweditorimpl.h7
-rw-r--r--kommander/editor/main.cpp2
-rw-r--r--kommander/editor/mainwindow.cpp290
-rw-r--r--kommander/editor/mainwindow.h13
-rw-r--r--kommander/editor/mainwindowactions.cpp288
-rw-r--r--kommander/editor/messagelog.cpp10
-rw-r--r--kommander/editor/messagelog.h5
-rw-r--r--kommander/editor/metadatabase.cpp206
-rw-r--r--kommander/editor/metadatabase.h6
-rw-r--r--kommander/editor/multilineeditor.ui20
-rw-r--r--kommander/editor/multilineeditorimpl.cpp20
-rw-r--r--kommander/editor/multilineeditorimpl.h10
-rw-r--r--kommander/editor/newform.ui32
-rw-r--r--kommander/editor/newformimpl.cpp28
-rw-r--r--kommander/editor/newformimpl.h7
-rw-r--r--kommander/editor/orderindicator.cpp6
-rw-r--r--kommander/editor/orderindicator.h5
-rw-r--r--kommander/editor/paletteeditor.ui46
-rw-r--r--kommander/editor/paletteeditoradvanced.ui62
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.cpp24
-rw-r--r--kommander/editor/paletteeditoradvancedimpl.h7
-rw-r--r--kommander/editor/paletteeditorimpl.cpp10
-rw-r--r--kommander/editor/paletteeditorimpl.h7
-rw-r--r--kommander/editor/parser.cpp16
-rw-r--r--kommander/editor/parser.h2
-rw-r--r--kommander/editor/pics/images.h58
-rw-r--r--kommander/editor/pixmapchooser.cpp50
-rw-r--r--kommander/editor/pixmapchooser.h16
-rw-r--r--kommander/editor/pixmapfunction.ui32
-rw-r--r--kommander/editor/preferences.ui62
-rw-r--r--kommander/editor/previewframe.cpp8
-rw-r--r--kommander/editor/previewframe.h14
-rw-r--r--kommander/editor/previewwidget.ui44
-rw-r--r--kommander/editor/previewwidgetimpl.cpp8
-rw-r--r--kommander/editor/previewwidgetimpl.h5
-rw-r--r--kommander/editor/propertyeditor.cpp350
-rw-r--r--kommander/editor/propertyeditor.h52
-rw-r--r--kommander/editor/qcompletionedit.cpp16
-rw-r--r--kommander/editor/qcompletionedit.h13
-rw-r--r--kommander/editor/resource.cpp507
-rw-r--r--kommander/editor/resource.h14
-rw-r--r--kommander/editor/sizehandle.cpp62
-rw-r--r--kommander/editor/sizehandle.h9
-rw-r--r--kommander/editor/styledbutton.cpp42
-rw-r--r--kommander/editor/styledbutton.h25
-rw-r--r--kommander/editor/tableeditor.ui118
-rw-r--r--kommander/editor/tableeditorimpl.cpp60
-rw-r--r--kommander/editor/tableeditorimpl.h3
-rw-r--r--kommander/editor/templates/Configuration_Dialog.ui22
-rw-r--r--kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui14
-rw-r--r--kommander/editor/templates/Dialog_with_Buttons_(Right).ui14
-rw-r--r--kommander/editor/templates/Tab_Dialog.ui20
-rw-r--r--kommander/editor/timestamp.cpp6
-rw-r--r--kommander/editor/timestamp.h7
-rw-r--r--kommander/editor/widgetdatabase.cpp138
-rw-r--r--kommander/editor/widgetdatabase.h8
-rw-r--r--kommander/editor/widgetfactory.cpp824
-rw-r--r--kommander/editor/widgetfactory.h217
-rw-r--r--kommander/editor/widgetinterface.h8
-rw-r--r--kommander/editor/wizardeditor.ui40
-rw-r--r--kommander/editor/wizardeditorimpl.cpp20
-rw-r--r--kommander/editor/wizardeditorimpl.h5
-rw-r--r--kommander/editor/workspace.cpp54
-rw-r--r--kommander/editor/workspace.h19
117 files changed, 3689 insertions, 3584 deletions
diff --git a/kommander/editor/actiondnd.cpp b/kommander/editor/actiondnd.cpp
index 67491ef4..119f481b 100644
--- a/kommander/editor/actiondnd.cpp
+++ b/kommander/editor/actiondnd.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -42,7 +42,7 @@
#include <klocale.h>
-bool QDesignerAction::addTo( TQWidget *w )
+bool TQDesignerAction::addTo( TQWidget *w )
{
if ( !widgetToInsert )
return TQAction::addTo( w );
@@ -55,7 +55,7 @@ bool QDesignerAction::addTo( TQWidget *w )
return true;
}
-bool QDesignerAction::removeFrom( TQWidget *w )
+bool TQDesignerAction::removeFrom( TQWidget *w )
{
if ( !widgetToInsert )
return TQAction::removeFrom( w );
@@ -64,70 +64,70 @@ bool QDesignerAction::removeFrom( TQWidget *w )
return true;
}
-void QDesignerAction::remove()
+void TQDesignerAction::remove()
{
if ( !widgetToInsert )
return;
- MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
+ MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), false );
widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
}
-QDesignerToolBarSeparator::QDesignerToolBarSeparator(Orientation o , TQToolBar *parent,
+TQDesignerToolBarSeparator::TQDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *tqparent,
const char* name )
- : TQWidget( parent, name )
+ : TQWidget( tqparent, name )
{
- connect( parent, TQT_SIGNAL(orientationChanged(Orientation)),
- this, TQT_SLOT(setOrientation(Orientation)) );
+ connect( tqparent, TQT_SIGNAL(orientationChanged(Qt::Orientation)),
+ this, TQT_SLOT(setOrientation(Qt::Orientation)) );
setOrientation( o );
- setBackgroundMode( parent->backgroundMode() );
+ setBackgroundMode( tqparent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
- setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
+ tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
}
-void QDesignerToolBarSeparator::setOrientation( Orientation o )
+void TQDesignerToolBarSeparator::setOrientation( Qt::Orientation o )
{
orient = o;
}
-void QDesignerToolBarSeparator::styleChange( TQStyle& )
+void TQDesignerToolBarSeparator::styleChange( TQStyle& )
{
setOrientation( orient );
}
-TQSize QDesignerToolBarSeparator::sizeHint() const
+TQSize TQDesignerToolBarSeparator::tqsizeHint() const
{
- int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
+ int extent = tqstyle().tqpixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
this );
- if ( orient == Horizontal )
+ if ( orient ==Qt::Horizontal )
return TQSize( extent, 0 );
else
return TQSize( 0, extent );
}
-void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
+void TQDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
TQStyle::SFlags flags = TQStyle::Style_Default;
- if ( orientation() == Horizontal )
+ if ( orientation() ==Qt::Horizontal )
flags |= TQStyle::Style_Horizontal;
- style().drawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
- colorGroup(), flags );
+ tqstyle().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
+ tqcolorGroup(), flags );
}
-QSeparatorAction::QSeparatorAction( TQObject *parent )
- : TQAction( parent, "qt_designer_separator" ), wid( 0 )
+TQSeparatorAction::TQSeparatorAction( TQObject *tqparent )
+ : TQAction( tqparent, "qt_designer_separator" ), wid( 0 )
{
}
-bool QSeparatorAction::addTo( TQWidget *w )
+bool TQSeparatorAction::addTo( TQWidget *w )
{
if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) {
TQToolBar *tb = (TQToolBar*)w;
- wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
+ wid = new TQDesignerToolBarSeparator( tb->orientation(), tb );
return true;
} else if ( w->inherits( TQPOPUPMENU_OBJECT_NAME_STRING ) ) {
idx = ( (TQPopupMenu*)w )->count();
@@ -137,7 +137,7 @@ bool QSeparatorAction::addTo( TQWidget *w )
return false;
}
-bool QSeparatorAction::removeFrom( TQWidget *w )
+bool TQSeparatorAction::removeFrom( TQWidget *w )
{
if ( w->inherits( TQTOOLBAR_OBJECT_NAME_STRING ) ) {
delete wid;
@@ -149,7 +149,7 @@ bool QSeparatorAction::removeFrom( TQWidget *w )
return false;
}
-TQWidget *QSeparatorAction::widget() const
+TQWidget *TQSeparatorAction::widget() const
{
return wid;
}
@@ -157,15 +157,15 @@ TQWidget *QSeparatorAction::widget() const
-QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
+TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw )
: TQToolBar( mw ), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = true;
setAcceptDrops( true );
- MetaDataBase::addEntry( this );
+ MetaDataBase::addEntry( TQT_TQOBJECT(this) );
lastIndicatorPos = TQPoint( -1, -1 );
- indicator = new QDesignerIndicatorWidget( this );
+ indicator = new TQDesignerIndicatorWidget( this );
indicator->hide();
installEventFilter( this );
widgetInserting = false;
@@ -173,65 +173,65 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
mw->setDockEnabled( DockTornOff, false );
}
-QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock )
- : TQToolBar( TQString::null, mw, dock), lastIndicatorPos( -1, -1 )
+TQDesignerToolBar::TQDesignerToolBar( TQMainWindow *mw, Dock dock )
+ : TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
afterAnchor = true;
setAcceptDrops( true );
- indicator = new QDesignerIndicatorWidget( this );
+ indicator = new TQDesignerIndicatorWidget( this );
indicator->hide();
- MetaDataBase::addEntry( this );
+ MetaDataBase::addEntry( TQT_TQOBJECT(this) );
installEventFilter( this );
widgetInserting = false;
findFormWindow();
mw->setDockEnabled( DockTornOff, false );
}
-void QDesignerToolBar::findFormWindow()
+void TQDesignerToolBar::findFormWindow()
{
TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
}
-void QDesignerToolBar::addAction( TQAction *a )
+void TQDesignerToolBar::addAction( TQAction *a )
{
actionList.append( a );
connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
- ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
- actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
- } else if ( a->inherits( "QSeparatorAction" ) ) {
- ( (QSeparatorAction*)a )->widget()->installEventFilter( this );
- actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
+ ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a );
+ } else if ( a->inherits( "TQSeparatorAction" ) ) {
+ ( (TQSeparatorAction*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a );
} else {
- ( (QDesignerAction*)a )->widget()->installEventFilter( this );
- actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
+ ( (TQDesignerAction*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (TQDesignerAction*)a )->widget(), a );
}
}
static void fixObject( TQObject *&o )
{
- while ( o && o->parent() && !o->parent()->inherits( "QDesignerToolBar" ) )
- o = o->parent();
+ while ( o && o->tqparent() && !o->tqparent()->inherits( "TQDesignerToolBar" ) )
+ o = o->tqparent();
}
-bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
+bool TQDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
{
- if ( !o || !e || o->inherits( "QDockWindowHandle" ) || o->inherits( "QDockWindowTitleBar" ) )
+ if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) )
return TQToolBar::eventFilter( o, e );
- if ( o == this && e->type() == TQEvent::MouseButtonPress &&
- ( ( TQMouseEvent*)e )->button() == LeftButton ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress &&
+ ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
return true;
}
- if ( o == this )
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
return TQToolBar::eventFilter( o, e );
if ( e->type() == TQEvent::MouseButtonPress ) {
@@ -279,7 +279,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
return TQToolBar::eventFilter( o, e );
}
-void QDesignerToolBar::paintEvent( TQPaintEvent *e )
+void TQDesignerToolBar::paintEvent( TQPaintEvent *e )
{
TQToolBar::paintEvent( e );
if ( e->rect() != rect() )
@@ -287,24 +287,24 @@ void QDesignerToolBar::paintEvent( TQPaintEvent *e )
lastIndicatorPos = TQPoint( -1, -1 );
}
-void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
+void TQDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
TQPopupMenu menu( 0 );
menu.insertItem( i18n("Delete Toolbar" ), 1 );
int res = menu.exec( e->globalPos() );
if ( res != -1 ) {
- RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ),
+ RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).tqarg( name() ),
formWindow, 0, this );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
}
-void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
+void TQDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
widgetInserting = false;
- if ( e->button() == LeftButton &&
+ if ( e->button() == Qt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) {
@@ -318,33 +318,33 @@ void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
}
}
-void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e )
+void TQDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
widgetInserting = false;
}
-void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
+void TQDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
- else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) {
+ else if ( w->isWidgetType() && formWindow->widgets()->tqfind( w ) ) {
formWindow->clearSelection( false );
formWindow->selectWidget( w );
}
widgetInserting = false;
}
-void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
+void TQDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
{
e->accept();
TQPopupMenu menu( 0 );
const int ID_DELETE = 1;
const int ID_SEP = 2;
const int ID_DELTOOLBAR = 3;
- TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
- if ( it != actionMap.end() && (*it)->inherits( "QSeparatorAction" ) )
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o );
+ if ( it != actionMap.end() && (*it)->inherits( "TQSeparatorAction" ) )
menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
else
menu.insertItem( i18n("Delete Item" ), ID_DELETE );
@@ -353,21 +353,21 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
menu.insertItem( i18n("Delete Toolbar" ), ID_DELTOOLBAR );
int res = menu.exec( e->globalPos() );
if ( res == ID_DELETE ) {
- TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o );
if ( it == actionMap.end() )
return;
TQAction *a = *it;
- int index = actionList.find( a );
+ int index = actionList.tqfind( a );
RemoveActionFromToolBarCommand *cmd = new RemoveActionFromToolBarCommand(
i18n("Delete Action '%1' From Toolbar '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( res == ID_SEP ) {
calcIndicatorPos( mapFromGlobal( e->globalPos() ) );
- TQAction *a = new QSeparatorAction( 0 );
- int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ TQAction *a = new TQSeparatorAction( 0 );
+ int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
if ( !insertAnchor )
@@ -380,21 +380,21 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( res == ID_DELTOOLBAR ) {
- RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).arg( name() ),
+ RemoveToolBarCommand *cmd = new RemoveToolBarCommand( i18n("Delete Toolbar '%1'" ).tqarg( name() ),
formWindow, 0, this );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
}
-void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
+void TQDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
widgetInserting = false;
- if ( e->button() == MidButton )
+ if ( e->button() == Qt::MidButton )
return;
- if ( e->button() == LeftButton &&
+ if ( e->button() == Qt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL ) {
@@ -411,16 +411,16 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
dragStartPos = e->pos();
}
-void QDesignerToolBar::removeWidget( TQWidget *w )
+void TQDesignerToolBar::removeWidget( TQWidget *w )
{
- TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( w );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( w );
if ( it == actionMap.end() )
return;
TQAction *a = *it;
- int index = actionList.find( a );
+ int index = actionList.tqfind( a );
RemoveActionFromToolBarCommand *cmd =
new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -428,22 +428,22 @@ void QDesignerToolBar::removeWidget( TQWidget *w )
adjustSize();
}
-void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
+void TQDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
{
- if ( widgetInserting || ( e->state() & LeftButton ) == 0 )
+ if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 )
return;
- if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
+ if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
- TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
+ TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.tqfind( (TQWidget*)o );
if ( it == actionMap.end() )
return;
TQAction *a = *it;
if ( !a )
return;
- int index = actionList.find( a );
+ int index = actionList.tqfind( a );
RemoveActionFromToolBarCommand *cmd =
new RemoveActionFromToolBarCommand( i18n("Delete Action '%1' From Toolbar '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -451,18 +451,18 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
adjustSize();
TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) :
- a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new TQStoredDrag( type, this );
TQString s = TQString::number( (long)a ); // #### huha, that is evil
drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( a->iconSet().pixmap() );
- if ( a->inherits( "QDesignerAction" ) ) {
- if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
- formWindow->selectWidget( ( (QDesignerAction*)a )->widget(), false );
+ if ( a->inherits( "TQDesignerAction" ) ) {
+ if ( formWindow->widgets()->tqfind( ( (TQDesignerAction*)a )->widget() ) )
+ formWindow->selectWidget( TQT_TQOBJECT(( (TQDesignerAction*)a )->widget()), false );
}
if ( !drag->drag() ) {
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -471,9 +471,9 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
indicator->hide();
}
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
-void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
+void TQDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
{
widgetInserting = false;
lastIndicatorPos = TQPoint( -1, -1 );
@@ -483,7 +483,7 @@ void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
e->accept();
}
-void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
+void TQDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -494,14 +494,14 @@ void QDesignerToolBar::dragMoveEvent( TQDragMoveEvent *e )
drawIndicator( calcIndicatorPos( e->pos() ) );
}
-void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
+void TQDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
{
indicator->hide();
insertAnchor = 0;
afterAnchor = true;
}
-void QDesignerToolBar::dropEvent( TQDropEvent *e )
+void TQDesignerToolBar::dropEvent( TQDropEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -511,15 +511,15 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e )
return;
TQString s;
if ( e->provides( "application/x-designer-actiongroup" ) )
- s = TQString( e->encodedData( "application/x-designer-actiongroup" ) );
+ s = TQString( e->tqencodedData( "application/x-designer-actiongroup" ) );
else if ( e->provides( "application/x-designer-separator" ) )
- s = TQString( e->encodedData( "application/x-designer-separator" ) );
+ s = TQString( e->tqencodedData( "application/x-designer-separator" ) );
else
- s = TQString( e->encodedData( "application/x-designer-actions" ) );
+ s = TQString( e->tqencodedData( "application/x-designer-actions" ) );
indicator->hide();
TQAction *a = 0;
- int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
if ( !insertAnchor )
@@ -527,14 +527,14 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e )
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-separator" ) ) {
if ( e->provides( "application/x-designer-actions" ) )
- a = (QDesignerAction*)s.toLong();
+ a = (TQDesignerAction*)s.toLong();
else
- a = (QSeparatorAction*)s.toLong();
+ a = (TQSeparatorAction*)s.toLong();
} else {
- a = (QDesignerActionGroup*)s.toLong();
+ a = (TQDesignerActionGroup*)s.toLong();
}
- if ( actionList.findRef( a ) != -1 ) {
+ if ( actionList.tqfindRef( a ) != -1 ) {
TQMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ),
i18n("Action '%1' has already been added to this toolbar.\n"
"An Action may only occur once in a given toolbar." ).
@@ -543,7 +543,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e )
}
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Action '%1' to Toolbar '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -553,7 +553,7 @@ void QDesignerToolBar::dropEvent( TQDropEvent *e )
#endif
-void QDesignerToolBar::reInsert()
+void TQDesignerToolBar::reInsert()
{
TQAction *a = 0;
actionMap.clear();
@@ -561,36 +561,37 @@ void QDesignerToolBar::reInsert()
for ( a = actionList.first(); a; a = actionList.next() ) {
a->addTo( this );
if ( a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ) {
- actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
- if ( ( (QDesignerActionGroup*)a )->widget() )
- ( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
- } else if ( a->inherits( "QDesignerAction" ) ) {
- actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
- ( (QDesignerAction*)a )->widget()->installEventFilter( this );
- } else if ( a->inherits( "QSeparatorAction" ) ) {
- actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
- ( (QSeparatorAction*)a )->widget()->installEventFilter( this );
+ actionMap.insert( ( (TQDesignerActionGroup*)a )->widget(), a );
+ if ( ( (TQDesignerActionGroup*)a )->widget() )
+ ( (TQDesignerActionGroup*)a )->widget()->installEventFilter( this );
+ } else if ( a->inherits( "TQDesignerAction" ) ) {
+ actionMap.insert( ( (TQDesignerAction*)a )->widget(), a );
+ ( (TQDesignerAction*)a )->widget()->installEventFilter( this );
+ } else if ( a->inherits( "TQSeparatorAction" ) ) {
+ actionMap.insert( ( (TQSeparatorAction*)a )->widget(), a );
+ ( (TQSeparatorAction*)a )->widget()->installEventFilter( this );
}
}
TQApplication::sendPostedEvents();
adjustSize();
}
-void QDesignerToolBar::actionRemoved()
+void TQDesignerToolBar::actionRemoved()
{
actionList.removeRef( (TQAction*)sender() );
}
-TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
+TQPoint TQDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
{
- if ( orientation() == Horizontal ) {
+ if ( orientation() ==Qt::Horizontal ) {
TQPoint pnt( width() - 2, 0 );
insertAnchor = 0;
afterAnchor = true;
- if ( !children() )
+ TQObjectList clo = childrenListObject();
+ if ( clo.isEmpty() )
return pnt;
pnt = TQPoint( 13, 0 );
- TQObjectListIt it( *children() );
+ TQObjectListIt it( clo );
TQObject * obj;
while( (obj=it.current()) != 0 ) {
++it;
@@ -609,10 +610,11 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
TQPoint pnt( 0, height() - 2 );
insertAnchor = 0;
afterAnchor = true;
- if ( !children() )
+ TQObjectList clo = childrenListObject();
+ if ( clo.isEmpty() )
return pnt;
pnt = TQPoint( 0, 13 );
- TQObjectListIt it( *children() );
+ TQObjectListIt it( clo );
TQObject * obj;
while( (obj=it.current()) != 0 ) {
++it;
@@ -630,12 +632,12 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
}
}
-void QDesignerToolBar::drawIndicator( const TQPoint &pos )
+void TQDesignerToolBar::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
bool wasVsisible = indicator->isVisible();
- if ( orientation() == Horizontal ) {
+ if ( orientation() ==Qt::Horizontal ) {
indicator->resize( 3, height() );
if ( pos != TQPoint( -1, -1 ) )
indicator->move( pos.x() - 1, 0 );
@@ -654,7 +656,7 @@ void QDesignerToolBar::drawIndicator( const TQPoint &pos )
TQApplication::sendPostedEvents();
}
-void QDesignerToolBar::doInsertWidget( const TQPoint &p )
+void TQDesignerToolBar::doInsertWidget( const TQPoint &p )
{
if ( formWindow != MainWindow::self->formWindow() )
return;
@@ -662,30 +664,30 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p )
TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true );
installEventFilters( w );
MainWindow::self->formWindow()->insertWidget( w, true );
- QDesignerAction *a = new QDesignerAction( w, parent() );
- int index = actionList.findRef( *actionMap.find( insertAnchor ) );
+ TQDesignerAction *a = new TQDesignerAction( w, tqparent() );
+ int index = actionList.tqfindRef( *actionMap.tqfind( insertAnchor ) );
if ( index != -1 && afterAnchor )
++index;
if ( !insertAnchor )
index = 0;
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n("Add Widget '%1' to Toolbar '%2'" ).
- arg( w->name() ).arg( caption() ),
+ tqarg( w->name() ).tqarg( caption() ),
formWindow, a, this, index );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
MainWindow::self->resetTool();
}
-void QDesignerToolBar::clear()
+void TQDesignerToolBar::clear()
{
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( a->inherits( "QDesignerAction" ) )
- ( (QDesignerAction*)a )->remove();
+ if ( a->inherits( "TQDesignerAction" ) )
+ ( (TQDesignerAction*)a )->remove();
}
TQToolBar::clear();
}
-void QDesignerToolBar::installEventFilters( TQWidget *w )
+void TQDesignerToolBar::installEventFilters( TQWidget *w )
{
if ( !w )
return;
@@ -697,32 +699,32 @@ void QDesignerToolBar::installEventFilters( TQWidget *w )
-QDesignerMenuBar::QDesignerMenuBar( TQWidget *mw )
+TQDesignerMenuBar::TQDesignerMenuBar( TQWidget *mw )
: TQMenuBar( mw, 0 )
{
show();
setAcceptDrops( true );
- MetaDataBase::addEntry( this );
+ MetaDataBase::addEntry( TQT_TQOBJECT(this) );
itemNum = 0;
mousePressed = false;
lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
- indicator = new QDesignerIndicatorWidget( this );
+ indicator = new TQDesignerIndicatorWidget( this );
indicator->hide();
findFormWindow();
}
-void QDesignerMenuBar::findFormWindow()
+void TQDesignerMenuBar::findFormWindow()
{
TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
}
-void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
+void TQDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
{
e->accept();
int itm = itemAtPos( e->pos() );
@@ -736,17 +738,17 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
menu.insertItem( i18n("Rename Item..." ), 2 );
int res = menu.exec( e->globalPos() );
if ( res == 1 ) {
- TQMenuItem *item = findItem( idAt( itm ) );
- RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).arg( item->text() ),
+ TQMenuItem *item = tqfindItem( idAt( itm ) );
+ RemoveMenuCommand *cmd = new RemoveMenuCommand( i18n("Delete Menu '%1'" ).tqarg( item->text() ),
formWindow,
- (TQMainWindow*)parentWidget(), this,
- (QDesignerPopupMenu*)item->popup(),
+ (TQMainWindow*)tqparentWidget(), this,
+ (TQDesignerPopupMenu*)item->popup(),
idAt( itm ), itm, item->text() );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- // #### need to do a proper invalidate and re-layout
- parentWidget()->layout()->invalidate();
- parentWidget()->layout()->activate();
+ // #### need to do a proper tqinvalidate and re-tqlayout
+ tqparentWidget()->tqlayout()->tqinvalidate();
+ tqparentWidget()->tqlayout()->activate();
} else if ( res == 2 ) {
bool ok;
TQString old = text( idAt( itm ) );
@@ -754,7 +756,7 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
text( idAt( itm ) ), &ok, 0 );
if ( ok ) {
RenameMenuCommand *cmd = new RenameMenuCommand(
- i18n("Rename Menu '%1' to '%2'" ).arg( old ).arg( txt ),
+ i18n("Rename Menu '%1' to '%2'" ).tqarg( old ).tqarg( txt ),
formWindow, this, idAt( itm ), old, txt );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -762,33 +764,33 @@ void QDesignerMenuBar::contextMenuEvent( TQContextMenuEvent *e )
}
}
-void QDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
+void TQDesignerMenuBar::mousePressEvent( TQMouseEvent *e )
{
lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
mousePressed = true;
- if ( e->button() == MidButton || e->button() == RightButton )
+ if ( e->button() == Qt::MidButton || e->button() == Qt::RightButton )
return;
dragStartPos = e->pos();
TQMenuBar::mousePressEvent( e );
}
-void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
+void TQDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
{
- if ( !mousePressed || e->state() == NoButton ) {
+ if ( !mousePressed || e->state() == Qt::NoButton ) {
TQMenuBar::mouseMoveEvent( e );
return;
}
- if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
+ if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
hidePopups();
activateItemAt( -1 );
int itm = itemAtPos( dragStartPos );
if ( itm == -1 )
return;
- TQPopupMenu *popup = findItem( idAt( itm ) )->popup();
- TQString txt = findItem( idAt( itm ) )->text();
+ TQPopupMenu *popup = tqfindItem( idAt( itm ) )->popup();
+ TQString txt = tqfindItem( idAt( itm ) )->text();
removeItemAt( itm );
TQStoredDrag *drag = new TQStoredDrag( "application/x-designer-menuitem", this );
@@ -812,15 +814,15 @@ void QDesignerMenuBar::mouseMoveEvent( TQMouseEvent *e )
mousePressed = false;
}
-void QDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e )
+void TQDesignerMenuBar::mouseReleaseEvent( TQMouseEvent *e )
{
TQMenuBar::mouseReleaseEvent( e );
mousePressed = false;
}
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
-void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e )
+void TQDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-actiongroup" ) ||
@@ -832,7 +834,7 @@ void QDesignerMenuBar::dragEnterEvent( TQDragEnterEvent *e )
insertAt = -1;
}
-void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
+void TQDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
{
if ( e->provides( "application/x-designer-actions" ) ||
e->provides( "application/x-designer-menuitem" ) ||
@@ -845,12 +847,12 @@ void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
e->provides( "application/x-designer-actiongroup" ) ||
e->provides( "application/x-designer-separator" ) ) {
int item = itemAtPos( e->pos() );
- bool uieffect = TQApplication::isEffectEnabled( UI_AnimateMenu );
- TQApplication::setEffectEnabled( UI_AnimateMenu, false );
- if ( !qApp->activePopupWidget() )
+ bool uieffect = TQApplication::isEffectEnabled( Qt::UI_AnimateMenu );
+ TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, false );
+ if ( !tqApp->activePopupWidget() )
actItem = -1;
activateItemAt( item );
- TQApplication::setEffectEnabled( UI_AnimateMenu, uieffect );
+ TQApplication::setEffectEnabled( Qt::UI_AnimateMenu, uieffect );
if ( item == -1 )
hidePopups();
} else {
@@ -858,28 +860,28 @@ void QDesignerMenuBar::dragMoveEvent( TQDragMoveEvent *e )
}
}
-void QDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * )
+void TQDesignerMenuBar::dragLeaveEvent( TQDragLeaveEvent * )
{
mousePressed = false;
lastIndicatorPos = TQPoint( -1, -1 );
insertAt = -1;
}
-void QDesignerMenuBar::dropEvent( TQDropEvent *e )
+void TQDesignerMenuBar::dropEvent( TQDropEvent *e )
{
mousePressed = false;
if ( !e->provides( "application/x-designer-menuitem" ) )
return;
e->accept();
- TQString s( e->encodedData( "application/x-designer-menuitem" ) );
- TQString s1 = s.left( s.find( "/" ) );
- TQString s2 = s.mid( s.find( "/" ) + 1 );
+ TQString s( e->tqencodedData( "application/x-designer-menuitem" ) );
+ TQString s1 = s.left( s.tqfind( "/" ) );
+ TQString s2 = s.mid( s.tqfind( "/" ) + 1 );
TQPopupMenu *popup = (TQPopupMenu*)s1.toLong(); // #### huha, that is evil
TQString txt = s2;
insertItem( txt, popup, -1, insertAt );
- MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).arg( txt ), formWindow,
- this, (QDesignerPopupMenu*)popup, oldPos, insertAt, txt );
+ MoveMenuCommand *cmd = new MoveMenuCommand( i18n("Move Menu '%1'" ).tqarg( txt ), formWindow,
+ this, (TQDesignerPopupMenu*)popup, oldPos, insertAt, txt );
// do not execute, we did the work already
formWindow->commandHistory()->addCommand( cmd );
@@ -888,12 +890,12 @@ void QDesignerMenuBar::dropEvent( TQDropEvent *e )
#endif
-TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos )
+TQPoint TQDesignerMenuBar::calcIndicatorPos( const TQPoint &pos )
{
int w = frameWidth();
insertAt = count();
for ( int i = 0; i < (int)count(); ++i ) {
- TQRect r = itemRect( i );
+ TQRect r = tqitemRect( i );
if ( pos.x() < w + r.width() / 2 ) {
insertAt = i;
break;
@@ -904,7 +906,7 @@ TQPoint QDesignerMenuBar::calcIndicatorPos( const TQPoint &pos )
return TQPoint( w, 0 );
}
-void QDesignerMenuBar::drawIndicator( const TQPoint &pos )
+void TQDesignerMenuBar::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
@@ -918,47 +920,47 @@ void QDesignerMenuBar::drawIndicator( const TQPoint &pos )
TQApplication::sendPostedEvents();
}
-void QDesignerMenuBar::setItemNumber( int num )
+void TQDesignerMenuBar::setItemNumber( int num )
{
itemNum = num;
}
-int QDesignerMenuBar::itemNumber() const
+int TQDesignerMenuBar::itemNumber() const
{
return itemNum;
}
-void QDesignerMenuBar::setItemText( const TQString &s )
+void TQDesignerMenuBar::setItemText( const TQString &s )
{
if ( itemNum < 0 || itemNum >= (int)count() )
return;
changeItem( idAt( itemNum ), s );
}
-TQString QDesignerMenuBar::itemText() const
+TQString TQDesignerMenuBar::itemText() const
{
if ( itemNum < 0 || (int)itemNum >= (int)count() )
- return TQString::null;
+ return TQString();
return text( idAt( itemNum ) );
}
-void QDesignerMenuBar::setItemName( const TQCString &s )
+void TQDesignerMenuBar::setItemName( const TQCString &s )
{
if ( itemNum < 0 || itemNum >= (int)count() )
return;
- findItem( idAt( itemNum ) )->popup()->setName( s );
+ tqfindItem( idAt( itemNum ) )->popup()->setName( s );
}
-TQCString QDesignerMenuBar::itemName() const
+TQCString TQDesignerMenuBar::itemName() const
{
if ( itemNum < 0 || itemNum >= (int)count() )
return "";
- return findItem( idAt( itemNum ) )->popup()->name();
+ return tqfindItem( idAt( itemNum ) )->popup()->name();
}
-QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w )
+TQDesignerPopupMenu::TQDesignerPopupMenu( TQWidget *w )
: TQPopupMenu( w, 0 ),
popupMenu( 0 )
{
@@ -967,27 +969,27 @@ QDesignerPopupMenu::QDesignerPopupMenu( TQWidget *w )
insertAt = -1;
mousePressed = false;
lastIndicatorPos = TQPoint( -1, -1 );
- indicator = new QDesignerIndicatorWidget( this );
+ indicator = new TQDesignerIndicatorWidget( this );
indicator->hide();
}
-void QDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
+void TQDesignerPopupMenu::contextMenuEvent( TQContextMenuEvent *e )
{
-#if defined( Q_WS_MAC ) //the mac needs us to use context menu rather than right click
+#if defined( TQ_WS_MAC ) //the mac needs us to use context menu rather than right click
e->accept();
- TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), RightButton, RightButton );
+ TQMouseEvent me( TQEvent::MouseButtonPress, e->pos(), e->globalPos(), Qt::RightButton, Qt::RightButton );
mousePressEvent(&me);
#else
Q_UNUSED( e );
#endif
}
-void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
+void TQDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() == MidButton )
+ if ( e->button() == Qt::MidButton )
return;
- if ( e->button() == RightButton ) {
+ if ( e->button() == Qt::RightButton ) {
// A popup for a popup, we only need one, so make sure that
// we don't create multiple. The timer keeps the event loop sane.
popupPos = e->globalPos();
@@ -1004,7 +1006,7 @@ void QDesignerPopupMenu::mousePressEvent( TQMouseEvent *e )
TQPopupMenu::mousePressEvent( e );
}
-void QDesignerPopupMenu::createPopupMenu()
+void TQDesignerPopupMenu::createPopupMenu()
{
// actually creates our popup for the popupmenu.
TQPopupMenu menu( 0 );
@@ -1016,7 +1018,7 @@ void QDesignerPopupMenu::createPopupMenu()
if ( itm == -1 )
return;
TQAction *a = actionList.at( itm );
- if ( a && a->inherits( "QSeparatorAction" ) )
+ if ( a && a->inherits( "TQSeparatorAction" ) )
menu.insertItem( i18n("Delete Separator" ), ID_DELETE );
else
menu.insertItem( i18n("Delete Item" ), ID_DELETE );
@@ -1028,35 +1030,35 @@ void QDesignerPopupMenu::createPopupMenu()
return;
RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand(
i18n("Delete Action '%1' From Popup Menu '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, itm );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( res == ID_SEP ) {
TQPoint p( pos() );
calcIndicatorPos( mapFromGlobal( popupPos ) );
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
AddActionToPopupCommand *cmd = new AddActionToPopupCommand(
i18n("Add Separator to Popup Menu '%1'" ).
arg( name() ),
formWindow, a, this, insertAt );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups();
- ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups();
+ ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 );
popup( p );
}
// set this back to zero so we know a popup (will soon) not exist.
popupMenu = 0;
}
-void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
+void TQDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
{
- if ( !mousePressed || e->state() == NoButton ) {
+ if ( !mousePressed || e->state() == Qt::NoButton ) {
TQPopupMenu::mouseMoveEvent( e );
return;
}
- if ( QABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) {
+ if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() ) {
TQPopupMenu::mouseMoveEvent( e );
return;
}
@@ -1067,20 +1069,20 @@ void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
if ( !a )
return;
RemoveActionFromPopupCommand *cmd = new RemoveActionFromPopupCommand( i18n("Delete Action '%1' From Popup Menu '%2'" ).
- arg( a->name() ).arg( caption() ),
+ tqarg( a->name() ).tqarg( caption() ),
formWindow, a, this, itm );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
TQString type = a->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? TQString( "application/x-designer-actiongroup" ) :
- a->inherits( "QSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ a->inherits( "TQSeparatorAction" ) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new TQStoredDrag( type, this );
TQString s = TQString::number( (long)a ); // #### huha, that is evil
drag->setEncodedData( TQCString( s.latin1() ) );
drag->setPixmap( a->iconSet().pixmap() );
if ( !drag->drag() ) {
AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ).
- arg( a->name() ).arg( name() ),
+ tqarg( a->name() ).tqarg( name() ),
formWindow, a, this, itm );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -1090,15 +1092,15 @@ void QDesignerPopupMenu::mouseMoveEvent( TQMouseEvent *e )
mousePressed = false;
}
-void QDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
+void TQDesignerPopupMenu::mouseReleaseEvent( TQMouseEvent *e )
{
mousePressed = false;
TQPopupMenu::mouseReleaseEvent( e );
}
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
-void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e )
+void TQDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e )
{
mousePressed = false;
lastIndicatorPos = TQPoint( -1, -1 );
@@ -1108,7 +1110,7 @@ void QDesignerPopupMenu::dragEnterEvent( TQDragEnterEvent *e )
e->accept();
}
-void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e )
+void TQDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e )
{
mousePressed = false;
if ( e->provides( "application/x-designer-actions" ) ||
@@ -1120,14 +1122,14 @@ void QDesignerPopupMenu::dragMoveEvent( TQDragMoveEvent *e )
drawIndicator( calcIndicatorPos( e->pos() ) );
}
-void QDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * )
+void TQDesignerPopupMenu::dragLeaveEvent( TQDragLeaveEvent * )
{
mousePressed = false;
indicator->hide();
insertAt = -1;
}
-void QDesignerPopupMenu::dropEvent( TQDropEvent *e )
+void TQDesignerPopupMenu::dropEvent( TQDropEvent *e )
{
mousePressed = false;
if ( e->provides( "application/x-designer-actions" ) ||
@@ -1140,20 +1142,20 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e )
TQPoint p = pos();
TQAction *a = 0;
if ( e->provides( "application/x-designer-actiongroup" ) ) {
- TQString s( e->encodedData( "application/x-designer-actiongroup" ) );
- a = (QDesignerActionGroup*)s.toLong();
+ TQString s( e->tqencodedData( "application/x-designer-actiongroup" ) );
+ a = (TQDesignerActionGroup*)s.toLong();
} else {
TQString s;
if ( e->provides( "application/x-designer-separator" ) ) {
- s = TQString( e->encodedData( "application/x-designer-separator" ) );
- a = (QSeparatorAction*)s.toLong();
+ s = TQString( e->tqencodedData( "application/x-designer-separator" ) );
+ a = (TQSeparatorAction*)s.toLong();
} else {
- s = TQString( e->encodedData( "application/x-designer-actions" ) );
- a = (QDesignerAction*)s.toLong();
+ s = TQString( e->tqencodedData( "application/x-designer-actions" ) );
+ a = (TQDesignerAction*)s.toLong();
}
}
- if ( actionList.findRef( a ) != -1 ) {
+ if ( actionList.tqfindRef( a ) != -1 ) {
TQMessageBox::warning( MainWindow::self, i18n("Insert/Move Action" ),
i18n("Action '%1' has already been added to this menu.\n"
"An Action may only occur once in a given menu." ).
@@ -1162,27 +1164,27 @@ void QDesignerPopupMenu::dropEvent( TQDropEvent *e )
}
AddActionToPopupCommand *cmd = new AddActionToPopupCommand( i18n("Add Action '%1' to Popup Menu '%2'" ).
- arg( a->name() ).arg( name() ),
+ tqarg( a->name() ).tqarg( name() ),
formWindow, a, this, insertAt );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->hidePopups();
- ( (QDesignerMenuBar*)( (TQMainWindow*)parentWidget() )->menuBar() )->activateItemAt( -1 );
+ ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->hidePopups();
+ ( (TQDesignerMenuBar*)( (TQMainWindow*)tqparentWidget() )->menuBar() )->activateItemAt( -1 );
indicator->hide();
popup( p );
}
#endif
-void QDesignerPopupMenu::reInsert()
+void TQDesignerPopupMenu::reInsert()
{
clear();
for ( TQAction *a = actionList.first(); a; a = actionList.next() )
a->addTo( this );
}
-void QDesignerPopupMenu::drawIndicator( const TQPoint &pos )
+void TQDesignerPopupMenu::drawIndicator( const TQPoint &pos )
{
if ( lastIndicatorPos == pos )
return;
@@ -1196,7 +1198,7 @@ void QDesignerPopupMenu::drawIndicator( const TQPoint &pos )
TQApplication::sendPostedEvents();
}
-TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos )
+TQPoint TQDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos )
{
int h = frameWidth();
insertAt = count();
@@ -1212,18 +1214,18 @@ TQPoint QDesignerPopupMenu::calcIndicatorPos( const TQPoint &pos )
return TQPoint( 0, h );
}
-void QDesignerPopupMenu::addAction( TQAction *a )
+void TQDesignerPopupMenu::addAction( TQAction *a )
{
actionList.append( a );
connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
}
-void QDesignerPopupMenu::actionRemoved()
+void TQDesignerPopupMenu::actionRemoved()
{
actionList.removeRef( (TQAction*)sender() );
}
-void QDesignerPopupMenu::paintEvent( TQPaintEvent *e )
+void TQDesignerPopupMenu::paintEvent( TQPaintEvent *e )
{
TQPopupMenu::paintEvent( e );
if ( e->rect() != rect() )
@@ -1231,13 +1233,13 @@ void QDesignerPopupMenu::paintEvent( TQPaintEvent *e )
lastIndicatorPos = TQPoint( -1, -1 );
}
-void QDesignerPopupMenu::findFormWindow()
+void TQDesignerPopupMenu::findFormWindow()
{
TQWidget *w = this;
while ( w ) {
if ( w->inherits( "FormWindow" ) )
formWindow = (FormWindow*)w;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
}
diff --git a/kommander/editor/actiondnd.h b/kommander/editor/actiondnd.h
index af5a76e5..5d1c314d 100644
--- a/kommander/editor/actiondnd.h
+++ b/kommander/editor/actiondnd.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -30,20 +30,21 @@
#include <tqtoolbar.h>
#include <tqguardedptr.h>
-class QDesignerPopupMenu;
-class QDesignerIndicatorWidget;
+class TQDesignerPopupMenu;
+class TQDesignerIndicatorWidget;
class FormWindow;
-class QDesignerActionGroup : public QActionGroup
+class TQDesignerActionGroup : public TQActionGroup
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerActionGroup( TQObject *parent )
- : TQActionGroup( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ) {}
+ TQDesignerActionGroup( TQObject *tqparent )
+ : TQActionGroup( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ) {}
TQWidget *widget() const { return wid; }
- TQWidget *widget( TQAction *a ) const { return *widgets.find( a ); }
+ TQWidget *widget( TQAction *a ) const { return *widgets.tqfind( a ); }
int index() const { return idx; }
protected:
@@ -64,15 +65,16 @@ private:
};
-class QDesignerAction : public QAction
+class TQDesignerAction : public TQAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerAction( TQObject *parent )
- : TQAction( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
- QDesignerAction( TQWidget *w, TQObject *parent )
- : TQAction( !parent || parent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
+ TQDesignerAction( TQObject *tqparent )
+ : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) {}
+ TQDesignerAction( TQWidget *w, TQObject *tqparent )
+ : TQAction( !tqparent || tqparent->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) ? tqparent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) {}
TQWidget *widget() const { return wid; }
int index() const { return idx; }
@@ -98,31 +100,33 @@ private:
};
-class QDesignerToolBarSeparator : public QWidget
+class TQDesignerToolBarSeparator : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerToolBarSeparator( Orientation, TQToolBar *parent, const char* name=0 );
+ TQDesignerToolBarSeparator( Qt::Orientation, TQToolBar *tqparent, const char* name=0 );
- TQSize sizeHint() const;
- Orientation orientation() const { return orient; }
+ TQSize tqsizeHint() const;
+ Qt::Orientation orientation() const { return orient; }
public slots:
- void setOrientation( Orientation );
+ void setOrientation( Qt::Orientation );
protected:
void styleChange( TQStyle& );
void paintEvent( TQPaintEvent * );
private:
- Orientation orient;
+ Qt::Orientation orient;
};
-class QSeparatorAction : public QAction
+class TQSeparatorAction : public TQAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- QSeparatorAction( TQObject *parent );
+ TQSeparatorAction( TQObject *tqparent );
bool addTo( TQWidget *w );
bool removeFrom( TQWidget *w );
@@ -135,13 +139,14 @@ private:
};
-class QDesignerToolBar : public QToolBar
+class TQDesignerToolBar : public TQToolBar
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerToolBar( TQMainWindow *mw );
- QDesignerToolBar( TQMainWindow *mw, Dock dock );
+ TQDesignerToolBar( TQMainWindow *mw );
+ TQDesignerToolBar( TQMainWindow *mw, Dock dock );
TQPtrList<TQAction> insertedActions() const { return actionList; }
void addAction( TQAction *a );
@@ -157,7 +162,7 @@ public:
protected:
bool eventFilter( TQObject *, TQEvent * );
void paintEvent( TQPaintEvent * );
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
void dragEnterEvent( TQDragEnterEvent * );
void dragMoveEvent( TQDragMoveEvent * );
void dragLeaveEvent( TQDragLeaveEvent * );
@@ -187,23 +192,24 @@ private:
TQPtrList<TQAction> actionList;
TQMap<TQWidget*, TQAction*> actionMap;
TQPoint dragStartPos;
- QDesignerIndicatorWidget *indicator;
+ TQDesignerIndicatorWidget *indicator;
bool widgetInserting;
FormWindow *formWindow;
};
-class QDesignerMenuBar : public QMenuBar
+class TQDesignerMenuBar : public TQMenuBar
{
Q_OBJECT
- friend class QDesignerPopupMenu;
+ TQ_OBJECT
+ friend class TQDesignerPopupMenu;
- Q_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber )
- Q_PROPERTY( TQString itemText WRITE setItemText READ itemText )
- Q_PROPERTY( TQCString itemName WRITE setItemName READ itemName )
+ TQ_PROPERTY( int itemNumber WRITE setItemNumber READ itemNumber )
+ TQ_PROPERTY( TQString itemText WRITE setItemText READ itemText )
+ TQ_PROPERTY( TQCString itemName WRITE setItemName READ itemName )
public:
- QDesignerMenuBar( TQWidget *mw );
+ TQDesignerMenuBar( TQWidget *mw );
void setItemNumber( int num );
int itemNumber() const;
@@ -217,7 +223,7 @@ protected:
void mouseMoveEvent( TQMouseEvent *e );
void mouseReleaseEvent( TQMouseEvent *e );
void contextMenuEvent( TQContextMenuEvent *e );
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
void dragEnterEvent( TQDragEnterEvent * );
void dragMoveEvent( TQDragMoveEvent * );
void dragLeaveEvent( TQDragLeaveEvent * );
@@ -235,18 +241,19 @@ private:
bool mousePressed;
TQPoint lastIndicatorPos;
int insertAt;
- QDesignerIndicatorWidget *indicator;
+ TQDesignerIndicatorWidget *indicator;
FormWindow *formWindow;
int oldPos;
};
-class QDesignerPopupMenu : public QPopupMenu
+class TQDesignerPopupMenu : public TQPopupMenu
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerPopupMenu( TQWidget *w );
+ TQDesignerPopupMenu( TQWidget *w );
TQPtrList<TQAction> insertedActions() const { return actionList; }
void addAction( TQAction *a );
void reInsert();
@@ -259,7 +266,7 @@ protected:
void mouseReleaseEvent( TQMouseEvent *e );
void contextMenuEvent( TQContextMenuEvent *e );
void paintEvent( TQPaintEvent * );
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
void dragEnterEvent( TQDragEnterEvent * );
void dragMoveEvent( TQDragMoveEvent * );
void dragLeaveEvent( TQDragLeaveEvent * );
@@ -281,7 +288,7 @@ private:
TQPtrList<TQAction> actionList;
TQPoint dragStartPos;
bool mousePressed;
- QDesignerIndicatorWidget *indicator;
+ TQDesignerIndicatorWidget *indicator;
FormWindow *formWindow;
TQGuardedPtr<TQPopupMenu> popupMenu;
TQPoint popupPos;
@@ -289,12 +296,13 @@ private:
};
-class QDesignerIndicatorWidget : public QWidget
+class TQDesignerIndicatorWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerIndicatorWidget( TQWidget *p )
+ TQDesignerIndicatorWidget( TQWidget *p )
: TQWidget( p, "qt_dockwidget_internal" ) {
setBackgroundColor( red );
}
diff --git a/kommander/editor/actioneditor.ui b/kommander/editor/actioneditor.ui
index 733e5b29..794849cd 100644
--- a/kommander/editor/actioneditor.ui
+++ b/kommander/editor/actioneditor.ui
@@ -2,8 +2,8 @@
<class>ActionEditorBase</class>
<include location="local" implDecl="in declaration">actioneditor.ui.h</include>
<forward>class QListViewItem;</forward>
-<layoutdefaults spacing="6" margin="11"/>
-<widget class="QWidget">
+<tqlayoutdefaults spacing="6" margin="11"/>
+<widget class="TQWidget">
<property name="name">
<cstring>ActionEditorBase</cstring>
</property>
@@ -18,7 +18,7 @@
<property name="caption">
<string>Edit Actions</string>
</property>
- <property name="layoutMargin" stdset="0">
+ <property name="tqlayoutMargin" stdset="0">
</property>
<vbox>
<property name="name">
@@ -30,7 +30,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -44,7 +44,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>buttonNewAction</cstring>
</property>
@@ -61,7 +61,7 @@
<string>Create new Action</string>
</property>
</widget>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>buttonDeleteAction</cstring>
</property>
@@ -78,7 +78,7 @@
<string>Delete current Action</string>
</property>
</widget>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>buttonConnect</cstring>
</property>
@@ -105,7 +105,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
diff --git a/kommander/editor/actioneditorimpl.cpp b/kommander/editor/actioneditorimpl.cpp
index e5358100..0e4d2a8f 100644
--- a/kommander/editor/actioneditorimpl.cpp
+++ b/kommander/editor/actioneditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -37,8 +37,8 @@
#include <klocale.h>
-ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
- : ActionEditorBase( parent, name, fl ), currentAction( 0 ), formWindow( 0 )
+ActionEditor::ActionEditor( TQWidget* tqparent, const char* name, WFlags fl )
+ : ActionEditorBase( tqparent, name, fl ), currentAction( 0 ), formWindow( 0 )
{
listActions->addColumn( i18n("Actions" ) );
setEnabled( false );
@@ -87,10 +87,10 @@ void ActionEditor::deleteAction()
formWindow->actionList().removeRef( currentAction );
delete currentAction;
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( formWindow, currentAction );
+ MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction );
for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
- MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );
delete it.current();
break;
@@ -98,10 +98,10 @@ void ActionEditor::deleteAction()
formWindow->actionList().removeRef( currentAction );
delete currentAction;
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( formWindow, currentAction );
+ MetaDataBase::connections( TQT_TQOBJECT(formWindow), currentAction );
for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
- MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );
delete it.current();
break;
@@ -110,7 +110,7 @@ void ActionEditor::deleteAction()
}
if ( formWindow )
- formWindow->setActiveObject( formWindow->mainContainer() );
+ formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) );
}
void ActionEditor::newAction()
@@ -119,7 +119,7 @@ void ActionEditor::newAction()
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
!actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
- actionParent = (ActionItem*)actionParent->parent();
+ actionParent = (ActionItem*)actionParent->tqparent();
}
ActionItem *i = 0;
@@ -151,7 +151,7 @@ void ActionEditor::newActionGroup()
if ( actionParent ) {
if ( !actionParent->actionGroup() ||
!actionParent->actionGroup()->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
- actionParent = (ActionItem*)actionParent->parent();
+ actionParent = (ActionItem*)actionParent->tqparent();
}
ActionItem *i = 0;
@@ -193,7 +193,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
setEnabled( true );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
- if ( a->parent() && a->parent()->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( a->tqparent() && a->tqparent()->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
@@ -211,9 +211,12 @@ void ActionEditor::setFormWindow( FormWindow *fw )
void ActionEditor::insertChildActions( ActionItem *i )
{
- if ( !i->actionGroup() || !i->actionGroup()->children() )
+ if ( !i->actionGroup() )
return;
- TQObjectListIt it( *i->actionGroup()->children() );
+ TQObjectList clo = i->actionGroup()->childrenListObject();
+ if (clo.isEmpty())
+ return;
+ TQObjectListIt it( clo );
while ( it.current() ) {
TQObject *o = it.current();
++it;
@@ -255,7 +258,7 @@ void ActionEditor::updateActionIcon( TQAction *a )
void ActionEditor::connectionsClicked()
{
- ConnectionEditor editor( formWindow->mainWindow(), currentAction, formWindow, formWindow );
+ ConnectionEditor editor( formWindow->mainWindow(), TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow), formWindow );
editor.exec();
}
#include "actioneditorimpl.moc"
diff --git a/kommander/editor/actioneditorimpl.h b/kommander/editor/actioneditorimpl.h
index f6436d31..40ed78ac 100644
--- a/kommander/editor/actioneditorimpl.h
+++ b/kommander/editor/actioneditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -30,9 +30,10 @@ class ActionItem;
class ActionEditor : public ActionEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ActionEditor( TQWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ActionEditor( TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
void setFormWindow( FormWindow *fw );
void updateActionName( TQAction *a );
void updateActionIcon( TQAction *a );
diff --git a/kommander/editor/actionlistview.cpp b/kommander/editor/actionlistview.cpp
index 1c764f35..20a0ee4e 100644
--- a/kommander/editor/actionlistview.cpp
+++ b/kommander/editor/actionlistview.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -24,8 +24,8 @@
#include <klocale.h>
-ActionListView::ActionListView( TQWidget *parent, const char *name )
- : TQListView( parent, name )
+ActionListView::ActionListView( TQWidget *tqparent, const char *name )
+ : TQListView( tqparent, name )
{
header()->setStretchEnabled( true );
setRootIsDecorated( true );
@@ -38,9 +38,9 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac )
: TQListViewItem( lv ), a( 0 ), g( 0 )
{
if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
- g = (QDesignerActionGroup*)ac;
+ g = (TQDesignerActionGroup*)ac;
else
- a = (QDesignerAction*)ac;
+ a = (TQDesignerAction*)ac;
setDragEnabled( true );
}
@@ -48,9 +48,9 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
: TQListViewItem( i ), a( 0 ), g( 0 )
{
if ( ac->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) )
- g = (QDesignerActionGroup*)ac;
+ g = (TQDesignerActionGroup*)ac;
else
- a = (QDesignerAction*)ac;
+ a = (TQDesignerAction*)ac;
setDragEnabled( true );
moveToEnd();
}
diff --git a/kommander/editor/actionlistview.h b/kommander/editor/actionlistview.h
index 160d2abb..53a5fda6 100644
--- a/kommander/editor/actionlistview.h
+++ b/kommander/editor/actionlistview.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -24,38 +24,39 @@
#include <tqlistview.h>
#include "actiondnd.h"
-class ActionItem : public QListViewItem
+class ActionItem : public TQListViewItem
{
public:
ActionItem( TQListView *lv, bool group )
: TQListViewItem( lv ),
- a( group ? 0 : new QDesignerAction( 0 ) ),
- g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
+ a( group ? 0 : new TQDesignerAction( 0 ) ),
+ g( group ? new TQDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
ActionItem( TQListView *lv, TQAction *ac );
ActionItem( TQListViewItem *i, TQAction *ac );
- ActionItem( ActionItem *parent, bool group = FALSE )
- : TQListViewItem( parent ),
- a( group ? 0 : new QDesignerAction( parent->actionGroup() ) ),
- g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); }
+ ActionItem( ActionItem *tqparent, bool group = FALSE )
+ : TQListViewItem( tqparent ),
+ a( group ? 0 : new TQDesignerAction( tqparent->actionGroup() ) ),
+ g( group ? new TQDesignerActionGroup( tqparent->actionGroup() ) : 0 ) { setDragEnabled( TRUE ); moveToEnd(); }
- QDesignerAction *action() const { return a; }
- QDesignerActionGroup *actionGroup() const { return g; }
+ TQDesignerAction *action() const { return a; }
+ TQDesignerActionGroup *actionGroup() const { return g; }
private:
void moveToEnd();
private:
- QDesignerAction *a;
- QDesignerActionGroup *g;
+ TQDesignerAction *a;
+ TQDesignerActionGroup *g;
};
-class ActionListView : public QListView
+class ActionListView : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ActionListView( TQWidget *parent = 0, const char *name = 0 );
+ ActionListView( TQWidget *tqparent = 0, const char *name = 0 );
protected:
TQDragObject *dragObject();
diff --git a/kommander/editor/asciivalidator.cpp b/kommander/editor/asciivalidator.cpp
index 6f63e626..947b3ec1 100644
--- a/kommander/editor/asciivalidator.cpp
+++ b/kommander/editor/asciivalidator.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -22,18 +22,18 @@
#include <tqstring.h>
-AsciiValidator::AsciiValidator( TQObject * parent, const char *name )
- : TQValidator( parent, name ), functionName( false )
+AsciiValidator::AsciiValidator( TQObject * tqparent, const char *name )
+ : TQValidator( tqparent, name ), functionName( false )
{
}
-AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *name )
- : TQValidator( parent, name ), functionName( funcName )
+AsciiValidator::AsciiValidator( bool funcName, TQObject * tqparent, const char *name )
+ : TQValidator( tqparent, name ), functionName( funcName )
{
}
-AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name )
- : TQValidator( parent, name ), functionName( false ), allowedChars( allow )
+AsciiValidator::AsciiValidator( const TQString &allow, TQObject * tqparent, const char *name )
+ : TQValidator( tqparent, name ), functionName( false ), allowedChars( allow )
{
}
@@ -67,7 +67,7 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
}
}
- if ( allowedChars.find( s[ i ] ) != -1 )
+ if ( allowedChars.tqfind( s[ i ] ) != -1 )
continue;
s[i] = '_';
diff --git a/kommander/editor/asciivalidator.h b/kommander/editor/asciivalidator.h
index 20131f01..1c1d6c2c 100644
--- a/kommander/editor/asciivalidator.h
+++ b/kommander/editor/asciivalidator.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,13 +25,14 @@
#include <tqvalidator.h>
-class AsciiValidator: public QValidator
+class AsciiValidator: public TQValidator
{
Q_OBJECT
+ TQ_OBJECT
public:
- AsciiValidator( TQObject * parent, const char *name = 0 );
- AsciiValidator( bool funcName, TQObject * parent, const char *name = 0 );
- AsciiValidator( const TQString &allow, TQObject * parent, const char *name = 0 );
+ AsciiValidator( TQObject * tqparent, const char *name = 0 );
+ AsciiValidator( bool funcName, TQObject * tqparent, const char *name = 0 );
+ AsciiValidator( const TQString &allow, TQObject * tqparent, const char *name = 0 );
~AsciiValidator();
TQValidator::State validate( TQString &, int & ) const;
diff --git a/kommander/editor/assistproc.cpp b/kommander/editor/assistproc.cpp
index f5f765d8..bfe67544 100644
--- a/kommander/editor/assistproc.cpp
+++ b/kommander/editor/assistproc.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -19,8 +19,8 @@
**********************************************************************/
#include "assistproc.h"
-AssistProc::AssistProc( TQObject *parent, const char *name, const TQString &path )
- : TQProcess( parent, name )
+AssistProc::AssistProc( TQObject *tqparent, const char *name, const TQString &path )
+ : TQProcess( tqparent, name )
{
assistantPath = path;
connect( this, TQT_SIGNAL(readyReadStdout()), this, TQT_SLOT(processOutput()) );
diff --git a/kommander/editor/assistproc.h b/kommander/editor/assistproc.h
index f457a8e8..93986cef 100644
--- a/kommander/editor/assistproc.h
+++ b/kommander/editor/assistproc.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,13 +25,14 @@
#include <tqsocket.h>
#include <tqstring.h>
-class AssistProc : public QProcess
+class AssistProc : public TQProcess
{
Q_OBJECT
+ TQ_OBJECT
public:
- AssistProc( TQObject *parent=0, const char * name = 0, const TQString &path = TQString::null );
+ AssistProc( TQObject *tqparent=0, const char * name = 0, const TQString &path = TQString() );
~AssistProc();
- bool run( const TQString &path = TQString::null );
+ bool run( const TQString &path = TQString() );
public slots:
bool sendRequest( const TQString &data );
diff --git a/kommander/editor/assoctexteditor.ui b/kommander/editor/assoctexteditor.ui
index e3258b73..c7af592a 100644
--- a/kommander/editor/assoctexteditor.ui
+++ b/kommander/editor/assoctexteditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AssocTextEditorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>AssocTextEditorBase</cstring>
</property>
@@ -19,15 +19,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout5</cstring>
+ <cstring>tqlayout5</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -38,7 +38,7 @@
<cstring>widgetsComboBox</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>widgetsComboBox</cstring>
</property>
@@ -51,7 +51,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>treeWidgetButton</cstring>
</property>
@@ -59,7 +59,7 @@
<string>...</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -70,7 +70,7 @@
<cstring>stateComboBox</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>stateComboBox</cstring>
</property>
@@ -85,7 +85,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -114,14 +114,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel3</cstring>
</property>
@@ -140,7 +140,7 @@
<cstring>widgetComboBox</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<property name="name">
<cstring>widgetComboBox</cstring>
</property>
@@ -152,7 +152,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
@@ -169,14 +169,14 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>filePushButton</cstring>
</property>
@@ -186,7 +186,7 @@
</widget>
</hbox>
</widget>
- <widget class="QFrame" row="1" column="0">
+ <widget class="TQFrame" row="1" column="0">
<property name="name">
<cstring>editorFrame</cstring>
</property>
@@ -215,8 +215,8 @@
<slot>AssocTextEditorBase_destroyed(QObject*)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>AssocTextEditorBase_destroyed(QObject*)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/assoctexteditorimpl.cpp b/kommander/editor/assoctexteditorimpl.cpp
index cb5502a2..76bf67f6 100644
--- a/kommander/editor/assoctexteditorimpl.cpp
+++ b/kommander/editor/assoctexteditorimpl.cpp
@@ -70,7 +70,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
// text editor
/* associatedTextEdit->setFont(KGlobalSettings::fixedFont());
associatedTextEdit->setTabStopWidth(associatedTextEdit->fontMetrics().maxWidth() * 3);
- associatedTextEdit->setTextFormat(Qt::PlainText);*/
+ associatedTextEdit->setTextFormat(TQt::PlainText);*/
// icon for non-empty scripts
scriptPixmap = KGlobal::iconLoader()->loadIcon("source", KIcon::Small);
@@ -89,10 +89,10 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
break;
}
- doc = KTextEditor::createDocument ("libkatepart", a_parent, "KTextEditor::Document");
- TQGridLayout *layout = new TQGridLayout(editorFrame, 1, 1);
+ doc = KTextEditor::createDocument ("libkatepart", TQT_TQOBJECT(a_parent), "KTextEditor::Document");
+ TQGridLayout *tqlayout = new TQGridLayout(editorFrame, 1, 1);
view = doc->createView(editorFrame);
- layout->addWidget(view, 1,1);
+ tqlayout->addWidget(view, 1,1);
partManager->addPart(doc, true);
//trick to import all the KatePart actions into the dialog
@@ -113,7 +113,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
if (a)
a->plug(popup);
popup->insertSeparator();
- a = view->actionCollection()->action("edit_find");
+ a = view->actionCollection()->action("edit_tqfind");
if (a)
a->plug(popup);
a = view->actionCollection()->action("edit_find_next");
@@ -122,7 +122,7 @@ AssocTextEditor::AssocTextEditor(TQWidget *a_widget, FormWindow* a_form,
a = view->actionCollection()->action("edit_find_prev");
if (a)
a->plug(popup);
- a = view->actionCollection()->action("edit_replace");
+ a = view->actionCollection()->action("edit_tqreplace");
if (a)
a->plug(popup);
popup->insertSeparator();
@@ -208,7 +208,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget)
++at_it;
}
else
- m_atdict[(*s_it)] = TQString::null;
+ m_atdict[(*s_it)] = TQString();
}
m_populationText = a_atw->populationText();
@@ -246,7 +246,7 @@ void AssocTextEditor::setWidget(TQWidget *a_widget)
undoIf->clearUndo();
- if (openedWidgets.contains(m_widget))
+ if (openedWidgets.tqcontains(m_widget))
{
if (readOnlyAction && !readOnly)
readOnlyAction->activate();
@@ -268,23 +268,23 @@ void AssocTextEditor::save() const
if (atw->associatedText() != associatedText())
{
- TQString text = i18n("Set the \'text association\' of \'%1\'").arg(m_widget->name());
+ TQString text = i18n("Set the \'text association\' of \'%1\'").tqarg(m_widget->name());
SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow,
- m_widget, m_propertyEditor, "associations", atw->associatedText(),
- associatedText(), TQString::null, TQString::null, false);
+ TQT_TQOBJECT(m_widget), m_propertyEditor, "associations", atw->associatedText(),
+ associatedText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(m_widget, "associations", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "associations", true);
}
if (atw->populationText() != populationText())
{
- TQString text = i18n("Set the \'population text\' of \'%1\'").arg(m_widget->name());
- SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, m_widget,
+ TQString text = i18n("Set the \'population text\' of \'%1\'").tqarg(m_widget->name());
+ SetPropertyCommand *cmd = new SetPropertyCommand(text, m_formWindow, TQT_TQOBJECT(m_widget),
m_propertyEditor, "populationText", atw->populationText(),
- populationText(), TQString::null, TQString::null, false);
+ populationText(), TQString(), TQString(), false);
cmd->execute();
m_formWindow->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(m_widget, "populationText", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(m_widget), "populationText", true);
}
}
@@ -305,7 +305,7 @@ TQString AssocTextEditor::populationText() const
TQStringList AssocTextEditor::buildWidgetList()
{
TQStringList widgetList;
- TQObject* thisObject = m_formWindow->mainContainer();
+ TQObject* thisObject = TQT_TQOBJECT(m_formWindow->mainContainer());
TQObjectList *objectList = thisObject->queryList();
objectList->prepend(thisObject);
@@ -314,10 +314,10 @@ TQStringList AssocTextEditor::buildWidgetList()
// There is a warning message with the property() function if it does not exist.
// Verify the property exists with the meta information first */
bool pExists = false;
- TQMetaObject *metaObj = it.current()->metaObject();
+ TQMetaObject *metaObj = it.current()->tqmetaObject();
if(metaObj)
{
- int id = metaObj->findProperty("KommanderWidget", true);
+ int id = metaObj->tqfindProperty("KommanderWidget", true);
const TQMetaProperty *metaProp = metaObj->property(id, true);
if(metaProp && metaProp->isValid())
pExists = true;
@@ -363,7 +363,7 @@ void AssocTextEditor::stateChanged(int a_index)
{
if (hlIf->hlModeSectionName(i) == "Scripts")
highlightPopup->insertItem(hlIf->hlModeName(i), i);
- if (hlIf->hlModeName(i).contains(hlType, false) > 0)
+ if (hlIf->hlModeName(i).tqcontains(hlType, false) > 0)
{
hlIf->setHlMode(i);
highlightPopup->setItemChecked(i, true);
@@ -427,7 +427,7 @@ void AssocTextEditor::insertFile()
TQFile insertFile(fileName);
if(!insertFile.open(IO_ReadOnly))
{
- KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").arg( fileName ) );
+ KMessageBox::error( this, i18n("<qt>Cannot open file<br><b>%1</b></qt").tqarg( fileName ) );
return;
}
TQTextStream insertStream(&insertFile);
@@ -454,9 +454,9 @@ void AssocTextEditor::insertFunction()
TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted)
{
if (!widget)
- return TQString::null;
+ return TQString();
else if (formatted)
- return TQString("%1 (%2)").arg(widget->name()).arg(widget->className());
+ return TQString("%1 (%2)").tqarg(widget->name()).tqarg(widget->className());
else
return widget->name();
}
@@ -464,7 +464,7 @@ TQString AssocTextEditor::widgetToString(TQWidget* widget, bool formatted)
TQWidget* AssocTextEditor::widgetFromString(const TQString& name)
{
TQString realname = name;
- int i = realname.find(' ');
+ int i = realname.tqfind(' ');
if (i != -1)
realname.truncate(i);
return m_widgetList[realname];
diff --git a/kommander/editor/assoctexteditorimpl.h b/kommander/editor/assoctexteditorimpl.h
index 37c582ab..c9539450 100644
--- a/kommander/editor/assoctexteditorimpl.h
+++ b/kommander/editor/assoctexteditorimpl.h
@@ -49,6 +49,7 @@ class KPopupMenu;
class AssocTextEditor : public AssocTextEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
AssocTextEditor(TQWidget*, FormWindow*, PropertyEditor*, KParts::PartManager *partManager, TQWidget*, const char* = 0, bool = true);
~AssocTextEditor();
diff --git a/kommander/editor/choosewidget.ui b/kommander/editor/choosewidget.ui
index 809f38ea..19c728f9 100644
--- a/kommander/editor/choosewidget.ui
+++ b/kommander/editor/choosewidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>ChooseWidgetBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ChooseWidgetBase</cstring>
</property>
@@ -22,9 +22,9 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
@@ -40,14 +40,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -64,7 +64,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -88,7 +88,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -102,15 +102,15 @@
<cstring>widgetView</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0">
+ <widget class="TQLayoutWidget" row="1" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -118,7 +118,7 @@
<string>Find:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>nameEdit</cstring>
</property>
@@ -143,7 +143,7 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/kommander/editor/choosewidgetimpl.cpp b/kommander/editor/choosewidgetimpl.cpp
index 527137b4..4fe816e2 100644
--- a/kommander/editor/choosewidgetimpl.cpp
+++ b/kommander/editor/choosewidgetimpl.cpp
@@ -55,7 +55,7 @@ void ChooseWidget::setWidget(TQWidget* w)
TQPtrStack<TQWidget> p_widgets;
TQPtrStack<TQListViewItem> p_items;
- item = new TQListViewItem(widgetView, TQString("%1 (%2)").arg(w->name()).arg(w->className()));
+ item = new TQListViewItem(widgetView, TQString("%1 (%2)").tqarg(w->name()).tqarg(w->className()));
item->setOpen(true);
p_widgets.push(w);
@@ -68,8 +68,8 @@ void ChooseWidget::setWidget(TQWidget* w)
for (TQObjectListIt it(*objectList); it.current(); ++it) {
TQListViewItem* newItem = item;
if (isKommanderWidget(*it))
- newItem = new TQListViewItem(item, TQString("%1 (%2)").arg((*it)->name()).arg((*it)->className()));
- if ((*it)->children()) {
+ newItem = new TQListViewItem(item, TQString("%1 (%2)").tqarg((*it)->name()).tqarg((*it)->className()));
+ if (!(*it)->childrenListObject().isEmpty()) {
p_widgets.push((TQWidget*)(*it));
p_items.push(newItem);
}
@@ -88,12 +88,12 @@ TQString ChooseWidget::selection()
if (widgetView->currentItem())
return widgetView->currentItem()->text(0);
else
- return TQString::null;
+ return TQString();
}
void ChooseWidget::textChanged(const TQString& text)
{
- TQListViewItem* item = widgetView->findItem(text, 0, Qt::BeginsWith);
+ TQListViewItem* item = widgetView->tqfindItem(text, 0, TQt::BeginsWith);
if (item) {
widgetView->setCurrentItem(item);
widgetView->ensureItemVisible(item);
@@ -103,10 +103,10 @@ void ChooseWidget::textChanged(const TQString& text)
bool ChooseWidget::isKommanderWidget(TQObject* w)
{
bool pExists = false;
- TQMetaObject *metaObj = w->metaObject();
+ TQMetaObject *metaObj = w->tqmetaObject();
if (metaObj)
{
- int id = metaObj->findProperty("KommanderWidget", true);
+ int id = metaObj->tqfindProperty("KommanderWidget", true);
const TQMetaProperty *metaProp = metaObj->property(id, true);
if (metaProp && metaProp->isValid())
pExists = true;
diff --git a/kommander/editor/choosewidgetimpl.h b/kommander/editor/choosewidgetimpl.h
index 4dea4c77..4c2bbd45 100644
--- a/kommander/editor/choosewidgetimpl.h
+++ b/kommander/editor/choosewidgetimpl.h
@@ -22,10 +22,11 @@
class ChooseWidget : public ChooseWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ChooseWidget(TQWidget*, const char* = 0, bool=true);
~ChooseWidget();
- // Put current widget and all of its children in a tree
+ // Put current widget and all of its tqchildren in a tree
void setWidget(TQWidget *);
// Return current widget
TQString selection();
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp
index a0f8ec37..a549c915 100644
--- a/kommander/editor/command.cpp
+++ b/kommander/editor/command.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -43,7 +43,7 @@
#include <tqmultilineedit.h>
#include <tqptrstack.h>
#include <tqheader.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
#include <tqaction.h>
@@ -235,8 +235,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 );
}
@@ -244,8 +244,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 );
}
@@ -253,32 +253,32 @@ 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()->selectWidget( TQT_TQOBJECT(widget), false );
formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@@ -312,13 +312,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 );
}
@@ -326,20 +326,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 );
}
@@ -347,7 +347,7 @@ void MoveCommand::unexecute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( w );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
}
}
@@ -369,13 +369,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 );
}
}
@@ -395,11 +395,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 );
}
}
@@ -430,7 +430,7 @@ void SetPropertyCommand::execute()
if ( isResetCommand ) {
MetaDataBase::setPropertyChanged( widget, propName, false );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
- if ( !formWindow()->isWidgetSelected( widget ) && widget != formWindow() )
+ if ( !formWindow()->isWidgetSelected( widget ) && TQT_BASE_OBJECT(widget) != TQT_BASE_OBJECT(formWindow()) )
formWindow()->selectWidget( widget );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );
@@ -461,7 +461,7 @@ bool SetPropertyCommand::canMerge( Command *c )
{
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
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;
@@ -516,8 +516,8 @@ bool SetPropertyCommand::checkProperty()
return false;
}
- if ( widget->parent() && widget->parent()->inherits( "FormWindow" ) )
- formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)widget )->parentWidget() );
+ if ( widget->tqparent() && widget->tqparent()->inherits( "FormWindow" ) )
+ formWindow()->mainWindow()->formNameChanged( (FormWindow*)( (TQWidget*)widget )->tqparentWidget() );
}
return true;
}
@@ -532,30 +532,30 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
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" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), v.toInt() );
- } else if ( propName == "layoutMargin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ), v.toInt() );
+ widget->setProperty( "tqalignment", TQVariant( align ) );
+ } else if ( propName == "tqlayoutSpacing" ) {
+ MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() );
+ } else if ( propName == "tqlayoutMargin" ) {
+ MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), v.toInt() );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -567,7 +567,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*)widget, MetaDataBase::fakeProperty( widget, "database" ).toStringList() );
#endif
@@ -587,9 +587,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*)widget, v.toCursor() );
if ( propName == "name" && widget->isWidgetType() ) {
@@ -628,156 +628,156 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
// ------------------------------------------------------------
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, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
+ tqlayout = new HorizontalLayout( wl, tqlayoutBase, fw, tqlayoutBase, false, tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
+ tqlayout = new VerticalLayout( wl, tqlayoutBase, fw, tqlayoutBase, false, tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) );
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 );
}
// ------------------------------------------------------------
@@ -806,19 +806,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, "tab" );
+ tabPage = new TQDesignerWidget( formWindow(), tabWidget, "tab" );
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 );
}
@@ -826,7 +826,7 @@ void AddTabPageCommand::unexecute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -837,10 +837,10 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
TQToolBox *tw, const TQString &_label )
: Command( n, fw ), toolBox( tw ), label( _label )
{
- page = new QDesignerWidget( formWindow(), toolBox, "tab" );
+ page = new TQDesignerWidget( formWindow(), toolBox, "tab" );
page->hide();
index = -1;
- MetaDataBase::addEntry( page );
+ MetaDataBase::addEntry( TQT_TQOBJECT(page) );
}
void AddToolBoxPageCommand::execute()
@@ -849,7 +849,7 @@ void AddToolBoxPageCommand::execute()
index = ( (EditorToolBox*)toolBox)->count();
toolBox->insertItem(index, page, label);
toolBox->setCurrentItem( page );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -857,7 +857,7 @@ void AddToolBoxPageCommand::unexecute()
{
toolBox->removeItem( page );
page->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -873,19 +873,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 );
}
@@ -895,15 +895,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 );
}
@@ -911,7 +911,7 @@ 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 );
}
@@ -929,7 +929,7 @@ void DeleteToolBoxPageCommand::execute()
{
toolBox->removeItem( page );
page->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -937,7 +937,7 @@ void DeleteToolBoxPageCommand::unexecute()
{
toolBox->insertItem(index, page, label);
toolBox->setCurrentItem( page );
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( toolBox );
}
@@ -947,11 +947,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, "page" );
+ page = new TQDesignerWidget( formWindow(), wizard, "page" );
page->hide();
index = i;
show = s;
- MetaDataBase::addEntry( page );
+ MetaDataBase::addEntry( TQT_TQOBJECT(page) );
}
void AddWizardPageCommand::execute()
@@ -960,8 +960,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 );
}
@@ -969,7 +969,7 @@ void AddWizardPageCommand::unexecute()
{
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -988,7 +988,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 );
}
@@ -996,8 +996,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 );
}
@@ -1017,7 +1017,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label );
label = oldLabel;
- formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
+ formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
}
void RenameWizardPageCommand::unexecute()
@@ -1042,7 +1042,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 );
}
@@ -1061,7 +1061,7 @@ 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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1074,7 +1074,7 @@ void AddConnectionCommand::execute()
void AddConnectionCommand::unexecute()
{
- MetaDataBase::removeConnection( formWindow(), connection.sender,
+ MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1095,7 +1095,7 @@ 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 );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1108,7 +1108,7 @@ void RemoveConnectionCommand::execute()
void RemoveConnectionCommand::unexecute()
{
- MetaDataBase::addConnection( formWindow(), connection.sender,
+ MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
connection.signal, connection.receiver, connection.slot );
#ifndef KOMMANDER
if ( connection.receiver == formWindow()->mainContainer() )
@@ -1131,7 +1131,7 @@ AddSlotCommand::AddSlotCommand( const TQString &name, FormWindow *fw, const TQCS
void AddSlotCommand::execute()
{
- MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
+ MetaDataBase::addSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1141,7 +1141,7 @@ void AddSlotCommand::execute()
void AddSlotCommand::unexecute()
{
- MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
+ MetaDataBase::removeSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1160,7 +1160,7 @@ RemoveSlotCommand::RemoveSlotCommand( const TQString &name, FormWindow *fw, cons
void RemoveSlotCommand::execute()
{
- MetaDataBase::removeSlot( formWindow(), slot, specifier, access, language, returnType );
+ MetaDataBase::removeSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1170,7 +1170,7 @@ void RemoveSlotCommand::execute()
void RemoveSlotCommand::unexecute()
{
- MetaDataBase::addSlot( formWindow(), slot, specifier, access, language, returnType );
+ MetaDataBase::addSlot( TQT_TQOBJECT(formWindow()), slot, specifier, access, language, returnType );
#ifndef KOMMANDER
formWindow()->mainWindow()->slotsChanged();
#endif
@@ -1238,7 +1238,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 );
}
@@ -1248,7 +1248,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 );
}
@@ -1331,7 +1331,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;
@@ -1345,7 +1345,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;
@@ -1356,7 +1356,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;
@@ -1417,7 +1417,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 )
@@ -1434,7 +1434,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 );
@@ -1454,7 +1454,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();
@@ -1490,21 +1490,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) );
}
// ------------------------------------------------------------
@@ -1514,15 +1514,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 ) {
@@ -1537,7 +1537,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;
@@ -1546,7 +1546,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 )
@@ -1556,7 +1556,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;
@@ -1565,7 +1565,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 )
@@ -1576,7 +1576,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 )
{
}
@@ -1585,25 +1585,25 @@ void AddActionToToolBarCommand::execute()
{
action->addTo( toolBar );
- if ( action->inherits( "QDesignerAction" ) ) {
- TQString s = ( (QDesignerAction*)action )->widget()->name();
+ if ( action->inherits( "TQDesignerAction" ) ) {
+ 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 );
}
}
- if ( action->inherits( "QDesignerAction" ) ) {
- toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
- ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
- } else if ( action->inherits( "QDesignerActionGroup" ) ) {
- if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
- toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
- ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
+ if ( action->inherits( "TQDesignerAction" ) ) {
+ toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action );
+ ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( action->inherits( "TQDesignerActionGroup" ) ) {
+ if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) {
+ toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action );
+ ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
}
- } else if ( action->inherits( "QSeparatorAction" ) ) {
- toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
- ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( action->inherits( "TQSeparatorAction" ) ) {
+ toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action );
+ ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
@@ -1613,8 +1613,9 @@ void AddActionToToolBarCommand::execute()
toolBar->reInsert();
TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
} else {
- TQObjectListIt it( *action->children() );
- if ( action->children() ) {
+ TQObjectList clo = action->childrenListObject();
+ if (!clo.isEmpty()) {
+ TQObjectListIt it( clo );
int i = 0;
while ( it.current() ) {
TQObject *o = it.current();
@@ -1622,8 +1623,8 @@ void AddActionToToolBarCommand::execute()
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
// ### fix it for nested actiongroups
- if ( o->inherits( "QDesignerAction" ) ) {
- QDesignerAction *ac = (QDesignerAction*)o;
+ if ( o->inherits( "TQDesignerAction" ) ) {
+ TQDesignerAction *ac = (TQDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar );
if ( index == -1 )
@@ -1640,10 +1641,10 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute()
{
- if ( action->inherits( "QDesignerAction" ) ) {
- TQString s = ( (QDesignerAction*)action )->widget()->name();
+ if ( action->inherits( "TQDesignerAction" ) ) {
+ TQString s = ( (TQDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
- ( (QDesignerAction*)action )->widget()->setName( s );
+ ( (TQDesignerAction*)action )->widget()->setName( s );
}
toolBar->removeAction( action );
@@ -1652,14 +1653,15 @@ void AddActionToToolBarCommand::unexecute()
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (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 ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- if ( o->inherits( "QDesignerAction" ) ) {
+ if ( o->inherits( "TQDesignerAction" ) ) {
o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o );
}
@@ -1671,7 +1673,7 @@ void AddActionToToolBarCommand::unexecute()
// ------------------------------------------------------------
AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerPopupMenu *p, int idx )
+ TQAction *a, TQDesignerPopupMenu *p, int idx )
: Command( n, fw ), action( a ), popup( p ), index( idx )
{
}
@@ -1684,15 +1686,16 @@ void AddActionToPopupCommand::execute()
popup->insertAction( index, action );
} else {
action->addTo( popup );
- 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 ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- QDesignerAction *ac = (QDesignerAction*)o;
+ TQDesignerAction *ac = (TQDesignerAction*)o;
popup->insertAction( index + (i++), ac );
}
}
@@ -1700,7 +1703,7 @@ void AddActionToPopupCommand::execute()
popup->reInsert();
TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
} else {
- if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) {
+ if ( !action->inherits( "TQDesignerAction" ) || ( (TQDesignerAction*)action )->supportsMenu() ) {
action->addTo( popup );
popup->insertAction( index, action );
popup->reInsert();
@@ -1717,14 +1720,15 @@ void AddActionToPopupCommand::unexecute()
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( popup );
} 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 ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- if ( o->inherits( "QDesignerAction" ) ) {
+ if ( o->inherits( "TQDesignerAction" ) ) {
o->removeEventFilter( popup );
popup->removeAction( (TQAction*)o );
}
@@ -1744,21 +1748,21 @@ void AddMenuCommand::execute()
{
if ( !popup ) {
TQString n = "PopupMenu";
- popup = new QDesignerPopupMenu( mainWindow );
- formWindow()->unify( popup, n, true );
+ popup = new TQDesignerPopupMenu( mainWindow );
+ formWindow()->unify( TQT_TQOBJECT(popup), n, true );
popup->setName( n );
}
if ( !mainWindow->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) ) {
- menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow );
+ menuBar = new TQDesignerMenuBar( (TQWidget*)mainWindow );
menuBar->setName( "menubar" );
} else {
- menuBar = (QDesignerMenuBar*)mainWindow->menuBar();
+ menuBar = (TQDesignerMenuBar*)mainWindow->menuBar();
}
if ( id == -1 )
id = mainWindow->menuBar()->insertItem( name, popup );
else
id = mainWindow->menuBar()->insertItem( name, popup, id, index );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
void AddMenuCommand::unexecute()
@@ -1766,12 +1770,12 @@ void AddMenuCommand::unexecute()
if ( !popup || !menuBar )
return;
menuBar->removeItem( id );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
// ------------------------------------------------------------
-RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
int i, const TQString &on, const TQString &nn )
: Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn )
{
@@ -1780,19 +1784,19 @@ RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesign
void RenameMenuCommand::execute()
{
menuBar->changeItem( id, newName );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
void RenameMenuCommand::unexecute()
{
menuBar->changeItem( id, oldName );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
// ------------------------------------------------------------
-MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
- QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt )
+MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
+ TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt )
: Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt )
{
}
@@ -1801,14 +1805,14 @@ void MoveMenuCommand::execute()
{
menuBar->removeItem( menuBar->idAt( fromIdx ) );
menuBar->insertItem( text, popup, -1, toIdx );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
void MoveMenuCommand::unexecute()
{
menuBar->removeItem( menuBar->idAt( toIdx ) );
menuBar->insertItem( text, popup, -1, fromIdx );
- formWindow()->killAccels( formWindow() );
+ formWindow()->killAccels( TQT_TQOBJECT(formWindow()) );
}
// ------------------------------------------------------------
@@ -1821,9 +1825,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 {
diff --git a/kommander/editor/command.h b/kommander/editor/command.h
index a2162dca..3fd83e1c 100644
--- a/kommander/editor/command.h
+++ b/kommander/editor/command.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -44,13 +44,13 @@ class TQIconView;
class TQMultiLineEdit;
class TQTable;
class TQAction;
-class QDesignerToolBar;
+class TQDesignerToolBar;
class TQMainWindow;
-class QDesignerPopupMenu;
-class QDesignerMenuBar;
+class TQDesignerPopupMenu;
+class TQDesignerMenuBar;
class TQToolBox;
-class Command : public Qt
+class Command : public TQt
{
public:
Command( const TQString &n, FormWindow *fw );
@@ -120,9 +120,10 @@ private:
};
-class CommandHistory : public QObject
+class CommandHistory : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
CommandHistory( int s );
@@ -180,7 +181,7 @@ public:
private:
TQWidget *widget;
- TQRect geometry;
+ TQRect tqgeometry;
};
@@ -254,7 +255,7 @@ class LayoutHorizontalCommand : public Command
{
public:
LayoutHorizontalCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl );
void execute();
@@ -262,7 +263,7 @@ public:
Type type() const { return LayoutHorizontal; }
private:
- HorizontalLayout layout;
+ HorizontalLayout tqlayout;
};
@@ -270,7 +271,7 @@ class LayoutHorizontalSplitCommand : public Command
{
public:
LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl );
void execute();
@@ -278,7 +279,7 @@ public:
Type type() const { return LayoutHorizontalSplitter; }
private:
- HorizontalLayout layout;
+ HorizontalLayout tqlayout;
};
@@ -286,7 +287,7 @@ class LayoutVerticalCommand : public Command
{
public:
LayoutVerticalCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl );
void execute();
@@ -294,7 +295,7 @@ public:
Type type() const { return LayoutVertical; }
private:
- VerticalLayout layout;
+ VerticalLayout tqlayout;
};
@@ -302,7 +303,7 @@ class LayoutVerticalSplitCommand : public Command
{
public:
LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl );
void execute();
@@ -310,7 +311,7 @@ public:
Type type() const { return LayoutVerticalSplitter; }
private:
- VerticalLayout layout;
+ VerticalLayout tqlayout;
};
@@ -318,7 +319,7 @@ class LayoutGridCommand : public Command
{
public:
LayoutGridCommand( const TQString &n, FormWindow *fw,
- TQWidget *parent, TQWidget *layoutBase,
+ TQWidget *tqparent, TQWidget *tqlayoutBase,
const TQWidgetList &wl, int xres, int yres );
void execute();
@@ -326,7 +327,7 @@ public:
Type type() const { return LayoutGrid; }
private:
- GridLayout layout;
+ GridLayout tqlayout;
};
@@ -334,14 +335,14 @@ class BreakLayoutCommand : public Command
{
public:
BreakLayoutCommand( const TQString &n, FormWindow *fw,
- TQWidget *layoutBase, const TQWidgetList &wl );
+ TQWidget *tqlayoutBase, const TQWidgetList &wl );
void execute();
void unexecute();
Type type() const { return BreakLayout; }
private:
- Layout *layout;
+ Layout *tqlayout;
int spacing;
int margin;
TQWidget *lb;
@@ -658,7 +659,7 @@ public:
{
TQString text;
TQPixmap pix;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Item & ) const { return FALSE; }
#endif
};
@@ -684,7 +685,7 @@ public:
{
TQString text;
TQPixmap pix;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Item & ) const { return FALSE; }
#endif
};
@@ -744,7 +745,7 @@ public:
{
TQString text;
TQPixmap pix;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Row& ) const { return FALSE; }
#endif
};
@@ -754,7 +755,7 @@ public:
TQString text;
TQPixmap pix;
TQString field;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Column& ) const { return FALSE; }
#endif
};
@@ -778,7 +779,7 @@ class AddActionToToolBarCommand : public Command
{
public:
AddActionToToolBarCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerToolBar *tb, int idx );
+ TQAction *a, TQDesignerToolBar *tb, int idx );
void execute();
void unexecute();
@@ -786,7 +787,7 @@ public:
private:
TQAction *action;
- QDesignerToolBar *toolBar;
+ TQDesignerToolBar *toolBar;
int index;
};
@@ -795,7 +796,7 @@ class RemoveActionFromToolBarCommand : public AddActionToToolBarCommand
{
public:
RemoveActionFromToolBarCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerToolBar *tb, int idx )
+ TQAction *a, TQDesignerToolBar *tb, int idx )
: AddActionToToolBarCommand( n, fw, a, tb, idx ) {}
void execute() { AddActionToToolBarCommand::unexecute(); }
@@ -808,7 +809,7 @@ class AddActionToPopupCommand : public Command
{
public:
AddActionToPopupCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerPopupMenu *p, int idx );
+ TQAction *a, TQDesignerPopupMenu *p, int idx );
void execute();
void unexecute();
@@ -816,7 +817,7 @@ public:
private:
TQAction *action;
- QDesignerPopupMenu *popup;
+ TQDesignerPopupMenu *popup;
int index;
};
@@ -825,7 +826,7 @@ class RemoveActionFromPopupCommand : public AddActionToPopupCommand
{
public:
RemoveActionFromPopupCommand( const TQString &n, FormWindow *fw,
- TQAction *a, QDesignerPopupMenu *p, int idx )
+ TQAction *a, TQDesignerPopupMenu *p, int idx )
: AddActionToPopupCommand( n, fw, a, p, idx ) {}
void execute() { AddActionToPopupCommand::unexecute(); }
@@ -844,8 +845,8 @@ public:
Type type() const { return AddMenu; }
protected:
- QDesignerMenuBar *menuBar;
- QDesignerPopupMenu *popup;
+ TQDesignerMenuBar *menuBar;
+ TQDesignerPopupMenu *popup;
TQMainWindow *mainWindow;
int id;
int index;
@@ -857,7 +858,7 @@ class RemoveMenuCommand : public AddMenuCommand
{
public:
RemoveMenuCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw,
- QDesignerMenuBar *mb, QDesignerPopupMenu *p, int i, int idx, const TQString &mn )
+ TQDesignerMenuBar *mb, TQDesignerPopupMenu *p, int i, int idx, const TQString &mn )
: AddMenuCommand( n, fw, mw ) { menuBar = mb; popup = p; id = i; index = idx, name = mn; }
void execute() { AddMenuCommand::unexecute(); }
@@ -869,7 +870,7 @@ public:
class RenameMenuCommand : public Command
{
public:
- RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
int i, const TQString &on, const TQString &nn );
void execute();
@@ -877,7 +878,7 @@ public:
Type type() const { return RenameMenu; }
private:
- QDesignerMenuBar *menuBar;
+ TQDesignerMenuBar *menuBar;
int id;
TQString oldName, newName;
@@ -886,16 +887,16 @@ private:
class MoveMenuCommand : public Command
{
public:
- MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
- QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt );
+ MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
+ TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt );
void execute();
void unexecute();
Type type() const { return MoveMenu; }
private:
- QDesignerMenuBar *menuBar;
- QDesignerPopupMenu *popup;
+ TQDesignerMenuBar *menuBar;
+ TQDesignerPopupMenu *popup;
int fromIdx, toIdx;
TQString text;
@@ -911,7 +912,7 @@ public:
Type type() const { return AddToolBar; }
protected:
- QDesignerToolBar *toolBar;
+ TQDesignerToolBar *toolBar;
TQMainWindow *mainWindow;
};
@@ -919,7 +920,7 @@ protected:
class RemoveToolBarCommand : public AddToolBarCommand
{
public:
- RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, QDesignerToolBar *tb )
+ RemoveToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw, TQDesignerToolBar *tb )
: AddToolBarCommand( n, fw, mw ) { toolBar = tb; }
void execute() { AddToolBarCommand::unexecute(); }
diff --git a/kommander/editor/connectioneditor.ui b/kommander/editor/connectioneditor.ui
index d9e5a161..5eed9c1e 100644
--- a/kommander/editor/connectioneditor.ui
+++ b/kommander/editor/connectioneditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ConnectionEditorBase</cstring>
</property>
@@ -116,7 +116,7 @@
<cstring>slotBox</cstring>
</property>
<property name="whatsThis" stdset="0">
- <string>&lt;b&gt;A list of slots for the receiver.&lt;/b&gt;&lt;p&gt;The slots that are displayed are only those which have arguments that correspond with the arguments of the signal that is currently selected in the Signal-list.&lt;/b&gt;</string>
+ <string>&lt;b&gt;A list of Q_SLOTS for the receiver.&lt;/b&gt;&lt;p&gt;The Q_SLOTS that are displayed are only those which have arguments that correspond with the arguments of the signal that is currently selected in the Signal-list.&lt;/b&gt;</string>
</property>
</widget>
<widget class="KListBox" row="1" column="0">
@@ -124,18 +124,18 @@
<cstring>signalBox</cstring>
</property>
<property name="whatsThis" stdset="0">
- <string>Displays the list of signals that the widget emits.</string>
+ <string>Displays the list of Q_SIGNALS that the widget emits.</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelSignal</cstring>
</property>
@@ -161,7 +161,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="1">
+ <widget class="TQLayoutWidget" row="0" column="1">
<property name="name">
<cstring>Layout3</cstring>
</property>
@@ -175,7 +175,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelSlot</cstring>
</property>
@@ -201,9 +201,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="4" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<hbox>
<property name="name">
@@ -239,7 +239,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>71</width>
<height>21</height>
@@ -293,7 +293,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>230</width>
<height>20</height>
@@ -302,15 +302,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
- <cstring>layout8</cstring>
+ <cstring>tqlayout8</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -331,7 +331,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>231</width>
<height>20</height>
@@ -368,7 +368,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>211</width>
<height>20</height>
@@ -390,7 +390,7 @@
<tabstop>okButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot>addSlotClicked()</slot>
@@ -400,10 +400,10 @@
<slot access="protected">receiverChanged( const QString &amp; )</slot>
<slot access="protected">okClicked()</slot>
<slot access="protected">signalChanged()</slot>
- <slot access="protected">slotsChanged()</slot>
+ <slot access="protected">Q_SLOTSChanged()</slot>
<slot access="protected">cancelClicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>klistbox.h</includehint>
diff --git a/kommander/editor/connectioneditorimpl.cpp b/kommander/editor/connectioneditorimpl.cpp
index a430290e..e6a48fde 100644
--- a/kommander/editor/connectioneditorimpl.cpp
+++ b/kommander/editor/connectioneditorimpl.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -44,14 +44,14 @@ static const char *const ignore_slots[] = {
"update()",
"update(int,int,int,int)",
"update(const TQRect&)",
- "repaint()",
- "repaint(bool)",
- "repaint(int,int,int,int,bool)",
- "repaint(const TQRect&,bool)",
- "repaint(const TQRegion&,bool)",
- "repaint(int,int,int,int)",
- "repaint(const TQRect&)",
- "repaint(const TQRegion&)",
+ "tqrepaint()",
+ "tqrepaint(bool)",
+ "tqrepaint(int,int,int,int,bool)",
+ "tqrepaint(const TQRect&,bool)",
+ "tqrepaint(const TQRegion&,bool)",
+ "tqrepaint(int,int,int,int)",
+ "tqrepaint(const TQRect&)",
+ "tqrepaint(const TQRegion&)",
//"show()",
//"hide()",
"iconify()",
@@ -89,13 +89,13 @@ static const char *const ignore_signals[] = {
};
-ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
- : ConnectionEditorBase(parent, 0, true), m_formWindow(fw)
+ConnectionEditor::ConnectionEditor(TQWidget* tqparent, TQObject* sndr, TQObject* rcvr, FormWindow* fw)
+ : ConnectionEditorBase(tqparent, 0, true), m_formWindow(fw)
{
- if (!rcvr || rcvr == m_formWindow)
- rcvr = m_formWindow->mainContainer();
- if (!sndr || sndr == m_formWindow)
- sndr = m_formWindow->mainContainer();
+ if (!rcvr || TQT_BASE_OBJECT(rcvr) == TQT_BASE_OBJECT(m_formWindow))
+ rcvr = TQT_TQOBJECT(m_formWindow->mainContainer());
+ if (!sndr || TQT_BASE_OBJECT(sndr) == TQT_BASE_OBJECT(m_formWindow))
+ sndr = TQT_TQOBJECT(m_formWindow->mainContainer());
m_sender = sndr;
m_receiver = rcvr;
@@ -105,11 +105,11 @@ ConnectionEditor::ConnectionEditor(TQWidget* parent, TQObject* sndr, TQObject* r
for (TQPtrDictIterator<TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
{
if (it.current()->isVisibleTo(this) &&
- !it.current()->inherits("QLayoutWidget") &&
+ !it.current()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) &&
!it.current()->inherits("Spacer") &&
qstrcmp(it.current()->name(), "central widget") &&
- !m_formWindow->isMainContainer(it.current()) &&
- !lst.contains(it.current()->name()))
+ !m_formWindow->isMainContainer(TQT_TQOBJECT(it.current())) &&
+ !lst.tqcontains(it.current()->name()))
lst << it.current()->name();
}
@@ -152,21 +152,21 @@ bool ConnectionEditor::isSignalIgnored(const char *signal) const
return false;
}
-bool ConnectionEditor::isSlotIgnored(const QMetaData* md)
+bool ConnectionEditor::isSlotIgnored(const TQMetaData* md)
{
- if (md->access != QMetaData::Public && (md->access != QMetaData::Protected ||
- !m_formWindow->isMainContainer((TQWidget*)m_receiver)))
+ if (md->tqt_mo_access != TQMetaData::Public && (md->tqt_mo_access != TQMetaData::Protected ||
+ !m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver))))
return true;
for (int i = 0; ignore_slots[i]; i++)
- if (!qstrcmp(md->name, ignore_slots[i]))
+ if (!qstrcmp(md->tqt_mo_ci_name, ignore_slots[i]))
return true;
- if (!m_formWindow->isMainContainer((TQWidget *)m_receiver) && !qstrcmp(md->name, "close()"))
+ if (!m_formWindow->isMainContainer(TQT_TQOBJECT(m_receiver)) && !qstrcmp(md->tqt_mo_ci_name, "close()"))
return true;
- if (!qstrcmp(md->name, "setFocus()") && m_receiver->isWidgetType() &&
- ((TQWidget*)m_receiver)->focusPolicy() == TQWidget::NoFocus)
+ if (!qstrcmp(md->tqt_mo_ci_name, "setFocus()") && m_receiver->isWidgetType() &&
+ ((TQWidget*)m_receiver)->focusPolicy() == TQ_NoFocus)
return true;
for (int i = 0; i<comboSender->count(); i++)
- if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->name))
+ if (checkConnectArgs(MetaDataBase::normalizeSlot(signalBox->text(i)).latin1(), m_receiver, md->tqt_mo_ci_name))
return false;
return true;
}
@@ -175,11 +175,11 @@ TQObject* ConnectionEditor::objectByName(const TQString& s) const
{
for (TQPtrDictIterator <TQWidget> it(*m_formWindow->widgets()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return it.current();
+ return TQT_TQOBJECT(it.current());
for (TQPtrListIterator<TQAction> it(m_formWindow->actionList()); it.current(); ++it)
if (TQString(it.current()->name()) == s)
- return it.current();
+ return TQT_TQOBJECT(it.current());
return 0;
}
@@ -213,7 +213,7 @@ void ConnectionEditor::disconnectClicked()
if (!p_item)
return;
- TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.find(p_item);
+ TQMap <TQListViewItem*, MetaDataBase::Connection>::Iterator it = m_connections.tqfind(p_item);
if (it != m_connections.end())
m_connections.remove(it);
delete p_item;
@@ -226,7 +226,7 @@ void ConnectionEditor::disconnectClicked()
void ConnectionEditor::okClicked()
{
MacroCommand* rmConn = 0, *addConn = 0;
- TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").arg(m_sender->name()).
+ TQString n = i18n("Connect/Disconnect the signals and slots of '%1' and '%2'").tqarg(m_sender->name()).
arg(m_receiver->name());
TQValueList <MetaDataBase::Connection>::Iterator cit;
if (!m_oldConnections.isEmpty())
@@ -274,13 +274,13 @@ void ConnectionEditor::senderChanged(const TQString& s)
if (!p_object)
return;
m_sender = p_object;
- TQStrList p_sigs = m_sender->metaObject()->signalNames(true);
+ TQStrList p_sigs = m_sender->tqmetaObject()->signalNames(true);
signalBox->clear();
for (TQStrListIterator it(p_sigs); it.current(); ++it)
- if (!isSignalIgnored(it.current()) && !signalBox->findItem(it.current(), Qt::ExactMatch))
+ if (!isSignalIgnored(it.current()) && !signalBox->tqfindItem(it.current(), TQt::ExactMatch))
signalBox->insertItem(it.current());
- if (m_sender == m_formWindow->mainContainer())
- signalBox->insertStringList(MetaDataBase::signalList(m_formWindow));
+ if (TQT_BASE_OBJECT(m_sender) == TQT_BASE_OBJECT(m_formWindow->mainContainer()))
+ signalBox->insertStringList(MetaDataBase::signalList(TQT_TQOBJECT(m_formWindow)));
signalBox->sort();
signalBox->setCurrentItem(signalBox->firstItem());
// Update slots - some may (not) have their signal equivalents now.
@@ -293,13 +293,13 @@ void ConnectionEditor::receiverChanged(const TQString& s)
if (!p_object)
return;
m_receiver = p_object;
- int n = m_receiver->metaObject()->numSlots(true);
+ int n = m_receiver->tqmetaObject()->numSlots(true);
slotBox->clear();
for (int i = 0; i < n; ++i)
{
- const QMetaData* md = m_receiver->metaObject()->slot(i, true);
- if (!isSlotIgnored(md) && !slotBox->findItem(md->name, Qt::ExactMatch))
- slotBox->insertItem(md->name);
+ const TQMetaData* md = m_receiver->tqmetaObject()->slot(i, true);
+ if (!isSlotIgnored(md) && !slotBox->tqfindItem(md->tqt_mo_ci_name, TQt::ExactMatch))
+ slotBox->insertItem(md->tqt_mo_ci_name);
}
slotBox->sort();
slotBox->setCurrentItem(slotBox->firstItem());
@@ -336,14 +336,14 @@ void ConnectionEditor::fillConnectionsList()
{
connectionView->clear();
m_connections.clear();
- m_oldConnections = MetaDataBase::connections(m_formWindow);
+ m_oldConnections = MetaDataBase::connections(TQT_TQOBJECT(m_formWindow));
if (!m_oldConnections.isEmpty())
{
TQValueList <MetaDataBase::Connection>::Iterator it = m_oldConnections.begin();
for (; it != m_oldConnections.end(); ++it)
{
- if (m_formWindow->isMainContainer((TQWidget*)(*it).receiver) &&
- !MetaDataBase::hasSlot(m_formWindow, MetaDataBase::normalizeSlot((*it).slot).latin1()))
+ if (m_formWindow->isMainContainer(TQT_TQOBJECT((*it).receiver)) &&
+ !MetaDataBase::hasSlot(TQT_TQOBJECT(m_formWindow), MetaDataBase::normalizeSlot((*it).slot).latin1()))
continue;
MetaDataBase::Connection conn = *it;
KListViewItem *i = new KListViewItem(connectionView, conn.sender->name(), conn.signal,
diff --git a/kommander/editor/connectioneditorimpl.h b/kommander/editor/connectioneditorimpl.h
index 35a3445b..35e3f2e0 100644
--- a/kommander/editor/connectioneditorimpl.h
+++ b/kommander/editor/connectioneditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -31,8 +31,10 @@ class FormWindow;
class ConnectionEditor : public ConnectionEditorBase
{
-Q_OBJECT public:
- ConnectionEditor(TQWidget* parent, TQObject* sender, TQObject* receiver, FormWindow* fw);
+ Q_OBJECT
+ TQ_OBJECT
+public:
+ ConnectionEditor(TQWidget* tqparent, TQObject* sender, TQObject* receiver, FormWindow* fw);
~ConnectionEditor();
protected slots:
@@ -61,7 +63,7 @@ private:
// Whether given signal should appear in the signal list
bool isSignalIgnored(const char*) const;
// Whether given slot should appear in the slot list
- bool isSlotIgnored(const QMetaData* md);
+ bool isSlotIgnored(const TQMetaData* md);
// Finds widget by name
TQObject* objectByName(const TQString& s) const;
bool hasConnection(const TQString & snder, const TQString & signal,
diff --git a/kommander/editor/createtemplate.ui b/kommander/editor/createtemplate.ui
index a6034d03..f97acfc6 100644
--- a/kommander/editor/createtemplate.ui
+++ b/kommander/editor/createtemplate.ui
@@ -19,13 +19,13 @@
**
*********************************************************************</comment>
<widget>
- <class>QDialog</class>
+ <class>TQDialog</class>
<property stdset="1">
<name>name</name>
<cstring>CreateTemplate</cstring>
</property>
<property stdset="1">
- <name>geometry</name>
+ <name>tqgeometry</name>
<rect>
<x>0</x>
<y>0</y>
@@ -51,7 +51,7 @@
<number>6</number>
</property>
<widget row="0" column="0" >
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
@@ -66,7 +66,7 @@
</property>
</widget>
<widget row="0" column="1" >
- <class>QLineEdit</class>
+ <class>TQLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>editName</cstring>
@@ -81,7 +81,7 @@
</property>
</widget>
<widget row="1" column="1" rowspan="2" colspan="1" >
- <class>QListBox</class>
+ <class>TQListBox</class>
<property stdset="1">
<name>name</name>
<cstring>listClass</cstring>
@@ -96,7 +96,7 @@
</property>
</widget>
<widget row="3" column="0" rowspan="1" colspan="2" >
- <class>QLayoutWidget</class>
+ <class>TQLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout1</cstring>
@@ -124,7 +124,7 @@
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
@@ -132,7 +132,7 @@
</property>
</spacer>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonCreate</cstring>
@@ -151,7 +151,7 @@
</property>
</widget>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>PushButton1</cstring>
@@ -168,7 +168,7 @@
</hbox>
</widget>
<widget row="1" column="0" >
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel2</cstring>
@@ -196,7 +196,7 @@
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
diff --git a/kommander/editor/defs.cpp b/kommander/editor/defs.cpp
index 9f158b6d..d4e71303 100644
--- a/kommander/editor/defs.cpp
+++ b/kommander/editor/defs.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
diff --git a/kommander/editor/defs.h b/kommander/editor/defs.h
index 03cffd98..fcf4c305 100644
--- a/kommander/editor/defs.h
+++ b/kommander/editor/defs.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
diff --git a/kommander/editor/filechooser.cpp b/kommander/editor/filechooser.cpp
index dfb8575b..0133974a 100644
--- a/kommander/editor/filechooser.cpp
+++ b/kommander/editor/filechooser.cpp
@@ -4,21 +4,21 @@
#include <kfiledialog.h>
#include <tqlayout.h>
-FileChooser::FileChooser( TQWidget *parent, const char *name )
- : TQWidget( parent, name ), md( File )
+FileChooser::FileChooser( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name ), md( File )
{
- TQHBoxLayout *layout = new TQHBoxLayout( this );
- layout->setMargin( 0 );
+ TQHBoxLayout *tqlayout = new TQHBoxLayout( this );
+ tqlayout->setMargin( 0 );
lineEdit = new TQLineEdit( this, "filechooser_lineedit" );
- layout->addWidget( lineEdit );
+ tqlayout->addWidget( lineEdit );
connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) );
button = new TQPushButton( "...", this, "filechooser_button" );
button->setFixedWidth( button->fontMetrics().width( " ... " ) );
- layout->addWidget( button );
+ tqlayout->addWidget( button );
connect( button, TQT_SIGNAL( clicked() ),
this, TQT_SLOT( chooseFile() ) );
@@ -50,7 +50,7 @@ void FileChooser::chooseFile()
{
TQString fn;
if ( mode() == File )
- fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString::null, this );
+ fn = KFileDialog::getOpenFileName( lineEdit->text(), TQString(), this );
else
fn = KFileDialog::getExistingDirectory( lineEdit->text(),this );
diff --git a/kommander/editor/filechooser.h b/kommander/editor/filechooser.h
index aa60518f..df518db6 100644
--- a/kommander/editor/filechooser.h
+++ b/kommander/editor/filechooser.h
@@ -6,16 +6,17 @@
class TQLineEdit;
class TQPushButton;
-class FileChooser : public QWidget
+class FileChooser : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
Q_ENUMS( Mode )
- Q_PROPERTY( Mode mode READ mode WRITE setMode )
- Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
+ TQ_PROPERTY( Mode mode READ mode WRITE setMode )
+ TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- FileChooser( TQWidget *parent = 0, const char *name = 0);
+ FileChooser( TQWidget *tqparent = 0, const char *name = 0);
enum Mode { File, Directory };
diff --git a/kommander/editor/formfile.cpp b/kommander/editor/formfile.cpp
index 0f5ab63c..90b9ba18 100644
--- a/kommander/editor/formfile.cpp
+++ b/kommander/editor/formfile.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -26,10 +26,10 @@
#include "resource.h"
#include "workspace.h"
-// Qt includes
+// TQt includes
#include <tqfile.h>
#include <tqregexp.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqtimer.h>
// KDE includes
@@ -80,7 +80,7 @@ void FormFile::setFileName(const TQString &fn)
return;
if (fn.isEmpty()) {
fileNameTemp = true;
- if (filename.find("unnamed"))
+ if (filename.tqfind("unnamed"))
filename = createUnnamedFileName();
return;
}
@@ -119,12 +119,12 @@ bool FormFile::save(bool withMsgBox)
if (!resource.save(filename, false))
{
if (KMessageBox::questionYesNo(MainWindow::self, i18n("Failed to save file '%1'.\n"
- "Do you want to use another file name?").arg(filename), TQString::null, i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
+ "Do you want to use another file name?").tqarg(filename), TQString(), i18n("Try Another"), i18n("Do Not Try")) == KMessageBox::Yes)
return saveAs();
else
return false;
}
- MainWindow::self->statusBar()->message(i18n("'%1' saved.").arg(filename), 3000);
+ MainWindow::self->statusBar()->message(i18n("'%1' saved.").tqarg(filename), 3000);
::chmod(filename.local8Bit(), S_IRWXU);
setModified(false);
return true;
@@ -137,9 +137,9 @@ bool FormFile::saveAs()
f = TQString(formWindow()->name()).lower() + ".kmdr";
bool saved = false;
while (!saved) {
- TQString fn = KFileDialog::getSaveFileName(TQString::null,
+ TQString fn = KFileDialog::getSaveFileName(TQString(),
i18n("*.kmdr|Kommander Files"), MainWindow::self,
- i18n("Save Form '%1' As").arg(formWindow()->name()));
+ i18n("Save Form '%1' As").tqarg(formWindow()->name()));
if (fn.isEmpty())
return false;
TQFileInfo fi(fn);
@@ -182,7 +182,7 @@ bool FormFile::closeEvent()
}
switch (KMessageBox::warningYesNoCancel(MainWindow::self, i18n("Dialog '%1' was modified."
- "Do you want to save it?").arg(filename), i18n("Save File?"), KStdGuiItem::save(), KStdGuiItem::discard())) {
+ "Do you want to save it?").tqarg(filename), i18n("Save File?"), KStdGuiItem::save(), KStdGuiItem::discard())) {
case KMessageBox::Yes:
if (!save())
return false;
@@ -264,7 +264,7 @@ TQString FormFile::formName() const
line = ts.readLine();
if (!className.isEmpty())
{
- int end = line.find("</class>");
+ int end = line.tqfind("</class>");
if (end == -1)
className += line;
else
@@ -275,9 +275,9 @@ TQString FormFile::formName() const
continue;
}
int start;
- if ((start = line.find("<class>")) != -1)
+ if ((start = line.tqfind("<class>")) != -1)
{
- int end = line.find("</class>");
+ int end = line.tqfind("</class>");
if (end == -1)
className = line.mid(start + 7);
else
diff --git a/kommander/editor/formfile.h b/kommander/editor/formfile.h
index 89ba2f1d..d7c63bce 100644
--- a/kommander/editor/formfile.h
+++ b/kommander/editor/formfile.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
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
@@ -26,9 +26,10 @@
class FormWindow;
-class FormFile : public QObject
+class FormFile : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
FormFile(const TQString &fn, bool temp);
diff --git a/kommander/editor/formsettings.ui b/kommander/editor/formsettings.ui
index 321de024..6e391265 100644
--- a/kommander/editor/formsettings.ui
+++ b/kommander/editor/formsettings.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>FormSettingsBase</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -74,7 +74,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -114,7 +114,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox" row="1" column="0">
+ <widget class="TQGroupBox" row="1" column="0">
<property name="name">
<cstring>GroupBox2</cstring>
</property>
@@ -131,7 +131,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>spinMargin</cstring>
</property>
@@ -139,7 +139,7 @@
<number>11</number>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>spinSpacing</cstring>
</property>
@@ -147,7 +147,7 @@
<number>6</number>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1_3</cstring>
</property>
@@ -158,7 +158,7 @@
<cstring>spinMargin</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel2_2</cstring>
</property>
@@ -171,7 +171,7 @@
</widget>
</grid>
</widget>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -194,7 +194,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QMultiLineEdit" row="3" column="1" rowspan="2" colspan="1">
+ <widget class="TQMultiLineEdit" row="3" column="1" rowspan="2" colspan="1">
<property name="name">
<cstring>editComment</cstring>
</property>
@@ -212,14 +212,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>130</height>
</size>
</property>
</spacer>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -230,7 +230,7 @@
<cstring>editComment</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel1_2_2</cstring>
</property>
@@ -252,7 +252,7 @@
<string>Enter your name.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>TextLabel1_2_3</cstring>
</property>
@@ -263,7 +263,7 @@
<cstring>editAuthor</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel1_2</cstring>
</property>
@@ -326,10 +326,10 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot>okClicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klineedit.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/kommander/editor/formsettingsimpl.cpp b/kommander/editor/formsettingsimpl.cpp
index f3f7c3c2..9912634f 100644
--- a/kommander/editor/formsettingsimpl.cpp
+++ b/kommander/editor/formsettingsimpl.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -27,16 +27,16 @@
#include <klineedit.h>
#include <tqspinbox.h>
-FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
- : FormSettingsBase( parent, 0, true ), formwindow( fw )
+FormSettings::FormSettings( TQWidget *tqparent, FormWindow *fw )
+ : FormSettingsBase( tqparent, 0, true ), formwindow( fw )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(fw);
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(TQT_TQOBJECT(fw));
editAuthor->setText(info.author);
editVersion->setText(info.version);
editLicense->setText(info.license);
editComment->setText(info.comment);
- spinSpacing->setValue(formwindow->layoutDefaultSpacing());
- spinMargin->setValue(formwindow->layoutDefaultMargin());
+ spinSpacing->setValue(formwindow->tqlayoutDefaultSpacing());
+ spinMargin->setValue(formwindow->tqlayoutDefaultMargin());
}
void FormSettings::okClicked()
@@ -46,7 +46,7 @@ void FormSettings::okClicked()
info.version = editVersion->text();
info.license = editLicense->text();
info.comment = editComment->text();
- MetaDataBase::setMetaInfo(formwindow, info);
+ MetaDataBase::setMetaInfo(TQT_TQOBJECT(formwindow), info);
formwindow->commandHistory()->setModified(true);
formwindow->setLayoutDefaultSpacing(spinSpacing->value());
diff --git a/kommander/editor/formsettingsimpl.h b/kommander/editor/formsettingsimpl.h
index 194f168a..e8940b9d 100644
--- a/kommander/editor/formsettingsimpl.h
+++ b/kommander/editor/formsettingsimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,9 +28,10 @@ class FormWindow;
class FormSettings : public FormSettingsBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- FormSettings( TQWidget *parent, FormWindow *fw );
+ FormSettings( TQWidget *tqparent, FormWindow *fw );
protected slots:
void okClicked();
diff --git a/kommander/editor/formwindow.cpp b/kommander/editor/formwindow.cpp
index ac0712b4..2218a977 100644
--- a/kommander/editor/formwindow.cpp
+++ b/kommander/editor/formwindow.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -17,7 +17,7 @@
**********************************************************************/
-// Qt includes
+// TQt includes
#include <tqaccel.h>
#include <tqapplication.h>
#include <tqbitmap.h>
@@ -36,7 +36,7 @@
#include <tqpushbutton.h>
#include <tqsizegrip.h>
#include <tqspinbox.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqtimer.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
@@ -54,7 +54,7 @@
#include "sizehandle.h"
#include "metadatabase.h"
#include "resource.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "connectioneditorimpl.h"
#include "widgetdatabase.h"
#include "pixmapchooser.h"
@@ -70,9 +70,9 @@
static void setCursorToAll(const TQCursor &c, TQWidget *start)
{
start->setCursor(c);
- TQObjectList *l = (TQObjectList*)start->children();
- if (l)
- for (TQObject *o = l->first(); o; o = l->next())
+ TQObjectList l = start->childrenListObject();
+ if (!l.isEmpty())
+ for (TQObject *o = l.first(); o; o = l.next())
{
if (o->isWidgetType() && !o->inherits("SizeHandle"))
setCursorToAll(c, ((TQWidget*)o));
@@ -81,13 +81,13 @@ static void setCursorToAll(const TQCursor &c, TQWidget *start)
static void restoreCursors(TQWidget *start, FormWindow *fw)
{
- if (fw->widgets()->find(start))
+ if (fw->widgets()->tqfind(start))
start->setCursor(MetaDataBase::cursor(start));
else
- start->setCursor(Qt::ArrowCursor);
- TQObjectList *l = (TQObjectList*)start->children();
- if (l)
- for (TQObject *o = l->first(); o; o = l->next())
+ start->setCursor(TQt::ArrowCursor);
+ TQObjectList l = start->childrenListObject();
+ if (!l.isEmpty())
+ for (TQObject *o = l.first(); o; o = l.next())
{
if (o->isWidgetType() && !o->inherits("SizeHandle"))
restoreCursors(((TQWidget*)o), fw);
@@ -110,8 +110,8 @@ static void restoreCursors(TQWidget *start, FormWindow *fw)
event filter which is implemented in MainWindow::eventFilter().
*/
-FormWindow::FormWindow(FormFile *f, MainWindow *mw, TQWidget *parent, const char *name)
- : TQWidget(parent, name, WDestructiveClose), mainwindow(mw),
+FormWindow::FormWindow(FormFile *f, MainWindow *mw, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name, WDestructiveClose), mainwindow(mw),
commands(100), pixInline(true)
{
ff = f;
@@ -119,8 +119,8 @@ FormWindow::FormWindow(FormFile *f, MainWindow *mw, TQWidget *parent, const char
initSlots();
}
-FormWindow::FormWindow(FormFile *f, TQWidget *parent, const char *name)
- : TQWidget(parent, name, WDestructiveClose), mainwindow(0),
+FormWindow::FormWindow(FormFile *f, TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name, WDestructiveClose), mainwindow(0),
commands(100), pixInline(true)
{
ff = f;
@@ -129,7 +129,7 @@ FormWindow::FormWindow(FormFile *f, TQWidget *parent, const char *name)
void FormWindow::init()
{
- MetaDataBase::addEntry(this);
+ MetaDataBase::addEntry(TQT_TQOBJECT(this));
ff->setFormWindow(this);
propertyWidget = 0;
toolFixed = false;
@@ -140,7 +140,7 @@ void FormWindow::init()
unclippedPainter = 0;
widgetPressed = false;
drawRubber = false;
- setFocusPolicy(ClickFocus);
+ setFocusPolicy(TQ_ClickFocus);
sizePreviewLabel = 0;
checkSelectionsTimer = new TQTimer(this, "checkSelectionsTimer");
connect(checkSelectionsTimer, TQT_SIGNAL(timeout()),
@@ -167,7 +167,7 @@ void FormWindow::init()
TQWidget *w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQFRAME_OBJECT_NAME_STRING), this);
setMainContainer(w);
- propertyWidget = w;
+ propertyWidget = TQT_TQOBJECT(w);
targetContainer = 0;
hadOwnPalette = false;
@@ -178,7 +178,7 @@ void FormWindow::init()
void FormWindow::setMainWindow(MainWindow *w)
{
mainwindow = w;
- MetaDataBase::addEntry(this);
+ MetaDataBase::addEntry(TQT_TQOBJECT(this));
initSlots();
}
@@ -190,7 +190,7 @@ FormWindow::~FormWindow()
{
if (MainWindow::self->objectHierarchy()->formWindow() == this)
MainWindow::self->objectHierarchy()->setFormWindow(0, 0);
- MetaDataBase::clear(this);
+ MetaDataBase::clear(TQT_TQOBJECT(this));
if (ff)
ff->setFormWindow(0);
}
@@ -210,17 +210,17 @@ void FormWindow::paintGrid(TQWidget *w, TQPaintEvent *e)
TQPixmap grid;
TQString grid_name;
grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y());
- if(!TQPixmapCache::find(grid_name, grid)) {
+ if(!TQPixmapCache::tqfind(grid_name, grid)) {
grid = TQPixmap(350 + (350 % mainWindow()->grid().x()), 350 + (350 % mainWindow()->grid().y()));
- grid.fill(colorGroup().color(TQColorGroup::Foreground));
- TQBitmap mask(grid.width(), grid.height());
- mask.fill(color0);
- TQPainter p(&mask);
+ grid.fill(tqcolorGroup().color(TQColorGroup::Foreground));
+ TQBitmap tqmask(grid.width(), grid.height());
+ tqmask.fill(color0);
+ TQPainter p(&tqmask);
p.setPen(color1);
for (int y = 0; y < grid.width(); y += mainWindow()->grid().y())
for (int x = 0; x < grid.height(); x += mainWindow()->grid().x())
p.drawPoint(x, y);
- grid.setMask(mask);
+ grid.setMask(tqmask);
TQPixmapCache::insert(grid_name, grid);
}
TQPainter p(w);
@@ -267,7 +267,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);
@@ -295,7 +295,7 @@ void FormWindow::insertWidget()
return;
bool useSizeHint = !oldRectValid || (currRect.width() < 2 && currRect.height() < 2);
- Orientation orient = Horizontal;
+ Qt::Orientation orient =Qt::Horizontal;
TQString n = WidgetDatabase::className(currTool);
if (useSizeHint && (n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING)) {
TQPopupMenu m(mainWindow());
@@ -303,7 +303,7 @@ void FormWindow::insertWidget()
int ver = m.insertItem(i18n("&Vertical"));
int r = m.exec(TQCursor::pos());
if (r == ver)
- orient = Vertical;
+ orient =Qt::Vertical;
}
TQWidget *w = WidgetFactory::create(currTool, insertParent, 0, true, &currRect, orient);
@@ -312,27 +312,27 @@ void FormWindow::insertWidget()
if (!savePixmapInline() && currTool == WidgetDatabase::idFromClassName("PixmapLabel"))
((TQLabel*)w)->setPixmap(PixmapChooser::loadPixmap("image.xpm"));
- int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w));
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)));
if (WidgetDatabase::isCustomWidget(id)) {
TQWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
- "<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
+ "<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, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").tqarg(tt).tqarg(wt));
}
TQString s = w->name();
- unify(w, s, true);
+ unify(TQT_TQOBJECT(w), s, true);
w->setName(s);
insertWidget(w);
TQRect r(currRect);
@@ -345,8 +345,8 @@ void FormWindow::insertWidget()
r = TQRect(p, r.size());
if (useSizeHint)
{
- r.setWidth(w->sizeHint().width());
- r.setHeight(w->sizeHint().height());
+ r.setWidth(w->tqsizeHint().width());
+ r.setHeight(w->tqsizeHint().height());
}
if (r.width() < 2 * grid().x())
@@ -354,18 +354,18 @@ void FormWindow::insertWidget()
if (r.height() < 2 * grid().y())
r.setHeight(2 * grid().y());
- const TQObjectList *l = insertParent->children();
- TQObjectListIt it(*l);
+ const TQObjectList l = insertParent->childrenListObject();
+ TQObjectListIt it(l);
TQWidgetList lst;
- if (WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ if (WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))))
for (; it.current();) {
TQObject *o = it.current();
++it;
if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo(this) &&
- insertedWidgets.find((TQWidget*)o) && o != w)
+ insertedWidgets.tqfind((TQWidget*)o) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w))
{
TQRect r2(((TQWidget*)o)->pos(), ((TQWidget*)o)->size());
- if (r.contains(r2))
+ if (r.tqcontains(r2))
lst.append((TQWidget*)o);
}
}
@@ -381,19 +381,19 @@ void FormWindow::insertWidget()
pos -= r.topLeft();
np.append(pos);
}
- MoveCommand *mv = new MoveCommand(i18n("Reparent Widgets"), this, lst, op, np, insertParent, pw);
+ MoveCommand *mv = new MoveCommand(i18n("Retqparent Widgets"), this, lst, op, np, insertParent, pw);
if (!toolFixed)
mainwindow->resetTool();
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();
}
@@ -404,7 +404,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();
}
@@ -414,29 +414,29 @@ void FormWindow::insertWidget(TQWidget *w, bool checkName)
{
if (checkName) {
TQString s = w->name();
- unify(w, s, true);
+ unify(TQT_TQOBJECT(w), s, true);
w->setName(s);
}
- MetaDataBase::addEntry(w);
- int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)));
if (WidgetDatabase::isCustomWidget(id))
{
TQWhatsThis::add(w, i18n("<b>A %1 (custom widget)</b> "
"<p>Click <b>Edit Custom Widgets...</b> in the <b>Tools|Custom</b> "
"menu to add and change custom widgets. You can add "
"properties as well as signals and slots to integrate custom widgets into "
- "<i>Qt Designer</i>, and provide a pixmap which will be used to represent "
+ "<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, i18n("<b>A %1</b><p>%2</p>").arg(tt).arg(wt));
+ TQWhatsThis::add(w, i18n("<b>A %1</b><p>%2</p>").tqarg(tt).tqarg(wt));
}
restoreCursors(w, this);
@@ -446,7 +446,7 @@ void FormWindow::insertWidget(TQWidget *w, bool checkName)
void FormWindow::removeWidget(TQWidget *w)
{
- MetaDataBase::removeEntry(w);
+ MetaDataBase::removeEntry(TQT_TQOBJECT(w));
widgets()->take(w);
}
@@ -454,15 +454,15 @@ void FormWindow::handleContextMenu(TQContextMenuEvent *e, TQWidget *w)
{
switch (currTool) {
case POINTER_TOOL:
- if (!isMainContainer(w) && qstrcmp(w->name(), "central widget"))
+ if (!isMainContainer(TQT_TQOBJECT(w)) && qstrcmp(w->name(), "central widget"))
{ // press on a child widget
raiseChildSelections(w); // raise selections and select widget
- selectWidget(w);
+ selectWidget(TQT_TQOBJECT(w));
// if widget is laid out, find the first non-laid out super-widget
TQWidget *realWidget = w; // but store the original one
- while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
- WidgetFactory::NoLayout || !insertedWidgets.find(w)))
- w = w->parentWidget();
+ while (w->tqparentWidget() && (WidgetFactory::tqlayoutType(w->tqparentWidget()) !=
+ WidgetFactory::NoLayout || !insertedWidgets.tqfind(w)))
+ w = w->tqparentWidget();
if (mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING) &&
((TQMainWindow*)mainContainer())->centralWidget() == realWidget)
{
@@ -500,10 +500,10 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
switch (currTool) {
case POINTER_TOOL:
- if (!isMainContainer(w) && qstrcmp(w->name(), "central widget") != 0)
+ 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 (!w->parentWidget() || WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout)
+ // if the clicked widget is not in a tqlayout, raise it
+ if (!w->tqparentWidget() || WidgetFactory::tqlayoutType(w->tqparentWidget()) == WidgetFactory::NoLayout)
w->raise();
if ((e->state() & ControlButton))
{ // with control pressed, always start rubber band selection
@@ -513,16 +513,16 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
break;
}
- bool sel = isWidgetSelected(w);
+ bool sel = isWidgetSelected(TQT_TQOBJECT(w));
if (!((e->state() & ControlButton) || (e->state() & ShiftButton)))
{ // control not pressed...
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!),
+ // 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)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout)
{
TQObjectList *l = w->queryList(TQWIDGET_OBJECT_NAME_STRING);
setPropertyShowingBlocked(true);
@@ -530,60 +530,60 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
{
if (!o->isWidgetType())
continue;
- if (insertedWidgets.find((TQWidget*)o))
- selectWidget((TQWidget*)o, false);
+ if (insertedWidgets.tqfind((TQWidget*)o))
+ selectWidget(TQT_TQOBJECT(o), false);
}
setPropertyShowingBlocked(false);
delete l;
}
}
- qApp->processEvents();
+ tqApp->processEvents();
}
if (((e->state() & ControlButton) || (e->state() & ShiftButton)) &&
- sel && e->button() == LeftButton)
+ sel && e->button() == Qt::LeftButton)
{ // control pressed and selected, unselect widget
- selectWidget(w, false);
+ selectWidget(TQT_TQOBJECT(w), false);
break;
}
raiseChildSelections(w); // raise selections and select widget
- selectWidget(w);
+ selectWidget(TQT_TQOBJECT(w));
// if widget is laid out, find the first non-laid out super-widget
- while (w->parentWidget() &&
- (WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout
- || !insertedWidgets.find(w)))
- w = w->parentWidget();
+ while (w->tqparentWidget() &&
+ (WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout
+ || !insertedWidgets.tqfind(w)))
+ w = w->tqparentWidget();
- if (e->button() == 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());
origPressPos = oldPressPos;
checkedSelectionsForMove = false;
moving.clear();
- if (w->parentWidget() && !isMainContainer(w->parentWidget()) &&
- !isCentralWidget(w->parentWidget()))
+ if (w->tqparentWidget() && !isMainContainer(TQT_TQOBJECT(w->tqparentWidget())) &&
+ !isCentralWidget(TQT_TQOBJECT(w->tqparentWidget())))
{
- targetContainer = w->parentWidget();
- hadOwnPalette = w->parentWidget()->ownPalette();
- restorePalette = w->parentWidget()->palette();
+ targetContainer = w->tqparentWidget();
+ hadOwnPalette = w->tqparentWidget()->ownPalette();
+ restorePalette = w->tqparentWidget()->palette();
}
}
}
else
{ // press was on the formwindow
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{ // left button: start rubber selection and show formwindow properties
drawRubber = true;
if (!((e->state() & ControlButton) || (e->state() & ShiftButton)))
{
clearSelection(false);
TQObject *opw = propertyWidget;
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget*)opw);
+ tqrepaintSelection((TQWidget*)opw);
}
currRect = TQRect(0, 0, -1, -1);
startRectDraw(mapFromGlobal(e->globalPos()), e->globalPos(), this, Rubber);
@@ -591,25 +591,25 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
}
break;
case CONNECT_TOOL:
- if (e->button() != LeftButton)
+ if (e->button() != Qt::LeftButton)
break;
saveBackground();
- mainWindow()->statusBar()->message(i18n("Connect '%1' with...").arg(w->name()));
+ mainWindow()->statusBar()->message(i18n("Connect '%1' with...").tqarg(w->name()));
connectStartPos = mapFromGlobal(e->globalPos());
currentConnectPos = mapFromGlobal(e->globalPos());
- connectSender = designerWidget(w);
- connectReceiver = connectableObject(designerWidget(w), connectReceiver);
+ connectSender = TQT_TQOBJECT(designerWidget(TQT_TQOBJECT(w)));
+ connectReceiver = connectableObject(TQT_TQOBJECT(designerWidget(TQT_TQOBJECT(w))), connectReceiver);
beginUnclippedPainter(false);
drawConnectLine();
break;
case ORDER_TOOL:
- if (!isMainContainer(w))
+ if (!isMainContainer(TQT_TQOBJECT(w)))
{ // press on a child widget
orderedWidgets.removeRef(w);
orderedWidgets.append(w);
for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
{
- int i = stackedWidgets.findRef(wid);
+ int i = stackedWidgets.tqfindRef(wid);
if (i != -1)
{
stackedWidgets.removeRef(wid);
@@ -625,25 +625,25 @@ void FormWindow::handleMousePress(TQMouseEvent *e, TQWidget *w)
}
break;
default: // any insert widget tool
- if (e->button() == LeftButton)
+ if (e->button() == Qt::LeftButton)
{
insertParent = WidgetFactory::containerOfWidget(mainContainer());
- // default parent for new widget is the formwindow
- if (!isMainContainer(w))
- { // press was not on formwindow, check if we can find another parent
+ // default tqparent for new widget is the formwindow
+ if (!isMainContainer(TQT_TQOBJECT(w)))
+ { // press was not on formwindow, check if we can find another tqparent
TQWidget *wid = w;
for (;;)
{
- int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(wid));
+ int id = WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(wid)));
if ((WidgetDatabase::isContainer(id) || wid == mainContainer()) &&
!wid->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !wid->inherits(TQSPLITTER_OBJECT_NAME_STRING))
{
- insertParent = WidgetFactory::containerOfWidget(wid); // found another parent, store it
+ insertParent = WidgetFactory::containerOfWidget(wid); // found another tqparent, store it
break;
}
else
{
- wid = wid->parentWidget();
+ wid = wid->tqparentWidget();
if (!wid)
break;
}
@@ -659,13 +659,13 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
{
switch (currTool) {
case ORDER_TOOL:
- if (!isMainContainer(w))
+ if (!isMainContainer(TQT_TQOBJECT(w)))
{ // press on a child widget
orderedWidgets.clear();
orderedWidgets.append(w);
for (TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev())
{
- int i = stackedWidgets.findRef(wid);
+ int i = stackedWidgets.tqfindRef(wid);
if (i != -1)
{
stackedWidgets.removeRef(wid);
@@ -685,7 +685,7 @@ void FormWindow::handleMouseDblClick(TQMouseEvent *, TQWidget *w)
void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{
- if ((e->state() & LeftButton) != LeftButton)
+ if ((e->state() & Qt::LeftButton) != Qt::LeftButton)
return;
TQWidget *newReceiver = (TQWidget*)connectReceiver, *oldReceiver = (TQWidget*)connectReceiver, *wid;
@@ -695,16 +695,16 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
if (widgetPressed && allowMove(w))
{ // we are prepated for a move
// if widget is laid out, find the first non-laid out super-widget
- while (w->parentWidget() && (WidgetFactory::layoutType(w->parentWidget()) !=
- WidgetFactory::NoLayout || !insertedWidgets.find(w)))
- w = w->parentWidget();
+ while (w->tqparentWidget() && (WidgetFactory::tqlayoutType(w->tqparentWidget()) !=
+ WidgetFactory::NoLayout || !insertedWidgets.tqfind(w)))
+ w = w->tqparentWidget();
// calc correct position
TQPoint pos = w->mapFromGlobal(e->globalPos());
// calc move distance and store it
TQPoint d = oldPressPos - pos;
- if (QABS(d.x()) < grid().x())
+ if (TQABS(d.x()) < grid().x())
d.setX(0);
- if (QABS(d.y()) < grid().y())
+ if (TQABS(d.y()) < grid().y())
d.setY(0);
if (d.x() == 0)
pos.setX(oldPressPos.x());
@@ -724,19 +724,19 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
{ // if we actually have to move
if (!checkedSelectionsForMove)
{ // if not checked yet, check if the correct widget are selected...
- if (!isWidgetSelected(w))
+ if (!isWidgetSelected(TQT_TQOBJECT(w)))
{ // and unselect others. Only siblings can be moved at the same time
setPropertyShowingBlocked(true);
- selectWidget(w);
+ selectWidget(TQT_TQOBJECT(w));
setPropertyShowingBlocked(false);
}
checkSelectionsForMove(w);
}
// check whether we would have to reparent the selection and
- // highlight the possible new parent container
+ // highlight the possible new tqparent container
TQMapConstIterator<ulong, TQPoint> it = moving.begin();
TQWidget* wa = containerAt(e->globalPos(), ((TQWidget*)it.key()));
- if (wa && !isMainContainer(wa) && !isCentralWidget(wa))
+ if (wa && !isMainContainer(TQT_TQOBJECT(wa)) && !isCentralWidget(TQT_TQOBJECT(wa)))
{
wa = WidgetFactory::containerOfWidget(wa);
// ok, looks like we moved onto a container
@@ -753,7 +753,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)
@@ -767,7 +767,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(TQString("%1/%2").arg(w->pos().x()).arg(w->pos().y()));
+ sizePreviewLabel->setText(TQString("%1/%2").tqarg(w->pos().x()).tqarg(w->pos().y()));
sizePreviewLabel->adjustSize();
TQRect lg(mapFromGlobal(e->globalPos()) + TQPoint(16, 16), sizePreviewLabel->size());
checkPreviewGeometry(lg);
@@ -790,24 +790,24 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
break;
case CONNECT_TOOL:
restoreConnectionLine();
- wid = qApp->widgetAt(e->globalPos(), true);
+ wid = tqApp->widgetAt(e->globalPos(), true);
if (wid)
- wid = designerWidget(wid);
- if (wid && (isMainContainer(wid) || insertedWidgets.find(wid)) && wid->isVisibleTo(this))
+ wid = designerWidget(TQT_TQOBJECT(wid));
+ if (wid && (isMainContainer(TQT_TQOBJECT(wid)) || insertedWidgets.tqfind(wid)) && wid->isVisibleTo(this))
newReceiver = wid;
- if (newReceiver && (newReceiver->inherits("QLayoutWidget")
+ if (newReceiver && (newReceiver->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING)
|| newReceiver->inherits("Spacer")))
newReceiver = (TQWidget*)connectReceiver;
- drawRecRect = newReceiver != connectReceiver;
+ drawRecRect = TQT_BASE_OBJECT(newReceiver) != TQT_BASE_OBJECT(connectReceiver);
currentConnectPos = mapFromGlobal(e->globalPos());
- if (newReceiver && (isMainContainer(newReceiver)
- || insertedWidgets.find(newReceiver)) && !isCentralWidget(newReceiver))
- connectReceiver = connectableObject(newReceiver, connectReceiver);
- mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").arg(connectSender->name()).
+ if (newReceiver && (isMainContainer(TQT_TQOBJECT(newReceiver))
+ || insertedWidgets.tqfind(newReceiver)) && !isCentralWidget(TQT_TQOBJECT(newReceiver)))
+ connectReceiver = connectableObject(TQT_TQOBJECT(newReceiver), TQT_TQOBJECT(connectReceiver));
+ mainWindow()->statusBar()->message(i18n("Connect '%1' to '%2'").tqarg(connectSender->name()).
arg(connectReceiver->name()));
- qApp->processEvents();
+ tqApp->processEvents();
if (drawRecRect)
- restoreRect(TQRect(mapToForm(((TQWidget*)oldReceiver)->parentWidget(),
+ restoreRect(TQRect(mapToForm(((TQWidget*)oldReceiver)->tqparentWidget(),
((TQWidget*)oldReceiver)->pos()), ((TQWidget*)oldReceiver)->size()));
drawConnectLine();
break;
@@ -822,7 +822,7 @@ void FormWindow::handleMouseMove(TQMouseEvent *e, TQWidget *w)
void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{
- if (e->button() != LeftButton)
+ if (e->button() != Qt::LeftButton)
return;
switch (currTool)
@@ -832,7 +832,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
{ // we moved the widget
sizePreviewLabel->hide();
- if (moving.isEmpty() || w->pos() == *moving.find((ulong) w))
+ if (moving.isEmpty() || w->pos() == *moving.tqfind((ulong) w))
break;
// restore targetContainer
@@ -848,7 +848,7 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
emitUpdateProperties(propertyWidget);
TQMapConstIterator < ulong, TQPoint > it = moving.begin();
- TQWidget *oldParent = ((TQWidget *) it.key())->parentWidget();
+ TQWidget *oldParent = ((TQWidget *) it.key())->tqparentWidget();
TQWidget *newParent = oldParent;
// check whether we have to reparent the selection
TQWidget *wa = containerAt(e->globalPos(), ((TQWidget *) it.key()));
@@ -857,21 +857,21 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
wa = WidgetFactory::containerOfWidget(wa);
// ok, looks like we moved onto a container
- // check whether we really have different parents.
- if (wa == ((TQWidget *) it.key())->parentWidget())
+ // check whether we really have different tqparents.
+ if (wa == ((TQWidget *) it.key())->tqparentWidget())
goto make_move_command;
- // break layout if necessary
- if (WidgetFactory::layoutType(wa) != WidgetFactory::NoLayout)
+ // break tqlayout if necessary
+ if (WidgetFactory::tqlayoutType(wa) != WidgetFactory::NoLayout)
{
if (KMessageBox::questionYesNo(mainWindow(),
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?").
- arg(wa->name()).arg(wa->name()), i18n("Inserting Widget"),
+ "Break the tqlayout or cancel the operation?").
+ tqarg(wa->name()).tqarg(wa->name()), i18n("Inserting Widget"),
i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::No)
goto make_move_command; // cancel
breakLayout(wa);
@@ -883,27 +883,27 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
TQWidget *i = (TQWidget *) it.key();
if (!emitSelChanged && i->inherits(TQBUTTON_OBJECT_NAME_STRING))
{
- if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING) ||
+ if (i->tqparentWidget() && i->tqparentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING) ||
wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
emitSelChanged = true;
if (!wa->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
{
- MetaDataBase::setPropertyChanged(i, "buttonGroupId", false);
- if (i->parentWidget() && i->parentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
- ((TQButtonGroup *) i->parentWidget())->remove((TQButton *) i);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(i), "buttonGroupId", false);
+ if (i->tqparentWidget() && i->tqparentWidget()->inherits(TQBUTTONGROUP_OBJECT_NAME_STRING))
+ ((TQButtonGroup *) i->tqparentWidget())->remove((TQButton *) i);
}
}
TQPoint pos = wa->mapFromGlobal(i->mapToGlobal(TQPoint(0, 0)));
i->reparent(wa, pos, true);
raiseSelection(i);
raiseChildSelections(i);
- widgetChanged(i);
+ widgetChanged(TQT_TQOBJECT(i));
mainWindow()->objectHierarchy()->widgetRemoved(i);
mainWindow()->objectHierarchy()->widgetInserted(i);
}
if (emitSelChanged)
{
- emit showProperties(wa);
+ emit showProperties(TQT_TQOBJECT(wa));
emit showProperties(propertyWidget);
}
newParent = wa;
@@ -935,13 +935,13 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
case CONNECT_TOOL:
restoreConnectionLine();
if (connectSender)
- restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(),
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->tqparentWidget(),
((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size()));
if (connectReceiver)
- restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(),
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->tqparentWidget(),
((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size()));
endUnclippedPainter();
- qApp->processEvents();
+ tqApp->processEvents();
if (connectSender && connectReceiver)
editConnections();
break;
@@ -951,15 +951,15 @@ void FormWindow::handleMouseRelease(TQMouseEvent * e, TQWidget * w)
if (insertParent)
{ // we should insert the new widget now
endRectDraw();
- if (WidgetFactory::layoutType(insertParent) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(insertParent) != WidgetFactory::NoLayout)
{
if (KMessageBox::questionYesNo(mainWindow(),
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("Inserting Widget"),
i18n("&Break Layout"), KStdGuiItem::cancel()) == KMessageBox::Yes)
@@ -1064,7 +1064,7 @@ void FormWindow::handleKeyPress(TQKeyEvent * e, TQWidget * w)
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
if (!l)
return;
- if (l->find(w) != -1)
+ if (l->tqfind(TQT_TQOBJECT(w)) != -1)
e->accept();
delete l;
}
@@ -1086,12 +1086,12 @@ void FormWindow::selectWidget(TQObject * o, bool select)
TQWidget *w = (TQWidget *) o;
- if (isMainContainer(w))
+ if (isMainContainer(TQT_TQOBJECT(w)))
{
TQObject *opw = propertyWidget;
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
return;
}
@@ -1100,25 +1100,25 @@ void FormWindow::selectWidget(TQObject * o, bool select)
w == ((TQMainWindow *) mainContainer())->centralWidget())
{
TQObject *opw = propertyWidget;
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
return;
}
- if (o->inherits("QDesignerToolBar") || o->inherits("QDesignerMenuBar"))
+ if (o->inherits("TQDesignerToolBar") || o->inherits("TQDesignerMenuBar"))
return;
if (select)
{
TQObject *opw = propertyWidget;
- propertyWidget = w;
+ propertyWidget = TQT_TQOBJECT(w);
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
if (!isPropertyShowingBlocked())
emitShowProperties(propertyWidget);
- WidgetSelection *s = usedSelections.find(w);
+ WidgetSelection *s = usedSelections.tqfind(w);
if (s)
{
s->show();
@@ -1143,16 +1143,16 @@ void FormWindow::selectWidget(TQObject * o, bool select)
emitSelectionChanged();
} else
{
- WidgetSelection *s = usedSelections.find(w);
+ WidgetSelection *s = usedSelections.tqfind(w);
if (s)
s->setWidget(0);
TQObject *opw = propertyWidget;
if (!usedSelections.isEmpty())
- propertyWidget = TQPtrDictIterator < WidgetSelection > (usedSelections).current()->widget();
+ propertyWidget = TQT_TQOBJECT(TQPtrDictIterator < WidgetSelection > (usedSelections).current()->widget());
else
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
if (!isPropertyShowingBlocked())
emitShowProperties(propertyWidget);
emitSelectionChanged();
@@ -1168,23 +1168,23 @@ TQPoint FormWindow::grid() const
void FormWindow::updateSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.find(w);
+ WidgetSelection *s = usedSelections.tqfind(w);
if (!w->isVisibleTo(this))
- selectWidget(w, false);
+ selectWidget(TQT_TQOBJECT(w), false);
else if (s)
s->updateGeometry();
}
void FormWindow::raiseSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.find(w);
+ WidgetSelection *s = usedSelections.tqfind(w);
if (s)
s->show();
}
-void FormWindow::repaintSelection(TQWidget * w)
+void FormWindow::tqrepaintSelection(TQWidget * w)
{
- WidgetSelection *s = usedSelections.find(w);
+ WidgetSelection *s = usedSelections.tqfind(w);
if (s)
s->update();
}
@@ -1199,9 +1199,9 @@ void FormWindow::clearSelection(bool changePropertyDisplay)
if (changePropertyDisplay)
{
TQObject *opw = propertyWidget;
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
emitShowProperties(propertyWidget);
}
emitSelectionChanged();
@@ -1239,7 +1239,7 @@ void FormWindow::continueRectDraw(const TQPoint & p, const TQPoint & global, TQW
if (currRect == r)
{
TQString t("%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;
}
@@ -1253,7 +1253,7 @@ void FormWindow::continueRectDraw(const TQPoint & p, const TQPoint & global, TQW
if (t == Insert)
{
TQString t("%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,
@@ -1275,7 +1275,7 @@ void FormWindow::endRectDraw()
if (oldRectValid)
unclippedPainter->drawRect(currRect);
- drawSizePreview(TQPoint(-1, -1), TQString::null);
+ drawSizePreview(TQPoint(-1, -1), TQString());
endUnclippedPainter();
}
@@ -1291,8 +1291,8 @@ void FormWindow::selectWidgets()
TQPoint p = ((TQWidget *) o)->mapToGlobal(TQPoint(0, 0));
p = mapFromGlobal(p);
TQRect r(p, ((TQWidget *) o)->size());
- if (r.intersects(currRect) && !r.contains(currRect))
- selectWidget((TQWidget *) o);
+ if (r.intersects(currRect) && !r.tqcontains(currRect))
+ selectWidget(TQT_TQOBJECT(o));
}
}
delete l;
@@ -1303,8 +1303,8 @@ void FormWindow::selectWidgets()
bool FormWindow::isWidgetSelected(TQObject * w)
{
if (w->isWidgetType())
- return usedSelections.find((TQWidget *) w) != 0;
- return false; // #### do stuff for QObjects
+ return usedSelections.tqfind((TQWidget *) w) != 0;
+ return false; // #### do stuff for TQObjects
}
void FormWindow::moveSelectedWidgets(int dx, int dy)
@@ -1314,8 +1314,8 @@ void FormWindow::moveSelectedWidgets(int dx, int dy)
{
WidgetSelection *s = it.current();
TQWidget *w = s->widget();
- if (w->parentWidget()
- && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (w->tqparentWidget()
+ && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
continue;
w->move(w->x() + dx, w->y() + dy);
s->updateGeometry();
@@ -1350,7 +1350,7 @@ void FormWindow::raiseChildSelections(TQWidget * w)
TQPtrDictIterator < WidgetSelection > it(usedSelections);
for (; it.current(); ++it)
{
- if (l->findRef(it.current()->widget()) != -1)
+ if (l->tqfindRef(TQT_TQOBJECT(it.current()->widget())) != -1)
it.current()->show();
}
delete l;
@@ -1363,7 +1363,7 @@ void FormWindow::updateChildSelections(TQWidget * w)
{
for (TQObject * o = l->first(); o; o = l->next())
{
- if (o->isWidgetType() && insertedWidgets.find((TQWidget *) o))
+ if (o->isWidgetType() && insertedWidgets.tqfind((TQWidget *) o))
updateSelection((TQWidget *) o);
}
delete l;
@@ -1374,7 +1374,7 @@ void FormWindow::checkSelectionsForMove(TQWidget * w)
{
checkedSelectionsForMove = true;
- TQObjectList *l = w->parentWidget()->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false);
+ TQObjectList *l = w->tqparentWidget()->queryList(TQWIDGET_OBJECT_NAME_STRING, 0, false, false);
moving.clear();
if (l)
{
@@ -1385,13 +1385,13 @@ void FormWindow::checkSelectionsForMove(TQWidget * w)
if (it.current()->widget() == mainContainer())
continue;
++it;
- if (l->find(sel->widget()) == -1)
+ if (l->tqfind(TQT_TQOBJECT(sel->widget())) == -1)
{
- if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout)
sel->setWidget(0);
} else
{
- if (WidgetFactory::layoutType(sel->widget()->parentWidget()) == WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(sel->widget()->tqparentWidget()) == WidgetFactory::NoLayout)
{
moving.insert((ulong) sel->widget(), sel->widget()->pos());
sel->widget()->raise();
@@ -1411,10 +1411,10 @@ void FormWindow::deleteWidgets()
for (; it.current(); ++it)
{
TQWidget *tb = 0;
- if (!(tb = mainWindow()->isAToolBarChild(it.current()->widget())))
+ if (!(tb = mainWindow()->isAToolBarChild(TQT_TQOBJECT(it.current()->widget()))))
widgets.append(it.current()->widget());
else
- ((QDesignerToolBar *) tb)->removeWidget(it.current()->widget());
+ ((TQDesignerToolBar *) tb)->removeWidget(it.current()->widget());
}
if (widgets.isEmpty())
@@ -1431,13 +1431,13 @@ void FormWindow::editAdjustSize()
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);
@@ -1447,12 +1447,12 @@ void FormWindow::editAdjustSize()
}
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)
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));
}
@@ -1500,7 +1500,7 @@ void FormWindow::invalidCheckedSelections()
void FormWindow::checkPreviewGeometry(TQRect & r)
{
- if (rect().contains(r))
+ if (TQT_TQRECT_OBJECT(rect()).tqcontains(r))
return;
if (r.left() < rect().left())
r.moveTopLeft(TQPoint(0, r.top()));
@@ -1527,9 +1527,9 @@ void FormWindow::focusOutEvent(TQFocusEvent *)
if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget))
{
TQObject *opw = propertyWidget;
- propertyWidget = mainContainer();
+ propertyWidget = TQT_TQOBJECT(mainContainer());
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
}
}
@@ -1552,8 +1552,8 @@ TQWidget *FormWindow::designerWidget(TQObject * o) const
if (!o || !o->isWidgetType())
return 0;
TQWidget *w = (TQWidget *) o;
- while (w && !isMainContainer(w) && !insertedWidgets[(void *) w] || isCentralWidget(w))
- w = (TQWidget *) w->parent();
+ while (w && !isMainContainer(TQT_TQOBJECT(w)) && !insertedWidgets[(void *) w] || isCentralWidget(TQT_TQOBJECT(w)))
+ w = (TQWidget *) w->tqparent();
return w;
}
@@ -1564,7 +1564,7 @@ void FormWindow::emitShowProperties(TQObject * w)
TQObject *opw = propertyWidget;
propertyWidget = w;
if (opw->isWidgetType())
- repaintSelection((TQWidget *) opw);
+ tqrepaintSelection((TQWidget *) opw);
}
showPropertiesTimer->stop();
showPropertiesTimer->start(0, true);
@@ -1618,10 +1618,10 @@ void FormWindow::currentToolChanged()
case CONNECT_TOOL:
restoreConnectionLine();
if (connectSender)
- restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->parentWidget(),
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectSender)->tqparentWidget(),
((TQWidget *) connectSender)->pos()), ((TQWidget *) connectSender)->size()));
if (connectReceiver)
- restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->parentWidget(),
+ restoreRect(TQRect(mapToForm(((TQWidget *) connectReceiver)->tqparentWidget(),
((TQWidget *) connectReceiver)->pos()), ((TQWidget *) connectReceiver)->size()));
endUnclippedPainter();
break;
@@ -1652,7 +1652,7 @@ void FormWindow::currentToolChanged()
{
case POINTER_TOOL:
if (propertyWidget && !isMainContainer(propertyWidget) && !isWidgetSelected(propertyWidget))
- emitShowProperties(mainContainer());
+ emitShowProperties(TQT_TQOBJECT(mainContainer()));
restoreCursors(this, this);
break;
case ORDER_TOOL:
@@ -1662,7 +1662,7 @@ void FormWindow::currentToolChanged()
orderedWidgets.clear();
showOrderIndicators();
if (mainWindow()->formWindow() == this)
- emitShowProperties(mainContainer());
+ emitShowProperties(TQT_TQOBJECT(mainContainer()));
setCursorToAll(ArrowCursor, this);
}
break;
@@ -1670,14 +1670,14 @@ void FormWindow::currentToolChanged()
mainWindow()->statusBar()->message(i18n("Drag a line to create a connection..."));
setCursorToAll(CrossCursor, this);
if (mainWindow()->formWindow() == this)
- emitShowProperties(mainContainer());
+ emitShowProperties(TQT_TQOBJECT(mainContainer()));
break;
default:
mainWindow()->statusBar()->message(i18n("Click on the form to insert a %1...").
arg(WidgetDatabase::toolTip(currTool).lower()));
setCursorToAll(CrossCursor, this);
if (mainWindow()->formWindow() == this)
- emitShowProperties(mainContainer());
+ emitShowProperties(TQT_TQOBJECT(mainContainer()));
break;
}
}
@@ -1694,12 +1694,12 @@ void FormWindow::showOrderIndicators()
for (TQObject * o = l->first(); o; o = l->next())
{
TQWidget *w = (TQWidget *) o;
- if (w->isVisibleTo(w->parentWidget()) &&
- insertedWidgets[(void *) w] && w->focusPolicy() != NoFocus)
+ if (w->isVisibleTo(w->tqparentWidget()) &&
+ insertedWidgets[(void *) w] && w->focusPolicy() != TQ_NoFocus)
{
OrderIndicator *ind = new OrderIndicator(order++, w, this);
orderIndicators.append(ind);
- if (stackedWidgets.findRef(w) == -1)
+ if (stackedWidgets.tqfindRef(w) == -1)
stackedWidgets.append(w);
}
}
@@ -1743,7 +1743,7 @@ bool FormWindow::checkCustomWidgets()
{
if (it.current()->isA("CustomWidget"))
{
- TQString className = WidgetFactory::classNameOf(it.current());
+ TQString className = WidgetFactory::classNameOf(TQT_TQOBJECT(it.current()));
if (!MetaDataBase::hasCustomWidget(className))
missingCustomWidgets << className;
}
@@ -1788,14 +1788,14 @@ void FormWindow::lowerWidgets()
static void find_accel(const TQString & txt, TQMap < TQChar, TQWidgetList > &accels, TQWidget * w)
{
- int i = txt.find("&");
+ int i = txt.tqfind("&");
if (i == -1)
return;
TQChar c = txt[i + 1];
if (c.isNull() || c == '&')
return;
c = c.lower();
- TQMap < TQChar, TQWidgetList >::Iterator it = accels.find(c);
+ TQMap < TQChar, TQWidgetList >::Iterator it = accels.tqfind(c);
if (it == accels.end())
{
TQWidgetList wl;
@@ -1820,11 +1820,11 @@ void FormWindow::checkAccels()
{
TQWidget *w = (TQWidget *) o;
const TQMetaProperty *text =
- w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
const TQMetaProperty *title =
- w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
const TQMetaProperty *pageTitle =
- w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true);
if (text)
find_accel(w->property("text").toString(), accels, w);
if (title)
@@ -1844,12 +1844,12 @@ void FormWindow::checkAccels()
{
ok = false;
if (KMessageBox::questionYesNo(mainWindow(),
- i18n("Accelerator '%1' is used %2 times.").arg(it.key().upper()).arg((*it).count()),
+ i18n("Accelerator '%1' is used %2 times.").tqarg(it.key().upper()).tqarg((*it).count()),
i18n("Check Accelerators"), i18n("&Select"), KStdGuiItem::cancel()) == KMessageBox::Yes)
{
clearSelection(false);
for (wid = (*it).first(); wid; wid = (*it).next())
- selectWidget(wid, true);
+ selectWidget(TQT_TQOBJECT(wid), true);
}
return;
}
@@ -1872,11 +1872,11 @@ void FormWindow::raiseWidgets()
commandHistory()->addCommand(cmd);
}
-void FormWindow::paste(const TQString & cb, TQWidget * parent)
+void FormWindow::paste(const TQString & cb, TQWidget * tqparent)
{
Resource resource(mainWindow());
resource.setWidget(this);
- resource.paste(cb, parent);
+ resource.paste(cb, tqparent);
}
void FormWindow::selectAll()
@@ -1890,7 +1890,7 @@ void FormWindow::selectAll()
{
if (((TQWidget *) o)->isVisibleTo(this) && insertedWidgets[(void *) o])
{
- selectWidget((TQWidget *) o);
+ selectWidget(TQT_TQOBJECT(o));
}
}
delete l;
@@ -1903,49 +1903,49 @@ void FormWindow::selectAll()
emitSelectionChanged();
}
-void FormWindow::layoutHorizontal()
+void FormWindow::tqlayoutHorizontal()
{
TQWidgetList widgets(selectedWidgets());
- LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Horizontally"),
+ LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay OutQt::Horizontally"),
this, mainContainer(), 0, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutVertical()
+void FormWindow::tqlayoutVertical()
{
TQWidgetList widgets(selectedWidgets());
- LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Vertically"),
+ LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay OutQt::Vertically"),
this, mainContainer(), 0, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutHorizontalSplit()
+void FormWindow::tqlayoutHorizontalSplit()
{
TQWidgetList widgets(selectedWidgets());
LayoutHorizontalSplitCommand *cmd =
- new LayoutHorizontalSplitCommand(i18n("Lay Out Horizontally (in splitter)"),
+ new LayoutHorizontalSplitCommand(i18n("Lay OutQt::Horizontally (in splitter)"),
this, mainContainer(), 0, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutVerticalSplit()
+void FormWindow::tqlayoutVerticalSplit()
{
TQWidgetList widgets(selectedWidgets());
LayoutVerticalSplitCommand *cmd =
- new LayoutVerticalSplitCommand(i18n("Lay Out Vertically (in splitter)"),
+ new LayoutVerticalSplitCommand(i18n("Lay OutQt::Vertically (in splitter)"),
this, mainContainer(), 0, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutGrid()
+void FormWindow::tqlayoutGrid()
{
int xres = grid().x();
int yres = grid().y();
@@ -1958,63 +1958,63 @@ void FormWindow::layoutGrid()
cmd->execute();
}
-void FormWindow::layoutHorizontalContainer(TQWidget * w)
+void FormWindow::tqlayoutHorizontalContainer(TQWidget * w)
{
if (w == this)
w = mainContainer();
- TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children();
- if (!l)
+ TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject();
+ if (l.isEmpty())
return;
TQWidgetList widgets;
- for (TQObject * o = l->first(); o; o = l->next())
+ for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
widgets.append((TQWidget *) o);
}
- LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out Children Horizontally"),
+ LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand(i18n("Lay Out ChildrenQt::Horizontally"),
this, mainContainer(), w, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutVerticalContainer(TQWidget * w)
+void FormWindow::tqlayoutVerticalContainer(TQWidget * w)
{
if (w == this)
w = mainContainer();
- TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children();
- if (!l)
+ TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject();
+ if (l.isEmpty())
return;
TQWidgetList widgets;
- for (TQObject * o = l->first(); o; o = l->next())
+ for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
widgets.append((TQWidget *) o);
}
- LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out Children Vertically"),
+ LayoutVerticalCommand *cmd = new LayoutVerticalCommand(i18n("Lay Out ChildrenQt::Vertically"),
this, mainContainer(), w, widgets);
clearSelection(false);
commandHistory()->addCommand(cmd);
cmd->execute();
}
-void FormWindow::layoutGridContainer(TQWidget * w)
+void FormWindow::tqlayoutGridContainer(TQWidget * w)
{
if (w == this)
w = mainContainer();
int xres = grid().x();
int yres = grid().y();
- TQObjectList *l = (TQObjectList *) WidgetFactory::containerOfWidget(w)->children();
- if (!l)
+ TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject();
+ if (l.isEmpty())
return;
TQWidgetList widgets;
- for (TQObject * o = l->first(); o; o = l->next())
+ for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
widgets.append((TQWidget *) o);
}
LayoutGridCommand *cmd = new LayoutGridCommand(i18n("Lay Out Children in a Grid"),
@@ -2035,8 +2035,8 @@ void FormWindow::breakLayout(TQWidget * w)
{
if (!w || w == this)
break;
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout &&
- WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout &&
+ WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))))
{
Command *cmd = breakLayoutCommand(w);
if (cmd)
@@ -2044,7 +2044,7 @@ void FormWindow::breakLayout(TQWidget * w)
if (!w->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) && !w->inherits(TQSPLITTER_OBJECT_NAME_STRING))
break;
}
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
if (commands.isEmpty())
@@ -2058,16 +2058,16 @@ void FormWindow::breakLayout(TQWidget * w)
BreakLayoutCommand *FormWindow::breakLayoutCommand(TQWidget * w)
{
- TQObjectList *l = (TQObjectList *) w->children();
- if (!l)
+ TQObjectList l = w->childrenListObject();
+ if (l.isEmpty())
return 0;
TQWidgetList widgets;
- for (TQObject * o = l->first(); o; o = l->next())
+ for (TQObject * o = l.first(); o; o = l.next())
{
if (o->isWidgetType() &&
- !mainWindow()->isAToolBarChild((TQWidget *) o) &&
- ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.find((TQWidget *) o))
+ !mainWindow()->isAToolBarChild(TQT_TQOBJECT(o)) &&
+ ((TQWidget *) o)->isVisibleTo(this) && insertedWidgets.tqfind((TQWidget *) o))
widgets.append((TQWidget *) o);
}
return new BreakLayoutCommand(i18n("Break Layout"), this,
@@ -2102,7 +2102,7 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const
for (TQObject *o = l->first(); o; o = l->next())
if (o->isWidgetType() && ((TQWidget*)o)->isVisibleTo((FormWindow*)this) &&
- insertedWidgets.find((TQWidget*)o))
+ insertedWidgets.tqfind((TQWidget*)o))
{
delete l;
return true;
@@ -2113,13 +2113,13 @@ bool FormWindow::hasInsertedChildren(TQWidget *w) const
bool FormWindow::allowMove(TQWidget *w)
{
- w = w->parentWidget();
+ w = w->tqparentWidget();
while (w)
{
- if ((isMainContainer(w) || insertedWidgets.find(w)) && WidgetFactory::layoutType(w) ==
+ if ((isMainContainer(TQT_TQOBJECT(w)) || insertedWidgets.tqfind(w)) && WidgetFactory::tqlayoutType(w) ==
WidgetFactory::NoLayout)
return true;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
return false;
}
@@ -2152,8 +2152,8 @@ void FormWindow::restoreConnectionLine()
if (!unclippedPainter || !buffer)
return;
- int a =QABS(connectStartPos.x() - currentConnectPos.x());
- int b = QABS(connectStartPos.y() - currentConnectPos.y());
+ int a =TQABS(connectStartPos.x() - currentConnectPos.x());
+ int b = TQABS(connectStartPos.y() - currentConnectPos.y());
TQRect r(connectStartPos, currentConnectPos);
if (a < 32 || b < 32)
@@ -2197,7 +2197,7 @@ void FormWindow::restoreConnectionLine()
w = h = 64;
r = r.normalize();
- while (r.contains(p))
+ while (r.tqcontains(p))
{
unclippedPainter->drawPixmap(p, *buffer, TQRect(p, TQSize(w, h)));
unclippedPainter->setPen(red);
@@ -2274,7 +2274,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt)
int num = 1;
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current();)
- if (it.current() != w && !qstrcmp(it.current()->name(), s.latin1()))
+ if (TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && !qstrcmp(it.current()->name(), s.latin1()))
{
found = true;
if (!changeIt)
@@ -2328,7 +2328,7 @@ bool FormWindow::unify(TQObject *w, TQString &s, bool changeIt)
}
if (!found)
{
- TQObjectList *l = mainContainer()->queryList("QDesignerPopupMenu", 0, true);
+ TQObjectList *l = mainContainer()->queryList("TQDesignerPopupMenu", 0, true);
for (TQObject *o = l->first(); o; o = l->next())
if (o != w && !qstrcmp(o->name(), s.latin1()))
{
@@ -2351,7 +2351,7 @@ bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w)
{
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current(); ++it)
- if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(it.current()),
+ if (it.current()->isA("CustomWidget") && !qstrcmp(WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())),
w->className.utf8()))
return true;
return false;
@@ -2359,14 +2359,14 @@ bool FormWindow::isCustomWidgetUsed(MetaDataBase::CustomWidget *w)
bool FormWindow::isDatabaseWidgetUsed() const
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQStringList dbClasses;
dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here
TQPtrDictIterator<TQWidget> it(insertedWidgets);
for (; it.current(); ++it)
{
TQString c(it.current()->className());
- if (dbClasses.contains(c) > 0)
+ if (dbClasses.tqcontains(c) > 0)
return true;
}
#endif
@@ -2375,9 +2375,9 @@ bool FormWindow::isDatabaseWidgetUsed() const
bool FormWindow::isDatabaseAware() const
{
-#ifndef QT_NO_SQL
- if (TQString(mContainer->className()) == "QDesignerDataBrowser" ||
- TQString(mContainer->className()) == "QDesignerDataView")
+#ifndef TQT_NO_SQL
+ if (TQString(mContainer->className()) == "TQDesignerDataBrowser" ||
+ TQString(mContainer->className()) == "TQDesignerDataView")
return true;
return isDatabaseWidgetUsed();
#else
@@ -2388,7 +2388,7 @@ bool FormWindow::isDatabaseAware() const
void FormWindow::visibilityChanged()
{
if (currTool != ORDER_TOOL)
- emitUpdateProperties(currentWidget());
+ emitUpdateProperties(TQT_TQOBJECT(currentWidget()));
else
{
updateOrderIndicators();
@@ -2407,10 +2407,10 @@ TQPoint FormWindow::mapToForm(const TQWidget* w, const TQPoint& pos) const
{
TQPoint p = pos;
const TQWidget* i = w;
- while (i && !i->isTopLevel() && !isMainContainer((TQWidget*)i))
+ while (i && !i->isTopLevel() && !isMainContainer(TQT_TQOBJECT(const_cast<TQWidget*>(i))))
{
p = i->mapToParent(p);
- i = i->parentWidget();
+ i = i->tqparentWidget();
}
return mapFromGlobal(w->mapToGlobal(pos));
}
@@ -2421,7 +2421,7 @@ static int widgetDepth(TQWidget *w)
while (w && !w->isTopLevel())
{
d++;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
return d;
@@ -2433,7 +2433,7 @@ static bool isChildOf(TQWidget *c, TQWidget *p)
{
if (c == p)
return true;
- c = c->parentWidget();
+ c = c->tqparentWidget();
}
return false;
}
@@ -2444,7 +2444,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
TQWidget *container = 0;
int depth = -1;
TQWidgetList selected = selectedWidgets();
- if (rect().contains(mapFromGlobal(pos)))
+ if (TQT_TQRECT_OBJECT(rect()).tqcontains(mapFromGlobal(pos)))
{
container = mainContainer();
depth = widgetDepth(container);
@@ -2457,26 +2457,26 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
continue;
if (!it.current()->isVisibleTo(this))
continue;
- if (selected.find(it.current()) != -1)
+ if (selected.tqfind(it.current()) != -1)
continue;
if (!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(
- WidgetFactory::classNameOf(it.current()))) && it.current() != mainContainer())
+ WidgetFactory::classNameOf(TQT_TQOBJECT(it.current())))) && it.current() != mainContainer())
continue;
// the rectangles of all ancestors of the container must contain the insert position
TQWidget *w = it.current();
while (w && !w->isTopLevel())
{
- if (!w->rect().contains((w->mapFromGlobal(pos))))
+ if (!TQT_TQRECT_OBJECT(w->rect()).tqcontains((w->mapFromGlobal(pos))))
break;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
if (w && !w->isTopLevel()) continue; // we did not get through the full while loop
int wd = widgetDepth(it.current());
- if (wd == depth && container && ((TQObjectList*)it.current()->parentWidget()->
- children())->find(it.current()) >
- ((TQObjectList*)container->parentWidget()->children())->find(container))
+ if (wd == depth && container && (it.current()->tqparentWidget()->
+ childrenListObject()).tqfind(TQT_TQOBJECT(it.current())) >
+ (container->tqparentWidget()->childrenListObject()).tqfind(TQT_TQOBJECT(container)))
wd++;
if (wd > depth && !isChildOf(it.current(), notParentOf)) {
depth = wd;
@@ -2489,7 +2489,7 @@ TQWidget *FormWindow::containerAt(const TQPoint &pos, TQWidget *notParentOf)
bool FormWindow::isMainContainer(TQObject *w) const
{
- return w && w->isWidgetType() && (w == (TQWidget*)this || w == mainContainer());
+ return w && w->isWidgetType() && (TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(mainContainer()));
}
void FormWindow::setMainContainer(TQWidget *w)
@@ -2497,20 +2497,20 @@ void FormWindow::setMainContainer(TQWidget *w)
bool resetPropertyWidget = isMainContainer(propertyWidget);
if (mContainer)
insertedWidgets.remove(mContainer);
- if (propertyWidget == mContainer)
+ if (TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer))
propertyWidget = 0;
delete mContainer;
mContainer = w;
insertedWidgets.insert(mContainer, mContainer);
- delete layout();
+ delete tqlayout();
TQHBoxLayout *l = new TQHBoxLayout(this);
l->addWidget(w);
if (resetPropertyWidget)
{
TQObject *opw = propertyWidget;
- propertyWidget = mContainer;
+ propertyWidget = TQT_TQOBJECT(mContainer);
if (opw && opw->isWidgetType())
- repaintSelection((TQWidget*)opw);
+ tqrepaintSelection((TQWidget*)opw);
}
}
@@ -2567,7 +2567,7 @@ bool FormWindow::isCentralWidget(TQObject *w) const
{
if (!mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING))
return false;
- return w == ((TQMainWindow*)mainContainer())->centralWidget();
+ return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(((TQMainWindow*)mainContainer())->centralWidget());
}
TQObject *FormWindow::connectableObject(TQObject *w, TQObject *)
@@ -2575,12 +2575,12 @@ TQObject *FormWindow::connectableObject(TQObject *w, TQObject *)
return w;
}
-int FormWindow::layoutDefaultSpacing() const
+int FormWindow::tqlayoutDefaultSpacing() const
{
return defSpacing;
}
-int FormWindow::layoutDefaultMargin() const
+int FormWindow::tqlayoutDefaultMargin() const
{
return defMargin;
}
diff --git a/kommander/editor/formwindow.h b/kommander/editor/formwindow.h
index fd0964e7..214ea668 100644
--- a/kommander/editor/formwindow.h
+++ b/kommander/editor/formwindow.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
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
@@ -49,20 +49,21 @@ class TQPixmap;
class TQSizeGrip;
class FormFile;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
#include "orderindicator.h"
#else
class OrderIndicator;
#endif
-class FormWindow : public QWidget
+class FormWindow : public TQWidget
{
Q_OBJECT
- Q_PROPERTY( TQString fileName READ fileName WRITE setFileName )
+ TQ_OBJECT
+ TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
public:
- FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name = 0 );
- FormWindow( FormFile *f, TQWidget *parent, const char *name = 0 );
+ FormWindow( FormFile *f, MainWindow *mw, TQWidget *tqparent, const char *name = 0 );
+ FormWindow( FormFile *f, TQWidget *tqparent, const char *name = 0 );
~FormWindow();
void init();
@@ -79,20 +80,20 @@ public:
virtual void undo();
virtual void redo();
virtual TQString copy();
- virtual void paste( const TQString &cb, TQWidget *parent );
+ virtual void paste( const TQString &cb, TQWidget *tqparent );
virtual void lowerWidgets();
virtual void raiseWidgets();
virtual void checkAccels();
- virtual void layoutHorizontal();
- virtual void layoutVertical();
- virtual void layoutHorizontalSplit();
- virtual void layoutVerticalSplit();
- virtual void layoutGrid();
+ virtual void tqlayoutHorizontal();
+ virtual void tqlayoutVertical();
+ virtual void tqlayoutHorizontalSplit();
+ virtual void tqlayoutVerticalSplit();
+ virtual void tqlayoutGrid();
- virtual void layoutHorizontalContainer( TQWidget *w );
- virtual void layoutVerticalContainer( TQWidget *w );
- virtual void layoutGridContainer( TQWidget *w );
+ virtual void tqlayoutHorizontalContainer( TQWidget *w );
+ virtual void tqlayoutVerticalContainer( TQWidget *w );
+ virtual void tqlayoutGridContainer( TQWidget *w );
virtual void breakLayout( TQWidget *w );
@@ -100,7 +101,7 @@ public:
virtual void selectAll();
virtual void updateSelection( TQWidget *w );
virtual void raiseSelection( TQWidget *w );
- virtual void repaintSelection( TQWidget *w );
+ virtual void tqrepaintSelection( TQWidget *w );
virtual void clearSelection( bool changePropertyDisplay = TRUE );
virtual void selectWidgets();
bool isWidgetSelected( TQObject *w );
@@ -177,8 +178,8 @@ public:
void killAccels( TQObject *top );
- int layoutDefaultSpacing() const;
- int layoutDefaultMargin() const;
+ int tqlayoutDefaultSpacing() const;
+ int tqlayoutDefaultMargin() const;
void setLayoutDefaultSpacing( int s );
void setLayoutDefaultMargin( int s );
diff --git a/kommander/editor/functions.ui b/kommander/editor/functions.ui
index 48616099..35d53c2c 100644
--- a/kommander/editor/functions.ui
+++ b/kommander/editor/functions.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FunctionsDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>FunctionsDialogBase</cstring>
</property>
@@ -22,15 +22,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="2">
+ <widget class="TQLayoutWidget" row="0" column="2">
<property name="name">
- <cstring>layout7_2</cstring>
+ <cstring>tqlayout7_2</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -42,7 +42,7 @@
<property name="name">
<cstring>descriptionText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>200</width>
<height>0</height>
@@ -51,15 +51,15 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout7</cstring>
+ <cstring>tqlayout7</cstring>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -82,14 +82,14 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -115,11 +115,11 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox" row="0" column="1">
+ <widget class="TQGroupBox" row="0" column="1">
<property name="name">
<cstring>groupBox1</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>250</width>
<height>0</height>
@@ -132,7 +132,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="6" column="0">
+ <widget class="TQLabel" row="6" column="0">
<property name="name">
<cstring>argLabel3</cstring>
</property>
@@ -140,7 +140,7 @@
<string>Arg3</string>
</property>
</widget>
- <widget class="QLabel" row="10" column="0">
+ <widget class="TQLabel" row="10" column="0">
<property name="name">
<cstring>argLabel5</cstring>
</property>
@@ -158,7 +158,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>16</height>
@@ -177,7 +177,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>32</height>
@@ -190,7 +190,7 @@
<string>Insert function</string>
</property>
</widget>
- <widget class="QLabel" row="8" column="0">
+ <widget class="TQLabel" row="8" column="0">
<property name="name">
<cstring>argLabel4</cstring>
</property>
@@ -211,9 +211,9 @@
</sizepolicy>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -232,7 +232,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote1</cstring>
</property>
@@ -255,7 +255,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>argLabel1</cstring>
</property>
@@ -263,9 +263,9 @@
<string>Arg1</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="5" column="0">
+ <widget class="TQLayoutWidget" row="5" column="0">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<hbox>
<property name="name">
@@ -287,7 +287,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote2</cstring>
</property>
@@ -310,9 +310,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="7" column="0">
+ <widget class="TQLayoutWidget" row="7" column="0">
<property name="name">
- <cstring>layout13</cstring>
+ <cstring>tqlayout13</cstring>
</property>
<hbox>
<property name="name">
@@ -331,7 +331,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote3</cstring>
</property>
@@ -354,7 +354,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>widgetLabel</cstring>
</property>
@@ -362,9 +362,9 @@
<string>Widget:</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="9" column="0">
+ <widget class="TQLayoutWidget" row="9" column="0">
<property name="name">
- <cstring>layout14</cstring>
+ <cstring>tqlayout14</cstring>
</property>
<hbox>
<property name="name">
@@ -383,7 +383,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote4</cstring>
</property>
@@ -406,9 +406,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="11" column="0">
+ <widget class="TQLayoutWidget" row="11" column="0">
<property name="name">
- <cstring>layout15</cstring>
+ <cstring>tqlayout15</cstring>
</property>
<hbox>
<property name="name">
@@ -427,7 +427,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote5</cstring>
</property>
@@ -450,9 +450,9 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="13" column="0">
+ <widget class="TQLayoutWidget" row="13" column="0">
<property name="name">
- <cstring>layout16</cstring>
+ <cstring>tqlayout16</cstring>
</property>
<hbox>
<property name="name">
@@ -471,7 +471,7 @@
</sizepolicy>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>quote6</cstring>
</property>
@@ -494,7 +494,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="12" column="0">
+ <widget class="TQLabel" row="12" column="0">
<property name="name">
<cstring>argLabel6</cstring>
</property>
@@ -502,7 +502,7 @@
<string>Arg6</string>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>argLabel2</cstring>
</property>
@@ -512,9 +512,9 @@
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout6</cstring>
+ <cstring>tqlayout6</cstring>
</property>
<hbox>
<property name="name">
@@ -530,7 +530,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>20</height>
@@ -578,7 +578,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>100</width>
<height>20</height>
@@ -587,17 +587,17 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout12</cstring>
+ <cstring>tqlayout12</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
- <cstring>layout11</cstring>
+ <cstring>tqlayout11</cstring>
</property>
<hbox>
<property name="name">
@@ -607,7 +607,7 @@
<property name="name">
<cstring>clearButton</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>20</height>
@@ -623,7 +623,7 @@
<string>Clear edited text</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -695,7 +695,7 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>ktextbrowser.h</includehint>
<includehint>kcombobox.h</includehint>
diff --git a/kommander/editor/functionsimpl.cpp b/kommander/editor/functionsimpl.cpp
index a758ab30..991377f8 100644
--- a/kommander/editor/functionsimpl.cpp
+++ b/kommander/editor/functionsimpl.cpp
@@ -130,13 +130,13 @@ TQString FunctionsDialog::currentFunctionText()
function = s + ".";
}
if (groupComboBox->currentText() == "Kommander")
- return TQString("%1%2%3").arg(prefix).arg(functionListBox->currentText()).arg(params());
+ return TQString("%1%2%3").tqarg(prefix).tqarg(functionListBox->currentText()).tqarg(params());
else if (groupComboBox->currentItem() == m_DCOP || groupComboBox->currentItem() == m_Slots)
- return TQString("%1%2.%3%4").arg(prefix).arg(widgetComboBox->currentText().section(' ', 0, 0))
- .arg(functionListBox->currentText().left(functionListBox->currentText().find('('))).arg(params());
+ return TQString("%1%2.%3%4").tqarg(prefix).tqarg(widgetComboBox->currentText().section(' ', 0, 0))
+ .tqarg(functionListBox->currentText().left(functionListBox->currentText().tqfind('('))).tqarg(params());
else
- return TQString("%1%2%3%4").arg(prefix).arg(function)
- .arg(functionListBox->currentText()).arg(params());
+ return TQString("%1%2%3%4").tqarg(prefix).tqarg(function)
+ .tqarg(functionListBox->currentText()).tqarg(params());
}
void FunctionsDialog::groupChanged(int index)
@@ -147,15 +147,15 @@ void FunctionsDialog::groupChanged(int index)
if (index == m_Slots)
{
KommanderWidget* a_atw = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
- TQStringList pFunctions = TQStringList::fromStrList(a_atw->object()->metaObject()->slotNames(true));
+ TQStringList pFunctions = TQStringList::fromStrList(a_atw->object()->tqmetaObject()->slotNames(true));
for (uint i=0; i<pFunctions.count(); i++)
{
TQString slot = pFunctions[i];
TQString slotArgStr = slot.section(TQRegExp("\\(|\\)"), 1);
- if (slotArgStr.isEmpty() || m_acceptedSlots.contains(slotArgStr))
+ if (slotArgStr.isEmpty() || m_acceptedSlots.tqcontains(slotArgStr))
{
TQString name = slot.remove("()");
- if (!m_slotList.contains(name))
+ if (!m_slotList.tqcontains(name))
{
m_slotList[name] = slot;
functionListBox->insertItem(name);
@@ -195,13 +195,13 @@ void FunctionsDialog::functionChanged(int)
{
KommanderWidget* w = dynamic_cast<KommanderWidget *>(m_widgetList[widgetComboBox->currentText()]);
TQObject *o = w->object();
- TQString slotHelp = i18n("To learn more about the slot, look at the documentation of the base Qt/KDE class, most probably <i>%1</i>.").arg(o->metaObject()->superClassName() ? TQString(o->metaObject()->superClassName()) : TQString(o->className()) );
+ TQString slotHelp = i18n("To learn more about the slot, look at the documentation of the base TQt/KDE class, most probably <i>%1</i>.").tqarg(o->tqmetaObject()->tqsuperClassName() ? TQString(o->tqmetaObject()->tqsuperClassName()) : TQString(o->className()) );
TQString slotName = functionListBox->currentText();
TQString slot = m_slotList[slotName];
descriptionText->clear();
descriptionText->setText(i18n("<qt><h3>%1</h3>"
"<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
- .arg(slotName).arg(slotHelp).arg(slot).arg(""));
+ .tqarg(slotName).tqarg(slotHelp).tqarg(slot).tqarg(""));
} else
{
int index = groupComboBox->currentItem();
@@ -224,8 +224,8 @@ void FunctionsDialog::functionChanged(int)
descriptionText->clear();
descriptionText->setText(i18n("<qt><h3>%1</h3>"
"<p><b>Description:</b> %2\n<p><b>Syntax:</b> <i>%3</i>%4</qt>")
- .arg(functionListBox->currentText()).arg(m_function.description())
- .arg(m_function.prototype(pflags)).arg(defArgs));
+ .tqarg(functionListBox->currentText()).tqarg(m_function.description())
+ .tqarg(m_function.prototype(pflags)).tqarg(defArgs));
}
showParameters();
@@ -238,7 +238,7 @@ void FunctionsDialog::copyText()
insertedText->getCursorPosition(&para, &i);
// int cursorPos = insertedText->cursorPosition();
insertedText->insert(text);
- insertedText->setCursorPosition(para, i + text.find('(') + 1);
+ insertedText->setCursorPosition(para, i + text.tqfind('(') + 1);
}
void FunctionsDialog::showParameters()
@@ -262,7 +262,7 @@ void FunctionsDialog::showParameters()
if (i < argsCount)
{
type = slotArgs[i].remove(TQRegExp("\\*|\\&|const\\s"));
- labels[i]->setText(TQString("%1:").arg(type));
+ labels[i]->setText(TQString("%1:").tqarg(type));
}
quotes[i]->setChecked(true);
quotes[i]->setShown(false);
@@ -279,7 +279,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
- if (type == "TQString")
+ if (type == TQSTRING_OBJECT_NAME_STRING)
{
quotes[i]->setShown(i < argsCount);
}
@@ -303,7 +303,7 @@ void FunctionsDialog::showParameters()
{
labels[i]->setShown(i < argsCount);
if (i < argsCount)
- labels[i]->setText(TQString("%1:").arg(m_function.argumentName(i)));
+ labels[i]->setText(TQString("%1:").tqarg(m_function.argumentName(i)));
quotes[i]->setChecked(true);
quotes[i]->setShown(false);
if (m_function.argumentType(i) == "bool")
@@ -336,7 +336,7 @@ void FunctionsDialog::showParameters()
combos[i]->setShown(false);
edits[i]->setShown(i < argsCount);
edits[i]->clear();
- if (m_function.argumentType(i) == "TQString")
+ if (m_function.argumentType(i) == TQSTRING_OBJECT_NAME_STRING)
{
quotes[i]->setShown(i < argsCount);
}
@@ -362,8 +362,8 @@ TQString FunctionsDialog::params()
TQString s = edits[i]->text();
if (!s.isEmpty() || i < m_function.minArg())
{
- if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == "TQString")
- || (slotsShown && labels[i]->text().startsWith("TQString")) ) )
+ if (quotes[i]->isChecked() && ( (!slotsShown && m_function.argumentType(i) == TQSTRING_OBJECT_NAME_STRING)
+ || (slotsShown && labels[i]->text().startsWith(TQSTRING_OBJECT_NAME_STRING)) ) )
s = '"' + s + '"';
pars.append(s);
}
@@ -383,7 +383,7 @@ TQString FunctionsDialog::params()
}
TQString a_param = pars.join(", ");
if (params)
- return TQString("(%1)").arg(a_param);
+ return TQString("(%1)").tqarg(a_param);
else
return a_param;
}
diff --git a/kommander/editor/functionsimpl.h b/kommander/editor/functionsimpl.h
index 05df768f..a583f199 100644
--- a/kommander/editor/functionsimpl.h
+++ b/kommander/editor/functionsimpl.h
@@ -26,6 +26,7 @@
class FunctionsDialog : public FunctionsDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
FunctionsDialog(TQWidget*, const TQDict<TQWidget>&, bool m_useInternalParser, char* = 0, bool = true);
~FunctionsDialog();
diff --git a/kommander/editor/globaldefs.h b/kommander/editor/globaldefs.h
index aebf63c3..45698cde 100644
--- a/kommander/editor/globaldefs.h
+++ b/kommander/editor/globaldefs.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
diff --git a/kommander/editor/hierarchyview.cpp b/kommander/editor/hierarchyview.cpp
index 57dc817c..5907b348 100644
--- a/kommander/editor/hierarchyview.cpp
+++ b/kommander/editor/hierarchyview.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 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
@@ -74,15 +74,15 @@ static const char * const folder_xpm[]={
TQListViewItem *newItem = 0;
-HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent,
+HierarchyItem::HierarchyItem( Type type, TQListViewItem *tqparent,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( tqparent, txt1, txt2, txt3 ), typ( type )
{
}
-HierarchyItem::HierarchyItem( Type type, TQListView *parent,
+HierarchyItem::HierarchyItem( Type type, TQListView *tqparent,
const TQString &txt1, const TQString &txt2, const TQString &txt3 )
- : TQListViewItem( parent, txt1, txt2, txt3 ), typ( type )
+ : TQListViewItem( tqparent, txt1, txt2, txt3 ), typ( type )
{
}
@@ -90,8 +90,8 @@ void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
{
TQColorGroup g( cg );
g.setColor( TQColorGroup::Base, backgroundColor() );
- g.setColor( TQColorGroup::Foreground, Qt::black );
- g.setColor( TQColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Foreground, TQt::black );
+ g.setColor( TQColorGroup::Text, TQt::black );
TQString txt = text( 0 );
if ( rtti() == Slot &&
( txt == "init()" || txt == "destroy()" ) ) {
@@ -177,8 +177,8 @@ void HierarchyItem::cancelRename( int col )
-HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects )
- : TQListView( parent ), formWindow( fw )
+HierarchyList::HierarchyList( TQWidget *tqparent, FormWindow *fw, bool doConnects )
+ : TQListView( tqparent ), formWindow( fw )
{
init_colors();
@@ -250,21 +250,21 @@ void HierarchyList::objectClicked( TQListViewItem *i )
if ( formWindow == w ) {
if ( deselect )
formWindow->clearSelection( false );
- formWindow->emitShowProperties( formWindow );
+ formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) );
return;
}
- if ( !formWindow->widgets()->find( w ) ) {
- if ( w->parent() && w->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
- w->parent()->parent() &&
- ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
- w->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) {
- if ( w->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- ( (TQTabWidget*)w->parent()->parent() )->showPage( w );
+ if ( !formWindow->widgets()->tqfind( w ) ) {
+ if ( w->tqparent() && w->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
+ w->tqparent()->tqparent() &&
+ ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
+ w->tqparent()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) ) {
+ if ( w->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ ( (TQTabWidget*)w->tqparent()->tqparent() )->showPage( w );
else
- ( (QDesignerWizard*)w->parent()->parent() )->setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
- w = (TQWidget*)w->parent()->parent();
- formWindow->emitUpdateProperties( formWindow->currentWidget() );
+ ( (TQDesignerWizard*)w->tqparent()->tqparent() )->setCurrentPage( ( (TQDesignerWizard*)w->tqparent()->tqparent() )->pageNum( w ) );
+ w = (TQWidget*)w->tqparent()->tqparent();
+ formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
} else {
return;
}
@@ -273,7 +273,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
if ( deselect )
formWindow->clearSelection( false );
if ( w->isVisibleTo( formWindow ) )
- formWindow->selectWidget( w, true );
+ formWindow->selectWidget( TQT_TQOBJECT(w), true );
}
TQWidget *HierarchyList::findWidget( TQListViewItem *i )
@@ -310,7 +310,7 @@ void HierarchyList::changeNameOf( TQWidget *w, const TQString &name )
void HierarchyList::changeDatabaseOf( TQWidget *w, const TQString & info )
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( !formWindow->isDatabaseAware() )
return;
TQListViewItem *item = findItem( w );
@@ -329,7 +329,7 @@ void HierarchyList::setup()
return;
clear();
TQWidget *w = formWindow->mainContainer();
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( formWindow->isDatabaseAware() ) {
if ( columns() == 2 ) {
addColumn( i18n("Database" ) );
@@ -345,7 +345,7 @@ void HierarchyList::setup()
}
#endif
if ( w )
- insertObject( w, 0 );
+ insertObject( TQT_TQOBJECT(w), 0 );
}
void HierarchyList::setOpen( TQListViewItem *i, bool b )
@@ -353,11 +353,11 @@ void HierarchyList::setOpen( TQListViewItem *i, bool b )
TQListView::setOpen( i, b );
}
-void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
+void HierarchyList::insertObject( TQObject *o, TQListViewItem *tqparent )
{
bool fakeMainWindow = false;
if ( o && o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
- TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
+ TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
if ( cw ) {
o = cw;
fakeMainWindow = true;
@@ -366,7 +366,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
TQListViewItem *item = 0;
TQString className = WidgetFactory::classNameOf( o );
if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) ) {
- switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
+ switch ( WidgetFactory::tqlayoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
break;
@@ -382,79 +382,79 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
}
TQString dbInfo;
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join(".");
#endif
TQString name = o->name();
- if ( o->parent() && o->parent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
- o->parent()->parent() ) {
- if ( o->parent()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
- else if ( o->parent()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
- name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
+ if ( o->tqparent() && o->tqparent()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) &&
+ o->tqparent()->tqparent() ) {
+ if ( o->tqparent()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ name = ( (TQTabWidget*)o->tqparent()->tqparent() )->tabLabel( (TQWidget*)o );
+ else if ( o->tqparent()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ name = ( (TQWizard*)o->tqparent()->tqparent() )->title( (TQWidget*)o );
}
TQToolBox *tb;
- if ( o->parent() && o->parent()->parent() &&
- (tb = ::qt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
+ if ( o->tqparent() && o->tqparent()->tqparent() &&
+ (tb = ::tqqt_cast<TQToolBox*>(o->tqparent()->tqparent()->tqparent())) )
name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) {
- name = o->parent()->name();
+ name = o->tqparent()->name();
className = TQMAINWINDOW_OBJECT_NAME_STRING;
}
- if ( !parent )
+ if ( !tqparent )
item = new HierarchyItem( HierarchyItem::Widget, this, name, className, dbInfo );
else
- item = new HierarchyItem( HierarchyItem::Widget, parent, name, className, dbInfo );
- if ( !parent )
+ item = new HierarchyItem( HierarchyItem::Widget, tqparent, name, className, dbInfo );
+ if ( !tqparent )
item->setPixmap( 0, PixmapChooser::loadPixmap( "form.xpm", PixmapChooser::Mini ) );
- else if ( o->inherits( "QLayoutWidget") )
- item->setPixmap( 0, PixmapChooser::loadPixmap( "layout.xpm", PixmapChooser::Small ) );
+ else if ( o->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
+ item->setPixmap( 0, PixmapChooser::loadPixmap( "tqlayout.xpm", PixmapChooser::Small ) );
else
item->setPixmap( 0, WidgetDatabase::iconSet( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
pixmap( TQIconSet::Small, TQIconSet::Normal ) );
( (HierarchyItem*)item )->setWidget( (TQWidget*)o );
- const TQObjectList *l = o->children();
- if ( !l )
+ const TQObjectList l = o->childrenListObject();
+ if ( l.isEmpty() )
return;
- TQObjectListIt it( *l );
+ TQObjectListIt it( l );
it.toLast();
for ( ; it.current(); --it ) {
if ( !it.current()->isWidgetType() || ( (TQWidget*)it.current() )->isHidden() )
continue;
- if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
- if ( it.current()->parent() &&
- ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
- it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) &&
+ if ( !formWindow->widgets()->tqfind( (TQWidget*)it.current() ) ) {
+ if ( it.current()->tqparent() &&
+ ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ||
+ it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) &&
it.current()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) ) {
TQObject *obj = it.current();
TQObjectList *l2 = obj->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, true, false );
- QDesignerTabWidget *tw = 0;
- QDesignerWizard *dw = 0;
- if ( it.current()->parent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
- tw = (QDesignerTabWidget*)it.current()->parent();
- if ( it.current()->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
- dw = (QDesignerWizard*)it.current()->parent();
+ TQDesignerTabWidget *tw = 0;
+ TQDesignerWizard *dw = 0;
+ if ( it.current()->tqparent()->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ tw = (TQDesignerTabWidget*)it.current()->tqparent();
+ if ( it.current()->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ dw = (TQDesignerWizard*)it.current()->tqparent();
TQWidgetStack *stack = (TQWidgetStack*)obj;
for ( obj = l2->last(); obj; obj = l2->prev() ) {
- if ( qstrcmp( obj->className(), "QWidgetStackPrivate::Invisible" ) == 0 ||
+ if ( qstrcmp( obj->className(), "TQWidgetStackPrivate::Invisible" ) == 0 ||
( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) ||
( dw && dw->isPageRemoved( (TQWidget*)obj ) ) )
continue;
insertObject( obj, item );
}
delete l2;
- } else if ( ::qt_cast<TQToolBox*>(it.current()->parent()) ) {
- if ( !::qt_cast<TQScrollView*>(it.current()) )
+ } else if ( ::tqqt_cast<TQToolBox*>(it.current()->tqparent()) ) {
+ if ( !::tqqt_cast<TQScrollView*>(it.current()) )
continue;
- TQToolBox *tb = (TQToolBox*)it.current()->parent();
+ TQToolBox *tb = (TQToolBox*)it.current()->tqparent();
for ( int i = tb->count() - 1; i >= 0; --i )
- insertObject( tb->item( i ), item );
+ insertObject( TQT_TQOBJECT(tb->item( i )), item );
}
continue;
}
@@ -491,7 +491,7 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
return;
if ( w != formWindow &&
- !formWindow->widgets()->find( w ) )
+ !formWindow->widgets()->tqfind( w ) )
return;
if ( w->isVisibleTo( formWindow ) ) {
@@ -516,13 +516,13 @@ void HierarchyList::addTabPage()
return;
if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
TQTabWidget *tw = (TQTabWidget*)w;
- AddTabPageCommand *cmd = new AddTabPageCommand( i18n("Add Page to %1" ).arg( tw->name() ), formWindow,
+ AddTabPageCommand *cmd = new AddTabPageCommand( i18n("Add Page to %1" ).tqarg( tw->name() ), formWindow,
tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
} else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
- AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wiz->name() ), formWindow,
+ AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).tqarg( wiz->name() ), formWindow,
wiz, "Page" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -537,9 +537,9 @@ void HierarchyList::removeTabPage()
if ( w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
- QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
+ TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = new DeleteTabPageCommand( i18n("Delete Page %1 of %2" ).
- arg( dtw->pageTitle() ).arg( tw->name() ),
+ tqarg( dtw->pageTitle() ).tqarg( tw->name() ),
formWindow, tw, tw->currentPage() );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
@@ -547,9 +547,9 @@ void HierarchyList::removeTabPage()
} else if ( w->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
- QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" ).
- arg( dw->pageTitle() ).arg( wiz->name() ),
+ tqarg( dw->pageTitle() ).tqarg( wiz->name() ),
formWindow, wiz,
wiz->indexOf( wiz->currentPage() ), true );
formWindow->commandHistory()->addCommand( cmd );
@@ -587,19 +587,19 @@ static HierarchyItem::Type getChildType( int type )
void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s )
{
HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, s,
- TQString::null, TQString::null );
+ TQString(), TQString() );
if ( !pix.isNull() )
item->setPixmap( 0, pix );
item->setRenameEnabled( 0, true );
setCurrentItem( item );
ensureItemVisible( item );
- qApp->processEvents();
+ tqApp->processEvents();
newItem = item;
item->startRename( 0 );
}
-HierarchyView::HierarchyView( TQWidget *parent )
- : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+HierarchyView::HierarchyView( TQWidget *tqparent )
+ : TQTabWidget( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
formwindow = 0;
@@ -685,7 +685,7 @@ void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info )
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQString i = info.join( "." );
listview->changeDatabaseOf( w, i );
#else
diff --git a/kommander/editor/hierarchyview.h b/kommander/editor/hierarchyview.h
index 8e833962..f3f1fc91 100644
--- a/kommander/editor/hierarchyview.h
+++ b/kommander/editor/hierarchyview.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,7 +25,7 @@
#include <tqlistview.h>
#include <tqtabwidget.h>
#include <tqguardedptr.h>
-#include <private/qcom_p.h>
+#include <private/tqcom_p.h>
class FormWindow;
class TQCloseEvent;
@@ -35,7 +35,7 @@ class TQMouseEvent;
class TQWizard;
class TQToolBox;
-class HierarchyItem:public QListViewItem
+class HierarchyItem:public TQListViewItem
{
public:
enum Type
@@ -52,9 +52,9 @@ public:
EventFunction
};
- HierarchyItem(Type type, TQListViewItem * parent,
+ HierarchyItem(Type type, TQListViewItem * tqparent,
const TQString & txt1, const TQString & txt2, const TQString & txt3);
- HierarchyItem(Type type, TQListView * parent,
+ HierarchyItem(Type type, TQListView * tqparent,
const TQString & txt1, const TQString & txt2, const TQString & txt3);
void paintCell(TQPainter * p, const TQColorGroup & cg, int column, int width, int align);
@@ -77,11 +77,12 @@ private:
Type typ;
};
-class HierarchyList:public QListView
+class HierarchyList:public TQListView
{
- Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- HierarchyList(TQWidget * parent, FormWindow * fw, bool doConnects = TRUE);
+ HierarchyList(TQWidget * tqparent, FormWindow * fw, bool doConnects = TRUE);
virtual void setup();
virtual void setCurrent(TQWidget * w);
@@ -93,7 +94,7 @@ public:
{ setUpdatesEnabled(FALSE); triggerUpdate(); setUpdatesEnabled(TRUE);
TQListView::drawContentsOffset(p, ox, oy, cx, cy, cw, ch); }
void insertEntry(TQListViewItem * i, const TQPixmap & pix = TQPixmap(), const TQString & s =
- TQString::null);
+ TQString());
protected:
void keyPressEvent(TQKeyEvent * e);
@@ -106,7 +107,7 @@ public slots:
void removeTabPage();
private:
- void insertObject(TQObject * o, TQListViewItem * parent);
+ void insertObject(TQObject * o, TQListViewItem * tqparent);
TQWidget *findWidget(TQListViewItem * i);
TQListViewItem *findItem(TQWidget * w);
TQWidget *current() const;
@@ -120,12 +121,13 @@ protected:
bool deselect;
};
-class HierarchyView : public QTabWidget
+class HierarchyView : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- HierarchyView( TQWidget *parent );
+ HierarchyView( TQWidget *tqparent );
~HierarchyView();
void setFormWindow( FormWindow *fw, TQWidget *w );
diff --git a/kommander/editor/iconvieweditor.ui b/kommander/editor/iconvieweditor.ui
index afa18459..26d1aa8b 100644
--- a/kommander/editor/iconvieweditor.ui
+++ b/kommander/editor/iconvieweditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>IconViewEditorBase</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -64,7 +64,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QIconView">
+ <widget class="TQIconView">
<property name="name">
<cstring>preview</cstring>
</property>
@@ -72,7 +72,7 @@
<string>All items in the iconview.</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -86,7 +86,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemNew</cstring>
</property>
@@ -100,7 +100,7 @@
<string>Create a new item for the iconview.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemDelete</cstring>
</property>
@@ -124,7 +124,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -133,7 +133,7 @@
</spacer>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -156,7 +156,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>Label1</cstring>
</property>
@@ -167,11 +167,11 @@
<cstring>itemText</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>itemText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -184,7 +184,7 @@
<string>Change the text for the selected item.</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label2</cstring>
</property>
@@ -195,7 +195,7 @@
<cstring>itemChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -209,7 +209,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>itemPixmap</cstring>
</property>
@@ -217,11 +217,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemDeletePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -240,11 +240,11 @@
<string>Delete the selected item's pixmap.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemChoosePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -266,7 +266,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -280,7 +280,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -301,14 +301,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -325,7 +325,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonApply</cstring>
</property>
@@ -339,7 +339,7 @@
<string>Apply all changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -407,15 +407,15 @@
</connection>
<connection>
<sender>preview</sender>
- <signal>selectionChanged(QIconViewItem*)</signal>
+ <signal>selectionChanged(TQIconViewItem*)</signal>
<receiver>IconViewEditorBase</receiver>
- <slot>currentItemChanged(QIconViewItem*)</slot>
+ <slot>currentItemChanged(TQIconViewItem*)</slot>
</connection>
<connection>
<sender>preview</sender>
- <signal>currentChanged(QIconViewItem*)</signal>
+ <signal>currentChanged(TQIconViewItem*)</signal>
<receiver>IconViewEditorBase</receiver>
- <slot>currentItemChanged(QIconViewItem*)</slot>
+ <slot>currentItemChanged(TQIconViewItem*)</slot>
</connection>
<connection>
<sender>itemDeletePixmap</sender>
@@ -428,7 +428,7 @@
<slot access="protected" language="C++" returnType="void">applyClicked()</slot>
<slot access="protected" language="C++" returnType="void">cancelClicked()</slot>
<slot access="protected" language="C++" returnType="void">choosePixmap()</slot>
- <slot access="protected" language="C++" returnType="void">currentItemChanged( QIconViewItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged( TQIconViewItem * )</slot>
<slot access="protected" language="C++" returnType="void">currentTextChanged( const QString &amp; )</slot>
<slot access="protected" language="C++" returnType="void">deleteCurrentItem()</slot>
<slot access="protected" language="C++" returnType="void">insertNewItem()</slot>
diff --git a/kommander/editor/iconvieweditorimpl.cpp b/kommander/editor/iconvieweditorimpl.cpp
index 9bff67ae..549e5c96 100644
--- a/kommander/editor/iconvieweditorimpl.cpp
+++ b/kommander/editor/iconvieweditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -31,8 +31,8 @@
#include <klocale.h>
-IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : IconViewEditorBase( parent, 0, true ), formwindow( fw )
+IconViewEditor::IconViewEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
+ : IconViewEditorBase( tqparent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
iconview = (TQIconView*)editWidget;
@@ -121,7 +121,7 @@ void IconViewEditor::applyClicked()
items.append( item );
}
- PopulateIconViewCommand *cmd = new PopulateIconViewCommand( i18n("Edit Items of '%1'" ).arg( iconview->name() ),
+ PopulateIconViewCommand *cmd = new PopulateIconViewCommand( i18n("Edit Items of '%1'" ).tqarg( iconview->name() ),
formwindow, iconview, items );
cmd->execute();
formwindow->commandHistory()->addCommand( cmd );
diff --git a/kommander/editor/iconvieweditorimpl.h b/kommander/editor/iconvieweditorimpl.h
index ffde0403..4e3972ff 100644
--- a/kommander/editor/iconvieweditorimpl.h
+++ b/kommander/editor/iconvieweditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,9 +28,10 @@ class FormWindow;
class IconViewEditor : public IconViewEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ IconViewEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void insertNewItem();
diff --git a/kommander/editor/kommander-new.xml b/kommander/editor/kommander-new.xml
index deb3d88a..8cfe86e2 100644
--- a/kommander/editor/kommander-new.xml
+++ b/kommander/editor/kommander-new.xml
@@ -25,7 +25,7 @@
<item>cellText</item>
<item>clear</item>
<item>checked</item>
- <item>children</item>
+ <item>tqchildren</item>
<item>columnCount</item>
<item>count</item>
<item>currentColumn</item>
@@ -33,7 +33,7 @@
<item>currentRow</item>
<item>execute</item>
<item>findItem</item>
- <item>geometry</item>
+ <item>tqgeometry</item>
<item>global</item>
<item>hasFocus</item>
<item>insertColumn</item>
@@ -76,7 +76,7 @@
<item>null</item>
<item>pid</item>
<item>dcopid</item>
- <item>parentPid</item>
+ <item>tqparentPid</item>
<item>debug</item>
<item>echo</item>
<item>env</item>
@@ -140,14 +140,14 @@
<list name="kmdrstring">
<item>str_length</item>
- <item>str_contains</item>
- <item>str_find</item>
- <item>str_findRev</item>
+ <item>str_tqcontains</item>
+ <item>str_tqfind</item>
+ <item>str_tqfindRev</item>
<item>str_left</item>
<item>str_right</item>
<item>str_mid</item>
<item>str_remove</item>
- <item>str_replace</item>
+ <item>str_tqreplace</item>
<item>str_upper</item>
<item>str_lower</item>
<item>str_compare</item>
@@ -260,7 +260,7 @@
<!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
<context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
- <!-- start expression in double parentheses -->
+ <!-- start expression in double tqparentheses -->
<Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
<!-- start expression in double brackets -->
<RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
@@ -524,7 +524,7 @@
</context>
<!-- Case is called after the case keyword is encoutered. We handle this because of
- the lonely closing parentheses that would otherwise disturb the expr matching -->
+ the lonely closing tqparentheses that would otherwise disturb the expr matching -->
<context attribute="Normal Text" lineEndContext="#stay" name="Case">
<RegExpr attribute="Keyword" context="CaseIn" String="\sin\b" />
<IncludeRules context="FindAll" />
diff --git a/kommander/editor/kommander.xml b/kommander/editor/kommander.xml
index f5880b2f..cfa64c8a 100644
--- a/kommander/editor/kommander.xml
+++ b/kommander/editor/kommander.xml
@@ -25,14 +25,14 @@
<item>cellText</item>
<item>clear</item>
<item>checked</item>
- <item>children</item>
+ <item>tqchildren</item>
<item>count</item>
<item>currentColumn</item>
<item>currentItem</item>
<item>currentRow</item>
<item>execute</item>
<item>findItem</item>
- <item>geometry</item>
+ <item>tqgeometry</item>
<item>global</item>
<item>hasFocus</item>
<item>insertColumn</item>
@@ -69,7 +69,7 @@
<item>null</item>
<item>pid</item>
<item>dcopid</item>
- <item>parentPid</item>
+ <item>tqparentPid</item>
<item>debug</item>
<item>echo</item>
<item>env</item>
@@ -104,14 +104,14 @@
<list name="kmdrstring">
<item>length</item>
- <item>contains</item>
- <item>find</item>
- <item>findRev</item>
+ <item>tqcontains</item>
+ <item>tqfind</item>
+ <item>tqfindRev</item>
<item>left</item>
<item>right</item>
<item>mid</item>
<item>remove</item>
- <item>replace</item>
+ <item>tqreplace</item>
<item>upper</item>
<item>lower</item>
<item>compare</item>
@@ -341,8 +341,8 @@
<item> true </item>
<item> umount </item>
<item> uname </item>
- <item> unicode_start </item>
- <item> unicode_stop </item>
+ <item> tqunicode_start </item>
+ <item> tqunicode_stop </item>
<item> unlink </item>
<item> utmpdump </item>
<item> uuidgen </item>
@@ -418,7 +418,7 @@
<item> expr </item>
<item> fbset </item>
<item> file </item>
- <item> find </item>
+ <item> tqfind </item>
<item> flex </item>
<item> flex++ </item>
<item> fmt </item>
@@ -598,7 +598,7 @@
<IncludeRules context="##Alerts" />
</context>
- <!-- FindCommentsParen consumes shell comments till EOL or a closing parenthese -->
+ <!-- FindCommentsParen consumes shell comments till EOL or a closing tqparenthese -->
<context attribute="Normal Text" lineEndContext="#pop" name="FindCommentsParen">
<DetectChar attribute="Comment" context="CommentParen" char="#" firstNonSpace="true"/>
<RegExpr attribute="Normal Text" context="CommentParen" String="[\s;](?=#)" />
@@ -621,7 +621,7 @@
<!-- FindCommands matches many items that can be expected outside strings, substitutions etc. -->
<context attribute="Normal Text" lineEndContext="#stay" name="FindCommands">
- <!-- start expression in double parentheses -->
+ <!-- start expression in double tqparentheses -->
<Detect2Chars attribute="Keyword" context="ExprDblParen" char="(" char1="(" beginRegion="expression" />
<!-- start expression in double brackets -->
<RegExpr attribute="Keyword" context="ExprDblBracket" String="\[\[&eos;" beginRegion="expression" column="0"/>
@@ -900,7 +900,7 @@
</context>
<!-- Case is called after the case keyword is encoutered. We handle this because of
- the lonely closing parentheses that would otherwise disturb the expr matching -->
+ the lonely closing tqparentheses that would otherwise disturb the expr matching -->
<context attribute="Normal Text" lineEndContext="#stay" name="Case">
<RegExpr attribute="Keyword" context="CaseIn" String="\sin\b" />
<IncludeRules context="FindMost" />
diff --git a/kommander/editor/layout.cpp b/kommander/editor/layout.cpp
index 7860aeae..998b4fce 100644
--- a/kommander/editor/layout.cpp
+++ b/kommander/editor/layout.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -19,11 +19,11 @@
**********************************************************************/
#include "formwindow.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "widgetdatabase.h"
#include "widgetfactory.h"
-#include <tqlayout.h>
+#include <layout.h>
#include <tqevent.h>
#include <tqpainter.h>
#include <tqpen.h>
@@ -36,34 +36,34 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &
}
/*!
- \class Layout layout.h
- \brief Baseclass for layouting widgets in the Designer
+ \class Layout tqlayout.h
+ \brief Baseclass for tqlayouting widgets in the Designer
- Classes derived from this abstract base class are used for layouting
+ Classes derived from this abstract base class are used for tqlayouting
operations in the Designer.
*/
-/*! \a p specifies the parent of the layoutBase \a lb. The parent
- might be changed in setup(). If the layoutBase is a
- container, the parent and the layoutBase are the same. Also they
+/*! \a p specifies the tqparent of the tqlayoutBase \a lb. The tqparent
+ might be changed in setup(). If the tqlayoutBase is a
+ container, the tqparent and the tqlayoutBase are the same. Also they
always have to be a widget known to the designer (e.g. in the case
- of the tabwidget parent and layoutBase are the tabwidget and not the
+ of the tabwidget tqparent and tqlayoutBase are the tabwidget and not the
page which actually gets laid out. For actual usage the correct
widget is found later by Layout.)
*/
Layout::Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup, bool splitter )
- : widgets( wl ), parent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
+ : widgets( wl ), tqparent( p ), formWindow( fw ), isBreak( !doSetup ), useSplitter( splitter )
{
widgets.setAutoDelete( false );
- layoutBase = lb;
- if ( !doSetup && layoutBase )
- oldGeometry = layoutBase->geometry();
+ tqlayoutBase = lb;
+ if ( !doSetup && tqlayoutBase )
+ oldGeometry = tqlayoutBase->tqgeometry();
}
/*! The widget list we got in the constructor might contain too much
- widgets (like widgets with different parents, already laid out
+ widgets (like widgets with different tqparents, already laid out
widgets, etc.). Here we set up the list and so the only the "best"
widgets get laid out.
*/
@@ -77,20 +77,20 @@ void Layout::setup()
TQWidget *w = 0;
// Go through all widgets of the list we got. As we can only
- // layout widgets which have the same parent, we first do some
- // sorting which means create a list for each parent containing
+ // tqlayout widgets which have the same tqparent, we first do some
+ // sorting which means create a list for each tqparent containing
// its child here. After that we keep working on the list of
// childs which has the most entries.
// Widgets which are already laid out are thrown away here too
for ( w = widgets.first(); w; w = widgets.next() ) {
- if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout )
+ if ( w->tqparentWidget() && WidgetFactory::tqlayoutType( w->tqparentWidget() ) != WidgetFactory::NoLayout )
continue;
- if ( lastParent != w->parentWidget() ) {
+ if ( lastParent != w->tqparentWidget() ) {
lastList = 0;
- lastParent = w->parentWidget();
+ lastParent = w->tqparentWidget();
TQValueList<TQWidgetList>::Iterator it = lists.begin();
for ( ; it != lists.end(); ++it ) {
- if ( ( *it ).first()->parentWidget() == w->parentWidget() )
+ if ( ( *it ).first()->tqparentWidget() == w->tqparentWidget() )
lastList = &( *it );
}
if ( !lastList ) {
@@ -112,12 +112,12 @@ void Layout::setup()
}
// If we found no list (because no widget did fit at all) or the
- // best list has only one entry and we do not layout a container,
+ // best list has only one entry and we do not tqlayout a container,
// we leave here.
if ( !lastList || ( lastList->count() < 2 &&
- ( !layoutBase ||
- ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
- layoutBase != formWindow->mainContainer() ) )
+ ( !tqlayoutBase ||
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT( tqlayoutBase )) ) ) &&
+ tqlayoutBase != formWindow->mainContainer() ) )
) ) {
widgets.clear();
startPoint = TQPoint( 0, 0 );
@@ -125,23 +125,23 @@ void Layout::setup()
}
// Now we have a new and clean widget list, which makes sense
- // to layout
+ // to tqlayout
widgets = *lastList;
- // Also use the only correct parent later, so store it
- parent = WidgetFactory::widgetOfContainer( widgets.first()->parentWidget() );
- // Now calculate the position where the layout-meta-widget should
+ // Also use the only correct tqparent later, so store it
+ tqparent = WidgetFactory::widgetOfContainer( widgets.first()->tqparentWidget() );
+ // Now calculate the position where the tqlayout-meta-widget should
// be placed and connect to widgetDestroyed() signals of the
// widgets to get informed if one gets deleted to be able to
// handle that and do not crash in this case
for ( w = widgets.first(); w; w = widgets.next() ) {
connect( w, TQT_SIGNAL( destroyed() ),
this, TQT_SLOT( widgetDestroyed() ) );
- startPoint = TQPoint( QMIN( startPoint.x(), w->x() ),
- QMIN( startPoint.y(), w->y() ) );
+ startPoint = TQPoint( TQMIN( startPoint.x(), w->x() ),
+ TQMIN( startPoint.y(), w->y() ) );
geometries.insert( w, TQRect( w->pos(), w->size() ) );
// Change the Z-order, as saving/loading uses the Z-order for
// writing/creating widgets and this has to be the same as in
- // the layout. Else saving + loading will give different results
+ // the tqlayout. Else saving + loading will give different results
w->raise();
}
}
@@ -152,46 +152,46 @@ void Layout::widgetDestroyed()
widgets.removeRef( (TQWidget*)sender() );
}
-bool Layout::prepareLayout( bool &needMove, bool &needReparent )
+bool Layout::prepareLayout( bool &needMove, bool &needRetqparent )
{
if ( !widgets.count() )
return false;
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
- needMove = !layoutBase;
- needReparent = needMove || layoutBase->inherits( "QLayoutWidget" ) || layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING );
- if ( !layoutBase ) {
+ needMove = !tqlayoutBase;
+ needRetqparent = needMove || tqlayoutBase->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING );
+ if ( !tqlayoutBase ) {
if ( !useSplitter )
- layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "QLayoutWidget" ),
- WidgetFactory::containerOfWidget( parent ) );
+ tqlayoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ),
+ WidgetFactory::containerOfWidget( tqparent ) );
else
- layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ),
- WidgetFactory::containerOfWidget( parent ) );
+ tqlayoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ),
+ WidgetFactory::containerOfWidget( tqparent ) );
} else {
- WidgetFactory::deleteLayout( layoutBase );
+ WidgetFactory::deleteLayout( tqlayoutBase );
}
return true;
}
-void Layout::finishLayout( bool needMove, TQLayout *layout )
+void Layout::finishLayout( bool needMove, TQLayout *tqlayout )
{
if ( needMove )
- layoutBase->move( startPoint );
- TQRect g( TQRect( layoutBase->pos(), layoutBase->size() ) );
- if ( WidgetFactory::layoutType( layoutBase->parentWidget() ) == WidgetFactory::NoLayout && !isBreak )
- layoutBase->adjustSize();
+ tqlayoutBase->move( startPoint );
+ TQRect g( TQRect( tqlayoutBase->pos(), tqlayoutBase->size() ) );
+ if ( WidgetFactory::tqlayoutType( tqlayoutBase->tqparentWidget() ) == WidgetFactory::NoLayout && !isBreak )
+ tqlayoutBase->adjustSize();
else if ( isBreak )
- layoutBase->setGeometry( oldGeometry );
+ tqlayoutBase->setGeometry( oldGeometry );
oldGeometry = g;
- layoutBase->show();
- layout->activate();
- formWindow->insertWidget( layoutBase );
- formWindow->selectWidget( layoutBase );
- TQString n = layoutBase->name();
- if ( n.find( "qt_dead_widget_" ) != -1 ) {
+ tqlayoutBase->show();
+ tqlayout->activate();
+ formWindow->insertWidget( tqlayoutBase );
+ formWindow->selectWidget( TQT_TQOBJECT(tqlayoutBase) );
+ TQString n = tqlayoutBase->name();
+ if ( n.tqfind( "qt_dead_widget_" ) != -1 ) {
n.remove( 0, TQString( "qt_dead_widget_" ).length() );
- layoutBase->setName( n );
+ tqlayoutBase->setName( n );
}
}
@@ -203,23 +203,23 @@ void Layout::undoLayout()
for ( ; it != geometries.end(); ++it ) {
if ( !it.key() )
continue;
- it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
+ it.key()->reparent( WidgetFactory::containerOfWidget( tqparent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() );
}
- formWindow->selectWidget( layoutBase, false );
- WidgetFactory::deleteLayout( layoutBase );
- if ( parent != layoutBase && !layoutBase->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
- layoutBase->hide();
- TQString n = layoutBase->name();
+ formWindow->selectWidget( TQT_TQOBJECT(tqlayoutBase), false );
+ WidgetFactory::deleteLayout( tqlayoutBase );
+ if ( tqparent != tqlayoutBase && !tqlayoutBase->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
+ tqlayoutBase->hide();
+ TQString n = tqlayoutBase->name();
n.prepend( "qt_dead_widget_" );
- layoutBase->setName( n );
+ tqlayoutBase->setName( n );
} else {
- layoutBase->setGeometry( oldGeometry );
+ tqlayoutBase->setGeometry( oldGeometry );
}
if ( widgets.first() )
- formWindow->selectWidget( widgets.first() );
+ formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) );
else
- formWindow->selectWidget( formWindow );
+ formWindow->selectWidget( TQT_TQOBJECT(formWindow) );
}
void Layout::breakLayout()
@@ -228,43 +228,43 @@ void Layout::breakLayout()
if ( !widgets.isEmpty() ) {
TQWidget *w;
for ( w = widgets.first(); w; w = widgets.next() )
- rects.insert( w, w->geometry() );
+ rects.insert( w, w->tqgeometry() );
}
- WidgetFactory::deleteLayout( layoutBase );
- bool needReparent = qstrcmp( layoutBase->className(), "QLayoutWidget" ) == 0 ||
- qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 ||
- ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
- layoutBase != formWindow->mainContainer() );
- bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0;
+ WidgetFactory::deleteLayout( tqlayoutBase );
+ bool needRetqparent = qstrcmp( tqlayoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
+ qstrcmp( tqlayoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 ||
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT( tqlayoutBase )) ) ) &&
+ tqlayoutBase != formWindow->mainContainer() );
+ bool needResize = qstrcmp( tqlayoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0;
bool add = geometries.isEmpty();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needReparent )
- w->reparent( layoutBase->parentWidget(), 0,
- layoutBase->pos() + w->pos(), true );
+ if ( needRetqparent )
+ w->reparent( tqlayoutBase->tqparentWidget(), 0,
+ tqlayoutBase->pos() + w->pos(), true );
if ( needResize ) {
- TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w );
+ TQMap<TQWidget*, TQRect>::Iterator it = rects.tqfind( w );
if ( it != rects.end() )
- w->setGeometry( TQRect( layoutBase->pos() + (*it).topLeft(), (*it).size() ) );
+ w->setGeometry( TQRect( tqlayoutBase->pos() + (*it).topLeft(), (*it).size() ) );
}
if ( add )
geometries.insert( w, TQRect( w->pos(), w->size() ) );
}
- if ( needReparent ) {
- layoutBase->hide();
- parent = layoutBase->parentWidget();
- TQString n = layoutBase->name();
+ if ( needRetqparent ) {
+ tqlayoutBase->hide();
+ tqparent = tqlayoutBase->tqparentWidget();
+ TQString n = tqlayoutBase->name();
n.prepend( "qt_dead_widget_" );
- layoutBase->setName( n );
+ tqlayoutBase->setName( n );
} else {
- parent = layoutBase;
+ tqparent = tqlayoutBase;
}
if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) )
- formWindow->selectWidget( widgets.first() );
+ formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) );
else
- formWindow->selectWidget( formWindow );
+ formWindow->selectWidget( TQT_TQOBJECT(formWindow) );
}
-class HorizontalLayoutList : public QWidgetList
+class HorizontalLayoutList : public TQWidgetList
{
public:
HorizontalLayoutList( const TQWidgetList &l )
@@ -299,36 +299,36 @@ void HorizontalLayout::setup()
void HorizontalLayout::doLayout()
{
- bool needMove, needReparent;
- if ( !prepareLayout( needMove, needReparent ) )
+ bool needMove, needRetqparent;
+ if ( !prepareLayout( needMove, needRetqparent ) )
return;
- TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
+ TQHBoxLayout *tqlayout = (TQHBoxLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::HBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
+ if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) )
+ w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
- layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() );
else
- layout->addWidget( w );
- if ( w->inherits( "QLayoutWidget" ) )
- ( (QLayoutWidget*)w )->updateSizePolicy();
+ tqlayout->addWidget( w );
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
+ ( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}
- if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
- ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
+ if ( tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
+ ( (TQSplitter*)tqlayoutBase )->setOrientation( Qt::Horizontal );
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
-class VerticalLayoutList : public QWidgetList
+class VerticalLayoutList : public TQWidgetList
{
public:
VerticalLayoutList( const TQWidgetList &l )
@@ -363,30 +363,30 @@ void VerticalLayout::setup()
void VerticalLayout::doLayout()
{
- bool needMove, needReparent;
- if ( !prepareLayout( needMove, needReparent ) )
+ bool needMove, needRetqparent;
+ if ( !prepareLayout( needMove, needRetqparent ) )
return;
- TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
+ TQVBoxLayout *tqlayout = (TQVBoxLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::VBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
+ if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) )
+ w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
- layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
+ tqlayout->addWidget( w, 0, ( (Spacer*)w )->tqalignment() );
else
- layout->addWidget( w );
- if ( w->inherits( "QLayoutWidget" ) )
- ( (QLayoutWidget*)w )->updateSizePolicy();
+ tqlayout->addWidget( w );
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
+ ( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}
- if ( layoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
- ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );
+ if ( tqlayoutBase->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
+ ( (TQSplitter*)tqlayoutBase )->setOrientation( Qt::Vertical );
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
@@ -729,11 +729,11 @@ GridLayout::~GridLayout()
void GridLayout::doLayout()
{
- bool needMove, needReparent;
- if ( !prepareLayout( needMove, needReparent ) )
+ bool needMove, needRetqparent;
+ if ( !prepareLayout( needMove, needRetqparent ) )
return;
- QDesignerGridLayout *layout = (QDesignerGridLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::Grid );
+ TQDesignerGridLayout *tqlayout = (TQDesignerGridLayout*)WidgetFactory::createLayout( tqlayoutBase, 0, WidgetFactory::Grid );
if ( !grid )
buildGrid();
@@ -742,21 +742,21 @@ void GridLayout::doLayout()
int r, c, rs, cs;
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
- if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
+ if ( needRetqparent && TQT_BASE_OBJECT(w->tqparent()) != TQT_BASE_OBJECT(tqlayoutBase) )
+ w->reparent( tqlayoutBase, 0, TQPoint( 0, 0 ), false );
if ( rs * cs == 1 ) {
- layout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
+ tqlayout->addWidget( w, r, c, w->inherits( "Spacer" ) ? ( (Spacer*)w )->tqalignment() : 0 );
} else {
- layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->alignment() : 0 );
+ tqlayout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, w->inherits( "Spacer" ) ? ( (Spacer*)w )->tqalignment() : 0 );
}
- if ( w->inherits( "QLayoutWidget" ) )
- ( (QLayoutWidget*)w )->updateSizePolicy();
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
+ ( (TQLayoutWidget*)w )->updateSizePolicy();
w->show();
} else {
- qWarning("ooops, widget '%s' does not fit in layout", w->name() );
+ qWarning("ooops, widget '%s' does not fit in tqlayout", w->name() );
}
}
- finishLayout( needMove, layout );
+ finishLayout( needMove, tqlayout );
}
void GridLayout::setup()
@@ -770,7 +770,7 @@ void GridLayout::buildGrid()
TQWidget* w;
TQRect br;
for ( w = widgets.first(); w; w = widgets.next() )
- br = br.unite( w->geometry() );
+ br = br.unite( w->tqgeometry() );
delete grid;
grid = new Grid( br.height() / resolution.height() + 1,
@@ -784,7 +784,7 @@ void GridLayout::buildGrid()
TQRect cr( p, resolution );
for ( w = widgets.first(); w; w = widgets.next() ) {
// check that the overlap is significant
- TQRect intersect = cr.intersect( w->geometry() );
+ TQRect intersect = cr.intersect( w->tqgeometry() );
if ( intersect.size().width() > resolution.width()/2 &&
intersect.size().height() > resolution.height()/2 ) {
grid->setCell( r, c, w );
@@ -801,9 +801,9 @@ void GridLayout::buildGrid()
-Spacer::Spacer( TQWidget *parent, const char *name )
- : TQWidget( parent, name, WMouseNoMask ),
- orient( Vertical ), interactive(true), sh( TQSize(20,20) )
+Spacer::Spacer( TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name, WMouseNoMask ),
+ orient(Qt::Vertical ), interactive(true), sh( TQSize(20,20) )
{
setSizeType( Expanding );
setAutoMask( true );
@@ -812,11 +812,11 @@ Spacer::Spacer( TQWidget *parent, const char *name )
void Spacer::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
- p.setPen( Qt::blue );
+ p.setPen( TQt::blue );
- if ( orient == Horizontal ) {
+ if ( orient ==Qt::Horizontal ) {
const int dist = 3;
- const int amplitude = QMIN( 3, height() / 3 );
+ const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2;
int i = 0;
p.setPen( white );
@@ -829,7 +829,7 @@ void Spacer::paintEvent( TQPaintEvent * )
p.drawLine( width() - 1, 0, width() - 1, height());
} else {
const int dist = 3;
- const int amplitude = QMIN( 3, width() / 3 );
+ const int amplitude = TQMIN( 3, width() / 3 );
const int base = width() / 2;
int i = 0;
p.setPen( white );
@@ -846,20 +846,20 @@ void Spacer::paintEvent( TQPaintEvent * )
void Spacer::resizeEvent( TQResizeEvent* e)
{
TQWidget::resizeEvent( e );
- if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
+ if ( !tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout )
sh = size();
}
void Spacer::updateMask()
{
TQRegion r( rect() );
- if ( orient == Horizontal ) {
- const int amplitude = QMIN( 3, height() / 3 );
+ if ( orient ==Qt::Horizontal ) {
+ const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2;
r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) );
r = r.subtract( TQRect(1, base + amplitude, width() - 2, height() - base - amplitude ) );
} else {
- const int amplitude = QMIN( 3, width() / 3 );
+ const int amplitude = TQMIN( 3, width() / 3 );
const int base = width() / 2;
r = r.subtract( TQRect(0, 1, base - amplitude, height() - 2 ) );
r = r.subtract( TQRect( base + amplitude, 1, width() - base - amplitude, height() - 2 ) );
@@ -870,38 +870,38 @@ void Spacer::updateMask()
void Spacer::setSizeType( SizeType t )
{
TQSizePolicy sizeP;
- if ( orient == Vertical )
+ if ( orient ==Qt::Vertical )
sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t );
else
sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum );
- setSizePolicy( sizeP );
+ tqsetSizePolicy( sizeP );
}
Spacer::SizeType Spacer::sizeType() const
{
- if ( orient == Vertical )
- return (SizeType)sizePolicy().verData();
- return (SizeType)sizePolicy().horData();
+ if ( orient ==Qt::Vertical )
+ return (SizeType)tqsizePolicy().verData();
+ return (SizeType)tqsizePolicy().horData();
}
-int Spacer::alignment() const
+int Spacer::tqalignment() const
{
- if ( orient == Vertical )
+ if ( orient ==Qt::Vertical )
return AlignHCenter;
return AlignVCenter;
}
-TQSize Spacer::minimumSize() const
+TQSize Spacer::tqminimumSize() const
{
return TQSize( 20, 20 );
}
-TQSize Spacer::sizeHint() const
+TQSize Spacer::tqsizeHint() const
{
TQSize s = sh.expandedTo( TQSize(0,0) );
if ( sizeType() == Expanding )
- if ( orient == Horizontal )
+ if ( orient ==Qt::Horizontal )
s.rheight() = 0;
else
s.rwidth() = 0;
@@ -912,8 +912,8 @@ TQSize Spacer::sizeHint() const
void Spacer::setSizeHint( const TQSize &s )
{
sh = s;
- if ( !parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
- resize( sizeHint() );
+ if ( !tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout )
+ resize( tqsizeHint() );
updateGeometry();
}
@@ -932,7 +932,7 @@ void Spacer::setOrientation( Qt::Orientation o )
setSizeType( st );
if ( interactive ) {
sh = TQSize( sh.height(), sh.width() );
- if (!parentWidget() || WidgetFactory::layoutType( parentWidget() ) == WidgetFactory::NoLayout )
+ if (!tqparentWidget() || WidgetFactory::tqlayoutType( tqparentWidget() ) == WidgetFactory::NoLayout )
resize( height(), width() );
}
updateMask();
@@ -941,13 +941,13 @@ void Spacer::setOrientation( Qt::Orientation o )
}
-void QDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ )
+void TQDesignerGridLayout::addWidget( TQWidget *w, int row, int col, int align_ )
{
items.insert( w, Item(row, col, 1, 1) );
TQGridLayout::addWidget( w, row, col, align_ );
}
-void QDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow,
+void TQDesignerGridLayout::addMultiCellWidget( TQWidget *w, int fromRow, int toRow,
int fromCol, int toCol, int align_ )
{
items.insert( w, Item(fromRow, fromCol, toRow - fromRow + 1, toCol - fromCol +1) );
diff --git a/kommander/editor/layout.h b/kommander/editor/layout.h
index c8b85a3a..107a4083 100644
--- a/kommander/editor/layout.h
+++ b/kommander/editor/layout.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -31,9 +31,10 @@
class FormWindow;
class TQPaintEvent;
-class Layout : public QObject
+class Layout : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
@@ -42,15 +43,15 @@ public:
virtual void doLayout() = 0;
virtual void undoLayout();
virtual void breakLayout();
- virtual bool prepareLayout( bool &needMove, bool &needReparent );
- virtual void finishLayout( bool needMove, TQLayout *layout );
+ virtual bool prepareLayout( bool &needMove, bool &needRetqparent );
+ virtual void finishLayout( bool needMove, TQLayout *tqlayout );
protected:
TQWidgetList widgets;
- TQWidget *parent;
+ TQWidget *tqparent;
TQPoint startPoint;
TQMap<TQGuardedPtr<TQWidget>, TQRect> geometries;
- TQWidget *layoutBase;
+ TQWidget *tqlayoutBase;
FormWindow *formWindow;
TQRect oldGeometry;
bool isBreak;
@@ -108,16 +109,17 @@ protected:
};
-class Spacer : public QWidget
+class Spacer : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
- Q_OVERRIDE( TQCString name )
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
+ TQ_OVERRIDE( TQCString name )
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
Q_ENUMS( SizeType )
- Q_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType )
- Q_PROPERTY( TQSize sizeHint READ sizeHint WRITE setSizeHint DESIGNABLE true STORED true )
- Q_OVERRIDE( TQRect geometry DESIGNABLE false )
+ TQ_PROPERTY( SizeType sizeType READ sizeType WRITE setSizeType )
+ TQ_PROPERTY( TQSize tqsizeHint READ tqsizeHint WRITE setSizeHint DESIGNABLE true STORED true )
+ TQ_OVERRIDE( TQRect tqgeometry DESIGNABLE false )
private:
enum { HSize = 6, HMask = 0x3f, VMask = HMask << HSize,
@@ -131,15 +133,15 @@ public:
MinimumExpanding = Minimum|ExpMask,
Expanding = MinimumExpanding|MayShrink };
- Spacer( TQWidget *parent, const char *name );
+ Spacer( TQWidget *tqparent, const char *name );
- TQSize minimumSize() const;
- TQSize sizeHint() const;
+ TQSize tqminimumSize() const;
+ TQSize tqsizeHint() const;
void setSizeType( SizeType t );
SizeType sizeType() const;
- int alignment() const;
- Orientation orientation() const;
- void setOrientation( Orientation o );
+ int tqalignment() const;
+ Qt::Orientation orientation() const;
+ void setOrientation( Qt::Orientation o );
void setInteraciveMode( bool b ) { interactive = b; };
void setSizeHint( const TQSize &s );
@@ -152,12 +154,13 @@ protected:
TQSize sh;
};
-class QDesignerGridLayout : public QGridLayout
+class TQDesignerGridLayout : public TQGridLayout
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){};
- QDesignerGridLayout( TQLayout *parentLayout ) : TQGridLayout( parentLayout ){};
+ TQDesignerGridLayout( TQWidget *tqparent ) : TQGridLayout( tqparent ){};
+ TQDesignerGridLayout( TQLayout *tqparentLayout ) : TQGridLayout( tqparentLayout ){};
void addWidget( TQWidget *, int row, int col, int align = 0 );
void addMultiCellWidget( TQWidget *, int fromRow, int toRow,
diff --git a/kommander/editor/listboxeditor.ui b/kommander/editor/listboxeditor.ui
index 2b462987..fc03fa8f 100644
--- a/kommander/editor/listboxeditor.ui
+++ b/kommander/editor/listboxeditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ListBoxEditorBase</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="5" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -64,7 +64,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>helpButton</cstring>
</property>
@@ -85,14 +85,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -109,7 +109,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonApply</cstring>
</property>
@@ -123,7 +123,7 @@
<string>Apply all changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -139,7 +139,7 @@
</widget>
</hbox>
</widget>
- <widget class="QListBox" row="0" column="0" rowspan="5" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="5" colspan="1">
<property name="name">
<cstring>preview</cstring>
</property>
@@ -150,7 +150,7 @@
<string>The list of items.</string>
</property>
</widget>
- <widget class="QGroupBox" row="0" column="2" rowspan="5" colspan="1">
+ <widget class="TQGroupBox" row="0" column="2" rowspan="5" colspan="1">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -167,7 +167,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label2</cstring>
</property>
@@ -178,7 +178,7 @@
<cstring>itemChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>itemPixmap</cstring>
</property>
@@ -186,11 +186,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>itemDeletePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -209,11 +209,11 @@
<string>Delete the selected item's pixmap.</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>itemChoosePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -229,7 +229,7 @@
<string>Choose a pixmap file for the selected item.</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>Label1</cstring>
</property>
@@ -240,11 +240,11 @@
<cstring>itemText</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>itemText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -259,7 +259,7 @@
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>itemNew</cstring>
</property>
@@ -273,7 +273,7 @@
<string>&lt;b&gt;Add a new item.&lt;/b&gt;&lt;p&gt;New items are appended to the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>itemDelete</cstring>
</property>
@@ -297,14 +297,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="3" column="1">
+ <widget class="TQPushButton" row="3" column="1">
<property name="name">
<cstring>itemUp</cstring>
</property>
@@ -321,7 +321,7 @@
<string>Moves the selected item up.</string>
</property>
</widget>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>itemDown</cstring>
</property>
@@ -414,21 +414,21 @@
</connection>
<connection>
<sender>preview</sender>
- <signal>selectionChanged(QListBoxItem*)</signal>
+ <signal>selectionChanged(TQListBoxItem*)</signal>
<receiver>ListBoxEditorBase</receiver>
- <slot>currentItemChanged(QListBoxItem*)</slot>
+ <slot>currentItemChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>preview</sender>
- <signal>currentChanged( QListBoxItem * )</signal>
+ <signal>currentChanged( TQListBoxItem * )</signal>
<receiver>ListBoxEditorBase</receiver>
- <slot>currentItemChanged(QListBoxItem*)</slot>
+ <slot>currentItemChanged(TQListBoxItem*)</slot>
</connection>
<slot access="protected" language="C++" returnType="void">init()</slot>
<slot access="protected" language="C++" returnType="void">destroy()</slot>
<slot access="protected" language="C++" returnType="void">insertNewItem()</slot>
<slot access="protected" language="C++" returnType="void">deleteCurrentItem()</slot>
- <slot access="protected" language="C++" returnType="void">currentItemChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged( TQListBoxItem * )</slot>
<slot access="protected" language="C++" returnType="void">currentTextChanged( const QString &amp; )</slot>
<slot access="protected" language="C++" returnType="void">okClicked()</slot>
<slot access="protected" language="C++" returnType="void">cancelClicked()</slot>
diff --git a/kommander/editor/listboxeditorimpl.cpp b/kommander/editor/listboxeditorimpl.cpp
index 1f820081..80382c95 100644
--- a/kommander/editor/listboxeditorimpl.cpp
+++ b/kommander/editor/listboxeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -32,8 +32,8 @@
#include <klocale.h>
-ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : ListBoxEditorBase( parent, 0, true ), formwindow( fw )
+ListBoxEditor::ListBoxEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
+ : ListBoxEditorBase( tqparent, 0, true ), formwindow( fw )
{
connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
listbox = (TQListBox*)editWidget;
@@ -131,7 +131,7 @@ void ListBoxEditor::applyClicked()
items.append( item );
}
- PopulateListBoxCommand *cmd = new PopulateListBoxCommand( i18n("Edit Items of '%1'" ).arg( listbox->name() ),
+ PopulateListBoxCommand *cmd = new PopulateListBoxCommand( i18n("Edit Items of '%1'" ).tqarg( listbox->name() ),
formwindow, listbox, items );
cmd->execute();
formwindow->commandHistory()->addCommand( cmd );
diff --git a/kommander/editor/listboxeditorimpl.h b/kommander/editor/listboxeditorimpl.h
index 41bcc8a7..07e18f1f 100644
--- a/kommander/editor/listboxeditorimpl.h
+++ b/kommander/editor/listboxeditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -29,9 +29,10 @@ class FormWindow;
class ListBoxEditor : public ListBoxEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ ListBoxEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void insertNewItem();
diff --git a/kommander/editor/listeditor.ui b/kommander/editor/listeditor.ui
index 6cafeed0..66efc1ae 100644
--- a/kommander/editor/listeditor.ui
+++ b/kommander/editor/listeditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>ListEditor</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ListEditor</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QListView" row="0" column="0" rowspan="5" colspan="1">
+ <widget class="TQListView" row="0" column="0" rowspan="5" colspan="1">
<column>
<property name="text">
<string>Column 1</string>
@@ -47,7 +47,7 @@
<enum>AllColumns</enum>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>PushButton1</cstring>
</property>
@@ -55,7 +55,7 @@
<string>&amp;Add</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>PushButton2</cstring>
</property>
@@ -63,7 +63,7 @@
<string>&amp;Remove</string>
</property>
</widget>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>PushButton3</cstring>
</property>
@@ -71,7 +71,7 @@
<string>Re&amp;name</string>
</property>
</widget>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>PushButton4</cstring>
</property>
@@ -89,7 +89,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -133,15 +133,15 @@
<forwards>
<forward>class QStringList;</forward>
</forwards>
-<slots>
+<Q_SLOTS>
<slot>init()</slot>
<slot>setList( const QStringList &amp; l )</slot>
<slot>addItem()</slot>
<slot>renamed( QListViewItem * i )</slot>
<slot>removeItems()</slot>
- <slot returnType="QStringList">items()</slot>
+ <slot returnType="TQStringList">items()</slot>
<slot>renameItem()</slot>
-</slots>
+</Q_SLOTS>
<pixmapinproject/>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/listvieweditor.ui b/kommander/editor/listvieweditor.ui
index 32c5f135..2ec9e9ba 100644
--- a/kommander/editor/listvieweditor.ui
+++ b/kommander/editor/listvieweditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ListViewEditorBase</cstring>
</property>
@@ -50,11 +50,11 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget10</cstring>
</property>
@@ -71,7 +71,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton" row="2" column="1">
+ <widget class="TQPushButton" row="2" column="1">
<property name="name">
<cstring>itemDelete</cstring>
</property>
@@ -85,7 +85,7 @@
<string>&lt;b&gt;Deletes the selected item.&lt;/b&gt;&lt;p&gt;Any sub-items are also deleted.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QGroupBox" row="0" column="2" rowspan="8" colspan="1">
+ <widget class="TQGroupBox" row="0" column="2" rowspan="8" colspan="1">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -108,7 +108,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>Label2</cstring>
</property>
@@ -119,7 +119,7 @@
<cstring>itemChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label1</cstring>
</property>
@@ -130,11 +130,11 @@
<cstring>itemText</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="1" column="1">
+ <widget class="TQLineEdit" row="1" column="1">
<property name="name">
<cstring>itemText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -147,7 +147,7 @@
<string>&lt;b&gt;Change the text of the item.&lt;/b&gt;&lt;p&gt;The text will be changed in the current column of the selected item.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>itemColumn</cstring>
</property>
@@ -158,7 +158,7 @@
<string>&lt;b&gt;Select the current column.&lt;/b&gt;&lt;p&gt;The item's text and pixmap will be changed for the current column&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>Label4</cstring>
</property>
@@ -169,7 +169,7 @@
<cstring>itemColumn</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1">
+ <widget class="TQLayoutWidget" row="2" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -183,7 +183,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>itemPixmap</cstring>
</property>
@@ -191,11 +191,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemDeletePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -214,11 +214,11 @@
<string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>itemChoosePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -238,7 +238,7 @@
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>itemNew</cstring>
</property>
@@ -252,7 +252,7 @@
<string>&lt;b&gt;Adds a new item to the list.&lt;/b&gt;&lt;p&gt;The item will be inserted at the top of the list and can be moved using the up- and down-buttons.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QListView" row="0" column="0" rowspan="8" colspan="1">
+ <widget class="TQListView" row="0" column="0" rowspan="8" colspan="1">
<property name="name">
<cstring>itemsPreview</cstring>
</property>
@@ -260,7 +260,7 @@
<string>The list of items.</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>itemNewSub</cstring>
</property>
@@ -284,14 +284,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>itemUp</cstring>
</property>
@@ -308,7 +308,7 @@
<string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The item will be moved within its level in the hierarchy.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="5" column="1">
+ <widget class="TQPushButton" row="5" column="1">
<property name="name">
<cstring>itemDown</cstring>
</property>
@@ -325,7 +325,7 @@
<string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The item will be moved within its level in the hierarchy.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="6" column="1">
+ <widget class="TQPushButton" row="6" column="1">
<property name="name">
<cstring>itemLeft</cstring>
</property>
@@ -342,7 +342,7 @@
<string>&lt;b&gt;Move the selected item one level up.&lt;/b&gt;&lt;p&gt;This will also change the level of the item's sub-items.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="7" column="1">
+ <widget class="TQPushButton" row="7" column="1">
<property name="name">
<cstring>itemRight</cstring>
</property>
@@ -361,7 +361,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget11</cstring>
</property>
@@ -378,7 +378,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox" row="0" column="2" rowspan="5" colspan="1">
+ <widget class="TQGroupBox" row="0" column="2" rowspan="5" colspan="1">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -395,7 +395,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label2</cstring>
</property>
@@ -406,7 +406,7 @@
<cstring>colChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="1">
+ <widget class="TQLabel" row="1" column="1">
<property name="name">
<cstring>colPixmap</cstring>
</property>
@@ -414,11 +414,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>colDeletePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -437,11 +437,11 @@
<string>Delete the pixmap of the selected column.</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>colChoosePixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -457,7 +457,7 @@
<string>&lt;b&gt;Select a pixmap file for the selected column.&lt;/b&gt;&lt;p&gt;The pixmap will be displayed in the header of the listview.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>Label1</cstring>
</property>
@@ -468,11 +468,11 @@
<cstring>colText</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1" rowspan="1" colspan="3">
+ <widget class="TQLineEdit" row="0" column="1" rowspan="1" colspan="3">
<property name="name">
<cstring>colText</cstring>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -485,7 +485,7 @@
<string>&lt;b&gt;Enter the text for the selected column.&lt;/b&gt;&lt;p&gt;The text will be displayed in the header of the listview.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QCheckBox" row="2" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="2" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>colClickable</cstring>
</property>
@@ -496,7 +496,7 @@
<string>If this option is checked, the selected column will react to mouse clicks on the header.</string>
</property>
</widget>
- <widget class="QCheckBox" row="3" column="0" rowspan="1" colspan="2">
+ <widget class="TQCheckBox" row="3" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>colResizeable</cstring>
</property>
@@ -509,7 +509,7 @@
</widget>
</grid>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>colDelete</cstring>
</property>
@@ -523,7 +523,7 @@
<string>Deletes the selected Column.</string>
</property>
</widget>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>colDown</cstring>
</property>
@@ -540,7 +540,7 @@
<string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column in the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>colNew</cstring>
</property>
@@ -554,7 +554,7 @@
<string>&lt;b&gt;Create a new column.&lt;/b&gt;&lt;p&gt;New columns are appended at the end of (right of) the list and may be moved using the up- and down-buttons.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="3" column="1">
+ <widget class="TQPushButton" row="3" column="1">
<property name="name">
<cstring>colUp</cstring>
</property>
@@ -571,7 +571,7 @@
<string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column in the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QListBox" row="0" column="0" rowspan="5" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="5" colspan="1">
<property name="name">
<cstring>colPreview</cstring>
</property>
@@ -589,7 +589,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -599,7 +599,7 @@
</grid>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -613,7 +613,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>helpButton</cstring>
</property>
@@ -634,14 +634,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>okButton</cstring>
</property>
@@ -658,7 +658,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>applyButton</cstring>
</property>
@@ -672,7 +672,7 @@
<string>Apply all changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>cancelButton</cstring>
</property>
@@ -836,27 +836,27 @@
</connection>
<connection>
<sender>colPreview</sender>
- <signal>currentChanged(QListBoxItem*)</signal>
+ <signal>currentChanged(TQListBoxItem*)</signal>
<receiver>ListViewEditorBase</receiver>
- <slot>currentColumnChanged(QListBoxItem*)</slot>
+ <slot>currentColumnChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>colPreview</sender>
- <signal>selectionChanged(QListBoxItem*)</signal>
+ <signal>selectionChanged(TQListBoxItem*)</signal>
<receiver>ListViewEditorBase</receiver>
- <slot>currentColumnChanged(QListBoxItem*)</slot>
+ <slot>currentColumnChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>itemsPreview</sender>
- <signal>currentChanged(QListViewItem*)</signal>
+ <signal>currentChanged(TQListViewItem*)</signal>
<receiver>ListViewEditorBase</receiver>
- <slot>currentItemChanged(QListViewItem*)</slot>
+ <slot>currentItemChanged(TQListViewItem*)</slot>
</connection>
<connection>
<sender>itemsPreview</sender>
- <signal>selectionChanged(QListViewItem*)</signal>
+ <signal>selectionChanged(TQListViewItem*)</signal>
<receiver>ListViewEditorBase</receiver>
- <slot>currentItemChanged(QListViewItem*)</slot>
+ <slot>currentItemChanged(TQListViewItem*)</slot>
</connection>
<connection>
<sender>itemNewSub</sender>
@@ -886,8 +886,8 @@
<slot access="protected" language="C++" returnType="void">columnResizable(bool)</slot>
<slot access="protected" language="C++" returnType="void">columnTextChanged(const QString &amp;)</slot>
<slot access="protected" language="C++" returnType="void">columnUpClicked()</slot>
- <slot access="protected" language="C++" returnType="void">currentColumnChanged(QListBoxItem*)</slot>
- <slot access="protected" language="C++" returnType="void">currentItemChanged(QListViewItem*)</slot>
+ <slot access="protected" language="C++" returnType="void">currentColumnChanged(TQListBoxItem*)</slot>
+ <slot access="protected" language="C++" returnType="void">currentItemChanged(TQListViewItem*)</slot>
<slot access="protected" language="C++" returnType="void">deleteColumnClicked()</slot>
<slot access="protected" language="C++" returnType="void">initTabPage(const QString &amp;)</slot>
<slot access="protected" language="C++" returnType="void">itemColChanged(int)</slot>
diff --git a/kommander/editor/listvieweditorimpl.cpp b/kommander/editor/listvieweditorimpl.cpp
index fb2f0a6a..abed8458 100644
--- a/kommander/editor/listvieweditorimpl.cpp
+++ b/kommander/editor/listvieweditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -37,8 +37,8 @@
#include <klocale.h>
-ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
- : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
+ListViewEditor::ListViewEditor( TQWidget *tqparent, TQListView *lv, FormWindow *fw )
+ : ListViewEditorBase( tqparent, 0, true ), listview( lv ), formwindow( fw )
{
connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
itemText->setEnabled( false );
@@ -63,7 +63,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
void ListViewEditor::applyClicked()
{
setupItems();
- PopulateListViewCommand *cmd = new PopulateListViewCommand( i18n("Edit Items and Columns of '%1'" ).arg( listview->name() ),
+ PopulateListViewCommand *cmd = new PopulateListViewCommand( i18n("Edit Items and Columns of '%1'" ).tqarg( listview->name() ),
formwindow, listview, itemsPreview );
cmd->execute();
formwindow->commandHistory()->addCommand( cmd );
@@ -321,10 +321,10 @@ void ListViewEditor::itemDownClicked()
return;
TQListViewItemIterator it( i );
- TQListViewItem *parent = i->parent();
+ TQListViewItem *tqparent = i->tqparent();
it++;
while ( it.current() ) {
- if ( it.current()->parent() == parent )
+ if ( it.current()->tqparent() == tqparent )
break;
it++;
}
@@ -346,11 +346,11 @@ void ListViewEditor::itemNewClicked()
void ListViewEditor::itemNewSubClicked()
{
- TQListViewItem *parent = itemsPreview->currentItem();
+ TQListViewItem *tqparent = itemsPreview->currentItem();
TQListViewItem *item = 0;
- if ( parent ) {
- item = new TQListViewItem( parent );
- parent->setOpen( true );
+ if ( tqparent ) {
+ item = new TQListViewItem( tqparent );
+ tqparent->setOpen( true );
} else {
item = new TQListViewItem( itemsPreview );
}
@@ -405,10 +405,10 @@ void ListViewEditor::itemUpClicked()
return;
TQListViewItemIterator it( i );
- TQListViewItem *parent = i->parent();
+ TQListViewItem *tqparent = i->tqparent();
--it;
while ( it.current() ) {
- if ( it.current()->parent() == parent )
+ if ( it.current()->tqparent() == tqparent )
break;
--it;
}
@@ -427,13 +427,13 @@ void ListViewEditor::itemRightClicked()
return;
TQListViewItemIterator it( i );
- TQListViewItem *parent = i->parent();
- parent = parent ? parent->firstChild() : itemsPreview->firstChild();
- if ( !parent )
+ TQListViewItem *tqparent = i->tqparent();
+ tqparent = tqparent ? tqparent->firstChild() : itemsPreview->firstChild();
+ if ( !tqparent )
return;
it++;
while ( it.current() ) {
- if ( it.current()->parent() == parent )
+ if ( it.current()->tqparent() == tqparent )
break;
it++;
}
@@ -467,13 +467,13 @@ void ListViewEditor::itemLeftClicked()
return;
TQListViewItemIterator it( i );
- TQListViewItem *parent = i->parent();
- if ( !parent )
+ TQListViewItem *tqparent = i->tqparent();
+ if ( !tqparent )
return;
- parent = parent->parent();
+ tqparent = tqparent->tqparent();
--it;
while ( it.current() ) {
- if ( it.current()->parent() == parent )
+ if ( it.current()->tqparent() == tqparent )
break;
--it;
}
@@ -531,7 +531,7 @@ void ListViewEditor::setupColumns()
void ListViewEditor::setupItems()
{
itemColumn->setMinValue( 0 );
- itemColumn->setMaxValue( QMAX( numColumns - 1, 0 ) );
+ itemColumn->setMaxValue( TQMAX( numColumns - 1, 0 ) );
int i = 0;
TQHeader *header = itemsPreview->header();
for ( TQListBoxItem *item = colPreview->firstItem(); item; item = item->next() ) {
@@ -548,7 +548,7 @@ void ListViewEditor::setupItems()
while ( itemsPreview->columns() > i )
itemsPreview->removeColumn( i );
- itemColumn->setValue( QMIN( numColumns - 1, itemColumn->value() ) );
+ itemColumn->setValue( TQMIN( numColumns - 1, itemColumn->value() ) );
}
ListViewEditor::Column *ListViewEditor::findColumn( TQListBoxItem *i )
diff --git a/kommander/editor/listvieweditorimpl.h b/kommander/editor/listvieweditorimpl.h
index 37f9154e..9a7d7457 100644
--- a/kommander/editor/listvieweditorimpl.h
+++ b/kommander/editor/listvieweditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -32,9 +32,10 @@ class FormWindow;
class ListViewEditor : public ListViewEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw );
+ ListViewEditor( TQWidget *tqparent, TQListView *lv, FormWindow *fw );
protected slots:
void applyClicked();
@@ -70,7 +71,7 @@ private:
TQString text;
TQPixmap pixmap;
bool clickable, resizable;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const Column& ) const { return FALSE; }
#endif
};
diff --git a/kommander/editor/main.cpp b/kommander/editor/main.cpp
index 7be1f31d..644e10d7 100644
--- a/kommander/editor/main.cpp
+++ b/kommander/editor/main.cpp
@@ -30,7 +30,7 @@
static const char *description =
I18N_NOOP("Kommander is a graphical editor of scripted dialogs.");
static const char *text =
- I18N_NOOP("Based on Qt Designer, (C) 2000 Trolltech AS.");
+ I18N_NOOP("Based on TQt Designer, (C) 2000 Trolltech AS.");
static KCmdLineOptions options[] =
{
diff --git a/kommander/editor/mainwindow.cpp b/kommander/editor/mainwindow.cpp
index 069d30dd..f87b7c2c 100644
--- a/kommander/editor/mainwindow.cpp
+++ b/kommander/editor/mainwindow.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -108,7 +108,7 @@ static TQString textNoAccel(const TQString& text)
{
TQString t = text;
int i;
- while ((i = t.find('&'))>= 0) {
+ while ((i = t.tqfind('&'))>= 0) {
t.remove(i,1);
}
return t;
@@ -118,7 +118,7 @@ static TQString textNoAccel(const TQString& text)
MainWindow::MainWindow(bool asClient)
: KParts::DockMainWindow(0, "mainwindow", WType_TopLevel | WDestructiveClose | WGroupLeader),
grd(10, 10), sGrid(true), snGrid(true), restoreConfig(true), splashScreen(true),
- docPath("$QTDIR/doc/html"), client(asClient), databaseAutoEdit(false), previewing(false)
+ docPath("$TQTDIR/doc/html"), client(asClient), databaseAutoEdit(false), previewing(false)
{
m_partManager = new KParts::PartManager(this);
//connect(m_partManager, TQT_SIGNAL(activePartChanged(KParts::Part * )), this, TQT_SLOT(slotActivePartChanged(KParts::Part * )));
@@ -143,9 +143,9 @@ MainWindow::MainWindow(bool asClient)
setupMDI();
setupFileActions();
setupEditActions();
- layoutToolBar = new KToolBar(this, "Layout");
- ((KToolBar *) layoutToolBar)->setFullSize(false);
- addToolBar(layoutToolBar, i18n("Layout"));
+ tqlayoutToolBar = new KToolBar(this, "Layout");
+ ((KToolBar *) tqlayoutToolBar)->setFullSize(false);
+ addToolBar(tqlayoutToolBar, i18n("Layout"));
setupToolActions();
setupLayoutActions();
setupWorkspace();
@@ -171,8 +171,8 @@ MainWindow::MainWindow(bool asClient)
connect(kapp->clipboard(), TQT_SIGNAL(dataChanged()), this, TQT_SLOT(clipboardChanged()));
clipboardChanged();
- layoutChilds = false;
- layoutSelected = false;
+ tqlayoutChilds = false;
+ tqlayoutSelected = false;
breakLayout = false;
backPix = true;
@@ -191,7 +191,7 @@ MainWindow::MainWindow(bool asClient)
w = WidgetFactory::create(WidgetDatabase::idFromClassName(TQFRAME_OBJECT_NAME_STRING), this, 0, false);
delete w;
- assistant = new AssistProc(this, "Internal Assistant", assistantPath());
+ assistant = new AssistProc(TQT_TQOBJECT(this), "Internal Assistant", assistantPath());
statusBar()->setSizeGripEnabled(true);
SpecialInformation::registerSpecials();
@@ -237,7 +237,7 @@ void MainWindow::setupPropertyEditor()
{
KDockWidget *dw = createDockWidget("Property Editor", TQPixmap(), 0, i18n("Properties"));
propertyEditor = new PropertyEditor(dw);
- //addToolBar(dw, Qt::DockLeft);
+ //addToolBar(dw, TQt::DockLeft);
dw->setWidget(propertyEditor);
dw->manualDock(getMainDockWidget(), KDockWidget::DockLeft, 20);
dw->setCaption(i18n("Property Editor"));
@@ -274,7 +274,7 @@ void MainWindow::setupHierarchyView()
"<p>The Object Explorer provides an overview of the relationships "
"between the widgets in a form. You can use the clipboard functions using "
"a context menu for each item in the view. It is also useful for selecting widgets "
- "in forms that have complex layouts.</p>"
+ "in forms that have complex tqlayouts.</p>"
"<p>The columns can be resized by dragging the separator in the list's header.</p>"
"<p>The second tab shows all the form's slots, class variables, includes, etc.</p>"));
}
@@ -300,7 +300,7 @@ void MainWindow::setupActionEditor()
{
KDockWidget *dw = createDockWidget("Action Editor", TQPixmap(), 0, i18n("Actions"));
actionEditor = new ActionEditor(dw, "ActionEditor");
- //addToolBar(dw, Qt::DockLeft);
+ //addToolBar(dw, TQt::DockLeft);
dw->setWidget(actionEditor);
dw->setCaption(i18n("Action Editor"));
TQWhatsThis::add(actionEditor, i18n("<b>The Action Editor</b>"
@@ -368,7 +368,7 @@ int MainWindow::currentTool() const
{
if (!actionCurrentTool)
return POINTER_TOOL;
- return TQString::fromLatin1(actionCurrentTool->name()).toInt();
+ return TQString::tqfromLatin1(actionCurrentTool->name()).toInt();
}
void MainWindow::slotCreateBackups()
@@ -392,7 +392,7 @@ void MainWindow::slotCreateBackups()
form->formFile()->setModified(true);
if (!form->formFile()->save(false))
{
- KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(backupName));
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(backupName));
}
form->formFile()->setFileName(fileName);
form->formFile()->setModified(modified);
@@ -417,7 +417,7 @@ void MainWindow::runForm()
while ((editor = it.current()) != 0L)
{
++it;
- static_cast<AssocTextEditor*>(editor)->save();
+ static_cast<AssocTextEditor*>(TQT_TQWIDGET(editor))->save();
}
delete editors;
@@ -436,7 +436,7 @@ void MainWindow::runForm()
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName));
+ KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").tqarg(m_backupName));
return;
}
form->formFile()->setFileName(m_fileName);
@@ -446,12 +446,12 @@ void MainWindow::runForm()
{
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup"));
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(m_fileName + ".backup"));
}
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kmdr-executor" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ (*process) << "kmdr-executor" << TQString("\"%1\"").tqarg(form->formFile()->fileName());
connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
TQT_SLOT(receivedStdout(KProcess*, char*, int)));
connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
@@ -481,7 +481,7 @@ void MainWindow::runForm4()
while ((editor = it.current()) != 0L)
{
++it;
- static_cast<AssocTextEditor*>(editor)->save();
+ static_cast<AssocTextEditor*>(TQT_TQWIDGET(editor))->save();
}
delete editors;
@@ -500,7 +500,7 @@ void MainWindow::runForm4()
::stat(m_fileName.local8Bit(), &statbuf);
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_backupName), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").arg(m_backupName));
+ KMessageBox::error(this, i18n("<qt>Cannot create temporary file <i>%1</i>.</qt>").tqarg(m_backupName));
return;
}
form->formFile()->setFileName(m_fileName);
@@ -510,12 +510,12 @@ void MainWindow::runForm4()
{
if (!readOnlyFile && !KIO::NetAccess::file_copy(KURL::fromPathOrURL(m_fileName), KURL::fromPathOrURL(m_fileName + ".backup"), statbuf.st_mode, true))
{
- KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").arg(m_fileName + ".backup"));
+ KMessageBox::error(this, i18n("<qt>Cannot create backup file <i>%1</i>.</qt>").tqarg(m_fileName + ".backup"));
}
::chmod(m_fileName.local8Bit(), S_IRWXU);
KProcess* process = new KProcess;
process->setUseShell(true);
- (*process) << "kommander" << TQString("\"%1\"").arg(form->formFile()->fileName());
+ (*process) << "kommander" << TQString("\"%1\"").tqarg(form->formFile()->fileName());
connect(process, TQT_SIGNAL(receivedStdout(KProcess*, char*, int)), messageLog,
TQT_SLOT(receivedStdout(KProcess*, char*, int)));
connect(process, TQT_SIGNAL(receivedStderr(KProcess*, char*, int)), messageLog,
@@ -554,9 +554,9 @@ void MainWindow::showProperties(TQObject *o)
}
TQWidget *w = (TQWidget*)o;
setupHierarchyView();
- FormWindow *fw = (FormWindow*)isAFormWindowChild(w);
+ FormWindow *fw = (FormWindow*)isAFormWindowChild(TQT_TQOBJECT(w));
if (fw) {
- propertyEditor->setWidget(w, fw);
+ propertyEditor->setWidget(TQT_TQOBJECT(w), fw);
hierarchyView->setFormWindow(fw, w);
} else {
propertyEditor->setWidget(0, 0);
@@ -596,7 +596,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
while (w) {
if (w->inherits("PropertyList"))
break;
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
}
if (w) {
propertyEditor->propertyList()->showCurrentWhatsThis();
@@ -617,7 +617,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
}
break;
case TQEvent::MouseButtonPress:
- if (((TQMouseEvent*)e)->button() == MidButton && dynamic_cast<KommanderWidget *>(o))
+ if (((TQMouseEvent*)e)->button() == Qt::MidButton && dynamic_cast<KommanderWidget *>(o))
{
AssocTextEditor *editor = new AssocTextEditor((TQWidget*)o, formWindow(), propertyEditor, m_partManager,
this, "AssocTextEditor", false); //deletes itself!
@@ -626,27 +626,27 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
return true;
}
case TQEvent::ContextMenu:
- if (o->inherits("QDesignerPopupMenu"))
+ if (o->inherits("TQDesignerPopupMenu"))
break;
- if (o && currentTool() == POINTER_TOOL && (o->inherits("QDesignerMenuBar") ||
- o->inherits("QDesignerToolBar") ||
- (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("QDesignerToolBarSeparator")) &&
- o->parent() && o->parent()->inherits("QDesignerToolBar"))) {
+ if (o && currentTool() == POINTER_TOOL && (o->inherits("TQDesignerMenuBar") ||
+ o->inherits("TQDesignerToolBar") ||
+ (o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || o->inherits("TQDesignerToolBarSeparator")) &&
+ o->tqparent() && o->tqparent()->inherits("TQDesignerToolBar"))) {
TQWidget *w = (TQWidget*)o;
- if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("QDesignerToolBarSeparator"))
- w = w->parentWidget();
- TQWidget *pw = w->parentWidget();
+ if (w->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) || w->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) || w->inherits("TQDesignerToolBarSeparator"))
+ w = w->tqparentWidget();
+ TQWidget *pw = w->tqparentWidget();
while (pw) {
if (pw->inherits("FormWindow")) {
- ((FormWindow*)pw)->emitShowProperties(w);
- if (!o->inherits("QDesignerToolBar"))
+ ((FormWindow*)pw)->emitShowProperties(TQT_TQOBJECT(w));
+ if (!o->inherits("TQDesignerToolBar"))
return !o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && !o->inherits(TQMENUBAR_OBJECT_NAME_STRING) &&
- !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("QDesignerToolBarSeparator");
+ !o->inherits(TQCOMBOBOX_OBJECT_NAME_STRING) && !o->inherits("TQDesignerToolBarSeparator");
}
- pw = pw->parentWidget();
+ pw = pw->tqparentWidget();
}
}
- if (o && (o->inherits("QDesignerToolBar") || o->inherits("QDockWindowHandle"))
+ if (o && (o->inherits("TQDesignerToolBar") || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING))
&& e->type() == TQEvent::ContextMenu)
break;
if (isAToolBarChild(o) && currentTool() != CONNECT_TOOL)
@@ -719,7 +719,7 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::MouseButtonDblClick:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator")) {
if (o && o->inherits(TQTOOLBUTTON_OBJECT_NAME_STRING) && ((TQToolButton*)o)->isOn() &&
- o->parent() && o->parent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && formWindow())
+ o->tqparent() && o->tqparent()->inherits(TQTOOLBAR_OBJECT_NAME_STRING) && formWindow())
formWindow()->setToolFixed();
break;
}
@@ -740,19 +740,19 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Hide:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
- if (((FormWindow*)w)->isWidgetSelected((TQWidget*)o))
- ((FormWindow*)w)->selectWidget((TQWidget*)o, false);
+ if (((FormWindow*)w)->isWidgetSelected(TQT_TQOBJECT(o)))
+ ((FormWindow*)w)->selectWidget(TQT_TQOBJECT(o), false);
break;
case TQEvent::Enter:
case TQEvent::Leave:
- if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("QDesignerMenuBar"))
+ if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator") || o->inherits("TQDesignerMenuBar"))
break;
return true;
case TQEvent::Resize:
case TQEvent::Move:
if (!(w = isAFormWindowChild(o)) || o->inherits("SizeHandle") || o->inherits("OrderIndicator"))
break;
- if (WidgetFactory::layoutType((TQWidget*)o->parent()) != WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType((TQWidget*)o->tqparent()) != WidgetFactory::NoLayout) {
((FormWindow*)w)->updateSelection((TQWidget*)o);
if (e->type() != TQEvent::Resize)
((FormWindow*)w)->updateChildSelections((TQWidget*)o);
@@ -761,25 +761,25 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
case TQEvent::Close:
break;
case TQEvent::DragEnter:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDragEnterEvent((TQDragEnterEvent*)e);
return true;
}
break;
case TQEvent::DragMove:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDragMoveEvent((TQDragMoveEvent*)e);
return true;
}
break;
case TQEvent::Drop:
- if (o == qWorkspace() || o == workspace() || o == workspace()->viewport()) {
+ if (TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(qWorkspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(workspace()->viewport())) {
workspace()->contentsDropEvent((TQDropEvent*)e);
return true;
}
break;
case TQEvent::Show:
- if (o != this)
+ if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this))
break;
if (((TQShowEvent*)e)->spontaneous())
break;
@@ -808,12 +808,12 @@ bool MainWindow::eventFilter(TQObject *o, TQEvent *e)
TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const
{
- if (o->parent() && o->parent()->inherits(TQWIZARD_OBJECT_NAME_STRING) && !o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
+ if (o->tqparent() && o->tqparent()->inherits(TQWIZARD_OBJECT_NAME_STRING) && !o->inherits(TQPUSHBUTTON_OBJECT_NAME_STRING))
return 0;
while (o) {
if (o->inherits("FormWindow"))
return (TQWidget*)o;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
@@ -821,11 +821,11 @@ TQWidget *MainWindow::isAFormWindowChild(TQObject *o) const
TQWidget *MainWindow::isAToolBarChild(TQObject *o) const
{
while (o) {
- if (o->inherits("QDesignerToolBar"))
+ if (o->inherits("TQDesignerToolBar"))
return (TQWidget*)o;
if (o->inherits("FormWindow"))
return 0;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
@@ -837,7 +837,7 @@ FormWindow *MainWindow::formWindow()
if (qworkspace->activeWindow()->inherits("FormWindow"))
fw = (FormWindow*)qworkspace->activeWindow();
else if (lastActiveFormWindow &&
- qworkspace->windowList().find(lastActiveFormWindow) != -1)
+ qworkspace->windowList().tqfind(lastActiveFormWindow) != -1)
fw = lastActiveFormWindow;
return fw;
}
@@ -848,7 +848,7 @@ void MainWindow::insertFormWindow(FormWindow *fw)
{
if (fw)
TQWhatsThis::add(fw, i18n("<b>The Form Window</b>"
- "<p>Use the various tools to add widgets or to change the layout "
+ "<p>Use the various tools to add widgets or to change the tqlayout "
"and behavior of the components in the form. Select one or multiple "
"widgets to move them or lay them out. If a single widget is chosen it can "
"be resized using the resize handles.</p>"
@@ -872,12 +872,12 @@ void MainWindow::insertFormWindow(FormWindow *fw)
fw->show();
fw->currentToolChanged();
- if (fw->caption().isEmpty() && qstrlen(fw->name()) )
+ if (fw->caption().isEmpty() && tqstrlen(fw->name()) )
fw->setCaption(fw->name());
fw->mainContainer()->setCaption(fw->caption());
WidgetFactory::saveDefaultProperties(fw->mainContainer(),
WidgetDatabase::
- idFromClassName(WidgetFactory::classNameOf(fw->mainContainer())));
+ idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(fw->mainContainer()))));
activeWindowChanged(fw);
emit formWindowsChanged();
}
@@ -934,7 +934,7 @@ void MainWindow::activeWindowChanged(TQWidget *w)
emit hasActiveForm(false);
propertyEditor->clear();
hierarchyView->clear();
- updateUndoRedo(false, false, TQString::null, TQString::null);
+ updateUndoRedo(false, false, TQString(), TQString());
}
selectionChanged();
@@ -952,11 +952,11 @@ void MainWindow::updateUndoRedo(bool undoAvailable, bool redoAvailable,
actionEditUndo->setEnabled(undoAvailable);
actionEditRedo->setEnabled(redoAvailable);
if (!undoCmd.isEmpty())
- actionEditUndo->setText(i18n("&Undo: %1").arg(undoCmd));
+ actionEditUndo->setText(i18n("&Undo: %1").tqarg(undoCmd));
else
actionEditUndo->setText(i18n("&Undo: Not Available"));
if (!redoCmd.isEmpty())
- actionEditRedo->setText(i18n("&Redo: %1").arg(redoCmd));
+ actionEditRedo->setText(i18n("&Redo: %1").tqarg(redoCmd));
else
actionEditRedo->setText(i18n("&Redo: Not Available"));
@@ -1012,18 +1012,18 @@ void MainWindow::popupWidgetMenu(const TQPoint &gp, FormWindow * /*fw*/, TQWidge
void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int> &props, TQWidget *w)
{
- const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
+ const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
if (text && qstrcmp(text->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
text = 0;
- const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
if (title && qstrcmp(title->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
title = 0;
const TQMetaProperty* pagetitle =
- w->metaObject()->property(w->metaObject()->findProperty("pageTitle", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pageTitle", true), true);
if (pagetitle && qstrcmp(pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0)
pagetitle = 0;
const TQMetaProperty* pixmap =
- w->metaObject()->property(w->metaObject()->findProperty("pixmap", true), true);
+ w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("pixmap", true), true);
if (pixmap && qstrcmp(pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0)
pixmap = 0;
@@ -1056,7 +1056,7 @@ void MainWindow::setupRMBProperties(TQValueList<int> &ids, TQMap<TQString, int>
void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString, int> &commands, TQWidget *w)
{
int id;
- // KommanderWidget doesn't derive from QObject
+ // KommanderWidget doesn't derive from TQObject
KommanderWidget *atw = dynamic_cast<KommanderWidget *>(w);
if(atw)
{
@@ -1071,7 +1071,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
- if (((QDesignerTabWidget*)w)->count() > 1) {
+ if (((TQDesignerTabWidget*)w)->count() > 1) {
ids << (id = rmbWidgets->insertItem(i18n("Delete Page"), -1, 0));
commands.insert("remove", id);
}
@@ -1088,7 +1088,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
ids << (id = rmbWidgets->insertItem(i18n("Add Page"), -1, 0));
commands.insert("add", id);
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))))
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))))
{
if (ids.isEmpty())
ids << rmbWidgets->insertSeparator(0);
@@ -1101,7 +1101,7 @@ void MainWindow::setupRMBSpecialCommands(TQValueList<int> &ids, TQMap<TQString,
{
int id;
- // KommanderWidget doesn't derive from QObject
+ // KommanderWidget doesn't derive from TQObject
KommanderWidget *atw = dynamic_cast<KommanderWidget *>(fw->mainContainer());
if(atw)
{
@@ -1153,49 +1153,49 @@ void MainWindow::handleRMBProperties(int id, TQMap<TQString, int> &props, TQWidg
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- TQString pn(i18n("Set the 'text' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'text' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"text", w->property("text"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "text", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true);
}
} else if (id == props[ "title" ]) {
bool ok = false;
TQString title = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'title' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'title' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"title", w->property("title"),
- title, TQString::null, TQString::null);
+ title, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "title", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true);
}
} else if (id == props[ "pagetitle" ]) {
bool ok = false;
TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), w->property("pageTitle").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'pageTitle' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'pageTitle' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"pageTitle", w->property("pageTitle"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "pageTitle", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pageTitle", true);
}
} else if (id == props[ "pixmap" ]) {
- TQPixmap oldPix = w->property("pixmap").toPixmap();
+ TQPixmap oldPix = TQVariant(w->property("pixmap")).toPixmap();
TQPixmap pix = qChoosePixmap(this, formWindow(), oldPix);
if (!pix.isNull()) {
- TQString pn(i18n("Set the 'pixmap' of '%1'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'pixmap' of '%1'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"pixmap", w->property("pixmap"),
- pix, TQString::null, TQString::null);
+ pix, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "pixmap", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "pixmap", true);
}
}
}
@@ -1214,15 +1214,15 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
if (w->inherits(TQTABWIDGET_OBJECT_NAME_STRING)) {
TQTabWidget *tw = (TQTabWidget*)w;
if (id == commands[ "add" ]) {
- AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ AddTabPageCommand *cmd = new AddTabPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(),
tw, "Tab");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "remove" ]) {
if (tw->currentPage()) {
- QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
+ TQDesignerTabWidget *dtw = (TQDesignerTabWidget*)tw;
DeleteTabPageCommand *cmd = new DeleteTabPageCommand(i18n("Delete Page %1 of %2").
- arg(dtw->pageTitle()).arg(tw->name()),
+ tqarg(dtw->pageTitle()).tqarg(tw->name()),
formWindow(), tw, tw->currentPage());
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1232,7 +1232,7 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
if (w->inherits(TQTOOLBOX_OBJECT_NAME_STRING)) {
TQToolBox *tw = (TQToolBox*)w;
if (id == commands[ "add" ]) {
- AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").arg(tw->name()), formWindow(),
+ AddToolBoxPageCommand *cmd = new AddToolBoxPageCommand(i18n("Add Page to %1").tqarg(tw->name()), formWindow(),
tw, "Page");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1240,16 +1240,16 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
if (tw->currentItem()) {
EditorToolBox *dtw = (EditorToolBox*)tw;
DeleteToolBoxPageCommand *cmd = new DeleteToolBoxPageCommand(i18n("Delete Page %1 of %2").
- arg(dtw->pageTitle()).arg(tw->name()),
+ tqarg(dtw->pageTitle()).tqarg(tw->name()),
formWindow(), tw, tw->currentItem());
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
}
}
}
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
if (id == commands[ "edit" ])
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
}
}
@@ -1267,15 +1267,15 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
if (fw->mainContainer()->inherits(TQWIZARD_OBJECT_NAME_STRING)) {
TQWizard *wiz = (TQWizard*)fw->mainContainer();
if (id == commands[ "add" ]) {
- AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").arg(wiz->name()), formWindow(),
+ AddWizardPageCommand *cmd = new AddWizardPageCommand(i18n("Add Page to %1").tqarg(wiz->name()), formWindow(),
wiz, "Page");
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "remove" ]) {
if (wiz->currentPage()) {
- QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand(i18n("Delete Page %1 of %2").
- arg(dw->pageTitle()).arg(wiz->name()),
+ tqarg(dw->pageTitle()).tqarg(wiz->name()),
formWindow(), wiz, wiz->indexOf(wiz->currentPage()));
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
@@ -1287,10 +1287,10 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
} else if (id == commands[ "rename" ]) {
bool ok = false;
- QDesignerWizard *dw = (QDesignerWizard*)wiz;
+ TQDesignerWizard *dw = (TQDesignerWizard*)wiz;
TQString text = KInputDialog::getText(i18n("Page Title"), i18n("New page title:"), dw->pageTitle(), &ok, this);
if (ok) {
- TQString pn(i18n("Rename page %1 of %2").arg(dw->pageTitle()).arg(wiz->name()));
+ TQString pn(i18n("Rename page %1 of %2").tqarg(dw->pageTitle()).tqarg(wiz->name()));
RenameWizardPageCommand *cmd = new RenameWizardPageCommand(pn, formWindow()
, wiz, wiz->indexOf(wiz->currentPage()), text);
formWindow()->commandHistory()->addCommand(cmd);
@@ -1300,11 +1300,11 @@ void MainWindow::handleRMBSpecialCommands(int id, TQMap<TQString, int> &commands
} else if (fw->mainContainer()->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if (id == commands[ "add_toolbar" ]) {
- AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ AddToolBarCommand *cmd = new AddToolBarCommand(i18n("Add Toolbar to '%1'").tqarg(formWindow()->name()), formWindow(), mw);
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
} else if (id == commands[ "add_menu_item" ]) {
- AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").arg(formWindow()->name()), formWindow(), mw);
+ AddMenuCommand *cmd = new AddMenuCommand(i18n("Add Menu to '%1'").tqarg(formWindow()->name()), formWindow(), mw);
formWindow()->commandHistory()->addCommand(cmd);
cmd->execute();
}
@@ -1320,8 +1320,8 @@ void MainWindow::clipboardChanged()
void MainWindow::selectionChanged()
{
- layoutChilds = false;
- layoutSelected = false;
+ tqlayoutChilds = false;
+ tqlayoutSelected = false;
breakLayout = false;
if (!formWindow()) {
actionEditCut->setEnabled(false);
@@ -1358,7 +1358,7 @@ void MainWindow::selectionChanged()
int unlaidout = 0;
int laidout = 0;
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)
unlaidout++;
else
laidout++;
@@ -1370,27 +1370,27 @@ void MainWindow::selectionChanged()
actionEditGridLayout->setEnabled(unlaidout > 1);
actionEditBreakLayout->setEnabled(laidout > 0);
actionEditAdjustSize->setEnabled(laidout > 0);
- layoutSelected = unlaidout > 1;
+ tqlayoutSelected = unlaidout > 1;
breakLayout = laidout > 0;
} else if (selectedWidgets == 1) {
TQWidget *w = widgets.first();
- bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w))) ||
+ bool isContainer = WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w)))) ||
w == formWindow()->mainContainer();
- actionEditAdjustSize->setEnabled(!w->parentWidget() ||
- WidgetFactory::layoutType(w->parentWidget()) == WidgetFactory::NoLayout);
+ actionEditAdjustSize->setEnabled(!w->tqparentWidget() ||
+ WidgetFactory::tqlayoutType(w->tqparentWidget()) == WidgetFactory::NoLayout);
if (!isContainer) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
actionEditGridLayout->setEnabled(false);
- if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ if (w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
} else {
actionEditBreakLayout->setEnabled(false);
}
} else {
- if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout) {
if (!formWindow()->hasInsertedChildren(w)) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
@@ -1401,24 +1401,24 @@ void MainWindow::selectionChanged()
actionEditVLayout->setEnabled(true);
actionEditGridLayout->setEnabled(true);
actionEditBreakLayout->setEnabled(false);
- layoutChilds = true;
+ tqlayoutChilds = true;
}
- if (w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout) {
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ if (w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout) {
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
}
} else {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
actionEditGridLayout->setEnabled(false);
- actionEditBreakLayout->setEnabled(!isAToolBarChild(w));
+ actionEditBreakLayout->setEnabled(!isAToolBarChild(TQT_TQOBJECT(w)));
breakLayout = true;
}
}
} else if (selectedWidgets == 0 && formWindow()) {
actionEditAdjustSize->setEnabled(true);
TQWidget *w = formWindow()->mainContainer();
- if (WidgetFactory::layoutType(w) == WidgetFactory::NoLayout) {
+ if (WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout) {
if (!formWindow()->hasInsertedChildren(w)) {
actionEditHLayout->setEnabled(false);
actionEditVLayout->setEnabled(false);
@@ -1429,7 +1429,7 @@ void MainWindow::selectionChanged()
actionEditVLayout->setEnabled(true);
actionEditGridLayout->setEnabled(true);
actionEditBreakLayout->setEnabled(false);
- layoutChilds = true;
+ tqlayoutChilds = true;
}
} else {
actionEditHLayout->setEnabled(false);
@@ -1464,7 +1464,7 @@ void MainWindow::writeConfig()
config->setGroup("Background");
config->writeEntry("UsePixmap", backPix);
- config->writeEntry("Color", qworkspace->backgroundColor().name());
+ config->writeEntry("Color", TQString(qworkspace->backgroundColor().name()));
/*
config->setGroup("Geometry");
@@ -1491,7 +1491,7 @@ void MainWindow::readConfig()
restoreConfig = config->readBoolEntry("RestoreWorkspace", true);
splashScreen = config->readBoolEntry("SplashScreen", true);
docPath = config->readEntry("DocPath", docPath);
- templPath = config->readEntry("TemplatePath", TQString::null);
+ templPath = config->readEntry("TemplatePath", TQString());
config->setGroup("Grid");
sGrid = config->readBoolEntry("Snap", true);
@@ -1541,9 +1541,9 @@ HierarchyView *MainWindow::objectHierarchy() const
return hierarchyView;
}
-TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *parent)
+TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *tqparent)
{
- TQPopupMenu *menu = new TQPopupMenu(parent);
+ TQPopupMenu *menu = new TQPopupMenu(tqparent);
actionEditCut->plug(menu);
actionEditCopy->plug(menu);
@@ -1553,12 +1553,12 @@ TQPopupMenu *MainWindow::setupNormalHierarchyMenu(TQWidget *parent)
return menu;
}
-TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(TQWidget *parent, const char *addSlot, const char *removeSlot)
+TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu(TQWidget *tqparent, const char *addSlot, const char *removeSlot)
{
- TQPopupMenu *menu = new TQPopupMenu(parent);
+ TQPopupMenu *menu = new TQPopupMenu(tqparent);
- menu->insertItem(i18n("Add Page"), parent, addSlot);
- menu->insertItem(i18n("Delete Page"), parent, removeSlot);
+ menu->insertItem(i18n("Add Page"), tqparent, addSlot);
+ menu->insertItem(i18n("Delete Page"), tqparent, removeSlot);
menu->insertSeparator();
actionEditCut->plug(menu);
actionEditCopy->plug(menu);
@@ -1620,15 +1620,15 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor(TQWidget* w, FormWindow*)
{
- if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)))) {
- statusBar()->message(i18n("Edit %1...").arg(w->className()));
- WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)), this, w, formWindow());
+ if (WidgetFactory::hasSpecialEditor(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))))) {
+ statusBar()->message(i18n("Edit %1...").tqarg(w->className()));
+ WidgetFactory::editWidget(WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))), this, w, formWindow());
statusBar()->clear();
return true;
}
- const TQMetaProperty* text = w->metaObject()->property(w->metaObject()->findProperty("text", true), true);
- const TQMetaProperty* title = w->metaObject()->property(w->metaObject()->findProperty("title", true), true);
+ const TQMetaProperty* text = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("text", true), true);
+ const TQMetaProperty* title = w->tqmetaObject()->property(w->tqmetaObject()->tqfindProperty("title", true), true);
if (text && text->designable(w)) {
bool ok = false;
TQString text;
@@ -1639,13 +1639,13 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
text = KInputDialog::getText(i18n("Text"), i18n("New text:"), w->property("text").toString(), &ok, this);
}
if (ok) {
- TQString pn(i18n("Set the 'text' of '%2'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'text' of '%2'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"text", w->property("text"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "text", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "text", true);
}
return true;
}
@@ -1654,13 +1654,13 @@ bool MainWindow::openEditor(TQWidget* w, FormWindow*)
TQString text;
text = KInputDialog::getText(i18n("Title"), i18n("New title:"), w->property("title").toString(), &ok, this);
if (ok) {
- TQString pn(i18n("Set the 'title' of '%2'").arg(w->name()));
- SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), w, propertyEditor,
+ TQString pn(i18n("Set the 'title' of '%2'").tqarg(w->name()));
+ SetPropertyCommand *cmd = new SetPropertyCommand(pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
"title", w->property("title"),
- text, TQString::null, TQString::null);
+ text, TQString(), TQString());
cmd->execute();
formWindow()->commandHistory()->addCommand(cmd);
- MetaDataBase::setPropertyChanged(w, "title", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "title", true);
}
return true;
}
@@ -1706,9 +1706,9 @@ TQString MainWindow::documentationPath() const
TQString result = docPath;
if (docPath[0] == '$') {
- int fs = docPath.find('/');
+ int fs = docPath.tqfind('/');
if (fs == -1)
- fs = docPath.find('\\');
+ fs = docPath.tqfind('\\');
if (fs > -1) {
result = docPath.mid(1, fs-1);
@@ -1756,7 +1756,7 @@ void MainWindow::checkTempFiles()
void MainWindow::showDialogHelp()
{
TQWidget *w = (TQWidget*)sender();
- w = w->topLevelWidget();
+ w = w->tqtopLevelWidget();
TQString link = "designer-manual-12.html#";
@@ -1777,9 +1777,9 @@ void MainWindow::showDialogHelp()
else if (w->inherits("DatabaseConnectionBase"))
link += "dialog-edit-database-connections";
else if (w->inherits("FindDialog"))
- link += "dialog-find-text";
+ link += "dialog-tqfind-text";
else if (w->inherits("ReplaceDialog"))
- link += "dialog-replace-text";
+ link += "dialog-tqreplace-text";
else if (w->inherits("GotoLineDialog"))
link += "dialog-go-to-line";
else if (w->inherits("ConnectionEditorBase"))
@@ -1836,13 +1836,13 @@ void MainWindow::setModified(bool b, TQWidget *window)
((FormWindow *) w)->modificationChanged(b);
return;
}
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
if (w->inherits("FormWindow"))
{
((FormWindow *) w)->modificationChanged(b);
return;
}
- w = w->parentWidget(true);
+ w = w->tqparentWidget(true);
}
}
@@ -1869,20 +1869,20 @@ void MainWindow::formNameChanged(FormWindow*)
int MainWindow::currentLayoutDefaultSpacing() const
{
if (((MainWindow*)this)->formWindow())
- return ((MainWindow*)this)->formWindow()->layoutDefaultSpacing();
+ return ((MainWindow*)this)->formWindow()->tqlayoutDefaultSpacing();
return BOXLAYOUT_DEFAULT_SPACING;
}
int MainWindow::currentLayoutDefaultMargin() const
{
if (((MainWindow*)this)->formWindow())
- return ((MainWindow*)this)->formWindow()->layoutDefaultMargin();
+ return ((MainWindow*)this)->formWindow()->tqlayoutDefaultMargin();
return BOXLAYOUT_DEFAULT_MARGIN;
}
TQString MainWindow::whatsThisFrom(const TQString&)
{
- return TQString::null;
+ return TQString();
}
void MainWindow::slotActivePartChanged(KParts::Part * part)
diff --git a/kommander/editor/mainwindow.h b/kommander/editor/mainwindow.h
index 1f4a9346..a8ac770e 100644
--- a/kommander/editor/mainwindow.h
+++ b/kommander/editor/mainwindow.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -53,7 +53,7 @@ class MessageLog;
class ReplaceDialog;
class Workspace;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
#include <tqtoolbar.h>
#else
class TQToolBar;
@@ -68,6 +68,7 @@ namespace KParts {
class MainWindow : public KParts::DockMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
MainWindow( bool asClient );
@@ -93,8 +94,8 @@ public:
void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw );
void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w );
- TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
- TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
+ TQPopupMenu *setupNormalHierarchyMenu( TQWidget *tqparent );
+ TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *tqparent, const char *addSlot, const char *removeSlot );
FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
@@ -255,7 +256,7 @@ private:
TQWorkspace *qworkspace;
KMenuBar *menubar;
FormWindow *lastActiveFormWindow;
- bool breakLayout, layoutChilds, layoutSelected;
+ bool breakLayout, tqlayoutChilds, tqlayoutSelected;
TQPoint grd;
bool sGrid, snGrid;
bool restoreConfig;
@@ -279,7 +280,7 @@ private:
TQPopupMenu *rmbFormWindow;
TQPopupMenu *windowMenu, *fileMenu;
- TQToolBar *layoutToolBar;
+ TQToolBar *tqlayoutToolBar;
KToolBar *fileTb;
Preferences *prefDia;
diff --git a/kommander/editor/mainwindowactions.cpp b/kommander/editor/mainwindowactions.cpp
index a4d4c430..f57afd72 100644
--- a/kommander/editor/mainwindowactions.cpp
+++ b/kommander/editor/mainwindowactions.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -19,6 +19,10 @@
#include "mainwindow.h"
+#ifdef QT_NO_SQL
+#define TQT_NO_SQL
+#endif // QT_NO_SQL
+
#include <tqapplication.h>
#include <tqclipboard.h>
#include <tqfileinfo.h>
@@ -26,7 +30,7 @@
#include <tqlistbox.h>
#include <tqsignalmapper.h>
#include <tqspinbox.h>
-#include <tqstatusbar.h>
+#include <statusbar.h>
#include <tqstylefactory.h>
#include <tqtooltip.h>
#include <tqwhatsthis.h>
@@ -47,7 +51,7 @@
#include "connectioneditorimpl.h"
#include "actioneditorimpl.h"
#include "formfile.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "dbconnectionsimpl.h"
#include "dbconnectionimpl.h"
#endif
@@ -92,81 +96,81 @@ int forms = 0;
void MainWindow::setupEditActions()
{
- actionEditUndo = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
+ actionEditUndo = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(editUndo()), actionCollection());
actionEditUndo->setText(i18n("&Undo: Not Available"));
actionEditUndo->setToolTip(i18n("Undoes the last action"));
actionEditUndo->setWhatsThis(whatsThisFrom("Edit|Undo"));
actionEditUndo->setEnabled(false);
- actionEditRedo = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
+ actionEditRedo = KStdAction::redo(TQT_TQOBJECT(this), TQT_SLOT(editRedo()), actionCollection());
actionEditRedo->setText(i18n("&Redo: Not Available"));
actionEditRedo->setToolTip(i18n("Redoes the last undone operation"));
actionEditRedo->setWhatsThis(whatsThisFrom("Edit|Redo"));
actionEditRedo->setEnabled(false);
- actionEditCut = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
+ actionEditCut = KStdAction::cut(TQT_TQOBJECT(this), TQT_SLOT(editCut()), actionCollection());
actionEditCut->setToolTip(i18n("Cuts the selected widgets and puts them on the clipboard"));
actionEditCut->setWhatsThis(whatsThisFrom("Edit|Cut"));
actionEditCut->setEnabled(false);
- actionEditCopy = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
+ actionEditCopy = KStdAction::copy(TQT_TQOBJECT(this), TQT_SLOT(editCopy()), actionCollection());
actionEditCopy->setToolTip(i18n("Copies the selected widgets to the clipboard"));
actionEditCopy->setWhatsThis(whatsThisFrom("Edit|Copy"));
actionEditCopy->setEnabled(false);
- actionEditPaste = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
+ actionEditPaste = KStdAction::paste(TQT_TQOBJECT(this), TQT_SLOT(editPaste()), actionCollection());
actionEditPaste->setToolTip(i18n("Pastes the clipboard's contents"));
actionEditPaste->setWhatsThis(whatsThisFrom("Edit|Paste"));
actionEditPaste->setEnabled(false);
- actionEditDelete = new KAction(i18n("Delete"), Key_Delete, this, TQT_SLOT(editDelete()),
+ actionEditDelete = new KAction(i18n("Delete"), Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(editDelete()),
actionCollection(), "edit_delete");
actionEditDelete->setToolTip(i18n("Deletes the selected widgets"));
actionEditDelete->setWhatsThis(whatsThisFrom("Edit|Delete"));
actionEditDelete->setEnabled(false);
- actionEditSelectAll = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
+ actionEditSelectAll = KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(editSelectAll()), actionCollection());
actionEditSelectAll->setToolTip(i18n("Selects all widgets"));
actionEditSelectAll->setWhatsThis(whatsThisFrom("Edit|Select All"));
actionEditRaise = new KAction(i18n("Bring to Front"), createIconSet("editraise.xpm"),
- KShortcut::null(), this, TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editRaise()), actionCollection(), "edit_raise");
actionEditRaise->setToolTip(i18n("Raises the selected widgets"));
actionEditRaise->setEnabled(false);
actionEditLower = new KAction(i18n("Send to Back"), createIconSet("editlower.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLower()), actionCollection(), "edit_lower");
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLower()), actionCollection(), "edit_lower");
actionEditLower->setToolTip(i18n("Lowers the selected widgets"));
actionEditLower->setWhatsThis(i18n("Lowers the selected widgets"));
actionEditLower->setEnabled(false);
- actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, this, TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
+ actionEditFindGlobal = new KAction(i18n("Find in Form..."), CTRL + ALT + Key_F, TQT_TQOBJECT(this), TQT_SLOT(editFindGlobal()), actionCollection(), "edit_find_global");
actionEditFindGlobal->setToolTip(i18n("Search for a text in the whole form."));
actionEditFindGlobal->setWhatsThis(whatsThisFrom("Edit|Find in Form"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFindGlobal, TQT_SLOT(setEnabled(bool)));
- actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()),
+ actionEditAccels = new KAction(i18n("Check Accelerators"), ALT + Key_R, TQT_TQOBJECT(this), TQT_SLOT(editAccels()),
actionCollection(), "edit_check_accel");
actionEditAccels->setToolTip(i18n("Checks if the accelerators used in the form are unique"));
actionEditAccels->setWhatsThis(whatsThisFrom("Edit|Check Accelerator"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditAccels, TQT_SLOT(setEnabled(bool)));
actionEditConnections = new KAction(i18n("Connections"), createIconSet("connecttool.xpm"),
- KShortcut::null(), this, TQT_SLOT(editConnections()), actionCollection(),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editConnections()), actionCollection(),
"edit_connections");
actionEditConnections->setToolTip(i18n("Opens a dialog for editing connections"));
actionEditConnections->setWhatsThis(whatsThisFrom("Edit|Connections"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditConnections, TQT_SLOT(setEnabled(bool)));
actionEditFormSettings = new KAction(i18n("Form Settings..."), KShortcut::null(),
- this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
+ TQT_TQOBJECT(this), TQT_SLOT(editFormSettings()), actionCollection(), "edit_form");
actionEditFormSettings->setToolTip(i18n("Opens a dialog to change the form's settings"));
actionEditFormSettings->setWhatsThis(whatsThisFrom("Edit|Form Settings"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), actionEditFormSettings, TQT_SLOT(setEnabled(bool)));
KToolBar *tb = new KToolBar(this, "Edit");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Edit toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Edit"));
actionEditUndo->plug(tb);
actionEditRedo->plug(tb);
@@ -198,70 +202,70 @@ void MainWindow::setupEditActions()
void MainWindow::setupLayoutActions()
{
actionEditAdjustSize = new KAction(i18n("Adjust Size"), createIconSet("adjustsize.xpm"),
- CTRL + Key_J, this, TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
+ CTRL + Key_J, TQT_TQOBJECT(this), TQT_SLOT(editAdjustSize()), actionCollection(), "edit_adjust_size");
actionEditAdjustSize->setToolTip(i18n("Adjusts the size of the selected widget"));
actionEditAdjustSize->setWhatsThis(whatsThisFrom("Layout|Adjust Size"));
actionEditAdjustSize->setEnabled(false);
- actionEditHLayout = new KAction(i18n("Lay Out Horizontally"), createIconSet("edithlayout.xpm"),
- CTRL + Key_H, this, TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
+ actionEditHLayout = new KAction(i18n("Lay OutQt::Horizontally"), createIconSet("edithtqlayout.xpm"),
+ CTRL + Key_H, TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontal()), actionCollection(), "edit_layout_h");
actionEditHLayout->setToolTip(i18n("Lays out the selected widgets horizontally"));
- actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally"));
+ actionEditHLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally"));
actionEditHLayout->setEnabled(false);
- actionEditVLayout = new KAction(i18n("Lay Out Vertically"), createIconSet("editvlayout.xpm"),
- CTRL + Key_L, this, TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
+ actionEditVLayout = new KAction(i18n("Lay OutQt::Vertically"), createIconSet("editvtqlayout.xpm"),
+ CTRL + Key_L, TQT_TQOBJECT(this), TQT_SLOT(editLayoutVertical()), actionCollection(), "edit_layout_v");
actionEditVLayout->setToolTip(i18n("Lays out the selected widgets vertically"));
- actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically"));
+ actionEditVLayout->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically"));
actionEditVLayout->setEnabled(false);
actionEditGridLayout = new KAction(i18n("Lay Out in a Grid"), createIconSet("editgrid.xpm"),
- CTRL + Key_G, this, TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
+ CTRL + Key_G, TQT_TQOBJECT(this), TQT_SLOT(editLayoutGrid()), actionCollection(), "edit_layout_grid");
actionEditGridLayout->setToolTip(i18n("Lays out the selected widgets in a grid"));
actionEditGridLayout->setWhatsThis(whatsThisFrom("Layout|Lay Out in a Grid"));
actionEditGridLayout->setEnabled(false);
- actionEditSplitHorizontal = new KAction(i18n("Lay Out Horizontally in Splitter"), createIconSet("editvlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
+ actionEditSplitHorizontal = new KAction(i18n("Lay OutQt::Horizontally in Splitter"), createIconSet("editvtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutHorizontalSplit()), actionCollection(),
"edit_split_h");
actionEditSplitHorizontal->setToolTip(i18n("Lays out the selected widgets horizontally in a splitter"));
- actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay Out Horizontally in Splitter"));
+ actionEditSplitHorizontal->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Horizontally in Splitter"));
actionEditSplitHorizontal->setEnabled(false);
- actionEditSplitVertical = new KAction(i18n("Lay Out Vertically in Splitter"), createIconSet("edithlayoutsplit.xpm"),
- KShortcut::null(), this, TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
+ actionEditSplitVertical = new KAction(i18n("Lay OutQt::Vertically in Splitter"), createIconSet("edithtqlayoutsplit.xpm"),
+ KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editLayoutVerticalSplit()), actionCollection(),
"edit_split_v");
actionEditSplitVertical->setToolTip(i18n("Lays out the selected widgets vertically in a splitter"));
- actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay Out Vertically (in Splitter)"));
+ actionEditSplitVertical->setWhatsThis(whatsThisFrom("Layout|Lay OutQt::Vertically (in Splitter)"));
actionEditSplitVertical->setEnabled(false);
actionEditBreakLayout = new KAction(i18n("Break Layout"), createIconSet("editbreaklayout.xpm"),
- CTRL + Key_B, this, TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
- actionEditBreakLayout->setToolTip(i18n("Breaks the selected layout"));
+ CTRL + Key_B, TQT_TQOBJECT(this), TQT_SLOT(editBreakLayout()), actionCollection(), "edit_break_layout");
+ actionEditBreakLayout->setToolTip(i18n("Breaks the selected tqlayout"));
actionEditBreakLayout->setWhatsThis(whatsThisFrom("Layout|Break Layout"));
int id = WidgetDatabase::idFromClassName("Spacer");
- KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), this, TQT_SLOT(toolSelected()),
+ KToggleAction *a = new KToggleAction(i18n("Spacer"), createIconSet("spacer.xpm"), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(toolSelected()),
actionCollection(), TQString::number(id).latin1());
a->setExclusiveGroup("tool");
a->setText(i18n("Add ") + WidgetDatabase::className(id));
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::toolTip(id)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::toolTip(id)));
a->setWhatsThis(i18n("<b>A %1</b><p>%2</p>"
"<p>Click to insert a single %3,"
- "or double click to keep the tool selected.").arg(WidgetDatabase::toolTip(id)).
- arg(WidgetDatabase::whatsThis(id)).arg(WidgetDatabase::toolTip(id)));
-
- TQWhatsThis::add(layoutToolBar, i18n("<b>The Layout toolbar</b>%1").arg(toolbarHelp));
- actionEditAdjustSize->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- actionEditHLayout->plug(layoutToolBar);
- actionEditVLayout->plug(layoutToolBar);
- actionEditGridLayout->plug(layoutToolBar);
- actionEditSplitHorizontal->plug(layoutToolBar);
- actionEditSplitVertical->plug(layoutToolBar);
- actionEditBreakLayout->plug(layoutToolBar);
- layoutToolBar->addSeparator();
- a->plug(layoutToolBar);
+ "or double click to keep the tool selected.").tqarg(WidgetDatabase::toolTip(id)).
+ tqarg(WidgetDatabase::whatsThis(id)).tqarg(WidgetDatabase::toolTip(id)));
+
+ TQWhatsThis::add(tqlayoutToolBar, i18n("<b>The Layout toolbar</b>%1").tqarg(toolbarHelp));
+ actionEditAdjustSize->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ actionEditHLayout->plug(tqlayoutToolBar);
+ actionEditVLayout->plug(tqlayoutToolBar);
+ actionEditGridLayout->plug(tqlayoutToolBar);
+ actionEditSplitHorizontal->plug(tqlayoutToolBar);
+ actionEditSplitVertical->plug(tqlayoutToolBar);
+ actionEditBreakLayout->plug(tqlayoutToolBar);
+ tqlayoutToolBar->addSeparator();
+ a->plug(tqlayoutToolBar);
TQPopupMenu *menu = new TQPopupMenu(this, "Layout");
menuBar()->insertItem(i18n("&Layout"), menu);
@@ -280,21 +284,21 @@ void MainWindow::setupLayoutActions()
void MainWindow::setupToolActions()
{
actionPointerTool = new KToggleAction(i18n("Pointer"), "arrow", Key_F2,
- this, TQT_SLOT(toolSelected()), actionCollection(),
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(POINTER_TOOL).latin1());
actionPointerTool->setToolTip(i18n("Selects the pointer tool"));
actionPointerTool->setWhatsThis(whatsThisFrom("Tools|Pointer"));
actionPointerTool->setExclusiveGroup("tool");
actionConnectTool = new KToggleAction(i18n("Connect Signal/Slots"), createIconSet("connecttool.xpm"),
- Key_F3, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F3, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(CONNECT_TOOL).latin1());
actionConnectTool->setToolTip(i18n("Selects the connection tool"));
actionConnectTool->setWhatsThis(whatsThisFrom("Tools|Connect Signals and Slots"));
actionConnectTool->setExclusiveGroup("tool");
actionOrderTool = new KToggleAction(i18n("Tab Order"), createIconSet("ordertool.xpm"),
- Key_F4, this, TQT_SLOT(toolSelected()), actionCollection(),
+ Key_F4, TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(),
TQString::number(ORDER_TOOL).latin1());
actionOrderTool->setToolTip(i18n("Selects the tab order tool"));
actionOrderTool->setWhatsThis(whatsThisFrom("Tools|Tab Order"));
@@ -302,7 +306,7 @@ void MainWindow::setupToolActions()
KToolBar *tb = new KToolBar(this, "Tools");
tb->setFullSize(false);
- TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(tb, i18n("<b>The Tools toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(tb, i18n("Tools"), TQMainWindow::DockTop, true);
actionPointerTool->plug(tb);
@@ -326,14 +330,14 @@ void MainWindow::setupToolActions()
bool plural = grp[(int) grp.length() - 1] == 's';
if (plural)
{
- TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single widget, "
- "or double click to insert multiple %1.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("<b>The %1</b>%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single widget, "
+ "or double click to insert multiple %1.")).tqarg(grp));
} else
{
- TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").arg(grp).arg(toolbarHelp).
- arg(i18n(" Click on a button to insert a single %1 widget, "
- "or double click to insert multiple widgets.")).arg(grp));
+ TQWhatsThis::add(tb, i18n("<b>The %1 Widgets</b>%2").tqarg(grp).tqarg(toolbarHelp).
+ tqarg(i18n(" Click on a button to insert a single %1 widget, "
+ "or double click to insert multiple widgets.")).tqarg(grp));
}
addToolBar(tb, grp);
TQPopupMenu *menu = new TQPopupMenu(this, grp.latin1());
@@ -344,7 +348,7 @@ void MainWindow::setupToolActions()
if (WidgetDatabase::group(i) != grp)
continue; // only widgets, i.e. not forms and temp stuff
KToggleAction *a = new KToggleAction(WidgetDatabase::className(i), KShortcut::null(),
- this, TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
+ TQT_TQOBJECT(this), TQT_SLOT(toolSelected()), actionCollection(), TQString::number(i).latin1());
a->setExclusiveGroup("tool");
TQString atext = WidgetDatabase::className(i);
if (atext[0] == 'Q')
@@ -359,11 +363,11 @@ void MainWindow::setupToolActions()
a->setToolTip(ttip);
if (!WidgetDatabase::isWhatsThisLoaded())
WidgetDatabase::loadWhatsThis(documentationPath());
- a->setToolTip(i18n("Insert a %1").arg(WidgetDatabase::className(i)));
+ a->setToolTip(i18n("Insert a %1").tqarg(WidgetDatabase::className(i)));
- TQString whats = i18n("<b>A %1</b>").arg(WidgetDatabase::className(i));
+ TQString whats = i18n("<b>A %1</b>").tqarg(WidgetDatabase::className(i));
if (!WidgetDatabase::whatsThis(i).isEmpty())
- whats += TQString("<p>%1</p>").arg(WidgetDatabase::whatsThis(i));
+ whats += TQString("<p>%1</p>").tqarg(WidgetDatabase::whatsThis(i));
a->setWhatsThis(whats + i18n("<p>Double click on this tool to keep it selected.</p>"));
if (grp != "KDE")
@@ -381,16 +385,16 @@ void MainWindow::setupToolActions()
if (!TQFile::exists(*it))
continue;
TQDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
+ const TQFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
- for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ for (TQFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
TQString name = fi->baseName();
- name = name.replace("_", " ");
- editMenu->insertItem(name, this, TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
+ name = name.tqreplace("_", " ");
+ editMenu->insertItem(name, TQT_TQOBJECT(this), TQT_SLOT(editExternalTool(int)), 0, m_editorTools.count());
m_editorTools.append(fi->filePath());
}
}
@@ -405,29 +409,29 @@ void MainWindow::setupFileActions()
fileTb = new KToolBar(this, "File");
fileTb->setFullSize(false);
- TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").arg(toolbarHelp));
+ TQWhatsThis::add(fileTb, i18n("<b>The File toolbar</b>%1").tqarg(toolbarHelp));
addToolBar(fileTb, i18n("File"));
fileMenu = new TQPopupMenu(this, "File");
menuBar()->insertItem(i18n("&File"), fileMenu);
- KAction *a = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ KAction *a = KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
a->setToolTip(i18n("Creates a new dialog"));
a->setWhatsThis(whatsThisFrom("File|New"));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ a = KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());
a->setToolTip(i18n("Opens an existing dialog"));
a->setWhatsThis(whatsThisFrom("File|Open"));
a->plug(fileTb);
a->plug(fileMenu);
- actionRecent = KStdAction::openRecent(this, TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
+ actionRecent = KStdAction::openRecent(TQT_TQOBJECT(this), TQT_SLOT(fileOpenRecent(const KURL&)), actionCollection());
actionRecent->setToolTip(i18n("Opens recently open file"));
actionRecent->plug(fileMenu);
fileMenu->insertSeparator();
- a = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
+ a = KStdAction::close(TQT_TQOBJECT(this), TQT_SLOT(fileClose()), actionCollection());
a->setToolTip(i18n("Closes the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Close"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -435,20 +439,20 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection());
+ a = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(fileSave()), actionCollection());
a->setToolTip(i18n("Saves the current dialog"));
a->setWhatsThis(whatsThisFrom("File|Save"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileTb);
a->plug(fileMenu);
- a = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ a = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(fileSaveAs()), actionCollection());
a->setToolTip(i18n("Saves the current dialog with a new filename"));
a->setWhatsThis(whatsThisFrom("File|Save As"));
connect(this, TQT_SIGNAL(hasActiveWindow(bool)), a, TQT_SLOT(setEnabled(bool)));
a->plug(fileMenu);
- a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), this, TQT_SLOT(fileSaveAll()),
+ a = new KAction(i18n("Save All"), "save_all", KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(fileSaveAll()),
actionCollection(), "file_close_all");
a->setToolTip(i18n("Saves all open dialogs"));
a->setWhatsThis(whatsThisFrom("File|Save All"));
@@ -457,7 +461,7 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
- a = KStdAction::quit(kapp, TQT_SLOT(closeAllWindows()), actionCollection());
+ a = KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(closeAllWindows()), actionCollection());
a->setToolTip(i18n("Quits the application and prompts to save any changed dialogs"));
a->setWhatsThis(whatsThisFrom("File|Exit"));
a->plug(fileMenu);
@@ -470,7 +474,7 @@ void MainWindow::setupRunActions()
menuBar()->insertItem(i18n("&Run"), menu);
KAction* a = new KAction(i18n("Run Dialog"), "run", CTRL + Key_R,
- this, TQT_SLOT(runForm()), actionCollection(), "run");
+ TQT_TQOBJECT(this), TQT_SLOT(runForm()), actionCollection(), "run");
a->setToolTip(i18n("Executes dialog"));
a->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), a, TQT_SLOT(setEnabled(bool)));
@@ -478,8 +482,8 @@ void MainWindow::setupRunActions()
a->plug(menu);
// add KDE4 executor
- KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + Qt::Key_R,
- this, TQT_SLOT(runForm4()), actionCollection(), "run4");
+ KAction* b = new KAction(i18n("Run Dialog K4"), "launch", CTRL + SHIFT + TQt::Key_R,
+ TQT_TQOBJECT(this), TQT_SLOT(runForm4()), actionCollection(), "run4");
b->setToolTip(i18n("Executes dialog in KDE4"));
b->setWhatsThis(whatsThisFrom("Run|Run dialog"));
connect(this, TQT_SIGNAL(hasActiveForm(bool)), b, TQT_SLOT(setEnabled(bool)));
@@ -493,39 +497,39 @@ void MainWindow::setupWindowActions()
{
windowActionsSetup = true;
- KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), qworkspace, TQT_SLOT(tile()),
+ KAction* actionWindowTile = new KAction(i18n("Tile"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(tile()),
actionCollection(), "window_tile");
actionWindowTile->setToolTip(i18n("Tiles the windows so that they are all visible"));
actionWindowTile->setWhatsThis(whatsThisFrom("Window|Tile"));
- KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(cascade()),
+ KAction* actionWindowCascade = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(cascade()),
actionCollection(), "window_cascade");
actionWindowCascade->setToolTip(i18n("Cascades the windows so that all their title bars are visible"));
actionWindowCascade->setWhatsThis(whatsThisFrom("Window|Cascade"));
- KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), qworkspace, TQT_SLOT(closeActiveWindow()),
+ KAction* actionWindowClose = new KAction(i18n("Cascade"), KShortcut::null(), TQT_TQOBJECT(qworkspace), TQT_SLOT(closeActiveWindow()),
actionCollection(), "window_close");
actionWindowClose->setToolTip(i18n("Closes the active window"));
actionWindowClose->setWhatsThis(whatsThisFrom("Window|Close"));
- KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), qworkspace,
+ KAction* actionWindowCloseAll = new KAction(i18n("Close All"), KShortcut::null(), TQT_TQOBJECT(qworkspace),
TQT_SLOT(closeAllWindows()), actionCollection(), "window_close_all");
actionWindowCloseAll->setToolTip(i18n("Closes all form windows"));
actionWindowCloseAll->setWhatsThis(whatsThisFrom("Window|Close All"));
- KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, qworkspace,
+ KAction* actionWindowNext = new KAction(i18n("Next"), Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activateNextWindow()), actionCollection(), "window_next");
actionWindowNext->setToolTip(i18n("Activates the next window"));
actionWindowNext->setWhatsThis(whatsThisFrom("Window|Next"));
- KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, qworkspace,
+ KAction* actionWindowPrevious = new KAction(i18n("Previous"), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(qworkspace),
TQT_SLOT(activatePreviousWindow()), actionCollection(), "window_prev");
actionWindowPrevious->setToolTip(i18n("Activates the previous window"));
actionWindowPrevious->setWhatsThis(whatsThisFrom("Window|Previous"));
windowMenu = new KPopupMenu(this, "Window");
menuBar()->insertItem(i18n("&Window"), windowMenu);
- connect(windowMenu, TQT_SIGNAL(aboutToShow()), this, TQT_SLOT(setupWindowActions()));
+ connect(windowMenu, TQT_SIGNAL(aboutToShow()), TQT_TQOBJECT(this), TQT_SLOT(setupWindowActions()));
actionWindowClose->plug(windowMenu);
actionWindowCloseAll->plug(windowMenu);
@@ -556,13 +560,13 @@ void MainWindow::setupWindowActions()
j++;
TQString itemText;
if (j < 10)
- itemText = TQString("&%1 ").arg(j);
+ itemText = TQString("&%1 ").tqarg(j);
if (w->inherits("FormWindow"))
itemText += w->name();
else
itemText += w->caption();
- int id = windowMenu->insertItem(itemText, this, TQT_SLOT(windowsMenuActivated(int)));
+ int id = windowMenu->insertItem(itemText, TQT_TQOBJECT(this), TQT_SLOT(windowsMenuActivated(int)));
windowMenu->setItemParameter(id, i);
windowMenu->setItemChecked(id, qworkspace->activeWindow() == windows.at(i));
}
@@ -572,21 +576,21 @@ void MainWindow::setupWindowActions()
void MainWindow::setupSettingsActions()
{
KPopupMenu *settings = new KPopupMenu(this, "Settings");
- KAction* a = KStdAction::keyBindings(this, TQT_SLOT(editShortcuts()), actionCollection());
+ KAction* a = KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(editShortcuts()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change shortcuts"));
a->plug(settings);
- a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), this, TQT_SLOT(editPlugins()),
+ a = new KAction(i18n("Configure &Plugins..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(editPlugins()),
actionCollection(), "configure_plugins");
a->setToolTip(i18n("Opens a dialog to configure plugins"));
a->plug(settings);
- a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), this, TQT_SLOT(configureEditor()),
+ a = new KAction(i18n("&Configure Editor..."), KShortcut::null(), TQT_TQOBJECT(this), TQT_SLOT(configureEditor()),
actionCollection(), "configure_editor");
a->setToolTip(i18n("Configure various aspects of this editor."));
a->plug(settings);
- a = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
+ a = KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(editPreferences()), actionCollection());
a->setToolTip(i18n("Opens a dialog to change preferences"));
a->setWhatsThis(whatsThisFrom("Edit|Preferences"));
a->plug(settings);
@@ -604,7 +608,7 @@ void MainWindow::setupHelpActions()
void MainWindow::fileNew()
{
statusBar()->message(i18n("Create a new dialog..."));
- NewForm dlg(this, TQString::null);
+ NewForm dlg(this, TQString());
dlg.exec();
statusBar()->clear();
}
@@ -631,7 +635,7 @@ void MainWindow::fileOpen(const TQString & fn)
TQStringList filenames;
if (fn.isEmpty())
- filenames = KFileDialog::getOpenFileNames(TQString::null, i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
+ filenames = KFileDialog::getOpenFileNames(TQString(), i18n("*.kmdr|Kommander Files"), this, i18n("Open Files"));
else
filenames << fn;
for (TQStringList::ConstIterator fit = filenames.constBegin(); fit != filenames.constEnd(); ++fit)
@@ -667,7 +671,7 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
}
if (!makeNew)
{
- statusBar()->message(i18n("Reading file '%1'...").arg(filename));
+ statusBar()->message(i18n("Reading file '%1'...").tqarg(filename));
if (TQFile::exists(filename))
{
TQApplication::setOverrideCursor(WaitCursor);
@@ -676,18 +680,18 @@ FormWindow *MainWindow::openFormWindow(const TQString &filename, bool validFileN
ff = new FormFile(filename, false);
bool b = resource.load(ff) && (FormWindow *) resource.widget();
if (!validFileName && resource.widget())
- ((FormWindow *) resource.widget())->setFileName(TQString::null);
+ ((FormWindow *) resource.widget())->setFileName(TQString());
TQApplication::restoreOverrideCursor();
if (b)
{
- statusBar()->message(i18n("Loaded file '%1'").arg(filename), 3000);
+ statusBar()->message(i18n("Loaded file '%1'").tqarg(filename), 3000);
} else
{
emit removedFormFile(ff);
ff->close();
delete ff;
- statusBar()->message(i18n("Could not load file '%1'").arg(filename), 5000);
- KMessageBox::information(this, i18n("Could not load file '%1'").arg(filename), i18n("Load File"));
+ statusBar()->message(i18n("Could not load file '%1'").tqarg(filename), 5000);
+ KMessageBox::information(this, i18n("Could not load file '%1'").tqarg(filename), i18n("Load File"));
}
return (FormWindow *) resource.widget();
} else
@@ -750,7 +754,7 @@ void MainWindow::saveAllTemp()
if (inSaveAllTemp)
return;
inSaveAllTemp = true;
- statusBar()->message(i18n("Qt Designer is crashing. Attempting to save files..."));
+ statusBar()->message(i18n("TQt Designer is crashing. Attempting to save files..."));
TQWidgetList windows = qWorkspace()->windowList();
TQString baseName = TQDir::homeDirPath() + "/.designer/saved-form-";
int i = 1;
@@ -781,20 +785,20 @@ void MainWindow::fileCreateTemplate()
for (i = 0; i < WidgetDatabase::count(); ++i)
{
if (WidgetDatabase::isContainer(i) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className(i) != "TQTabWidget" && WidgetDatabase::widgetGroup(i) != "Temp")
+ WidgetDatabase::className(i) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::widgetGroup(i) != "Temp")
{
dia.listClass->insertItem(WidgetDatabase::className(i));
}
}
dia.editName->setText(i18n("NewTemplate"));
- connect(dia.buttonCreate, TQT_SIGNAL(clicked()), this, TQT_SLOT(createNewTemplate()));
+ connect(dia.buttonCreate, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(createNewTemplate()));
dia.exec();
}
void MainWindow::createNewTemplate()
{
- CreateTemplate *dia = (CreateTemplate *) sender()->parent();
+ CreateTemplate *dia = (CreateTemplate *) TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->tqparent();
TQString fn = dia->editName->text();
TQString cn = dia->listClass->currentText();
if (fn.isEmpty() || cn.isEmpty())
@@ -804,14 +808,14 @@ void MainWindow::createNewTemplate()
}
TQStringList templRoots;
- const char *qtdir = getenv("QTDIR");
+ const char *qtdir = getenv("TQTDIR");
if (qtdir)
templRoots << qtdir;
-#ifdef QT_INSTALL_PREFIX
- templRoots << QT_INSTALL_PREFIX;
+#ifdef TQT_INSTALL_PREFIX
+ templRoots << TQT_INSTALL_PREFIX;
#endif
-#ifdef QT_INSTALL_DATA
- templRoots << QT_INSTALL_DATA;
+#ifdef TQT_INSTALL_DATA
+ templRoots << TQT_INSTALL_DATA;
#endif
if (qtdir) //try the tools/designer directory last!
templRoots << TQString(qtdir) + "/tools/designer";
@@ -841,7 +845,7 @@ void MainWindow::createNewTemplate()
ts << " <cstring>" << cn << "Form</cstring>" << endl;
ts << "</property>" << endl;
ts << "<property stdset=\"1\">" << endl;
- ts << " <name>geometry</name>" << endl;
+ ts << " <name>tqgeometry</name>" << endl;
ts << " <rect>" << endl;
ts << " <width>300</width>" << endl;
ts << " <height>400</height>" << endl;
@@ -876,7 +880,7 @@ void MainWindow::editCut()
void MainWindow::editCopy()
{
if (formWindow())
- qApp->clipboard()->setText(formWindow()->copy());
+ tqApp->clipboard()->setText(formWindow()->copy());
}
void MainWindow::editPaste()
@@ -889,21 +893,21 @@ void MainWindow::editPaste()
if (l.count() == 1)
{
w = l.first();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
(!WidgetDatabase::isContainer(WidgetDatabase::idFromClassName(WidgetFactory::
- classNameOf(w))) && w != formWindow()->mainContainer()))
+ classNameOf(TQT_TQOBJECT(w)))) && w != formWindow()->mainContainer()))
w = formWindow()->mainContainer();
}
- if (w && WidgetFactory::layoutType(w) == WidgetFactory::NoLayout)
+ if (w && WidgetFactory::tqlayoutType(w) == WidgetFactory::NoLayout)
{
- formWindow()->paste(qApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
+ formWindow()->paste(tqApp->clipboard()->text(), WidgetFactory::containerOfWidget(w));
hierarchyView->widgetInserted(0);
formWindow()->commandHistory()->setModified(true);
} else
{
KMessageBox::information(this, i18n("Cannot paste widgets. Designer could not find a container\n"
- "to paste into which does not contain a layout. Break the layout\n"
+ "to paste into which does not contain a tqlayout. Break the tqlayout\n"
"of the container you want to paste into and select this container\n"
"and then paste again."), i18n("Paste Error"));
}
@@ -941,42 +945,42 @@ void MainWindow::editAdjustSize()
void MainWindow::editLayoutHorizontal()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerHorizontal();
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontal();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontal();
}
void MainWindow::editLayoutVertical()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerVertical();
- else if (layoutSelected && formWindow())
- formWindow()->layoutVertical();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVertical();
}
void MainWindow::editLayoutHorizontalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutHorizontalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutHorizontalSplit();
}
void MainWindow::editLayoutVerticalSplit()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
; // no way to do that
- else if (layoutSelected && formWindow())
- formWindow()->layoutVerticalSplit();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutVerticalSplit();
}
void MainWindow::editLayoutGrid()
{
- if (layoutChilds)
+ if (tqlayoutChilds)
editLayoutContainerGrid();
- else if (layoutSelected && formWindow())
- formWindow()->layoutGrid();
+ else if (tqlayoutSelected && formWindow())
+ formWindow()->tqlayoutGrid();
}
void MainWindow::editLayoutContainerVertical()
@@ -988,7 +992,7 @@ void MainWindow::editLayoutContainerVertical()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutVerticalContainer(w);
+ formWindow()->tqlayoutVerticalContainer(w);
}
void MainWindow::editLayoutContainerHorizontal()
@@ -1000,7 +1004,7 @@ void MainWindow::editLayoutContainerHorizontal()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutHorizontalContainer(w);
+ formWindow()->tqlayoutHorizontalContainer(w);
}
void MainWindow::editLayoutContainerGrid()
@@ -1012,7 +1016,7 @@ void MainWindow::editLayoutContainerGrid()
if (l.count() == 1)
w = l.first();
if (w)
- formWindow()->layoutGridContainer(w);
+ formWindow()->tqlayoutGridContainer(w);
}
@@ -1025,8 +1029,8 @@ void MainWindow::editBreakLayout()
TQWidget *w = formWindow()->mainContainer();
if (formWindow()->currentWidget())
w = formWindow()->currentWidget();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
return;
@@ -1036,9 +1040,9 @@ void MainWindow::editBreakLayout()
TQWidgetList widgets = formWindow()->selectedWidgets();
for (w = widgets.first(); w; w = widgets.next())
{
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget()
- && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget()
+ && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
break;
}
if (w)
@@ -1049,8 +1053,8 @@ void MainWindow::editBreakLayout()
}
w = formWindow()->mainContainer();
- if (WidgetFactory::layoutType(w) != WidgetFactory::NoLayout ||
- w->parentWidget() && WidgetFactory::layoutType(w->parentWidget()) != WidgetFactory::NoLayout)
+ if (WidgetFactory::tqlayoutType(w) != WidgetFactory::NoLayout ||
+ w->tqparentWidget() && WidgetFactory::tqlayoutType(w->tqparentWidget()) != WidgetFactory::NoLayout)
{
formWindow()->breakLayout(w);
}
@@ -1119,7 +1123,7 @@ void MainWindow::editPreferences()
dia->checkBoxSplash->setChecked(splashScreen);
dia->editDocPath->setText(docPath);
dia->checkAutoEdit->setChecked(!databaseAutoEdit);
- connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), this, TQT_SLOT(chooseDocPath()));
+ connect(dia->buttonDocPath, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(chooseDocPath()));
if (dia->exec() == TQDialog::Accepted)
{
@@ -1193,7 +1197,7 @@ void MainWindow::chooseDocPath()
{
if (!prefDia)
return;
- TQString fn = KFileDialog::getExistingDirectory(TQString::null, this);
+ TQString fn = KFileDialog::getExistingDirectory(TQString(), this);
if (!fn.isEmpty())
prefDia->editDocPath->setText(fn);
}
diff --git a/kommander/editor/messagelog.cpp b/kommander/editor/messagelog.cpp
index ecaed31a..aeddb1e1 100644
--- a/kommander/editor/messagelog.cpp
+++ b/kommander/editor/messagelog.cpp
@@ -28,7 +28,7 @@
#include <tqfile.h>
#include <tqtextstream.h>
-MessageLog::MessageLog(TQWidget* parent, const char* name) : TQTabWidget(parent, name)
+MessageLog::MessageLog(TQWidget* tqparent, const char* name) : TQTabWidget(tqparent, name)
{
m_popupMenu = new KPopupMenu(this);
m_popupMenu->insertItem(SmallIconSet("editcopy"), i18n("Copy Current &Line"), this, TQT_SLOT(copyLine()));
@@ -108,12 +108,12 @@ void MessageLog::clearContent()
void MessageLog::copyLine()
{
if (m_lists[currentPageIndex()]->count())
- kapp->clipboard()->setText(m_lists[currentPageIndex()]->currentText(), QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(m_lists[currentPageIndex()]->currentText(), TQClipboard::Clipboard);
}
void MessageLog::copyContent()
{
- kapp->clipboard()->setText(content(), QClipboard::Clipboard);
+ kapp->tqclipboard()->setText(content(), TQClipboard::Clipboard);
}
void MessageLog::saveToFile()
@@ -125,12 +125,12 @@ void MessageLog::saveToFile()
TQFileInfo fileinfo(url.path());
if (fileinfo.exists() && KMessageBox::warningContinueCancel(0,
i18n("<qt>File<br><b>%1</b><br>already exists. Overwrite it?</qt>")
- .arg(url.path()), TQString::null, i18n("Overwrite")) == KMessageBox::Cancel)
+ .tqarg(url.path()), TQString(), i18n("Overwrite")) == KMessageBox::Cancel)
return;
TQFile file(url.path());
if (!file.open(IO_WriteOnly)) {
KMessageBox::error(0, i18n("<qt>Cannot save log file<br><b>%1</b></qt>")
- .arg(url.url()));
+ .tqarg(url.url()));
return;
}
TQTextStream textfile(&file);
diff --git a/kommander/editor/messagelog.h b/kommander/editor/messagelog.h
index ef7c8638..bf1508b6 100644
--- a/kommander/editor/messagelog.h
+++ b/kommander/editor/messagelog.h
@@ -26,12 +26,13 @@ class KProcess;
class KPopupMenu;
class TQListBoxItem;
-class MessageLog : public QTabWidget
+class MessageLog : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum InfoType {Stdout, Stderr, All};
- MessageLog(TQWidget* parent = 0, const char* name = 0);
+ MessageLog(TQWidget* tqparent = 0, const char* name = 0);
~MessageLog();
virtual void insertItem(InfoType i, TQString text);
virtual void clear(InfoType i = All);
diff --git a/kommander/editor/metadatabase.cpp b/kommander/editor/metadatabase.cpp
index 3a8316b8..d8cdb32c 100644
--- a/kommander/editor/metadatabase.cpp
+++ b/kommander/editor/metadatabase.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. All rights reserved.
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
@@ -34,7 +34,7 @@
#include <tqwidgetlist.h>
#include <tqmainwindow.h>
#include <tqregexp.h>
-#include <private/qpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
#include <tqdatetime.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -110,7 +110,7 @@ void MetaDataBase::addEntry( TQObject *o )
if ( !o )
return;
setupDataBase();
- if ( db->find( o ) )
+ if ( db->tqfind( o ) )
return;
MetaDataBaseRecord *r = new MetaDataBaseRecord;
r->object = o;
@@ -129,7 +129,7 @@ void MetaDataBase::removeEntry( TQObject *o )
void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -137,24 +137,24 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
}
if ( changed ) {
- if ( r->changedProperties.findIndex( property ) == -1 )
+ if ( r->changedProperties.tqfindIndex( property ) == -1 )
r->changedProperties.append( property );
} else {
- if ( r->changedProperties.findIndex( property ) != -1 )
+ if ( r->changedProperties.tqfindIndex( property ) != -1 )
r->changedProperties.remove( property );
}
if ( doUpdate &&
( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) {
doUpdate = false;
- setPropertyChanged( o, "alignment", changed ||
+ setPropertyChanged( o, "tqalignment", changed ||
isPropertyChanged( o, "hAlign" ) ||
isPropertyChanged( o, "vAlign" ) ||
isPropertyChanged( o, "wordwrap" ) );
doUpdate = true;
}
- if ( doUpdate && property == "alignment" ) {
+ if ( doUpdate && property == "tqalignment" ) {
doUpdate = false;
setPropertyChanged( o, "hAlign", changed );
setPropertyChanged( o, "vAlign", changed );
@@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return false;
}
- return r->changedProperties.findIndex( property ) != -1;
+ return r->changedProperties.tqfindIndex( property ) != -1;
}
TQStringList MetaDataBase::changedProperties( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -193,7 +193,7 @@ TQStringList MetaDataBase::changedProperties( TQObject *o )
void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -206,20 +206,20 @@ void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, co
TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->propertyComments.find( property );
+ return *r->propertyComments.tqfind( property );
}
void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -231,13 +231,13 @@ void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const
TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
return TQVariant();
}
- TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.find( property );
+ TQMap<TQString, TQVariant>::Iterator it = r->fakeProperties.tqfind( property );
if ( it != r->fakeProperties.end() )
return r->fakeProperties[property];
return WidgetFactory::defaultValue( o, property );
@@ -247,7 +247,7 @@ TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property)
TQMap<TQString,TQVariant>* MetaDataBase::fakeProperties( TQObject* o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -261,7 +261,7 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -269,10 +269,10 @@ void MetaDataBase::setSpacing( TQObject *o, int spacing )
}
r->spacing = spacing;
- TQLayout * layout = 0;
- WidgetFactory::layoutType( (TQWidget*)o, layout );
- if ( layout )
- layout->setSpacing( spacing );
+ TQLayout * tqlayout = 0;
+ WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout );
+ if ( tqlayout )
+ tqlayout->setSpacing( spacing );
}
int MetaDataBase::spacing( TQObject *o )
@@ -281,8 +281,8 @@ int MetaDataBase::spacing( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
- o = ( (TQMainWindow*)o )->centralWidget();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ MetaDataBaseRecord *r = db->tqfind( TQT_TQOBJECT(o) );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -297,7 +297,7 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -305,12 +305,12 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
}
r->margin = margin;
- TQLayout * layout = 0;
- WidgetFactory::layoutType( (TQWidget*)o, layout );
+ TQLayout * tqlayout = 0;
+ WidgetFactory::tqlayoutType( (TQWidget*)o, tqlayout );
if ( margin < 1 )
margin = 1;
- if ( layout )
- layout->setMargin( margin );
+ if ( tqlayout )
+ tqlayout->setMargin( margin );
}
int MetaDataBase::margin( TQObject *o )
@@ -319,8 +319,8 @@ int MetaDataBase::margin( TQObject *o )
return -1;
setupDataBase();
if ( o->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
- o = ( (TQMainWindow*)o )->centralWidget();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r || !o->isWidgetType() ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -334,7 +334,7 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString
TQObject *receiver, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -352,7 +352,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
TQObject *receiver, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -374,7 +374,7 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -387,7 +387,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ
TQObject *receiver )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -409,7 +409,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ
TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQObject *object )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -430,7 +430,7 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ
void MetaDataBase::doConnections( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -465,16 +465,16 @@ void MetaDataBase::doConnections( TQObject *o )
delete l;
}
TQString s = "2""%1";
- s = s.arg( conn.signal );
+ s = s.tqarg( conn.signal.data() );
TQString s2 = "1""%1";
- s2 = s2.arg( conn.slot );
+ s2 = s2.tqarg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( true );
- TQStrList slotList = receiver->metaObject()->slotNames( true );
+ TQStrList signalList = sender->tqmetaObject()->signalNames( true );
+ TQStrList slotList = receiver->tqmetaObject()->slotNames( true );
// avoid warnings
- if ( signalList.find( conn.signal ) == -1 ||
- slotList.find( conn.slot ) == -1 )
+ if ( signalList.tqfind( conn.signal ) == -1 ||
+ slotList.tqfind( conn.slot ) == -1 )
continue;
TQObject::connect( sender, s, receiver, s2 );
@@ -485,7 +485,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -498,7 +498,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
s.access = access;
s.language = language;
s.returnType = returnType;
- TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.find( s );
+ TQValueList<MetaDataBase::Slot>::Iterator it = r->slotList.tqfind( s );
if ( it != r->slotList.end() )
r->slotList.remove( it );
r->slotList.append( s );
@@ -510,7 +510,7 @@ void MetaDataBase::addSlot( TQObject *o, const TQCString &slot, const TQString&
void MetaDataBase::setSlotList( TQObject *o, const TQValueList<Slot> &slotList )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -523,7 +523,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin
const TQString &access, const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -546,7 +546,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQCString &slot, const TQStrin
void MetaDataBase::removeSlot( TQObject *o, const TQString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -565,7 +565,7 @@ void MetaDataBase::removeSlot( TQObject *o, const TQString &slot )
TQValueList<MetaDataBase::Slot> MetaDataBase::slotList( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -578,7 +578,7 @@ TQValueList<MetaDataBase::Slot> MetaDataBase::slotList( TQObject *o )
bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -596,7 +596,7 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
void MetaDataBase::changeSlot( TQObject *o, const TQCString &slot, const TQCString &newName )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -617,7 +617,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot,
const TQString &language, const TQString &returnType )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -639,7 +639,7 @@ void MetaDataBase::changeSlotAttributes( TQObject *o, const TQCString &slot,
bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -647,14 +647,14 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
}
if ( !onlyCustom ) {
- TQStrList slotList = o->metaObject()->slotNames( true );
- if ( slotList.find( slot ) != -1 )
+ TQStrList slotList = o->tqmetaObject()->slotNames( true );
+ if ( slotList.tqfind( slot ) != -1 )
return true;
if ( o->inherits( "FormWindow" ) ) {
- o = ( (FormWindow*)o )->mainContainer();
- slotList = o->metaObject()->slotNames( true );
- if ( slotList.find( slot ) != -1 )
+ o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer());
+ slotList = o->tqmetaObject()->slotNames( true );
+ if ( slotList.tqfind( slot ) != -1 )
return true;
}
@@ -682,11 +682,11 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
TQString sl = slot;
@@ -698,7 +698,7 @@ TQString MetaDataBase::languageOfSlot( TQObject *o, const TQCString &slot )
if ( sl == sl2 )
return s.language;
}
- return TQString::null;
+ return TQString();
}
bool MetaDataBase::addCustomWidget( CustomWidget *wid )
@@ -779,7 +779,7 @@ bool MetaDataBase::hasCustomWidget( const TQString &className )
void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*) w );
+ MetaDataBaseRecord *r = db->tqfind( (void*) w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -792,7 +792,7 @@ void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
TQWidgetList MetaDataBase::tabOrder( TQWidget *w )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*) w );
+ MetaDataBaseRecord *r = db->tqfind( (void*) w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -805,7 +805,7 @@ TQWidgetList MetaDataBase::tabOrder( TQWidget *w )
void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -818,7 +818,7 @@ void MetaDataBase::setIncludes( TQObject *o, const TQValueList<Include> &incs )
TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -831,7 +831,7 @@ TQValueList<MetaDataBase::Include> MetaDataBase::includes( TQObject *o )
void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -844,7 +844,7 @@ void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds )
TQStringList MetaDataBase::forwards( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -857,7 +857,7 @@ TQStringList MetaDataBase::forwards( TQObject *o )
void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -871,10 +871,10 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
bool hasSemicolon = s.endsWith( ";" );
if ( hasSemicolon )
s = s.left( s.length() - 1 );
- int p = s.find( '(' );
+ int p = s.tqfind( '(' );
if ( p < 0 )
p = s.length();
- int sp = s.find( ' ' );
+ int sp = s.tqfind( ' ' );
if ( sp >= 0 && sp < p ) {
s = s.mid( sp+1 );
p -= sp + 1;
@@ -890,7 +890,7 @@ void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs )
TQStringList MetaDataBase::signalList( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -903,7 +903,7 @@ TQStringList MetaDataBase::signalList( TQObject *o )
void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -916,7 +916,7 @@ void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi )
MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -934,7 +934,7 @@ MetaDataBase::CustomWidget::CustomWidget()
className = "MyCustomWidget";
includeFile = "mywidget.h";
includePolicy = Local;
- sizeHint = TQSize( -1, -1 );
+ tqsizeHint = TQSize( -1, -1 );
pixmap = new TQPixmap( PixmapChooser::loadPixmap( "customwidget.xpm" ) );
id = -1;
sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
@@ -946,7 +946,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
className = w.className;
includeFile = w.includeFile;
includePolicy = w.includePolicy;
- sizeHint = w.sizeHint;
+ tqsizeHint = w.tqsizeHint;
if ( w.pixmap )
pixmap = new TQPixmap( *w.pixmap );
else
@@ -958,7 +958,7 @@ MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)w );
+ MetaDataBaseRecord *r = db->tqfind( (void*)w );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
w, w->name(), w->className() );
@@ -971,7 +971,7 @@ void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c )
TQCursor MetaDataBase::cursor( TQWidget *w )
{
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)w );
+ MetaDataBaseRecord *r = db->tqfind( (void*)w );
if ( !r ) {
w->unsetCursor();
return w->cursor();
@@ -991,7 +991,7 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
className = w.className;
includeFile = w.includeFile;
includePolicy = w.includePolicy;
- sizeHint = w.sizeHint;
+ tqsizeHint = w.tqsizeHint;
if ( w.pixmap )
pixmap = new TQPixmap( *w.pixmap );
else
@@ -1006,8 +1006,8 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
{
- TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true );
- if ( sigList.find( signal ) != -1 )
+ TQStrList sigList = TQWidget::tqstaticMetaObject()->signalNames( true );
+ if ( sigList.tqfind( signal ) != -1 )
return true;
for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
if ( normalizeSlot( *it ) == normalizeSlot( signal ) )
@@ -1018,8 +1018,8 @@ bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
{
- TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true );
- if ( slotList.find( normalizeSlot( slot ) ) != -1 )
+ TQStrList slotList = TQWidget::tqstaticMetaObject()->slotNames( true );
+ if ( slotList.tqfind( normalizeSlot( slot ) ) != -1 )
return true;
for ( TQValueList<MetaDataBase::Slot>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
@@ -1031,8 +1031,8 @@ bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const
{
- TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true );
- if ( propList.find( prop ) != -1 )
+ TQStrList propList = TQWidget::tqstaticMetaObject()->propertyNames( true );
+ if ( propList.tqfind( prop ) != -1 )
return true;
for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
@@ -1047,7 +1047,7 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1061,16 +1061,16 @@ void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &a
TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap )
{
if ( !o )
- return TQString::null;
+ return TQString();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->pixmapArguments.find( pixmap );
+ return *r->pixmapArguments.tqfind( pixmap );
}
void MetaDataBase::clearPixmapArguments( TQObject *o )
@@ -1078,7 +1078,7 @@ void MetaDataBase::clearPixmapArguments( TQObject *o )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1094,7 +1094,7 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1108,16 +1108,16 @@ void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg )
TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap )
{
if ( !o )
- return TQString::null;
+ return TQString();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return TQString::null;
+ return TQString();
}
- return *r->pixmapKeys.find( pixmap );
+ return *r->pixmapKeys.tqfind( pixmap );
}
void MetaDataBase::clearPixmapKeys( TQObject *o )
@@ -1125,7 +1125,7 @@ void MetaDataBase::clearPixmapKeys( TQObject *o )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1142,7 +1142,7 @@ void MetaDataBase::setColumnFields( TQObject *o, const TQMap<TQString, TQString>
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1157,7 +1157,7 @@ TQMap<TQString, TQString> MetaDataBase::columnFields( TQObject *o )
if ( !o )
return TQMap<TQString, TQString>();
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1187,7 +1187,7 @@ void MetaDataBase::setExportMacro( TQObject *o, const TQString &macro )
if ( !o )
return;
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1202,7 +1202,7 @@ TQString MetaDataBase::exportMacro( TQObject *o )
if ( !o )
return "";
setupDataBase();
- MetaDataBaseRecord *r = db->find( (void*)o );
+ MetaDataBaseRecord *r = db->tqfind( (void*)o );
if ( !r ) {
qWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
@@ -1214,6 +1214,6 @@ TQString MetaDataBase::exportMacro( TQObject *o )
bool MetaDataBase::hasObject( TQObject *o )
{
- return !!db->find( o );
+ return !!db->tqfind( o );
}
diff --git a/kommander/editor/metadatabase.h b/kommander/editor/metadatabase.h
index d5aceff5..5251e793 100644
--- a/kommander/editor/metadatabase.h
+++ b/kommander/editor/metadatabase.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -92,7 +92,7 @@ public:
TQString className;
TQString includeFile;
IncludePolicy includePolicy;
- TQSize sizeHint;
+ TQSize tqsizeHint;
TQSizePolicy sizePolicy;
TQPixmap *pixmap;
TQValueList<TQCString> lstSignals;
@@ -125,7 +125,7 @@ public:
{
TQString name;
TQStringList args;
-#if defined(Q_FULL_TEMPLATE_INSTANTIATION)
+#if defined(TQ_FULL_TEMPLATE_INSTANTIATION)
bool operator==( const EventDescription& ) const { return FALSE; }
#endif
};
diff --git a/kommander/editor/multilineeditor.ui b/kommander/editor/multilineeditor.ui
index 9b9cbe9f..47ce1172 100644
--- a/kommander/editor/multilineeditor.ui
+++ b/kommander/editor/multilineeditor.ui
@@ -19,13 +19,13 @@
**
*********************************************************************</comment>
<widget>
- <class>QDialog</class>
+ <class>TQDialog</class>
<property stdset="1">
<name>name</name>
<cstring>MultiLineEditorBase</cstring>
</property>
<property stdset="1">
- <name>geometry</name>
+ <name>tqgeometry</name>
<rect>
<x>0</x>
<y>0</y>
@@ -55,7 +55,7 @@
<number>6</number>
</property>
<widget>
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel1</cstring>
@@ -70,7 +70,7 @@
</property>
</widget>
<widget>
- <class>QMultiLineEdit</class>
+ <class>TQMultiLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>preview</cstring>
@@ -85,7 +85,7 @@
</property>
</widget>
<widget>
- <class>QLayoutWidget</class>
+ <class>TQLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout1</cstring>
@@ -100,7 +100,7 @@
<number>6</number>
</property>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonHelp</cstring>
@@ -128,7 +128,7 @@
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
@@ -136,7 +136,7 @@
</property>
</spacer>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonOk</cstring>
@@ -159,7 +159,7 @@
</property>
</widget>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonApply</cstring>
@@ -178,7 +178,7 @@
</property>
</widget>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonCancel</cstring>
diff --git a/kommander/editor/multilineeditorimpl.cpp b/kommander/editor/multilineeditorimpl.cpp
index 2a0ec9b7..98ad65d6 100644
--- a/kommander/editor/multilineeditorimpl.cpp
+++ b/kommander/editor/multilineeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,13 +28,13 @@
#include <klocale.h>
-MultiLineEditor::MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : MultiLineEditorBase( parent, 0, true ), formwindow( fw )
+MultiLineEditor::MultiLineEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
+ : MultiLineEditorBase( tqparent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
mlined = (TQMultiLineEdit*)editWidget;
// #### complete list of properties here
- preview->setAlignment( mlined->alignment() );
+ preview->tqsetAlignment( mlined->tqalignment() );
preview->setMaxLines( mlined->maxLines() );
preview->setWordWrap( mlined->wordWrap() );
preview->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() );
@@ -53,7 +53,7 @@ void MultiLineEditor::okClicked()
void MultiLineEditor::applyClicked()
{
- PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n("Set Text of '%1'" ).arg( mlined->name() ),
+ PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n("Set Text of '%1'" ).tqarg( mlined->name() ),
formwindow, mlined, preview->text() );
cmd->execute();
formwindow->commandHistory()->addCommand( cmd );
@@ -61,8 +61,8 @@ void MultiLineEditor::applyClicked()
}
-TextEditor::TextEditor( TQWidget *parent, const TQString &text )
- : MultiLineEditorBase( parent, 0, true )
+TextEditor::TextEditor( TQWidget *tqparent, const TQString &text )
+ : MultiLineEditorBase( tqparent, 0, true )
{
buttonApply->hide();
setCaption( i18n("Text" ) );
@@ -71,9 +71,9 @@ TextEditor::TextEditor( TQWidget *parent, const TQString &text )
preview->selectAll();
}
-TQString TextEditor::getText( TQWidget *parent, const TQString &text )
+TQString TextEditor::getText( TQWidget *tqparent, const TQString &text )
{
- TextEditor dlg( parent, text );
+ TextEditor dlg( tqparent, text );
if ( dlg.exec() == TQDialog::Accepted ) {
TQString txt = dlg.preview->text();
int i = txt.length() - 1;
@@ -84,7 +84,7 @@ TQString TextEditor::getText( TQWidget *parent, const TQString &text )
}
return txt;
}
- return TQString::null;
+ return TQString();
}
void TextEditor::okClicked()
diff --git a/kommander/editor/multilineeditorimpl.h b/kommander/editor/multilineeditorimpl.h
index d26c7f78..a5d48479 100644
--- a/kommander/editor/multilineeditorimpl.h
+++ b/kommander/editor/multilineeditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -29,9 +29,10 @@ class TQMultiLineEdit;
class MultiLineEditor : public MultiLineEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- MultiLineEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ MultiLineEditor( TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
protected slots:
void okClicked();
@@ -46,11 +47,12 @@ private:
class TextEditor : public MultiLineEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TextEditor( TQWidget *parent, const TQString &text );
+ TextEditor( TQWidget *tqparent, const TQString &text );
- static TQString getText( TQWidget *parent, const TQString &text );
+ static TQString getText( TQWidget *tqparent, const TQString &text );
protected slots:
void okClicked();
diff --git a/kommander/editor/newform.ui b/kommander/editor/newform.ui
index 16bb0365..c1e14bd6 100644
--- a/kommander/editor/newform.ui
+++ b/kommander/editor/newform.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>NewFormBase</cstring>
</property>
@@ -50,7 +50,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -64,7 +64,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>helpButton</cstring>
</property>
@@ -85,14 +85,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -109,7 +109,7 @@
<string>Create a new form using the selected template.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -125,7 +125,7 @@
</widget>
</hbox>
</widget>
- <widget class="QIconView" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQIconView" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>templateView</cstring>
</property>
@@ -155,7 +155,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>0</height>
@@ -179,19 +179,19 @@
</connection>
<connection>
<sender>templateView</sender>
- <signal>currentChanged(QIconViewItem*)</signal>
+ <signal>currentChanged(TQIconViewItem*)</signal>
<receiver>NewFormBase</receiver>
- <slot>itemChanged(QIconViewItem*)</slot>
+ <slot>itemChanged(TQIconViewItem*)</slot>
</connection>
<connection>
<sender>templateView</sender>
- <signal>doubleClicked(QIconViewItem*)</signal>
+ <signal>doubleClicked(TQIconViewItem*)</signal>
<receiver>NewFormBase</receiver>
<slot>accept()</slot>
</connection>
<connection>
<sender>templateView</sender>
- <signal>returnPressed(QIconViewItem*)</signal>
+ <signal>returnPressed(TQIconViewItem*)</signal>
<receiver>NewFormBase</receiver>
<slot>accept()</slot>
</connection>
@@ -202,9 +202,9 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<slots>
- <slot access="protected">itemChanged( QIconViewItem * )</slot>
+<Q_SLOTS>
+ <slot access="protected">itemChanged( TQIconViewItem * )</slot>
<slot access="protected">projectChanged( const QString &amp; )</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/newformimpl.cpp b/kommander/editor/newformimpl.cpp
index ee623e48..e1ef5662 100644
--- a/kommander/editor/newformimpl.cpp
+++ b/kommander/editor/newformimpl.cpp
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS. �All rights reserved.
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
@@ -57,7 +57,7 @@ void FormItem::insert()
FormWindow *fw = 0;
FormFile *ff = new FormFile(FormFile::createUnnamedFileName(), true);
fw = new FormWindow(ff, MainWindow::self, MainWindow::self->qWorkspace(), n);
- MetaDataBase::addEntry(fw);
+ MetaDataBase::addEntry(TQT_TQOBJECT(fw));
TQWidget *w = 0L;
if (fType == Dialog)
{
@@ -72,7 +72,7 @@ void FormItem::insert()
if (w)
{
w->setProperty("useInternalParser", true);
- MetaDataBase::setPropertyChanged(w, "useInternalParser", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(w), "useInternalParser", true);
}
fw->setCaption(n);
fw->resize(600, 480);
@@ -81,7 +81,7 @@ void FormItem::insert()
// the wizard might have changed a lot, lets update everything
MainWindow::self->actioneditor()->setFormWindow(fw);
MainWindow::self->objectHierarchy()->setFormWindow(fw, fw);
- fw->killAccels(fw);
+ fw->killAccels(TQT_TQOBJECT(fw));
fw->setFocus();
}
@@ -100,12 +100,12 @@ static void unifyFormName(FormWindow *fw, TQWorkspace *qworkspace)
if (w != fw)
lst << w->name();
- if (lst.findIndex(fw->name()) == -1)
+ if (lst.tqfindIndex(fw->name()) == -1)
return;
TQString origName = fw->name();
TQString n = origName;
int i = 1;
- while (lst.findIndex(n) != -1)
+ while (lst.tqfindIndex(n) != -1)
n = origName + TQString::number(i++);
fw->setName(n);
fw->setCaption(n);
@@ -121,22 +121,22 @@ void CustomFormItem::insert()
if (!resource.load(ff))
{
TQMessageBox::information(MainWindow::self, i18n("Load Template"),
- i18n("Could not load form description from template '%1'").arg(filename));
+ i18n("Could not load form description from template '%1'").tqarg(filename));
delete ff;
return;
}
- ff->setFileName(TQString::null);
+ ff->setFileName(TQString());
if (MainWindow::self->formWindow())
{
- MainWindow::self->formWindow()->setFileName(TQString::null);
+ MainWindow::self->formWindow()->setFileName(TQString());
unifyFormName(MainWindow::self->formWindow(), MainWindow::self->qWorkspace());
}
}
}
-NewForm::NewForm(TQWidget *parent, const TQString &templatePath)
- : NewFormBase(parent, 0, true)
+NewForm::NewForm(TQWidget *tqparent, const TQString &templatePath)
+ : NewFormBase(tqparent, 0, true)
{
connect(helpButton, TQT_SIGNAL(clicked()), MainWindow::self, TQT_SLOT(showDialogHelp()));
@@ -165,15 +165,15 @@ NewForm::NewForm(TQWidget *parent, const TQString &templatePath)
if (!TQFile::exists(*it))
continue;
TQDir dir(*it);
- const QFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
+ const TQFileInfoList* fileList = dir.entryInfoList(TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name);
if (fileList)
- for (QFileInfoListIterator fit(*fileList); fit.current(); ++fit)
+ for (TQFileInfoListIterator fit(*fileList); fit.current(); ++fit)
{
TQFileInfo* fi = fit.current();
if (!fi->isFile() || fi->extension() != "kmdr")
continue;
TQString name = fi->baseName();
- name = name.replace("_", " ");
+ name = name.tqreplace("_", " ");
CustomFormItem *ci = new CustomFormItem(templateView, name);
allItems.append(ci);
ci->setDragEnabled(false);
diff --git a/kommander/editor/newformimpl.h b/kommander/editor/newformimpl.h
index 9aad4155..6b28a631 100644
--- a/kommander/editor/newformimpl.h
+++ b/kommander/editor/newformimpl.h
@@ -1,5 +1,5 @@
/**********************************************************************
- This file is based on Qt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
+ This file is based on TQt Designer, Copyright (C) 2000 Trolltech AS.  All rights reserved.
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
@@ -25,7 +25,7 @@
class FormFile;
-class NewItem : public QIconViewItem
+class NewItem : public TQIconViewItem
{
public:
enum Type {Form, CustomForm};
@@ -61,8 +61,9 @@ private:
class NewForm : public NewFormBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewForm( TQWidget *parent, const TQString &templatePath );
+ NewForm( TQWidget *tqparent, const TQString &templatePath );
void accept();
protected slots:
void itemChanged(TQIconViewItem *item);
diff --git a/kommander/editor/orderindicator.cpp b/kommander/editor/orderindicator.cpp
index fee29150..056601b8 100644
--- a/kommander/editor/orderindicator.cpp
+++ b/kommander/editor/orderindicator.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -63,7 +63,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
TQFont f( font() );
f.setBold( true );
setFont( f );
- resize( QMAX( w, h ), h );
+ resize( TQMAX( w, h ), h );
update(); // in case the size didn't change
reposition();
show();
@@ -72,7 +72,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
void OrderIndicator::reposition()
{
- TQPoint p =parentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
+ TQPoint p =tqparentWidget()->mapFromGlobal( widget->mapToGlobal( widget->rect().topLeft() ) );
move( p - TQPoint( width()/3, height()/3 ) );
}
diff --git a/kommander/editor/orderindicator.h b/kommander/editor/orderindicator.h
index 24cae185..ae696c95 100644
--- a/kommander/editor/orderindicator.h
+++ b/kommander/editor/orderindicator.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,9 +25,10 @@
class FormWindow;
-class OrderIndicator : public QWidget
+class OrderIndicator : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
OrderIndicator( int i, TQWidget* w, FormWindow* fw );
diff --git a/kommander/editor/paletteeditor.ui b/kommander/editor/paletteeditor.ui
index 31a4cd8a..814785dd 100644
--- a/kommander/editor/paletteeditor.ui
+++ b/kommander/editor/paletteeditor.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>PaletteEditorBase</cstring>
</property>
@@ -52,7 +52,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupAutoPalette</cstring>
</property>
@@ -67,7 +67,7 @@
<property name="title">
<string>Build Palette</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignAuto</set>
</property>
<hbox>
@@ -80,7 +80,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelMainColor</cstring>
</property>
@@ -92,7 +92,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -110,7 +110,7 @@
<property name="text">
<string>&amp;3D effects:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -142,7 +142,7 @@
<string>Choose the effect-color for the generated palette.</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelMainColor2</cstring>
</property>
@@ -154,7 +154,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>50</width>
<height>0</height>
@@ -172,7 +172,7 @@
<property name="text">
<string>Back&amp;ground:</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>AlignVCenter</set>
</property>
<property name="buddy" stdset="0">
@@ -214,14 +214,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>btnAdvanced</cstring>
</property>
@@ -231,7 +231,7 @@
</widget>
</hbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>GroupBox126</cstring>
</property>
@@ -256,7 +256,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -270,7 +270,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -281,7 +281,7 @@
<cstring>paletteCombo</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Active Palette</string>
@@ -318,7 +318,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout3</cstring>
</property>
@@ -332,7 +332,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -353,14 +353,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -377,7 +377,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -501,15 +501,15 @@
<tabstop>paletteCombo</tabstop>
<tabstop>buttonHelp</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">onTune()</slot>
<slot access="protected">onChoose2ndMainColor()</slot>
<slot access="protected">onChooseMainColor()</slot>
<slot access="protected">paletteSelected(int)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>styledbutton.h</includehint>
<includehint>styledbutton.h</includehint>
diff --git a/kommander/editor/paletteeditoradvanced.ui b/kommander/editor/paletteeditoradvanced.ui
index cf868b69..5d2c41af 100644
--- a/kommander/editor/paletteeditoradvanced.ui
+++ b/kommander/editor/paletteeditoradvanced.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>PaletteEditorAdvancedBase</cstring>
</property>
@@ -41,7 +41,7 @@
<bool>true</bool>
</property>
<property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Edit Palette&lt;/b&gt;&lt;p&gt;Change the current widget or form's palette.&lt;/p&gt;&lt;p&gt;Use a generated palette or select colors for each color group and each color role.&lt;/p&gt;&lt;p&gt;The palette can be tested with different widget layouts in the preview section.&lt;/p&gt;</string>
+ <string>&lt;b&gt;Edit Palette&lt;/b&gt;&lt;p&gt;Change the current widget or form's palette.&lt;/p&gt;&lt;p&gt;Use a generated palette or select colors for each color group and each color role.&lt;/p&gt;&lt;p&gt;The palette can be tested with different widget tqlayouts in the preview section.&lt;/p&gt;</string>
</property>
<vbox>
<property name="name">
@@ -53,7 +53,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout14</cstring>
</property>
@@ -67,7 +67,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>TextLabel1</cstring>
</property>
@@ -84,7 +84,7 @@
<cstring>paletteCombo</cstring>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Active Palette</string>
@@ -106,7 +106,7 @@
</widget>
</hbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>ButtonGroup1</cstring>
</property>
@@ -131,7 +131,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBuildInactive</cstring>
</property>
@@ -142,7 +142,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBuildDisabled</cstring>
</property>
@@ -155,7 +155,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupCentral</cstring>
</property>
@@ -172,7 +172,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Background</string>
@@ -238,7 +238,7 @@
<string>&lt;b&gt;Select a color role.&lt;/b&gt;&lt;p&gt;Available central color roles are: &lt;ul&gt; &lt;li&gt;Background - general background color.&lt;/li&gt; &lt;li&gt;Foreground - general foreground color. &lt;/li&gt; &lt;li&gt;Base - used as the background color for example, for text entry widgets; it is usually white or another light color. &lt;/li&gt; &lt;li&gt;Text - the forground color used with Base. Usually this is the same as the Foreground, in which case it must provide good contrast both with the Background and with the Base. &lt;/li&gt; &lt;li&gt;Button - general button background color; useful where buttons need a background different from Background, as in the Macintosh style. &lt;/li&gt; &lt;li&gt;ButtonText - a foreground color used with the Button color. &lt;/li&gt; &lt;li&gt;Highlight - a color used to indicate a selected or highlighted item. &lt;/li&gt; &lt;li&gt;HighlightedText - a text color that contrasts to Highlight. &lt;/li&gt; &lt;li&gt;BrightText - a text color that is very different from Foreground and contrasts well with, for example, black. &lt;/li&gt; &lt;/ul&gt; &lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout32_2</cstring>
</property>
@@ -262,14 +262,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelPixmap</cstring>
</property>
@@ -313,7 +313,7 @@
<string>Choose a pixmap file for the selected central color role.</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelCentral</cstring>
</property>
@@ -325,7 +325,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -367,7 +367,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>groupEffect</cstring>
</property>
@@ -384,7 +384,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout32_3</cstring>
</property>
@@ -398,7 +398,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBuildEffect</cstring>
</property>
@@ -415,7 +415,7 @@
<string>Check to let 3D-effect colors be calculated from the button-color.</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Light</string>
@@ -453,7 +453,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout31_2</cstring>
</property>
@@ -477,14 +477,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelEffect</cstring>
</property>
@@ -496,7 +496,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>0</width>
<height>0</height>
@@ -538,7 +538,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout3</cstring>
</property>
@@ -552,7 +552,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -573,14 +573,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -597,7 +597,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -743,7 +743,7 @@
<tabstop>buttonEffect</tabstop>
<tabstop>buttonHelp</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">onToggleBuildDisabled(bool)</slot>
@@ -756,8 +756,8 @@
<slot access="protected">onToggleBuildInactive(bool)</slot>
<slot access="protected">paletteSelected(int)</slot>
<slot>showHelp()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>styledbutton.h</includehint>
<includehint>styledbutton.h</includehint>
diff --git a/kommander/editor/paletteeditoradvancedimpl.cpp b/kommander/editor/paletteeditoradvancedimpl.cpp
index 69c90c33..243576c2 100644
--- a/kommander/editor/paletteeditoradvancedimpl.cpp
+++ b/kommander/editor/paletteeditoradvancedimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -35,7 +35,7 @@
Class used by PaletteEditor for bold combobox items
*/
-class BoldListBoxText : public QListBoxText
+class BoldListBoxText : public TQListBoxText
{
public:
BoldListBoxText( TQString text, TQListBox* lb = 0 );
@@ -59,9 +59,9 @@ void BoldListBoxText::paint( TQPainter* painter )
TQListBoxText::paint( painter );
}
-PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
+PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * tqparent,
const char * name, bool modal, WFlags f )
- : PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0)
+ : PaletteEditorAdvancedBase( tqparent, name, modal, f ), formWindow( fw ), selectedPalette(0)
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
@@ -244,15 +244,15 @@ void PaletteEditorAdvanced::onCentral( int item )
case 0:
default:
c = editPalette.active().color( centralFromItem(item) );
- p = editPalette.active().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.active().tqbrush( centralFromItem(item) ).pixmap();
break;
case 1:
c = editPalette.inactive().color( centralFromItem(item) );
- p = editPalette.inactive().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.inactive().tqbrush( centralFromItem(item) ).pixmap();
break;
case 2:
c = editPalette.disabled().color( centralFromItem(item) );
- p = editPalette.disabled().brush( centralFromItem(item) ).pixmap();
+ p = editPalette.disabled().tqbrush( centralFromItem(item) ).pixmap();
break;
}
@@ -508,17 +508,17 @@ void PaletteEditorAdvanced::updateStyledButtons()
default:
central = editPalette.active().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.active().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.active().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.active().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
case 1:
central = editPalette.inactive().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.inactive().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.inactive().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.inactive().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
case 2:
central = editPalette.disabled().color( centralFromItem( comboCentral->currentItem() ) );
effect = editPalette.disabled().color( effectFromItem( comboEffect->currentItem() ) );
- pm = editPalette.disabled().brush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
+ pm = editPalette.disabled().tqbrush( centralFromItem( comboCentral->currentItem() ) ).pixmap();
break;
}
@@ -613,10 +613,10 @@ void PaletteEditorAdvanced::setupBackgroundMode( BackgroundMode mode )
}
TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
- BackgroundMode mode, TQWidget* parent,
+ BackgroundMode mode, TQWidget* tqparent,
const char* name, FormWindow *fw )
{
- PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true );
+ PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, tqparent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
diff --git a/kommander/editor/paletteeditoradvancedimpl.h b/kommander/editor/paletteeditoradvancedimpl.h
index b9c378dd..ed0bcc39 100644
--- a/kommander/editor/paletteeditoradvancedimpl.h
+++ b/kommander/editor/paletteeditoradvancedimpl.h
@@ -4,7 +4,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,13 +28,14 @@ class FormWindow;
class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
+ PaletteEditorAdvanced( FormWindow *fw, TQWidget * tqparent=0, const char * name=0,
bool modal=FALSE, WFlags f=0 );
~PaletteEditorAdvanced();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
- TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ TQWidget* tqparent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void paletteSelected(int);
diff --git a/kommander/editor/paletteeditorimpl.cpp b/kommander/editor/paletteeditorimpl.cpp
index bc3877f4..89d1f624 100644
--- a/kommander/editor/paletteeditorimpl.cpp
+++ b/kommander/editor/paletteeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -30,8 +30,8 @@
#include <tqapplication.h>
#include <tqpushbutton.h>
-PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f )
- : PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
+PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * tqparent, const char * name, bool modal, WFlags f )
+ : PaletteEditorBase( tqparent, name, modal, f ), formWindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
@@ -275,9 +275,9 @@ TQPalette PaletteEditor::pal() const
}
TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
- TQWidget* parent, const char* name, FormWindow *fw )
+ TQWidget* tqparent, const char* name, FormWindow *fw )
{
- PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true );
+ PaletteEditor* dlg = new PaletteEditor( fw, tqparent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
diff --git a/kommander/editor/paletteeditorimpl.h b/kommander/editor/paletteeditorimpl.h
index abd68dfc..54e45612 100644
--- a/kommander/editor/paletteeditorimpl.h
+++ b/kommander/editor/paletteeditorimpl.h
@@ -4,7 +4,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,13 +28,14 @@ class FormWindow;
class PaletteEditor : public PaletteEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PaletteEditor( FormWindow *fw, TQWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
+ PaletteEditor( FormWindow *fw, TQWidget * tqparent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
~PaletteEditor();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
- TQWidget* parent = 0, const char* name = 0, FormWindow *fw = 0 );
+ TQWidget* tqparent = 0, const char* name = 0, FormWindow *fw = 0 );
protected slots:
void onChooseMainColor();
diff --git a/kommander/editor/parser.cpp b/kommander/editor/parser.cpp
index 15374aa5..cbd3946a 100644
--- a/kommander/editor/parser.cpp
+++ b/kommander/editor/parser.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -22,7 +22,7 @@
#include <tqobject.h>
#include <tqstringlist.h>
-class NormalizeObject : public QObject
+class NormalizeObject : public TQObject
{
public:
NormalizeObject() : TQObject() {}
@@ -32,9 +32,9 @@ public:
TQString Parser::cleanArgs( const TQString &func )
{
TQString slot( func );
- int begin = slot.find( "(" ) + 1;
+ int begin = slot.tqfind( "(" ) + 1;
TQString args = slot.mid( begin );
- args = args.left( args.find( ")" ) );
+ args = args.left( args.tqfind( ")" ) );
TQStringList lst = TQStringList::split( ',', args );
TQString res = slot.left( begin );
for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
@@ -42,13 +42,13 @@ TQString Parser::cleanArgs( const TQString &func )
res += ",";
TQString arg = *it;
int pos = 0;
- if ( ( pos = arg.find( "&" ) ) != -1 ) {
+ if ( ( pos = arg.tqfind( "&" ) ) != -1 ) {
arg = arg.left( pos + 1 );
- } else if ( ( pos = arg.find( "*" ) ) != -1 ) {
+ } else if ( ( pos = arg.tqfind( "*" ) ) != -1 ) {
arg = arg.left( pos + 1 );
} else {
arg = arg.simplifyWhiteSpace();
- if ( ( pos = arg.find( ':' ) ) != -1 )
+ if ( ( pos = arg.tqfind( ':' ) ) != -1 )
arg = arg.left( pos ).simplifyWhiteSpace() + ":" + arg.mid( pos + 1 ).simplifyWhiteSpace();
TQStringList l = TQStringList::split( ' ', arg );
if ( l.count() == 2 ) {
@@ -62,5 +62,5 @@ TQString Parser::cleanArgs( const TQString &func )
}
res += ")";
- return TQString::fromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
+ return TQString::tqfromLatin1( NormalizeObject::normalizeSignalSlot( res.latin1() ) );
}
diff --git a/kommander/editor/parser.h b/kommander/editor/parser.h
index ace96d9e..5fdbdc2b 100644
--- a/kommander/editor/parser.h
+++ b/kommander/editor/parser.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
diff --git a/kommander/editor/pics/images.h b/kommander/editor/pics/images.h
index 92094bdb..5850acd1 100644
--- a/kommander/editor/pics/images.h
+++ b/kommander/editor/pics/images.h
@@ -1,5 +1,5 @@
-#ifndef _QEMBED_1804289383
-#define _QEMBED_1804289383
+#ifndef _TQEMBED_1804289383
+#define _TQEMBED_1804289383
static const unsigned int arrow_xbm_len = 601;
static const unsigned char arrow_xbm_data[] = {
0x23,0x64,0x65,0x66,0x69,0x6e,0x65,0x20,0x61,0x72,0x72,0x6f,0x77,0x5f,
@@ -4717,8 +4717,8 @@ static const unsigned char small_editgrid_png_data[] = {
0x60,0x82
};
-static const unsigned int small_edithlayout_png_len = 706;
-static const unsigned char small_edithlayout_png_data[] = {
+static const unsigned int small_edithtqlayout_png_len = 706;
+static const unsigned char small_edithtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4772,8 +4772,8 @@ static const unsigned char small_edithlayout_png_data[] = {
0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_edithlayoutsplit_png_len = 809;
-static const unsigned char small_edithlayoutsplit_png_data[] = {
+static const unsigned int small_edithtqlayoutsplit_png_len = 809;
+static const unsigned char small_edithtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4957,8 +4957,8 @@ static const unsigned char small_editslots_png_data[] = {
0xae,0x42,0x60,0x82
};
-static const unsigned int small_editvlayout_png_len = 289;
-static const unsigned char small_editvlayout_png_data[] = {
+static const unsigned int small_editvtqlayout_png_len = 289;
+static const unsigned char small_editvtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -4982,8 +4982,8 @@ static const unsigned char small_editvlayout_png_data[] = {
0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_editvlayoutsplit_png_len = 355;
-static const unsigned char small_editvlayoutsplit_png_data[] = {
+static const unsigned int small_editvtqlayoutsplit_png_len = 355;
+static const unsigned char small_editvtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7784,8 +7784,8 @@ static const unsigned char small_disabled_editgrid_png_data[] = {
0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_edithlayout_png_len = 601;
-static const unsigned char small_disabled_edithlayout_png_data[] = {
+static const unsigned int small_disabled_edithtqlayout_png_len = 601;
+static const unsigned char small_disabled_edithtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7831,8 +7831,8 @@ static const unsigned char small_disabled_edithlayout_png_data[] = {
0x35,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_edithlayoutsplit_png_len = 754;
-static const unsigned char small_disabled_edithlayoutsplit_png_data[] = {
+static const unsigned int small_disabled_edithtqlayoutsplit_png_len = 754;
+static const unsigned char small_disabled_edithtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -7958,8 +7958,8 @@ static const unsigned char small_disabled_editpaste_png_data[] = {
0x44,0xae,0x42,0x60,0x82
};
-static const unsigned int small_disabled_editvlayout_png_len = 617;
-static const unsigned char small_disabled_editvlayout_png_data[] = {
+static const unsigned int small_disabled_editvtqlayout_png_len = 617;
+static const unsigned char small_disabled_editvtqlayout_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -8007,8 +8007,8 @@ static const unsigned char small_disabled_editvlayout_png_data[] = {
0x82
};
-static const unsigned int small_disabled_editvlayoutsplit_png_len = 752;
-static const unsigned char small_disabled_editvlayoutsplit_png_data[] = {
+static const unsigned int small_disabled_editvtqlayoutsplit_png_len = 752;
+static const unsigned char small_disabled_editvtqlayoutsplit_png_data[] = {
0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,
0x44,0x52,0x00,0x00,0x00,0x16,0x00,0x00,0x00,0x16,0x08,0x06,0x00,0x00,
0x00,0xc4,0xb4,0x6c,0x3b,0x00,0x00,0x00,0x04,0x67,0x41,0x4d,0x41,0x00,
@@ -10857,7 +10857,7 @@ static struct Embed {
{ 1483, small_form_xpm_data, "small/form.xpm" },
{ 3981, small_home_xpm_data, "small/home.xpm" },
{ 5406, small_image_xpm_data, "small/image.xpm" },
- { 3179, small_layout_xpm_data, "small/layout.xpm" },
+ { 3179, small_layout_xpm_data, "small/tqlayout.xpm" },
{ 3621, small_left_xpm_data, "small/left.xpm" },
{ 1131, small_newform_xpm_data, "small/newform.xpm" },
{ 2434, small_print_xpm_data, "small/print.xpm" },
@@ -10877,12 +10877,12 @@ static struct Embed {
{ 485, small_editcopy_png_data, "small/editcopy.png" },
{ 649, small_editcut_png_data, "small/editcut.png" },
{ 520, small_editgrid_png_data, "small/editgrid.png" },
- { 706, small_edithlayout_png_data, "small/edithlayout.png" },
- { 809, small_edithlayoutsplit_png_data, "small/edithlayoutsplit.png" },
+ { 706, small_edithtqlayout_png_data, "small/edithtqlayout.png" },
+ { 809, small_edithtqlayoutsplit_png_data, "small/edithtqlayoutsplit.png" },
{ 902, small_editpaste_png_data, "small/editpaste.png" },
{ 690, small_editslots_png_data, "small/editslots.png" },
- { 289, small_editvlayout_png_data, "small/editvlayout.png" },
- { 355, small_editvlayoutsplit_png_data, "small/editvlayoutsplit.png" },
+ { 289, small_editvtqlayout_png_data, "small/editvtqlayout.png" },
+ { 355, small_editvtqlayoutsplit_png_data, "small/editvtqlayoutsplit.png" },
{ 1408, small_exec_png_data, "small/exec.png" },
{ 313, small_filenew_png_data, "small/filenew.png" },
{ 681, small_fileopen_png_data, "small/fileopen.png" },
@@ -10925,7 +10925,7 @@ static struct Embed {
{ 572, small_undo_png_data, "small/undo.png" },
{ 733, small_disabled_editcut_xpm_data, "small/disabled/editcut.xpm" },
{ 899, small_disabled_editslots_xpm_data, "small/disabled/editslots.xpm" },
- { 931, small_disabled_layout_xpm_data, "small/disabled/layout.xpm" },
+ { 931, small_disabled_layout_xpm_data, "small/disabled/tqlayout.xpm" },
{ 733, small_disabled_left_xpm_data, "small/disabled/left.xpm" },
{ 733, small_disabled_right_xpm_data, "small/disabled/right.xpm" },
{ 659, small_disabled_adjustsize_png_data, "small/disabled/adjustsize.png" },
@@ -10933,11 +10933,11 @@ static struct Embed {
{ 1126, small_disabled_editbreaklayout_png_data, "small/disabled/editbreaklayout.png" },
{ 931, small_disabled_editcopy_png_data, "small/disabled/editcopy.png" },
{ 735, small_disabled_editgrid_png_data, "small/disabled/editgrid.png" },
- { 601, small_disabled_edithlayout_png_data, "small/disabled/edithlayout.png" },
- { 754, small_disabled_edithlayoutsplit_png_data, "small/disabled/edithlayoutsplit.png" },
+ { 601, small_disabled_edithtqlayout_png_data, "small/disabled/edithtqlayout.png" },
+ { 754, small_disabled_edithtqlayoutsplit_png_data, "small/disabled/edithtqlayoutsplit.png" },
{ 901, small_disabled_editpaste_png_data, "small/disabled/editpaste.png" },
- { 617, small_disabled_editvlayout_png_data, "small/disabled/editvlayout.png" },
- { 752, small_disabled_editvlayoutsplit_png_data, "small/disabled/editvlayoutsplit.png" },
+ { 617, small_disabled_editvtqlayout_png_data, "small/disabled/editvtqlayout.png" },
+ { 752, small_disabled_editvtqlayoutsplit_png_data, "small/disabled/editvtqlayoutsplit.png" },
{ 587, small_disabled_filesave_png_data, "small/disabled/filesave.png" },
{ 531, small_disabled_redo_png_data, "small/disabled/redo.png" },
{ 1013, small_disabled_searchfind_png_data, "small/disabled/searchfind.png" },
@@ -10957,7 +10957,7 @@ static struct Embed {
static const TQByteArray& qembed_findData( const char* name )
{
static TQDict<TQByteArray> dict;
- TQByteArray* ba = dict.find( name );
+ TQByteArray* ba = dict.tqfind( name );
if ( !ba ) {
for ( int i = 0; embed_vec[i].data; i++ ) {
if ( strcmp(embed_vec[i].name, name) == 0 ) {
diff --git a/kommander/editor/pixmapchooser.cpp b/kommander/editor/pixmapchooser.cpp
index 92512c68..f0e8ab3a 100644
--- a/kommander/editor/pixmapchooser.cpp
+++ b/kommander/editor/pixmapchooser.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 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
@@ -50,8 +50,8 @@
#if defined(DESIGNER)
#include "pics/images.h"
-#ifdef Q_WS_MACX
-//logo is 40x40 on the mac, if it changes - please notify the Qt/Mac team
+#ifdef TQ_WS_MACX
+//logo is 40x40 on the mac, if it changes - please notify the TQt/Mac team
static const char * const logo_xpm[] = {
"40 40 543 2",
" c None",
@@ -876,8 +876,8 @@ static ImageIconProvider *imageIconProvider = 0;
static PixmapChooser *pixmapChooser = 0;
#endif
-PixmapView::PixmapView( TQWidget *parent )
- : TQScrollView( parent )
+PixmapView::PixmapView( TQWidget *tqparent )
+ : TQScrollView( tqparent )
{
viewport()->setBackgroundMode( PaletteBase );
}
@@ -886,12 +886,12 @@ void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
- viewport()->repaint( false );
+ viewport()->tqrepaint( false );
}
void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
{
- p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) );
+ p->fillRect( cx, cy, cw, ch, tqcolorGroup().brush( TQColorGroup::Base ) );
p->drawPixmap( 0, 0, pixmap );
}
@@ -907,36 +907,36 @@ void PixmapView::previewUrl( const TQUrl &u )
}
}
-TQStringList qChoosePixmaps( TQWidget *parent )
+TQStringList qChoosePixmaps( TQWidget *tqparent )
{
if ( !imageIconProvider && !TQFileDialog::iconProvider() )
TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) );
TQString filter;
- TQString all = qApp->translate( "qChoosePixmap", "All Pixmaps (" );
+ TQString all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" );
for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) {
- filter += qApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
+ filter += tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" ).
arg( TQImageIO::outputFormats().at( i ) ).
arg( "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() );
all += "*." + TQString( TQImageIO::outputFormats().at( i ) ).lower() + ";";
}
- filter.prepend( all + qApp->translate( "qChoosePixmap", ")\n" ) );
- filter += qApp->translate( "qChoosePixmap", "All Files (*)" );
+ filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) );
+ filter += tqApp->translate( "qChoosePixmap", "All Files (*)" );
- TQFileDialog fd( TQString::null, filter, parent, 0, true );
+ TQFileDialog fd( TQString(), filter, tqparent, 0, true );
fd.setMode( TQFileDialog::ExistingFiles );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
fd.setPreviewMode( TQFileDialog::Contents );
- fd.setCaption( qApp->translate( "qChoosePixmap", "Choose Images" ) );
+ fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images" ) );
if ( fd.exec() == TQDialog::Accepted )
return fd.selectedFiles();
return TQStringList();
}
-TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn )
+TQPixmap qChoosePixmap( TQWidget *tqparent, FormWindow *fw, const TQPixmap &old, TQString *fn )
{
#if defined(DESIGNER)
if ( !fw || fw->savePixmapInline() ) {
@@ -955,7 +955,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
filter.prepend( all + ")\n" );
filter += i18n( "All Files (*)" );
- TQFileDialog fd( TQString::null, filter, parent, 0, true );
+ TQFileDialog fd( TQString(), filter, tqparent, 0, true );
fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
@@ -966,13 +966,13 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( fd.selectedFile() );
if ( fn )
*fn = fd.selectedFile();
- MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), fd.selectedFile() );
return pix;
}
}
#ifndef KOMMANDER
else if ( fw && fw->savePixmapInProject() ) {
- PixmapCollectionEditor dia( parent, 0, true );
+ PixmapCollectionEditor dia( tqparent, 0, true );
dia.setProject( fw->project() );
dia.setChooserMode( true );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
@@ -984,27 +984,27 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
}
#endif
else {
- PixmapFunction dia( parent, 0, true );
+ PixmapFunction dia( tqparent, 0, true );
TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
- dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
+ dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) );
dia.editArguments->setFocus();
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( PixmapChooser::loadPixmap( "image.xpm" ) );
- MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() );
return pix;
}
}
#else
- Q_UNUSED( parent );
+ Q_UNUSED( tqparent );
Q_UNUSED( fw );
Q_UNUSED( old );
#endif
return TQPixmap();
}
-ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
- : TQFileIconProvider( parent, name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
+ImageIconProvider::ImageIconProvider( TQWidget *tqparent, const char *name )
+ : TQFileIconProvider( TQT_TQOBJECT(tqparent), name ), imagepm( PixmapChooser::loadPixmap( "image.xpm", PixmapChooser::Mini ) )
{
fmts = TQImage::inputFormats();
}
@@ -1016,7 +1016,7 @@ ImageIconProvider::~ImageIconProvider()
const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi )
{
TQString ext = fi.extension().upper();
- if ( fmts.contains( ext ) ) {
+ if ( fmts.tqcontains( ext ) ) {
return &imagepm;
} else {
return TQFileIconProvider::pixmap( fi );
diff --git a/kommander/editor/pixmapchooser.h b/kommander/editor/pixmapchooser.h
index fe54942e..48c947a7 100644
--- a/kommander/editor/pixmapchooser.h
+++ b/kommander/editor/pixmapchooser.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -29,12 +29,13 @@
class FormWindow;
class PixmapView : public TQScrollView,
- public QFilePreview
+ public TQFilePreview
{
Q_OBJECT
+ TQ_OBJECT
public:
- PixmapView( TQWidget *parent );
+ PixmapView( TQWidget *tqparent );
void setPixmap( const TQPixmap &pix );
void drawContents( TQPainter *p, int, int, int, int );
void previewUrl( const TQUrl &u );
@@ -44,12 +45,13 @@ private:
};
-class ImageIconProvider : public QFileIconProvider
+class ImageIconProvider : public TQFileIconProvider
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImageIconProvider( TQWidget *parent = 0, const char *name = 0 );
+ ImageIconProvider( TQWidget *tqparent = 0, const char *name = 0 );
~ImageIconProvider();
const TQPixmap *pixmap( const TQFileInfo &fi );
@@ -60,8 +62,8 @@ private:
};
-TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 );
-TQStringList qChoosePixmaps( TQWidget *parent );
+TQPixmap qChoosePixmap( TQWidget *tqparent, FormWindow *fw = 0, const TQPixmap &old = TQPixmap(), TQString *fn = 0 );
+TQStringList qChoosePixmaps( TQWidget *tqparent );
class PixmapChooser
diff --git a/kommander/editor/pixmapfunction.ui b/kommander/editor/pixmapfunction.ui
index a75869dc..fb2043d2 100644
--- a/kommander/editor/pixmapfunction.ui
+++ b/kommander/editor/pixmapfunction.ui
@@ -19,13 +19,13 @@
**
*********************************************************************</comment>
<widget>
- <class>QDialog</class>
+ <class>TQDialog</class>
<property stdset="1">
<name>name</name>
<cstring>PixmapFunction</cstring>
</property>
<property stdset="1">
- <name>geometry</name>
+ <name>tqgeometry</name>
<rect>
<x>0</x>
<y>0</y>
@@ -51,7 +51,7 @@
<number>6</number>
</property>
<widget>
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel3</cstring>
@@ -66,7 +66,7 @@
</property>
</widget>
<widget>
- <class>QFrame</class>
+ <class>TQFrame</class>
<property stdset="1">
<name>name</name>
<cstring>Frame9</cstring>
@@ -84,10 +84,10 @@
<number>2</number>
</property>
<property>
- <name>layoutMargin</name>
+ <name>tqlayoutMargin</name>
</property>
<property>
- <name>layoutSpacing</name>
+ <name>tqlayoutSpacing</name>
</property>
<hbox>
<property stdset="1">
@@ -99,14 +99,14 @@
<number>0</number>
</property>
<widget>
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>labelFunction</cstring>
</property>
<property stdset="1">
<name>text</name>
- <string>QPixmap(</string>
+ <string>TQPixmap(</string>
</property>
<property stdset="1">
<name>palette</name>
@@ -331,7 +331,7 @@
</property>
</widget>
<widget>
- <class>QLineEdit</class>
+ <class>TQLineEdit</class>
<property stdset="1">
<name>name</name>
<cstring>editArguments</cstring>
@@ -563,7 +563,7 @@
</property>
</widget>
<widget>
- <class>QLabel</class>
+ <class>TQLabel</class>
<property stdset="1">
<name>name</name>
<cstring>TextLabel5</cstring>
@@ -810,7 +810,7 @@
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
@@ -818,7 +818,7 @@
</property>
</spacer>
<widget>
- <class>QLayoutWidget</class>
+ <class>TQLayoutWidget</class>
<property stdset="1">
<name>name</name>
<cstring>Layout3</cstring>
@@ -833,7 +833,7 @@
<number>6</number>
</property>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>helpButton</cstring>
@@ -861,7 +861,7 @@
<enum>Expanding</enum>
</property>
<property>
- <name>sizeHint</name>
+ <name>tqsizeHint</name>
<size>
<width>20</width>
<height>20</height>
@@ -869,7 +869,7 @@
</property>
</spacer>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonOk</cstring>
@@ -888,7 +888,7 @@
</property>
</widget>
<widget>
- <class>QPushButton</class>
+ <class>TQPushButton</class>
<property stdset="1">
<name>name</name>
<cstring>buttonCancel</cstring>
diff --git a/kommander/editor/preferences.ui b/kommander/editor/preferences.ui
index 6bd5dac3..63ac1bb3 100644
--- a/kommander/editor/preferences.ui
+++ b/kommander/editor/preferences.ui
@@ -19,7 +19,7 @@
** not clear to you.
**
*********************************************************************</comment>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>Preferences</cstring>
</property>
@@ -50,11 +50,11 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>pageGeneral</cstring>
</property>
@@ -71,7 +71,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QButtonGroup" row="0" column="0" rowspan="2" colspan="1">
+ <widget class="TQButtonGroup" row="0" column="0" rowspan="2" colspan="1">
<property name="name">
<cstring>ButtonGroup1</cstring>
</property>
@@ -114,7 +114,7 @@
<string>Select a color in the color dialog.</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>radioColor</cstring>
</property>
@@ -131,7 +131,7 @@
<string>Use a background color.</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>radioPixmap</cstring>
</property>
@@ -173,7 +173,7 @@
</widget>
</grid>
</widget>
- <widget class="QCheckBox" row="0" column="1">
+ <widget class="TQCheckBox" row="0" column="1">
<property name="name">
<cstring>checkBoxShowGrid</cstring>
</property>
@@ -190,7 +190,7 @@
<string>&lt;b&gt;Customize the grid appearance for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, all forms show a grid.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QGroupBox" row="1" column="1">
+ <widget class="TQGroupBox" row="1" column="1">
<property name="name">
<cstring>GroupBox1</cstring>
</property>
@@ -210,7 +210,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxGrid</cstring>
</property>
@@ -227,7 +227,7 @@
<string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Snap to Grid&lt;/b&gt; is checked, the widgets snap to the grid using the the X/Y resolution.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout4</cstring>
</property>
@@ -241,7 +241,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QSpinBox" row="0" column="1">
+ <widget class="TQSpinBox" row="0" column="1">
<property name="name">
<cstring>spinGridX</cstring>
</property>
@@ -261,7 +261,7 @@
<string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, a grid is shown on all forms using the X/Y resolution.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QSpinBox" row="1" column="1">
+ <widget class="TQSpinBox" row="1" column="1">
<property name="name">
<cstring>spinGridY</cstring>
</property>
@@ -281,7 +281,7 @@
<string>&lt;b&gt;Customize the grid-settings for all forms.&lt;/b&gt;&lt;p&gt;When &lt;b&gt;Show Grid&lt;/b&gt; is checked, a grid is shown on all forms using the X/Y resolution.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>Label1</cstring>
</property>
@@ -292,7 +292,7 @@
<cstring>spinGridX</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label1_2</cstring>
</property>
@@ -317,7 +317,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -327,7 +327,7 @@
<string>A splash screen is displayed when starting Qt Designer if this option is checked.</string>
</property>
</spacer>
- <widget class="QGroupBox" row="2" column="0">
+ <widget class="TQGroupBox" row="2" column="0">
<property name="name">
<cstring>GroupBox5</cstring>
</property>
@@ -344,7 +344,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxWorkspace</cstring>
</property>
@@ -361,7 +361,7 @@
<string>The current workspace settings will be restored the next time you start Qt Designer if this option is checked.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxSplash</cstring>
</property>
@@ -378,7 +378,7 @@
<string>A splash screen is displayed when starting Qt Designer if this option is checked.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkAutoEdit</cstring>
</property>
@@ -389,7 +389,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>Label3</cstring>
</property>
@@ -400,7 +400,7 @@
<cstring>editDocPath</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -414,7 +414,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>editDocPath</cstring>
</property>
@@ -422,7 +422,7 @@
<string>&lt;b&gt;Enter the path to the documentation.&lt;/b&gt;&lt;p&gt;You may provide an $environment variable as the first part of the pathname.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QToolButton">
+ <widget class="TQToolButton">
<property name="name">
<cstring>buttonDocPath</cstring>
</property>
@@ -443,7 +443,7 @@
</widget>
</vbox>
</widget>
- <widget class="QGroupBox" row="2" column="1">
+ <widget class="TQGroupBox" row="2" column="1">
<property name="name">
<cstring>GroupBox3</cstring>
</property>
@@ -460,7 +460,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxBigIcons</cstring>
</property>
@@ -474,7 +474,7 @@
<string>Big icons will be used in the toolbars if this is checked.</string>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>checkBoxTextLabels</cstring>
</property>
@@ -493,7 +493,7 @@
</grid>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -507,7 +507,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>helpButton</cstring>
</property>
@@ -528,14 +528,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -552,7 +552,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
diff --git a/kommander/editor/previewframe.cpp b/kommander/editor/previewframe.cpp
index 3be0c2ae..53f35670 100644
--- a/kommander/editor/previewframe.cpp
+++ b/kommander/editor/previewframe.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -23,15 +23,15 @@
#include "previewframe.h"
-PreviewFrame::PreviewFrame( TQWidget *parent, const char *name )
- : TQVBox( parent, name )
+PreviewFrame::PreviewFrame( TQWidget *tqparent, const char *name )
+ : TQVBox( tqparent, name )
{
setMinimumSize(200, 200);
setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken);
setLineWidth(1);
PreviewWorkspace * w = new PreviewWorkspace( this );
- w->setEraseColor(colorGroup().dark());
+ w->setEraseColor(tqcolorGroup().dark());
previewWidget = new PreviewWidget( w );
previewWidget->move( 10, 10 );
}
diff --git a/kommander/editor/previewframe.h b/kommander/editor/previewframe.h
index 21ecd9a7..6447f005 100644
--- a/kommander/editor/previewframe.h
+++ b/kommander/editor/previewframe.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -26,24 +26,26 @@
#include "previewwidgetimpl.h"
-class PreviewWorkspace : public QWorkspace
+class PreviewWorkspace : public TQWorkspace
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 )
- : TQWorkspace( parent, name ) {}
+ PreviewWorkspace( TQWidget* tqparent = 0, const char* name = 0 )
+ : TQWorkspace( tqparent, name ) {}
~PreviewWorkspace() {}
protected:
void paintEvent( TQPaintEvent* );
};
-class PreviewFrame : public QVBox
+class PreviewFrame : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewFrame( TQWidget *parent = 0, const char *name = 0 );
+ PreviewFrame( TQWidget *tqparent = 0, const char *name = 0 );
void setPreviewPalette(TQPalette);
private:
diff --git a/kommander/editor/previewwidget.ui b/kommander/editor/previewwidget.ui
index 317313cf..6c93d75d 100644
--- a/kommander/editor/previewwidget.ui
+++ b/kommander/editor/previewwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>PreviewWidgetBase</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PreviewWidgetBase</cstring>
</property>
@@ -31,7 +31,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout17</cstring>
</property>
@@ -59,7 +59,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>ButtonGroup1</cstring>
</property>
@@ -76,7 +76,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>RadioButton1</cstring>
</property>
@@ -87,7 +87,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>RadioButton2</cstring>
</property>
@@ -95,7 +95,7 @@
<string>RadioButton2</string>
</property>
</widget>
- <widget class="QRadioButton">
+ <widget class="TQRadioButton">
<property name="name">
<cstring>RadioButton3</cstring>
</property>
@@ -105,7 +105,7 @@
</widget>
</vbox>
</widget>
- <widget class="QButtonGroup">
+ <widget class="TQButtonGroup">
<property name="name">
<cstring>ButtonGroup2</cstring>
</property>
@@ -122,7 +122,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>CheckBox1</cstring>
</property>
@@ -133,7 +133,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>CheckBox2</cstring>
</property>
@@ -143,7 +143,7 @@
</widget>
</vbox>
</widget>
- <widget class="QProgressBar">
+ <widget class="TQProgressBar">
<property name="name">
<cstring>ProgressBar1</cstring>
</property>
@@ -153,7 +153,7 @@
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -167,7 +167,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>LineEdit1</cstring>
</property>
@@ -175,7 +175,7 @@
<string>LineEdit</string>
</property>
</widget>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>ComboBox</string>
@@ -185,7 +185,7 @@
<cstring>ComboBox1</cstring>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout13</cstring>
</property>
@@ -199,12 +199,12 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>SpinBox1</cstring>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>PushButton1</cstring>
</property>
@@ -214,7 +214,7 @@
</widget>
</hbox>
</widget>
- <widget class="QScrollBar">
+ <widget class="TQScrollBar">
<property name="name">
<cstring>ScrollBar1</cstring>
</property>
@@ -222,7 +222,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QSlider">
+ <widget class="TQSlider">
<property name="name">
<cstring>Slider1</cstring>
</property>
@@ -230,11 +230,11 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QTextView">
+ <widget class="TQTextView">
<property name="name">
<cstring>textView</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>32767</width>
<height>50</height>
@@ -263,7 +263,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
diff --git a/kommander/editor/previewwidgetimpl.cpp b/kommander/editor/previewwidgetimpl.cpp
index 6e9672be..1c6ab9cd 100644
--- a/kommander/editor/previewwidgetimpl.cpp
+++ b/kommander/editor/previewwidgetimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -21,8 +21,8 @@
#include "tqobjectlist.h"
#include "previewwidgetimpl.h"
-PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
- : PreviewWidgetBase( parent, name )
+PreviewWidget::PreviewWidget( TQWidget *tqparent, const char *name )
+ : PreviewWidgetBase( tqparent, name )
{
// install event filter on child widgets
TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
@@ -31,7 +31,7 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
while ((obj = it.current()) != 0) {
++it;
obj->installEventFilter(this);
- ((TQWidget*)obj)->setFocusPolicy(NoFocus);
+ ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus);
}
}
diff --git a/kommander/editor/previewwidgetimpl.h b/kommander/editor/previewwidgetimpl.h
index 37080916..a2b0ef7a 100644
--- a/kommander/editor/previewwidgetimpl.h
+++ b/kommander/editor/previewwidgetimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -26,9 +26,10 @@
class PreviewWidget : public PreviewWidgetBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewWidget( TQWidget *parent = 0, const char *name = 0 );
+ PreviewWidget( TQWidget *tqparent = 0, const char *name = 0 );
void closeEvent(TQCloseEvent *);
bool eventFilter(TQObject *, TQEvent *);
diff --git a/kommander/editor/propertyeditor.cpp b/kommander/editor/propertyeditor.cpp
index aeeaecb1..b0c71147 100644
--- a/kommander/editor/propertyeditor.cpp
+++ b/kommander/editor/propertyeditor.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -105,11 +105,11 @@ static TQStringList getFontList()
fontDataBase = new TQFontDatabase;
qAddPostRoutine( cleanupFontDatabase );
}
- return fontDataBase->families();
+ return fontDataBase->tqfamilies();
}
-class PropertyWhatsThis : public QWhatsThis
+class PropertyWhatsThis : public TQWhatsThis
{
public:
PropertyWhatsThis( PropertyList *l );
@@ -155,7 +155,7 @@ bool PropertyWhatsThis::clicked( const TQString& href )
*/
/*! If this item should be a child of another property item, specify
- \a prop as the parent item.
+ \a prop as the tqparent item.
*/
PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
@@ -172,7 +172,7 @@ PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *
PropertyItem::~PropertyItem()
{
if ( resetButton )
- delete resetButton->parentWidget();
+ delete resetButton->tqparentWidget();
resetButton = 0;
}
@@ -222,8 +222,8 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
{
TQColorGroup g( cg );
g.setColor( TQColorGroup::Base, backgroundColor() );
- g.setColor( TQColorGroup::Foreground, Qt::black );
- g.setColor( TQColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Foreground, TQt::black );
+ g.setColor( TQColorGroup::Text, TQt::black );
int indent = 0;
if ( column == 0 ) {
indent = 20 + ( property ? 20 : 0 );
@@ -282,7 +282,7 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg,
void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r )
{
p->save();
- TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg,
+ TQApplication::tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg,
TQStyle::Style_Sunken, TQStyleOption(1,1) );
p->restore();
}
@@ -296,7 +296,7 @@ bool PropertyItem::hasSubItems() const
return false;
}
-/*! Returns the parent property item here if this is a child or 0
+/*! Returns the tqparent property item here if this is a child or 0
otherwise.
*/
@@ -317,17 +317,17 @@ void PropertyItem::setOpen( bool b )
open = b;
if ( !open ) {
- children.setAutoDelete( true );
- children.clear();
- children.setAutoDelete( false );
- qApp->processEvents();
+ tqchildren.setAutoDelete( true );
+ tqchildren.clear();
+ tqchildren.setAutoDelete( false );
+ tqApp->processEvents();
listview->updateEditorSize();
return;
}
createChildren();
initChildren();
- qApp->processEvents();
+ tqApp->processEvents();
listview->updateEditorSize();
}
@@ -337,7 +337,7 @@ void PropertyItem::setOpen( bool b )
void PropertyItem::showEditor()
{
createResetButton();
- resetButton->parentWidget()->show();
+ resetButton->tqparentWidget()->show();
}
/*! Subclasses have to hide the editor of the item here
@@ -346,7 +346,7 @@ void PropertyItem::showEditor()
void PropertyItem::hideEditor()
{
createResetButton();
- resetButton->parentWidget()->hide();
+ resetButton->tqparentWidget()->hide();
}
/*! This is called to init the value of the item. Reimplement in
@@ -375,7 +375,7 @@ void PropertyItem::setChanged( bool b, bool updateDb )
if ( changed == b )
return;
changed = b;
- repaint();
+ tqrepaint();
if ( updateDb )
MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed );
updateResetButtonState();
@@ -389,7 +389,7 @@ TQString PropertyItem::name() const
void PropertyItem::createResetButton()
{
if ( resetButton ) {
- resetButton->parentWidget()->lower();
+ resetButton->tqparentWidget()->lower();
return;
}
TQHBox *hbox = new TQHBox( listview->viewport() );
@@ -397,8 +397,8 @@ void PropertyItem::createResetButton()
hbox->setLineWidth( 1 );
resetButton = new TQPushButton( hbox );
resetButton->setPixmap( PixmapChooser::loadPixmap( "resetproperty.xpm", PixmapChooser::Mini ) );
- resetButton->setFixedWidth( resetButton->sizeHint().width() );
- hbox->layout()->setAlignment( Qt::AlignRight );
+ resetButton->setFixedWidth( resetButton->tqsizeHint().width() );
+ hbox->tqlayout()->tqsetAlignment( TQt::AlignRight );
listview->addChild( hbox );
hbox->hide();
TQObject::connect( resetButton, TQT_SIGNAL( clicked() ),
@@ -425,13 +425,13 @@ void PropertyItem::updateResetButtonState()
void PropertyItem::placeEditor( TQWidget *w )
{
createResetButton();
- TQRect r = listview->itemRect( this );
+ TQRect r = listview->tqitemRect( this );
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
-#if defined(Q_WS_WIN)
- listview->repaintContents( false );
+#if defined(TQ_WS_WIN)
+ listview->tqrepaintContents( false );
#endif
- r = listview->itemRect( this );
+ r = listview->tqitemRect( this );
}
r.setX( listview->header()->sectionPos( 1 ) );
r.setWidth( listview->header()->sectionSize( 1 ) - 1 );
@@ -439,8 +439,8 @@ void PropertyItem::placeEditor( TQWidget *w )
r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() );
w->resize( r.size() );
listview->moveChild( w, r.x(), r.y() );
- resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() );
- listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() );
+ resetButton->tqparentWidget()->resize( resetButton->tqsizeHint().width() + 10, r.height() );
+ listview->moveChild( resetButton->tqparentWidget(), r.x() + r.width() - 8, r.y() );
resetButton->setFixedHeight( r.height() - 3 );
}
@@ -475,18 +475,18 @@ void PropertyItem::childValueChanged( PropertyItem * )
void PropertyItem::addChild( PropertyItem *i )
{
- children.append( i );
+ tqchildren.append( i );
}
int PropertyItem::childCount() const
{
- return children.count();
+ return tqchildren.count();
}
PropertyItem *PropertyItem::child( int i ) const
{
// ARRRRRRRRG
- return ( (PropertyItem*)this )->children.at( i );
+ return ( (PropertyItem*)this )->tqchildren.at( i );
}
/*! If the contents of the item is not displayable with a text, but
@@ -509,7 +509,7 @@ void PropertyItem::drawCustomContents( TQPainter *, const TQRect & )
TQString PropertyItem::currentItem() const
{
- return TQString::null;
+ return TQString();
}
int PropertyItem::currentIntItem() const
@@ -532,15 +532,15 @@ int PropertyItem::currentIntItemFromObject() const
TQString PropertyItem::currentItemFromObject() const
{
- return TQString::null;
+ return TQString();
}
void PropertyItem::setFocus( TQWidget *w )
{
- if ( !qApp->focusWidget() ||
+ if ( !tqApp->tqfocusWidget() ||
listview->propertyEditor()->formWindow() &&
- ( !MainWindow::self->isAFormWindowChild( qApp->focusWidget() ) &&
- !qApp->focusWidget()->inherits( "Editor" ) ) )
+ ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->tqfocusWidget()) ) &&
+ !tqApp->tqfocusWidget()->inherits( "Editor" ) ) )
w->setFocus();
}
@@ -548,7 +548,7 @@ void PropertyItem::setText( int col, const TQString &t )
{
TQString txt( t );
if ( col == 1 )
- txt = txt.replace( TQRegExp( "\n" ), " " );
+ txt = txt.tqreplace( TQRegExp( "\n" ), " " );
TQListViewItem::setText( col, txt );
}
@@ -582,13 +582,13 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" )
- lin->setValidator( new AsciiValidator( lin, "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( TQT_TQOBJECT(lin), "ascii_validator" ) );
else
lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
"\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9"
"\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3"
"\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc"
- "\xbd\xbe\xbf"), lin, "ascii_validator" ) );
+ "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) );
} if ( !hasMultiLines ) {
lin->hide();
} else {
@@ -762,7 +762,7 @@ TQLineEdit *PropertyDoubleItem::lined()
if ( lin )
return lin;
lin = new TQLineEdit( listview->viewport() );
- lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
+ lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) );
connect( lin, TQT_SIGNAL( returnPressed() ),
this, TQT_SLOT( setValue() ) );
@@ -837,11 +837,11 @@ PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, Proper
lin = 0;
}
-QDateEdit *PropertyDateItem::lined()
+TQDateEdit *PropertyDateItem::lined()
{
if ( lin )
return lin;
- lin = new QDateEdit( listview->viewport() );
+ lin = new TQDateEdit( listview->viewport() );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
@@ -853,7 +853,7 @@ QDateEdit *PropertyDateItem::lined()
PropertyDateItem::~PropertyDateItem()
{
- delete (QDateEdit*)lin;
+ delete (TQDateEdit*)lin;
lin = 0;
}
@@ -912,11 +912,11 @@ PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, Proper
lin = 0;
}
-QTimeEdit *PropertyTimeItem::lined()
+TQTimeEdit *PropertyTimeItem::lined()
{
if ( lin )
return lin;
- lin = new QTimeEdit( listview->viewport() );
+ lin = new TQTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
@@ -928,7 +928,7 @@ QTimeEdit *PropertyTimeItem::lined()
PropertyTimeItem::~PropertyTimeItem()
{
- delete (QTimeEdit*)lin;
+ delete (TQTimeEdit*)lin;
lin = 0;
}
@@ -987,11 +987,11 @@ PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after
lin = 0;
}
-QDateTimeEdit *PropertyDateTimeItem::lined()
+TQDateTimeEdit *PropertyDateTimeItem::lined()
{
if ( lin )
return lin;
- lin = new QDateTimeEdit( listview->viewport() );
+ lin = new TQDateTimeEdit( listview->viewport() );
connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
this, TQT_SLOT( setValue() ) );
TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
@@ -1003,7 +1003,7 @@ QDateTimeEdit *PropertyDateTimeItem::lined()
PropertyDateTimeItem::~PropertyDateTimeItem()
{
- delete (QDateTimeEdit*)lin;
+ delete (TQDateTimeEdit*)lin;
lin = 0;
}
@@ -1540,8 +1540,8 @@ PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, Pr
box = new TQHBox( listview->viewport() );
box->hide();
pixPrev = new TQLabel( box );
- pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) );
- pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) );
+ pixPrev->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Minimum ) );
+ pixPrev->setBackgroundColor( pixPrev->tqcolorGroup().color( TQColorGroup::Base ) );
button = new TQPushButton( "...", box );
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
@@ -1580,7 +1580,7 @@ void PropertyPixmapItem::setValue( const TQVariant &v )
else
pixPrev->setPixmap( v.toIconSet().pixmap() );
PropertyItem::setValue( v );
- repaint();
+ tqrepaint();
}
void PropertyPixmapItem::getPixmap()
@@ -1605,8 +1605,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
TQPixmap pix( (!iconSet ? value().toPixmap() : value().toIconSet().pixmap()) );
if ( !pix.isNull() ) {
p->save();
- p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
- (int)(p->worldMatrix().dy() + r.y()) ),
+ p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()),
+ (int)(p->tqworldMatrix().dy() + r.y()) ),
r.size() ) );
p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix );
p->restore();
@@ -1617,8 +1617,8 @@ void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
// --------------------------------------------------------------
PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const TQString &propName, bool children )
- : PropertyItem( l, after, prop, propName ), withChildren( children )
+ const TQString &propName, bool tqchildren )
+ : PropertyItem( l, after, prop, propName ), withChildren( tqchildren )
{
box = new TQHBox( listview->viewport() );
box->hide();
@@ -1834,7 +1834,7 @@ void PropertyFontItem::setValue( const TQVariant &v )
void PropertyFontItem::getFont()
{
bool ok = false;
- TQFont f = QFontDialog::getFont( &ok, val.toFont(), listview );
+ TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
notifyValueChange();
@@ -1901,7 +1901,7 @@ void PropertyDatabaseItem::createChildren()
void PropertyDatabaseItem::initChildren()
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
PropertyItem *item = 0;
TQStringList lst = value().toStringList();
TQString conn, table;
@@ -2003,7 +2003,7 @@ bool PropertyDatabaseItem::hasSubItems() const
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
{
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
TQStringList lst;
lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem()
<< ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem();
@@ -2112,7 +2112,7 @@ void PropertySizePolicyItem::setValue( const TQVariant &v )
return;
TQString s = TQString( "%1/%2/%2/%2" );
- s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ).
+ s = s.tqarg( size_type_to_string( v.toSizePolicy().horData() ) ).
arg( size_type_to_string( v.toSizePolicy().verData() ) ).
arg( v.toSizePolicy().horStretch() ).
arg( v.toSizePolicy().verStretch() );
@@ -2185,7 +2185,7 @@ void PropertyPaletteItem::setValue( const TQVariant &v )
TQString s;
palettePrev->setPalette( v.toPalette() );
PropertyItem::setValue( v );
- repaint();
+ tqrepaint();
}
void PropertyPaletteItem::getPalette()
@@ -2197,8 +2197,8 @@ void PropertyPaletteItem::getPalette()
if ( w->inherits( TQSCROLLVIEW_OBJECT_NAME_STRING ) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
-#if defined(QT_NON_COMMERCIAL)
- w->backgroundMode(), listview->topLevelWidget(),
+#if defined(TQT_NON_COMMERCIAL)
+ w->backgroundMode(), listview->tqtopLevelWidget(),
#else
w->backgroundMode(), listview,
#endif
@@ -2218,8 +2218,8 @@ void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
{
TQPalette pal( value().toPalette() );
p->save();
- p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()),
- (int)(p->worldMatrix().dy() + r.y()) ),
+ p->setClipRect( TQRect( TQPoint( (int)(p->tqworldMatrix().dx() + r.x()),
+ (int)(p->tqworldMatrix().dy() + r.y()) ),
r.size() ) );
TQRect r2( r );
r2.setX( r2.x() + 2 );
@@ -2271,11 +2271,11 @@ TQComboBox *PropertyCursorItem::combo()
cur = TQBitmap(sizev_width, sizev_height, sizev_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Vertical"), TQObject::SizeVerCursor );
+ comb->insertItem( cur, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor );
cur = TQBitmap(sizeh_width, sizeh_height, sizeh_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Size Horizontal"), TQObject::SizeHorCursor );
+ comb->insertItem( cur, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor );
cur = TQBitmap(sizef_width, sizef_height, sizef_bits, true);
cur.setMask( cur );
@@ -2295,11 +2295,11 @@ TQComboBox *PropertyCursorItem::combo()
cur = TQBitmap(vsplit_width, vsplit_height, vsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Vertical"), TQObject::SplitVCursor );
+ comb->insertItem( cur, i18n("SplitQt::Vertical"), TQObject::SplitVCursor );
cur = TQBitmap(hsplit_width, hsplit_height, hsplit_bits, true);
cur.setMask( cur );
- comb->insertItem( cur, i18n("Split Horizontal"), TQObject::SplitHCursor );
+ comb->insertItem( cur, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor );
cur = TQBitmap(hand_width, hand_height, hand_bits, true);
cur.setMask( cur );
@@ -2325,7 +2325,7 @@ void PropertyCursorItem::showEditor()
PropertyItem::showEditor();
if ( !comb ) {
combo()->blockSignals( true );
- combo()->setCurrentItem( (int)value().toCursor().shape() );
+ combo()->setCurrentItem( (int)value().toCursor().tqshape() );
combo()->blockSignals( false );
}
placeEditor( combo() );
@@ -2348,7 +2348,7 @@ void PropertyCursorItem::setValue( const TQVariant &v )
return;
combo()->blockSignals( true );
- combo()->setCurrentItem( (int)v.toCursor().shape() );
+ combo()->setCurrentItem( (int)v.toCursor().tqshape() );
combo()->blockSignals( false );
setText( 1, combo()->currentText() );
PropertyItem::setValue( v );
@@ -2461,9 +2461,9 @@ static TQVariant::Type type_to_variant( const TQString &s )
if ( s == "Palette" )
return TQVariant::Palette;
if ( s == "ColorGroup" )
- return TQVariant::ColorGroup;
+ return (QVariant::Type)TQVariant::ColorGroup;
if ( s == "IconSet" )
- return TQVariant::IconSet;
+ return (QVariant::Type)TQVariant::IconSet;
if ( s == "Point" )
return TQVariant::Point;
if ( s == "Image" )
@@ -2477,11 +2477,11 @@ static TQVariant::Type type_to_variant( const TQString &s )
if ( s == "Double" )
return TQVariant::Double;
if ( s == "CString" )
- return TQVariant::CString;
+ return (QVariant::Type)TQVariant::CString;
if ( s == "PointArray" )
- return TQVariant::PointArray;
+ return (QVariant::Type)TQVariant::PointArray;
if ( s == "Region" )
- return TQVariant::Region;
+ return (QVariant::Type)TQVariant::Region;
if ( s == "Bitmap" )
return TQVariant::Bitmap;
if ( s == "Cursor" )
@@ -2497,17 +2497,17 @@ static TQVariant::Type type_to_variant( const TQString &s )
return TQVariant::Invalid;
}
-#ifndef QT_NO_SQL
-static bool parent_is_data_aware( TQObject *o )
+#ifndef TQT_NO_SQL
+static bool tqparent_is_data_aware( TQObject *o )
{
if ( !o->inherits( TQWIDGET_OBJECT_NAME_STRING ) )
return false;
TQWidget *w = (TQWidget*)o;
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
while ( p && !p->isTopLevel() ) {
- if ( p->inherits( "QDesignerDataBrowser" ) || p->inherits( "QDesignerDataView" ) )
+ if ( p->inherits( "TQDesignerDataBrowser" ) || p->inherits( "TQDesignerDataView" ) )
return true;
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
return false;
}
@@ -2522,24 +2522,24 @@ void PropertyList::setupProperties()
if ( !editor->widget() )
return;
bool allProperties = !editor->widget()->inherits( "Spacer" );
- TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
+ TQStrList lst = editor->widget()->tqmetaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
TQMap<TQString, bool> unique;
TQObject *w = editor->widget();
TQStringList valueSet;
- bool parentHasLayout =
+ bool tqparentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( (TQWidget*)w ) && ( (TQWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ !editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)w) ) && ( (TQWidget*)w )->tqparentWidget() &&
+ WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
- editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties );
+ editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( it.current(), allProperties), allProperties );
if ( !p )
continue;
- if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
+ if ( unique.tqcontains( TQString::tqfromLatin1( it.current() ) ) )
continue;
- if ( editor->widget()->inherits( "QDesignerToolBar" ) || editor->widget()->inherits( "QDesignerMenuBar" ) ) {
+ if ( editor->widget()->inherits( "TQDesignerToolBar" ) || editor->widget()->inherits( "TQDesignerMenuBar" ) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@@ -2552,14 +2552,14 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 )
continue;
}
- unique.insert( TQString::fromLatin1( it.current() ), true );
+ unique.insert( TQString::tqfromLatin1( it.current() ), true );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( (TQWidget*)editor->widget() ) ) {
+ editor->formWindow()->isMainContainer( TQT_TQOBJECT((TQWidget*)editor->widget()) ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -2573,9 +2573,9 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "baseSize" ) == 0 )
continue;
- if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
+ if ( tqparentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( w->inherits( "QLayoutWidget" ) || w->inherits( "Spacer" ) ) {
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) || w->inherits( "Spacer" ) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -2588,9 +2588,9 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "minimumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqminimumSize" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
+ if ( qstrcmp( p->name(), "tqmaximumSize" ) == 0 )
continue;
if ( qstrcmp( p->name(), "enabled" ) == 0 )
continue;
@@ -2632,17 +2632,17 @@ void PropertyList::setupProperties()
continue;
if ( qstrcmp( p->name(), "maximumWidth" ) == 0 )
continue;
- if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in Q_PROPERTY can take a function (isInButtonGroup() in this case)
+ if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case)
if ( !editor->widget()->isWidgetType() ||
- !editor->widget()->parent() ||
- !editor->widget()->parent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
+ !editor->widget()->tqparent() ||
+ !editor->widget()->tqparent()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) )
continue;
}
if ( p->designable(w) ) {
if ( p->isSetType() ) {
- if ( TQString( p->name() ) == "alignment" ) {
+ if ( TQString( p->name() ) == "tqalignment" ) {
TQStringList lst;
lst << p->valueToKey( AlignAuto )
<< p->valueToKey( AlignLeft )
@@ -2672,14 +2672,14 @@ void PropertyList::setupProperties()
item->setChanged( true, false );
}
} else {
- qWarning( "Sets except 'alignment' not supported yet.... %s.", p->name() );
+ qWarning( "Sets except 'tqalignment' not supported yet.... %s.", p->name() );
}
} else if ( p->isEnumType() ) {
TQStrList l = p->enumKeys();
TQStringList lst;
for ( uint i = 0; i < l.count(); ++i ) {
TQString k = l.at( i );
- // filter out enum-masks
+ // filter out enum-tqmasks
if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase )
continue;
lst << l.at( i );
@@ -2693,7 +2693,7 @@ void PropertyList::setupProperties()
}
}
if ( item && !p->isSetType() ) {
- if ( valueSet.findIndex( item->name() ) == -1 ) {
+ if ( valueSet.tqfindIndex( item->name() ) == -1 ) {
setPropertyValue( item );
valueSet << item->name();
}
@@ -2702,19 +2702,19 @@ void PropertyList::setupProperties()
}
}
- if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) &&
- w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
- item = new PropertyIntItem( this, item, 0, "layoutSpacing", true );
+ if ( !w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) && !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) &&
+ w->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
+ item = new PropertyIntItem( this, item, 0, "tqlayoutSpacing", true );
setPropertyValue( item );
item->setChanged( true );
- item = new PropertyIntItem( this, item, 0, "layoutMargin", true );
+ item = new PropertyIntItem( this, item, 0, "tqlayoutMargin", true );
setPropertyValue( item );
item->setChanged( true );
}
- if ( !w->inherits( "Spacer" ) && !w->inherits( "QLayoutWidget" ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
- !w->inherits( "QDesignerMenuBar" ) && !w->inherits( "QDesignerToolBar" ) ) {
+ if ( !w->inherits( "Spacer" ) && !w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) && !w->inherits( TQACTION_OBJECT_NAME_STRING ) &&
+ !w->inherits( "TQDesignerMenuBar" ) && !w->inherits( "TQDesignerToolBar" ) ) {
item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
@@ -2725,9 +2725,9 @@ void PropertyList::setupProperties()
item->setChanged( true, false );
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( !editor->widget()->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !editor->widget()->inherits( TQDATABROWSER_OBJECT_NAME_STRING ) &&
- !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && parent_is_data_aware( editor->widget() ) ) {
+ !editor->widget()->inherits( TQDATAVIEW_OBJECT_NAME_STRING ) && tqparent_is_data_aware( editor->widget() ) ) {
item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
@@ -2750,7 +2750,7 @@ void PropertyList::setupProperties()
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget();
if ( cw ) {
for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
- if ( unique.contains( TQString( (*it).property ) ) )
+ if ( unique.tqcontains( TQString( (*it).property ) ) )
continue;
unique.insert( TQString( (*it).property ), true );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
@@ -2768,7 +2768,7 @@ void PropertyList::setupProperties()
sort();
setSorting( -1 );
setCurrentItem( firstChild() );
- qApp->processEvents();
+ tqApp->processEvents();
}
updateEditorSize();
@@ -2785,7 +2785,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
- editor->widget() == editor->formWindow()->mainContainer(),
+ TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()),
false, true );
break;
case TQVariant::Bool:
@@ -2882,7 +2882,7 @@ void PropertyList::valueChanged( PropertyItem *i )
{
if ( !editor->widget() )
return;
- TQString pn( i18n("Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n("Set '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), WidgetFactory::property( editor->widget(), i->name() ),
@@ -2921,10 +2921,10 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
return true;
PropertyItem *i = (PropertyItem*)currentItem();
- if ( o != this &&e->type() == TQEvent::KeyPress ) {
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
- ( o != this || o != viewport() ) &&
+ ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
return true;
@@ -2946,7 +2946,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
}
} else if ( e->type() == TQEvent::FocusOut && o->inherits( TQLINEEDIT_OBJECT_NAME_STRING ) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
- } else if ( o == viewport() ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
@@ -2961,7 +2961,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
break;
case TQEvent::MouseMove:
me = (TQMouseEvent*)e;
- if ( me && me->state() & LeftButton && mousePressed) {
+ if ( me && me->state() & Qt::LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() );
if( i && i == pressItem ) {
@@ -2996,7 +2996,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
- } else if ( o == header() ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) {
if ( e->type() == TQEvent::ContextMenu ) {
((TQContextMenuEvent *)e)->accept();
TQPopupMenu menu( 0 );
@@ -3048,9 +3048,9 @@ static void clearAlignList( TQStrList &l )
{
if ( l.count() == 1 )
return;
- if ( l.find( "AlignAuto" ) != -1 )
+ if ( l.tqfind( "AlignAuto" ) != -1 )
l.remove( "AlignAuto" );
- if ( l.find( "WordBreak" ) != -1 )
+ if ( l.tqfind( "WordBreak" ) != -1 )
l.remove( "WordBreak" );
}
@@ -3061,33 +3061,33 @@ static void clearAlignList( TQStrList &l )
void PropertyList::setPropertyValue( PropertyItem *i )
{
const TQMetaProperty *p =
- editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( i->name(), true), true );
+ editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( i->name(), true), true );
if ( !p ) {
if ( i->name() == "hAlign" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
- p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ int align = editor->widget()->property( "tqalignment" ).toInt();
+ p = editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true );
align &= ~AlignVertical_Mask;
TQStrList l = p->valueToKeys( align );
clearAlignList( l );
( (PropertyListItem*)i )->setCurrentItem( l.last() );
} else if ( i->name() == "vAlign" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
- p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
+ int align = editor->widget()->property( "tqalignment" ).toInt();
+ p = editor->widget()->tqmetaObject()->
+ property( editor->widget()->tqmetaObject()->tqfindProperty( "tqalignment", true ), true );
align &= ~AlignHorizontal_Mask;
( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() );
} else if ( i->name() == "wordwrap" ) {
- int align = editor->widget()->property( "alignment" ).toInt();
+ int align = editor->widget()->property( "tqalignment" ).toInt();
if ( align & WordBreak )
i->setValue( TQVariant( true, 0 ) );
else
i->setValue( TQVariant( false, 0 ) );
- } else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
- } else if ( i->name() == "layoutMargin" ) {
- ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() ) ) );
+ } else if ( i->name() == "tqlayoutSpacing" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
+ } else if ( i->name() == "tqlayoutMargin" ) {
+ ( (PropertyIntItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( (TQWidget*)editor->widget() )) ) );
} else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) {
i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) );
} else if ( editor->widget()->inherits( "CustomWidget" ) ) {
@@ -3134,7 +3134,7 @@ void PropertyList::resetProperty()
PropertyItem *i = (PropertyItem*)currentItem();
if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) )
return;
- TQString pn( i18n("Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) );
+ TQString pn( i18n("Reset '%1' of '%2'" ).tqarg( i->name() ).tqarg( editor->widget()->name() ) );
SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(),
editor->widget(), editor,
i->name(), i->value(),
@@ -3224,24 +3224,24 @@ void PropertyList::showCurrentWhatsThis()
TQString PropertyList::whatsThisText( TQListViewItem *i )
{
if ( !i || !editor->widget() )
- return TQString::null;
+ return TQString();
readPropertyDocs();
if ( ( (PropertyItem*)i )->propertyParent() )
i = ( (PropertyItem*)i )->propertyParent();
- const TQMetaObject *mo = editor->widget()->metaObject();
+ const TQMetaObject *mo = editor->widget()->tqmetaObject();
TQString prop = ( (PropertyItem*)i )->name();
while ( mo ) {
TQString s;
s = TQString( mo->className() ) + "::" + prop;
TQMap<TQString, TQString>::Iterator it;
- if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) {
+ if ( ( it = propertyDocs.tqfind( s ) ) != propertyDocs.end() ) {
return *it;
}
- mo = mo->superClass();
+ mo = mo->tqsuperClass();
}
- return i18n("<p><b>TQWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).arg( prop );
+ return i18n("<p><b>TQWidget::%1</b></p><p>There is no documentation available for this property.</p>" ).tqarg( prop );
}
void PropertyList::readPropertyDocs()
@@ -3278,8 +3278,8 @@ void PropertyList::readPropertyDocs()
// ------------------------------------------------------------
#ifndef KOMMANDER
-EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
- : HierarchyList( parent, fw, true ), editor( e )
+EventList::EventList( TQWidget *tqparent, FormWindow *fw, PropertyEditor *e )
+ : HierarchyList( tqparent, fw, true ), editor( e )
{
header()->hide();
removeColumn( 1 );
@@ -3307,7 +3307,7 @@ void EventList::setup()
return;
for ( TQValueList<MetaDataBase::EventDescription>::Iterator it = events.begin(); it != events.end(); ++it ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (*it).name,
- TQString::null, TQString::null );
+ TQString(), TQString() );
eventItem->setOpen( true );
TQStringList funcs = MetaDataBase::eventFunctions( editor->widget(),
(*it).name,
@@ -3318,7 +3318,7 @@ void EventList::setup()
#endif
for ( TQStringList::Iterator fit = funcs.begin(); fit != funcs.end(); ++fit ) {
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- *fit, TQString::null, TQString::null );
+ *fit, TQString(), TQString() );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
#if 0 // ### for conversation from old to new
@@ -3327,12 +3327,12 @@ void EventList::setup()
#endif
}
} else {
- TQStrList sigs = editor->widget()->metaObject()->signalNames( true );
+ TQStrList sigs = editor->widget()->tqmetaObject()->signalNames( true );
sigs.remove( "destroyed()" );
TQStrListIterator it( sigs );
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this,
- it.current(), TQString::null, TQString::null );
+ it.current(), TQString(), TQString() );
eventItem->setOpen( true );
TQValueList<MetaDataBase::Connection> conns =
MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
@@ -3341,7 +3341,7 @@ void EventList::setup()
MetaDataBase::normalizeSlot( TQString( it.current() ) ) )
continue;
HierarchyItem *item = new HierarchyItem( HierarchyItem::EventFunction, eventItem,
- (*cit).slot, TQString::null, TQString::null );
+ (*cit).slot, TQString(), TQString() );
item->setPixmap( 0, PixmapChooser::loadPixmap( "editslots.xpm" ) );
}
++it;
@@ -3354,7 +3354,7 @@ extern TQListViewItem *newItem;
void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
{
TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) );
- if ( !i || i->parent() )
+ if ( !i || i->tqparent() )
return;
TQString s;
#ifndef KOMMANDER
@@ -3363,7 +3363,7 @@ void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e )
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
TQString s1 = i->text( 0 );
- int pt = s1.find( "(" );
+ int pt = s1.tqfind( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
s = TQString( editor->widget()->name() ) + "_" + s1;
@@ -3380,7 +3380,7 @@ void EventList::setCurrent( TQWidget * )
void EventList::objectClicked( TQListViewItem *i )
{
- if ( !i || !i->parent() )
+ if ( !i || !i->tqparent() )
return;
formWindow->mainWindow()->editFunction( i->text( 0 ) );
}
@@ -3402,29 +3402,29 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 );
- int pt = s1.find( "(" );
+ TQString s1 = ( i->tqparent() ? i->tqparent() : i )->text( 0 );
+ int pt = s1.tqfind( "(" );
if ( pt != -1 )
s1 = s1.left( pt );
s = TQString( editor->widget()->name() ) + "_" + s1;
} else {
- s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 );
+ s = TQString( editor->widget()->name() ) + "_" + ( i->tqparent() ? i->tqparent() : i )->text( 0 );
}
- insertEntry( i->parent() ? i->parent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
- } else if ( res == DEL_ITEM && i->parent() ) {
+ insertEntry( i->tqparent() ? i->tqparent() : i, PixmapChooser::loadPixmap( "editslots.xpm" ), s );
+ } else if ( res == DEL_ITEM && i->tqparent() ) {
#ifndef KOMMANDER
if ( MetaDataBase::hasEvents( formWindow->project()->language() ) ) {
#else
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- TQListViewItem *p = i->parent();
+ TQListViewItem *p = i->tqparent();
delete i;
save( p );
} else {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = formWindow->mainContainer();
- conn.signal = i->parent()->text( 0 );
+ conn.signal = i->tqparent()->text( 0 );
conn.slot = i->text( 0 );
delete i;
RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n("Remove Connection" ),
@@ -3443,9 +3443,9 @@ void EventList::renamed( TQListViewItem *i )
{
if ( newItem == i )
newItem = 0;
- if ( !i->parent() )
+ if ( !i->tqparent() )
return;
- TQListViewItem *itm = i->parent()->firstChild();
+ TQListViewItem *itm = i->tqparent()->firstChild();
bool del = false;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
@@ -3464,7 +3464,7 @@ void EventList::renamed( TQListViewItem *i )
if ( MetaDataBase::hasEvents( "C++" ) ) {
#endif
- save( i->parent() );
+ save( i->tqparent() );
editor->formWindow()->mainWindow()->
#ifndef KOMMANDER
editFunction( i->text( 0 ), editor->formWindow()->project()->language(), true );
@@ -3475,7 +3475,7 @@ void EventList::renamed( TQListViewItem *i )
MetaDataBase::Connection conn;
conn.sender = editor->widget();
conn.receiver = formWindow->mainContainer();
- conn.signal = i->parent()->text( 0 );
+ conn.signal = i->tqparent()->text( 0 );
conn.slot = i->text( 0 );
AddConnectionCommand *cmd = new AddConnectionCommand( i18n("Add Connection" ),
formWindow,
@@ -3491,7 +3491,7 @@ void EventList::renamed( TQListViewItem *i )
"C++", "void" );
#endif
editor->formWindow()->mainWindow()->
- editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ),
+ editFunction( i->text( 0 ).left( i->text( 0 ).tqfind( "(" ) ),
#ifndef KOMMANDER
editor->formWindow()->project()->language(), true );
#else
@@ -3535,8 +3535,8 @@ void EventList::save( TQListViewItem *p )
listview for editing properties.
*/
-PropertyEditor::PropertyEditor( TQWidget *parent )
- : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+PropertyEditor::PropertyEditor( TQWidget *tqparent )
+ : TQTabWidget( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu )
{
setCaption( i18n("Property Editor" ) );
@@ -3563,11 +3563,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
#endif
if ( w && w == wid ) {
bool ret = true;
- if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
+ if ( wid->isWidgetType() && WidgetFactory::tqlayoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
TQListViewItemIterator it( listview );
ret = false;
while ( it.current() ) {
- if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
+ if ( it.current()->text( 0 ) == "tqlayoutSpacing" || it.current()->text( 0 ) == "tqlayoutMargin" ) {
ret = true;
break;
}
@@ -3588,7 +3588,7 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
wid = w;
formwindow = fw;
- setCaption( i18n("Property Editor (%1)" ).arg( formwindow->name() ) );
+ setCaption( i18n("Property Editor (%1)" ).tqarg( formwindow->name() ) );
listview->viewport()->setUpdatesEnabled( false );
listview->setUpdatesEnabled( false );
clear();
@@ -3662,7 +3662,7 @@ FormWindow *PropertyEditor::formWindow() const
TQString PropertyEditor::currentProperty() const
{
if ( !wid )
- return TQString::null;
+ return TQString();
if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() )
return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name();
return ( (PropertyItem*)listview->currentItem() )->name();
@@ -3671,24 +3671,24 @@ TQString PropertyEditor::currentProperty() const
TQString PropertyEditor::classOfCurrentProperty() const
{
if ( !wid )
- return TQString::null;
+ return TQString();
TQObject *o = wid;
TQString curr = currentProperty();
- TQMetaObject *mo = o->metaObject();
+ TQMetaObject *mo = o->tqmetaObject();
while ( mo ) {
TQStrList props = mo->propertyNames( false );
- if ( props.find( curr.latin1() ) != -1 )
+ if ( props.tqfind( curr.latin1() ) != -1 )
return mo->className();
- mo = mo->superClass();
+ mo = mo->tqsuperClass();
}
- return TQString::null;
+ return TQString();
}
-TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const
+TQMetaObject* PropertyEditor::tqmetaObjectOfCurrentProperty() const
{
if ( !wid )
return 0;
- return wid->metaObject();
+ return wid->tqmetaObject();
}
void PropertyEditor::resetFocus()
diff --git a/kommander/editor/propertyeditor.h b/kommander/editor/propertyeditor.h
index 42e64e3e..262f0376 100644
--- a/kommander/editor/propertyeditor.h
+++ b/kommander/editor/propertyeditor.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -44,11 +44,11 @@ class FormWindow;
class TQCloseEvent;
class TQResizeEvent;
class PropertyWhatsThis;
-class QDateEdit;
-class QTimeEdit;
-class QDateTimeEdit;
+class TQDateEdit;
+class TQTimeEdit;
+class TQDateTimeEdit;
-class PropertyItem : public QListViewItem
+class PropertyItem : public TQListViewItem
{
public:
PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -118,7 +118,7 @@ private:
bool open, changed;
PropertyItem *property;
TQString propertyName;
- TQPtrList<PropertyItem> children;
+ TQPtrList<PropertyItem> tqchildren;
TQColor backColor;
TQPushButton *resetButton;
@@ -128,6 +128,7 @@ class PropertyTextItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -164,6 +165,7 @@ class PropertyBoolItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -188,6 +190,7 @@ class PropertyIntItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -213,6 +216,7 @@ class PropertyDoubleItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -236,6 +240,7 @@ class PropertyListItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -271,6 +276,7 @@ class PropertyFontItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -300,6 +306,7 @@ class PropertyCoordItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Type { Rect, Size, Point };
@@ -329,10 +336,11 @@ class PropertyColorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const TQString &propName, bool children );
+ const TQString &propName, bool tqchildren );
~PropertyColorItem();
virtual void createChildren();
@@ -363,6 +371,7 @@ class PropertyPixmapItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -393,6 +402,7 @@ class PropertySizePolicyItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -419,6 +429,7 @@ class PropertyPaletteItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -447,6 +458,7 @@ class PropertyCursorItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
@@ -472,6 +484,7 @@ class PropertyDatabaseItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName, bool wField );
@@ -495,9 +508,10 @@ private:
};
-class PropertyList : public QListView
+class PropertyList : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyList( PropertyEditor *e );
@@ -550,12 +564,13 @@ private:
};
-class PropertyEditor : public QTabWidget
+class PropertyEditor : public TQTabWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PropertyEditor( TQWidget *parent );
+ PropertyEditor( TQWidget *tqparent );
TQObject *widget() const;
@@ -575,7 +590,7 @@ public:
TQString currentProperty() const;
TQString classOfCurrentProperty() const;
- TQMetaObject* metaObjectOfCurrentProperty() const;
+ TQMetaObject* tqmetaObjectOfCurrentProperty() const;
void resetFocus();
@@ -602,6 +617,7 @@ class PropertyDateItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -616,8 +632,8 @@ private slots:
void setValue();
private:
- QDateEdit *lined();
- TQGuardedPtr<QDateEdit> lin;
+ TQDateEdit *lined();
+ TQGuardedPtr<TQDateEdit> lin;
};
@@ -625,6 +641,7 @@ class PropertyTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -639,8 +656,8 @@ private slots:
void setValue();
private:
- QTimeEdit *lined();
- TQGuardedPtr<QTimeEdit> lin;
+ TQTimeEdit *lined();
+ TQGuardedPtr<TQTimeEdit> lin;
};
@@ -648,6 +665,7 @@ class PropertyDateTimeItem : public TQObject,
public PropertyItem
{
Q_OBJECT
+ TQ_OBJECT
public:
PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName );
@@ -662,8 +680,8 @@ private slots:
void setValue();
private:
- QDateTimeEdit *lined();
- TQGuardedPtr<QDateTimeEdit> lin;
+ TQDateTimeEdit *lined();
+ TQGuardedPtr<TQDateTimeEdit> lin;
};
diff --git a/kommander/editor/qcompletionedit.cpp b/kommander/editor/qcompletionedit.cpp
index 4ba5e366..61d0407e 100644
--- a/kommander/editor/qcompletionedit.cpp
+++ b/kommander/editor/qcompletionedit.cpp
@@ -4,8 +4,8 @@
#include <tqapplication.h>
#include <tqvbox.h>
-QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
- : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
+QCompletionEdit::QCompletionEdit( TQWidget *tqparent, const char *name )
+ : TQLineEdit( tqparent, name ), aAdd( false ), caseSensitive( false )
{
popup = new TQVBox( 0, 0, WType_Popup );
popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
@@ -62,8 +62,8 @@ void QCompletionEdit::placeListBox()
return;
}
- popup->resize( QMAX( listbox->sizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
- listbox->sizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
+ popup->resize( TQMAX( listbox->tqsizeHint().width() + listbox->verticalScrollBar()->width() + 4, width() ),
+ listbox->tqsizeHint().height() + listbox->horizontalScrollBar()->height() + 4 );
TQPoint p( mapToGlobal( TQPoint( 0, 0 ) ) );
if ( p.y() + height() + popup->height() <= TQApplication::desktop()->height() )
@@ -90,7 +90,7 @@ void QCompletionEdit::updateListBox()
bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o == popup || o == listbox || o == listbox->viewport() ) {
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(popup) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox) || TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(listbox->viewport()) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
@@ -133,7 +133,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
emit chosen( text() );
return true;
}
- } else if ( o == this ) {
+ } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||
@@ -154,7 +154,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
void QCompletionEdit::addCompletionEntry( const TQString &entry )
{
- if ( compList.find( entry ) == compList.end() ) {
+ if ( compList.tqfind( entry ) == compList.end() ) {
compList << entry;
compList.sort();
}
@@ -162,7 +162,7 @@ void QCompletionEdit::addCompletionEntry( const TQString &entry )
void QCompletionEdit::removeCompletionEntry( const TQString &entry )
{
- TQStringList::Iterator it = compList.find( entry );
+ TQStringList::Iterator it = compList.tqfind( entry );
if ( it != compList.end() )
compList.remove( it );
}
diff --git a/kommander/editor/qcompletionedit.h b/kommander/editor/qcompletionedit.h
index 169dacb5..4dee6ba5 100644
--- a/kommander/editor/qcompletionedit.h
+++ b/kommander/editor/qcompletionedit.h
@@ -1,5 +1,5 @@
-#ifndef QCOMPLETIONEDIT_H
-#define QCOMPLETIONEDIT_H
+#ifndef TQCOMPLETIONEDIT_H
+#define TQCOMPLETIONEDIT_H
#include <tqlineedit.h>
#include <tqstringlist.h>
@@ -7,14 +7,15 @@
class TQListBox;
class TQVBox;
-class QCompletionEdit : public QLineEdit
+class QCompletionEdit : public TQLineEdit
{
Q_OBJECT
- Q_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
- Q_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
+ TQ_OBJECT
+ TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
+ TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
public:
- QCompletionEdit( TQWidget *parent = 0, const char *name = 0 );
+ QCompletionEdit( TQWidget *tqparent = 0, const char *name = 0 );
bool autoAdd() const;
TQStringList completionList() const;
diff --git a/kommander/editor/resource.cpp b/kommander/editor/resource.cpp
index d1c93cea..02cd1eec 100644
--- a/kommander/editor/resource.cpp
+++ b/kommander/editor/resource.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -27,11 +27,11 @@
#include "tqdom.h"
#include "widgetdatabase.h"
#include "widgetfactory.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "domtool.h"
#include "command.h"
#include "pixmapchooser.h"
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database.h"
#endif
#include "actiondnd.h"
@@ -68,7 +68,7 @@
#include <tqregexp.h>
#include <zlib.h>
#include <tqdatetime.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
@@ -84,12 +84,12 @@ static TQString makeIndent( int indent )
static TQString entitize( const TQString &s, bool attribute = false )
{
TQString s2 = s;
- s2 = s2.replace( TQRegExp( "&" ), "&amp;" );
- s2 = s2.replace( TQRegExp( ">" ), "&gt;" );
- s2 = s2.replace( TQRegExp( "<" ), "&lt;" );
+ s2 = s2.tqreplace( TQRegExp( "&" ), "&amp;" );
+ s2 = s2.tqreplace( TQRegExp( ">" ), "&gt;" );
+ s2 = s2.tqreplace( TQRegExp( "<" ), "&lt;" );
if ( attribute ) {
- s2 = s2.replace( TQRegExp( "\"" ), "&quot;" );
- s2 = s2.replace( TQRegExp( "'" ), "&apos;" );
+ s2 = s2.tqreplace( TQRegExp( "\"" ), "&quot;" );
+ s2 = s2.tqreplace( TQRegExp( "'" ), "&apos;" );
}
return s2;
}
@@ -166,7 +166,7 @@ bool Resource::load( FormFile *ff )
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly );
- bool b = load( ff, &f );
+ bool b = load( ff, TQT_TQIODEVICE(&f) );
f.close();
return b;
@@ -181,7 +181,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
TQString content = stream.read();
if (content.startsWith("#!"))
{
- content = content.mid(content.find('\n'));
+ content = content.mid(content.tqfind('\n'));
}
if ( !doc.setContent( content) ) {
// qDebug( TQString("Parse error: ") + errMsg + TQString(" in line %d"), errLine );
@@ -195,7 +195,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
formwindow->setProject( MainWindow::self->currProject() );
#endif
formwindow->setMainWindow( mainwindow );
- MetaDataBase::addEntry( formwindow );
+ MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) );
#ifndef KOMMANDER
if (!langIface) {
@@ -290,9 +290,9 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
metaInfo.license = e.firstChild().toText().data();
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
- } else if ( e.tagName() == "layoutdefaults" ) {
- formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() );
- formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() );
+ } else if ( e.tagName() == "tqlayoutdefaults" ) {
+ formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->tqlayoutDefaultSpacing() ) ).toInt() );
+ formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->tqlayoutDefaultMargin() ) ).toInt() );
}
e = e.nextSibling().toElement();
@@ -303,13 +303,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
-#if defined (QT_NON_COMMERCIAL)
+#if defined (TQT_NON_COMMERCIAL)
bool previewMode = MainWindow::self->isPreviewing();
TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self);
if ( !w )
return false;
if ( previewMode )
- w->reparent( MainWindow::self, Qt::WType_TopLevel, w->pos(), true );
+ w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), true );
#else
if ( !createObject( widget, formwindow) )
return false;
@@ -364,11 +364,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.slot = n.firstChild().toText().data();
- if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
- MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
+ if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) )
+ MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier,
slot.access, slot.language, slot.returnType );
else
- MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
+ MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot,
slot.specifier, slot.access,
slot.language, slot.returnType );
}
@@ -386,11 +386,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
loadTabOrder( tabOrder );
if ( formwindow ) {
- MetaDataBase::setIncludes( formwindow, metaIncludes );
- MetaDataBase::setForwards( formwindow, metaForwards );
- MetaDataBase::setSignalList( formwindow, metaSignals );
- MetaDataBase::setMetaInfo( formwindow, metaInfo );
- MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes );
+ MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards );
+ MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals );
+ MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo );
+ MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro );
}
@@ -400,14 +400,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev )
}
if ( formwindow ) {
- formwindow->killAccels( formwindow );
- if ( formwindow->layout() )
- formwindow->layout()->activate();
+ formwindow->killAccels( TQT_TQOBJECT(formwindow) );
+ if ( formwindow->tqlayout() )
+ formwindow->tqlayout()->activate();
if ( hadGeometry )
- formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize().
- expandedTo( formwindow->minimumSizeHint() ) ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqminimumSize().
+ expandedTo( formwindow->tqminimumSizeHint() ) ) );
else
- formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
+ formwindow->resize( formwindow->size().expandedTo( formwindow->tqsizeHint() ) );
}
return true;
@@ -422,7 +422,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
return false;
- bool b = save( &f );
+ bool b = save( TQT_TQIODEVICE(&f) );
f.close();
return b;
}
@@ -439,7 +439,7 @@ bool Resource::save( TQIODevice* dev )
ts << formwindow->mainContainer()->property("shebang").toString() << endl;
ts << "<!DOCTYPE UI><UI version=\"3.0\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
- saveObject( formwindow->mainContainer(), 0, ts, 0 );
+ saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
if ( formwindow->mainContainer()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
@@ -450,7 +450,7 @@ bool Resource::save( TQIODevice* dev )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
- if ( !MetaDataBase::connections( formwindow ).isEmpty() || !MetaDataBase::slotList( formwindow ).isEmpty() )
+ if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() )
saveConnections( ts, 0 );
saveTabOrder( ts, 0 );
saveMetaInfoAfter( ts, 0 );
@@ -463,7 +463,7 @@ bool Resource::save( TQIODevice* dev )
TQString Resource::copy()
{
if ( !formwindow )
- return TQString::null;
+ return TQString();
copying = true;
TQString s;
@@ -473,17 +473,17 @@ TQString Resource::copy()
TQWidgetList widgets = formwindow->selectedWidgets();
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
bool save = true;
while ( p ) {
- if ( tmp.findRef( p ) != -1 ) {
+ if ( tmp.tqfindRef( p ) != -1 ) {
save = false;
break;
}
- p = p->parentWidget();
+ p = p->tqparentWidget();
}
if ( save )
- saveObject( w, 0, ts, 0 );
+ saveObject( TQT_TQOBJECT(w), 0, ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
@@ -495,7 +495,7 @@ TQString Resource::copy()
}
-void Resource::paste( const TQString &cb, TQWidget *parent )
+void Resource::paste( const TQString &cb, TQWidget *tqparent )
{
if ( !formwindow )
return;
@@ -533,33 +533,33 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
- TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
+ TQWidget *w = (TQWidget*)createObject( firstWidget, tqparent, 0 );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
} else if ( firstWidget.tagName() == "spacer" ) {
- TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, tqparent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
if ( !w )
continue;
widgets.append( w );
int x = w->x() + formwindow->grid().x();
int y = w->y() + formwindow->grid().y();
- if ( w->x() + w->width() > parent->width() )
- x = QMAX( 0, parent->width() - w->width() );
- if ( w->y() + w->height() > parent->height() )
- y = QMAX( 0, parent->height() - w->height() );
+ if ( w->x() + w->width() > tqparent->width() )
+ x = TQMAX( 0, tqparent->width() - w->width() );
+ if ( w->y() + w->height() > tqparent->height() )
+ y = TQMAX( 0, tqparent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( w );
+ formwindow->selectWidget( TQT_TQOBJECT(w) );
}
firstWidget = firstWidget.nextSibling().toElement();
}
@@ -571,7 +571,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
formwindow->commandHistory()->addCommand( cmd );
}
-void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent )
+void Resource::saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent )
{
if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() && !(obj->isA("ScriptObject")) )
return;
@@ -580,12 +580,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
const char* className = WidgetFactory::classNameOf( obj );
if ( obj->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
+ if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->tqfind( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
if ( grid ) {
- QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
+ TQDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ];
attributes += TQString(" row=\"") + TQString::number(item.row) + "\"";
attributes += TQString(" column=\"") + TQString::number(item.column) + "\"";
if ( item.rowspan * item.colspan != 1 ) {
@@ -601,7 +601,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
} else {
closeTag = makeIndent( indent ) + "</widget>\n";
if ( qstrcmp( className, "KmdrMainWindow" ) == 0 ) {
- ts << makeIndent( indent ) << "<widget class=\"QMainWindow\"" << attributes << ">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQMainWindow\"" << attributes << ">" << endl;
} else {
ts << makeIndent( indent ) << "<widget class=\"" << className << "\"" << attributes << ">" << endl;
}
@@ -619,7 +619,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQTabWidget* tw = (TQTabWidget*) obj;
TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
- TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
+ TQTabBar *tb = ( (TQDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
TQTab *t = tb->tabAt( i );
if ( !t )
@@ -627,9 +627,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -642,21 +642,21 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
delete tmpl;
} else
- if ( ::qt_cast<TQToolBox*>(obj) ) {
+ if ( ::tqqt_cast<TQToolBox*>(obj) ) {
TQToolBox* tb = (TQToolBox*)obj;
for ( int i = 0; i < tb->count(); ++i ) {
TQWidget *w = tb->item( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -665,7 +665,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
+ saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -673,7 +673,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
@@ -683,9 +683,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = wiz->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
continue; // we don't know this widget
- ts << makeIndent( indent ) << "<widget class=\"QWidget\">" << endl;
+ ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
indent++;
@@ -698,12 +698,12 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( wiz->title( w ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( w, ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
} else if ( obj->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) ) {
- saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
+ saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
} else {
saveChildrenOf( obj, ts, indent );
}
@@ -778,11 +778,11 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
}
saveItem( lv->firstChild(), ts, indent - 1 );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
else if ( obj->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
TQTable *table = (TQTable*)obj;
int i;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
bool isDataTable = table->inherits( TQDATATABLE_OBJECT_NAME_STRING );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
if ( !table->horizontalHeader()->label( i ).isNull() &&
@@ -801,7 +801,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
if ( table->inherits( TQDATATABLE_OBJECT_NAME_STRING ) && !columnFields.isEmpty() ) {
ts << makeIndent( indent ) << "<property name=\"field\">" << endl;
indent++;
- ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.find( l[ 0 ] ) ) << "</string>" << endl;
+ ts << makeIndent( indent ) << "<string>" << entitize( *columnFields.tqfind( l[ 0 ] ) ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
}
@@ -865,11 +865,11 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
ts << makeIndent( indent ) << "<" + tagname + ">" << saveInCollection( p ) << "</" + tagname + ">" << endl;
#ifndef KOMMANDER
else if ( formwindow && formwindow->savePixmapInProject() )
- ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "</" + tagname + ">" << endl;
#endif
else
- ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
+ ts << makeIndent( indent ) << "<" + tagname + ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() )
<< "</" + tagname + ">" << endl;
}
@@ -881,7 +881,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
TQImage img = loadFromCollection( arg );
TQPixmap pix;
pix.convertFromImage( img );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
#ifndef KOMMANDER
@@ -895,11 +895,11 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
{
TQPixmap pix;
pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
TQPixmap pix = PixmapChooser::loadPixmap( "image.xpm" );
- MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
return pix;
}
@@ -929,19 +929,19 @@ void Resource::saveItem( const TQStringList &text, const TQPtrList<TQPixmap> &pi
void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
{
- const TQObjectList *l = obj->children();
- if ( !l )
- return; // no children to save
+ const TQObjectList l = obj->childrenListObject();
+ if ( l.isEmpty() )
+ return; // no tqchildren to save
TQString closeTag;
- // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer
- TQLayout *layout = 0;
- QDesignerGridLayout* grid = 0;
+ // if the widget has a tqlayout we pretend that all widget's childs are childs of the tqlayout - makes the structure nicer
+ TQLayout *tqlayout = 0;
+ TQDesignerGridLayout* grid = 0;
if ( !obj->inherits( TQSPLITTER_OBJECT_NAME_STRING ) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
- WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
- WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout );
+ WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout ) != WidgetFactory::NoLayout ) {
+ WidgetFactory::LayoutType lay = WidgetFactory::tqlayoutType( (TQWidget*)obj, tqlayout );
switch ( lay ) {
case WidgetFactory::HBox:
closeTag = makeIndent( indent ) + "</hbox>";
@@ -957,19 +957,19 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
closeTag = makeIndent( indent ) + "</grid>";
ts << makeIndent( indent ) << "<grid>" << endl;
++indent;
- grid = (QDesignerGridLayout*) layout;
+ grid = (TQDesignerGridLayout*) tqlayout;
break;
default:
break;
}
- // save properties of layout
+ // save properties of tqlayout
if ( lay != WidgetFactory::NoLayout )
- saveObjectProperties( layout, ts, indent );
+ saveObjectProperties( TQT_TQOBJECT(tqlayout), ts, indent );
}
- for ( TQPtrListIterator<TQObject> it ( *l ); it.current(); ++it )
+ for ( TQPtrListIterator<TQObject> it ( l ); it.current(); ++it )
saveObject( it.current(), grid, ts, indent );
if ( !closeTag.isEmpty() ) {
indent--;
@@ -984,43 +984,43 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
if ( w->inherits( "Spacer" ) ) {
- if ( !changed.contains( "sizeHint" ) )
- changed << "sizeHint";
- if ( !changed.contains( "geometry" ) )
+ if ( !changed.tqcontains( "tqsizeHint" ) )
+ changed << "tqsizeHint";
+ if ( !changed.tqcontains( "geometry" ) )
changed << "geometry";
}
} else if ( w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) { // #### should be cleaner (RS)
changed << "margin" << "spacing";
}
- if ( w == formwindow->mainContainer() ) {
- if ( changed.findIndex( "geometry" ) == -1 )
+ if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ if ( changed.tqfindIndex( "geometry" ) == -1 )
changed << "geometry";
- if ( changed.findIndex( "caption" ) == -1 )
+ if ( changed.tqfindIndex( "caption" ) == -1 )
changed << "caption";
}
if ( changed.isEmpty() )
return;
- bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
- WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
+ bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->tqparentWidget() &&
+ WidgetFactory::tqlayoutType( ( (TQWidget*)w )->tqparentWidget() ) != WidgetFactory::NoLayout;
- TQStrList lst = w->metaObject()->propertyNames( !w->inherits( "Spacer" ) );
+ TQStrList lst = w->tqmetaObject()->propertyNames( !w->inherits( "Spacer" ) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
- if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
+ if ( changed.tqfind( TQString::tqfromLatin1( it.current() ) ) == changed.end() )
continue;
- if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() )
+ if ( saved.tqfind( TQString::tqfromLatin1( it.current() ) ) != saved.end() )
continue;
- saved << TQString::fromLatin1( it.current() );
- const TQMetaProperty* p = w->metaObject()->
- property( w->metaObject()->findProperty( it.current(), true ), true );
+ saved << TQString::tqfromLatin1( it.current() );
+ const TQMetaProperty* p = w->tqmetaObject()->
+ property( w->tqmetaObject()->tqfindProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
if ( w->inherits( TQLABEL_OBJECT_NAME_STRING ) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
- if ( w->inherits( "QDesignerMenuBar" ) &&
+ if ( w->inherits( "TQDesignerMenuBar" ) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
qstrcmp( p->name(), "itemText" ) == 0 ) )
continue;
@@ -1066,7 +1066,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1079,18 +1079,18 @@ void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Ty
void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->tqfindProperty( name, true ), true );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent )
{
- if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "layoutMargin" || name =="layoutSpacing" )
+ if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || name == "tqlayoutMargin" || name =="tqlayoutSpacing" )
return;
int num, unum;
double dob;
TQString comment;
- if ( w && formwindow->widgets()->find( (TQWidget*)w ) )
+ if ( w && formwindow->widgets()->tqfind( (TQWidget*)w ) )
comment = MetaDataBase::propertyComment( w, name );
switch ( t ) {
case TQVariant::String:
@@ -1108,9 +1108,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
num = value.toInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) )) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)w ) ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) ) )) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
break;
@@ -1126,9 +1126,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
unum = value.toUInt();
if ( w && w->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( name == "spacing" )
- num = MetaDataBase::spacing( WidgetFactory::layoutParent( (TQLayout*)w ) );
+ num = MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) )) );
else if ( name == "margin" )
- num = MetaDataBase::margin( WidgetFactory::layoutParent( (TQLayout*)w ) );
+ num = MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::tqlayoutParent( TQT_TQLAYOUT(TQT_BASE_OBJECT(w)) )) );
}
ts << makeIndent( indent ) << "<number>" << TQString::number( unum ) << "</number>" << endl;
break;
@@ -1172,9 +1172,9 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
case TQVariant::Font: {
TQVariant v( value );
ts << makeIndent( indent ) << "<font>" << endl;
- TQFont f( qApp->font() );
- if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() )
- f = ((TQWidget*)w)->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( w && w->isWidgetType() && ((TQWidget*)w)->tqparentWidget() )
+ f = ((TQWidget*)w)->tqparentWidget()->font();
TQFont f2( v.toFont() );
indent++;
if ( f.family() != f2.family() )
@@ -1240,7 +1240,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "</palette>" << endl;
} break;
case TQVariant::Cursor:
- ts << makeIndent( indent ) << "<cursor>" << value.toCursor().shape() << "</cursor>" << endl;
+ ts << makeIndent( indent ) << "<cursor>" << value.toCursor().tqshape() << "</cursor>" << endl;
break;
case TQVariant::StringList: {
TQStringList lst = value.toStringList();
@@ -1303,7 +1303,7 @@ void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup
saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) );
indent--;
ts << makeIndent( indent ) << "</color>" << endl;
- TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap();
+ TQPixmap* pm = cg.tqbrush( (TQColorGroup::ColorRole)r ).pixmap();
if ( pm && !pm->isNull() )
savePixmap( *pm, ts, indent );
}
@@ -1316,7 +1316,7 @@ void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c )
ts << makeIndent( indent ) << "<blue>" << TQString::number( c.blue() ) << "</blue>" << endl;
}
-TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout )
+TQObject *Resource::createObject( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout )
{
lastItem = 0;
TQDomElement n = e.firstChild().toElement();
@@ -1335,7 +1335,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
if ( !className.isNull() ) {
- obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
+ obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), tqparent, 0, false ));
if ( !obj )
return 0;
if ( !mainContainerSet ) {
@@ -1346,16 +1346,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
w = (TQWidget*)obj;
if ( w->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
w = ( (TQMainWindow*)w )->centralWidget();
- if ( layout ) {
- switch ( WidgetFactory::layoutType( layout ) ) {
+ if ( tqlayout ) {
+ switch ( WidgetFactory::tqlayoutType( tqlayout ) ) {
case WidgetFactory::HBox:
- ( (TQHBoxLayout*)layout )->addWidget( w );
+ ( (TQHBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::VBox:
- ( (TQVBoxLayout*)layout )->addWidget( w );
+ ( (TQVBoxLayout*)tqlayout )->addWidget( w );
break;
case WidgetFactory::Grid:
- ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1,
+ ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( w, row, row + rowspan - 1,
col, col + colspan - 1 );
break;
default:
@@ -1365,13 +1365,13 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !toplevel )
toplevel = w;
- layout = 0;
+ tqlayout = 0;
if ( w && formwindow ) {
- if ( !parent || ( !parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
+ if ( !tqparent || ( !tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) && !tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) && !tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
formwindow->insertWidget( w, pasting );
- else if ( parent && ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) || parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
- MetaDataBase::addEntry( w );
+ else if ( tqparent && ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) || tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) )
+ MetaDataBase::addEntry( TQT_TQOBJECT(w) );
if (w->inherits("Dialog"))
dynamic_cast<Dialog*>(w)->setUseInternalParser(false);
}
@@ -1379,22 +1379,22 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
while ( !n.isNull() ) {
if ( n.tagName() == "spacer" ) {
- createSpacer( n, w, layout, Qt::Horizontal );
+ createSpacer( n, w, tqlayout, Qt::Horizontal );
} else if ( n.tagName() == "widget" ) {
- createObject( n, w, layout );
+ createObject( n, w, tqlayout );
} else if ( n.tagName() == "hbox" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::HBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "grid" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::Grid );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "vbox" ) {
- layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox );
- obj = layout;
+ tqlayout = WidgetFactory::createLayout( w, tqlayout, WidgetFactory::VBox );
+ obj = TQT_TQOBJECT(tqlayout);
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "property" && obj ) {
@@ -1402,16 +1402,16 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
} else if ( n.tagName() == "attribute" && w ) {
TQString attrib = n.attribute( "name" );
TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() );
- if ( parent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
+ if ( tqparent->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQTabWidget*)parent )->insertTab( w, v.toString() );
+ ( (TQTabWidget*)tqparent )->insertTab( w, v.toString() );
} else
- if ( parent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
+ if ( tqparent->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) ) {
if ( attrib == "label" )
- ( (TQToolBox*)parent )->addItem( w, v.toString() );
- } else if ( parent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
+ ( (TQToolBox*)tqparent )->addItem( w, v.toString() );
+ } else if ( tqparent->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
if ( attrib == "title" )
- ( (TQWizard*)parent )->addPage( w, v.toString() );
+ ( (TQWizard*)tqparent )->addPage( w, v.toString() );
}
} else if ( n.tagName() == "item" ) {
createItem( n, w );
@@ -1428,7 +1428,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
n = n.nextSibling().toElement();
}
- return w;
+ return TQT_TQOBJECT(w);
}
void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
@@ -1469,7 +1469,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !resizeable )
lv->header()->setResizeEnabled( resizeable, i );
}
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
else if ( widget->inherits( TQTABLE_OBJECT_NAME_STRING ) ) {
TQTable *table = (TQTable*)widget;
bool isRow;
@@ -1483,7 +1483,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
bool hasPixmap = false;
TQString txt;
TQString field;
- TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
+ TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -1508,7 +1508,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
h->setLabel( i, txt );
if ( !isRow && !field.isEmpty() )
fieldMap.insert( txt, field );
- MetaDataBase::setColumnFields( table, fieldMap );
+ MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap );
}
#endif
}
@@ -1534,7 +1534,7 @@ void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bo
void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i )
{
- if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) )
+ if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) )
return;
if ( widget->inherits( TQLISTBOX_OBJECT_NAME_STRING ) || widget->inherits( TQCOMBOBOX_OBJECT_NAME_STRING ) ) {
@@ -1605,7 +1605,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
}
}
-TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o )
+TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *tqparent, TQLayout *tqlayout, Qt::Orientation o )
{
TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
@@ -1618,23 +1618,23 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
- parent, "spacer", false);
+ tqparent, "spacer", false);
spacer->setOrientation( o );
spacer->setInteraciveMode( false );
while ( !n.isNull() ) {
if ( n.tagName() == "property" )
- setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement();
}
spacer->setInteraciveMode( true );
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
- if ( layout ) {
- if ( layout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
- ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
+ if ( tqlayout ) {
+ if ( tqlayout->inherits( TQBOXLAYOUT_OBJECT_NAME_STRING ) )
+ ( (TQBoxLayout*)tqlayout )->addWidget( spacer, 0, spacer->tqalignment() );
else
- ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
- spacer->alignment() );
+ ( (TQDesignerGridLayout*)tqlayout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
+ spacer->tqalignment() );
}
return spacer;
}
@@ -1644,9 +1644,9 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
*/
void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e )
{
- const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
+ const TQMetaProperty *p = obj->tqmetaObject()->property( obj->tqmetaObject()->tqfindProperty( prop, true ), true );
- if ( !obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {// no layouts in metadatabase... (RS)
+ if ( !obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {// no tqlayouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
@@ -1657,9 +1657,9 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
TQVariant defVarient;
if ( e.tagName() == "font" ) {
- TQFont f( qApp->font() );
- if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() )
- f = ( (TQWidget*)obj )->parentWidget()->font();
+ TQFont f( tqApp->font() );
+ if ( obj->isWidgetType() && ( (TQWidget*)obj )->tqparentWidget() )
+ f = ( (TQWidget*)obj )->tqparentWidget()->font();
defVarient = TQVariant( f );
}
@@ -1688,7 +1688,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
- if ( prop == "database" && obj != toplevel ) {
+ if ( prop == "database" && TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(toplevel) ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
@@ -1743,11 +1743,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
if ( prop == "geometry" ) {
- if ( obj == toplevel ) {
+ if ( TQT_BASE_OBJECT(obj) == toplevel ) {
hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
- } else if ( obj == formwindow->mainContainer() ) {
+ } else if ( TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
@@ -1756,11 +1756,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( obj->inherits( TQLAYOUT_OBJECT_NAME_STRING ) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)obj ) )), v.toInt() );
return;
}
if ( prop == "margin" ) {
- MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)obj ) ), v.toInt() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( WidgetFactory::tqlayoutParent( (TQLayout*)obj ) )), v.toInt() );
return;
}
}
@@ -1768,10 +1768,10 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
- formwindow->unify( (TQWidget*)obj, s, true );
+ formwindow->unify( TQT_TQOBJECT(obj), s, true );
obj->setName( s );
return;
- } else if ( formwindow && obj == formwindow->mainContainer() ) {
+ } else if ( formwindow && TQT_BASE_OBJECT(obj) == formwindow->mainContainer() ) {
formwindow->setName( v.toCString() );
}
}
@@ -1916,17 +1916,17 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
{
ts << makeIndent( indent ) << "<connections>" << endl;
indent++;
- TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) );
TQValueList<MetaDataBase::Connection>::Iterator it = connections.begin();
for ( ; it != connections.end(); ++it ) {
MetaDataBase::Connection conn = *it;
- if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 &&
+ if ( ( knownNames.tqfindIndex( TQString( conn.sender->name() ) ) == -1 &&
qstrcmp( conn.sender->name(), "this" ) != 0 ) ||
- ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
+ ( knownNames.tqfindIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
- if ( formwindow->isMainContainer( (TQWidget*)(*it).receiver ) &&
- !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) )
+ if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) &&
+ !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeSlot( (*it).slot ).latin1() ) )
continue;
if ( conn.sender->inherits( "CustomWidget" ) ) {
@@ -1995,7 +1995,7 @@ void Resource::loadConnections( const TQDomElement &e )
conn.sender = 0;
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.sender = toplevel;
+ conn.sender = TQT_TQOBJECT(toplevel);
} else {
if ( name == "this" )
name = toplevel->name();
@@ -2013,7 +2013,7 @@ void Resource::loadConnections( const TQDomElement &e )
} else if ( n2.tagName() == "receiver" ) {
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.receiver = toplevel;
+ conn.receiver = TQT_TQOBJECT(toplevel);
} else {
TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
@@ -2028,10 +2028,10 @@ void Resource::loadConnections( const TQDomElement &e )
n2 = n2.nextSibling().toElement();
}
if ( formwindow ) {
- if ( conn.sender == formwindow )
- conn.sender = formwindow->mainContainer();
- if ( conn.receiver == formwindow )
- conn.receiver = formwindow->mainContainer();
+ if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) )
+ conn.sender = TQT_TQOBJECT(formwindow->mainContainer());
+ if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) )
+ conn.receiver = TQT_TQOBJECT(formwindow->mainContainer());
}
if ( conn.sender && conn.receiver ) {
#ifndef KOMMANDER
@@ -2044,7 +2044,7 @@ void Resource::loadConnections( const TQDomElement &e )
TQStringList::split( ',', conn.slot ), false );
}
#else
- MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
+ MetaDataBase::addConnection( formwindow ? TQT_TQOBJECT(formwindow) : TQT_TQOBJECT(toplevel),
conn.sender, conn.signal, conn.receiver, conn.slot );
#endif
}
@@ -2061,11 +2061,11 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.slot = n.firstChild().toText().data();
- if ( !MetaDataBase::hasSlot( formwindow, slot.slot, true ) )
- MetaDataBase::addSlot( formwindow, slot.slot, slot.specifier,
+ if ( !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), slot.slot, true ) )
+ MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), slot.slot, slot.specifier,
slot.access, slot.language, slot.returnType );
else
- MetaDataBase::changeSlotAttributes( formwindow, slot.slot,
+ MetaDataBase::changeSlotAttributes( TQT_TQOBJECT(formwindow), slot.slot,
slot.specifier, slot.access,
slot.language, slot.returnType );
}
@@ -2080,7 +2080,7 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
TQPtrList<MetaDataBase::CustomWidget> *lst = MetaDataBase::customWidgets();
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
- if ( usedCustomWidgets.findIndex( w->className ) == -1 )
+ if ( usedCustomWidgets.tqfindIndex( w->className ) == -1 )
continue;
ts << makeIndent( indent ) << "<customwidget>" << endl;
indent++;
@@ -2090,8 +2090,8 @@ void Resource::saveCustomWidgets( TQTextStream &ts, int indent )
<< "\">" << w->includeFile << "</header>" << endl;
ts << makeIndent( indent ) << "<sizehint>" << endl;
indent++;
- ts << makeIndent( indent ) << "<width>" << w->sizeHint.width() << "</width>" << endl;
- ts << makeIndent( indent ) << "<height>" << w->sizeHint.height() << "</height>" << endl;
+ ts << makeIndent( indent ) << "<width>" << w->tqsizeHint.width() << "</width>" << endl;
+ ts << makeIndent( indent ) << "<height>" << w->tqsizeHint.height() << "</height>" << endl;
indent--;
ts << makeIndent( indent ) << "</sizehint>" << endl;
ts << makeIndent( indent ) << "<container>" << (int)w->isContainer << "</container>" << endl;
@@ -2147,9 +2147,9 @@ void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r )
TQDomElement n3 = n2.firstChild().toElement();
while ( !n3.isNull() ) {
if ( n3.tagName() == "width" )
- w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() );
+ w->tqsizeHint.setWidth( n3.firstChild().toText().data().toInt() );
else if ( n3.tagName() == "height" )
- w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() );
+ w->tqsizeHint.setHeight( n3.firstChild().toText().data().toInt() );
n3 = n3.nextSibling().toElement();
}
} else if ( n2.tagName() == "sizepolicy" ) {
@@ -2214,7 +2214,7 @@ void Resource::saveTabOrder( TQTextStream &ts, int indent )
indent++;
for ( TQWidget *w = l.first(); w; w = l.next() ) {
- if ( w->testWState( Qt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 )
+ if ( w->testWState( TQt::WState_ForceHide ) || knownNames.tqfindIndex( w->name() ) == -1 )
continue;
ts << makeIndent( indent ) << "<tabstop>" << w->name() << "</tabstop>" << endl;
}
@@ -2254,7 +2254,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(formwindow);
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo(TQT_TQOBJECT(formwindow));
TQString cn = formwindow->name();
ts << makeIndent(indent) << "<class>" << entitize(cn) << "</class>" << endl;
if (!info.comment.isEmpty())
@@ -2269,8 +2269,8 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) );
TQString extensionInclude;
bool needExtensionInclude = false;
if ( !includes.isEmpty() || needExtensionInclude ) {
@@ -2291,7 +2291,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- TQStringList forwards = MetaDataBase::forwards( formwindow );
+ TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl;
indent++;
@@ -2300,7 +2300,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- TQStringList sigs = MetaDataBase::signalList( formwindow );
+ TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
@@ -2309,7 +2309,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</signals>" << endl;
- TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( formwindow );
+ TQValueList<MetaDataBase::Slot> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
@@ -2339,11 +2339,11 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
;
else
ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl;
- if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() )
+ if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() )
ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
if ( formwindow )
- ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
- << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl;
+ ts << makeIndent( indent ) << "<tqlayoutdefaults spacing=\"" << formwindow->tqlayoutDefaultSpacing()
+ << "\" margin=\"" << formwindow->tqlayoutDefaultMargin() << "\"/>" << endl;
}
TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
@@ -2367,9 +2367,10 @@ TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
{
- if ( !a->children() )
+ TQObjectList clo = a->childrenListObject();
+ if ( clo.isEmpty() )
return;
- TQObjectListIt it( *a->children() );
+ TQObjectListIt it( clo );
while ( it.current() ) {
TQObject *o = it.current();
++it;
@@ -2428,12 +2429,12 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
ts << makeIndent( indent ) << "</actions>" << endl;
}
-void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
+void Resource::loadChildAction( TQObject *tqparent, const TQDomElement &e )
{
TQDomElement n = e;
TQAction *a = 0;
if ( n.tagName() == "action" ) {
- a = new QDesignerAction( parent );
+ a = new TQDesignerAction( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
@@ -2449,10 +2450,10 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
- a = new QDesignerActionGroup( parent );
+ a = new TQDesignerActionGroup( tqparent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
@@ -2471,7 +2472,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !parent->inherits( TQACTION_OBJECT_NAME_STRING ) )
+ if ( !tqparent->inherits( TQACTION_OBJECT_NAME_STRING ) )
formwindow->actionList().append( a );
}
}
@@ -2481,9 +2482,9 @@ void Resource::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( formwindow, n );
+ loadChildAction( TQT_TQOBJECT(formwindow), n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( formwindow, n );
+ loadChildAction( TQT_TQOBJECT(formwindow), n );
}
n = n.nextSibling().toElement();
}
@@ -2495,8 +2496,8 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
indent++;
TQPtrList<TQToolBar> tbList;
- for ( int i = 0; i <= (int)Qt::DockMinimized; ++i ) {
- tbList = mw->toolBars( (Qt::Dock)i );
+ for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) {
+ tbList = mw->toolBars( (TQt::Dock)i );
if ( tbList.isEmpty() )
continue;
for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) {
@@ -2504,23 +2505,23 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
- saveObjectProperties( tb, ts, indent );
- TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
+ saveObjectProperties( TQT_TQOBJECT(tb), ts, indent );
+ TQPtrList<TQAction> actionList = ( (TQDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( a->inherits( "QSeparatorAction" ) ) {
+ if ( a->inherits( "TQSeparatorAction" ) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
- if ( a->inherits( "QDesignerAction" ) && !( (QDesignerAction*)a )->supportsMenu() ) {
- TQWidget *w = ( (QDesignerAction*)a )->widget();
+ if ( a->inherits( "TQDesignerAction" ) && !( (TQDesignerAction*)a )->supportsMenu() ) {
+ TQWidget *w = ( (TQDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( w ) << "\">" << endl;
+ << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
indent++;
- saveObjectProperties( w, ts, indent );
- const char *className = WidgetFactory::classNameOf( w );
+ saveObjectProperties( TQT_TQOBJECT(w), ts, indent );
+ const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
if ( w->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) )
- saveItems( w, ts, indent );
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) )
+ saveItems( TQT_TQOBJECT(w), ts, indent );
indent--;
ts << makeIndent( indent ) << "</widget>" << endl;
} else {
@@ -2542,18 +2543,18 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- saveObjectProperties( mw->menuBar(), ts, indent );
+ saveObjectProperties( TQT_TQOBJECT(mw->menuBar()), ts, indent );
for ( int i = 0; i < (int)mw->menuBar()->count(); ++i ) {
ts << makeIndent( indent ) << "<item text=\"" << entitize( mw->menuBar()->text( mw->menuBar()->idAt( i ) ) )
- << "\" name=\"" << entitize( mw->menuBar()->findItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
+ << "\" name=\"" << entitize( mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) )->popup()->name() ) << "\">" << endl;
indent++;
- TQMenuItem *m = mw->menuBar()->findItem( mw->menuBar()->idAt( i ) );
+ TQMenuItem *m = mw->menuBar()->tqfindItem( mw->menuBar()->idAt( i ) );
if ( !m )
continue;
- TQPtrList<TQAction> actionList = ( (QDesignerPopupMenu*)m->popup() )->insertedActions();
+ TQPtrList<TQAction> actionList = ( (TQDesignerPopupMenu*)m->popup() )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( a->inherits( "QSeparatorAction" ) )
+ if ( a->inherits( "TQSeparatorAction" ) )
ts << makeIndent( indent ) << "<separator/>" << endl;
else
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
@@ -2569,11 +2570,11 @@ void Resource::loadToolBars( const TQDomElement &e )
{
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
- QDesignerToolBar *tb = 0;
+ TQDesignerToolBar *tb = 0;
while ( !n.isNull() ) {
if ( n.tagName() == "toolbar" ) {
- Qt::Dock dock = (Qt::Dock)n.attribute( "dock" ).toInt();
- tb = new QDesignerToolBar( mw, dock );
+ TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt();
+ tb = new TQDesignerToolBar( mw, dock );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
if ( n2.tagName() == "action" ) {
@@ -2583,17 +2584,17 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
a->addTo( tb );
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb );
- QDesignerAction *a = new QDesignerAction( w, tb );
+ TQDesignerAction *a = new TQDesignerAction( w, TQT_TQOBJECT(tb) );
a->addTo( tb );
tb->addAction( a );
tb->installEventFilters( w );
} else if ( n2.tagName() == "property" ) {
- setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -2606,10 +2607,10 @@ void Resource::loadMenuBar( const TQDomElement &e )
{
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() );
- QDesignerMenuBar *mb = new QDesignerMenuBar( mw );
+ TQDesignerMenuBar *mb = new TQDesignerMenuBar( mw );
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
- QDesignerPopupMenu *popup = new QDesignerPopupMenu( mw );
+ TQDesignerPopupMenu *popup = new TQDesignerPopupMenu( mw );
popup->setName( n.attribute( "name" ) );
TQDomElement n2 = n.firstChild().toElement();
while ( !n2.isNull() ) {
@@ -2620,7 +2621,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
popup->addAction( a );
}
} else if ( n2.tagName() == "separator" ) {
- TQAction *a = new QSeparatorAction( 0 );
+ TQAction *a = new TQSeparatorAction( 0 );
a->addTo( popup );
popup->addAction( a );
}
@@ -2628,7 +2629,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
}
mb->insertItem( n.attribute( "text" ), popup );
} else if ( n.tagName() == "property" ) {
- setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
}
n = n.nextSibling().toElement();
}
@@ -2667,11 +2668,11 @@ void Resource::saveFormCode()
for ( ; sit != slotList.end(); ++sit ) {
MetaDataBase::Slot slot = *sit;
TQMap<TQString, TQString>::Iterator it =
- functionBodies.find( MetaDataBase::normalizeSlot( (*sit).slot ) );
+ functionBodies.tqfind( MetaDataBase::normalizeSlot( (*sit).slot ) );
LanguageInterface::Function func;
func.name = slot.slot;
func.body = *it;
- func.comments = MetaDataBase::functionComments( formwindow, func.name );
+ func.comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), func.name );
func.returnType = slot.returnType;
funcs.append( func );
}
@@ -2699,14 +2700,14 @@ void Resource::saveFormCode()
static TQString make_function_pretty( const TQString &s )
{
TQString res = s;
- if ( res.find( ")" ) - res.find( "(" ) == 1 )
+ if ( res.tqfind( ")" ) - res.tqfind( "(" ) == 1 )
return res;
- res.replace( TQRegExp( "[(]" ), "( " );
- res.replace( TQRegExp( "[)]" ), " )" );
- res.replace( TQRegExp( "&" ), " &" );
- res.replace( TQRegExp( "[*]" ), " *" );
- res.replace( TQRegExp( "," ), ", " );
- res.replace( TQRegExp( ":" ), " : " );
+ res.tqreplace( TQRegExp( "[(]" ), "( " );
+ res.tqreplace( TQRegExp( "[)]" ), " )" );
+ res.tqreplace( TQRegExp( "&" ), " &" );
+ res.tqreplace( TQRegExp( "[*]" ), " *" );
+ res.tqreplace( TQRegExp( "," ), ", " );
+ res.tqreplace( TQRegExp( ":" ), " : " );
res = res.simplifyWhiteSpace();
return res;
}
@@ -2724,7 +2725,7 @@ void Resource::loadFunctions( const TQDomElement &e )
}
n = n.nextSibling().toElement();
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
+ MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() );
if ( !bodies.isEmpty() ) {
LanguageInterface *iface = langIface;
if ( !iface )
@@ -2739,14 +2740,14 @@ void Resource::loadFunctions( const TQDomElement &e )
#endif
continue;
TQString sl( (*it).slot );
- TQString comments = MetaDataBase::functionComments( formwindow, sl );
+ TQString comments = MetaDataBase::functionComments( TQT_TQOBJECT(formwindow), sl );
if ( !comments.isEmpty() )
code += comments + "\n";
code += iface->createFunctionStart( formwindow->name(), make_function_pretty( sl ),
( (*it).returnType.isEmpty() ?
TQString( "void" ) :
(*it).returnType ) );
- TQMap<TQString, TQString>::Iterator bit = bodies.find( MetaDataBase::normalizeSlot( (*it).slot ) );
+ TQMap<TQString, TQString>::Iterator bit = bodies.tqfind( MetaDataBase::normalizeSlot( (*it).slot ) );
if ( bit != bodies.end() )
code += "\n" + *bit + "\n\n";
else
@@ -2820,25 +2821,25 @@ void Resource::loadExtraSource()
for ( TQValueList<LanguageInterface::Function>::Iterator fit = functions.begin();
fit != functions.end(); ++fit ) {
- if ( MetaDataBase::hasSlot( formwindow, (*fit).name.latin1() ) )
- MetaDataBase::changeSlot( formwindow, (*fit).name.latin1(), (*fit).name.latin1() );
+ if ( MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1() ) )
+ MetaDataBase::changeSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), (*fit).name.latin1() );
else
- MetaDataBase::addSlot( formwindow, (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType );
- MetaDataBase::setFunctionComments( formwindow, (*fit).name, (*fit).comments );
+ MetaDataBase::addSlot( TQT_TQOBJECT(formwindow), (*fit).name.latin1(), "virtual", "public", lang, (*fit).returnType );
+ MetaDataBase::setFunctionComments( TQT_TQOBJECT(formwindow), (*fit).name, (*fit).comments );
bodies.insert( MetaDataBase::normalizeSlot( (*fit).name ), (*fit).body );
}
- MetaDataBase::setFunctionBodies( formwindow, bodies, TQString::null, TQString::null );
+ MetaDataBase::setFunctionBodies( TQT_TQOBJECT(formwindow), bodies, TQString(), TQString() );
TQStringList v = MetaDataBase::variables( formwindow );
TQStringList::Iterator vit;
for ( vit = vars.begin(); vit != vars.end(); ++vit )
v << *vit;
- MetaDataBase::setVariables( formwindow, v );
+ MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), v );
TQStringList f = MetaDataBase::forwards( formwindow );
for ( vit = forwards.begin(); vit != forwards.end(); ++vit )
f << *vit;
- MetaDataBase::setForwards( formwindow, f );
+ MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), f );
TQValueList<MetaDataBase::Include> incls = MetaDataBase::includes( formwindow );
for ( vit = includesImpl.begin(); vit != includesImpl.end(); ++vit ) {
@@ -2853,6 +2854,6 @@ void Resource::loadExtraSource()
inc.location = "in declaration";
incls << inc;
}
- MetaDataBase::setIncludes( formwindow, incls );
+ MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), incls );
}
#endif
diff --git a/kommander/editor/resource.h b/kommander/editor/resource.h
index b01bd233..1684df20 100644
--- a/kommander/editor/resource.h
+++ b/kommander/editor/resource.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -38,7 +38,7 @@ class TQPalette;
class FormWindow;
class MainWindow;
class TQDomElement;
-class QDesignerGridLayout;
+class TQDesignerGridLayout;
class TQListViewItem;
class TQMainWindow;
#ifndef KOMMANDER
@@ -71,13 +71,13 @@ public:
bool save( const TQString& filename, bool formCodeOnly = FALSE);
bool save( TQIODevice* );
- void paste( const TQString &cb, TQWidget *parent );
+ void paste( const TQString &cb, TQWidget *tqparent );
static void saveImageData( const TQImage &img, TQTextStream &ts, int indent );
static void loadCustomWidgets( const TQDomElement &e, Resource *r );
private:
- void saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent );
+ void saveObject( TQObject *obj, TQDesignerGridLayout* grid, TQTextStream &ts, int indent );
void saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent );
void saveObjectProperties( TQObject *w, TQTextStream &ts, int indent );
void saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type t, TQTextStream &ts, int indent );
@@ -103,8 +103,8 @@ private:
// void saveFormCode();
#endif
- TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 );
- TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o );
+ TQObject *createObject( const TQDomElement &e, TQWidget *tqparent, TQLayout* tqlayout = 0 );
+ TQWidget *createSpacer( const TQDomElement &e, TQWidget *tqparent, TQLayout *tqlayout, Qt::Orientation o );
void createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i = 0 );
void createColumn( const TQDomElement &e, TQWidget *widget );
void setObjectProperty( TQObject* widget, const TQString &prop, const TQDomElement &e);
@@ -117,7 +117,7 @@ private:
void loadTabOrder( const TQDomElement &e );
void loadItem( const TQDomElement &n, TQPixmap &pix, TQString &txt, bool &hasPixmap );
void loadActions( const TQDomElement &n );
- void loadChildAction( TQObject *parent, const TQDomElement &e );
+ void loadChildAction( TQObject *tqparent, const TQDomElement &e );
void loadToolBars( const TQDomElement &n );
void loadMenuBar( const TQDomElement &n );
TQColorGroup loadColorGroup( const TQDomElement &e );
diff --git a/kommander/editor/sizehandle.cpp b/kommander/editor/sizehandle.cpp
index a5ebe0ec..af5efea9 100644
--- a/kommander/editor/sizehandle.cpp
+++ b/kommander/editor/sizehandle.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -30,8 +30,8 @@
#include <klocale.h>
-SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
- : TQWidget( parent )
+SizeHandle::SizeHandle( FormWindow *tqparent, Direction d, WidgetSelection *s )
+ : TQWidget( tqparent )
{
active = true;
setBackgroundMode( active ? PaletteText : PaletteDark );
@@ -39,7 +39,7 @@ SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
widget = 0;
dir =d ;
setMouseTracking( false );
- formWindow = parent;
+ formWindow = tqparent;
sel = s;
updateCursor();
}
@@ -93,7 +93,7 @@ void SizeHandle::setWidget( TQWidget *w )
void SizeHandle::paintEvent( TQPaintEvent * )
{
- if ( ( (FormWindow*)parentWidget() )->currentWidget() != widget )
+ if ( ( (FormWindow*)tqparentWidget() )->currentWidget() != widget )
return;
TQPainter p( this );
p.setPen( blue );
@@ -102,7 +102,7 @@ void SizeHandle::paintEvent( TQPaintEvent * )
void SizeHandle::mousePressEvent( TQMouseEvent *e )
{
- if ( !widget || e->button() != LeftButton || !active )
+ if ( !widget || e->button() != Qt::LeftButton || !active )
return;
oldPressPos = e->pos();
geom = origGeom = TQRect( widget->pos(), widget->size() );
@@ -110,13 +110,13 @@ void SizeHandle::mousePressEvent( TQMouseEvent *e )
void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
{
- if ( !widget || ( e->state() & LeftButton ) != LeftButton || !active )
+ if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active )
return;
TQPoint rp = mapFromGlobal( e->globalPos() );
TQPoint d = oldPressPos - rp;
oldPressPos = rp;
- TQPoint checkPos = widget->parentWidget()->mapFromGlobal( e->globalPos() );
- TQRect pr = widget->parentWidget()->rect();
+ TQPoint checkPos = widget->tqparentWidget()->mapFromGlobal( e->globalPos() );
+ TQRect pr = widget->tqparentWidget()->rect();
// ##### move code around a bit to reduce duplicated code here
switch ( dir ) {
@@ -208,7 +208,7 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
sel->updateGeometry();
oldPressPos += ( p - pos() );
- formWindow->sizePreview()->setText( TQString( "%1/%2" ).arg( widget->width() ).arg( widget->height() ) );
+ formWindow->sizePreview()->setText( TQString( "%1/%2" ).tqarg( widget->width() ).tqarg( widget->height() ) );
formWindow->sizePreview()->adjustSize();
TQRect lg( formWindow->mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ),
formWindow->sizePreview()->size() );
@@ -216,55 +216,55 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
formWindow->sizePreview()->setGeometry( lg );
formWindow->sizePreview()->show();
formWindow->sizePreview()->raise();
- if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
+ if ( WidgetFactory::tqlayoutType( widget ) != WidgetFactory::NoLayout )
formWindow->updateChildSelections( widget );
}
void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
{
- if ( e->button() != LeftButton || !active )
+ if ( e->button() != Qt::LeftButton || !active )
return;
formWindow->sizePreview()->hide();
- if ( geom != widget->geometry() )
+ if ( geom != widget->tqgeometry() )
formWindow->commandHistory()->addCommand( new ResizeCommand( i18n("Resize" ),
formWindow,
widget, origGeom,
- widget->geometry() ) );
- formWindow->emitUpdateProperties( widget );
+ widget->tqgeometry() ) );
+ formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) );
}
void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height )
{
- int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
- minw = QMAX( minw, 2 * formWindow->grid().x() );
- int minh = QMAX( w->minimumSizeHint().height(), w->minimumSize().height() );
- minh = QMAX( minh, 2 * formWindow->grid().y() );
- if ( QMAX( minw, width ) > w->maximumWidth() ||
- QMAX( minh, height ) > w->maximumHeight() )
+ int minw = TQMAX( w->tqminimumSizeHint().width(), w->tqminimumSize().width() );
+ minw = TQMAX( minw, 2 * formWindow->grid().x() );
+ int minh = TQMAX( w->tqminimumSizeHint().height(), w->tqminimumSize().height() );
+ minh = TQMAX( minh, 2 * formWindow->grid().y() );
+ if ( TQMAX( minw, width ) > w->maximumWidth() ||
+ TQMAX( minh, height ) > w->maximumHeight() )
return;
if ( width < minw && x != w->x() )
x -= minw - width;
if ( height < minh && y != w->y() )
y -= minh - height;
- w->setGeometry( x, y, QMAX( minw, width ), QMAX( minh, height ) );
+ w->setGeometry( x, y, TQMAX( minw, width ), TQMAX( minh, height ) );
}
void SizeHandle::tryResize( TQWidget *w, int width, int height )
{
- int minw = QMAX( w->minimumSizeHint().width(), w->minimumSize().width() );
- minw = QMAX( minw, 16 );
- int minh = QMAX( w->minimumSizeHint().height(), w->minimumSize().height() );
- minh = QMAX( minh, 16 );
- w->resize( QMAX( minw, width ), QMAX( minh, height ) );
+ int minw = TQMAX( w->tqminimumSizeHint().width(), w->tqminimumSize().width() );
+ minw = TQMAX( minw, 16 );
+ int minh = TQMAX( w->tqminimumSizeHint().height(), w->tqminimumSize().height() );
+ minh = TQMAX( minh, 16 );
+ w->resize( TQMAX( minw, width ), TQMAX( minh, height ) );
}
// ------------------------------------------------------------------------
-WidgetSelection::WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict )
+WidgetSelection::WidgetSelection( FormWindow *tqparent, TQPtrDict<WidgetSelection> *selDict )
: selectionDict( selDict )
{
- formWindow = parent;
+ formWindow = tqparent;
for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
handles.insert( i, new SizeHandle( formWindow, (SizeHandle::Direction)i, this ) );
}
@@ -282,7 +282,7 @@ void WidgetSelection::setWidget( TQWidget *w, bool updateDict )
}
wid = w;
- bool active = !wid->parentWidget() || WidgetFactory::layoutType( wid->parentWidget() ) == WidgetFactory::NoLayout;
+ bool active = !wid->tqparentWidget() || WidgetFactory::tqlayoutType( wid->tqparentWidget() ) == WidgetFactory::NoLayout;
for ( int i = SizeHandle::LeftTop; i <= SizeHandle::Left; ++i ) {
SizeHandle *h = handles[ i ];
if ( h ) {
@@ -306,7 +306,7 @@ void WidgetSelection::updateGeometry()
if ( !wid )
return;
- TQPoint p = wid->parentWidget()->mapToGlobal( wid->pos() );
+ TQPoint p = wid->tqparentWidget()->mapToGlobal( wid->pos() );
p = formWindow->mapFromGlobal( p );
TQRect r( p, wid->size() );
diff --git a/kommander/editor/sizehandle.h b/kommander/editor/sizehandle.h
index 50d3ea1c..4def5429 100644
--- a/kommander/editor/sizehandle.h
+++ b/kommander/editor/sizehandle.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -30,14 +30,15 @@ class FormWindow;
class WidgetSelection;
class TQPaintEvent;
-class SizeHandle : public QWidget
+class SizeHandle : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Direction { LeftTop, Top, RightTop, Right, RightBottom, Bottom, LeftBottom, Left };
- SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s );
+ SizeHandle( FormWindow *tqparent, Direction d, WidgetSelection *s );
void setWidget( TQWidget *w );
void setActive( bool a );
void updateCursor();
@@ -68,7 +69,7 @@ private:
class WidgetSelection
{
public:
- WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict );
+ WidgetSelection( FormWindow *tqparent, TQPtrDict<WidgetSelection> *selDict );
void setWidget( TQWidget *w, bool updateDict = TRUE );
bool isUsed() const;
diff --git a/kommander/editor/styledbutton.cpp b/kommander/editor/styledbutton.cpp
index 4502b2a3..95f57d39 100644
--- a/kommander/editor/styledbutton.cpp
+++ b/kommander/editor/styledbutton.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -32,10 +32,10 @@
#include <tqdragobject.h>
#include <tqstyle.h>
-StyledButton::StyledButton(TQWidget* parent, const char* name)
- : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
+StyledButton::StyledButton(TQWidget* tqparent, const char* name)
+ : TQButton( tqparent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
{
- setMinimumSize( minimumSizeHint() );
+ setMinimumSize( tqminimumSizeHint() );
setAcceptDrops( true );
connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor()));
@@ -43,12 +43,12 @@ StyledButton::StyledButton(TQWidget* parent, const char* name)
setEditor( ColorEditor );
}
-StyledButton::StyledButton( const TQBrush& b, TQWidget* parent, const char* name, WFlags f )
- : TQButton( parent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
+StyledButton::StyledButton( const TQBrush& b, TQWidget* tqparent, const char* name, WFlags f )
+ : TQButton( tqparent, name, f ), spix( 0 ), s( 0 ), formWindow( 0 )
{
col = b.color();
pix = b.pixmap();
- setMinimumSize( minimumSizeHint() );
+ setMinimumSize( tqminimumSizeHint() );
}
StyledButton::~StyledButton()
@@ -111,12 +111,12 @@ void StyledButton::setScale( bool on )
scalePixmap();
}
-TQSize StyledButton::sizeHint() const
+TQSize StyledButton::tqsizeHint() const
{
return TQSize( 50, 25 );
}
-TQSize StyledButton::minimumSizeHint() const
+TQSize StyledButton::tqminimumSizeHint() const
{
return TQSize( 50, 25 );
}
@@ -145,25 +145,25 @@ void StyledButton::resizeEvent( TQResizeEvent* e )
void StyledButton::drawButton( TQPainter *paint )
{
- style().drawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
+ tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), tqcolorGroup(),
isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised);
drawButtonLabel(paint);
if (hasFocus())
- style().drawPrimitive(TQStyle::PE_FocusRect, paint,
- style().subRect(TQStyle::SR_PushButtonFocusRect, this),
- colorGroup(), TQStyle::Style_Default);
+ tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, paint,
+ tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, this),
+ tqcolorGroup(), TQStyle::Style_Default);
}
void StyledButton::drawButtonLabel( TQPainter *paint )
{
TQColor pen = isEnabled() ?
- hasFocus() ? palette().active().buttonText() : palette().inactive().buttonText()
- : palette().disabled().buttonText();
+ hasFocus() ? tqpalette().active().buttonText() : tqpalette().inactive().buttonText()
+ : tqpalette().disabled().buttonText();
paint->setPen( pen );
if(!isEnabled()) {
- paint->setBrush( TQBrush( colorGroup().button() ) );
+ paint->setBrush( TQBrush( tqcolorGroup().button() ) );
}
else if ( edit == PixmapEditor && spix ) {
paint->setBrush( TQBrush( col, *spix ) );
@@ -178,7 +178,7 @@ void StyledButton::onEditor()
{
switch (edit) {
case ColorEditor: {
- TQColor c = palette().active().background();
+ TQColor c = tqpalette().active().background();
if ( KColorDialog::getColor( c, this ) == TQDialog::Accepted ) {
setColor( c );
emit changed();
@@ -210,7 +210,7 @@ void StyledButton::mousePressEvent(TQMouseEvent* e)
void StyledButton::mouseMoveEvent(TQMouseEvent* e)
{
TQButton::mouseMoveEvent( e );
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
if ( !mousePressed )
return;
if ( ( pressPos - e->pos() ).manhattanLength() > TQApplication::startDragDistance() ) {
@@ -237,7 +237,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
#endif
}
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
void StyledButton::dragEnterEvent( TQDragEnterEvent *e )
{
setFocus();
@@ -252,7 +252,7 @@ void StyledButton::dragEnterEvent( TQDragEnterEvent *e )
void StyledButton::dragLeaveEvent( TQDragLeaveEvent * )
{
if ( hasFocus() )
- parentWidget()->setFocus();
+ tqparentWidget()->setFocus();
}
void StyledButton::dragMoveEvent( TQDragMoveEvent *e )
@@ -286,5 +286,5 @@ void StyledButton::dropEvent( TQDropEvent *e )
e->ignore();
}
}
-#endif // QT_NO_DRAGANDDROP
+#endif // TQT_NO_DRAGANDDROP
#include "styledbutton.moc"
diff --git a/kommander/editor/styledbutton.h b/kommander/editor/styledbutton.h
index cb5f4e92..a8daca52 100644
--- a/kommander/editor/styledbutton.h
+++ b/kommander/editor/styledbutton.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -28,22 +28,23 @@ class TQColor;
class TQBrush;
class FormWindow;
-class StyledButton : public QButton
+class StyledButton : public TQButton
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( TQColor color READ color WRITE setColor )
- Q_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
- Q_PROPERTY( EditorType editor READ editor WRITE setEditor )
- Q_PROPERTY( bool scale READ scale WRITE setScale )
+ TQ_PROPERTY( TQColor color READ color WRITE setColor )
+ TQ_PROPERTY( TQPixmap pixmap READ pixmap WRITE setPixmap )
+ TQ_PROPERTY( EditorType editor READ editor WRITE setEditor )
+ TQ_PROPERTY( bool scale READ scale WRITE setScale )
Q_ENUMS( EditorType )
public:
enum EditorType { ColorEditor, PixmapEditor };
- StyledButton( TQWidget* parent = 0, const char* name = 0 );
- StyledButton( const TQBrush& b, TQWidget* parent = 0, const char* name = 0, WFlags f = 0 );
+ StyledButton( TQWidget* tqparent = 0, const char* name = 0 );
+ StyledButton( const TQBrush& b, TQWidget* tqparent = 0, const char* name = 0, WFlags f = 0 );
~StyledButton();
void setEditor( EditorType );
@@ -58,8 +59,8 @@ public:
void setScale( bool );
bool scale() const;
- TQSize sizeHint() const;
- TQSize minimumSizeHint() const;
+ TQSize tqsizeHint() const;
+ TQSize tqminimumSizeHint() const;
void setFormWindow( FormWindow *fw ) { formWindow = fw; }
@@ -72,12 +73,12 @@ signals:
protected:
void mousePressEvent(TQMouseEvent*);
void mouseMoveEvent(TQMouseEvent*);
-#ifndef QT_NO_DRAGANDDROP
+#ifndef TQT_NO_DRAGANDDROP
void dragEnterEvent ( TQDragEnterEvent * );
void dragMoveEvent ( TQDragMoveEvent * );
void dragLeaveEvent ( TQDragLeaveEvent * );
void dropEvent ( TQDropEvent * );
-#endif // QT_NO_DRAGANDDROP
+#endif // TQT_NO_DRAGANDDROP
void drawButton( TQPainter* );
void drawButtonLabel( TQPainter* );
void resizeEvent( TQResizeEvent* );
diff --git a/kommander/editor/tableeditor.ui b/kommander/editor/tableeditor.ui
index 26345a3f..b3331a98 100644
--- a/kommander/editor/tableeditor.ui
+++ b/kommander/editor/tableeditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>TableEditorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>TableEditorBase</cstring>
</property>
@@ -28,7 +28,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTable" row="0" column="0">
+ <widget class="TQTable" row="0" column="0">
<column>
<property name="text">
<string>1</string>
@@ -52,7 +52,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>Layout11</cstring>
</property>
@@ -66,7 +66,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -87,14 +87,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -111,7 +111,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonApply</cstring>
</property>
@@ -125,7 +125,7 @@
<string>Apply all changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -141,11 +141,11 @@
</widget>
</hbox>
</widget>
- <widget class="QTabWidget" row="0" column="1">
+ <widget class="TQTabWidget" row="0" column="1">
<property name="name">
<cstring>TabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>columns_tab</cstring>
</property>
@@ -172,14 +172,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QListBox" row="0" column="0" rowspan="6" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="6" colspan="1">
<property name="name">
<cstring>listColumns</cstring>
</property>
@@ -194,14 +194,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>buttonColumnUp</cstring>
</property>
@@ -218,7 +218,7 @@
<string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="5" column="1">
+ <widget class="TQPushButton" row="5" column="1">
<property name="name">
<cstring>buttonColumnDown</cstring>
</property>
@@ -235,7 +235,7 @@
<string>&lt;b&gt;Move the selected item down.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>buttonDeleteColumn</cstring>
</property>
@@ -243,7 +243,7 @@
<string>&amp;Delete Column</string>
</property>
</widget>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>buttonNewColumn</cstring>
</property>
@@ -251,7 +251,7 @@
<string>&amp;New Column</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>Layout6</cstring>
</property>
@@ -265,7 +265,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>labelTable</cstring>
</property>
@@ -273,7 +273,7 @@
<string>Table:</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="1">
+ <widget class="TQLayoutWidget" row="3" column="1">
<property name="name">
<cstring>Layout2</cstring>
</property>
@@ -287,7 +287,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelColumnPixmap</cstring>
</property>
@@ -295,11 +295,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDeleteColPixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -318,11 +318,11 @@
<string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonChooseColPixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -340,7 +340,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
@@ -351,7 +351,7 @@
<cstring>editColumnText</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>Label2</cstring>
</property>
@@ -362,7 +362,7 @@
<cstring>itemChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>labelFields</cstring>
</property>
@@ -373,12 +373,12 @@
<cstring>comboFields</cstring>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1">
+ <widget class="TQLineEdit" row="2" column="1">
<property name="name">
<cstring>editColumnText</cstring>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<property name="name">
<cstring>comboFields</cstring>
</property>
@@ -386,7 +386,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLabel" row="0" column="1">
+ <widget class="TQLabel" row="0" column="1">
<property name="name">
<cstring>labelTableValue</cstring>
</property>
@@ -398,7 +398,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>rows_tab</cstring>
</property>
@@ -425,14 +425,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="4" column="1">
+ <widget class="TQPushButton" row="4" column="1">
<property name="name">
<cstring>buttonRowUp</cstring>
</property>
@@ -449,12 +449,12 @@
<string>&lt;b&gt;Move the selected item up.&lt;/b&gt;&lt;p&gt;The top-most column will be the first column of the list.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QListBox" row="0" column="0" rowspan="6" colspan="1">
+ <widget class="TQListBox" row="0" column="0" rowspan="6" colspan="1">
<property name="name">
<cstring>listRows</cstring>
</property>
</widget>
- <widget class="QPushButton" row="5" column="1">
+ <widget class="TQPushButton" row="5" column="1">
<property name="name">
<cstring>buttonRowDown</cstring>
</property>
@@ -481,14 +481,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton" row="0" column="1">
+ <widget class="TQPushButton" row="0" column="1">
<property name="name">
<cstring>buttonNewRow</cstring>
</property>
@@ -496,7 +496,7 @@
<string>&amp;New Row</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>buttonDeleteRow</cstring>
</property>
@@ -504,7 +504,7 @@
<string>&amp;Delete Row</string>
</property>
</widget>
- <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>Layout7_2</cstring>
</property>
@@ -518,7 +518,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>TextLabel2_3</cstring>
</property>
@@ -529,7 +529,7 @@
<cstring>editRowText</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>Label2_2</cstring>
</property>
@@ -540,7 +540,7 @@
<cstring>itemChoosePixmap</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="1" column="1">
+ <widget class="TQLayoutWidget" row="1" column="1">
<property name="name">
<cstring>Layout2_2</cstring>
</property>
@@ -554,7 +554,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>labelRowPixmap</cstring>
</property>
@@ -562,11 +562,11 @@
<string>Label4</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDeleteRowPixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -585,11 +585,11 @@
<string>&lt;b&gt;Delete the selected item's pixmap.&lt;/b&gt;&lt;p&gt;The pixmap in the current column of the selected item will be deleted.&lt;/p&gt;</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonChooseRowPixmap</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>30</width>
<height>22</height>
@@ -607,7 +607,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>editRowText</cstring>
</property>
@@ -645,15 +645,15 @@
</connection>
<connection>
<sender>listColumns</sender>
- <signal>currentChanged(QListBoxItem*)</signal>
+ <signal>currentChanged(TQListBoxItem*)</signal>
<receiver>TableEditorBase</receiver>
- <slot>currentColumnChanged(QListBoxItem*)</slot>
+ <slot>currentColumnChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>listColumns</sender>
- <signal>selectionChanged(QListBoxItem*)</signal>
+ <signal>selectionChanged(TQListBoxItem*)</signal>
<receiver>TableEditorBase</receiver>
- <slot>currentColumnChanged(QListBoxItem*)</slot>
+ <slot>currentColumnChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>editColumnText</sender>
@@ -693,15 +693,15 @@
</connection>
<connection>
<sender>listRows</sender>
- <signal>selectionChanged(QListBoxItem*)</signal>
+ <signal>selectionChanged(TQListBoxItem*)</signal>
<receiver>TableEditorBase</receiver>
- <slot>currentRowChanged(QListBoxItem*)</slot>
+ <slot>currentRowChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>listRows</sender>
- <signal>currentChanged(QListBoxItem*)</signal>
+ <signal>currentChanged(TQListBoxItem*)</signal>
<receiver>TableEditorBase</receiver>
- <slot>currentRowChanged(QListBoxItem*)</slot>
+ <slot>currentRowChanged(TQListBoxItem*)</slot>
</connection>
<connection>
<sender>buttonNewRow</sender>
@@ -769,9 +769,9 @@
<slot access="protected" language="C++" returnType="void">chooseRowPixmapClicked()</slot>
<slot access="protected" language="C++" returnType="void">columnTextChanged( const QString &amp; )</slot>
<slot access="protected" language="C++" returnType="void">columnUpClicked()</slot>
- <slot access="protected" language="C++" returnType="void">currentColumnChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentColumnChanged( TQListBoxItem * )</slot>
<slot access="protected" language="C++" returnType="void">currentFieldChanged( const QString &amp; )</slot>
- <slot access="protected" language="C++" returnType="void">currentRowChanged( QListBoxItem * )</slot>
+ <slot access="protected" language="C++" returnType="void">currentRowChanged( TQListBoxItem * )</slot>
<slot access="protected" language="C++" returnType="void">deleteColPixmapClicked()</slot>
<slot access="protected" language="C++" returnType="void">deleteColumnClicked()</slot>
<slot access="protected" language="C++" returnType="void">deleteRowClicked()</slot>
diff --git a/kommander/editor/tableeditorimpl.cpp b/kommander/editor/tableeditorimpl.cpp
index 58cc554d..e5b39340 100644
--- a/kommander/editor/tableeditorimpl.cpp
+++ b/kommander/editor/tableeditorimpl.cpp
@@ -1,5 +1,5 @@
#include "tableeditorimpl.h"
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
#include "formwindow.h"
@@ -21,15 +21,15 @@
#include <klocale.h>
-TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
- : TableEditorBase( parent, name, modal, fl ),
-#ifndef QT_NO_TABLE
+TableEditor::TableEditor( TQWidget* tqparent, TQWidget *editWidget, FormWindow *fw, const char* name, bool modal, WFlags fl )
+ : TableEditorBase( tqparent, name, modal, fl ),
+#ifndef TQT_NO_TABLE
editTable( (TQTable*)editWidget ),
#endif
formWindow( fw )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
labelColumnPixmap->setText( "" );
labelRowPixmap->setText( "" );
@@ -39,7 +39,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelTable->hide();
labelTableValue->hide();
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
@@ -93,7 +93,7 @@ void TableEditor::columnTextChanged( const TQString &s )
listColumns->blockSignals( true );
listColumns->changeItem( s, listColumns->currentItem() );
listColumns->blockSignals( false );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) )
table->horizontalHeader()->setLabel( listColumns->currentItem(),
*table->horizontalHeader()->iconSet( listColumns->currentItem() ), s );
@@ -130,13 +130,13 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
labelColumnPixmap->setText( "" );
editColumnText->blockSignals( false );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
if ( editTable->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
- TQString s = *fieldMap.find( listColumns->index( i ) );
+ TQString s = *fieldMap.tqfind( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
- else if ( comboFields->listBox()->findItem( s ) )
- comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->findItem( s ) ) );
+ else if ( comboFields->listBox()->tqfindItem( s ) )
+ comboFields->setCurrentItem( comboFields->listBox()->index( comboFields->listBox()->tqfindItem( s ) ) );
else
comboFields->lineEdit()->setText( s );
}
@@ -173,7 +173,7 @@ void TableEditor::deleteColumnClicked()
{
if ( listColumns->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumCols( table->numCols() - 1 );
delete listColumns->item( listColumns->currentItem() );
readColumns();
@@ -188,7 +188,7 @@ void TableEditor::deleteRowClicked()
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumRows( table->numRows() - 1 );
delete listRows->item( listRows->currentItem() );
readRows();
@@ -201,14 +201,14 @@ void TableEditor::deleteRowClicked()
void TableEditor::newColumnClicked()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumCols( table->numCols() + 1 );
TQMap<TQString, bool> m;
for ( int i = 0; i < table->numCols() - 1; ++i )
m.insert( table->horizontalHeader()->label( i ), true );
int n = table->numCols() - 1;
TQString t = TQString::number( n );
- while ( m.find( t ) != m.end() )
+ while ( m.tqfind( t ) != m.end() )
t = TQString::number( ++n );
table->horizontalHeader()->setLabel( table->numCols() - 1, t );
listColumns->insertItem( t );
@@ -226,14 +226,14 @@ void TableEditor::newColumnClicked()
void TableEditor::newRowClicked()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->setNumRows( table->numRows() + 1 );
TQMap<TQString, bool> m;
for ( int i = 0; i < table->numRows() - 1; ++i )
m.insert( table->verticalHeader()->label( i ), true );
int n = table->numRows() - 1;
TQString t = TQString::number( n );
- while ( m.find( t ) != m.end() )
+ while ( m.tqfind( t ) != m.end() )
t = TQString::number( ++n );
table->verticalHeader()->setLabel( table->numRows() - 1, t );
listRows->insertItem( t );
@@ -267,7 +267,7 @@ void TableEditor::rowTextChanged( const TQString &s )
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
listRows->changeItem( s, listRows->currentItem() );
if ( table->verticalHeader()->iconSet( listRows->currentItem() ) )
table->verticalHeader()->setLabel( listRows->currentItem(),
@@ -296,13 +296,13 @@ void TableEditor::applyClicked()
TQValueList<PopulateTableCommand::Column> cols;
int i = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_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 = *fieldMap.find( i );
+ col.field = *fieldMap.tqfind( i );
cols.append( col );
}
for ( i = 0; i < table->verticalHeader()->count(); ++i ) {
@@ -312,7 +312,7 @@ void TableEditor::applyClicked()
row.pix = table->verticalHeader()->iconSet( i )->pixmap();
rows.append( row );
}
- PopulateTableCommand *cmd = new PopulateTableCommand( i18n("Edit Rows and Columns of '%1' " ).arg( editTable->name() ),
+ PopulateTableCommand *cmd = new PopulateTableCommand( i18n("Edit Rows and Columns of '%1' " ).tqarg( editTable->name() ),
formWindow, editTable, rows, cols );
cmd->execute();
formWindow->commandHistory()->addCommand( cmd );
@@ -332,7 +332,7 @@ void TableEditor::chooseRowPixmapClicked()
if ( pix.isNull() )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->verticalHeader()->setLabel( listRows->currentItem(), pix, table->verticalHeader()->label( listRows->currentItem() ) );
listRows->changeItem( pix, listRows->currentText(), listRows->currentItem() );
#endif
@@ -342,7 +342,7 @@ void TableEditor::deleteRowPixmapClicked()
{
if ( listRows->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->verticalHeader()->setLabel( listRows->currentItem(), TQPixmap(), table->verticalHeader()->label( listRows->currentItem() ) );
listRows->changeItem( listRows->currentText(), listRows->currentItem() );
#endif
@@ -360,7 +360,7 @@ void TableEditor::chooseColPixmapClicked()
if ( pix.isNull() )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->horizontalHeader()->setLabel( listColumns->currentItem(), pix, table->horizontalHeader()->label( listColumns->currentItem() ) );
listColumns->changeItem( pix, listColumns->currentText(), listColumns->currentItem() );
#endif
@@ -370,7 +370,7 @@ void TableEditor::deleteColPixmapClicked()
{
if ( listColumns->currentItem() == -1 )
return;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
table->horizontalHeader()->setLabel( listColumns->currentItem(), TQPixmap(), table->horizontalHeader()->label( listColumns->currentItem() ) );
listColumns->changeItem( listColumns->currentText(), listColumns->currentItem() );
#endif
@@ -378,10 +378,10 @@ void TableEditor::deleteColPixmapClicked()
void TableEditor::readFromTable()
{
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
TQHeader *cols = editTable->horizontalHeader();
table->setNumCols( cols->count() );
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) );
for ( int i = 0; i < cols->count(); ++i ) {
if ( editTable->horizontalHeader()->iconSet( i ) ) {
table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),
@@ -392,7 +392,7 @@ void TableEditor::readFromTable()
table->horizontalHeader()->setLabel( i, editTable->horizontalHeader()->label( i ) );
listColumns->insertItem( editTable->horizontalHeader()->label( i ) );
}
- TQString cf = *columnFields.find( editTable->horizontalHeader()->label( i ) );
+ TQString cf = *columnFields.tqfind( editTable->horizontalHeader()->label( i ) );
fieldMap.insert( i, cf );
}
@@ -425,7 +425,7 @@ void TableEditor::readFromTable()
void TableEditor::readColumns()
{
int j = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
for ( TQListBoxItem *i = listColumns->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->horizontalHeader()->setLabel( j, *i->pixmap(), i->text() );
@@ -438,7 +438,7 @@ void TableEditor::readColumns()
void TableEditor::readRows()
{
int j = 0;
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
for ( TQListBoxItem *i = listRows->firstItem(); i; i = i->next(), ++j ) {
if ( i->pixmap() )
table->verticalHeader()->setLabel( j, *i->pixmap(), i->text() );
diff --git a/kommander/editor/tableeditorimpl.h b/kommander/editor/tableeditorimpl.h
index 5fb1ccc4..c0b8ce85 100644
--- a/kommander/editor/tableeditorimpl.h
+++ b/kommander/editor/tableeditorimpl.h
@@ -11,9 +11,10 @@ class FormWindow;
class TableEditor : public TableEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
+ TableEditor( TQWidget* tqparent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~TableEditor();
diff --git a/kommander/editor/templates/Configuration_Dialog.ui b/kommander/editor/templates/Configuration_Dialog.ui
index 199f5b90..4724398b 100644
--- a/kommander/editor/templates/Configuration_Dialog.ui
+++ b/kommander/editor/templates/Configuration_Dialog.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>MyDialog2</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>MyDialog2</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QListBox" row="0" column="0">
+ <widget class="TQListBox" row="0" column="0">
<item>
<property name="text">
<string>New Item</string>
@@ -43,11 +43,11 @@
</sizepolicy>
</property>
</widget>
- <widget class="QTabWidget" row="0" column="1">
+ <widget class="TQTabWidget" row="0" column="1">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget2</cstring>
</property>
@@ -55,7 +55,7 @@
<string>Tab</string>
</attribute>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget3</cstring>
</property>
@@ -64,7 +64,7 @@
</attribute>
</widget>
</widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -78,7 +78,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -102,14 +102,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -123,7 +123,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -152,5 +152,5 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
index 77d77cb3..6d9edca0 100644
--- a/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Bottom).ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>MyDialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>MyDialog</cstring>
</property>
@@ -15,7 +15,7 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -37,7 +37,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -61,14 +61,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -82,7 +82,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -110,5 +110,5 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/templates/Dialog_with_Buttons_(Right).ui b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
index fd2c01f0..93650a87 100644
--- a/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
+++ b/kommander/editor/templates/Dialog_with_Buttons_(Right).ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>MyDialog</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>MyDialog</cstring>
</property>
@@ -15,7 +15,7 @@
<property name="sizeGripEnabled">
<bool>true</bool>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout5</cstring>
</property>
@@ -37,7 +37,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -51,7 +51,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -62,7 +62,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -86,7 +86,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -110,5 +110,5 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/templates/Tab_Dialog.ui b/kommander/editor/templates/Tab_Dialog.ui
index a2ad9315..4e0a7124 100644
--- a/kommander/editor/templates/Tab_Dialog.ui
+++ b/kommander/editor/templates/Tab_Dialog.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>MyDialog1</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>MyDialog1</cstring>
</property>
@@ -25,11 +25,11 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QTabWidget">
+ <widget class="TQTabWidget">
<property name="name">
<cstring>tabWidget</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget8</cstring>
</property>
@@ -37,7 +37,7 @@
<string>Tab</string>
</attribute>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>Widget9</cstring>
</property>
@@ -46,7 +46,7 @@
</attribute>
</widget>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -60,7 +60,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -84,14 +84,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -105,7 +105,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -134,5 +134,5 @@
<slot>reject()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/timestamp.cpp b/kommander/editor/timestamp.cpp
index e92fc78f..62cac72d 100644
--- a/kommander/editor/timestamp.cpp
+++ b/kommander/editor/timestamp.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -24,8 +24,8 @@
class TQTimer;
-TimeStamp::TimeStamp( TQObject *parent, const TQString &f )
- : TQObject( parent ), filename( f ), autoCheck( false )
+TimeStamp::TimeStamp( TQObject *tqparent, const TQString &f )
+ : TQObject( tqparent ), filename( f ), autoCheck( false )
{
timer = new TQTimer( this );
connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) );
diff --git a/kommander/editor/timestamp.h b/kommander/editor/timestamp.h
index d3e061f9..1df9f916 100644
--- a/kommander/editor/timestamp.h
+++ b/kommander/editor/timestamp.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,12 +25,13 @@
#include <tqdatetime.h>
#include <tqtimer.h>
-class TimeStamp : public QObject
+class TimeStamp : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- TimeStamp( TQObject *parent, const TQString &f );
+ TimeStamp( TQObject *tqparent, const TQString &f );
void setFileName( const TQString &f );
TQString fileName() const;
diff --git a/kommander/editor/widgetdatabase.cpp b/kommander/editor/widgetdatabase.cpp
index 3661f700..73349c3b 100644
--- a/kommander/editor/widgetdatabase.cpp
+++ b/kommander/editor/widgetdatabase.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -53,13 +53,13 @@ static TQStrList *wGroups;
static TQStrList *invisibleGroups;
static bool whatsThisLoaded = false;
#ifndef KOMMANDER
-static QPluginManager<WidgetInterface> *widgetPluginManager = 0;
+static TQPluginManager<WidgetInterface> *widgetPluginManager = 0;
#endif
static bool plugins_set_up = false;
static bool was_in_setup = false;
#ifndef KOMMANDER
-TQCleanupHandler<QPluginManager<WidgetInterface> > cleanup_manager;
+TQCleanupHandler<TQPluginManager<WidgetInterface> > cleanup_manager;
#endif
WidgetDatabaseRecord::WidgetDatabaseRecord()
@@ -89,7 +89,7 @@ WidgetDatabaseRecord::~WidgetDatabaseRecord()
one application doesn't make sense anyway and so you don't need more
than an instance of the widgetdatabase.
- For creating widgets, layouts, etc. see WidgetFactory.
+ For creating widgets, tqlayouts, etc. see WidgetFactory.
*/
/*!
@@ -134,35 +134,35 @@ void WidgetDatabase::setupDataBase( int id )
/* Designer widgets */
r = new WidgetDatabaseRecord;
r->iconName = "pushbutton.xpm";
- r->name = "TQPushButton";
+ r->name = TQPUSHBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Push Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "toolbutton.xpm";
- r->name = "TQToolButton";
+ r->name = TQTOOLBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Tool Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "radiobutton.xpm";
- r->name = "TQRadioButton";
+ r->name = TQRADIOBUTTON_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Radio Button");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "checkbox.xpm";
- r->name = "TQCheckBox";
+ r->name = TQCHECKBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Buttons");
r->toolTip = i18n("Check Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "groupbox.xpm";
- r->name = "TQGroupBox";
+ r->name = TQGROUPBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Group Box");
r->isContainer = true;
@@ -170,7 +170,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "buttongroup.xpm";
- r->name = "TQButtonGroup";
+ r->name = TQBUTTONGROUP_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Button Group");
r->isContainer = true;
@@ -178,7 +178,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "frame.xpm";
- r->name = "TQFrame";
+ r->name = TQFRAME_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Frame");
r->isContainer = true;
@@ -186,7 +186,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "TQTabWidget";
+ r->name = TQTABWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Containers");
r->toolTip = i18n("Tabwidget");
r->isContainer = true;
@@ -194,41 +194,41 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "listbox.xpm";
- r->name = "TQListBox";
+ r->name = TQLISTBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "listview.xpm";
- r->name = "TQListView";
+ r->name = TQLISTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("List View");
append(r);
-#if !defined(QT_NO_ICONVIEW) || defined(UIC)
+#if !defined(TQT_NO_ICONVIEW) || defined(UIC)
r = new WidgetDatabaseRecord;
r->iconName = "iconview.xpm";
- r->name = "TQIconView";
+ r->name = TQICONVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Icon View");
append(r);
#endif
-#if !defined(QT_NO_TABLE)
+#if !defined(TQT_NO_TABLE)
r = new WidgetDatabaseRecord;
r->iconName = "table.xpm";
- r->name = "TQTable";
+ r->name = TQTABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Views");
r->toolTip = i18n("Table");
append(r);
#endif
-#if !defined(QT_NO_SQL)
+#if !defined(TQT_NO_SQL)
r = new WidgetDatabaseRecord;
r->iconName = "datatable.xpm";
r->includeFile = "tqdatatable.h";
- r->name = "TQDataTable";
+ r->name = TQDATATABLE_OBJECT_NAME_STRING;
r->group = widgetGroup("Database");
r->toolTip = i18n("Data Table");
append(r);
@@ -236,21 +236,21 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "lineedit.xpm";
- r->name = "TQLineEdit";
+ r->name = TQLINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "spinbox.xpm";
- r->name = "TQSpinBox";
+ r->name = TQSPINBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Spin Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dateedit.xpm";
- r->name = "QDateEdit";
+ r->name = TQDATEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -258,7 +258,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "timeedit.xpm";
- r->name = "QTimeEdit";
+ r->name = TQTIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -266,7 +266,7 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "datetimeedit.xpm";
- r->name = "QDateTimeEdit";
+ r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Date-Time Edit");
r->includeFile = "tqdatetimeedit.h";
@@ -274,77 +274,77 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "multilineedit.xpm";
- r->name = "TQMultiLineEdit";
+ r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Multi Line Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "richtextedit.xpm";
- r->name = "TQTextEdit";
+ r->name = TQTEXTEDIT_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Rich Text Edit");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "combobox.xpm";
- r->name = "TQComboBox";
+ r->name = TQCOMBOBOX_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Combo Box");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "slider.xpm";
- r->name = "TQSlider";
+ r->name = TQSLIDER_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Slider");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "scrollbar.xpm";
- r->name = "TQScrollBar";
+ r->name = TQSCROLLBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Scrollbar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "dial.xpm";
- r->name = "TQDial";
+ r->name = TQDIAL_OBJECT_NAME_STRING;
r->group = widgetGroup("Input");
r->toolTip = i18n("Dial");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "label.xpm";
- r->name = "TQLabel";
+ r->name = TQLABEL_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Label");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "lcdnumber.xpm";
- r->name = "TQLCDNumber";
+ r->name = TQLCDNUMBER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("LCD Number");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "progress.xpm";
- r->name = "TQProgressBar";
+ r->name = TQPROGRESSBAR_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Progress Bar");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textview.xpm";
- r->name = "TQTextView";
+ r->name = TQTEXTVIEW_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->toolTip = i18n("Text View");
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "textbrowser.xpm";
- r->name = "TQTextBrowser";
+ r->name = TQTEXTBROWSER_OBJECT_NAME_STRING;
r->group = widgetGroup("Display");
r->toolTip = i18n("Text Browser");
append(r);
@@ -355,42 +355,42 @@ void WidgetDatabase::setupDataBase( int id )
r->group = widgetGroup("Temp");
r->toolTip = i18n("Spacer");
r->whatsThis =
- i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts.");
+ i18n("The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of tqlayouts.");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWidget";
+ r->name = TQWIDGET_OBJECT_NAME_STRING;
r->isForm = true;
r->group = widgetGroup("Forms");
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDialog";
+ r->name = TQDIALOG_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isForm = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQWizard";
+ r->name = TQWIZARD_OBJECT_NAME_STRING;
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QDesignerWizard";
+ r->name = "TQDesignerWizard";
r->group = widgetGroup("Forms");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "QLayoutWidget";
+ r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "";
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQSplitter";
+ r->name = TQSPLITTER_OBJECT_NAME_STRING;
r->group = widgetGroup("Temp");
r->includeFile = "tqsplitter.h";
r->isContainer = true;
@@ -398,36 +398,36 @@ void WidgetDatabase::setupDataBase( int id )
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerTabWidget";
+ r->name = "TQDesignerTabWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerWidget";
+ r->name = "TQDesignerWidget";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "tabwidget.xpm";
- r->name = "QDesignerDialog";
+ r->name = "TQDesignerDialog";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
r = new WidgetDatabaseRecord;
r->iconName = "";
- r->name = "TQMainWindow";
+ r->name = TQMAINWINDOW_OBJECT_NAME_STRING;
r->includeFile = "tqmainwindow.h";
r->group = widgetGroup("Temp");
r->isContainer = true;
append(r);
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
r = new WidgetDatabaseRecord;
- r->name = "TQDataBrowser";
+ r->name = TQDATABROWSER_OBJECT_NAME_STRING;
r->includeFile = "tqdatabrowser.h";
r->group = widgetGroup("Database");
r->toolTip = "Data Browser";
@@ -436,7 +436,7 @@ void WidgetDatabase::setupDataBase( int id )
append(r);
r = new WidgetDatabaseRecord;
- r->name = "TQDataView";
+ r->name = TQDATAVIEW_OBJECT_NAME_STRING;
r->includeFile = "tqdataview.h";
r->group = widgetGroup("Database");
r->toolTip = "Data View";
@@ -764,7 +764,7 @@ TQString WidgetDatabase::className( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->name;
}
@@ -777,7 +777,7 @@ TQString WidgetDatabase::group( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->group;
}
@@ -790,7 +790,7 @@ TQString WidgetDatabase::toolTip( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->toolTip;
}
@@ -803,7 +803,7 @@ TQString WidgetDatabase::whatsThis( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
return r->whatsThis;
}
@@ -816,7 +816,7 @@ TQString WidgetDatabase::includeFile( int id )
setupDataBase( id );
WidgetDatabaseRecord *r = at( id );
if ( !r )
- return TQString::null;
+ return TQString();
if ( r->includeFile.isNull() )
return r->name.lower() + ".h";
return r->includeFile;
@@ -833,7 +833,7 @@ bool WidgetDatabase::isForm( int id )
return r->isForm;
}
-/*! Returns whether the widget registered as \a id can have children.
+/*! Returns whether the widget registered as \a id can have tqchildren.
*/
bool WidgetDatabase::isContainer( int id )
@@ -849,7 +849,7 @@ TQString WidgetDatabase::createWidgetName( int id )
{
setupDataBase( id );
TQString n = className( id );
- if ( n == "QLayoutWidget" )
+ if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
n = "Layout";
if ( n[ 0 ] == 'Q' )
n = n.mid( 1 );
@@ -867,14 +867,14 @@ int WidgetDatabase::idFromClassName( const TQString &name )
setupDataBase( -1 );
if ( name.isEmpty() )
return 0;
- int *i = className2Id->find( name );
+ int *i = className2Id->tqfind( name );
if ( i )
return *i;
if ( name == "FormWindow" )
- return idFromClassName( "QLayoutWidget" );
+ return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING );
#ifdef UIC
setupDataBase( -2 );
- i = className2Id->find( name );
+ i = className2Id->tqfind( name );
if ( i )
return *i;
#endif
@@ -883,7 +883,7 @@ int WidgetDatabase::idFromClassName( const TQString &name )
bool WidgetDatabase::hasWidget( const TQString &name )
{
- return className2Id->find( name ) != 0;
+ return className2Id->tqfind( name ) != 0;
}
WidgetDatabaseRecord *WidgetDatabase::at( int index )
@@ -904,7 +904,7 @@ void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r )
widget_db[ index ] = r;
className2Id->insert( r->name, new int( index ) );
if ( index < dbcustom )
- dbcount = QMAX( dbcount, index );
+ dbcount = TQMAX( dbcount, index );
}
void WidgetDatabase::append( WidgetDatabaseRecord *r )
@@ -916,7 +916,7 @@ void WidgetDatabase::append( WidgetDatabaseRecord *r )
TQString WidgetDatabase::widgetGroup( const TQString &g )
{
- if ( wGroups->find( g ) == -1 )
+ if ( wGroups->tqfind( g ) == -1 )
wGroups->append( g );
return g;
}
@@ -945,7 +945,7 @@ TQString WidgetDatabase::widgetGroup( int i )
setupDataBase( -1 );
if ( i >= 0 && i < (int)wGroups->count() )
return wGroups->at( i );
- return TQString::null;
+ return TQString();
}
int WidgetDatabase::numWidgetGroups()
@@ -957,7 +957,7 @@ int WidgetDatabase::numWidgetGroups()
bool WidgetDatabase::isGroupVisible( const TQString &g )
{
setupDataBase( -1 );
- return invisibleGroups->find( g ) == -1;
+ return invisibleGroups->tqfind( g ) == -1;
}
int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r )
@@ -997,20 +997,20 @@ void WidgetDatabase::loadWhatsThis( const TQString &docPath )
}
-// ### Qt 3.1: make these publically accessible via QWidgetDatabase API
+// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API
#ifndef KOMMANDER
#if defined(UIC)
bool dbnounload = false;
TQStringList *dbpaths = 0;
#endif
-QPluginManager<WidgetInterface> *widgetManager()
+TQPluginManager<WidgetInterface> *widgetManager()
{
if ( !widgetPluginManager ) {
#ifndef KOMMANDER
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
+ widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "/designer" );
#else
- widgetPluginManager = new QPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
+ widgetPluginManager = new TQPluginManager<WidgetInterface>( IID_Widget, TQApplication::libraryPaths(), "" );
#endif
cleanup_manager.add( &widgetPluginManager );
diff --git a/kommander/editor/widgetdatabase.h b/kommander/editor/widgetdatabase.h
index 3e4078c5..24b14530 100644
--- a/kommander/editor/widgetdatabase.h
+++ b/kommander/editor/widgetdatabase.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -25,10 +25,10 @@
#include <tqstring.h>
#ifndef KOMMANDER
#include "widgetinterface.h" // up here for GCC 2.7.* compatibility
-#include <private/qpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
-extern QPluginManager<WidgetInterface> *widgetManager();
+extern TQPluginManager<WidgetInterface> *widgetManager();
#endif
struct WidgetDatabaseRecord
@@ -42,7 +42,7 @@ struct WidgetDatabaseRecord
int nameCounter;
};
-class WidgetDatabase : public Qt
+class WidgetDatabase : public TQt
{
public:
WidgetDatabase();
diff --git a/kommander/editor/widgetfactory.cpp b/kommander/editor/widgetfactory.cpp
index 2becbd33..920a3605 100644
--- a/kommander/editor/widgetfactory.cpp
+++ b/kommander/editor/widgetfactory.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -29,7 +29,7 @@
#include "mainwindow.h"
#include "formwindow.h"
#include "pixmapchooser.h"
-#include "layout.h"
+#include "tqlayout.h"
#include "listboxeditorimpl.h"
#include "listvieweditorimpl.h"
#include "iconvieweditorimpl.h"
@@ -37,7 +37,7 @@
#ifndef KOMMANDER
#include "widgetinterface.h"
#endif
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include "tableeditorimpl.h"
#endif
@@ -46,10 +46,10 @@
#include <tqpixmap.h>
#include <tqgroupbox.h>
#include <tqiconview.h>
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
#include <tqtable.h>
#endif
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include <tqdatatable.h>
#endif
#include <tqdatetimeedit.h>
@@ -81,7 +81,7 @@
#include <tqmenubar.h>
#include <tqapplication.h>
#include <tqsplitter.h>
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
#include "database.h"
#endif
@@ -123,13 +123,13 @@ FormWindow *find_formwindow( TQWidget *w )
for (;;) {
if ( w->inherits( "FormWindow" ) )
return (FormWindow*)w;
- if ( !w->parentWidget() )
+ if ( !w->tqparentWidget() )
return 0;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
}
-void QLayoutWidget::paintEvent( TQPaintEvent* )
+void TQLayoutWidget::paintEvent( TQPaintEvent* )
{
TQPainter p ( this );
p.setPen( red );
@@ -137,54 +137,54 @@ void QLayoutWidget::paintEvent( TQPaintEvent* )
}
-QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
- : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+TQDesignerTabWidget::TQDesignerTabWidget( TQWidget *tqparent, const char *name )
+ : TQTabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
}
-int QDesignerTabWidget::currentPage() const
+int TQDesignerTabWidget::currentPage() const
{
return tabBar()->currentTab();
}
-void QDesignerTabWidget::setCurrentPage( int i )
+void TQDesignerTabWidget::setCurrentPage( int i )
{
tabBar()->setCurrentTab( i );
}
-TQString QDesignerTabWidget::pageTitle() const
+TQString TQDesignerTabWidget::pageTitle() const
{
return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() );
}
-void QDesignerTabWidget::setPageTitle( const TQString& title )
+void TQDesignerTabWidget::setPageTitle( const TQString& title )
{
changeTab( TQTabWidget::currentPage(), title );
}
-void QDesignerTabWidget::setPageName( const TQCString& name )
+void TQDesignerTabWidget::setPageName( const TQCString& name )
{
if ( TQTabWidget::currentPage() )
TQTabWidget::currentPage()->setName( name );
}
-TQCString QDesignerTabWidget::pageName() const
+TQCString TQDesignerTabWidget::pageName() const
{
if ( !TQTabWidget::currentPage() )
return 0;
return TQTabWidget::currentPage()->name();
}
-int QDesignerTabWidget::count() const
+int TQDesignerTabWidget::count() const
{
return tabBar()->count();
}
-bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
+bool TQDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o != tabBar() ) return false;
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
@@ -232,7 +232,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int index = 0;
TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
- if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
break;
}
@@ -241,7 +241,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( index == tabBar()->count() -1 ) {
TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
index++;
}
@@ -269,20 +269,20 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
- if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) )
break;
}
if ( newIndex == tabBar()->count() -1 ) {
TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
newIndex++;
}
int oldIndex = 0;
for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
- if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) )
break;
}
@@ -303,7 +303,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
return false;
}
-int QDesignerWizard::currentPageNum() const
+int TQDesignerWizard::currentPageNum() const
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == currentPage() )
@@ -312,7 +312,7 @@ int QDesignerWizard::currentPageNum() const
return 0;
}
-void QDesignerWizard::setCurrentPage( int i )
+void TQDesignerWizard::setCurrentPage( int i )
{
if ( i < currentPageNum() ) {
while ( i < currentPageNum() ) {
@@ -330,30 +330,30 @@ void QDesignerWizard::setCurrentPage( int i )
}
}
-TQString QDesignerWizard::pageTitle() const
+TQString TQDesignerWizard::pageTitle() const
{
return title( currentPage() );
}
-void QDesignerWizard::setPageTitle( const TQString& title )
+void TQDesignerWizard::setPageTitle( const TQString& title )
{
setTitle( currentPage(), title );
}
-void QDesignerWizard::setPageName( const TQCString& name )
+void TQDesignerWizard::setPageName( const TQCString& name )
{
if ( TQWizard::currentPage() )
TQWizard::currentPage()->setName( name );
}
-TQCString QDesignerWizard::pageName() const
+TQCString TQDesignerWizard::pageName() const
{
if ( !TQWizard::currentPage() )
return 0;
return TQWizard::currentPage()->name();
}
-int QDesignerWizard::pageNum( TQWidget *p )
+int TQDesignerWizard::pageNum( TQWidget *p )
{
for ( int i = 0; i < pageCount(); ++i ) {
if ( page( i ) == p )
@@ -362,23 +362,23 @@ int QDesignerWizard::pageNum( TQWidget *p )
return -1;
}
-void QDesignerWizard::addPage( TQWidget *p, const TQString &t )
+void TQDesignerWizard::addPage( TQWidget *p, const TQString &t )
{
TQWizard::addPage( p, t );
- if ( removedPages.find( p ) )
+ if ( removedPages.tqfind( p ) )
removedPages.remove( p );
}
-void QDesignerWizard::removePage( TQWidget *p )
+void TQDesignerWizard::removePage( TQWidget *p )
{
TQWizard::removePage( p );
removedPages.insert( p, p );
}
-void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
+void TQDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index )
{
TQWizard::insertPage( p, t, index );
- if ( removedPages.find( p ) )
+ if ( removedPages.tqfind( p ) )
removedPages.remove( p );
}
@@ -387,10 +387,10 @@ TQMap< int, TQStringList > *changedProperties = 0;
/*!
\class WidgetFactory widgetfactory.h
- \brief Set of static functions for creating widgets, layouts and do other stuff
+ \brief Set of static functions for creating widgets, tqlayouts and do other stuff
The widget factory offers functions to create widgets, create and
- delete layouts find out other details - all based on the
+ delete tqlayouts find out other details - all based on the
WidgetDatabase's data. So the functions that use ids use the same
ids as in the WidgetDatabase.
*/
@@ -399,26 +399,26 @@ TQMap< int, TQStringList > *changedProperties = 0;
void WidgetFactory::saveDefaultProperties( TQWidget *w, int id )
{
TQMap< TQString, TQVariant> propMap;
- TQStrList lst = w->metaObject()->propertyNames( true );
+ TQStrList lst = w->tqmetaObject()->propertyNames( true );
for ( uint i = 0; i < lst.count(); ++i ) {
TQVariant var = w->property( lst.at( i ) );
if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 )
var = TQVariant( TQPixmap() );
else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 )
var = TQVariant( TQIconSet() );
- propMap.replace( lst.at( i ), var );
+ propMap.tqreplace( lst.at( i ), var );
}
- defaultProperties->replace( id, propMap );
+ defaultProperties->tqreplace( id, propMap );
}
static void saveChangedProperties( TQWidget *w, int id )
{
- TQStringList l = MetaDataBase::changedProperties( w );
+ TQStringList l = MetaDataBase::changedProperties( TQT_TQOBJECT(w) );
changedProperties->insert( id, l );
}
-EditorTabWidget::EditorTabWidget( TQWidget *parent, const char *name )
- : TabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
+EditorTabWidget::EditorTabWidget( TQWidget *tqparent, const char *name )
+ : TabWidget( tqparent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
@@ -464,7 +464,7 @@ int EditorTabWidget::count() const
bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( o != tabBar() ) return false;
+ if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
@@ -512,7 +512,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
int index = 0;
TQRect rect;
for ( ; index < tabBar()->count(); index++ ) {
- if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) {
+ if ( tabBar()->tabAt( index )->rect().tqcontains( de->pos() ) ) {
rect = tabBar()->tabAt( index )->rect();
break;
}
@@ -521,7 +521,7 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( index == tabBar()->count() -1 ) {
TQRect rect2 = rect;
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
index++;
}
@@ -549,20 +549,20 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
int newIndex = 0;
for ( ; newIndex < tabBar()->count(); newIndex++ ) {
- if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) )
+ if ( tabBar()->tabAt( newIndex )->rect().tqcontains( de->pos() ) )
break;
}
if ( newIndex == tabBar()->count() -1 ) {
TQRect rect2 = tabBar()->tabAt( newIndex )->rect();
rect2.setLeft( rect2.left() + rect2.width() / 2 );
- if ( rect2.contains( de->pos() ) )
+ if ( rect2.tqcontains( de->pos() ) )
newIndex++;
}
int oldIndex = 0;
for ( ; oldIndex < tabBar()->count(); oldIndex++ ) {
- if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) )
+ if ( tabBar()->tabAt( oldIndex )->rect().tqcontains( pressPoint ) )
break;
}
@@ -584,8 +584,8 @@ bool EditorTabWidget::eventFilter( TQObject *o, TQEvent *e )
}
-EditorToolBox::EditorToolBox( TQWidget *parent, const char *name )
- : ToolBox( parent, name )
+EditorToolBox::EditorToolBox( TQWidget *tqparent, const char *name )
+ : ToolBox( tqparent, name )
{
setAcceptDrops( true );
}
@@ -631,12 +631,12 @@ int EditorToolBox::count() const
/*! Creates a widget of the type which is registered as \a id as
- child of \a parent. The \a name is optional. If \a init is true, the
+ child of \a tqparent. The \a name is optional. If \a init is true, the
widget is initialized with some defaults, else the plain widget is
created.
*/
-TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
+TQWidget *WidgetFactory::create( int id, TQWidget *tqparent, const char *name, bool init, const TQRect *r, Qt::Orientation orient )
{
TQString n = WidgetDatabase::className(id);
//qDebug("Trying to create '%s'", n.latin1());
@@ -652,108 +652,108 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
TQWidget *w = 0;
TQString str = WidgetDatabase::createWidgetName(id);
const char *s = str.latin1();
- w = createWidget(n, parent, name ? name : s, init, r, orient);
+ w = createWidget(n, tqparent, name ? name : s, init, r, orient);
//qDebug("Trying to create '%s', widget (id=%d) - %s", s, id, w ? "successful" : "failure");
if (!w && WidgetDatabase::isCustomWidget(id))
- w = createCustomWidget(parent, name ? name : s, MetaDataBase::customWidget(id));
+ w = createCustomWidget(tqparent, name ? name : s, MetaDataBase::customWidget(id));
if (!w)
return 0;
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
- if (!defaultProperties->contains(id))
+ if (!defaultProperties->tqcontains(id))
saveDefaultProperties(w, id);
- if (!changedProperties->contains(id))
+ if (!changedProperties->tqcontains(id))
saveChangedProperties(w, id);
return w;
}
-/*! Creates a layout on the widget \a widget of the type \a type
+/*! Creates a tqlayout on the widget \a widget of the type \a type
which can be \c HBox, \c VBox or \c Grid.
*/
-TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type )
+TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *tqlayout, LayoutType type )
{
int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0;
if ( widget && !widget->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) &&
- ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
- widget && widget->parentWidget() && widget->parentWidget()->inherits( "FormWindow" ) ) )
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ||
+ widget && widget->tqparentWidget() && widget->tqparentWidget()->inherits( "FormWindow" ) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQTOOLBOX_OBJECT_NAME_STRING ) )
widget = ((TQToolBox*)widget)->currentItem();
- if ( !layout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIZARD_OBJECT_NAME_STRING ) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ if ( !tqlayout && widget && widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- MetaDataBase::addEntry( widget );
+ MetaDataBase::addEntry( TQT_TQOBJECT(widget) );
- if ( !layout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
+ if ( !tqlayout && widget && widget->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
gb->setColumnLayout( 0, Qt::Vertical );
- gb->layout()->setMargin( 0 );
- gb->layout()->setSpacing( 0 );
+ gb->tqlayout()->setMargin( 0 );
+ gb->tqlayout()->setSpacing( 0 );
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( gb->layout() );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQHBoxLayout( gb->tqlayout() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
- l = new TQVBoxLayout( gb->layout(), spacing );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQVBoxLayout( gb->tqlayout(), spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid:
- l = new QDesignerGridLayout( gb->layout() );
- MetaDataBase::setMargin( gb, margin );
- MetaDataBase::setSpacing( gb, spacing );
- l->setAlignment( AlignTop );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( gb->tqlayout() );
+ MetaDataBase::setMargin( TQT_TQOBJECT(gb), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(gb), spacing );
+ l->tqsetAlignment( AlignTop );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
default:
return 0;
}
} else {
- if ( layout ) {
+ if ( tqlayout ) {
TQLayout *l;
switch ( type ) {
case HBox:
- l = new TQHBoxLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQHBoxLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
- l = new TQVBoxLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQVBoxLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new QDesignerGridLayout( layout );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( tqlayout );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
l->setSpacing( spacing );
l->setMargin( margin );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
}
default:
@@ -764,39 +764,39 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
switch ( type ) {
case HBox:
l = new TQHBoxLayout( widget );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case VBox:
l = new TQVBoxLayout( widget );
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
case Grid: {
- l = new QDesignerGridLayout( widget );
- MetaDataBase::addEntry( l );
+ l = new TQDesignerGridLayout( widget );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
if ( widget ) {
- MetaDataBase::setMargin( widget, margin );
- MetaDataBase::setSpacing( widget, spacing );
+ MetaDataBase::setMargin( TQT_TQOBJECT(widget), margin );
+ MetaDataBase::setSpacing( TQT_TQOBJECT(widget), spacing );
} else {
l->setMargin( margin );
l->setSpacing( margin );
}
- MetaDataBase::addEntry( l );
+ MetaDataBase::addEntry( TQT_TQOBJECT(l) );
return l;
}
default:
@@ -819,17 +819,17 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
widget = ((TQMainWindow*)widget)->centralWidget();
if ( widget->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- delete widget->layout();
+ delete widget->tqlayout();
}
/*! Factory functions for creating a widget of the type \a className
- as child of \a parent with the name \a name.
+ as child of \a tqparent with the name \a name.
If \a init is true, some initial default properties are set. This
has to be in sync with the initChangedProperties() function!
*/
-TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init,
const TQRect *r, Qt::Orientation orient )
{
if (className == TQPUSHBUTTON_OBJECT_NAME_STRING)
@@ -837,11 +837,11 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQPushButton *b = 0;
if (init)
{
- b = new QDesignerPushButton(parent, name);
- b->setText(TQString::fromLatin1(name));
+ b = new TQDesignerPushButton(tqparent, name);
+ b->setText(TQString::tqfromLatin1(name));
} else
{
- b = new QDesignerPushButton(parent, name);
+ b = new TQDesignerPushButton(tqparent, name);
}
TQWidget *w = find_formwindow(b);
b->setAutoDefault(w && ((FormWindow *) w)->mainContainer()->inherits(TQDIALOG_OBJECT_NAME_STRING));
@@ -850,43 +850,43 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
{
if (init)
{
- QDesignerToolButton *tb = new QDesignerToolButton(parent, name);
+ TQDesignerToolButton *tb = new TQDesignerToolButton(tqparent, name);
tb->setText("...");
return tb;
}
- return new QDesignerToolButton(parent, name);
+ return new TQDesignerToolButton(tqparent, name);
} else if (className == TQCHECKBOX_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerCheckBox *cb = new QDesignerCheckBox(parent, name);
- cb->setText(TQString::fromLatin1(name));
+ TQDesignerCheckBox *cb = new TQDesignerCheckBox(tqparent, name);
+ cb->setText(TQString::tqfromLatin1(name));
return cb;
}
- return new QDesignerCheckBox(parent, name);
+ return new TQDesignerCheckBox(tqparent, name);
} else if (className == TQRADIOBUTTON_OBJECT_NAME_STRING)
{
if (init)
{
- QDesignerRadioButton *rb = new QDesignerRadioButton(parent, name);
- rb->setText(TQString::fromLatin1(name));
+ TQDesignerRadioButton *rb = new TQDesignerRadioButton(tqparent, name);
+ rb->setText(TQString::tqfromLatin1(name));
return rb;
}
- return new QDesignerRadioButton(parent, name);
+ return new TQDesignerRadioButton(tqparent, name);
} else if (className == TQGROUPBOX_OBJECT_NAME_STRING)
{
if (init)
- return new TQGroupBox(TQString::fromLatin1(name), parent, name);
- return new TQGroupBox(parent, name);
+ return new TQGroupBox(TQString::tqfromLatin1(name), tqparent, name);
+ return new TQGroupBox(tqparent, name);
} else if (className == TQBUTTONGROUP_OBJECT_NAME_STRING)
{
if (init)
- return new TQButtonGroup(TQString::fromLatin1(name), parent, name);
- return new TQButtonGroup(parent, name);
+ return new TQButtonGroup(TQString::tqfromLatin1(name), tqparent, name);
+ return new TQButtonGroup(tqparent, name);
} else if (className == TQICONVIEW_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_ICONVIEW)
- TQIconView *iv = new TQIconView(parent, name);
+#if !defined(TQT_NO_ICONVIEW)
+ TQIconView *iv = new TQIconView(tqparent, name);
if (init)
(void) new TQIconViewItem(iv, i18n("New Item"));
return iv;
@@ -895,30 +895,30 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
#endif
} else if (className == TQTABLE_OBJECT_NAME_STRING)
{
-#if !defined(QT_NO_TABLE)
+#if !defined(TQT_NO_TABLE)
if (init)
- return new TQTable(3, 3, parent, name);
- return new TQTable(parent, name);
+ return new TQTable(3, 3, tqparent, name);
+ return new TQTable(tqparent, name);
#else
return 0;
#endif
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
} else if (className == TQDATATABLE_OBJECT_NAME_STRING)
{
- return new TQDataTable(parent, name);
-#endif //QT_NO_SQL
+ return new TQDataTable(tqparent, name);
+#endif //TQT_NO_SQL
} else if (className == TQDATEEDIT_OBJECT_NAME_STRING)
{
- return new QDateEdit(parent, name);
+ return new TQDateEdit(tqparent, name);
} else if (className == TQTIMEEDIT_OBJECT_NAME_STRING)
{
- return new QTimeEdit(parent, name);
+ return new TQTimeEdit(tqparent, name);
} else if (className == TQDATETIMEEDIT_OBJECT_NAME_STRING)
{
- return new QDateTimeEdit(parent, name);
+ return new TQDateTimeEdit(tqparent, name);
} else if (className == TQLISTBOX_OBJECT_NAME_STRING)
{
- TQListBox *lb = new TQListBox(parent, name);
+ TQListBox *lb = new TQListBox(tqparent, name);
if (init)
{
lb->insertItem(i18n("New Item"));
@@ -927,7 +927,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return lb;
} else if (className == TQLISTVIEW_OBJECT_NAME_STRING)
{
- TQListView *lv = new TQListView(parent, name);
+ TQListView *lv = new TQListView(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -936,91 +936,91 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
return lv;
} else if (className == TQLINEEDIT_OBJECT_NAME_STRING)
- return new TQLineEdit(parent, name);
+ return new TQLineEdit(tqparent, name);
else if (className == TQSPINBOX_OBJECT_NAME_STRING)
- return new TQSpinBox(parent, name);
+ return new TQSpinBox(tqparent, name);
else if (className == TQSPLITTER_OBJECT_NAME_STRING)
- return new TQSplitter(parent, name);
+ return new TQSplitter(tqparent, name);
else if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
- return new TQMultiLineEdit(parent, name);
+ return new TQMultiLineEdit(tqparent, name);
else if (className == TQTEXTEDIT_OBJECT_NAME_STRING)
- return new TQTextEdit(parent, name);
+ return new TQTextEdit(tqparent, name);
else if (className == TQLABEL_OBJECT_NAME_STRING)
{
- QDesignerLabel *l = new QDesignerLabel(parent, name);
+ TQDesignerLabel *l = new TQDesignerLabel(tqparent, name);
if (init)
{
- l->setText(TQString::fromLatin1(name));
- MetaDataBase::addEntry(l);
- MetaDataBase::setPropertyChanged(l, "text", true);
+ l->setText(TQString::tqfromLatin1(name));
+ MetaDataBase::addEntry(TQT_TQOBJECT(l));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "text", true);
}
return l;
} else if (className == TQLAYOUTWIDGET_OBJECT_NAME_STRING)
- return new QLayoutWidget(parent, name);
+ return new TQLayoutWidget(tqparent, name);
else if (className == TQTABWIDGET_OBJECT_NAME_STRING)
{
- TQTabWidget *tw = new QDesignerTabWidget(parent, name);
+ TQTabWidget *tw = new TQDesignerTabWidget(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
} else if (className == TQCOMBOBOX_OBJECT_NAME_STRING)
{
- return new TQComboBox(false, parent, name);
+ return new TQComboBox(false, tqparent, name);
} else if (className == TQWIDGET_OBJECT_NAME_STRING)
{
- if (parent &&
- (parent->inherits("FormWindow") || parent->inherits(TQWIZARD_OBJECT_NAME_STRING)
- || parent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || parent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || parent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
+ if (tqparent &&
+ (tqparent->inherits("FormWindow") || tqparent->inherits(TQWIZARD_OBJECT_NAME_STRING)
+ || tqparent->inherits(TQTABWIDGET_OBJECT_NAME_STRING) || tqparent->inherits(TQTOOLBOX_OBJECT_NAME_STRING) || tqparent->inherits(TQMAINWINDOW_OBJECT_NAME_STRING)))
{
- FormWindow *fw = find_formwindow(parent);
+ FormWindow *fw = find_formwindow(tqparent);
if (fw)
{
- QDesignerWidget *dw = new QDesignerWidget(fw, parent, name);
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget(fw, tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
return dw;
}
}
- return new TQWidget(parent, name);
+ return new TQWidget(tqparent, name);
} else if (className == TQDIALOG_OBJECT_NAME_STRING)
{
TQDialog *dia = 0;
- if (parent && parent->inherits("FormWindow"))
- dia = new QDesignerDialog((FormWindow *) parent, parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ dia = new TQDesignerDialog((FormWindow *) tqparent, tqparent, name);
else
- dia = new TQDialog(parent, name);
- if (parent && !parent->inherits("MainWindow"))
- dia->reparent(parent, TQPoint(0, 0), true);
+ dia = new TQDialog(tqparent, name);
+ if (tqparent && !tqparent->inherits("MainWindow"))
+ dia->reparent(tqparent, TQPoint(0, 0), true);
return dia;
} else if (className == TQWIZARD_OBJECT_NAME_STRING)
{
- TQWizard *wiz = new QDesignerWizard(parent, name);
- if (parent && !parent->inherits("MainWindow"))
+ TQWizard *wiz = new TQDesignerWizard(tqparent, name);
+ if (tqparent && !tqparent->inherits("MainWindow"))
{
- wiz->reparent(parent, TQPoint(0, 0), true);
+ wiz->reparent(tqparent, TQPoint(0, 0), true);
}
- if (init && parent && parent->inherits("FormWindow"))
+ if (init && tqparent && tqparent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
}
return wiz;
} else if (className == "Spacer")
{
- Spacer *s = new Spacer(parent, name);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
- MetaDataBase::setPropertyChanged(s, "sizeType", true);
+ Spacer *s = new Spacer(tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "sizeType", true);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1031,53 +1031,53 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
s->setOrientation(Qt::Horizontal);
return s;
} else if (className == TQLCDNUMBER_OBJECT_NAME_STRING)
- return new TQLCDNumber(parent, name);
+ return new TQLCDNumber(tqparent, name);
else if (className == TQPROGRESSBAR_OBJECT_NAME_STRING)
- return new TQProgressBar(parent, name);
+ return new TQProgressBar(tqparent, name);
else if (className == TQTEXTVIEW_OBJECT_NAME_STRING)
- return new TQTextView(parent, name);
+ return new TQTextView(tqparent, name);
else if (className == TQTEXTBROWSER_OBJECT_NAME_STRING)
- return new TQTextBrowser(parent, name);
+ return new TQTextBrowser(tqparent, name);
else if (className == TQDIAL_OBJECT_NAME_STRING)
- return new TQDial(parent, name);
+ return new TQDial(tqparent, name);
else if (className == TQSLIDER_OBJECT_NAME_STRING)
{
- TQSlider *s = new TQSlider(parent, name);
+ TQSlider *s = new TQSlider(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
} else if (className == TQSCROLLBAR_OBJECT_NAME_STRING)
{
- TQScrollBar *s = new TQScrollBar(parent, name);
+ TQScrollBar *s = new TQScrollBar(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
} else if (className == TQFRAME_OBJECT_NAME_STRING)
{
if (!init)
- return new TQFrame(parent, name);
- TQFrame *f = new TQFrame(parent, name);
+ return new TQFrame(tqparent, name);
+ TQFrame *f = new TQFrame(tqparent, name);
f->setFrameStyle(TQFrame::StyledPanel | TQFrame::Raised);
return f;
} else if (className == "Line")
{
- Line *l = new Line(parent, name);
- MetaDataBase::addEntry(l);
- MetaDataBase::setPropertyChanged(l, "orientation", true);
- MetaDataBase::setPropertyChanged(l, "frameShadow", true);
- MetaDataBase::setPropertyChanged(l, "frameShape", true);
+ Line *l = new Line(tqparent, name);
+ MetaDataBase::addEntry(TQT_TQOBJECT(l));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "orientation", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "frameShadow", true);
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(l), "frameShape", true);
if (!r)
return l;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
@@ -1087,38 +1087,38 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return l;
} else if (className == TQMAINWINDOW_OBJECT_NAME_STRING)
{
- TQMainWindow *mw = new KmdrMainWindow(parent, name, 0);
- mw->setDockEnabled(Qt::DockMinimized, false);
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, mw, "central widget");
+ TQMainWindow *mw = new KmdrMainWindow(tqparent, name, 0);
+ mw->setDockEnabled(TQt::DockMinimized, false);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, mw, "central widget");
mw->setDockMenuEnabled(false);
- MetaDataBase::addEntry(dw);
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
mw->setCentralWidget(dw);
(void) mw->statusBar();
dw->show();
return mw;
}
-#ifndef QT_NO_SQL
+#ifndef TQT_NO_SQL
else if (className == TQDATABROWSER_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataBrowser(parent, name);
- if (parent)
- w->reparent(parent, TQPoint(0, 0), true);
+ TQWidget *w = new TQDesignerDataBrowser(tqparent, name);
+ if (tqparent)
+ w->reparent(tqparent, TQPoint(0, 0), true);
return w;
} else if (className == TQDATAVIEW_OBJECT_NAME_STRING)
{
- TQWidget *w = new QDesignerDataView(parent, name);
- if (parent)
- w->reparent(parent, TQPoint(0, 0), true);
+ TQWidget *w = new TQDesignerDataView(tqparent, name);
+ if (tqparent)
+ w->reparent(tqparent, TQPoint(0, 0), true);
return w;
}
#endif
#ifdef KOMMANDER
if (className == "LineEdit")
- return new LineEdit(parent, name);
+ return new LineEdit(tqparent, name);
else if (className == "ListView")
{
- TQListView *lv = new TQListView(parent, name);
+ TQListView *lv = new TQListView(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -1130,29 +1130,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if (className == "Dialog")
{
TQDialog *dia = 0;
- if (parent && parent->inherits("FormWindow"))
- dia = new EditorDialog((FormWindow *) parent, parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ dia = new EditorDialog((FormWindow *) tqparent, tqparent, name);
else
- dia = new Dialog(parent, name, false);
+ dia = new Dialog(tqparent, name, false);
- if (parent)
- dia->reparent(parent, TQPoint(0, 0), true);
+ if (tqparent)
+ dia->reparent(tqparent, TQPoint(0, 0), true);
return dia;
}
else if (className == "Wizard")
{
//qDebug("Creating Wizard...");
TQWizard *wiz;
- if (parent && parent->inherits("FormWindow"))
- wiz = new QDesignerWizard(parent, name);
+ if (tqparent && tqparent->inherits("FormWindow"))
+ wiz = new TQDesignerWizard(tqparent, name);
else
- wiz = new Wizard(parent, name);
- if (parent)
- wiz->reparent(parent, TQPoint(0, 0), true);
- if (init && parent && parent->inherits("FormWindow"))
+ wiz = new Wizard(tqparent, name);
+ if (tqparent)
+ wiz->reparent(tqparent, TQPoint(0, 0), true);
+ if (init && tqparent && tqparent->inherits("FormWindow"))
{
- QDesignerWidget *dw = new QDesignerWidget((FormWindow *) parent, wiz, "page");
- MetaDataBase::addEntry(dw);
+ TQDesignerWidget *dw = new TQDesignerWidget((FormWindow *) tqparent, wiz, "page");
+ MetaDataBase::addEntry(TQT_TQOBJECT(dw));
wiz->addPage(dw, i18n("Page 1"));
wiz->addPage(dw, i18n("Page 2"));
TQTimer::singleShot(0, wiz, TQT_SLOT(next()));
@@ -1161,74 +1161,74 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
else if (className == "TabWidget")
{
- TQTabWidget *tw = new EditorTabWidget(parent, name);
+ TQTabWidget *tw = new EditorTabWidget(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "tab") : new TQWidget(tw, "tab");
tw->addTab(w, i18n("Tab 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
} else if (className == "ToolBox")
{
- TQToolBox *tw = new EditorToolBox(parent, name);
+ TQToolBox *tw = new EditorToolBox(tqparent, name);
if (init)
{
- FormWindow *fw = find_formwindow(parent);
- TQWidget *w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ FormWindow *fw = find_formwindow(tqparent);
+ TQWidget *w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 1"));
- MetaDataBase::addEntry(w);
- w = fw ? new QDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
+ w = fw ? new TQDesignerWidget(fw, tw, "toolbox") : new TQWidget(tw, "toolbox");
tw->addItem(w, i18n("Page 2"));
- MetaDataBase::addEntry(tw);
- MetaDataBase::addEntry(w);
+ MetaDataBase::addEntry(TQT_TQOBJECT(tw));
+ MetaDataBase::addEntry(TQT_TQOBJECT(w));
}
return tw;
}
else if (className == "ExecButton")
- return new ExecButton(parent, name);
+ return new ExecButton(tqparent, name);
else if (className == "CloseButton")
- return new CloseButton(parent, name);
+ return new CloseButton(tqparent, name);
else if (className == "SubDialog")
- return new SubDialog(parent, name);
+ return new SubDialog(tqparent, name);
else if (className == "FileSelector")
- return new FileSelector(parent, name);
+ return new FileSelector(tqparent, name);
else if (className == "TextEdit")
- return new TextEdit(parent, name);
+ return new TextEdit(tqparent, name);
else if (className == "RadioButton")
- return new RadioButton(parent, name);
+ return new RadioButton(tqparent, name);
else if (className == "ButtonGroup")
- return new ButtonGroup(parent, name);
+ return new ButtonGroup(tqparent, name);
else if (className == "GroupBox")
- return new GroupBox(parent, name);
+ return new GroupBox(tqparent, name);
else if (className == "CheckBox")
- return new CheckBox(parent, name);
+ return new CheckBox(tqparent, name);
else if (className == "ComboBox")
- return new ComboBox(parent, name);
+ return new ComboBox(tqparent, name);
else if (className == "SpinBoxInt")
- return new SpinBoxInt(parent, name);
+ return new SpinBoxInt(tqparent, name);
else if (className == "ListBox")
- return new ListBox(parent, name);
+ return new ListBox(tqparent, name);
else if (className == "ScriptObject")
- return new ScriptObject(parent, name);
+ return new ScriptObject(tqparent, name);
else if (className == "RichTextEditor")
- return new RichTextEditor(parent, name);
+ return new RichTextEditor(tqparent, name);
else if (className == "DatePicker")
- return new DatePicker(parent, name);
+ return new DatePicker(tqparent, name);
else if (className == "PopupMenu")
- return new PopupMenu(parent, name);
+ return new PopupMenu(tqparent, name);
else if (className == "FontDialog")
- return new FontDialog(parent, name);
+ return new FontDialog(tqparent, name);
else if (className == "AboutDialog")
- return new AboutDialog(parent, name);
+ return new AboutDialog(tqparent, name);
else if (className == "TreeWidget")
{
- TQListView *lv = new TreeWidget(parent, name);
+ TQListView *lv = new TreeWidget(tqparent, name);
lv->setSorting(-1);
if (init)
{
@@ -1238,33 +1238,33 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return lv;
} else if (className == "Slider")
{
- Slider *s = new Slider(parent, name);
+ Slider *s = new Slider(tqparent, name);
if (!r)
return s;
if (!r->isValid() || r->width() < 2 && r->height() < 2)
s->setOrientation(orient);
else if (r->width() > r->height())
s->setOrientation(Qt::Horizontal);
- MetaDataBase::addEntry(s);
- MetaDataBase::setPropertyChanged(s, "orientation", true);
+ MetaDataBase::addEntry(TQT_TQOBJECT(s));
+ MetaDataBase::setPropertyChanged(TQT_TQOBJECT(s), "orientation", true);
return s;
}
#endif
- TQWidget *w = KommanderFactory::createWidget(className, parent, name);
+ TQWidget *w = KommanderFactory::createWidget(className, tqparent, name);
return w;
}
-/*! Find out which type the layout of the widget is. Returns \c HBox,
- \c VBox, \c Grid or \c NoLayout. \a layout points to this
- TQWidget::layout() of \a w or to 0 after the function call.
+/*! Find out which type the tqlayout of the widget is. Returns \c HBox,
+ \c VBox, \c Grid or \c NoLayout. \a tqlayout points to this
+ TQWidget::tqlayout() of \a w or to 0 after the function call.
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w, TQLayout *&tqlayout )
{
- layout = 0;
+ tqlayout = 0;
if ( w && w->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) )
w = ((TQTabWidget*)w)->currentPage();
@@ -1278,19 +1278,19 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
w = ((TQWidgetStack*)w)->visibleWidget();
if ( w && w->inherits( TQSPLITTER_OBJECT_NAME_STRING ) )
- return ( (TQSplitter*)w )->orientation() == Horizontal ? HBox : VBox;
+ return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox;
- if ( !w || !w->layout() )
+ if ( !w || !w->tqlayout() )
return NoLayout;
- TQLayout *lay = w->layout();
+ TQLayout *lay = w->tqlayout();
if ( w->inherits( TQGROUPBOX_OBJECT_NAME_STRING ) ) {
- TQObjectList *l = lay->queryList( TQLAYOUT_OBJECT_NAME_STRING );
+ TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING );
if ( l && l->first() )
lay = (TQLayout*)l->first();
delete l;
}
- layout = lay;
+ tqlayout = lay;
if ( lay->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
@@ -1304,13 +1304,13 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQLayout *tqlayout )
{
- if ( layout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
+ if ( tqlayout->inherits( TQHBOXLAYOUT_OBJECT_NAME_STRING ) )
return HBox;
- else if ( layout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQVBOXLAYOUT_OBJECT_NAME_STRING ) )
return VBox;
- else if ( layout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
+ else if ( tqlayout->inherits( TQGRIDLAYOUT_OBJECT_NAME_STRING ) )
return Grid;
return NoLayout;
}
@@ -1318,25 +1318,25 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
/*!
\overload
*/
-WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
+WidgetFactory::LayoutType WidgetFactory::tqlayoutType( TQWidget *w )
{
TQLayout *l = 0;
- return layoutType( w, l );
+ return tqlayoutType( w, l );
}
-TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
+TQWidget *WidgetFactory::tqlayoutParent( TQLayout *tqlayout )
{
- TQObject *o = layout;
+ TQObject *o = TQT_TQOBJECT(tqlayout);
while ( o ) {
if ( o->isWidgetType() )
return (TQWidget*)o;
- o = o->parent();
+ o = o->tqparent();
}
return 0;
}
-/*! Returns the widget into which children should be inserted when \a
+/*! Returns the widget into which tqchildren should be inserted when \a
w is a container known to the designer.
Usually that is \a w itself, sometimes it is different (e.g. a
@@ -1363,22 +1363,22 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
}
/*! Returns the actual designer widget of the container \a w. This is
- normally \a w itself, but might be a parent or grand parent of \a w
+ normally \a w itself, but might be a tqparent or grand tqparent of \a w
(e.g. when working with a tabwidget and \a w is the container which
- contains and layouts childs, but the actual widget known to the
- designer is the tabwidget which is the parent of \a w. So this
+ contains and tqlayouts childs, but the actual widget known to the
+ designer is the tabwidget which is the tqparent of \a w. So this
function returns the tabwidget then.)
*/
TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w->parentWidget() && w->parentWidget()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
- w = w->parentWidget();
+ if ( w->tqparentWidget() && w->tqparentWidget()->inherits( TQWIDGETSTACK_OBJECT_NAME_STRING ) )
+ w = w->tqparentWidget();
while ( w ) {
- if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
- w && w->parentWidget() && w->parentWidget()->inherits( "FormWindow" ) )
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ||
+ w && w->tqparentWidget() && w->tqparentWidget()->inherits( "FormWindow" ) )
return w;
- w = w->parentWidget();
+ w = w->tqparentWidget();
}
return w;
}
@@ -1391,15 +1391,15 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things
return true;
- if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::qt_cast<TQToolBox*>(o->parent()) )
+ if ( o->inherits( TQTABBAR_OBJECT_NAME_STRING ) || ::tqqt_cast<TQToolBox*>(o->tqparent()) )
return true;
else if ( o->inherits( TQSIZEGRIP_OBJECT_NAME_STRING ) )
return true;
- else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->parent() && o->parent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
+ else if ( o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) && o->tqparent() && o->tqparent()->inherits( TQTABBAR_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
+ else if ( o->tqparent() && o->tqparent()->inherits( TQWIZARD_OBJECT_NAME_STRING ) && o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) )
return true;
- else if ( o->parent() && o->parent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
+ else if ( o->tqparent() && o->tqparent()->inherits( TQMAINWINDOW_OBJECT_NAME_STRING ) && o->inherits( TQMENUBAR_OBJECT_NAME_STRING ) )
return true;
else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
return true;
@@ -1415,43 +1415,43 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
*/
const char* WidgetFactory::classNameOf( TQObject* o )
{
- if (o->inherits("QDesignerTabWidget"))
- return "TQTabWidget";
+ if (o->inherits("TQDesignerTabWidget"))
+ return TQTABWIDGET_OBJECT_NAME_STRING;
#ifdef KOMMANDER
else if (o->inherits("EditorTabWidget"))
return "TabWidget";
else if (o->inherits("EditorToolBox"))
return "ToolBox";
#endif
- else if (o->inherits("QDesignerDialog"))
- return "TQDialog";
- else if (o->inherits("QDesignerWidget"))
- return "TQWidget";
+ else if (o->inherits("TQDesignerDialog"))
+ return TQDIALOG_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerWidget"))
+ return TQWIDGET_OBJECT_NAME_STRING;
else if (o->inherits("CustomWidget"))
return ((CustomWidget *) o)->realClassName().latin1();
- else if (o->inherits("QDesignerLabel"))
- return "TQLabel";
- else if (o->inherits("QDesignerWizard"))
- return "TQWizard";
+ else if (o->inherits("TQDesignerLabel"))
+ return TQLABEL_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerWizard"))
+ return TQWIZARD_OBJECT_NAME_STRING;
else if (o->inherits("EditorWizard"))
return "Wizard";
- else if (o->inherits("QDesignerPushButton"))
- return "TQPushButton";
- else if (o->inherits("QDesignerToolButton"))
- return "TQToolButton";
- else if (o->inherits("QDesignerRadioButton"))
- return "TQRadioButton";
- else if (o->inherits("QDesignerCheckBox"))
- return "TQCheckBox";
- else if (o->inherits("QDesignerMenuBar"))
- return "TQMenuBar";
- else if (o->inherits("QDesignerToolBar"))
- return "TQToolBar";
-#ifndef QT_NO_SQL
- else if (o->inherits("QDesignerDataBrowser"))
- return "TQDataBrowser";
- else if (o->inherits("QDesignerDataView"))
- return "TQDataView";
+ else if (o->inherits("TQDesignerPushButton"))
+ return TQPUSHBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerToolButton"))
+ return TQTOOLBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerRadioButton"))
+ return TQRADIOBUTTON_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerCheckBox"))
+ return TQCHECKBOX_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerMenuBar"))
+ return TQMENUBAR_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerToolBar"))
+ return TQTOOLBAR_OBJECT_NAME_STRING;
+#ifndef TQT_NO_SQL
+ else if (o->inherits("TQDesignerDataBrowser"))
+ return TQDATABROWSER_OBJECT_NAME_STRING;
+ else if (o->inherits("TQDesignerDataView"))
+ return TQDATAVIEW_OBJECT_NAME_STRING;
#endif
else if (o->inherits("EditorDialog"))
return "Dialog";
@@ -1466,12 +1466,12 @@ const char* WidgetFactory::classNameOf( TQObject* o )
void WidgetFactory::initChangedProperties( TQObject *o )
{
MetaDataBase::setPropertyChanged( o, "name", true );
- if ( !o->inherits( "QDesignerToolBar" ) && !o->inherits( "QDesignerMenuBar" ) )
+ if ( !o->inherits( "TQDesignerToolBar" ) && !o->inherits( "TQDesignerMenuBar" ) )
MetaDataBase::setPropertyChanged( o, "geometry", true );
if ( o->inherits( TQPUSHBUTTON_OBJECT_NAME_STRING ) || o->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || o->inherits( TQCHECKBOX_OBJECT_NAME_STRING ) || o->inherits( TQTOOLBUTTON_OBJECT_NAME_STRING ) )
MetaDataBase::setPropertyChanged( o, "text", true );
- else if (::qt_cast<TQToolButton*>(o) && ::qt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
+ else if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->tqparent()))) {
MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
@@ -1484,7 +1484,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
} else if ( o->inherits( TQTABWIDGET_OBJECT_NAME_STRING ) || o->inherits( TQWIZARD_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "pageTitle", true );
MetaDataBase::setPropertyChanged( o, "pageName", true );
-#ifndef QT_NO_TABLE
+#ifndef TQT_NO_TABLE
} else if ( o->inherits( TQTABLE_OBJECT_NAME_STRING ) && !o->inherits( TQDATATABLE_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "numRows", true );
MetaDataBase::setPropertyChanged( o, "numCols", true );
@@ -1494,7 +1494,7 @@ void WidgetFactory::initChangedProperties( TQObject *o )
t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) );
}
#endif
- } else if ( ::qt_cast<TQToolBox*>(o) ) {
+ } else if ( ::tqqt_cast<TQToolBox*>(o) ) {
MetaDataBase::setPropertyChanged( o, "currentIndex", true );
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemLabel", true );
@@ -1503,9 +1503,9 @@ void WidgetFactory::initChangedProperties( TQObject *o )
MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
} else if ( o->inherits( TQSPLITTER_OBJECT_NAME_STRING ) ) {
MetaDataBase::setPropertyChanged( o, "orientation", true );
- } else if ( o->inherits( "QDesignerToolBar" ) ) {
+ } else if ( o->inherits( "TQDesignerToolBar" ) ) {
MetaDataBase::setPropertyChanged( o, "label", true );
- } else if ( o->inherits( "QDesignerMenuBar" ) ) {
+ } else if ( o->inherits( "TQDesignerMenuBar" ) ) {
MetaDataBase::setPropertyChanged( o, "itemName", true );
MetaDataBase::setPropertyChanged( o, "itemNumber", true );
MetaDataBase::setPropertyChanged( o, "itemText", true );
@@ -1530,7 +1530,7 @@ bool WidgetFactory::hasSpecialEditor( int id )
return true;
if (className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING)
return true;
- if (className.contains("Table"))
+ if (className.tqcontains("Table"))
return true;
return false;
@@ -1544,13 +1544,13 @@ bool WidgetFactory::hasItems( int id )
return true;
if (className.mid(1) == "ListBox" || className.mid(1) == "ListView" ||
className.mid(1) == "IconView" || className.mid(1) == "ComboBox" ||
- className.contains("Table"))
+ className.tqcontains("Table"))
return true;
return false;
}
-void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
+void WidgetFactory::editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw )
{
TQString className = WidgetDatabase::className(id);
@@ -1562,7 +1562,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
e->exec();
delete e;
@@ -1572,7 +1572,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if (className == "TextEdit" || className == "TextBrowser")
{
- MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1582,7 +1582,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
e->exec();
delete e;
return;
@@ -1591,7 +1591,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1601,7 +1601,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQLISTBOX_OBJECT_NAME_STRING))
return;
- ListBoxEditor *e = new ListBoxEditor(parent, editWidget, fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1612,7 +1612,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQCOMBOBOX_OBJECT_NAME_STRING))
return;
TQComboBox *cb = (TQComboBox *) editWidget;
- ListBoxEditor *e = new ListBoxEditor(parent, cb->listBox(), fw);
+ ListBoxEditor *e = new ListBoxEditor(tqparent, cb->listBox(), fw);
e->exec();
delete e;
cb->update();
@@ -1624,7 +1624,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (!editWidget->inherits(TQLISTVIEW_OBJECT_NAME_STRING))
return;
TQListView *lv = (TQListView *) editWidget;
- ListViewEditor *e = new ListViewEditor(parent, lv, fw);
+ ListViewEditor *e = new ListViewEditor(tqparent, lv, fw);
e->exec();
delete e;
return;
@@ -1634,7 +1634,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
{
if (!editWidget->inherits(TQICONVIEW_OBJECT_NAME_STRING))
return;
- IconViewEditor *e = new IconViewEditor(parent, editWidget, fw);
+ IconViewEditor *e = new IconViewEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1642,15 +1642,15 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
if (className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING)
{
- MultiLineEditor *e = new MultiLineEditor(parent, editWidget, fw);
+ MultiLineEditor *e = new MultiLineEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
}
-#ifndef QT_NO_TABLE
- if (className.contains("Table"))
+#ifndef TQT_NO_TABLE
+ if (className.tqcontains("Table"))
{
- TableEditor *e = new TableEditor(parent, editWidget, fw);
+ TableEditor *e = new TableEditor(tqparent, editWidget, fw);
e->exec();
delete e;
return;
@@ -1662,14 +1662,14 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
return false;
- TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
- return l.findIndex( propName ) == -1;
+ TQStringList l = *changedProperties->tqfind( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
+ return l.tqfindIndex( propName ) == -1;
}
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
- findProperty( propName, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->property( w->tqmetaObject()->
+ tqfindProperty( propName, true ), true );
if (!p )
return false;
return p->reset( w );
@@ -1678,33 +1678,33 @@ bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
{
if ( propName == "wordwrap" ) {
- int v = defaultValue( w, "alignment" ).toInt();
+ int v = defaultValue( w, "tqalignment" ).toInt();
return TQVariant( ( v & WordBreak ) == WordBreak, 0 );
} else if ( propName == "toolTip" || propName == "whatsThis" ) {
- return TQVariant( TQString::fromLatin1( "" ) );
+ return TQVariant( TQString::tqfromLatin1( "" ) );
} else if ( w->inherits( "CustomWidget" ) ) {
return TQVariant();
} else if ( propName == "frameworkCode" ) {
return TQVariant( true, 0 );
- } else if ( propName == "layoutMargin" ) {
- if ( w->inherits( "QLayoutWidget" ) )
+ } else if ( propName == "tqlayoutMargin" ) {
+ if ( w->inherits( TQLAYOUTWIDGET_OBJECT_NAME_STRING ) )
return TQVariant( 0 );
else if ( MainWindow::self->formWindow() )
- return TQVariant( MainWindow::self->formWindow()->layoutDefaultMargin() );
- } else if ( propName == "layoutSpacing" ) {
+ return TQVariant( MainWindow::self->formWindow()->tqlayoutDefaultMargin() );
+ } else if ( propName == "tqlayoutSpacing" ) {
if ( MainWindow::self->formWindow() )
- return TQVariant( MainWindow::self->formWindow()->layoutDefaultSpacing() );
+ return TQVariant( MainWindow::self->formWindow()->tqlayoutDefaultSpacing() );
}
- return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName );
+ return *( *defaultProperties->tqfind( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).tqfind( propName );
}
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
- const TQMetaProperty *p = w->metaObject()->
- property( w->metaObject()->findProperty( propName, true ), true );
+ const TQMetaProperty *p = w->tqmetaObject()->
+ property( w->tqmetaObject()->tqfindProperty( propName, true ), true );
if ( !p ) {
- int v = defaultValue( w, "alignment" ).toInt();
+ int v = defaultValue( w, "tqalignment" ).toInt();
if ( propName == "hAlign" ) {
if ( ( v & AlignAuto ) == AlignAuto )
return "AlignAuto";
@@ -1724,17 +1724,17 @@ TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propNam
if ( ( v & AlignBottom ) == AlignBottom )
return "AlignBottom";
}
- return TQString::null;
+ return TQString();
}
return p->valueToKey( defaultValue( w, propName ).toInt() );
}
-TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w )
+TQWidget *WidgetFactory::createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w )
{
if ( !w )
return 0;
- return new CustomWidget( parent, name, w );
+ return new CustomWidget( tqparent, name, w );
}
TQVariant WidgetFactory::property( TQObject *w, const char *name )
@@ -1745,13 +1745,13 @@ TQVariant WidgetFactory::property( TQObject *w, const char *name )
return MetaDataBase::fakeProperty( w, name );
}
-void QDesignerLabel::updateBuddy()
+void TQDesignerLabel::updateBuddy()
{
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true );
+ TQObjectList *l = tqtopLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1761,12 +1761,12 @@ void QDesignerLabel::updateBuddy()
delete l;
}
-void QDesignerWidget::paintEvent( TQPaintEvent *e )
+void TQDesignerWidget::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
-void QDesignerDialog::paintEvent( TQPaintEvent *e )
+void TQDesignerDialog::paintEvent( TQPaintEvent *e )
{
formwindow->paintGrid( this, e );
}
@@ -1776,12 +1776,12 @@ void EditorDialog::paintEvent( TQPaintEvent *e )
formwindow->paintGrid( this, e );
}
-TQSizePolicy QLayoutWidget::sizePolicy() const
+TQSizePolicy TQLayoutWidget::sizePolicy() const
{
return sp;
}
-bool QLayoutWidget::event( TQEvent *e )
+bool TQLayoutWidget::event( TQEvent *e )
{
if ( e && ( e->type() == TQEvent::ChildInserted ||
e->type() == TQEvent::ChildRemoved ||
@@ -1792,14 +1792,15 @@ bool QLayoutWidget::event( TQEvent *e )
}
/*
- This function must be called on QLayoutWidget creation and whenever
- the QLayoutWidget's parent layout changes (e.g., from a QHBoxLayout
- to a TQVBoxLayout), because of the (illogical) way layouting works.
+ This function must be called on TQLayoutWidget creation and whenever
+ the TQLayoutWidget's tqparent tqlayout changes (e.g., from a TQHBoxLayout
+ to a TQVBoxLayout), because of the (illogical) way tqlayouting works.
*/
-void QLayoutWidget::updateSizePolicy()
+void TQLayoutWidget::updateSizePolicy()
{
- if ( !children() || children()->count() == 0 ) {
- sp = TQWidget::sizePolicy();
+ TQObjectList clo = childrenListObject();
+ if ( clo.isEmpty() || clo.count() == 0 ) {
+ sp = TQWidget::tqsizePolicy();
return;
}
@@ -1816,23 +1817,23 @@ void QLayoutWidget::updateSizePolicy()
int ht = (int) TQSizePolicy::Preferred;
int vt = (int) TQSizePolicy::Preferred;
- if ( layout() ) {
+ if ( tqlayout() ) {
/*
- parentLayout is set to the parent layout if there is one and if it is
- top level, in which case layouting is illogical.
+ tqparentLayout is set to the tqparent tqlayout if there is one and if it is
+ top level, in which case tqlayouting is illogical.
*/
- TQLayout *parentLayout = 0;
- if ( parent() && parent()->isWidgetType() ) {
- parentLayout = ((TQWidget *)parent())->layout();
- if ( parentLayout && parentLayout->mainWidget()->inherits("QLayoutWidget") )
- parentLayout = 0;
+ TQLayout *tqparentLayout = 0;
+ if ( tqparent() && tqparent()->isWidgetType() ) {
+ tqparentLayout = ((TQWidget *)tqparent())->tqlayout();
+ if ( tqparentLayout && tqparentLayout->mainWidget()->inherits(TQLAYOUTWIDGET_OBJECT_NAME_STRING) )
+ tqparentLayout = 0;
}
- TQObjectListIt it( *children() );
+ TQObjectListIt it( childrenListObject() );
TQObject *o;
- if ( layout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) {
- if ( parentLayout && parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
+ if ( tqlayout()->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( tqparentLayout && tqparentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
else
vt = TQSizePolicy::Fixed;
@@ -1843,17 +1844,17 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( !w->sizePolicy().mayGrowHorizontally() )
+ if ( !w->tqsizePolicy().mayGrowHorizontally() )
ht &= ~TQSizePolicy::Minimum;
- if ( !w->sizePolicy().mayShrinkHorizontally() )
+ if ( !w->tqsizePolicy().mayShrinkHorizontally() )
ht &= ~TQSizePolicy::Maximum;
- if ( w->sizePolicy().mayGrowVertically() )
+ if ( w->tqsizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkVertically() )
+ if ( w->tqsizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) {
- if ( parentLayout && parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
+ } else if ( tqlayout()->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) ) {
+ if ( tqparentLayout && tqparentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
else
ht = TQSizePolicy::Fixed;
@@ -1864,22 +1865,22 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->sizePolicy().mayGrowHorizontally() )
+ if ( w->tqsizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkHorizontally() )
+ if ( w->tqsizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( !w->sizePolicy().mayGrowVertically() )
+ if ( !w->tqsizePolicy().mayGrowVertically() )
vt &= ~TQSizePolicy::Minimum;
- if ( !w->sizePolicy().mayShrinkVertically() )
+ if ( !w->tqsizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum;
}
- } else if ( layout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
+ } else if ( tqlayout()->inherits(TQGRIDLAYOUT_OBJECT_NAME_STRING) ) {
ht = TQSizePolicy::Fixed;
vt = TQSizePolicy::Fixed;
- if ( parentLayout ) {
- if ( parentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
+ if ( tqparentLayout ) {
+ if ( tqparentLayout->inherits(TQVBOXLAYOUT_OBJECT_NAME_STRING) )
ht = TQSizePolicy::Minimum;
- else if ( parentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
+ else if ( tqparentLayout->inherits(TQHBOXLAYOUT_OBJECT_NAME_STRING) )
vt = TQSizePolicy::Minimum;
}
@@ -1889,22 +1890,29 @@ void QLayoutWidget::updateSizePolicy()
continue;
TQWidget *w = (TQWidget*)o;
- if ( w->sizePolicy().mayGrowHorizontally() )
+ if ( w->tqsizePolicy().mayGrowHorizontally() )
ht |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkHorizontally() )
+ if ( w->tqsizePolicy().mayShrinkHorizontally() )
ht |= TQSizePolicy::Maximum;
- if ( w->sizePolicy().mayGrowVertically() )
+ if ( w->tqsizePolicy().mayGrowVertically() )
vt |= TQSizePolicy::Minimum;
- if ( w->sizePolicy().mayShrinkVertically() )
+ if ( w->tqsizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
}
- if ( layout()->expanding() & TQSizePolicy::Horizontally )
+#ifdef USE_QT4
+ if ( tqlayout()->expandingDirections() & TQSizePolicy::Horizontally )
ht = TQSizePolicy::Expanding;
- if ( layout()->expanding() & TQSizePolicy::Vertically )
+ if ( tqlayout()->expandingDirections() & TQSizePolicy::Vertically )
vt = TQSizePolicy::Expanding;
+#else // USE_QT4
+ if ( tqlayout()->expanding() & TQSizePolicy::Horizontally )
+ ht = TQSizePolicy::Expanding;
+ if ( tqlayout()->expanding() & TQSizePolicy::Vertically )
+ vt = TQSizePolicy::Expanding;
+#endif // USE_QT4
- layout()->invalidate();
+ tqlayout()->tqinvalidate();
}
sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt );
@@ -1913,11 +1921,11 @@ void QLayoutWidget::updateSizePolicy()
void CustomWidget::paintEvent( TQPaintEvent *e )
{
- if ( parentWidget() && parentWidget()->inherits( "FormWindow" ) ) {
- ( (FormWindow*)parentWidget() )->paintGrid( this, e );
+ if ( tqparentWidget() && tqparentWidget()->inherits( "FormWindow" ) ) {
+ ( (FormWindow*)tqparentWidget() )->paintGrid( this, e );
} else {
TQPainter p( this );
- p.fillRect( rect(), colorGroup().dark() );
+ p.fillRect( rect(), tqcolorGroup().dark() );
p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2,
( height() - cusw->pixmap->height() ) / 2,
*cusw->pixmap );
diff --git a/kommander/editor/widgetfactory.h b/kommander/editor/widgetfactory.h
index 74713544..bfde50ec 100644
--- a/kommander/editor/widgetfactory.h
+++ b/kommander/editor/widgetfactory.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -58,7 +58,7 @@ class TQWidget;
class TQLayout;
class FormWindow;
-class WidgetFactory : public Qt
+class WidgetFactory : public TQt
{
friend class CustomWidgetFactory;
@@ -70,15 +70,15 @@ public:
NoLayout
};
- static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
+ static TQWidget *create( int id, TQWidget *tqparent, const char *name = 0, bool init = TRUE,
const TQRect *rect = 0, Qt::Orientation orient = Qt::Horizontal );
- static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
+ static TQLayout *createLayout( TQWidget *widget, TQLayout* tqlayout, LayoutType type );
static void deleteLayout( TQWidget *widget );
- static LayoutType layoutType( TQWidget *w );
- static LayoutType layoutType( TQWidget *w, TQLayout *&layout );
- static LayoutType layoutType( TQLayout *layout );
- static TQWidget *layoutParent( TQLayout *layout );
+ static LayoutType tqlayoutType( TQWidget *w );
+ static LayoutType tqlayoutType( TQWidget *w, TQLayout *&tqlayout );
+ static LayoutType tqlayoutType( TQLayout *tqlayout );
+ static TQWidget *tqlayoutParent( TQLayout *tqlayout );
static TQWidget* containerOfWidget( TQWidget *w );
static TQWidget* widgetOfContainer( TQWidget *w );
@@ -90,7 +90,7 @@ public:
static bool hasSpecialEditor( int id );
static bool hasItems( int id );
- static void editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw );
+ static void editWidget( int id, TQWidget *tqparent, TQWidget *editWidget, FormWindow *fw );
static bool canResetProperty( TQObject *w, const TQString &propName );
static bool resetProperty( TQObject *w, const TQString &propName );
@@ -101,21 +101,22 @@ public:
static void saveDefaultProperties( TQWidget *w, int id );
private:
- static TQWidget *createWidget( const TQString &className, TQWidget *parent, const char *name, bool init,
+ static TQWidget *createWidget( const TQString &className, TQWidget *tqparent, const char *name, bool init,
const TQRect *r = 0, Qt::Orientation orient = Qt::Horizontal );
- static TQWidget *createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w );
+ static TQWidget *createCustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *w );
};
-class QDesignerTabWidget : public QTabWidget
+class TQDesignerTabWidget : public TQTabWidget
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerTabWidget( TQWidget *parent, const char *name );
+ TQDesignerTabWidget( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -140,11 +141,12 @@ private:
class EditorTabWidget : public TabWidget
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorTabWidget( TQWidget *parent, const char *name );
+ EditorTabWidget( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -169,11 +171,12 @@ private:
class EditorToolBox : public ToolBox
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- EditorToolBox( TQWidget *parent, const char *name );
+ EditorToolBox( TQWidget *tqparent, const char *name );
int currentPage() const;
void setCurrentPage( int i );
@@ -185,14 +188,15 @@ public:
int count() const;
};
-class QDesignerWizard : public QWizard
+class TQDesignerWizard : public TQWizard
{
Q_OBJECT
- Q_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
- Q_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
- Q_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
+ TQ_OBJECT
+ TQ_PROPERTY( int currentPage READ currentPageNum WRITE setCurrentPage STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQString pageTitle READ pageTitle WRITE setPageTitle STORED false DESIGNABLE true )
+ TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
public:
- QDesignerWizard( TQWidget *parent, const char *name ) : TQWizard( parent, name ) {}
+ TQDesignerWizard( TQWidget *tqparent, const char *name ) : TQWizard( tqparent, name ) {}
int currentPageNum() const;
void setCurrentPage( int i );
@@ -204,7 +208,7 @@ public:
void addPage( TQWidget *p, const TQString & );
void removePage( TQWidget *p );
void insertPage( TQWidget *p, const TQString &t, int index );
- bool isPageRemoved( TQWidget *p ) { return (removedPages.find( p ) != 0); }
+ bool isPageRemoved( TQWidget *p ) { return (removedPages.tqfind( p ) != 0); }
void reject() {}
@@ -212,7 +216,7 @@ private:
struct Page
{
Page( TQWidget *a, const TQString &b ) : p( a ), t( b ) {}
- Page() : p( 0 ), t( TQString::null ) {}
+ Page() : p( 0 ), t( TQString() ) {}
TQWidget *p;
TQString t;
};
@@ -220,12 +224,13 @@ private:
};
-class QLayoutWidget : public QWidget
+class TQLayoutWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QLayoutWidget( TQWidget *parent, const char *name ) : TQWidget( parent, name ), sp( TQWidget::sizePolicy() ) {}
+ TQLayoutWidget( TQWidget *tqparent, const char *name ) : TQWidget( tqparent, name ), sp( TQWidget::tqsizePolicy() ) {}
TQSizePolicy sizePolicy() const;
void updateSizePolicy();
@@ -238,24 +243,25 @@ protected:
};
-class CustomWidget : public QWidget
+class CustomWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *cw )
- : TQWidget( parent, name ), cusw( cw ) {
- alwaysExpand = parentWidget() && parentWidget()->inherits( "FormWindow" );
- setSizePolicy( cw->sizePolicy );
+ CustomWidget( TQWidget *tqparent, const char *name, MetaDataBase::CustomWidget *cw )
+ : TQWidget( tqparent, name ), cusw( cw ) {
+ alwaysExpand = tqparentWidget() && tqparentWidget()->inherits( "FormWindow" );
+ tqsetSizePolicy( cw->sizePolicy );
if ( !alwaysExpand )
setBackgroundMode( PaletteDark );
}
- TQSize sizeHint() const {
- TQSize sh = cusw->sizeHint;
+ TQSize tqsizeHint() const {
+ TQSize sh = cusw->tqsizeHint;
if ( sh.isValid() )
return sh;
- return TQWidget::sizeHint();
+ return TQWidget::tqsizeHint();
}
TQString realClassName() { return cusw->className; }
@@ -270,41 +276,43 @@ protected:
};
-class Line : public QFrame
+class Line : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
- Q_OVERRIDE( int frameWidth DESIGNABLE false )
- Q_OVERRIDE( Shape frameShape DESIGNABLE false )
- Q_OVERRIDE( TQRect frameRect DESIGNABLE false )
- Q_OVERRIDE( TQRect contentsRect DESIGNABLE false )
+ TQ_PROPERTY( Qt::Orientation orientation READ orientation WRITE setOrientation )
+ TQ_OVERRIDE( int frameWidth DESIGNABLE false )
+ TQ_OVERRIDE( Shape frameShape DESIGNABLE false )
+ TQ_OVERRIDE( TQRect frameRect DESIGNABLE false )
+ TQ_OVERRIDE( TQRect contentsRect DESIGNABLE false )
public:
- Line( TQWidget *parent, const char *name )
- : TQFrame( parent, name, WMouseNoMask ) {
+ Line( TQWidget *tqparent, const char *name )
+ : TQFrame( tqparent, name, WMouseNoMask ) {
setFrameStyle( HLine | Sunken );
}
- void setOrientation( Orientation orient ) {
- if ( orient == Horizontal )
+ void setOrientation( Qt::Orientation orient ) {
+ if ( orient ==Qt::Horizontal )
setFrameShape( HLine );
else
setFrameShape( VLine );
}
- Orientation orientation() const {
- return frameShape() == HLine ? Horizontal : Vertical;
+ Qt::Orientation orientation() const {
+ return frameShape() == HLine ?Qt::Horizontal :Qt::Vertical;
}
};
-class QDesignerLabel : public QLabel
+class TQDesignerLabel : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
- Q_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
+ TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
public:
- QDesignerLabel( TQWidget *parent = 0, const char *name = 0 )
- : TQLabel( parent, name ) { myBuddy = 0; }
+ TQDesignerLabel( TQWidget *tqparent = 0, const char *name = 0 )
+ : TQLabel( tqparent, name ) { myBuddy = 0; }
void setBuddyWidget( const TQCString &b ) {
myBuddy = b;
@@ -328,13 +336,14 @@ private:
};
-class QDesignerWidget : public QWidget
+class TQDesignerWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerWidget( FormWindow *fw, TQWidget *parent, const char *name )
- : TQWidget( parent, name, WResizeNoErase ), formwindow( fw ) {}
+ TQDesignerWidget( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : TQWidget( tqparent, name, WResizeNoErase ), formwindow( fw ) {}
protected:
void paintEvent( TQPaintEvent *e );
@@ -344,13 +353,14 @@ private:
};
-class QDesignerDialog : public QDialog
+class TQDesignerDialog : public TQDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
- : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
+ TQDesignerDialog( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : TQDialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) {}
protected:
void paintEvent( TQPaintEvent *e );
@@ -360,96 +370,100 @@ private:
};
-class QDesignerToolButton : public QToolButton
+class TQDesignerToolButton : public TQToolButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerToolButton( TQWidget *parent, const char *name )
- : TQToolButton( parent, name ) {}
+ TQDesignerToolButton( TQWidget *tqparent, const char *name )
+ : TQToolButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerRadioButton : public QRadioButton
+class TQDesignerRadioButton : public TQRadioButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerRadioButton( TQWidget *parent, const char *name )
- : TQRadioButton( parent, name ) {}
+ TQDesignerRadioButton( TQWidget *tqparent, const char *name )
+ : TQRadioButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerPushButton : public QPushButton
+class TQDesignerPushButton : public TQPushButton
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerPushButton( TQWidget *parent, const char *name )
- : TQPushButton( parent, name ) {}
+ TQDesignerPushButton( TQWidget *tqparent, const char *name )
+ : TQPushButton( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
};
-class QDesignerCheckBox : public QCheckBox
+class TQDesignerCheckBox : public TQCheckBox
{
Q_OBJECT
- Q_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
+ TQ_OBJECT
+ TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
public:
- QDesignerCheckBox( TQWidget *parent, const char *name )
- : TQCheckBox( parent, name ) {}
+ TQDesignerCheckBox( TQWidget *tqparent, const char *name )
+ : TQCheckBox( tqparent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)tqparentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
- ( (TQButtonGroup*)parentWidget() )->remove( this );
- ( (TQButtonGroup*)parentWidget() )->insert( this, id );
+ if ( tqparentWidget() && tqparentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ ( (TQButtonGroup*)tqparentWidget() )->remove( this );
+ ( (TQButtonGroup*)tqparentWidget() )->insert( this, id );
}
}
@@ -458,10 +472,11 @@ public:
class EditorDialog : public Dialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- EditorDialog( FormWindow *fw, TQWidget *parent, const char *name )
- : Dialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
+ EditorDialog( FormWindow *fw, TQWidget *tqparent, const char *name )
+ : Dialog( tqparent, name, FALSE, WResizeNoErase ), formwindow( fw ) { }
protected:
void paintEvent( TQPaintEvent *e );
diff --git a/kommander/editor/widgetinterface.h b/kommander/editor/widgetinterface.h
index bf6bcd55..364e9871 100644
--- a/kommander/editor/widgetinterface.h
+++ b/kommander/editor/widgetinterface.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 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
@@ -21,9 +21,9 @@
#ifndef WIDGETINTERFACE_H
#define WIDGETINTERFACE_H
-#include <private/qwidgetinterface_p.h>
+#include <private/tqwidgetinterface_p.h>
-#define WidgetInterface QWidgetFactoryInterface
-#define IID_Widget IID_QWidgetFactory
+#define WidgetInterface TQWidgetFactoryInterface
+#define IID_Widget IID_TQWidgetFactory
#endif
diff --git a/kommander/editor/wizardeditor.ui b/kommander/editor/wizardeditor.ui
index c73e2628..f575a13a 100644
--- a/kommander/editor/wizardeditor.ui
+++ b/kommander/editor/wizardeditor.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>WizardEditorBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>WizardEditorBase</cstring>
</property>
@@ -25,7 +25,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout19</cstring>
</property>
@@ -39,7 +39,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout14</cstring>
</property>
@@ -53,7 +53,7 @@
<property name="spacing">
<number>2</number>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pagesLabel</cstring>
</property>
@@ -61,14 +61,14 @@
<string>Wizard pages:</string>
</property>
</widget>
- <widget class="QListBox">
+ <widget class="TQListBox">
<property name="name">
<cstring>listBox</cstring>
</property>
</widget>
</vbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout18</cstring>
</property>
@@ -82,7 +82,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonAdd</cstring>
</property>
@@ -90,7 +90,7 @@
<string>&amp;Add</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonRemove</cstring>
</property>
@@ -108,14 +108,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonUp</cstring>
</property>
@@ -126,7 +126,7 @@
<pixmap>image0</pixmap>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonDown</cstring>
</property>
@@ -141,7 +141,7 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -155,7 +155,7 @@
<property name="spacing">
<number>6</number>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonHelp</cstring>
</property>
@@ -176,14 +176,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -200,7 +200,7 @@
<string>Close the dialog and apply all the changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonApply</cstring>
</property>
@@ -214,7 +214,7 @@
<string>Apply all changes.</string>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -302,7 +302,7 @@
<slot>cancelClicked()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">addClicked()</slot>
@@ -315,6 +315,6 @@
<slot access="protected">okClicked()</slot>
<slot access="protected">removeClicked()</slot>
<slot access="protected">upClicked()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kommander/editor/wizardeditorimpl.cpp b/kommander/editor/wizardeditorimpl.cpp
index dfed9a2f..602f8376 100644
--- a/kommander/editor/wizardeditorimpl.cpp
+++ b/kommander/editor/wizardeditorimpl.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -31,8 +31,8 @@
#include <klocale.h>
-WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
- : WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w )
+WizardEditor::WizardEditor( TQWidget *tqparent, TQWizard *w, FormWindow *fw )
+ : WizardEditorBase( tqparent, 0 ), formwindow( fw ), wizard( w )
{
connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
fillListBox();
@@ -109,7 +109,7 @@ void WizardEditor::addClicked()
listBox->insertItem( i18n( "Page" ), index );
// schedule add command
- AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).arg( wizard->name() ),
+ AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n("Add Page to %1" ).tqarg( wizard->name() ),
formwindow, wizard, "Page", index, false);
commands.append( cmd );
@@ -128,7 +128,7 @@ void WizardEditor::removeClicked()
// schedule remove command
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n("Delete Page %1 of %2" )
- .arg( listBox->text( index ) ).arg( wizard->name() ),
+ .tqarg( listBox->text( index ) ).tqarg( wizard->name() ),
formwindow, wizard, index, false );
commands.append( cmd );
@@ -148,8 +148,8 @@ void WizardEditor::upClicked()
listBox->setCurrentItem( index2 );
// schedule swap command
- SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
- .arg( wizard->name() ), formwindow, wizard, index1, index2);
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).tqarg( index1 ).tqarg( index2 )
+ .tqarg( wizard->name() ), formwindow, wizard, index1, index2);
commands.append( cmd );
// update buttons
@@ -168,8 +168,8 @@ void WizardEditor::downClicked()
listBox->setCurrentItem( index2 );
// schedule swap command
- SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).arg( index1 ).arg( index2 )
- .arg( wizard->name() ), formwindow, wizard, index2, index1);
+ SwapWizardPagesCommand *cmd = new SwapWizardPagesCommand( i18n("Swap Pages %1 and %2 of %3" ).tqarg( index1 ).tqarg( index2 )
+ .tqarg( wizard->name() ), formwindow, wizard, index2, index1);
commands.append( cmd );
// update buttons
@@ -199,7 +199,7 @@ void WizardEditor::itemSelected( int index )
bool ok = false;
TQString text = KInputDialog::getText( i18n("Page Title"), i18n("New page title:" ), listBox->text( index ), &ok, this );
if ( ok ) {
- TQString pn( i18n("Rename page %1 of %2" ).arg( listBox->text( index ) ).arg( wizard->name() ) );
+ TQString pn( i18n("Rename page %1 of %2" ).tqarg( listBox->text( index ) ).tqarg( wizard->name() ) );
RenameWizardPageCommand *cmd = new RenameWizardPageCommand( pn, formwindow, wizard, index, text );
commands.append( cmd );
listBox->changeItem( text, index );
diff --git a/kommander/editor/wizardeditorimpl.h b/kommander/editor/wizardeditorimpl.h
index 128aa467..bc5f68bf 100644
--- a/kommander/editor/wizardeditorimpl.h
+++ b/kommander/editor/wizardeditorimpl.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -32,9 +32,10 @@ class FormWindow;
class WizardEditor : public WizardEditorBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- WizardEditor( TQWidget *parent, TQWizard *wizard, FormWindow *fw );
+ WizardEditor( TQWidget *tqparent, TQWizard *wizard, FormWindow *fw );
~WizardEditor();
protected slots:
diff --git a/kommander/editor/workspace.cpp b/kommander/editor/workspace.cpp
index 90f0891d..ecccce3d 100644
--- a/kommander/editor/workspace.cpp
+++ b/kommander/editor/workspace.cpp
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000-2001 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
@@ -102,11 +102,11 @@ static TQPixmap *filePixmap = 0;
static TQPixmap* formPixmap = 0;
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent, Project* p )
#else
-WorkspaceItem::WorkspaceItem( TQListView *parent )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent )
#endif
- : TQListViewItem( parent )
+ : TQListViewItem( tqparent )
{
init();
#ifndef KOMMANDER
@@ -118,8 +118,8 @@ WorkspaceItem::WorkspaceItem( TQListView *parent )
}
#ifndef KOMMANDER
-WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, SourceFile* sf )
+ : TQListViewItem( tqparent )
{
init();
sourceFile = sf;
@@ -128,8 +128,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
}
#endif
-WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListViewItem *tqparent, FormFile* ff, Type type )
+ : TQListViewItem( tqparent )
{
init();
formFile = ff;
@@ -146,8 +146,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
}
}
-WorkspaceItem::WorkspaceItem( TQListView *parent, FormFile* ff, Type type )
- : TQListViewItem( parent )
+WorkspaceItem::WorkspaceItem( TQListView *tqparent, FormFile* ff, Type type )
+ : TQListViewItem( tqparent )
{
init();
formFile = ff;
@@ -180,7 +180,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
{
TQColorGroup g( cg );
g.setColor( TQColorGroup::Base, backgroundColor() );
- g.setColor( TQColorGroup::Foreground, Qt::black );
+ g.setColor( TQColorGroup::Foreground, TQt::black );
#ifndef KOMMANDER
if ( type() == FormSourceType && !formFile->hasFormCode() ) {
@@ -188,7 +188,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) );
} else {
#endif
- g.setColor( TQColorGroup::Text, Qt::black );
+ g.setColor( TQColorGroup::Text, TQt::black );
#ifndef KOMMANDER
}
#endif
@@ -236,7 +236,7 @@ TQString WorkspaceItem::text( int column ) const
#endif
}
- return TQString::null; // shut up compiler
+ return TQString(); // shut up compiler
}
void WorkspaceItem::fillCompletionList( TQStringList& completion )
@@ -310,8 +310,8 @@ TQString WorkspaceItem::key( int column, bool ) const
TQColor WorkspaceItem::backgroundColor()
{
bool b = useOddColor;
- if ( t == FormSourceType && parent() )
- b = ( ( WorkspaceItem*)parent() )->useOddColor;
+ if ( t == FormSourceType && tqparent() )
+ b = ( ( WorkspaceItem*)tqparent() )->useOddColor;
return b ? *backColor2 : *backColor1;
}
@@ -328,8 +328,8 @@ void WorkspaceItem::setAutoOpen( bool b )
autoOpen = b;
}
-Workspace::Workspace( TQWidget *parent, MainWindow *mw )
- : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
+Workspace::Workspace( TQWidget *tqparent, MainWindow *mw )
+ : TQListView( tqparent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
#ifndef KOMMANDER
project( 0 ), completionDirty( false )
@@ -485,9 +485,9 @@ void Workspace::update( FormFile* ff )
{
TQListViewItem* i = findItem( ff );
if ( i ) {
- i->repaint();
+ i->tqrepaint();
if ( (i = i->firstChild()) )
- i->repaint();
+ i->tqrepaint();
}
}
@@ -559,7 +559,7 @@ void Workspace::closeAutoOpenItems()
TQListViewItemIterator it( this );
for ( ; it.current(); ++it ) {
WorkspaceItem* i = (WorkspaceItem*) it.current();
- WorkspaceItem* ip = (WorkspaceItem*) i->parent();
+ WorkspaceItem* ip = (WorkspaceItem*) i->tqparent();
if ( i->type() == WorkspaceItem::FormSourceType ) {
if ( !i->isSelected() && !ip->isSelected()
&& ip->isAutoOpen() ) {
@@ -583,7 +583,7 @@ void Workspace::itemDoubleClicked( TQListViewItem *i )
void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
{
- if ( !i || button != LeftButton )
+ if ( !i || button != Qt::LeftButton )
return;
closeAutoOpenItems();
@@ -699,7 +699,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break;
#endif
case OPEN_SOURCE:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
#ifndef KOMMANDER
case REMOVE_FORM: // FIXME
@@ -707,10 +707,10 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
break;
#endif
case OPEN_FORM:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
case OPEN_FORM_SOURCE:
- itemClicked( LeftButton, i, pos );
+ itemClicked( Qt::LeftButton, i, pos );
break;
default:
break;
@@ -720,7 +720,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
bool Workspace::eventFilter( TQObject *o, TQEvent * e )
{
// Reggie, on what type of events do we have to execute updateBufferEdit()
- if ( o ==bufferEdit && e->type() != TQEvent::ChildRemoved )
+ if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved )
updateBufferEdit();
return TQListView::eventFilter( o, e );
}
@@ -755,7 +755,7 @@ void Workspace::bufferChosen( const TQString &buffer )
bufferEdit->setText( "" );
#ifndef KOMMANDER
- if ( MainWindow::self->projectFileNames().contains( buffer ) ) {
+ if ( MainWindow::self->projectFileNames().tqcontains( buffer ) ) {
MainWindow::self->setCurrentProjectByFilename( buffer );
return;
}
@@ -764,7 +764,7 @@ void Workspace::bufferChosen( const TQString &buffer )
TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
- itemClicked( LeftButton, it.current(), TQPoint() );
+ itemClicked( Qt::LeftButton, it.current(), TQPoint() );
break;
}
++it;
diff --git a/kommander/editor/workspace.h b/kommander/editor/workspace.h
index 61f772dd..99470207 100644
--- a/kommander/editor/workspace.h
+++ b/kommander/editor/workspace.h
@@ -1,7 +1,7 @@
/**********************************************************************
** Copyright (C) 2000 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
@@ -40,21 +40,21 @@ class QCompletionEdit;
class SourceEditor;
#endif
-class WorkspaceItem : public QListViewItem
+class WorkspaceItem : public TQListViewItem
{
public:
enum Type { ProjectType, FormFileType, FormSourceType, SourceFileType };
#ifndef KOMMANDER
- //WorkspaceItem( TQListView *parent, Project* p );
+ //WorkspaceItem( TQListView *tqparent, Project* p );
#else
- WorkspaceItem(TQListView *parent);
+ WorkspaceItem(TQListView *tqparent);
#endif
#ifndef KOMMANDER
-// WorkspaceItem( TQListViewItem *parent, SourceFile* sf );
+// WorkspaceItem( TQListViewItem *tqparent, SourceFile* sf );
#endif
- WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type t = FormFileType );
- WorkspaceItem( TQListView *parent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListViewItem *tqparent, FormFile* ff, Type t = FormFileType );
+ WorkspaceItem( TQListView *tqparent, FormFile* ff, Type t = FormFileType );
void paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align );
@@ -91,12 +91,13 @@ private:
Type t;
};
-class Workspace : public QListView
+class Workspace : public TQListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- Workspace( TQWidget *parent , MainWindow *mw );
+ Workspace( TQWidget *tqparent , MainWindow *mw );
#ifndef KOMMANDER
void setCurrentProject( Project *pro );