summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer')
-rw-r--r--kdevdesigner/designer/actiondnd.cpp172
-rw-r--r--kdevdesigner/designer/actiondnd.h28
-rw-r--r--kdevdesigner/designer/actioneditor.ui4
-rw-r--r--kdevdesigner/designer/actioneditorimpl.cpp122
-rw-r--r--kdevdesigner/designer/actioneditorimpl.h2
-rw-r--r--kdevdesigner/designer/actionlistview.cpp20
-rw-r--r--kdevdesigner/designer/actionlistview.h8
-rw-r--r--kdevdesigner/designer/asciivalidator.cpp12
-rw-r--r--kdevdesigner/designer/asciivalidator.h2
-rw-r--r--kdevdesigner/designer/command.cpp390
-rw-r--r--kdevdesigner/designer/command.h12
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui4
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui.h24
-rw-r--r--kdevdesigner/designer/connectiondialog.ui4
-rw-r--r--kdevdesigner/designer/connectiondialog.ui.h32
-rw-r--r--kdevdesigner/designer/connectionitems.cpp108
-rw-r--r--kdevdesigner/designer/connectionitems.h24
-rw-r--r--kdevdesigner/designer/connectiontable.cpp16
-rw-r--r--kdevdesigner/designer/connectiontable.h2
-rw-r--r--kdevdesigner/designer/customwidgeteditor.ui4
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp206
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.h2
-rw-r--r--kdevdesigner/designer/database.cpp10
-rw-r--r--kdevdesigner/designer/database.h4
-rw-r--r--kdevdesigner/designer/dbconnection.ui4
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.cpp16
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.h4
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.cpp30
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.h4
-rw-r--r--kdevdesigner/designer/designeraction.h6
-rw-r--r--kdevdesigner/designer/designerapp.cpp8
-rw-r--r--kdevdesigner/designer/designerappiface.cpp98
-rw-r--r--kdevdesigner/designer/designerappiface.h4
-rw-r--r--kdevdesigner/designer/editfunctions.ui4
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.cpp80
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.h4
-rw-r--r--kdevdesigner/designer/filechooser.cpp8
-rw-r--r--kdevdesigner/designer/filechooser.h2
-rw-r--r--kdevdesigner/designer/finddialog.ui4
-rw-r--r--kdevdesigner/designer/finddialog.ui.h6
-rw-r--r--kdevdesigner/designer/formfile.cpp154
-rw-r--r--kdevdesigner/designer/formfile.h10
-rw-r--r--kdevdesigner/designer/formsettings.ui4
-rw-r--r--kdevdesigner/designer/formsettingsimpl.cpp48
-rw-r--r--kdevdesigner/designer/formsettingsimpl.h2
-rw-r--r--kdevdesigner/designer/formwindow.cpp524
-rw-r--r--kdevdesigner/designer/formwindow.h10
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp272
-rw-r--r--kdevdesigner/designer/hierarchyview.h14
-rw-r--r--kdevdesigner/designer/iconvieweditor.ui4
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.cpp34
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.h2
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.cpp86
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.h4
-rw-r--r--kdevdesigner/designer/layout.cpp124
-rw-r--r--kdevdesigner/designer/layout.h14
-rw-r--r--kdevdesigner/designer/listboxdnd.cpp24
-rw-r--r--kdevdesigner/designer/listboxdnd.h2
-rw-r--r--kdevdesigner/designer/listboxeditor.ui4
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.cpp50
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.h2
-rw-r--r--kdevdesigner/designer/listboxrename.cpp26
-rw-r--r--kdevdesigner/designer/listboxrename.h2
-rw-r--r--kdevdesigner/designer/listdnd.cpp28
-rw-r--r--kdevdesigner/designer/listdnd.h2
-rw-r--r--kdevdesigner/designer/listeditor.ui4
-rw-r--r--kdevdesigner/designer/listeditor.ui.h4
-rw-r--r--kdevdesigner/designer/listviewdnd.cpp30
-rw-r--r--kdevdesigner/designer/listviewdnd.h2
-rw-r--r--kdevdesigner/designer/listvieweditor.ui4
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.cpp164
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.h2
-rw-r--r--kdevdesigner/designer/mainwindow.cpp1001
-rw-r--r--kdevdesigner/designer/mainwindow.h19
-rw-r--r--kdevdesigner/designer/mainwindowactions.cpp579
-rw-r--r--kdevdesigner/designer/menubareditor.cpp72
-rw-r--r--kdevdesigner/designer/menubareditor.h6
-rw-r--r--kdevdesigner/designer/metadatabase.cpp190
-rw-r--r--kdevdesigner/designer/metadatabase.h10
-rw-r--r--kdevdesigner/designer/multilineeditor.ui4
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.cpp98
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.h8
-rw-r--r--kdevdesigner/designer/newform.ui4
-rw-r--r--kdevdesigner/designer/newformimpl.cpp62
-rw-r--r--kdevdesigner/designer/newformimpl.h2
-rw-r--r--kdevdesigner/designer/orderindicator.cpp4
-rw-r--r--kdevdesigner/designer/orderindicator.h2
-rw-r--r--kdevdesigner/designer/outputwindow.cpp28
-rw-r--r--kdevdesigner/designer/outputwindow.h2
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.cpp18
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.h4
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.cpp8
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.h4
-rw-r--r--kdevdesigner/designer/pixmapchooser.cpp30
-rw-r--r--kdevdesigner/designer/pixmapchooser.h4
-rw-r--r--kdevdesigner/designer/pixmapcollection.cpp22
-rw-r--r--kdevdesigner/designer/pixmapcollection.h2
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui4
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui.h20
-rw-r--r--kdevdesigner/designer/popupmenueditor.cpp118
-rw-r--r--kdevdesigner/designer/popupmenueditor.h4
-rw-r--r--kdevdesigner/designer/preferences.ui4
-rw-r--r--kdevdesigner/designer/previewframe.h4
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.cpp8
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.h2
-rw-r--r--kdevdesigner/designer/project.cpp146
-rw-r--r--kdevdesigner/designer/project.h22
-rw-r--r--kdevdesigner/designer/projectsettings.ui4
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.cpp10
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.h4
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp694
-rw-r--r--kdevdesigner/designer/propertyeditor.h58
-rw-r--r--kdevdesigner/designer/propertyobject.cpp34
-rw-r--r--kdevdesigner/designer/qcompletionedit.cpp32
-rw-r--r--kdevdesigner/designer/qcompletionedit.h2
-rw-r--r--kdevdesigner/designer/replacedialog.ui4
-rw-r--r--kdevdesigner/designer/replacedialog.ui.h14
-rw-r--r--kdevdesigner/designer/resource.cpp730
-rw-r--r--kdevdesigner/designer/resource.h6
-rw-r--r--kdevdesigner/designer/richtextfontdialog.ui10
-rw-r--r--kdevdesigner/designer/sizehandle.cpp12
-rw-r--r--kdevdesigner/designer/sizehandle.h4
-rw-r--r--kdevdesigner/designer/sourceeditor.cpp30
-rw-r--r--kdevdesigner/designer/sourceeditor.h2
-rw-r--r--kdevdesigner/designer/sourcefile.cpp50
-rw-r--r--kdevdesigner/designer/sourcefile.h6
-rw-r--r--kdevdesigner/designer/startdialog.ui13
-rw-r--r--kdevdesigner/designer/startdialogimpl.cpp28
-rw-r--r--kdevdesigner/designer/startdialogimpl.h4
-rw-r--r--kdevdesigner/designer/styledbutton.cpp16
-rw-r--r--kdevdesigner/designer/styledbutton.h2
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.cpp26
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.h4
-rw-r--r--kdevdesigner/designer/tableeditor.ui4
-rw-r--r--kdevdesigner/designer/tableeditorimpl.cpp50
-rw-r--r--kdevdesigner/designer/tableeditorimpl.h4
-rw-r--r--kdevdesigner/designer/timestamp.cpp6
-rw-r--r--kdevdesigner/designer/timestamp.h2
-rw-r--r--kdevdesigner/designer/variabledialog.ui4
-rw-r--r--kdevdesigner/designer/variabledialogimpl.cpp12
-rw-r--r--kdevdesigner/designer/variabledialogimpl.h2
-rw-r--r--kdevdesigner/designer/widgetaction.cpp4
-rw-r--r--kdevdesigner/designer/widgetaction.h8
-rw-r--r--kdevdesigner/designer/widgetfactory.cpp664
-rw-r--r--kdevdesigner/designer/widgetfactory.h58
-rw-r--r--kdevdesigner/designer/wizardeditor.ui4
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.cpp36
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.h2
-rw-r--r--kdevdesigner/designer/workspace.cpp116
-rw-r--r--kdevdesigner/designer/workspace.h2
150 files changed, 4210 insertions, 4232 deletions
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp
index 33f0c4bf..0d524d9e 100644
--- a/kdevdesigner/designer/actiondnd.cpp
+++ b/kdevdesigner/designer/actiondnd.cpp
@@ -105,13 +105,13 @@ bool QDesignerAction::addTo( TQWidget *w )
if ( !widgetToInsert )
return TQAction::addTo( w );
- if ( ::tqqt_cast<TQPopupMenu*>(w) )
- return FALSE;
+ if ( ::tqt_cast<TQPopupMenu*>(w) )
+ return false;
- widgetToInsert->reparent( w, TQPoint( 0, 0 ), FALSE );
+ widgetToInsert->reparent( w, TQPoint( 0, 0 ), false );
widgetToInsert->show();
addedTo( widgetToInsert, w );
- return TRUE;
+ return true;
}
bool QDesignerAction::removeFrom( TQWidget *w )
@@ -120,30 +120,30 @@ bool QDesignerAction::removeFrom( TQWidget *w )
return TQAction::removeFrom( w );
remove();
- return TRUE;
+ return true;
}
void QDesignerAction::remove()
{
if ( !widgetToInsert )
return;
- MainWindow::self->formWindow()->selectWidget( TQT_TQOBJECT(widgetToInsert), FALSE );
- widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE );
+ MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
+ widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
}
-QDesignerToolBarSeparator::QDesignerToolBarSeparator(Qt::Orientation o , TQToolBar *parent,
+QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent,
const char* name )
: TQWidget( parent, name )
{
- connect( parent, TQT_SIGNAL(orientationChanged(Qt::Orientation)),
- this, TQT_SLOT(setOrientation(Qt::Orientation)) );
+ connect( parent, TQ_SIGNAL(orientationChanged(TQt::Orientation)),
+ this, TQ_SLOT(setOrientation(TQt::Orientation)) );
setOrientation( o );
setBackgroundMode( parent->backgroundMode() );
setBackgroundOrigin( ParentOrigin );
setSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
}
-void QDesignerToolBarSeparator::setOrientation( Qt::Orientation o )
+void QDesignerToolBarSeparator::setOrientation( TQt::Orientation o )
{
orient = o;
}
@@ -157,7 +157,7 @@ TQSize QDesignerToolBarSeparator::sizeHint() const
{
int extent = style().pixelMetric( TQStyle::PM_DockWindowSeparatorExtent,
this );
- if ( orient ==Qt::Horizontal )
+ if ( orient ==TQt::Horizontal )
return TQSize( extent, 0 );
else
return TQSize( 0, extent );
@@ -168,10 +168,10 @@ void QDesignerToolBarSeparator::paintEvent( TQPaintEvent * )
TQPainter p( this );
TQStyle::SFlags flags = TQStyle::Style_Default;
- if ( orientation() ==Qt::Horizontal )
+ if ( orientation() ==TQt::Horizontal )
flags |= TQStyle::Style_Horizontal;
- style().tqdrawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
+ style().drawPrimitive( TQStyle::PE_DockWindowSeparator, &p, rect(),
colorGroup(), flags );
}
@@ -184,28 +184,28 @@ QSeparatorAction::QSeparatorAction( TQObject *parent )
bool QSeparatorAction::addTo( TQWidget *w )
{
- if ( ::tqqt_cast<TQToolBar*>(w) ) {
+ if ( ::tqt_cast<TQToolBar*>(w) ) {
TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
- return TRUE;
- } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) {
+ return true;
+ } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
idx = ( (TQPopupMenu*)w )->count();
( (TQPopupMenu*)w )->insertSeparator( idx );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool QSeparatorAction::removeFrom( TQWidget *w )
{
- if ( ::tqqt_cast<TQToolBar*>(w) ) {
+ if ( ::tqt_cast<TQToolBar*>(w) ) {
delete wid;
- return TRUE;
- } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) {
+ return true;
+ } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
( (TQPopupMenu*)w )->removeItemAt( idx );
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQWidget *QSeparatorAction::widget() const
@@ -219,38 +219,38 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
: TQToolBar( mw ), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
- afterAnchor = TRUE;
- setAcceptDrops( TRUE );
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ afterAnchor = true;
+ setAcceptDrops( true );
+ MetaDataBase::addEntry( this );
lastIndicatorPos = TQPoint( -1, -1 );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
installEventFilter( this );
- widgetInserting = FALSE;
+ widgetInserting = false;
findFormWindow();
- mw->setDockEnabled( DockTornOff, FALSE );
+ mw->setDockEnabled( DockTornOff, false );
}
QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw, Dock dock )
: TQToolBar( TQString(), mw, dock), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
- afterAnchor = TRUE;
- setAcceptDrops( TRUE );
+ afterAnchor = true;
+ setAcceptDrops( true );
indicator = new QDesignerIndicatorWidget( this );
indicator->hide();
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
installEventFilter( this );
- widgetInserting = FALSE;
+ widgetInserting = false;
findFormWindow();
- mw->setDockEnabled( DockTornOff, FALSE );
+ mw->setDockEnabled( DockTornOff, false );
}
void QDesignerToolBar::findFormWindow()
{
TQWidget *w = this;
while ( w ) {
- formWindow = ::tqqt_cast<FormWindow*>(w);
+ formWindow = ::tqt_cast<FormWindow*>(w);
if ( formWindow )
break;
w = w->parentWidget();
@@ -260,11 +260,11 @@ void QDesignerToolBar::findFormWindow()
void QDesignerToolBar::addAction( TQAction *a )
{
actionList.append( a );
- connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( actionRemoved() ) );
- if ( ::tqqt_cast<TQActionGroup*>(a) ) {
+ connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( actionRemoved() ) );
+ if ( ::tqt_cast<TQActionGroup*>(a) ) {
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
- } else if ( ::tqqt_cast<QSeparatorAction*>(a) ) {
+ } else if ( ::tqt_cast<QSeparatorAction*>(a) ) {
( (QSeparatorAction*)a )->widget()->installEventFilter( this );
actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
} else {
@@ -275,52 +275,52 @@ void QDesignerToolBar::addAction( TQAction *a )
static void fixObject( TQObject *&o )
{
- while ( o && o->parent() && !::tqqt_cast<QDesignerToolBar*>(o->parent()) )
+ while ( o && o->parent() && !::tqt_cast<QDesignerToolBar*>(o->parent()) )
o = o->parent();
}
bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
{
- if ( !o || !e || o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) || o->inherits( "TQDockWindowTitleBar" ) )
+ if ( !o || !e || o->inherits( "TQDockWindowHandle" ) || o->inherits( "TQDockWindowTitleBar" ) )
return TQToolBar::eventFilter( o, e );
- if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) && e->type() == TQEvent::MouseButtonPress &&
- ( ( TQMouseEvent*)e )->button() == Qt::LeftButton ) {
+ if ( o == this && e->type() == TQEvent::MouseButtonPress &&
+ ( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
- return TRUE;
+ return true;
}
- if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) )
+ if ( o == this )
return TQToolBar::eventFilter( o, e );
if ( e->type() == TQEvent::MouseButtonPress ) {
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
- return FALSE;
+ return false;
buttonMousePressEvent( ke, o );
- return TRUE;
+ return true;
} else if(e->type() == TQEvent::ContextMenu ) {
TQContextMenuEvent *ce = (TQContextMenuEvent*)e;
fixObject( o );
if( !o )
- return FALSE;
+ return false;
buttonContextMenuEvent( ce, o );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::MouseMove ) {
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
- return FALSE;
+ return false;
buttonMouseMoveEvent( ke, o );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::MouseButtonRelease ) {
TQMouseEvent *ke = (TQMouseEvent*)e;
fixObject( o );
if ( !o )
- return FALSE;
+ return false;
buttonMouseReleaseEvent( ke, o );
- return TRUE;
+ return true;
} else if ( e->type() == TQEvent::DragEnter ) {
TQDragEnterEvent *de = (TQDragEnterEvent*)e;
if (ActionDrag::canDecode(de))
@@ -358,20 +358,20 @@ void QDesignerToolBar::contextMenuEvent( TQContextMenuEvent *e )
void QDesignerToolBar::mousePressEvent( TQMouseEvent *e )
{
- widgetInserting = FALSE;
- if ( e->button() == Qt::LeftButton &&
+ widgetInserting = false;
+ if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL &&
MainWindow::self->currentTool() != CONNECT_TOOL &&
MainWindow::self->currentTool() != BUDDY_TOOL )
- widgetInserting = TRUE;
+ widgetInserting = true;
}
void QDesignerToolBar::mouseReleaseEvent( TQMouseEvent *e )
{
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
- widgetInserting = FALSE;
+ widgetInserting = false;
}
void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
@@ -379,10 +379,10 @@ void QDesignerToolBar::buttonMouseReleaseEvent( TQMouseEvent *e, TQObject *w )
if ( widgetInserting )
doInsertWidget( mapFromGlobal( e->globalPos() ) );
else if ( w->isWidgetType() && formWindow->widgets()->find( w ) ) {
- formWindow->clearSelection( FALSE );
+ formWindow->clearSelection( false );
formWindow->selectWidget( w );
}
- widgetInserting = FALSE;
+ widgetInserting = false;
}
void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *o )
@@ -393,7 +393,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
const int ID_SEP = 2;
const int ID_DELTOOLBAR = 3;
TQMap<TQWidget*, TQAction*>::Iterator it = actionMap.find( (TQWidget*)o );
- if ( it != actionMap.end() && ::tqqt_cast<QSeparatorAction*>(*it) )
+ if ( it != actionMap.end() && ::tqt_cast<QSeparatorAction*>(*it) )
menu.insertItem( i18n( "Delete Separator" ), ID_DELETE );
else
menu.insertItem( i18n( "Delete Item" ), ID_DELETE );
@@ -438,17 +438,17 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
- widgetInserting = FALSE;
+ widgetInserting = false;
- if ( e->button() == Qt::MidButton )
+ if ( e->button() == TQt::MidButton )
return;
- if ( e->button() == Qt::LeftButton &&
+ if ( e->button() == TQt::LeftButton &&
MainWindow::self->currentTool() != POINTER_TOOL &&
MainWindow::self->currentTool() != ORDER_TOOL &&
MainWindow::self->currentTool() != CONNECT_TOOL &&
MainWindow::self->currentTool() != BUDDY_TOOL ) {
- widgetInserting = TRUE;
+ widgetInserting = true;
return;
}
@@ -474,7 +474,7 @@ void QDesignerToolBar::removeWidget( TQWidget *w )
void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
{
- if ( widgetInserting || ( e->state() & Qt::LeftButton ) == 0 )
+ if ( widgetInserting || ( e->state() & TQt::LeftButton ) == 0 )
return;
if ( TQABS( TQPoint( dragStartPos - e->pos() ).manhattanLength() ) < TQApplication::startDragDistance() )
return;
@@ -494,13 +494,13 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
TQApplication::sendPostedEvents();
adjustSize();
- TQString type = ::tqqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) :
- ::tqqt_cast<QSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
+ TQString type = ::tqt_cast<TQActionGroup*>(a) ? TQString( "application/x-designer-actiongroup" ) :
+ ::tqt_cast<QSeparatorAction*>(a) ? TQString( "application/x-designer-separator" ) : TQString( "application/x-designer-actions" );
TQStoredDrag *drag = new ActionDrag( type, a, this );
drag->setPixmap( a->iconSet().pixmap() );
- if ( ::tqqt_cast<QDesignerAction*>(a) ) {
+ if ( ::tqt_cast<QDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
- formWindow->selectWidget( ( TQT_TQOBJECT(( (QDesignerAction*)a )->widget())), FALSE );
+ formWindow->selectWidget( ( ( (QDesignerAction*)a )->widget()), false );
}
if ( !drag->drag() ) {
AddActionToToolBarCommand *cmd = new AddActionToToolBarCommand( i18n( "Add Action '%1' to Toolbar '%2'" ).
@@ -517,7 +517,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
void QDesignerToolBar::dragEnterEvent( TQDragEnterEvent *e )
{
- widgetInserting = FALSE;
+ widgetInserting = false;
lastIndicatorPos = TQPoint( -1, -1 );
if (ActionDrag::canDecode(e))
e->accept();
@@ -535,7 +535,7 @@ void QDesignerToolBar::dragLeaveEvent( TQDragLeaveEvent * )
{
indicator->hide();
insertAnchor = 0;
- afterAnchor = TRUE;
+ afterAnchor = true;
}
void QDesignerToolBar::dropEvent( TQDropEvent *e )
@@ -555,11 +555,11 @@ 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 = ::tqqt_cast<QDesignerAction*>(ActionDrag::action());
+ a = ::tqt_cast<QDesignerAction*>(ActionDrag::action());
else
- a = ::tqqt_cast<QSeparatorAction*>(ActionDrag::action());
+ a = ::tqt_cast<QSeparatorAction*>(ActionDrag::action());
} else {
- a = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action());
+ a = ::tqt_cast<QDesignerActionGroup*>(ActionDrag::action());
}
if ( actionList.findRef( a ) != -1 ) {
@@ -588,14 +588,14 @@ void QDesignerToolBar::reInsert()
clear();
for ( a = actionList.first(); a; a = actionList.next() ) {
a->addTo( this );
- if ( ::tqqt_cast<TQActionGroup*>(a) ) {
+ if ( ::tqt_cast<TQActionGroup*>(a) ) {
actionMap.insert( ( (QDesignerActionGroup*)a )->widget(), a );
if ( ( (QDesignerActionGroup*)a )->widget() )
( (QDesignerActionGroup*)a )->widget()->installEventFilter( this );
- } else if ( ::tqqt_cast<QDesignerAction*>(a) ) {
+ } else if ( ::tqt_cast<QDesignerAction*>(a) ) {
actionMap.insert( ( (QDesignerAction*)a )->widget(), a );
( (QDesignerAction*)a )->widget()->installEventFilter( this );
- } else if ( ::tqqt_cast<QSeparatorAction*>(a) ) {
+ } else if ( ::tqt_cast<QSeparatorAction*>(a) ) {
actionMap.insert( ( (QSeparatorAction*)a )->widget(), a );
( (QSeparatorAction*)a )->widget()->installEventFilter( this );
}
@@ -611,10 +611,10 @@ void QDesignerToolBar::actionRemoved()
TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
{
- if ( orientation() ==Qt::Horizontal ) {
+ if ( orientation() ==TQt::Horizontal ) {
TQPoint pnt( width() - 2, 0 );
insertAnchor = 0;
- afterAnchor = TRUE;
+ afterAnchor = true;
TQObjectList clo = childrenListObject();
if ( clo.isEmpty() )
return pnt;
@@ -629,7 +629,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
if ( w->x() < pos.x() ) {
pnt.setX( w->x() + w->width() + 1 );
insertAnchor = w;
- afterAnchor = TRUE;
+ afterAnchor = true;
}
}
}
@@ -637,7 +637,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
} else {
TQPoint pnt( 0, height() - 2 );
insertAnchor = 0;
- afterAnchor = TRUE;
+ afterAnchor = true;
TQObjectList clo = childrenListObject();
if ( clo.isEmpty() )
return pnt;
@@ -652,7 +652,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
if ( w->y() < pos.y() ) {
pnt.setY( w->y() + w->height() + 1 );
insertAnchor = w;
- afterAnchor = TRUE;
+ afterAnchor = true;
}
}
}
@@ -665,7 +665,7 @@ void QDesignerToolBar::drawIndicator( const TQPoint &pos )
if ( lastIndicatorPos == pos )
return;
bool wasVsisible = indicator->isVisible();
- if ( orientation() ==Qt::Horizontal ) {
+ if ( orientation() ==TQt::Horizontal ) {
indicator->resize( 3, height() );
if ( pos != TQPoint( -1, -1 ) )
indicator->move( pos.x() - 1, 0 );
@@ -689,9 +689,9 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p )
if ( formWindow != MainWindow::self->formWindow() )
return;
calcIndicatorPos( p );
- TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, TRUE );
+ TQWidget *w = WidgetFactory::create( MainWindow::self->currentTool(), this, 0, true );
installEventFilters( w );
- MainWindow::self->formWindow()->insertWidget( w, TRUE );
+ MainWindow::self->formWindow()->insertWidget( w, true );
QDesignerAction *a = new QDesignerAction( w, parent() );
int index = actionList.findRef( *actionMap.find( insertAnchor ) );
if ( index != -1 && afterAnchor )
@@ -709,7 +709,7 @@ void QDesignerToolBar::doInsertWidget( const TQPoint &p )
void QDesignerToolBar::clear()
{
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( ::tqqt_cast<QDesignerAction*>(a) )
+ if ( ::tqt_cast<QDesignerAction*>(a) )
( (QDesignerAction*)a )->remove();
}
TQToolBar::clear();
@@ -719,7 +719,7 @@ void QDesignerToolBar::installEventFilters( TQWidget *w )
{
if ( !w )
return;
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( this );
delete l;
diff --git a/kdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h
index 1e9f68b0..ae8d8df0 100644
--- a/kdevdesigner/designer/actiondnd.h
+++ b/kdevdesigner/designer/actiondnd.h
@@ -45,7 +45,7 @@ class TQPopupMenu;
class QDesignerIndicatorWidget : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -58,7 +58,7 @@ public:
class ActionDrag : public TQStoredDrag
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -81,12 +81,12 @@ private:
class QDesignerActionGroup : public TQActionGroup
{
- Q_OBJECT
+ TQ_OBJECT
public:
QDesignerActionGroup( TQObject *parent )
- : TQActionGroup( ::tqqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
+ : TQActionGroup( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ) { init(); }
void init();
@@ -117,14 +117,14 @@ private:
class QDesignerAction : public TQAction
{
- Q_OBJECT
+ TQ_OBJECT
public:
QDesignerAction( TQObject *parent )
- : TQAction( ::tqqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
+ : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( 0 ) { init(); }
QDesignerAction( TQWidget *w, TQObject *parent )
- : TQAction( ::tqqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
+ : TQAction( ::tqt_cast<TQActionGroup*>(parent) ? parent : 0 ), wid( 0 ), idx( -1 ), widgetToInsert( w ) { init(); }
void init();
@@ -154,27 +154,27 @@ private:
class QDesignerToolBarSeparator : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
- QDesignerToolBarSeparator( Qt::Orientation, TQToolBar *parent, const char* name=0 );
+ QDesignerToolBarSeparator( TQt::Orientation, TQToolBar *parent, const char* name=0 );
TQSize sizeHint() const;
- Qt::Orientation orientation() const { return orient; }
+ TQt::Orientation orientation() const { return orient; }
public slots:
- void setOrientation( Qt::Orientation );
+ void setOrientation( TQt::Orientation );
protected:
void styleChange( TQStyle& );
void paintEvent( TQPaintEvent * );
private:
- Qt::Orientation orient;
+ TQt::Orientation orient;
};
class QSeparatorAction : public TQAction
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -194,7 +194,7 @@ private:
class QDesignerToolBar : public TQToolBar
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui
index 13a56a04..9cb136ae 100644
--- a/kdevdesigner/designer/actioneditor.ui
+++ b/kdevdesigner/designer/actioneditor.ui
@@ -210,14 +210,14 @@
<forwards>
<forward>class TQListViewItem;</forward>
</forwards>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">connectionsClicked()</slot>
<slot access="protected">currentActionChanged( TQListViewItem * )</slot>
<slot access="protected">deleteAction()</slot>
<slot access="protected">newAction()</slot>
-</Q_SLOTS>
+</slots>
<includes>
<include location="local" impldecl="in implementation">myiconloader.h</include>
</includes>
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
index 294507a9..45b70994 100644
--- a/kdevdesigner/designer/actioneditorimpl.cpp
+++ b/kdevdesigner/designer/actioneditorimpl.cpp
@@ -50,21 +50,21 @@ ActionEditor::ActionEditor( TQWidget* parent, const char* name, WFlags fl )
explicitlyClosed(false)
{
listActions->addColumn( i18n( "Actions" ) );
- setEnabled( FALSE );
- buttonConnect->setEnabled( FALSE );
+ setEnabled( false );
+ buttonConnect->setEnabled( false );
TQPopupMenu *popup = new TQPopupMenu( this );
- popup->insertItem( i18n( "New &Action" ), this, TQT_SLOT( newAction() ) );
- popup->insertItem( i18n( "New Action &Group" ), this, TQT_SLOT( newActionGroup() ) );
- popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQT_SLOT( newDropDownActionGroup() ) );
+ popup->insertItem( i18n( "New &Action" ), this, TQ_SLOT( newAction() ) );
+ popup->insertItem( i18n( "New Action &Group" ), this, TQ_SLOT( newActionGroup() ) );
+ popup->insertItem( i18n( "New &Dropdown Action Group" ), this, TQ_SLOT( newDropDownActionGroup() ) );
buttonNewAction->setPopup( popup );
buttonNewAction->setPopupDelay( 0 );
- connect( listActions, TQT_SIGNAL( insertAction() ), this, TQT_SLOT( newAction() ) );
- connect( listActions, TQT_SIGNAL( insertActionGroup() ), this, TQT_SLOT( newActionGroup() ) );
- connect( listActions, TQT_SIGNAL( insertDropDownActionGroup() ), this, TQT_SLOT( newDropDownActionGroup() ) );
- connect( listActions, TQT_SIGNAL( deleteAction() ), this, TQT_SLOT( deleteAction() ) );
- connect( listActions, TQT_SIGNAL( connectAction() ), this, TQT_SLOT( connectionsClicked() ) );
+ connect( listActions, TQ_SIGNAL( insertAction() ), this, TQ_SLOT( newAction() ) );
+ connect( listActions, TQ_SIGNAL( insertActionGroup() ), this, TQ_SLOT( newActionGroup() ) );
+ connect( listActions, TQ_SIGNAL( insertDropDownActionGroup() ), this, TQ_SLOT( newDropDownActionGroup() ) );
+ connect( listActions, TQ_SIGNAL( deleteAction() ), this, TQ_SLOT( deleteAction() ) );
+ connect( listActions, TQ_SIGNAL( connectAction() ), this, TQ_SLOT( connectionsClicked() ) );
}
void ActionEditor::closeEvent( TQCloseEvent *e )
@@ -101,21 +101,21 @@ void ActionEditor::setCurrentAction( TQAction *a )
TQAction *ActionEditor::newActionEx()
{
- ActionItem *i = new ActionItem( listActions, (bool)FALSE );
+ ActionItem *i = new ActionItem( listActions, (bool)false );
TQAction *a = i->action();
- TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject* ) ) );
+ TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
TQString n = "Action";
- formWindow->unify( i->action(), n, TRUE );
+ formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->action()->setName( n );
i->action()->setText( i->action()->name() );
- MetaDataBase::setPropertyChanged( i->action(), "text", TRUE );
- MetaDataBase::setPropertyChanged( i->action(), "name", TRUE );
+ MetaDataBase::setPropertyChanged( i->action(), "text", true );
+ MetaDataBase::setPropertyChanged( i->action(), "name", true );
formWindow->actionList().append( i->action() );
if ( formWindow->formFile() )
- formWindow->formFile()->setModified( TRUE );
+ formWindow->formFile()->setModified( true );
return i->action();
}
@@ -139,9 +139,9 @@ void ActionEditor::deleteAction()
++it;
}
if ( formWindow ) {
- formWindow->setActiveObject( TQT_TQOBJECT(formWindow->mainContainer()) );
+ formWindow->setActiveObject( formWindow->mainContainer() );
if ( formWindow->formFile() )
- formWindow->formFile()->setModified( TRUE );
+ formWindow->formFile()->setModified( true );
}
}
@@ -149,7 +149,7 @@ void ActionEditor::newAction()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
+ if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
@@ -157,67 +157,67 @@ void ActionEditor::newAction()
if ( actionParent )
i = new ActionItem( actionParent );
else
- i = new ActionItem( listActions, (bool)FALSE );
+ i = new ActionItem( listActions, (bool)false );
TQAction *a = i->action();
- TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject* ) ) );
+ TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->action() );
TQString n = "Action";
- formWindow->unify( i->action(), n, TRUE );
+ formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->action()->setName( n );
i->action()->setText( i->action()->name() );
if ( actionParent && actionParent->actionGroup() &&
actionParent->actionGroup()->usesDropDown() ) {
- i->action()->setToggleAction( TRUE );
- MetaDataBase::setPropertyChanged( i->action(), "toggleAction", TRUE );
+ i->action()->setToggleAction( true );
+ MetaDataBase::setPropertyChanged( i->action(), "toggleAction", true );
}
- MetaDataBase::setPropertyChanged( i->action(), "text", TRUE );
- MetaDataBase::setPropertyChanged( i->action(), "name", TRUE );
+ MetaDataBase::setPropertyChanged( i->action(), "text", true );
+ MetaDataBase::setPropertyChanged( i->action(), "name", true );
listActions->setCurrentItem( i );
if ( !actionParent )
formWindow->actionList().append( i->action() );
if ( formWindow->formFile() )
- formWindow->formFile()->setModified( TRUE );
+ formWindow->formFile()->setModified( true );
}
void ActionEditor::newActionGroup()
{
ActionItem *actionParent = (ActionItem*)listActions->selectedItem();
if ( actionParent ) {
- if ( !::tqqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
+ if ( !::tqt_cast<TQActionGroup*>(actionParent->actionGroup()) )
actionParent = (ActionItem*)actionParent->parent();
}
ActionItem *i = 0;
if ( actionParent )
- i = new ActionItem( actionParent, TRUE );
+ i = new ActionItem( actionParent, true );
else
- i = new ActionItem( listActions, TRUE );
+ i = new ActionItem( listActions, true );
TQAction *ag = i->actionGroup();
- TQObject::connect( ag, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject* ) ) );
+ TQObject::connect( ag, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject* ) ) );
MetaDataBase::addEntry( i->actionGroup() );
- MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", TRUE );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "usesDropDown", true );
TQString n = "ActionGroup";
- formWindow->unify( i->action(), n, TRUE );
+ formWindow->unify( i->action(), n, true );
i->setText( 0, n );
i->actionGroup()->setName( n );
i->actionGroup()->setText( i->actionGroup()->name() );
- MetaDataBase::setPropertyChanged( i->actionGroup(), "text", TRUE );
- MetaDataBase::setPropertyChanged( i->actionGroup(), "name", TRUE );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "text", true );
+ MetaDataBase::setPropertyChanged( i->actionGroup(), "name", true );
listActions->setCurrentItem( i );
- i->setOpen( TRUE );
+ i->setOpen( true );
if ( !actionParent )
formWindow->actionList().append( i->actionGroup() );
if ( formWindow->formFile() )
- formWindow->formFile()->setModified( TRUE );
+ formWindow->formFile()->setModified( true );
}
void ActionEditor::newDropDownActionGroup()
{
newActionGroup();
- ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( TRUE );
+ ( (ActionItem*)listActions->currentItem() )->actionGroup()->setUsesDropDown( true );
}
void ActionEditor::setFormWindow( FormWindow *fw )
@@ -225,29 +225,29 @@ void ActionEditor::setFormWindow( FormWindow *fw )
listActions->clear();
formWindow = fw;
if ( !formWindow ||
- !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
- setEnabled( FALSE );
+ !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
+ setEnabled( false );
} else {
- setEnabled( TRUE );
+ setEnabled( true );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
- if ( ::tqqt_cast<TQAction*>(a->parent()) )
+ if ( ::tqt_cast<TQAction*>(a->parent()) )
continue;
i = new ActionItem( listActions, a );
i->setText( 0, a->name() );
i->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- TQObject::disconnect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject * ) ) );
- TQObject::connect( a, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject* ) ) );
- if ( ::tqqt_cast<TQActionGroup*>(a) ) {
+ TQObject::disconnect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( a, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject* ) ) );
+ if ( ::tqt_cast<TQActionGroup*>(a) ) {
insertChildActions( i );
}
}
if ( listActions->firstChild() ) {
listActions->setCurrentItem( listActions->firstChild() );
- listActions->setSelected( listActions->firstChild(), TRUE );
+ listActions->setSelected( listActions->firstChild(), true );
}
}
}
@@ -261,19 +261,19 @@ void ActionEditor::insertChildActions( ActionItem *i )
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
TQAction *a = (TQAction*)o;
ActionItem *i2 = new ActionItem( (TQListViewItem*)i, a );
- i->setOpen( TRUE );
+ i->setOpen( true );
i2->setText( 0, a->name() );
i2->setPixmap( 0, a->iconSet().pixmap() );
// make sure we don't duplicate the connection
- TQObject::disconnect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject * ) ) );
- TQObject::connect( o, TQT_SIGNAL( destroyed( TQObject * ) ),
- this, TQT_SLOT( removeConnections( TQObject * ) ) );
- if ( ::tqqt_cast<TQActionGroup*>(a) )
+ TQObject::disconnect( o, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject * ) ) );
+ TQObject::connect( o, TQ_SIGNAL( destroyed( TQObject * ) ),
+ this, TQ_SLOT( removeConnections( TQObject * ) ) );
+ if ( ::tqt_cast<TQActionGroup*>(a) )
insertChildActions( i2 );
}
}
@@ -305,7 +305,7 @@ void ActionEditor::updateActionIcon( TQAction *a )
void ActionEditor::connectionsClicked()
{
ConnectionDialog dlg( formWindow->mainWindow() );
- dlg.setDefault( TQT_TQOBJECT(currentAction), TQT_TQOBJECT(formWindow) );
+ dlg.setDefault( currentAction, formWindow );
dlg.addConnection();
dlg.exec();
}
@@ -313,9 +313,9 @@ void ActionEditor::connectionsClicked()
void ActionEditor::removeConnections( TQObject *o )
{
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(formWindow), o );
+ MetaDataBase::connections( formWindow, o );
for ( TQValueList<MetaDataBase::Connection>::Iterator it2 = conns.begin();
it2 != conns.end(); ++it2 )
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow), (*it2).sender, (*it2).signal,
+ MetaDataBase::removeConnection( formWindow, (*it2).sender, (*it2).signal,
(*it2).receiver, (*it2).slot );
}
diff --git a/kdevdesigner/designer/actioneditorimpl.h b/kdevdesigner/designer/actioneditorimpl.h
index 9e67ed9a..2062aaa2 100644
--- a/kdevdesigner/designer/actioneditorimpl.h
+++ b/kdevdesigner/designer/actioneditorimpl.h
@@ -37,7 +37,7 @@ class ActionItem;
class ActionEditor : public ActionEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp
index 3e8c95c2..d34aca5d 100644
--- a/kdevdesigner/designer/actionlistview.cpp
+++ b/kdevdesigner/designer/actionlistview.cpp
@@ -33,29 +33,29 @@
ActionListView::ActionListView( TQWidget *parent, const char *name )
: TQListView( parent, name )
{
- setShowSortIndicator( TRUE );
+ setShowSortIndicator( true );
setResizeMode( LastColumn );
- setRootIsDecorated( TRUE );
- connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
- this, TQT_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) );
+ setRootIsDecorated( true );
+ connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQ_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) );
}
ActionItem::ActionItem( TQListView *lv, TQAction *ac )
: TQListViewItem( lv ), a( 0 ), g( 0 )
{
- g = ::tqqt_cast<QDesignerActionGroup*>(ac);
+ g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
- a = ::tqqt_cast<QDesignerAction*>(ac);
- setDragEnabled( TRUE );
+ a = ::tqt_cast<QDesignerAction*>(ac);
+ setDragEnabled( true );
}
ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
: TQListViewItem( i ), a( 0 ), g( 0 )
{
- g = ::tqqt_cast<QDesignerActionGroup*>(ac);
+ g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
- a = ::tqqt_cast<QDesignerAction*>(ac);
- setDragEnabled( TRUE );
+ a = ::tqt_cast<QDesignerAction*>(ac);
+ setDragEnabled( true );
moveToEnd();
}
diff --git a/kdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h
index 047b21bd..a7b1fa45 100644
--- a/kdevdesigner/designer/actionlistview.h
+++ b/kdevdesigner/designer/actionlistview.h
@@ -36,13 +36,13 @@ public:
ActionItem( TQListView *lv, bool group )
: TQListViewItem( lv ),
a( group ? 0 : new QDesignerAction( 0 ) ),
- g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( TRUE ); }
+ g( group ? new QDesignerActionGroup( 0 ) : 0 ) { setDragEnabled( true ); }
ActionItem( TQListView *lv, TQAction *ac );
ActionItem( TQListViewItem *i, TQAction *ac );
- ActionItem( ActionItem *parent, bool group = FALSE )
+ 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(); }
+ g( group ? new QDesignerActionGroup( parent->actionGroup() ) : 0 ) { setDragEnabled( true ); moveToEnd(); }
QDesignerAction *action() const { return a; }
QDesignerActionGroup *actionGroup() const { return g; }
@@ -58,7 +58,7 @@ private:
class ActionListView : public TQListView
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/asciivalidator.cpp b/kdevdesigner/designer/asciivalidator.cpp
index 667b0a61..696ffeae 100644
--- a/kdevdesigner/designer/asciivalidator.cpp
+++ b/kdevdesigner/designer/asciivalidator.cpp
@@ -29,7 +29,7 @@
#include <tqstring.h>
AsciiValidator::AsciiValidator( TQObject * parent, const char *name )
- : TQValidator( parent, name ), functionName( FALSE )
+ : TQValidator( parent, name ), functionName( false )
{
}
@@ -39,7 +39,7 @@ AsciiValidator::AsciiValidator( bool funcName, TQObject * parent, const char *na
}
AsciiValidator::AsciiValidator( const TQString &allow, TQObject * parent, const char *name )
- : TQValidator( parent, name ), functionName( FALSE ), allowedChars( allow )
+ : TQValidator( parent, name ), functionName( false ), allowedChars( allow )
{
}
@@ -49,8 +49,8 @@ AsciiValidator::~AsciiValidator()
TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
{
- bool inParen = FALSE;
- bool outParen = FALSE;
+ bool inParen = false;
+ bool outParen = false;
if ( !s.isEmpty() && s[0].row() == 0 && s[0].cell() >= '0' && s[0].cell() <= '9' )
s[0] = '_';
for ( int i = 0, j = 0; i < (int) s.length(); i++ ) {
@@ -75,11 +75,11 @@ TQValidator::State AsciiValidator::validate( TQString &s, int & ) const
if ( functionName ) {
if ( c == '(' ) {
- inParen = TRUE;
+ inParen = true;
continue;
}
if ( c == ')' ) {
- outParen = TRUE;
+ outParen = true;
j = i + 1;
continue;
}
diff --git a/kdevdesigner/designer/asciivalidator.h b/kdevdesigner/designer/asciivalidator.h
index a284f6ab..31f53fa6 100644
--- a/kdevdesigner/designer/asciivalidator.h
+++ b/kdevdesigner/designer/asciivalidator.h
@@ -33,7 +33,7 @@
class AsciiValidator: public TQValidator
{
- Q_OBJECT
+ TQ_OBJECT
public:
AsciiValidator( TQObject * parent, const char *name = 0 );
diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp
index b9b97827..4e4eab06 100644
--- a/kdevdesigner/designer/command.cpp
+++ b/kdevdesigner/designer/command.cpp
@@ -63,8 +63,8 @@
CommandHistory::CommandHistory( int s )
: current( -1 ), steps( s ), savedAt( -1 )
{
- history.setAutoDelete( TRUE );
- modified = FALSE;
+ history.setAutoDelete( true );
+ modified = false;
compressedCommand = 0;
}
@@ -80,7 +80,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
if ( compressedCommand ) {
compressedCommand->merge( cmd );
- modified = TRUE;
+ modified = true;
modificationChanged( modified );
return;
}
@@ -94,7 +94,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
savedAt = -2;
TQPtrList<Command> commands;
- commands.setAutoDelete( FALSE );
+ commands.setAutoDelete( false );
for( int i = 0; i <= current; ++i ) {
commands.insert( i, history.at( 0 ) );
@@ -104,7 +104,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
commands.append( cmd );
history.clear();
history = commands;
- history.setAutoDelete( TRUE );
+ history.setAutoDelete( true );
} else {
history.append( cmd );
}
@@ -117,7 +117,7 @@ void CommandHistory::addCommand( Command *cmd, bool tryCompress )
}
emitUndoRedo();
- modified = TRUE;
+ modified = true;
modificationChanged( modified );
}
@@ -228,7 +228,7 @@ void Command::merge( Command * )
bool Command::canMerge( Command * )
{
- return FALSE;
+ return false;
}
// ------------------------------------------------------------
@@ -243,7 +243,7 @@ void ResizeCommand::execute()
{
widget->setGeometry( newRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -252,7 +252,7 @@ void ResizeCommand::unexecute()
{
widget->setGeometry( oldRect );
formWindow()->updateSelection( widget );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ formWindow()->emitUpdateProperties( widget );
if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout )
formWindow()->updateChildSelections( widget );
}
@@ -278,16 +278,16 @@ void InsertCommand::execute()
}
widget->show();
formWindow()->widgets()->insert( widget, widget );
- formWindow()->clearSelection( FALSE );
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ formWindow()->clearSelection( false );
+ formWindow()->selectWidget( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
}
void InsertCommand::unexecute()
{
widget->hide();
- formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE );
- formWindow()->widgets()->remove( TQT_TQOBJECT(widget) );
+ formWindow()->selectWidget( widget, false );
+ formWindow()->widgets()->remove( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget );
}
@@ -301,7 +301,7 @@ MoveCommand::MoveCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ),
oldParent( opr ), newParent( npr )
{
- widgets.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
}
void MoveCommand::merge( Command *c )
@@ -323,10 +323,10 @@ void MoveCommand::execute()
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
- w->reparent( newParent, pos, TRUE );
+ w->reparent( newParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( TQT_TQOBJECT(w) );
+ formWindow()->widgetChanged( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -334,7 +334,7 @@ void MoveCommand::execute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -344,10 +344,10 @@ void MoveCommand::unexecute()
if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) {
if ( newParent && oldParent && newParent != oldParent ) {
TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) );
- w->reparent( oldParent, pos, TRUE );
+ w->reparent( oldParent, pos, true );
formWindow()->raiseSelection( w );
formWindow()->raiseChildSelections( w );
- formWindow()->widgetChanged( TQT_TQOBJECT(w) );
+ formWindow()->widgetChanged( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -355,7 +355,7 @@ void MoveCommand::unexecute()
}
formWindow()->updateSelection( w );
formWindow()->updateChildSelections( w );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) );
+ formWindow()->emitUpdateProperties( w );
}
}
@@ -365,13 +365,13 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
const TQWidgetList &wl )
: Command( n, fw ), widgets( wl )
{
- widgets.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
TQWidgetList copyOfWidgets = widgets;
- copyOfWidgets.setAutoDelete(FALSE);
+ copyOfWidgets.setAutoDelete(false);
// Include the children of the selected items when deleting
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *children = w->queryList( "TQWidget" );
for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) {
if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) {
widgets.insert(widgets.at() + 1, c);
@@ -385,24 +385,24 @@ DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw,
void DeleteCommand::execute()
{
- formWindow()->setPropertyShowingBlocked( TRUE );
+ formWindow()->setPropertyShowingBlocked( true );
connections.clear();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
TQString s = w->name();
s.prepend( "qt_dead_widget_" );
w->setName( s );
- formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE );
+ formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
- TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) );
+ TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
+ MetaDataBase::removeConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
- formWindow()->setPropertyShowingBlocked( FALSE );
+ formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets );
@@ -410,23 +410,23 @@ void DeleteCommand::execute()
void DeleteCommand::unexecute()
{
- formWindow()->setPropertyShowingBlocked( TRUE );
- formWindow()->clearSelection( FALSE );
+ formWindow()->setPropertyShowingBlocked( true );
+ formWindow()->clearSelection( false );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
TQString s = w->name();
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
w->setName( s );
formWindow()->widgets()->insert( w, w );
- formWindow()->selectWidget( TQT_TQOBJECT(w) );
+ formWindow()->selectWidget( w );
TQValueList<MetaDataBase::Connection> conns = *connections.find( w );
TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
for ( ; it != conns.end(); ++it ) {
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender,
+ MetaDataBase::addConnection( formWindow(), (*it).sender,
(*it).signal, (*it).receiver, (*it).slot );
}
}
- formWindow()->setPropertyShowingBlocked( FALSE );
+ formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets );
}
@@ -440,7 +440,7 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
const TQString &ocut, bool reset )
: Command( n, fw ), widget( w ), editor( e ), propName( pn ),
oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ),
- wasChanged( TRUE ), isResetCommand( reset )
+ wasChanged( true ), isResetCommand( reset )
{
wasChanged = MetaDataBase::isPropertyChanged( w, propName );
if ( oldCurrentItemText.isNull() )
@@ -453,12 +453,12 @@ SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw,
void SetPropertyCommand::execute()
{
if ( !wasChanged )
- MetaDataBase::setPropertyChanged( widget, propName, TRUE );
+ MetaDataBase::setPropertyChanged( widget, propName, true );
if ( isResetCommand ) {
- MetaDataBase::setPropertyChanged( widget, propName, FALSE );
+ MetaDataBase::setPropertyChanged( widget, propName, false );
if ( WidgetFactory::resetProperty( widget, propName ) ) {
- if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) )
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ if ( !formWindow()->isWidgetSelected( widget ) && formWindow() != widget )
+ formWindow()->selectWidget( widget );
if ( editor->widget() != widget )
editor->setWidget( widget, formWindow() );
editor->propertyList()->setCurrentProperty( propName );
@@ -466,7 +466,7 @@ void SetPropertyCommand::execute()
if ( !i )
return;
i->setValue( widget->property( propName ) );
- i->setChanged( FALSE );
+ i->setChanged( false );
editor->refetchData();
editor->emitWidgetChanged();
return;
@@ -478,9 +478,9 @@ void SetPropertyCommand::execute()
void SetPropertyCommand::unexecute()
{
if ( !wasChanged )
- MetaDataBase::setPropertyChanged( widget, propName, FALSE );
+ MetaDataBase::setPropertyChanged( widget, propName, false );
if ( isResetCommand )
- MetaDataBase::setPropertyChanged( widget, propName, TRUE );
+ MetaDataBase::setPropertyChanged( widget, propName, true );
setProperty( oldValue, oldCurrentItemText );
}
@@ -488,24 +488,24 @@ bool SetPropertyCommand::canMerge( Command *c )
{
SetPropertyCommand *cmd = (SetPropertyCommand*)c;
if ( !widget )
- return FALSE;
+ return false;
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "toolTip" || propName == "whatsThis" )
- return TRUE;
- if ( ::tqqt_cast<CustomWidget*>((TQObject *)widget) ) {
+ return true;
+ if ( ::tqt_cast<CustomWidget*>((TQObject *)widget) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget();
if ( !cw )
- return FALSE;
+ return false;
for ( TQValueList<MetaDataBase::Property>::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
if ( TQString( (*it ).property ) == propName ) {
if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" )
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
TQVariant::Type t = TQVariant::nameToType( p->type() );
return ( cmd->propName == propName &&
@@ -523,7 +523,7 @@ bool SetPropertyCommand::checkProperty()
{
if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that
TQString s = newValue.toString();
- if ( !formWindow()->unify( widget, s, FALSE ) ) {
+ if ( !formWindow()->unify( widget, s, false ) ) {
TQMessageBox::information( formWindow()->mainWindow(),
i18n( "Set 'name' Property" ),
i18n( "The name of a widget must be unique.\n"
@@ -532,8 +532,8 @@ bool SetPropertyCommand::checkProperty()
arg( newValue.toString() ).
arg( formWindow()->name() ).
arg( oldValue.toString() ));
- setProperty( oldValue, oldCurrentItemText, FALSE );
- return FALSE;
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
}
if ( s.isEmpty() ) {
TQMessageBox::information( formWindow()->mainWindow(),
@@ -541,14 +541,14 @@ bool SetPropertyCommand::checkProperty()
i18n( "The name of a widget must not be null.\n"
"The name has been reverted to '%1'." ).
arg( oldValue.toString() ));
- setProperty( oldValue, oldCurrentItemText, FALSE );
- return FALSE;
+ setProperty( oldValue, oldCurrentItemText, false );
+ return false;
}
- if ( ::tqqt_cast<FormWindow*>(widget->parent()) )
+ if ( ::tqt_cast<FormWindow*>(widget->parent()) )
formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() );
}
- return TRUE;
+ return true;
}
void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &currentItemText, bool select )
@@ -557,22 +557,22 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
return;
if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select )
- formWindow()->selectWidget( TQT_TQOBJECT(widget) );
+ formWindow()->selectWidget( widget );
if ( editor->widget() != widget && select )
editor->setWidget( widget, formWindow() );
if ( select )
editor->propertyList()->setCurrentProperty( propName );
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->metaObject()->property( widget->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
if ( propName == "hAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignHorizontal_Mask );
align |= p->keyToValue( currentItemText );
widget->setProperty( "alignment", TQVariant( align ) );
} else if ( propName == "vAlign" ) {
- p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", true ), true );
int align = widget->property( "alignment" ).toInt();
align &= ~( AlignVertical_Mask );
align |= p->keyToValue( currentItemText );
@@ -587,17 +587,17 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "layoutMargin" ) {
TQVariant val = v;
if ( val.toString() == "default" )
val = -1;
- MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), val.toInt() );
} else if ( propName == "resizeMode" ) {
- MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText );
+ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ), currentItemText );
} else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
- } else if ( ::tqqt_cast<CustomWidget*>(editor->widget()) ) {
+ } else if ( ::tqt_cast<CustomWidget*>(editor->widget()) ) {
MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget();
if ( cw ) {
MetaDataBase::setFakeProperty( editor->widget(), propName, v );
@@ -634,9 +634,9 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
oldSerNum = v.toPixmap().serialNumber();
widget->setProperty( propName, v );
if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() )
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()),
+ MetaDataBase::setPixmapKey( formWindow(),
widget->property( propName ).toPixmap().serialNumber(),
- MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) );
+ MetaDataBase::pixmapKey( formWindow(), oldSerNum ) );
if ( propName == "cursor" ) {
MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() );
}
@@ -645,10 +645,10 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( formWindow()->isMainContainer( widget ) )
formWindow()->setName( v.toCString() );
}
- if ( propName == "name" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "name" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget );
}
- if ( propName == "iconSet" && ::tqqt_cast<TQAction*>((TQObject *)widget) && ::tqqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
+ if ( propName == "iconSet" && ::tqt_cast<TQAction*>((TQObject *)widget) && ::tqt_cast<TQMainWindow*>(formWindow()->mainContainer()) ) {
formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget );
}
if ( propName == "caption" ) {
@@ -666,7 +666,7 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) );
}
editor->emitWidgetChanged();
- formWindow()->killAccels( TQT_TQOBJECT(widget) );
+ formWindow()->killAccels( widget );
}
// ------------------------------------------------------------
@@ -680,14 +680,14 @@ LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow
void LayoutHorizontalCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -697,20 +697,20 @@ void LayoutHorizontalCommand::unexecute()
LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutHorizontalSplitCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutHorizontalSplitCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -726,14 +726,14 @@ LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw,
void LayoutVerticalCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -743,20 +743,20 @@ void LayoutVerticalCommand::unexecute()
LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw,
TQWidget *parent, TQWidget *layoutBase,
const TQWidgetList &wl )
- : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE )
+ : Command( n, fw ), layout( wl, parent, fw, layoutBase, true, true )
{
}
void LayoutVerticalSplitCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutVerticalSplitCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -772,14 +772,14 @@ LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw,
void LayoutGridCommand::execute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void LayoutGridCommand::unexecute()
{
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout.undoLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -791,22 +791,22 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
: Command( n, fw ), lb( layoutBase ), widgets( wl )
{
WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase );
- spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) );
- margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) );
+ spacing = MetaDataBase::spacing( layoutBase );
+ margin = MetaDataBase::margin( layoutBase );
layout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::VBox )
- layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast<TQSplitter*>(layoutBase) != 0 );
+ layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, false, ::tqt_cast<TQSplitter*>(layoutBase) != 0 );
else if ( lay == WidgetFactory::Grid )
- layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE );
+ layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), false );
}
void BreakLayoutCommand::execute()
{
if ( !layout )
return;
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout->breakLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
@@ -817,11 +817,11 @@ void BreakLayoutCommand::unexecute()
{
if ( !layout )
return;
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
- MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing );
- MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( lb ), margin );
}
// ------------------------------------------------------------
@@ -853,7 +853,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
tabPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
+ MetaDataBase::addEntry( tabPage );
}
void AddTabPageCommand::execute()
@@ -862,7 +862,7 @@ void AddTabPageCommand::execute()
index = ( (QDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -870,7 +870,7 @@ void AddTabPageCommand::unexecute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -889,7 +889,7 @@ void MoveTabPageCommand::execute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -898,7 +898,7 @@ void MoveTabPageCommand::unexecute()
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -916,7 +916,7 @@ void DeleteTabPageCommand::execute()
{
tabWidget->removePage( tabPage );
tabPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -924,7 +924,7 @@ void DeleteTabPageCommand::unexecute()
{
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -937,13 +937,13 @@ AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWin
stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
stackPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
+ MetaDataBase::addEntry( stackPage );
}
void AddWidgetStackPageCommand::execute()
{
index = widgetStack->insertPage( stackPage, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
@@ -951,7 +951,7 @@ void AddWidgetStackPageCommand::unexecute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 );
}
@@ -966,7 +966,7 @@ void DeleteWidgetStackPageCommand::execute()
{
index = widgetStack->removePage( stackPage );
stackPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage );
}
@@ -974,7 +974,7 @@ void DeleteWidgetStackPageCommand::unexecute()
{
index = widgetStack->insertPage( stackPage, index );
widgetStack->raiseWidget( stackPage );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage );
}
@@ -988,7 +988,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
page->hide();
index = i;
show = s;
- MetaDataBase::addEntry( TQT_TQOBJECT(page) );
+ MetaDataBase::addEntry( page );
}
void AddWizardPageCommand::execute()
@@ -998,7 +998,7 @@ void AddWizardPageCommand::execute()
wizard->insertPage( page, pageLabel, index );
if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1006,7 +1006,7 @@ void AddWizardPageCommand::unexecute()
{
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1025,7 +1025,7 @@ void DeleteWizardPageCommand::execute()
pageLabel = wizard->title( page );
wizard->removePage( page );
page->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1034,7 +1034,7 @@ void DeleteWizardPageCommand::unexecute()
wizard->insertPage( page, pageLabel, index );
if ( show )
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1054,7 +1054,7 @@ void RenameWizardPageCommand::execute()
wizard->setTitle( page, label );
label = oldLabel;
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
}
void RenameWizardPageCommand::unexecute()
@@ -1079,7 +1079,7 @@ void SwapWizardPagesCommand::execute()
wizard->removePage( page2 );
wizard->insertPage( page1, page1Label, index2 );
wizard->insertPage( page2, page2Label, index1 );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1101,7 +1101,7 @@ void MoveWizardPageCommand::execute()
TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index2 );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1112,7 +1112,7 @@ void MoveWizardPageCommand::unexecute()
TQString pageLabel = wizard->title( page );
wizard->removePage( page );
wizard->insertPage( page, pageLabel, index1 );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1126,17 +1126,17 @@ AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw
void AddConnectionCommand::execute()
{
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void AddConnectionCommand::unexecute()
{
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1150,17 +1150,17 @@ RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWind
void RemoveConnectionCommand::execute()
{
- MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::removeConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
void RemoveConnectionCommand::unexecute()
{
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender,
+ MetaDataBase::addConnection( formWindow(), connection.sender,
connection.signal, connection.receiver, connection.slot );
- if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) )
+ if ( connection.receiver == formWindow()->mainContainer() )
formWindow()->mainWindow()->propertyeditor()->eventList()->setup();
}
@@ -1176,7 +1176,7 @@ AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, co
void AddFunctionCommand::execute()
{
- MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - execute)
@@ -1190,12 +1190,12 @@ void AddFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddFunctionCommand::unexecute()
{
- MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (add - unexecute)
@@ -1208,7 +1208,7 @@ void AddFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1230,7 +1230,7 @@ ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name,
void ChangeFunctionAttribCommand::execute()
{
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess,
+ MetaDataBase::changeFunctionAttributes( formWindow(), oldName, newName, newSpec, newAccess,
newType, newLang, newReturnType );
formWindow()->formFile()->functionNameChanged( oldName, newName );
formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType );
@@ -1252,12 +1252,12 @@ void ChangeFunctionAttribCommand::execute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void ChangeFunctionAttribCommand::unexecute()
{
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess,
+ MetaDataBase::changeFunctionAttributes( formWindow(), newName, oldName, oldSpec, oldAccess,
oldType, oldLang, oldReturnType );
formWindow()->formFile()->functionNameChanged( newName, oldName );
formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType );
@@ -1279,7 +1279,7 @@ void ChangeFunctionAttribCommand::unexecute()
formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1291,7 +1291,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
returnType( rt )
{
if ( spec.isNull() ) {
- TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) );
+ TQValueList<MetaDataBase::Function> lst = MetaDataBase::functionList( fw );
for ( TQValueList<MetaDataBase::Function>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).function ) ==
MetaDataBase::normalizeFunction( function ) ) {
@@ -1308,7 +1308,7 @@ RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *
void RemoveFunctionCommand::execute()
{
- MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::removeFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - execute)
@@ -1321,14 +1321,14 @@ void RemoveFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveFunctionCommand::unexecute()
{
- if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) )
+ if ( MetaDataBase::hasFunction( formWindow(), function ) )
return;
- MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType );
+ MetaDataBase::addFunction( formWindow(), function, specifier, access, functionType, language, returnType );
formWindow()->mainWindow()->functionsChanged();
//integration (remove - unexecute)
@@ -1342,7 +1342,7 @@ void RemoveFunctionCommand::unexecute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1354,18 +1354,18 @@ AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, co
void AddVariableCommand::execute()
{
- MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
+ MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddVariableCommand::unexecute()
{
- MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
+ MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1374,23 +1374,23 @@ SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw,
TQValueList<MetaDataBase::Variable> lst )
: Command( name, fw ), newList( lst )
{
- oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) );
+ oldList = MetaDataBase::variables( formWindow() );
}
void SetVariablesCommand::execute()
{
- MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList );
+ MetaDataBase::setVariables( formWindow(), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void SetVariablesCommand::unexecute()
{
- MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList );
+ MetaDataBase::setVariables( formWindow(), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1398,7 +1398,7 @@ void SetVariablesCommand::unexecute()
RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn )
: Command( name, fw ), varName( vn )
{
- TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( TQT_TQOBJECT(fw) );
+ TQValueList<MetaDataBase::Variable> lst = MetaDataBase::variables( fw );
for ( TQValueList<MetaDataBase::Variable>::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if ( (*it).varName == varName ) {
access = (*it).varAccess;
@@ -1409,18 +1409,18 @@ RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *
void RemoveVariableCommand::execute()
{
- MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName );
+ MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveVariableCommand::unexecute()
{
- MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access );
+ MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1438,7 +1438,7 @@ void EditDefinitionsCommand::execute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void EditDefinitionsCommand::unexecute()
@@ -1447,7 +1447,7 @@ void EditDefinitionsCommand::unexecute()
lIface->release();
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1510,7 +1510,7 @@ void PasteCommand::execute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->show();
- formWindow()->selectWidget( TQT_TQOBJECT(w) );
+ formWindow()->selectWidget( w );
formWindow()->widgets()->insert( w, w );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w );
}
@@ -1520,7 +1520,7 @@ void PasteCommand::unexecute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
- formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE );
+ formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w );
}
@@ -1542,7 +1542,7 @@ void TabOrderCommand::merge( Command *c )
bool TabOrderCommand::canMerge( Command * )
{
- return TRUE;
+ return true;
}
void TabOrderCommand::execute()
@@ -1704,7 +1704,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
} else {
if ( i->parent() == fromLast ) {
fromParents.push( fromLast );
@@ -1724,7 +1724,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
toLasts.pop();
toLasts.push( ni );
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
} else {
while ( fromParents.top() != i->parent() ) {
fromParents.pop();
@@ -1744,7 +1744,7 @@ void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to )
ni->setPixmap( c, *i->pixmap( c ) );
}
if ( pi )
- pi->setOpen( TRUE );
+ pi->setOpen( true );
toLasts.pop();
toLasts.push( ni );
}
@@ -1762,21 +1762,21 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
: Command( n, fw ), newText( txt ), mlined( mle )
{
oldText = mlined->text();
- wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" );
+ wasChanged = MetaDataBase::isPropertyChanged( mlined, "text" );
}
void PopulateMultiLineEditCommand::execute()
{
mlined->setText( newText );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
+ MetaDataBase::setPropertyChanged( mlined, "text", true );
+ formWindow()->emitUpdateProperties( mlined );
}
void PopulateMultiLineEditCommand::unexecute()
{
mlined->setText( oldText );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) );
+ MetaDataBase::setPropertyChanged( mlined, "text", wasChanged );
+ formWindow()->emitUpdateProperties( mlined );
}
// ------------------------------------------------------------
@@ -1788,7 +1788,7 @@ PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, T
{
#ifndef TQT_NO_TABLE
int i = 0;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
for ( i = 0; i < table->horizontalHeader()->count(); ++i ) {
PopulateTableCommand::Column col;
col.text = table->horizontalHeader()->label( i );
@@ -1818,7 +1818,7 @@ void PopulateTableCommand::execute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
+ MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( newRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i )
@@ -1837,7 +1837,7 @@ void PopulateTableCommand::unexecute()
if ( !(*cit).field.isEmpty() )
columnFields.insert( (*cit).text, (*cit).field );
}
- MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields );
+ MetaDataBase::setColumnFields( table, columnFields );
table->setNumRows( oldRows.count() );
i = 0;
for ( TQValueList<Row>::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i )
@@ -1857,7 +1857,7 @@ void AddActionToToolBarCommand::execute()
{
action->addTo( toolBar );
- if ( ::tqqt_cast<QDesignerAction*>(action) ) {
+ if ( ::tqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (QDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
@@ -1865,22 +1865,22 @@ void AddActionToToolBarCommand::execute()
}
toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(action) ) {
if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
}
- } else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
+ } else if ( ::tqt_cast<QSeparatorAction*>(action) ) {
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
- if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
toolBar->appendAction( action );
else
toolBar->insertAction( index, action );
toolBar->reInsert();
- TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
} else {
TQObjectList clo = action->childrenListObject();
if ( !clo.isEmpty() ) {
@@ -1889,10 +1889,10 @@ void AddActionToToolBarCommand::execute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
// ### fix it for nested actiongroups
- if ( ::tqqt_cast<QDesignerAction*>(o) ) {
+ if ( ::tqt_cast<QDesignerAction*>(o) ) {
QDesignerAction *ac = (QDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar );
@@ -1901,18 +1901,18 @@ void AddActionToToolBarCommand::execute()
else
toolBar->insertAction( index + (i++), ac );
}
- TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
}
toolBar->reInsert();
- TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::connect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
void AddActionToToolBarCommand::unexecute()
{
- if ( ::tqqt_cast<QDesignerAction*>(action) ) {
+ if ( ::tqt_cast<QDesignerAction*>(action) ) {
TQString s = ( (QDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
( (QDesignerAction*)action )->widget()->setName( s );
@@ -1920,8 +1920,8 @@ void AddActionToToolBarCommand::unexecute()
toolBar->removeAction( action );
action->removeFrom( toolBar );
- TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
- if ( !::tqqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
+ TQObject::disconnect( action, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
+ if ( !::tqt_cast<TQActionGroup*>(action) || ( (TQActionGroup*)action )->usesDropDown()) {
action->removeEventFilter( toolBar );
} else {
TQObjectList clo = action->childrenListObject();
@@ -1930,13 +1930,13 @@ void AddActionToToolBarCommand::unexecute()
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
- if ( ::tqqt_cast<QDesignerAction*>(o) ) {
+ if ( ::tqt_cast<QDesignerAction*>(o) ) {
o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o );
}
- TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) );
+ TQObject::disconnect( o, TQ_SIGNAL( destroyed() ), toolBar, TQ_SLOT( actionRemoved() ) );
}
}
}
@@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute()
if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar";
- formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE );
+ formWindow()->unify( toolBar, n, true );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
@@ -2011,7 +2011,7 @@ void AddContainerPageCommand::execute()
wiface->insertPage( wClassName, container, pageLabel, index, page );
MetaDataBase::addEntry( page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2020,7 +2020,7 @@ void AddContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2054,7 +2054,7 @@ void DeleteContainerPageCommand::execute()
return;
wiface->removePage( wClassName, container, index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2066,7 +2066,7 @@ void DeleteContainerPageCommand::unexecute()
index = wiface->count( wClassName, container );
wiface->insertPage( wClassName, container, pageLabel, index, page );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2099,7 +2099,7 @@ void RenameContainerPageCommand::execute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, newLabel );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
@@ -2108,7 +2108,7 @@ void RenameContainerPageCommand::unexecute()
if ( !wiface || !wiface->supportsPages( wClassName ) )
return;
wiface->renamePage( wClassName, container, index, oldLabel );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
// #### show and update pages in object hierarchy view
}
#endif // TQT_CONTAINER_CUSTOM_WIDGETS
@@ -2233,7 +2233,7 @@ void SetActionIconsCommand::execute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
- MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
+ MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
void SetActionIconsCommand::unexecute()
@@ -2242,7 +2242,7 @@ void SetActionIconsCommand::unexecute()
ActionEditor *ae = actionEditor();
if ( ae )
ae->updateActionIcon( action );
- MetaDataBase::setPropertyChanged( action, "iconSet", TRUE );
+ MetaDataBase::setPropertyChanged( action, "iconSet", true );
}
// ------------------------------------------------------------
@@ -2272,19 +2272,19 @@ void AddMenuCommand::execute()
if ( !mb ) {
mb = new MenuBarEditor( formWindow(), mw );
mb->setName( "MenuBarEditor" );
- formWindow()->insertWidget( mb, TRUE );
+ formWindow()->insertWidget( mb, true );
}
if ( !item ) {
PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw );
popup->setName( "PopupMenuEditor" );
- formWindow()->insertWidget( popup, TRUE );
+ formWindow()->insertWidget( popup, true );
mb->insertItem( name, popup, index );
index = mb->findItem( popup );
item = mb->item( index );
} else {
PopupMenuEditor *popup = item->menu();
popup->setName( item->menuText() );
- formWindow()->insertWidget( popup, TRUE );
+ formWindow()->insertWidget( popup, true );
mb->insertItem( item, index );
}
formWindow()->mainWindow()->objectHierarchy()->rebuild();
@@ -2407,7 +2407,7 @@ void RenameMenuCommand::execute()
PopupMenuEditor *popup = item->menu();
item->setMenuText( newName );
TQString legal = makeLegal( newName );
- formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE );
+ formWindow()->unify( popup, legal, true );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2429,14 +2429,14 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
toolBoxPage->hide();
index = -1;
- MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );
+ MetaDataBase::addEntry( toolBoxPage );
}
void AddToolBoxPageCommand::execute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel);
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2444,7 +2444,7 @@ void AddToolBoxPageCommand::unexecute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2462,7 +2462,7 @@ void DeleteToolBoxPageCommand::execute()
{
toolBox->removeItem( toolBoxPage );
toolBoxPage->hide();
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
@@ -2470,6 +2470,6 @@ void DeleteToolBoxPageCommand::unexecute()
{
index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel );
toolBox->setCurrentIndex( index );
- formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->emitUpdateProperties( formWindow()->currentWidget() );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h
index b1c7a2a5..eb34952d 100644
--- a/kdevdesigner/designer/command.h
+++ b/kdevdesigner/designer/command.h
@@ -149,13 +149,13 @@ private:
class CommandHistory : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
CommandHistory( int s );
- void addCommand( Command *cmd, bool tryCompress = FALSE );
+ void addCommand( Command *cmd, bool tryCompress = false );
void undo();
void redo();
@@ -256,7 +256,7 @@ public:
const TQString &pn, const TQVariant &ov,
const TQVariant &nv, const TQString &ncut,
const TQString &ocut,
- bool reset = FALSE );
+ bool reset = false );
void execute();
void unexecute();
@@ -266,7 +266,7 @@ public:
bool checkProperty();
private:
- void setProperty( const TQVariant &v, const TQString &currentItemText, bool select = TRUE );
+ void setProperty( const TQVariant &v, const TQString &currentItemText, bool select = true );
TQGuardedPtr<TQObject> widget;
PropertyEditor *editor;
@@ -484,7 +484,7 @@ class AddWizardPageCommand : public Command
{
public:
AddWizardPageCommand( const TQString &n, FormWindow *fw,
- TQWizard *w, const TQString &label, int index = -1, bool show = TRUE );
+ TQWizard *w, const TQString &label, int index = -1, bool show = true );
void execute();
void unexecute();
@@ -503,7 +503,7 @@ class DeleteWizardPageCommand : public Command
{
public:
DeleteWizardPageCommand( const TQString &n, FormWindow *fw,
- TQWizard *w, int index, bool show = TRUE );
+ TQWizard *w, int index, bool show = true );
void execute();
void unexecute();
diff --git a/kdevdesigner/designer/configtoolboxdialog.ui b/kdevdesigner/designer/configtoolboxdialog.ui
index 226cdd35..6b006d74 100644
--- a/kdevdesigner/designer/configtoolboxdialog.ui
+++ b/kdevdesigner/designer/configtoolboxdialog.ui
@@ -305,7 +305,7 @@
<includes>
<include location="local" impldecl="in implementation">configtoolboxdialog.ui.h</include>
</includes>
-<Q_SLOTS>
+<slots>
<slot>addTool()</slot>
<slot>removeTool()</slot>
<slot>moveToolUp()</slot>
@@ -313,7 +313,7 @@
<slot>currentToolChanged( TQListViewItem * i )</slot>
<slot>currentCommonToolChanged( TQListViewItem * i )</slot>
<slot>ok()</slot>
-</Q_SLOTS>
+</slots>
<functions>
<function access="private">init()</function>
</functions>
diff --git a/kdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h
index 7dcd6530..ef7c280e 100644
--- a/kdevdesigner/designer/configtoolboxdialog.ui.h
+++ b/kdevdesigner/designer/configtoolboxdialog.ui.h
@@ -40,10 +40,10 @@ void ConfigToolboxDialog::init()
ListViewDnd *commonDnd = new ListViewDnd( listViewCommon );
commonDnd->setDragMode( ListViewDnd::Both | ListViewDnd::Move | ListViewDnd::Flat );
- TQObject::connect( toolsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
- commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
- TQObject::connect( commonDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
- commonDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
+ TQObject::connect( toolsDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ),
+ commonDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) );
+ TQObject::connect( commonDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ),
+ commonDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) );
TQDict<TQListViewItem> groups;
TQAction *a;
@@ -55,7 +55,7 @@ void ConfigToolboxDialog::init()
if ( !parent ) {
parent = new TQListViewItem( listViewTools );
parent->setText( 0, grp );
- parent->setOpen( TRUE );
+ parent->setOpen( true );
groups.insert( grp, parent );
}
TQListViewItem *i = new TQListViewItem( parent );
@@ -76,14 +76,14 @@ void ConfigToolboxDialog::addTool()
{
TQListView *src = listViewTools;
- bool addKids = FALSE;
+ bool addKids = false;
TQListViewItem *nextSibling = 0;
TQListViewItem *nextParent = 0;
TQListViewItemIterator it = src->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
- addKids = FALSE;
+ addKids = false;
if ( (*it)->isSelected() ) {
if ( (*it)->childCount() == 0 ) {
@@ -97,7 +97,7 @@ void ConfigToolboxDialog::addTool()
// Children processing not set, so set it
// Also find the item were we shall quit
// processing children...if any such item
- addKids = TRUE;
+ addKids = true;
nextSibling = (*it)->nextSibling();
nextParent = (*it)->parent();
while ( nextParent && !nextSibling ) {
@@ -168,11 +168,11 @@ void ConfigToolboxDialog::moveToolDown()
void ConfigToolboxDialog::currentToolChanged( TQListViewItem *i )
{
- bool canAdd = FALSE;
+ bool canAdd = false;
TQListViewItemIterator it = listViewTools->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
- canAdd = TRUE;
+ canAdd = true;
break;
}
}
@@ -185,11 +185,11 @@ void ConfigToolboxDialog::currentCommonToolChanged( TQListViewItem *i )
buttonUp->setEnabled( (bool) (i && i->itemAbove()) );
buttonDown->setEnabled( (bool) (i && i->itemBelow()) );
- bool canRemove = FALSE;
+ bool canRemove = false;
TQListViewItemIterator it = listViewCommon->firstChild();
for ( ; *it; it++ ) {
if ( (*it)->isSelected() ) {
- canRemove = TRUE;
+ canRemove = true;
break;
}
}
diff --git a/kdevdesigner/designer/connectiondialog.ui b/kdevdesigner/designer/connectiondialog.ui
index 51995633..d6712a84 100644
--- a/kdevdesigner/designer/connectiondialog.ui
+++ b/kdevdesigner/designer/connectiondialog.ui
@@ -201,7 +201,7 @@
<variable>TQObject *defaultSender;</variable>
<variable>TQObject *defaultReceiver;</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>addConnection()</slot>
<slot returnType="ConnectionContainer *">addConnection( TQObject * sender, TQObject * receiver, const TQString &amp; signal, const TQString &amp; slot )</slot>
@@ -214,6 +214,6 @@
<slot>updateEditSlotsButton()</slot>
<slot>updateConnectionContainers()</slot>
<slot>ensureConnectionVisible()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h
index 25a5d5f2..7163d793 100644
--- a/kdevdesigner/designer/connectiondialog.ui.h
+++ b/kdevdesigner/designer/connectiondialog.ui.h
@@ -69,11 +69,11 @@ static TQPixmap *validConnection = 0;
void ConnectionDialog::init()
{
- connect( connectionsTable, TQT_SIGNAL( currentChanged( int, int ) ),
- this, TQT_SLOT( updateEditSlotsButton() ) );
- connect( connectionsTable, TQT_SIGNAL( resorted() ),
- this, TQT_SLOT( updateConnectionContainers() ) );
- buttonEditSlots->setEnabled( FALSE );
+ connect( connectionsTable, TQ_SIGNAL( currentChanged( int, int ) ),
+ this, TQ_SLOT( updateEditSlotsButton() ) );
+ connect( connectionsTable, TQ_SIGNAL( resorted() ),
+ this, TQ_SLOT( updateConnectionContainers() ) );
+ buttonEditSlots->setEnabled( false );
if ( !invalidConnection ) {
invalidConnection = new TQPixmap( invalid_connection );
@@ -81,12 +81,12 @@ void ConnectionDialog::init()
}
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
+ MetaDataBase::connections( MainWindow::self->formWindow() );
for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) {
ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver,
(*it).signal, (*it).slot );
- c->setModified( FALSE );
+ c->setModified( false );
updateConnectionState( c );
}
@@ -144,13 +144,13 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject
re->setSlot( sl );
sl->setSlot( sl );
- connect( re, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ),
- this, TQT_SLOT( updateEditSlotsButton() ) );
+ connect( re, TQ_SIGNAL( currentReceiverChanged( TQObject * ) ),
+ this, TQ_SLOT( updateEditSlotsButton() ) );
- ConnectionContainer *c = new ConnectionContainer( TQT_TQOBJECT(this), se, si, re, sl, row );
+ ConnectionContainer *c = new ConnectionContainer( this, se, si, re, sl, row );
connections.append( c );
- connect( c, TQT_SIGNAL( changed( ConnectionContainer * ) ),
- this, TQT_SLOT( updateConnectionState( ConnectionContainer * ) ) );
+ connect( c, TQ_SIGNAL( changed( ConnectionContainer * ) ),
+ this, TQ_SLOT( updateConnectionState( ConnectionContainer * ) ) );
connectionsTable->setCurrentCell( row, 0 );
@@ -169,7 +169,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject
sl->setCurrentItem( slot );
}
- c->setModified( TRUE );
+ c->setModified( true );
return c;
}
@@ -188,7 +188,7 @@ void ConnectionDialog::updateConnectionState( ConnectionContainer *c )
void ConnectionDialog::okClicked()
{
TQValueList<MetaDataBase::Connection> oldConnections =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
+ MetaDataBase::connections( MainWindow::self->formWindow() );
TQPtrList<Command> newConnectionCmds;
TQPtrList<Command> oldConnectionCmds;
for ( ConnectionContainer *c = connections.first(); c; c = connections.next() ) {
@@ -215,7 +215,7 @@ void ConnectionDialog::okClicked()
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(MainWindow::self->formWindow()) );
+ MetaDataBase::connections( MainWindow::self->formWindow() );
for ( TQValueList<MetaDataBase::Connection>::Iterator it = conns.begin();
it != conns.end(); ++it ) {
RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Signal/Slot "
@@ -263,7 +263,7 @@ void ConnectionDialog::deleteClicked()
void ConnectionDialog::editSlots()
{
- EditFunctions dlg( this, MainWindow::self->formWindow(), TRUE );
+ EditFunctions dlg( this, MainWindow::self->formWindow(), true );
dlg.exec();
int currentCol = connectionsTable->currentColumn();
connectionsTable->setCurrentCell( connectionsTable->currentRow(), 0 );
diff --git a/kdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp
index 12b03a1d..a835e3e9 100644
--- a/kdevdesigner/designer/connectionitems.cpp
+++ b/kdevdesigner/designer/connectionitems.cpp
@@ -83,9 +83,9 @@ static const char* const ignore_slots[] = {
};
ConnectionItem::ConnectionItem( TQTable *table, FormWindow *fw )
- : TQComboTableItem( table, TQStringList(), FALSE ), formWindow( fw ), conn( 0 )
+ : TQComboTableItem( table, TQStringList(), false ), formWindow( fw ), conn( 0 )
{
- setReplaceable( FALSE );
+ setReplaceable( false );
}
void ConnectionItem::senderChanged( TQObject * )
@@ -122,26 +122,26 @@ void ConnectionItem::slotChanged( const TQString & )
void ConnectionItem::setSender( SenderItem *i )
{
- connect( i, TQT_SIGNAL( currentSenderChanged( TQObject * ) ),
- this, TQT_SLOT( senderChanged( TQObject * ) ) );
+ connect( i, TQ_SIGNAL( currentSenderChanged( TQObject * ) ),
+ this, TQ_SLOT( senderChanged( TQObject * ) ) );
}
void ConnectionItem::setReceiver( ReceiverItem *i )
{
- connect( i, TQT_SIGNAL( currentReceiverChanged( TQObject * ) ),
- this, TQT_SLOT( receiverChanged( TQObject * ) ) );
+ connect( i, TQ_SIGNAL( currentReceiverChanged( TQObject * ) ),
+ this, TQ_SLOT( receiverChanged( TQObject * ) ) );
}
void ConnectionItem::setSignal( SignalItem *i )
{
- connect( i, TQT_SIGNAL( currentSignalChanged( const TQString & ) ),
- this, TQT_SLOT( signalChanged( const TQString & ) ) );
+ connect( i, TQ_SIGNAL( currentSignalChanged( const TQString & ) ),
+ this, TQ_SLOT( signalChanged( const TQString & ) ) );
}
void ConnectionItem::setSlot( SlotItem *i )
{
- connect( i, TQT_SIGNAL( currentSlotChanged( const TQString & ) ),
- this, TQT_SLOT( slotChanged( const TQString & ) ) );
+ connect( i, TQ_SIGNAL( currentSlotChanged( const TQString & ) ),
+ this, TQ_SLOT( slotChanged( const TQString & ) ) );
}
void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg,
@@ -166,7 +166,7 @@ void ConnectionItem::paint( TQPainter *p, const TQColorGroup &cg,
TQFont f( p->font() );
TQFont oldf( p->font() );
if ( conn && conn->isModified() ) {
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
@@ -187,10 +187,10 @@ static void appendChildActions( TQAction *action, TQStringList &lst )
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
lst << o->name();
- if ( !o->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(o) )
+ if ( !o->childrenListObject().isEmpty() && ::tqt_cast<TQActionGroup*>(o) )
appendChildActions( (TQAction*)o, lst );
}
}
@@ -203,7 +203,7 @@ static TQStringList flatActions( const TQPtrList<TQAction> &l )
while ( it.current() ) {
TQAction *action = it.current();
lst << action->name();
- if ( !action->childrenListObject().isEmpty() && ::tqqt_cast<TQActionGroup*>(action) )
+ if ( !action->childrenListObject().isEmpty() && ::tqt_cast<TQActionGroup*>(action) )
appendChildActions( action, lst );
++it;
}
@@ -225,9 +225,9 @@ SenderItem::SenderItem( TQTable *table, FormWindow *fw )
continue;
}
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
- !::tqqt_cast<TQLayoutWidget*>(it.current()) &&
- !::tqqt_cast<Spacer*>(it.current()) &&
- !::tqqt_cast<SizeHandle*>(it.current()) &&
+ !::tqt_cast<TQLayoutWidget*>(it.current()) &&
+ !::tqt_cast<Spacer*>(it.current()) &&
+ !::tqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name();
}
@@ -245,8 +245,8 @@ TQWidget *SenderItem::createEditor() const
{
TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
- this, TQT_SLOT( senderChanged( const TQString & ) ) );
+ connect( cb, TQ_SIGNAL( activated( const TQString & ) ),
+ this, TQ_SLOT( senderChanged( const TQString & ) ) );
return cb;
}
@@ -258,7 +258,7 @@ void SenderItem::setSenderEx( TQObject *sender )
void SenderItem::senderChanged( const TQString &sender )
{
- TQObject *o = formWindow->child( sender, TQOBJECT_OBJECT_NAME_STRING );
+ TQObject *o = formWindow->child( sender, "TQObject" );
if ( !o )
o = formWindow->findAction( sender );
if ( !o )
@@ -282,9 +282,9 @@ ReceiverItem::ReceiverItem( TQTable *table, FormWindow *fw )
continue;
}
if ( !TQString( it.current()->name() ).startsWith( "qt_dead_widget_" ) &&
- !::tqqt_cast<TQLayoutWidget*>(it.current()) &&
- !::tqqt_cast<Spacer*>(it.current()) &&
- !::tqqt_cast<SizeHandle*>(it.current()) &&
+ !::tqt_cast<TQLayoutWidget*>(it.current()) &&
+ !::tqt_cast<Spacer*>(it.current()) &&
+ !::tqt_cast<SizeHandle*>(it.current()) &&
qstrcmp( it.current()->name(), "central widget" ) != 0 ) {
lst << it.current()->name();
}
@@ -302,8 +302,8 @@ TQWidget *ReceiverItem::createEditor() const
{
TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
- this, TQT_SLOT( receiverChanged( const TQString & ) ) );
+ connect( cb, TQ_SIGNAL( activated( const TQString & ) ),
+ this, TQ_SLOT( receiverChanged( const TQString & ) ) );
return cb;
}
@@ -315,7 +315,7 @@ void ReceiverItem::setReceiverEx( TQObject *receiver )
void ReceiverItem::receiverChanged( const TQString &receiver )
{
- TQObject *o = formWindow->child( receiver, TQOBJECT_OBJECT_NAME_STRING );
+ TQObject *o = formWindow->child( receiver, "TQObject" );
if ( !o )
o = formWindow->findAction( receiver );
if ( !o )
@@ -338,7 +338,7 @@ SignalItem::SignalItem( TQTable *table, FormWindow *fw )
void SignalItem::senderChanged( TQObject *sender )
{
- TQStrList sigs = sender->metaObject()->signalNames( TRUE );
+ TQStrList sigs = sender->metaObject()->signalNames( true );
sigs.remove( "destroyed()" );
sigs.remove( "destroyed(TQObject*)" );
sigs.remove( "accessibilityChanged(int)" );
@@ -346,15 +346,15 @@ void SignalItem::senderChanged( TQObject *sender )
TQStringList lst = TQStringList::fromStrList( sigs );
- if ( ::tqqt_cast<CustomWidget*>(sender) ) {
+ if ( ::tqt_cast<CustomWidget*>(sender) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)sender )->customWidget();
for ( TQValueList<TQCString>::Iterator it = w->lstSignals.begin();
it != w->lstSignals.end(); ++it )
lst << MetaDataBase::normalizeFunction( *it );
}
- if ( TQT_BASE_OBJECT(sender) == TQT_BASE_OBJECT(formWindow->mainContainer()) ) {
- TQStringList extra = MetaDataBase::signalList( TQT_TQOBJECT(formWindow) );
+ if ( sender == formWindow->mainContainer() ) {
+ TQStringList extra = MetaDataBase::signalList( formWindow );
if ( !extra.isEmpty() )
lst += extra;
}
@@ -371,8 +371,8 @@ TQWidget *SignalItem::createEditor() const
{
TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
- this, TQT_SIGNAL( currentSignalChanged( const TQString & ) ) );
+ connect( cb, TQ_SIGNAL( activated( const TQString & ) ),
+ this, TQ_SIGNAL( currentSignalChanged( const TQString & ) ) );
return cb;
}
@@ -408,26 +408,26 @@ bool SlotItem::ignoreSlot( const char* slot ) const
{
#ifndef TQT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 &&
- ::tqqt_cast<TQDataBrowser*>(lastReceiver) )
- return FALSE;
+ ::tqt_cast<TQDataBrowser*>(lastReceiver) )
+ return false;
#endif
for ( int i = 0; ignore_slots[i]; i++ ) {
if ( qstrcmp( slot, ignore_slots[i] ) == 0 )
- return TRUE;
+ return true;
}
- if ( !formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) {
+ if ( !formWindow->isMainContainer( lastReceiver ) ) {
if ( qstrcmp( slot, "close()" ) == 0 )
- return TRUE;
+ return true;
}
if ( qstrcmp( slot, "setFocus()" ) == 0 )
if ( lastReceiver->isWidgetType() &&
- ( (TQWidget*)lastReceiver )->focusPolicy() == TQ_NoFocus )
- return TRUE;
+ ( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus )
+ return true;
- return FALSE;
+ return false;
}
void SlotItem::updateSlotList()
@@ -441,27 +441,27 @@ void SlotItem::updateSlotList()
}
TQString signal = MetaDataBase::normalizeFunction( lastSignal );
- int n = lastReceiver->metaObject()->numSlots( TRUE );
+ int n = lastReceiver->metaObject()->numSlots( true );
TQStringList slts;
for( int i = 0; i < n; ++i ) {
// accept only public slots. For the form window, also accept protected slots
- const TQMetaData* md = lastReceiver->metaObject()->slot( i, TRUE );
- if ( ( (lastReceiver->metaObject()->slot( i, TRUE )->tqt_mo_access == TQMetaData::Public) ||
- (formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) &&
- lastReceiver->metaObject()->slot(i, TRUE)->tqt_mo_access ==
+ const TQMetaData* md = lastReceiver->metaObject()->slot( i, true );
+ if ( ( (lastReceiver->metaObject()->slot( i, true )->access == TQMetaData::Public) ||
+ (formWindow->isMainContainer( lastReceiver ) &&
+ lastReceiver->metaObject()->slot(i, true)->access ==
TQMetaData::Protected) ) &&
- !ignoreSlot( md->tqt_mo_ci_name ) &&
- checkConnectArgs( signal.latin1(), lastReceiver, md->tqt_mo_ci_name ) )
- if ( lst.find( md->tqt_mo_ci_name ) == lst.end() )
- lst << MetaDataBase::normalizeFunction( md->tqt_mo_ci_name );
+ !ignoreSlot( md->name ) &&
+ checkConnectArgs( signal.latin1(), lastReceiver, md->name ) )
+ if ( lst.find( md->name ) == lst.end() )
+ lst << MetaDataBase::normalizeFunction( md->name );
}
LanguageInterface *iface =
MetaDataBase::languageInterface( formWindow->project()->language() );
if ( !iface || iface->supports( LanguageInterface::ConnectionsToCustomSlots ) ) {
- if ( formWindow->isMainContainer( TQT_TQOBJECT(lastReceiver) ) ) {
- TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( TQT_TQOBJECT(formWindow) );
+ if ( formWindow->isMainContainer( lastReceiver ) ) {
+ TQValueList<MetaDataBase::Function> moreSlots = MetaDataBase::slotList( formWindow );
if ( !moreSlots.isEmpty() ) {
for ( TQValueList<MetaDataBase::Function>::Iterator it = moreSlots.begin();
it != moreSlots.end(); ++it ) {
@@ -478,7 +478,7 @@ void SlotItem::updateSlotList()
}
}
- if ( ::tqqt_cast<CustomWidget*>(lastReceiver) ) {
+ if ( ::tqt_cast<CustomWidget*>(lastReceiver) ) {
MetaDataBase::CustomWidget *w = ( (CustomWidget*)lastReceiver )->customWidget();
for ( TQValueList<MetaDataBase::Function>::Iterator it = w->lstSlots.begin();
it != w->lstSlots.end(); ++it ) {
@@ -502,8 +502,8 @@ TQWidget *SlotItem::createEditor() const
{
TQComboBox *cb = (TQComboBox*)ConnectionItem::createEditor();
cb->listBox()->setMinimumWidth( cb->fontMetrics().width( "01234567890123456789012345678901234567890123456789" ) );
- connect( cb, TQT_SIGNAL( activated( const TQString & ) ),
- this, TQT_SIGNAL( currentSlotChanged( const TQString & ) ) );
+ connect( cb, TQ_SIGNAL( activated( const TQString & ) ),
+ this, TQ_SIGNAL( currentSlotChanged( const TQString & ) ) );
return cb;
}
diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h
index fe5e276d..ef1a060d 100644
--- a/kdevdesigner/designer/connectionitems.h
+++ b/kdevdesigner/designer/connectionitems.h
@@ -41,7 +41,7 @@ class ConnectionContainer;
class ConnectionItem : public TQObject,
public TQComboTableItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -77,7 +77,7 @@ private:
class SenderItem : public ConnectionItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -97,7 +97,7 @@ private slots:
class ReceiverItem : public ConnectionItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -117,7 +117,7 @@ private slots:
class SignalItem : public ConnectionItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -135,7 +135,7 @@ signals:
class SlotItem : public ConnectionItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -164,22 +164,22 @@ private:
class ConnectionContainer : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
ConnectionContainer( TQObject *parent, SenderItem *i1, SignalItem *i2,
ReceiverItem *i3, SlotItem *i4, int r )
- : TQObject( parent ), mod( FALSE ), se( i1 ), si( i2 ),
+ : TQObject( parent ), mod( false ), se( i1 ), si( i2 ),
re( i3 ), sl( i4 ), rw ( r ) {
i1->setConnection( this );
i2->setConnection( this );
i3->setConnection( this );
i4->setConnection( this );
- connect( i1, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
- connect( i2, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
- connect( i3, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
- connect( i4, TQT_SIGNAL( changed() ), this, TQT_SLOT( somethingChanged() ) );
+ connect( i1, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) );
+ connect( i2, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) );
+ connect( i3, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) );
+ connect( i4, TQ_SIGNAL( changed() ), this, TQ_SLOT( somethingChanged() ) );
}
bool isModified() const { return mod; }
@@ -207,7 +207,7 @@ public:
SlotItem *slotItem() const { return sl; }
public slots:
- void somethingChanged() { mod = TRUE; emit changed( this ); }
+ void somethingChanged() { mod = true; emit changed( this ); }
signals:
void changed( ConnectionContainer *c );
diff --git a/kdevdesigner/designer/connectiontable.cpp b/kdevdesigner/designer/connectiontable.cpp
index 834fdc96..2e433dc8 100644
--- a/kdevdesigner/designer/connectiontable.cpp
+++ b/kdevdesigner/designer/connectiontable.cpp
@@ -31,26 +31,26 @@
ConnectionTable::ConnectionTable( TQWidget *parent, const char *name )
: TQTable( 0, 4, parent, name )
{
- setSorting( TRUE );
- setShowGrid( FALSE );
+ setSorting( true );
+ setShowGrid( false );
setFocusStyle( FollowStyle );
setSelectionMode( SingleRow );
horizontalHeader()->setLabel( 0, i18n( "Sender" ) );
horizontalHeader()->setLabel( 1, i18n( "Signal" ) );
horizontalHeader()->setLabel( 2, i18n( "Receiver" ) );
horizontalHeader()->setLabel( 3, i18n( "Slot" ) );
- setColumnStretchable( 0, TRUE );
- setColumnStretchable( 1, TRUE );
- setColumnStretchable( 2, TRUE );
- setColumnStretchable( 3, TRUE );
+ setColumnStretchable( 0, true );
+ setColumnStretchable( 1, true );
+ setColumnStretchable( 2, true );
+ setColumnStretchable( 3, true );
}
void ConnectionTable::sortColumn( int col, bool ascending, bool )
{
horizontalHeader()->setSortIndicator( col, ascending );
if ( isEditing() )
- endEdit( currEditRow(), currEditCol(), FALSE, FALSE );
- TQTable::sortColumn( col, ascending, TRUE );
+ endEdit( currEditRow(), currEditCol(), false, false );
+ TQTable::sortColumn( col, ascending, true );
setCurrentCell( 0, 0 );
emit resorted();
}
diff --git a/kdevdesigner/designer/connectiontable.h b/kdevdesigner/designer/connectiontable.h
index 60b84426..ba19d589 100644
--- a/kdevdesigner/designer/connectiontable.h
+++ b/kdevdesigner/designer/connectiontable.h
@@ -31,7 +31,7 @@
class ConnectionTable : public TQTable
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/customwidgeteditor.ui b/kdevdesigner/designer/customwidgeteditor.ui
index 99f98961..d1cfc071 100644
--- a/kdevdesigner/designer/customwidgeteditor.ui
+++ b/kdevdesigner/designer/customwidgeteditor.ui
@@ -573,7 +573,7 @@
<cstring>listSignals</cstring>
</property>
<property name="whatsThis" stdset="0">
- <string>The list of all the Q_SIGNALS that the selected widget can emit.</string>
+ <string>The list of all the signals that the selected widget can emit.</string>
</property>
</widget>
<widget class="TQLayoutWidget">
@@ -787,7 +787,7 @@
<string>Change slot access</string>
</property>
<property name="whatsThis" stdset="0">
- <string>&lt;b&gt;Change the slot's access policy.&lt;/b&gt;&lt;p&gt;You can only connect to the widget's public Q_SLOTS.&lt;/p&gt;</string>
+ <string>&lt;b&gt;Change the slot's access policy.&lt;/b&gt;&lt;p&gt;You can only connect to the widget's public slots.&lt;/p&gt;</string>
</property>
</widget>
<widget class="TQLayoutWidget" row="1" column="0" rowspan="1" colspan="4">
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
index f417f6f2..333582b5 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.cpp
+++ b/kdevdesigner/designer/customwidgeteditorimpl.cpp
@@ -56,29 +56,29 @@
#include <tdelocale.h>
CustomWidgetEditor::CustomWidgetEditor( TQWidget *parent, MainWindow *mw )
- : CustomWidgetEditorBase( parent, 0, TRUE ), mainWindow( mw )
+ : CustomWidgetEditorBase( parent, 0, true ), mainWindow( mw )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
checkTimer = new TQTimer( this );
- connect( checkTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( checkWidgetName() ) );
-
- editClass->setEnabled( FALSE );
- editHeader->setEnabled( FALSE );
- buttonChooseHeader->setEnabled( FALSE );
- buttonChoosePixmap->setEnabled( FALSE );
- spinWidth->setEnabled( FALSE );
- spinHeight->setEnabled( FALSE );
- sizeHor->setEnabled( FALSE );
- sizeVer->setEnabled( FALSE );
- checkContainer->setEnabled( FALSE );
- localGlobalCombo->setEnabled( FALSE );
- editClass->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(editClass) ) );
- editSignal->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) );
- editSlot->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(editSignal) ) );
- editProperty->setValidator( new AsciiValidator( TQT_TQOBJECT(editSignal) ) );
- editSignal->setEnabled( FALSE );
- buttonRemoveSignal->setEnabled( FALSE );
+ connect( checkTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( checkWidgetName() ) );
+
+ editClass->setEnabled( false );
+ editHeader->setEnabled( false );
+ buttonChooseHeader->setEnabled( false );
+ buttonChoosePixmap->setEnabled( false );
+ spinWidth->setEnabled( false );
+ spinHeight->setEnabled( false );
+ sizeHor->setEnabled( false );
+ sizeVer->setEnabled( false );
+ checkContainer->setEnabled( false );
+ localGlobalCombo->setEnabled( false );
+ editClass->setValidator( new AsciiValidator( TQString(":"), editClass ) );
+ editSignal->setValidator( new AsciiValidator( true, editSignal ) );
+ editSlot->setValidator( new AsciiValidator( true, editSignal ) );
+ editProperty->setValidator( new AsciiValidator( editSignal ) );
+ editSignal->setEnabled( false );
+ buttonRemoveSignal->setEnabled( false );
setupDefinition();
setupSignals();
@@ -100,15 +100,15 @@ void CustomWidgetEditor::setupDefinition()
if ( boxWidgets->firstItem() ) {
boxWidgets->setCurrentItem( boxWidgets->firstItem() );
- boxWidgets->setSelected( boxWidgets->firstItem(), TRUE );
+ boxWidgets->setSelected( boxWidgets->firstItem(), true );
}
oldItem = 0;
}
void CustomWidgetEditor::setupSignals()
{
- editSignal->setEnabled( FALSE );
- buttonRemoveSignal->setEnabled( FALSE );
+ editSignal->setEnabled( false );
+ buttonRemoveSignal->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
return;
@@ -117,15 +117,15 @@ void CustomWidgetEditor::setupSignals()
listSignals->insertItem( TQString( *it ) );
if ( listSignals->firstItem() ) {
listSignals->setCurrentItem( listSignals->firstItem() );
- listSignals->setSelected( listSignals->firstItem(), TRUE );
+ listSignals->setSelected( listSignals->firstItem(), true );
}
}
void CustomWidgetEditor::setupSlots()
{
- editSlot->setEnabled( FALSE );
- comboAccess->setEnabled( FALSE );
- buttonRemoveSlot->setEnabled( FALSE );
+ editSlot->setEnabled( false );
+ comboAccess->setEnabled( false );
+ buttonRemoveSlot->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
@@ -136,15 +136,15 @@ void CustomWidgetEditor::setupSlots()
if ( listSlots->firstChild() ) {
listSlots->setCurrentItem( listSlots->firstChild() );
- listSlots->setSelected( listSlots->firstChild(), TRUE );
+ listSlots->setSelected( listSlots->firstChild(), true );
}
}
void CustomWidgetEditor::setupProperties()
{
- editProperty->setEnabled( FALSE );
- comboType->setEnabled( FALSE );
- buttonRemoveProperty->setEnabled( FALSE );
+ editProperty->setEnabled( false );
+ comboType->setEnabled( false );
+ buttonRemoveProperty->setEnabled( false );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( !w )
@@ -155,7 +155,7 @@ void CustomWidgetEditor::setupProperties()
if ( listProperties->firstChild() ) {
listProperties->setCurrentItem( listProperties->firstChild() );
- listProperties->setSelected( listProperties->firstChild(), TRUE );
+ listProperties->setSelected( listProperties->firstChild(), true );
}
}
@@ -166,33 +166,33 @@ void CustomWidgetEditor::currentWidgetChanged( TQListBoxItem *i )
MetaDataBase::CustomWidget *w = findWidget( i );
if ( !i || !w ) {
- buttonChooseHeader->setEnabled( FALSE );
- editClass->setEnabled( FALSE );
- editHeader->setEnabled( FALSE );
- buttonChoosePixmap->setEnabled( FALSE );
- spinWidth->setEnabled( FALSE );
- spinHeight->setEnabled( FALSE );
- localGlobalCombo->setEnabled( FALSE );
- sizeHor->setEnabled( FALSE );
- sizeVer->setEnabled( FALSE );
- checkContainer->setEnabled( FALSE );
+ buttonChooseHeader->setEnabled( false );
+ editClass->setEnabled( false );
+ editHeader->setEnabled( false );
+ buttonChoosePixmap->setEnabled( false );
+ spinWidth->setEnabled( false );
+ spinHeight->setEnabled( false );
+ localGlobalCombo->setEnabled( false );
+ sizeHor->setEnabled( false );
+ sizeVer->setEnabled( false );
+ checkContainer->setEnabled( false );
return;
}
- buttonChooseHeader->setEnabled( TRUE );
- editClass->setEnabled( TRUE );
- editHeader->setEnabled( TRUE );
- buttonChoosePixmap->setEnabled( TRUE );
- spinWidth->setEnabled( TRUE );
- spinHeight->setEnabled( TRUE );
- localGlobalCombo->setEnabled( TRUE );
- sizeHor->setEnabled( TRUE );
- sizeVer->setEnabled( TRUE );
- checkContainer->setEnabled( TRUE );
-
- editClass->blockSignals( TRUE );
+ buttonChooseHeader->setEnabled( true );
+ editClass->setEnabled( true );
+ editHeader->setEnabled( true );
+ buttonChoosePixmap->setEnabled( true );
+ spinWidth->setEnabled( true );
+ spinHeight->setEnabled( true );
+ localGlobalCombo->setEnabled( true );
+ sizeHor->setEnabled( true );
+ sizeVer->setEnabled( true );
+ checkContainer->setEnabled( true );
+
+ editClass->blockSignals( true );
editClass->setText( w->className );
- editClass->blockSignals( FALSE );
+ editClass->blockSignals( false );
editHeader->setText( w->includeFile );
localGlobalCombo->setCurrentItem( (int)w->includePolicy );
if ( w->pixmap )
@@ -230,7 +230,7 @@ void CustomWidgetEditor::addWidgetClicked()
customWidgets.insert( i, w );
boxWidgets->setCurrentItem( i );
- boxWidgets->setSelected( i, TRUE );
+ boxWidgets->setSelected( i, true );
}
void CustomWidgetEditor::classNameChanged( const TQString &s )
@@ -243,7 +243,7 @@ void CustomWidgetEditor::classNameChanged( const TQString &s )
WidgetDatabase::customWidgetClassNameChanged( w->className, s );
checkTimer->stop();
- boxWidgets->blockSignals( TRUE );
+ boxWidgets->blockSignals( true );
oldName = w->className;
w->className = s;
TQListBoxItem *old = i;
@@ -255,8 +255,8 @@ void CustomWidgetEditor::classNameChanged( const TQString &s )
oldItem = i;
customWidgets.insert( i, w );
customWidgets.remove( old );
- boxWidgets->blockSignals( FALSE );
- checkTimer->start( 1000, TRUE );
+ boxWidgets->blockSignals( false );
+ checkTimer->start( 1000, true );
}
void CustomWidgetEditor::deleteWidgetClicked()
@@ -289,7 +289,7 @@ void CustomWidgetEditor::deleteWidgetClicked()
i = boxWidgets->item( boxWidgets->currentItem() );
if ( i ) {
boxWidgets->setCurrentItem( i );
- boxWidgets->setSelected( i, TRUE );
+ boxWidgets->setSelected( i, true );
}
}
@@ -337,13 +337,13 @@ void CustomWidgetEditor::pixmapChoosen()
delete w->pixmap;
w->pixmap = new TQPixmap( pix );
- boxWidgets->blockSignals( TRUE );
+ boxWidgets->blockSignals( true );
TQListBoxItem *old = i;
boxWidgets->changeItem( *w->pixmap, w->className, boxWidgets->currentItem() );
i = boxWidgets->item( boxWidgets->currentItem() );
customWidgets.insert( i, w );
customWidgets.remove( old );
- boxWidgets->blockSignals( FALSE );
+ boxWidgets->blockSignals( false );
previewPixmap->setPixmap( *w->pixmap );
}
@@ -417,28 +417,28 @@ void CustomWidgetEditor::closeClicked()
void CustomWidgetEditor::currentSignalChanged( TQListBoxItem *i )
{
- editSignal->blockSignals( TRUE );
+ editSignal->blockSignals( true );
editSignal->setText( "" );
- editSignal->blockSignals( FALSE );
+ editSignal->blockSignals( false );
if ( !i ) {
- editSignal->setEnabled( FALSE );
- buttonRemoveSignal->setEnabled( FALSE );
+ editSignal->setEnabled( false );
+ buttonRemoveSignal->setEnabled( false );
return;
}
- editSignal->blockSignals( TRUE );
- editSignal->setEnabled( TRUE );
- buttonRemoveSignal->setEnabled( TRUE );
+ editSignal->blockSignals( true );
+ editSignal->setEnabled( true );
+ buttonRemoveSignal->setEnabled( true );
editSignal->setText( i->text() );
- editSignal->blockSignals( FALSE );
+ editSignal->blockSignals( false );
}
void CustomWidgetEditor::addSignal()
{
TQListBoxItem *i = new TQListBoxText( listSignals, "signal()" );
listSignals->setCurrentItem( i );
- listSignals->setSelected( i, TRUE );
+ listSignals->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w )
w->lstSignals.append( i->text().latin1() );
@@ -449,7 +449,7 @@ void CustomWidgetEditor::removeSignal()
TQString s = listSignals->currentText();
delete listSignals->item( listSignals->currentItem() );
if ( listSignals->currentItem() != -1 )
- listSignals->setSelected( listSignals->currentItem(), TRUE );
+ listSignals->setSelected( listSignals->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w )
w->lstSignals.remove( s.latin1() );
@@ -464,9 +464,9 @@ void CustomWidgetEditor::signalNameChanged( const TQString &s )
TQValueList<TQCString>::Iterator it = w->lstSignals.find( listSignals->currentText().latin1() );
if ( it != w->lstSignals.end() )
w->lstSignals.remove( it );
- listSignals->blockSignals( TRUE );
+ listSignals->blockSignals( true );
listSignals->changeItem( s, listSignals->currentItem() );
- listSignals->blockSignals( FALSE );
+ listSignals->blockSignals( false );
w->lstSignals.append( s.latin1() );
}
@@ -511,7 +511,7 @@ void CustomWidgetEditor::addSlot()
{
TQListViewItem *i = new TQListViewItem( listSlots, "slot()", "public" );
listSlots->setCurrentItem( i );
- listSlots->setSelected( i, TRUE );
+ listSlots->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w ) {
MetaDataBase::Function slot;
@@ -532,7 +532,7 @@ void CustomWidgetEditor::removeSlot()
}
delete listSlots->currentItem();
if ( listSlots->currentItem() )
- listSlots->setSelected( listSlots->currentItem(), TRUE );
+ listSlots->setSelected( listSlots->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w && slot.function != "1 2 3" )
w->lstSlots.remove( slot );
@@ -540,29 +540,29 @@ void CustomWidgetEditor::removeSlot()
void CustomWidgetEditor::currentSlotChanged( TQListViewItem *i )
{
- editSlot->blockSignals( TRUE );
+ editSlot->blockSignals( true );
editSlot->setText( "" );
- editSignal->blockSignals( FALSE );
+ editSignal->blockSignals( false );
if ( !i ) {
- editSlot->setEnabled( FALSE );
- comboAccess->setEnabled( FALSE );
- buttonRemoveSlot->setEnabled( FALSE );
+ editSlot->setEnabled( false );
+ comboAccess->setEnabled( false );
+ buttonRemoveSlot->setEnabled( false );
return;
}
- editSlot->setEnabled( TRUE );
- comboAccess->setEnabled( TRUE );
- buttonRemoveSlot->setEnabled( TRUE );
- editSlot->blockSignals( TRUE );
- comboAccess->blockSignals( TRUE );
+ editSlot->setEnabled( true );
+ comboAccess->setEnabled( true );
+ buttonRemoveSlot->setEnabled( true );
+ editSlot->blockSignals( true );
+ comboAccess->blockSignals( true );
editSlot->setText( i->text( 0 ) );
if ( i->text( 1 ) == i18n( "protected" ) )
comboAccess->setCurrentItem( 1 );
else
comboAccess->setCurrentItem( 0 );
- editSlot->blockSignals( FALSE );
- comboAccess->blockSignals( FALSE );
+ editSlot->blockSignals( false );
+ comboAccess->blockSignals( false );
}
void CustomWidgetEditor::propertyTypeChanged( const TQString &s )
@@ -605,7 +605,7 @@ void CustomWidgetEditor::addProperty()
{
TQListViewItem *i = new TQListViewItem( listProperties, "property", "String" );
listProperties->setCurrentItem( i );
- listProperties->setSelected( i, TRUE );
+ listProperties->setSelected( i, true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w ) {
MetaDataBase::Property prop;
@@ -625,7 +625,7 @@ void CustomWidgetEditor::removeProperty()
}
delete listProperties->currentItem();
if ( listProperties->currentItem() )
- listProperties->setSelected( listProperties->currentItem(), TRUE );
+ listProperties->setSelected( listProperties->currentItem(), true );
MetaDataBase::CustomWidget *w = findWidget( boxWidgets->item( boxWidgets->currentItem() ) );
if ( w && property.property != "1 2 3" )
w->lstProperties.remove( property );
@@ -633,22 +633,22 @@ void CustomWidgetEditor::removeProperty()
void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
{
- editProperty->blockSignals( TRUE );
+ editProperty->blockSignals( true );
editProperty->setText( "" );
- editSignal->blockSignals( FALSE );
+ editSignal->blockSignals( false );
if ( !i ) {
- editProperty->setEnabled( FALSE );
- comboType->setEnabled( FALSE );
- buttonRemoveProperty->setEnabled( FALSE );
+ editProperty->setEnabled( false );
+ comboType->setEnabled( false );
+ buttonRemoveProperty->setEnabled( false );
return;
}
- editProperty->setEnabled( TRUE );
- comboType->setEnabled( TRUE );
- buttonRemoveProperty->setEnabled( TRUE );
- editProperty->blockSignals( TRUE );
- comboType->blockSignals( TRUE );
+ editProperty->setEnabled( true );
+ comboType->setEnabled( true );
+ buttonRemoveProperty->setEnabled( true );
+ editProperty->blockSignals( true );
+ comboType->blockSignals( true );
editProperty->setText( i->text( 0 ) );
for ( int j = 0; j < comboType->count(); ++j ) {
@@ -657,8 +657,8 @@ void CustomWidgetEditor::currentPropertyChanged( TQListViewItem *i )
break;
}
}
- editProperty->blockSignals( FALSE );
- comboType->blockSignals( FALSE );
+ editProperty->blockSignals( false );
+ comboType->blockSignals( false );
}
static TQString makeIndent2( int indent )
diff --git a/kdevdesigner/designer/customwidgeteditorimpl.h b/kdevdesigner/designer/customwidgeteditorimpl.h
index 9e53b2ce..c49f4960 100644
--- a/kdevdesigner/designer/customwidgeteditorimpl.h
+++ b/kdevdesigner/designer/customwidgeteditorimpl.h
@@ -39,7 +39,7 @@ class MainWindow;
class CustomWidgetEditor : public CustomWidgetEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp
index b5baea28..f8065d5c 100644
--- a/kdevdesigner/designer/database.cpp
+++ b/kdevdesigner/designer/database.cpp
@@ -62,7 +62,7 @@ void DatabaseSupport::initPreview( const TQString &connection, const TQString &t
con = TQSqlDatabase::database();
frm = new TQSqlForm( o, table );
for ( TQMap<TQString, TQString>::Iterator it = dbControls.begin(); it != dbControls.end(); ++it ) {
- TQObject *chld = parent->child( it.key(), TQWIDGET_OBJECT_NAME_STRING );
+ TQObject *chld = parent->child( it.key(), "TQWidget" );
if ( !chld )
continue;
frm->insert( (TQWidget*)chld, *it );
@@ -82,13 +82,13 @@ bool QDesignerDataBrowser::event( TQEvent* e )
#endif
if ( e->type() == TQEvent::Show ) {
if ( con ) {
- TQSqlCursor* cursor = new TQSqlCursor( tbl, TRUE, con );
- setSqlCursor( cursor, TRUE );
+ TQSqlCursor* cursor = new TQSqlCursor( tbl, true, con );
+ setSqlCursor( cursor, true );
setForm( frm );
refresh();
first();
}
- return TRUE;
+ return true;
}
#if defined(DESIGNER)
}
@@ -110,7 +110,7 @@ bool QDesignerDataView::event( TQEvent* e )
if ( e->type() == TQEvent::Show ) {
setForm( frm );
readFields();
- return TRUE;
+ return true;
}
#if defined(DESIGNER)
}
diff --git a/kdevdesigner/designer/database.h b/kdevdesigner/designer/database.h
index cbde491f..cf5ae055 100644
--- a/kdevdesigner/designer/database.h
+++ b/kdevdesigner/designer/database.h
@@ -58,7 +58,7 @@ protected:
class QDesignerDataBrowser : public TQDataBrowser, public DatabaseSupport
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -70,7 +70,7 @@ protected:
class QDesignerDataView : public TQDataView, public DatabaseSupport
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/dbconnection.ui b/kdevdesigner/designer/dbconnection.ui
index 1510629b..c21e0ce8 100644
--- a/kdevdesigner/designer/dbconnection.ui
+++ b/kdevdesigner/designer/dbconnection.ui
@@ -214,10 +214,10 @@
<tabstop>editHostname</tabstop>
<tabstop>editPort</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
diff --git a/kdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp
index 3cfd1fdc..d9d48556 100644
--- a/kdevdesigner/designer/dbconnectionimpl.cpp
+++ b/kdevdesigner/designer/dbconnectionimpl.cpp
@@ -60,20 +60,20 @@ void DatabaseConnectionEditor::accept()
void DatabaseConnectionEditor::init()
{
- connectionWidget->editName->setEnabled( FALSE );
- connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) );
+ connectionWidget->editName->setEnabled( false );
+ connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
connectionWidget->editName->setText( conn->name() );
- connectionWidget->comboDriver->setEnabled( FALSE );
+ connectionWidget->comboDriver->setEnabled( false );
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );
- connectionWidget->editDatabase->setEnabled( FALSE );
+ connectionWidget->editDatabase->setEnabled( false );
connectionWidget->editDatabase->setText( conn->database() );
- connectionWidget->editUsername->setEnabled( TRUE );
+ connectionWidget->editUsername->setEnabled( true );
connectionWidget->editUsername->setText( conn->username() );
- connectionWidget->editPassword->setEnabled( TRUE );
+ connectionWidget->editPassword->setEnabled( true );
connectionWidget->editPassword->setText( "" );
- connectionWidget->editHostname->setEnabled( TRUE );
+ connectionWidget->editHostname->setEnabled( true );
connectionWidget->editHostname->setText( conn->hostname() );
- connectionWidget->editPort->setEnabled( TRUE );
+ connectionWidget->editPort->setEnabled( true );
connectionWidget->editPort->setValue( conn->port() );
connectionWidget->editUsername->setFocus();
connectionWidget->editUsername->selectAll();
diff --git a/kdevdesigner/designer/dbconnectionimpl.h b/kdevdesigner/designer/dbconnectionimpl.h
index e2db2286..27578bc6 100644
--- a/kdevdesigner/designer/dbconnectionimpl.h
+++ b/kdevdesigner/designer/dbconnectionimpl.h
@@ -35,12 +35,12 @@ class TQGridLayout;
class DatabaseConnectionEditor : public DatabaseConnectionEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
DatabaseConnectionEditor( DatabaseConnection* connection, TQWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ const char* name = 0, bool modal = false, WFlags fl = 0 );
~DatabaseConnectionEditor();
public slots:
diff --git a/kdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp
index e589679b..bd9a594c 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.cpp
+++ b/kdevdesigner/designer/dbconnectionsimpl.cpp
@@ -42,19 +42,19 @@
#include <tdelocale.h>
-static bool blockChanges = FALSE;
+static bool blockChanges = false;
/*
* Constructs a DatabaseConnectionsEditor which is a child of 'parent', with the
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
+ * true to construct a modal dialog.
*/
DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: DatabaseConnectionBase( parent, name, modal, fl ), project( pro )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
connectionWidget = new DatabaseConnectionWidget( grp );
grpLayout->addWidget( connectionWidget, 0, 0 );
#ifndef TQT_NO_SQL
@@ -63,8 +63,8 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa
listConnections->insertItem( conn->name() );
connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() );
#endif
- connectionWidget->editName->setValidator( new AsciiValidator( TQT_TQOBJECT(connectionWidget->editName) ) );
- enableAll( FALSE );
+ connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
+ enableAll( false );
}
DatabaseConnectionsEditor::~DatabaseConnectionsEditor()
@@ -81,15 +81,15 @@ void DatabaseConnectionsEditor::deleteConnection()
listConnections->setCurrentItem( 0 );
currentConnectionChanged( listConnections->currentText() );
} else {
- enableAll( FALSE );
+ enableAll( false );
}
project->saveConnections();
}
void DatabaseConnectionsEditor::newConnection()
{
- blockChanges = TRUE;
- enableAll( TRUE );
+ blockChanges = true;
+ enableAll( true );
TQString n( "(default)" );
if ( project->databaseConnection( n ) ) {
n = "connection";
@@ -100,9 +100,9 @@ void DatabaseConnectionsEditor::newConnection()
}
connectionWidget->editName->setText( n );
listConnections->clearSelection();
- buttonConnect->setDefault( TRUE );
+ buttonConnect->setDefault( true );
connectionWidget->editName->setFocus();
- blockChanges = FALSE;
+ blockChanges = false;
}
void DatabaseConnectionsEditor::doConnect()
@@ -151,15 +151,15 @@ void DatabaseConnectionsEditor::currentConnectionChanged( const TQString &s )
{
#ifndef TQT_NO_SQL
DatabaseConnection *conn = project->databaseConnection( s );
- blockChanges = TRUE;
+ blockChanges = true;
enableAll( conn != 0 );
- connectionWidget->editName->setEnabled( FALSE );
- blockChanges = FALSE;
+ connectionWidget->editName->setEnabled( false );
+ blockChanges = false;
if ( !conn )
return;
- blockChanges = TRUE;
+ blockChanges = true;
connectionWidget->editName->setText( conn->name() );
- blockChanges = FALSE;
+ blockChanges = false;
connectionWidget->comboDriver->lineEdit()->setText( conn->driver() );
connectionWidget->editDatabase->setText( conn->database() );
connectionWidget->editUsername->setText( conn->username() );
diff --git a/kdevdesigner/designer/dbconnectionsimpl.h b/kdevdesigner/designer/dbconnectionsimpl.h
index e06cc06a..66f43b29 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.h
+++ b/kdevdesigner/designer/dbconnectionsimpl.h
@@ -34,12 +34,12 @@ class Project;
class DatabaseConnectionsEditor : public DatabaseConnectionBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
DatabaseConnectionsEditor( Project *pro, TQWidget* parent = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ const char* name = 0, bool modal = false, WFlags fl = 0 );
~DatabaseConnectionsEditor();
protected slots:
diff --git a/kdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h
index 85efef6b..eade6982 100644
--- a/kdevdesigner/designer/designeraction.h
+++ b/kdevdesigner/designer/designeraction.h
@@ -24,7 +24,7 @@
class DesignerAction : public TQAction
{
-Q_OBJECT
+TQ_OBJECT
public:
DesignerAction(TQObject *parent = 0, const char *name = 0)
@@ -33,9 +33,9 @@ public:
:TQAction(menuText, accel, parent, name) {}
DesignerAction ( const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0 )
:TQAction(icon, menuText, accel, parent, name) {}
- DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
+ DesignerAction ( const TQString & text, const TQIconSet & icon, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = false )
:TQAction(text, icon, menuText, accel, parent, name, toggle) {}
- DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = FALSE )
+ DesignerAction ( const TQString & text, const TQString & menuText, TQKeySequence accel, TQObject * parent, const char * name = 0, bool toggle = false )
:TQAction(text, menuText, accel, parent, name, toggle) {}
DesignerAction ( TQObject * parent, const char * name, bool toggle )
:TQAction(parent, name, toggle) {}
diff --git a/kdevdesigner/designer/designerapp.cpp b/kdevdesigner/designer/designerapp.cpp
index 22d1e531..8a96049a 100644
--- a/kdevdesigner/designer/designerapp.cpp
+++ b/kdevdesigner/designer/designerapp.cpp
@@ -72,7 +72,7 @@ TQSplashScreen *DesignerApplication::showSplash()
TQRect mainRect;
TQString keybase = settingsKey();
- bool show = config.readBoolEntry( keybase + "SplashScreen", TRUE );
+ bool show = config.readBoolEntry( keybase + "SplashScreen", true );
mainRect.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", 0 ) );
mainRect.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", 0 ) );
mainRect.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", 500 ) );
@@ -151,7 +151,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
TQObjectList* l = MainWindow::self->queryList( "FormWindow" );
FormWindow* fw = (FormWindow*) l->first();
FormWindow* totop = 0;
- bool haveit = FALSE;
+ bool haveit = false;
while ( fw ) {
haveit = haveit || fw->fileName() == arg;
if ( haveit )
@@ -161,7 +161,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
}
if ( !haveit ) {
- FlashWindow( MainWindow::self->winId(), TRUE );
+ FlashWindow( MainWindow::self->winId(), true );
MainWindow::self->openFormWindow( arg );
} else if ( totop ) {
totop->setFocus();
@@ -169,7 +169,7 @@ bool DesignerApplication::winEventFilter( MSG *msg )
delete l;
}
}
- return TRUE;
+ return true;
}
return TQApplication::winEventFilter( msg );
}
diff --git a/kdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp
index 57ee992e..9cb8957f 100644
--- a/kdevdesigner/designer/designerappiface.cpp
+++ b/kdevdesigner/designer/designerappiface.cpp
@@ -55,9 +55,9 @@ TQRESULT DesignerInterfaceImpl::queryInterface( const TQUuid &uuid, TQUnknownInt
{
*iface = 0;
- if ( uuid == IID_TQUnknown )
+ if ( uuid == IID_QUnknown )
*iface = (TQUnknownInterface*)this;
- else if ( uuid == IID_TQComponentInformation )
+ else if ( uuid == IID_QComponentInformation )
*iface = (TQComponentInformationInterface*)this;
else if ( uuid == IID_Designer )
*iface = (DesignerInterface*)this;
@@ -129,13 +129,13 @@ void DesignerInterfaceImpl::updateFunctionList()
void DesignerInterfaceImpl::onProjectChange( TQObject *receiver, const char *slot )
{
- TQObject::connect( mainWindow, TQT_SIGNAL( projectChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQ_SIGNAL( projectChanged() ), receiver, slot );
}
void DesignerInterfaceImpl::onFormChange( TQObject *receiver, const char *slot )
{
- TQObject::connect( mainWindow, TQT_SIGNAL( formWindowChanged() ), receiver, slot );
- TQObject::connect( mainWindow, TQT_SIGNAL( editorChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQ_SIGNAL( formWindowChanged() ), receiver, slot );
+ TQObject::connect( mainWindow, TQ_SIGNAL( editorChanged() ), receiver, slot );
}
bool DesignerInterfaceImpl::singleProjectMode() const
@@ -146,7 +146,7 @@ bool DesignerInterfaceImpl::singleProjectMode() const
void DesignerInterfaceImpl::showError( TQWidget *widget,
int line, const TQString &message )
{
- mainWindow->showErrorMessage( TQT_TQOBJECT(widget), line, message );
+ mainWindow->showErrorMessage( widget, line, message );
}
void DesignerInterfaceImpl::runFinished()
@@ -156,12 +156,12 @@ void DesignerInterfaceImpl::runFinished()
void DesignerInterfaceImpl::showStackFrame( TQWidget *w, int line )
{
- mainWindow->showStackFrame( TQT_TQOBJECT(w), line );
+ mainWindow->showStackFrame( w, line );
}
void DesignerInterfaceImpl::showDebugStep( TQWidget *w, int line )
{
- mainWindow->showDebugStep( TQT_TQOBJECT(w), line );
+ mainWindow->showDebugStep( w, line );
}
void DesignerInterfaceImpl::runProjectPrecondition()
@@ -190,7 +190,7 @@ TQPtrList<DesignerFormWindow> DesignerProjectImpl::formList() const
while ( it.current() ) {
TQObject *obj = it.current();
++it;
- TQWidget *par = ::tqqt_cast<FormWindow*>(obj->parent());
+ TQWidget *par = ::tqt_cast<FormWindow*>(obj->parent());
if ( !obj->isWidgetType() || !par )
continue;
@@ -335,7 +335,7 @@ void DesignerProjectImpl::breakPoints( TQMap<TQString, TQValueList<uint> > &bps
for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
- bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( TQT_TQOBJECT(forms.current()->formWindow()) ) );
+ bps.insert( TQString( forms.current()->formWindow()->name() ) + " <Form>", MetaDataBase::breakPoints( forms.current()->formWindow() ) );
}
}
@@ -360,7 +360,7 @@ void DesignerProjectImpl::clearAllBreakpoints() const
for ( TQPtrListIterator<FormFile> forms = project->formFiles();
forms.current(); ++forms ) {
if ( forms.current()->formWindow() )
- MetaDataBase::setBreakPoints( TQT_TQOBJECT(forms.current()->formWindow()), empty );
+ MetaDataBase::setBreakPoints( forms.current()->formWindow(), empty );
MainWindow::self->resetBreakPoints();
}
}
@@ -535,7 +535,7 @@ void DesignerPixmapCollectionImpl::addPixmap( const TQPixmap &p, const TQString
pixCollection->addPixmap( pix, force );
FormWindow *fw = MainWindow::self->formWindow();
if ( fw )
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), p.serialNumber(), name );
+ MetaDataBase::setPixmapKey( fw, p.serialNumber(), name );
}
TQPixmap DesignerPixmapCollectionImpl::pixmap( const TQString &name ) const
@@ -585,8 +585,8 @@ void DesignerFormWindowImpl::insertWidget( TQWidget * )
TQWidget *DesignerFormWindowImpl::create( const char *className, TQWidget *parent, const char *name )
{
TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, name );
- formWindow->insertWidget( w, TRUE );
- formWindow->killAccels( TQT_TQOBJECT(formWindow->mainContainer()) );
+ formWindow->insertWidget( w, true );
+ formWindow->killAccels( formWindow->mainContainer() );
return w;
}
@@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout()
void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{
- formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
+ formWindow->selectWidget( w, true );
}
void DesignerFormWindowImpl::selectAll()
@@ -688,7 +688,7 @@ void DesignerFormWindowImpl::clearSelection()
bool DesignerFormWindowImpl::isWidgetSelected( TQWidget * ) const
{
- return FALSE;
+ return false;
}
TQWidgetList DesignerFormWindowImpl::selectedWidgets() const
@@ -736,12 +736,12 @@ void DesignerFormWindowImpl::addAction( TQAction *a )
return;
formWindow->actionList().append( a );
MetaDataBase::addEntry( a );
- setPropertyChanged( a, "name", TRUE );
- setPropertyChanged( a, "text", TRUE );
- setPropertyChanged( a, "menuText", TRUE );
- setPropertyChanged( a, "accel", TRUE );
+ setPropertyChanged( a, "name", true );
+ setPropertyChanged( a, "text", true );
+ setPropertyChanged( a, "menuText", true );
+ setPropertyChanged( a, "accel", true );
if ( !a->iconSet().isNull() && !a->iconSet().pixmap().isNull() )
- setPropertyChanged( a, "iconSet", TRUE );
+ setPropertyChanged( a, "iconSet", true );
}
void DesignerFormWindowImpl::removeAction( TQAction *a )
@@ -755,14 +755,14 @@ void DesignerFormWindowImpl::preview() const
void DesignerFormWindowImpl::addConnection( TQObject *sender, const char *signal, TQObject *receiver, const char *slot )
{
- MetaDataBase::addConnection( TQT_TQOBJECT(formWindow), sender, signal, receiver, slot );
+ MetaDataBase::addConnection( formWindow, sender, signal, receiver, slot );
}
void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQString &specifier,
const TQString &access, const TQString &type,
const TQString &language, const TQString &returnType )
{
- MetaDataBase::addFunction( TQT_TQOBJECT(formWindow), function, specifier, access, type, language, returnType );
+ MetaDataBase::addFunction( formWindow, function, specifier, access, type, language, returnType );
formWindow->mainWindow()->functionsChanged();
}
@@ -770,8 +770,8 @@ void DesignerFormWindowImpl::addFunction( const TQCString &function, const TQStr
void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, const TQVariant &value )
{
- int id = o->metaObject()->findProperty( property, TRUE );
- const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
+ int id = o->metaObject()->findProperty( property, true );
+ const TQMetaProperty* p = o->metaObject()->property( id, true );
if ( p && p->isValid() )
o->setProperty( property, value );
else
@@ -780,8 +780,8 @@ void DesignerFormWindowImpl::setProperty( TQObject *o, const char *property, con
TQVariant DesignerFormWindowImpl::property( TQObject *o, const char *prop ) const
{
- int id = o->metaObject()->findProperty( prop, TRUE );
- const TQMetaProperty* p = o->metaObject()->property( id, TRUE );
+ int id = o->metaObject()->findProperty( prop, true );
+ const TQMetaProperty* p = o->metaObject()->property( id, true );
if ( p && p->isValid() )
return o->property( prop );
return MetaDataBase::fakeProperty( o, prop );
@@ -804,7 +804,7 @@ void DesignerFormWindowImpl::setColumnFields( TQObject *o, const TQMap<TQString,
TQStringList DesignerFormWindowImpl::implementationIncludes() const
{
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -825,7 +825,7 @@ TQStringList DesignerFormWindowImpl::implementationIncludes() const
TQStringList DesignerFormWindowImpl::declarationIncludes() const
{
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formWindow );
TQStringList lst;
for ( TQValueList<MetaDataBase::Include>::Iterator it = includes.begin(); it != includes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -846,7 +846,7 @@ TQStringList DesignerFormWindowImpl::declarationIncludes() const
void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst )
{
- TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -882,13 +882,13 @@ void DesignerFormWindowImpl::setImplementationIncludes( const TQStringList &lst
includes << inc;
}
}
- MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes );
+ MetaDataBase::setIncludes( formWindow, includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
{
- TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Include> oldIncludes = MetaDataBase::includes( formWindow );
TQValueList<MetaDataBase::Include> includes;
for ( TQValueList<MetaDataBase::Include>::Iterator it = oldIncludes.begin(); it != oldIncludes.end(); ++it ) {
MetaDataBase::Include inc = *it;
@@ -924,60 +924,60 @@ void DesignerFormWindowImpl::setDeclarationIncludes( const TQStringList &lst )
includes << inc;
}
}
- MetaDataBase::setIncludes( TQT_TQOBJECT(formWindow), includes );
+ MetaDataBase::setIncludes( formWindow, includes );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
TQStringList DesignerFormWindowImpl::forwardDeclarations() const
{
- return MetaDataBase::forwards( TQT_TQOBJECT(formWindow) );
+ return MetaDataBase::forwards( formWindow );
}
void DesignerFormWindowImpl::setForwardDeclarations( const TQStringList &lst )
{
- MetaDataBase::setForwards( TQT_TQOBJECT(formWindow), lst );
+ MetaDataBase::setForwards( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
TQStringList DesignerFormWindowImpl::signalList() const
{
- return MetaDataBase::signalList( TQT_TQOBJECT(formWindow) );
+ return MetaDataBase::signalList( formWindow );
}
void DesignerFormWindowImpl::setSignalList( const TQStringList &lst )
{
- MetaDataBase::setSignalList( TQT_TQOBJECT(formWindow), lst );
+ MetaDataBase::setSignalList( formWindow, lst );
formWindow->mainWindow()->objectHierarchy()->formDefinitionView()->setup();
}
void DesignerFormWindowImpl::onModificationChange( TQObject *receiver, const char *slot )
{
- TQObject::connect( formWindow, TQT_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot );
+ TQObject::connect( formWindow, TQ_SIGNAL( modificationChanged( bool, FormWindow * ) ), receiver, slot );
}
void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
TQString n = name;
- formWindow->unify( TQT_TQOBJECT(popup), n, TRUE );
+ formWindow->unify( popup, n, true );
popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb ) {
mb = new MenuBarEditor( formWindow, mw );
mb->setName( "MenuBar" );
- MetaDataBase::addEntry( TQT_TQOBJECT(mb) );
+ MetaDataBase::addEntry( mb );
}
mb->insertItem( text, popup );
- MetaDataBase::addEntry( TQT_TQOBJECT(popup) );
+ MetaDataBase::addEntry( popup );
}
void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
@@ -990,7 +990,7 @@ void DesignerFormWindowImpl::addMenuAction( const TQString &menu, TQAction *a )
void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
if ( !mw->child( 0, "MenuBarEditor" ) )
@@ -1004,19 +1004,19 @@ void DesignerFormWindowImpl::addMenuSeparator( const TQString &menu )
void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &name )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new QDesignerToolBar( mw );
TQString n = name;
- formWindow->unify( TQT_TQOBJECT(tb), n, TRUE );
+ formWindow->unify( tb, n, true );
tb->setName( n );
mw->addToolBar( tb, text );
}
void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
@@ -1028,7 +1028,7 @@ void DesignerFormWindowImpl::addToolBarAction( const TQString &tbn, TQAction *a
void DesignerFormWindowImpl::addToolBarSeparator( const TQString &tbn )
{
- if ( !::tqqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
+ if ( !::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) )
return;
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
QDesignerToolBar *tb = (QDesignerToolBar*)mw->child( tbn, "QDesignerToolBar" );
@@ -1075,7 +1075,7 @@ void DesignerOutputDockImpl::appendError( const TQString &s, int l )
ls << s;
TQValueList<uint> ll;
ll << l;
- outWin->setErrorMessages( ls, ll, FALSE, TQStringList(), TQObjectList() );
+ outWin->setErrorMessages( ls, ll, false, TQStringList(), TQObjectList() );
}
void DesignerOutputDockImpl::clearError()
diff --git a/kdevdesigner/designer/designerappiface.h b/kdevdesigner/designer/designerappiface.h
index 2ddcd47c..7a56f84a 100644
--- a/kdevdesigner/designer/designerappiface.h
+++ b/kdevdesigner/designer/designerappiface.h
@@ -142,7 +142,7 @@ public:
void setTables( const TQStringList & );
TQMap<TQString, TQStringList> fields() const;
void setFields( const TQMap<TQString, TQStringList> & );
- void open( bool suppressDialog = TRUE ) const;
+ void open( bool suppressDialog = true ) const;
void close() const;
TQSqlDatabase* connection();
private:
@@ -205,7 +205,7 @@ public:
void setCurrentWidget( TQWidget * );
TQPtrList<TQAction> actionList() const;
TQAction *createAction( const TQString& text, const TQIconSet& icon, const TQString& menuText, int accel,
- TQObject* parent, const char* name = 0, bool toggle = FALSE );
+ TQObject* parent, const char* name = 0, bool toggle = false );
void addAction( TQAction * );
void removeAction( TQAction * );
void preview() const;
diff --git a/kdevdesigner/designer/editfunctions.ui b/kdevdesigner/designer/editfunctions.ui
index a5075250..fefe1dfe 100644
--- a/kdevdesigner/designer/editfunctions.ui
+++ b/kdevdesigner/designer/editfunctions.ui
@@ -696,7 +696,7 @@
<tabstop>addFunction</tabstop>
<tabstop>deleteFunction</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">currentItemChanged( TQListViewItem * )</slot>
<slot access="protected">currentSpecifierChanged( const TQString &amp; )</slot>
<slot access="protected">currentTextChanged( const TQString &amp; )</slot>
@@ -709,7 +709,7 @@
<slot access="protected">functionAdd()</slot>
<slot access="protected">functionRemove()</slot>
<slot access="protected">displaySlots( bool )</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp
index 5681f00b..b0c5ffaf 100644
--- a/kdevdesigner/designer/editfunctionsimpl.cpp
+++ b/kdevdesigner/designer/editfunctionsimpl.cpp
@@ -50,14 +50,14 @@
#include <tdelocale.h>
EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
- : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw )
+ : EditFunctionsBase( parent, 0, true ), formWindow( fw )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
id = 0;
functList.clear();
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( fw );
for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
TQListViewItem *i = new TQListViewItem( functionListView );
@@ -86,7 +86,7 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
id++;
if ( (*it).type == "slot" ) {
- if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) )
+ if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).function ).latin1() ) )
i->setText( 5, i18n( "Yes" ) );
else
i->setText( 5, i18n( "No" ) );
@@ -95,8 +95,8 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
}
}
- boxProperties->setEnabled( FALSE );
- functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) );
+ boxProperties->setEnabled( false );
+ functionName->setValidator( new AsciiValidator( true, functionName ) );
if ( functionListView->firstChild() )
functionListView->setCurrentItem( functionListView->firstChild() );
@@ -107,42 +107,42 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
// Enable rename for all TQListViewItems
TQListViewItemIterator lvit = functionListView->firstChild();
for ( ; *lvit; lvit++ )
- (*lvit)->setRenameEnabled( 0, TRUE );
+ (*lvit)->setRenameEnabled( 0, true );
// Connect listview signal to signal-relay
TQObject::connect( functionListView,
- TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
this,
- TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
+ TQ_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
// Connect signal-relay to TQLineEdit "functionName"
- TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" );
+ TQObjectList *l = parent->queryList( "TQLineEdit", "functionName" );
TQObject *obj;
TQObjectListIt itemsLineEditIt( *l );
while ( (obj = itemsLineEditIt.current()) != 0 ) {
++itemsLineEditIt;
TQObject::connect( this,
- TQT_SIGNAL( itemRenamed( const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
}
void EditFunctions::okClicked()
{
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() );
TQPtrList<Command> commands;
TQValueList<MetaDataBase::Function>::Iterator fit;
if ( !functionList.isEmpty() ) {
for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) {
- bool functionFound = FALSE;
+ bool functionFound = false;
TQValueList<FunctItem>::Iterator it = functList.begin();
for ( ; it != functList.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).oldName ) ==
MetaDataBase::normalizeFunction( (*fit).function ) ) {
- functionFound = TRUE;
+ functionFound = true;
break;
}
}
@@ -156,7 +156,7 @@ void EditFunctions::okClicked()
}
}
- bool invalidFunctions = FALSE;
+ bool invalidFunctions = false;
TQValueList<FunctItem> invalidItems;
if ( !functList.isEmpty() ) {
@@ -179,15 +179,15 @@ void EditFunctions::okClicked()
bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' );
if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) {
- invalidFunctions = TRUE;
+ invalidFunctions = true;
invalidItems.append( (*it) );
continue;
}
- bool functionFound = FALSE;
+ bool functionFound = false;
for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) {
if ( MetaDataBase::normalizeFunction( (*fit).function ) ==
MetaDataBase::normalizeFunction( (*it).oldName ) ) {
- functionFound = TRUE;
+ functionFound = true;
break;
}
}
@@ -218,12 +218,12 @@ void EditFunctions::okClicked()
"Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) {
TQValueList<FunctItem>::Iterator it = functList.begin();
while ( it != functList.end() ) {
- bool found = FALSE;
+ bool found = false;
TQValueList<FunctItem>::Iterator vit = invalidItems.begin();
for ( ; vit != invalidItems.end(); ++vit ) {
if ( (*vit).newName == (*it).newName ) {
invalidItems.remove( vit );
- found = TRUE;
+ found = true;
break;
}
}
@@ -237,7 +237,7 @@ void EditFunctions::okClicked()
functionIds.remove( fit );
delete litem;
if ( functionListView->currentItem() )
- functionListView->setSelected( functionListView->currentItem(), TRUE );
+ functionListView->setSelected( functionListView->currentItem(), true );
currentItemChanged( functionListView->currentItem() );
break;
}
@@ -249,7 +249,7 @@ void EditFunctions::okClicked()
}
if ( functionListView->firstChild() ) {
functionListView->setCurrentItem( functionListView->firstChild() );
- functionListView->setSelected( functionListView->firstChild(), TRUE );
+ functionListView->setSelected( functionListView->firstChild(), true );
}
}
formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView();
@@ -270,7 +270,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
{
TQListViewItem *i = new TQListViewItem( functionListView );
i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) );
- i->setRenameEnabled( 0, TRUE );
+ i->setRenameEnabled( 0, true );
i->setText( 1, "void" );
i->setText( 2, "virtual" );
@@ -291,7 +291,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
if ( i->text( 4 ) == "slot" ) {
i->setText( 0, "newSlot()" );
- if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) )
+ if ( MetaDataBase::isSlotUsed( formWindow, "newSlot()" ) )
i->setText( 5, i18n( "Yes" ) );
else
i->setText( 5, i18n( "No" ) );
@@ -301,7 +301,7 @@ void EditFunctions::functionAdd( const TQString &access, const TQString &type )
}
functionListView->setCurrentItem( i );
- functionListView->setSelected( i, TRUE );
+ functionListView->setSelected( i, true );
functionListView->ensureItemVisible( i );
functionName->setFocus();
functionName->selectAll();
@@ -329,7 +329,7 @@ void EditFunctions::functionRemove()
if ( !functionListView->currentItem() )
return;
- functionListView->blockSignals( TRUE );
+ functionListView->blockSignals( true );
removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) );
int delId = functionIds[ functionListView->currentItem() ];
TQValueList<FunctItem>::Iterator it = functList.begin();
@@ -343,24 +343,24 @@ void EditFunctions::functionRemove()
functionIds.remove( functionListView->currentItem() );
delete functionListView->currentItem();
if ( functionListView->currentItem() )
- functionListView->setSelected( functionListView->currentItem(), TRUE );
- functionListView->blockSignals( FALSE );
+ functionListView->setSelected( functionListView->currentItem(), true );
+ functionListView->blockSignals( false );
currentItemChanged( functionListView->currentItem() );
}
void EditFunctions::currentItemChanged( TQListViewItem *i )
{
- functionName->blockSignals( TRUE );
+ functionName->blockSignals( true );
functionName->setText( "" );
functionAccess->setCurrentItem( 0 );
- functionName->blockSignals( FALSE );
+ functionName->blockSignals( false );
if ( !i ) {
- boxProperties->setEnabled( FALSE );
+ boxProperties->setEnabled( false );
return;
}
- functionName->blockSignals( TRUE );
+ functionName->blockSignals( true );
functionName->setText( i->text( 0 ) );
editType->setText( i->text( 1 ) );
TQString specifier = i->text( 2 );
@@ -385,8 +385,8 @@ void EditFunctions::currentItemChanged( TQListViewItem *i )
else
functionType->setCurrentItem( 1 );
- functionName->blockSignals( FALSE );
- boxProperties->setEnabled( TRUE );
+ functionName->blockSignals( false );
+ boxProperties->setEnabled( true );
}
void EditFunctions::currentTextChanged( const TQString &txt )
@@ -398,7 +398,7 @@ void EditFunctions::currentTextChanged( const TQString &txt )
functionListView->currentItem()->setText( 0, txt );
if ( functionListView->currentItem()->text( 4 ) == "slot" ) {
- if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) )
+ if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) )
functionListView->currentItem()->setText( 5, i18n( "Yes" ) );
else
functionListView->currentItem()->setText( 5, i18n( "No" ) );
@@ -441,7 +441,7 @@ void EditFunctions::currentTypeChanged( const TQString &type )
lastType = type;
functionListView->currentItem()->setText( 4, type );
if ( type == "slot" ) {
- if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow),
+ if ( MetaDataBase::isSlotUsed( formWindow,
MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) )
functionListView->currentItem()->setText( 5, i18n( "Yes" ) );
else
@@ -490,7 +490,7 @@ void EditFunctions::setCurrentFunction( const TQString &function )
while ( it.current() ) {
if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) {
functionListView->setCurrentItem( it.current() );
- functionListView->setSelected( it.current(), TRUE );
+ functionListView->setSelected( it.current(), true );
currentItemChanged( it.current() );
return;
}
@@ -515,7 +515,7 @@ void EditFunctions::displaySlots( bool justSlots )
i->setText( 4, (*it).type );
if ( (*it).type == "slot" ) {
- if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) )
+ if ( MetaDataBase::isSlotUsed( formWindow, MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) )
i->setText( 5, i18n( "Yes" ) );
else
i->setText( 5, i18n( "No" ) );
@@ -525,7 +525,7 @@ void EditFunctions::displaySlots( bool justSlots )
}
if ( functionListView->firstChild() )
- functionListView->setSelected( functionListView->firstChild(), TRUE );
+ functionListView->setSelected( functionListView->firstChild(), true );
}
void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text )
diff --git a/kdevdesigner/designer/editfunctionsimpl.h b/kdevdesigner/designer/editfunctionsimpl.h
index 0d4259dc..a0c8fc66 100644
--- a/kdevdesigner/designer/editfunctionsimpl.h
+++ b/kdevdesigner/designer/editfunctionsimpl.h
@@ -37,11 +37,11 @@ class TQListViewItem;
class EditFunctions : public EditFunctionsBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
- EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = FALSE );
+ EditFunctions( TQWidget *parent, FormWindow *fw, bool showOnlySlots = false );
void setCurrentFunction( const TQString &function );
void functionAdd( const TQString &access = TQString(),
diff --git a/kdevdesigner/designer/filechooser.cpp b/kdevdesigner/designer/filechooser.cpp
index 0f4c426e..6923e94c 100644
--- a/kdevdesigner/designer/filechooser.cpp
+++ b/kdevdesigner/designer/filechooser.cpp
@@ -41,15 +41,15 @@ FileChooser::FileChooser( TQWidget *parent, const char *name )
lineEdit = new TQLineEdit( this, "filechooser_lineedit" );
layout->addWidget( lineEdit );
- connect( lineEdit, TQT_SIGNAL( textChanged( const TQString & ) ),
- this, TQT_SIGNAL( fileNameChanged( const TQString & ) ) );
+ connect( lineEdit, TQ_SIGNAL( textChanged( const TQString & ) ),
+ this, TQ_SIGNAL( fileNameChanged( const TQString & ) ) );
button = new TQPushButton( "...", this, "filechooser_button" );
button->setFixedWidth( button->fontMetrics().width( " ... " ) );
layout->addWidget( button );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( chooseFile() ) );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( chooseFile() ) );
setFocusProxy( lineEdit );
}
diff --git a/kdevdesigner/designer/filechooser.h b/kdevdesigner/designer/filechooser.h
index 42430334..c4026336 100644
--- a/kdevdesigner/designer/filechooser.h
+++ b/kdevdesigner/designer/filechooser.h
@@ -34,7 +34,7 @@ class TQPushButton;
class FileChooser : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
TQ_ENUMS( Mode )
diff --git a/kdevdesigner/designer/finddialog.ui b/kdevdesigner/designer/finddialog.ui
index 9b16cd8c..c257206e 100644
--- a/kdevdesigner/designer/finddialog.ui
+++ b/kdevdesigner/designer/finddialog.ui
@@ -264,11 +264,11 @@
<variable>EditorInterface *editor;</variable>
<variable>TQObject *formWindow;</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>destroy()</slot>
<slot>doFind()</slot>
<slot>setEditor( EditorInterface * e, TQObject * fw )</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/finddialog.ui.h b/kdevdesigner/designer/finddialog.ui.h
index 126c0a5f..c3218edd 100644
--- a/kdevdesigner/designer/finddialog.ui.h
+++ b/kdevdesigner/designer/finddialog.ui.h
@@ -43,16 +43,16 @@ void FindDialog::doFind()
if ( !editor->find( comboFind->currentText(), checkCase->isChecked(),
checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked() ) )
- checkBegin->setChecked( TRUE );
+ checkBegin->setChecked( true );
else
- checkBegin->setChecked( FALSE );
+ checkBegin->setChecked( false );
}
void FindDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
- checkBegin->setChecked( TRUE );
+ checkBegin->setChecked( true );
formWindow = fw;
if ( editor )
editor->release();
diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp
index 4ba5b7c7..d32a0611 100644
--- a/kdevdesigner/designer/formfile.cpp
+++ b/kdevdesigner/designer/formfile.cpp
@@ -66,8 +66,8 @@ static TQString make_func_pretty( const TQString &s )
FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name )
: filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ),
- timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ),
- cm( FALSE ), codeFileStat( None )
+ timeStamp( 0, fn + codeExtension() ), codeEdited( false ), pkg( false ),
+ cm( false ), codeFileStat( None )
{
MetaDataBase::addEntry( this );
fake = qstrcmp( name, "qt_fakewindow" ) == 0;
@@ -75,15 +75,15 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name
pro->addFormFile( this );
loadCode();
if ( !temp )
- checkFileName( FALSE );
+ checkFileName( false );
- connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* )));
+ connect(this, TQ_SIGNAL(somethingChanged(FormFile* )), this, TQ_SLOT(emitNewStatus(FormFile* )));
}
FormFile::~FormFile()
{
pro->removeFormFile( this );
- if ( TQT_TQOBJECT(formWindow()) )
+ if ( formWindow() )
formWindow()->setFormFile( 0 );
}
@@ -96,8 +96,8 @@ void FormFile::setFormWindow( FormWindow *f )
fw = f;
if ( fw )
fw->setFormFile( this );
- parseCode( cod, FALSE );
- TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) );
+ parseCode( cod, false );
+ TQTimer::singleShot( 0, this, TQ_SLOT( notifyFormWindowChange() ) );
}
void FormFile::setEditor( SourceEditor *e )
@@ -110,12 +110,12 @@ void FormFile::setFileName( const TQString &fn )
if ( fn == filename )
return;
if ( fn.isEmpty() ) {
- fileNameTemp = TRUE;
+ fileNameTemp = true;
if ( filename.find( "unnamed" ) != 0 )
filename = createUnnamedFileName();
return;
} else {
- fileNameTemp = FALSE;
+ fileNameTemp = false;
}
filename = fn;
timeStamp.setFileName( filename + codeExtension() );
@@ -166,14 +166,14 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
if ( fileNameTemp )
return saveAs();
if ( !ignoreModified && !isModified() )
- return TRUE;
+ return true;
if ( ed )
ed->save();
- if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) {
+ if ( formWindow() && isModified( WFormWindow ) ) {
if ( withMsgBox ) {
if ( !formWindow()->checkCustomWidgets() )
- return FALSE;
+ return false;
}
if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) {
@@ -221,7 +221,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
}
}
- if ( TQT_TQOBJECT(formWindow()) ) {
+ if ( formWindow() ) {
Resource resource( MainWindow::self );
resource.setWidget( formWindow() );
bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow );
@@ -229,7 +229,7 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
if ( MainWindow::self )
MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) );
if ( formCodeOnly )
- return FALSE;
+ return false;
return saveAs();
}
if ( MainWindow::self )
@@ -237,22 +237,22 @@ bool FormFile::save( bool withMsgBox, bool ignoreModified )
arg( formCodeOnly ? codeFile() : filename ));
} else {
if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) )
- return FALSE;
+ return false;
}
timeStamp.update();
- setModified( FALSE );
- return TRUE;
+ setModified( false );
+ return true;
}
bool FormFile::saveAs( bool ignoreModified )
{
TQString f = pro->makeAbsolute( fileName() );
- if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) {
+ if ( fileNameTemp && formWindow() ) {
f = TQString( formWindow()->name() ).lower();
f.replace( "::", "_" );
f = pro->makeAbsolute( f + ".ui" );
}
- bool saved = FALSE;
+ bool saved = false;
if ( ignoreModified ) {
TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first();
f = TQFileInfo( f ).fileName();
@@ -266,11 +266,11 @@ bool FormFile::saveAs( bool ignoreModified )
i18n( "Save Form '%1' As").arg( formName() )/*,
MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ );
if ( fn.isEmpty() )
- return FALSE;
+ return false;
TQFileInfo fi( fn );
if ( fi.extension() != "ui" )
fn += ".ui";
- fileNameTemp = FALSE;
+ fileNameTemp = false;
filename = pro->makeRelative( fn );
TQFileInfo relfi( filename );
if ( relfi.exists() ) {
@@ -278,27 +278,27 @@ bool FormFile::saveAs( bool ignoreModified )
i18n( "The file already exists. Do you wish to overwrite it?" ),
TQMessageBox::Yes,
TQMessageBox::No ) == TQMessageBox::Yes ) {
- saved = TRUE;
+ saved = true;
} else {
filename = f;
}
} else {
- saved = TRUE;
+ saved = true;
}
}
- if ( !checkFileName( TRUE ) ) {
+ if ( !checkFileName( true ) ) {
filename = f;
- return FALSE;
+ return false;
}
- pro->setModified( TRUE );
+ pro->setModified( true );
timeStamp.setFileName( pro->makeAbsolute( codeFile() ) );
- if ( ed && TQT_TQOBJECT(formWindow()) )
+ if ( ed && formWindow() )
ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) );
- setModified( TRUE );
+ setModified( true );
if ( pro->isDummy() )
fw->mainWindow()->addRecentlyOpenedFile( fn );
- return save( TRUE, ignoreModified );
+ return save( true, ignoreModified );
}
bool FormFile::close()
@@ -307,20 +307,20 @@ bool FormFile::close()
editor()->save();
editor()->close();
}
- if ( TQT_TQOBJECT(formWindow()) )
+ if ( formWindow() )
return formWindow()->close();
- return TRUE;
+ return true;
}
bool FormFile::closeEvent()
{
if ( !isModified() && fileNameTemp ) {
pro->removeFormFile( this );
- return TRUE;
+ return true;
}
if ( !isModified() )
- return TRUE;
+ return true;
if ( editor() )
editor()->save();
@@ -330,7 +330,7 @@ bool FormFile::closeEvent()
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
if ( !save() )
- return FALSE;
+ return false;
case 1: // don't save
loadCode();
if ( ed )
@@ -341,16 +341,16 @@ bool FormFile::closeEvent()
MainWindow::self->workspace()->update();
break;
case 2: // cancel
- return FALSE;
+ return false;
default:
break;
}
- setModified( FALSE );
+ setModified( false );
if ( MainWindow::self )
MainWindow::self->updateFunctionList();
- setCodeEdited( FALSE );
- return TRUE;
+ setCodeEdited( false );
+ return true;
}
void FormFile::setModified( bool m, int who )
@@ -372,8 +372,8 @@ bool FormFile::isModified( int who )
bool FormFile::isFormWindowModified() const
{
- if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() )
- return FALSE;
+ if ( !formWindow() || !formWindow()->commandHistory() )
+ return false;
return formWindow()->commandHistory()->isModified();
}
@@ -389,7 +389,7 @@ void FormFile::setFormWindowModified( bool m )
bool b = isFormWindowModified();
if ( m == b )
return;
- if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() )
+ if ( !formWindow() || !formWindow()->commandHistory() )
return;
formWindow()->commandHistory()->setModified( m );
emit somethingChanged( this );
@@ -411,18 +411,18 @@ void FormFile::showFormWindow()
{
if ( !MainWindow::self )
return;
- if ( TQT_TQOBJECT(formWindow()) ) {
+ if ( formWindow() ) {
if ( ( formWindow()->hasFocus() ||
- TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) &&
- TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) {
- MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() );
+ MainWindow::self->qWorkspace()->activeWindow() == formWindow() ) &&
+ MainWindow::self->propertyeditor()->formWindow() != formWindow() ) {
+ MainWindow::self->propertyeditor()->setWidget( formWindow()->currentWidget(), formWindow() );
MainWindow::self->objectHierarchy()->setFormWindow( formWindow(),
- TQT_TQOBJECT(formWindow()->currentWidget()) );
+ formWindow()->currentWidget() );
}
formWindow()->setFocus();
return;
}
- MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this );
+ MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), true, this );
}
bool FormFile::setupUihFile( bool askForUih )
@@ -430,10 +430,10 @@ bool FormFile::setupUihFile( bool askForUih )
if ( !pro->isCpp() || !askForUih ) {
if ( !hasFormCode() ) {
createFormCode();
- setModified( TRUE );
+ setModified( true );
}
codeFileStat = FormFile::Ok;
- return TRUE;
+ return true;
}
if ( codeFileStat != FormFile::Ok && !ed ) {
if ( hasFormCode() ) {
@@ -443,20 +443,20 @@ bool FormFile::setupUihFile( bool askForUih )
i18n( "Use Existing" ), i18n( "Create New" ),
i18n( "Cancel" ), 2, 2 );
if ( i == 2 )
- return FALSE;
+ return false;
if ( i == 1 )
createFormCode();
} else {
if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ),
i18n( "Do you want to create an new \"ui.h\" file?" ),
TQMessageBox::Yes, TQMessageBox::No ) )
- return FALSE;
+ return false;
createFormCode();
}
- setModified( TRUE );
+ setModified( true );
}
codeFileStat = FormFile::Ok;
- return TRUE;
+ return true;
}
SourceEditor *FormFile::showEditor( bool askForUih )
@@ -519,14 +519,14 @@ void FormFile::setCodeFileState( UihState s )
void FormFile::createFormCode()
{
- if ( !TQT_TQOBJECT(formWindow()) )
+ if ( !formWindow() )
return;
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( !iface )
return;
if ( pro->isCpp() )
cod = codeComment();
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow() );
for ( TQValueList<MetaDataBase::Function>::Iterator it = functionList.begin(); it != functionList.end(); ++it ) {
cod += (!cod.isEmpty() ? "\n\n" : "") +
iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function),
@@ -535,7 +535,7 @@ void FormFile::createFormCode()
(*it).returnType, (*it).access ) +
"\n" + iface->createEmptyFunction();
}
- parseCode( cod, FALSE );
+ parseCode( cod, false );
}
void FormFile::load()
@@ -550,15 +550,15 @@ bool FormFile::loadCode()
if ( !f.open( IO_ReadOnly ) ) {
cod = "";
setCodeFileState( FormFile::None );
- return FALSE;
+ return false;
}
TQTextStream ts( &f );
cod = ts.read();
- parseCode( cod, FALSE );
+ parseCode( cod, false );
if ( hasFormCode() && codeFileStat != FormFile::Ok )
setCodeFileState( FormFile::Deleted );
timeStamp.update();
- return TRUE;
+ return true;
}
bool FormFile::isCodeEdited() const
@@ -573,25 +573,25 @@ void FormFile::setCodeEdited( bool b )
void FormFile::parseCode( const TQString &txt, bool allowModify )
{
- if ( !TQT_TQOBJECT(formWindow()) )
+ if ( !formWindow() )
return;
LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() );
if ( !iface )
return;
TQValueList<LanguageInterface::Function> functions;
TQValueList<MetaDataBase::Function> newFunctions, oldFunctions;
- oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) );
+ oldFunctions = MetaDataBase::functionList( formWindow() );
iface->functions( txt, &functions );
TQMap<TQString, TQString> funcs;
for ( TQValueList<LanguageInterface::Function>::Iterator it = functions.begin();
it != functions.end(); ++it ) {
- bool found = FALSE;
+ bool found = false;
for ( TQValueList<MetaDataBase::Function>::Iterator fit = oldFunctions.begin();
fit != oldFunctions.end(); ++fit ) {
TQString f( (*fit).function );
if ( MetaDataBase::normalizeFunction( f ) ==
MetaDataBase::normalizeFunction( (*it).name ) ) {
- found = TRUE;
+ found = true;
MetaDataBase::Function function;
function.function = make_func_pretty( (*it).name );
function.specifier = (*fit).specifier;
@@ -627,21 +627,21 @@ void FormFile::parseCode( const TQString &txt, bool allowModify )
newFunctions << function;
funcs.insert( (*it).name, (*it).body );
if ( allowModify )
- setFormWindowModified( TRUE );
+ setFormWindowModified( true );
}
}
if ( allowModify && oldFunctions.count() > 0 )
- setFormWindowModified( TRUE );
+ setFormWindowModified( true );
- MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions );
+ MetaDataBase::setFunctionList( formWindow(), newFunctions );
}
void FormFile::syncCode()
{
if ( !editor() )
return;
- parseCode( editor()->editorInterface()->text(), TRUE );
+ parseCode( editor()->editorInterface()->text(), true );
cod = editor()->editorInterface()->text();
}
@@ -672,14 +672,14 @@ void FormFile::checkTimeStamp()
bool FormFile::isUihFileUpToDate()
{
if ( timeStamp.isUpToDate() )
- return TRUE;
+ return true;
if ( !editor() ) {
MainWindow::self->editSource();
tqDebug( "parse Code" );
- parseCode( editor()->editorInterface()->text(), TRUE );
+ parseCode( editor()->editorInterface()->text(), true );
}
checkTimeStamp();
- return FALSE;
+ return false;
}
void FormFile::addFunctionCode( MetaDataBase::Function function )
@@ -692,11 +692,11 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
TQValueList<LanguageInterface::Function> funcs;
iface->functions( cod, &funcs );
- bool hasFunc = FALSE;
+ bool hasFunc = false;
for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) {
- hasFunc = TRUE;
+ hasFunc = true;
break;
}
}
@@ -704,7 +704,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
if ( !hasFunc ) {
if ( !codeEdited && !timeStamp.isUpToDate() )
loadCode();
- MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) );
+ MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( formWindow() );
TQString cn;
if ( mi.classNameChanged )
cn = mi.className;
@@ -718,7 +718,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
"\n" + iface->createEmptyFunction();
cod += body;
if ( codeEdited ) {
- setModified( TRUE );
+ setModified( true );
emit somethingChanged( this );
}
}
@@ -802,7 +802,7 @@ void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &o
TQString FormFile::formName() const
{
FormFile* that = (FormFile*) this;
- if ( TQT_TQOBJECT(formWindow()) ) {
+ if ( formWindow() ) {
that->cachedFormName = formWindow()->name();
return cachedFormName;
}
@@ -865,12 +865,12 @@ bool FormFile::checkFileName( bool allowBreak )
arg( formWindow()->name() )/*,
MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */);
if ( allowBreak && fn.isEmpty() )
- return FALSE;
+ return false;
}
filename = pro->makeRelative( fn );
ff = pro->findFormFile( filename, this );
}
- return TRUE;
+ return true;
}
void FormFile::addConnection( const TQString &sender, const TQString &signal,
diff --git a/kdevdesigner/designer/formfile.h b/kdevdesigner/designer/formfile.h
index 79f92d16..8988e5dc 100644
--- a/kdevdesigner/designer/formfile.h
+++ b/kdevdesigner/designer/formfile.h
@@ -37,7 +37,7 @@ class SourceEditor;
class FormFile : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
friend class SourceEditor;
@@ -73,8 +73,8 @@ public:
bool loadCode();
void load();
- bool save( bool withMsgBox = TRUE, bool ignoreModified = FALSE );
- bool saveAs( bool ignoreModified = FALSE );
+ bool save( bool withMsgBox = true, bool ignoreModified = false );
+ bool saveAs( bool ignoreModified = false );
bool close();
bool closeEvent();
bool isModified( int who = WAnyOrAll );
@@ -89,7 +89,7 @@ public:
void functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType );
void showFormWindow();
- SourceEditor *showEditor( bool askForUih = TRUE );
+ SourceEditor *showEditor( bool askForUih = true );
static TQString createUnnamedFileName();
TQString formName() const;
@@ -106,7 +106,7 @@ public:
bool hasTempFileName() const { return fileNameTemp; }
void setCodeFileState( UihState );
int codeFileState() const;
- bool setupUihFile( bool askForUih = TRUE );
+ bool setupUihFile( bool askForUih = true );
Project *project() const { return pro; }
diff --git a/kdevdesigner/designer/formsettings.ui b/kdevdesigner/designer/formsettings.ui
index 812f30a0..89afbd97 100644
--- a/kdevdesigner/designer/formsettings.ui
+++ b/kdevdesigner/designer/formsettings.ui
@@ -542,9 +542,9 @@
<tabstop>buttonCancel</tabstop>
<tabstop>buttonHelp</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot>okClicked()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
diff --git a/kdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp
index e29ea157..f3de8578 100644
--- a/kdevdesigner/designer/formsettingsimpl.cpp
+++ b/kdevdesigner/designer/formsettingsimpl.cpp
@@ -41,10 +41,10 @@
#include <tqcheckbox.h>
FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
- : FormSettingsBase( parent, 0, TRUE ), formwindow( fw )
+ : FormSettingsBase( parent, 0, true ), formwindow( fw )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(fw) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
if ( info.classNameChanged && !info.className.isEmpty() )
editClassName->setText( info.className );
else
@@ -52,21 +52,21 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
editComment->setText( info.comment );
editAuthor->setText( info.author );
- editClassName->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editClassName) ) );
- editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editPixmapFunction) ) );
+ editClassName->setValidator( new AsciiValidator( TQString( ":" ), editClassName ) );
+ editPixmapFunction->setValidator( new AsciiValidator( TQString( ":" ), editPixmapFunction ) );
if ( formwindow->savePixmapInline() )
- radioPixmapInline->setChecked( TRUE );
+ radioPixmapInline->setChecked( true );
else if ( formwindow->savePixmapInProject() )
- radioProjectImageFile->setChecked( TRUE );
+ radioProjectImageFile->setChecked( true );
else
- radioPixmapFunction->setChecked( TRUE );
+ radioPixmapFunction->setChecked( true );
editPixmapFunction->setText( formwindow->pixmapLoaderFunction() );
radioProjectImageFile->setEnabled( !fw->project()->isDummy() );
spinSpacing->setValue( formwindow->layoutDefaultSpacing() );
spinMargin->setValue( formwindow->layoutDefaultMargin() );
- editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editSpacingFunction) ) );
- editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), TQT_TQOBJECT(editMarginFunction) ) );
+ editSpacingFunction->setValidator( new AsciiValidator( TQString( ":" ), editSpacingFunction ) );
+ editMarginFunction->setValidator( new AsciiValidator( TQString( ":" ), editMarginFunction ) );
checkLayoutFunctions->setChecked( formwindow->hasLayoutFunctions() );
editSpacingFunction->setText( formwindow->spacingFunction() );
editMarginFunction->setText( formwindow->marginFunction() );
@@ -79,34 +79,34 @@ void FormSettings::okClicked()
info.classNameChanged = info.className != TQString( formwindow->name() );
info.comment = editComment->text();
info.author = editAuthor->text();
- MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), info );
+ MetaDataBase::setMetaInfo( formwindow, info );
- formwindow->commandHistory()->setModified( TRUE );
+ formwindow->commandHistory()->setModified( true );
if ( formwindow->savePixmapInline() ) {
- MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) );
- MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::clearPixmapArguments( formwindow );
+ MetaDataBase::clearPixmapKeys( formwindow );
} else if ( formwindow->savePixmapInProject() ) {
- MetaDataBase::clearPixmapArguments( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::clearPixmapArguments( formwindow );
} else {
- MetaDataBase::clearPixmapKeys( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::clearPixmapKeys( formwindow );
}
if ( radioPixmapInline->isChecked() ) {
- formwindow->setSavePixmapInline( TRUE );
- formwindow->setSavePixmapInProject( FALSE );
+ formwindow->setSavePixmapInline( true );
+ formwindow->setSavePixmapInProject( false );
} else if ( radioProjectImageFile->isChecked() ){
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( TRUE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( true );
} else {
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( FALSE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( false );
}
if ( checkLayoutFunctions->isChecked() )
- formwindow->hasLayoutFunctions( TRUE );
+ formwindow->hasLayoutFunctions( true );
else
- formwindow->hasLayoutFunctions( FALSE );
+ formwindow->hasLayoutFunctions( false );
formwindow->setPixmapLoaderFunction( editPixmapFunction->text() );
formwindow->setLayoutDefaultSpacing( spinSpacing->value() );
diff --git a/kdevdesigner/designer/formsettingsimpl.h b/kdevdesigner/designer/formsettingsimpl.h
index 3dcb6dd7..0580128d 100644
--- a/kdevdesigner/designer/formsettingsimpl.h
+++ b/kdevdesigner/designer/formsettingsimpl.h
@@ -33,7 +33,7 @@ class FormWindow;
class FormSettings : public FormSettingsBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp
index 99f631ae..6bea093f 100644
--- a/kdevdesigner/designer/formwindow.cpp
+++ b/kdevdesigner/designer/formwindow.cpp
@@ -87,7 +87,7 @@ static void setCursorToAll( const TQCursor &c, TQWidget *start )
TQObjectList l = start->childrenListObject();
if ( !l.isEmpty() ) {
for ( TQObject *o = l.first(); o; o = l.next() ) {
- if ( o->isWidgetType() && !::tqqt_cast<SizeHandle*>(o) )
+ if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) )
setCursorToAll( c, ( (TQWidget*)o ) );
}
}
@@ -102,7 +102,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw )
TQObjectList l = start->childrenListObject();
if ( !l.isEmpty() ) {
for ( TQObject *o = l.first(); o; o = l.next() ) {
- if ( o->isWidgetType() && !::tqqt_cast<SizeHandle*>(o) )
+ if ( o->isWidgetType() && !::tqt_cast<SizeHandle*>(o) )
restoreCursors( ( (TQWidget*)o ), fw );
}
}
@@ -112,7 +112,7 @@ static void restoreCursors( TQWidget *start, FormWindow *fw )
#include <tqt_windows.h>
static void flickerfree_update( TQWidget *w )
{
- InvalidateRect( w->winId(), 0, FALSE );
+ InvalidateRect( w->winId(), 0, false );
}
#endif
@@ -136,7 +136,7 @@ static void flickerfree_update( TQWidget *w )
FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name )
: TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ),
- commands( 100 ), pixInline( TRUE ), pixProject( FALSE )
+ commands( 100 ), pixInline( true ), pixProject( false )
{
ff = f;
init();
@@ -145,7 +145,7 @@ FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const cha
FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name )
: TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ),
- commands( 100 ), pixInline( TRUE )
+ commands( 100 ), pixInline( true )
{
ff = f;
init();
@@ -156,63 +156,63 @@ void FormWindow::init()
setWFlags(getWFlags() & TQt::WStyle_Maximize);
fake = qstrcmp( name(), "qt_fakewindow" ) == 0;
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
ff->setFormWindow( this );
iface = 0;
proj = 0;
propertyWidget = 0;
- toolFixed = FALSE;
- checkedSelectionsForMove = FALSE;
+ toolFixed = false;
+ checkedSelectionsForMove = false;
mContainer = 0;
startWidget = endWidget = 0;
currTool = POINTER_TOOL;
unclippedPainter = 0;
- widgetPressed = FALSE;
- drawRubber = FALSE;
- setFocusPolicy( TQ_ClickFocus );
+ widgetPressed = false;
+ drawRubber = false;
+ setFocusPolicy( TQWidget::ClickFocus );
sizePreviewLabel = 0;
checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" );
- connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( invalidCheckedSelections() ) );
+ connect( checkSelectionsTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( invalidCheckedSelections() ) );
updatePropertiesTimer = new TQTimer( this );
- connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( updatePropertiesTimerDone() ) );
+ connect( updatePropertiesTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( updatePropertiesTimerDone() ) );
showPropertiesTimer = new TQTimer( this );
//!!!!
- connect( showPropertiesTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( showPropertiesTimerDone() ) );
+ connect( showPropertiesTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( showPropertiesTimerDone() ) );
selectionChangedTimer = new TQTimer( this );
- connect( selectionChangedTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( selectionChangedTimerDone() ) );
+ connect( selectionChangedTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( selectionChangedTimerDone() ) );
windowsRepaintWorkaroundTimer = new TQTimer( this );
- connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) );
+ connect( windowsRepaintWorkaroundTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( windowsRepaintWorkaroundTimerTimeout() ) );
insertParent = 0;
- connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
- this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
- propShowBlocked = FALSE;
+ connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
+ propShowBlocked = false;
setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
- connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ),
- this, TQT_SLOT( modificationChanged( bool ) ) );
+ connect( &commands, TQ_SIGNAL( modificationChanged( bool ) ),
+ this, TQ_SLOT( modificationChanged( bool ) ) );
buffer = 0;
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this );
setMainContainer( w );
- propertyWidget = TQT_TQOBJECT(w);
+ propertyWidget = w;
targetContainer = 0;
- hadOwnPalette = FALSE;
+ hadOwnPalette = false;
defSpacing = BOXLAYOUT_DEFAULT_SPACING;
defMargin = BOXLAYOUT_DEFAULT_MARGIN;
- hasLayoutFunc = FALSE;
+ hasLayoutFunc = false;
}
void FormWindow::setMainWindow( MainWindow *w )
{
mainwindow = w;
- MetaDataBase::addEntry( TQT_TQOBJECT(this) );
+ MetaDataBase::addEntry( this );
initSlots();
}
@@ -236,7 +236,7 @@ FormWindow::~FormWindow()
if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this )
MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 );
- MetaDataBase::clear( TQT_TQOBJECT(this) );
+ MetaDataBase::clear( this );
if ( ff )
ff->setFormWindow( 0 );
delete iface;
@@ -353,19 +353,19 @@ void FormWindow::insertWidget()
return;
bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 );
- Qt::Orientation orient =Qt::Horizontal;
+ TQt::Orientation orient =TQt::Horizontal;
TQString n = WidgetDatabase::className( currTool );
- if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) {
+ if ( useSizeHint && ( n == "Spacer" || n == "TQSlider" || n == "Line" || n == "TQScrollBar" ) ) {
TQPopupMenu m( mainWindow() );
m.insertItem( i18n( "&Horizontal" ) );
int ver = m.insertItem( i18n( "&Vertical" ) );
int r = m.exec( TQCursor::pos() );
if ( r == ver )
- orient =Qt::Vertical;
+ orient =TQt::Vertical;
}
- TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient );
+ TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, true, &currRect, orient );
if ( !w )
return;
@@ -375,7 +375,7 @@ void FormWindow::insertWidget()
pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() );
( (TQLabel*)w )->setPixmap( pix );
}
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(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> "
@@ -393,7 +393,7 @@ void FormWindow::insertWidget()
}
TQString s = w->name();
- unify( TQT_TQOBJECT(w), s, TRUE );
+ unify( w, s, true );
w->setName( s );
insertWidget( w );
TQRect r( currRect );
@@ -408,7 +408,7 @@ void FormWindow::insertWidget()
if ( useSizeHint ) {
if ( n == "Spacer" ) {
- if ( orient ==Qt::Vertical ) {
+ if ( orient ==TQt::Vertical ) {
r.setWidth( 20 );
r.setHeight( 40 );
} else {
@@ -429,13 +429,13 @@ void FormWindow::insertWidget()
const TQObjectList l = insertParent->childrenListObject();
TQObjectListIt it( l );
TQWidgetList lst;
- if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
for ( ; it.current(); ) {
TQObject *o = it.current();
++it;
if ( o->isWidgetType() &&
( (TQWidget*)o )->isVisibleTo( this ) &&
- insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) {
+ insertedWidgets.find( o ) && o != w ) {
TQRect r2( ( (TQWidget*)o )->pos(),
( (TQWidget*)o )->size() );
if ( r.contains( r2 ) )
@@ -497,12 +497,12 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
return;
if ( checkName ) {
TQString s = w->name();
- unify( TQT_TQOBJECT(w), s, TRUE );
+ unify( w, s, true );
w->setName( s );
}
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) );
+ MetaDataBase::addEntry( w );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(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> "
@@ -526,7 +526,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
void FormWindow::removeWidget( TQWidget *w )
{
- MetaDataBase::removeEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::removeEntry( w );
widgets()->take( w );
}
@@ -535,16 +535,16 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
CHECK_MAINWINDOW;
switch ( currTool ) {
case POINTER_TOOL: {
- if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
+ if ( !isMainContainer( w ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
raiseChildSelections( w ); // raise selections and select widget
- selectWidget( TQT_TQOBJECT(w) );
+ selectWidget( 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();
- if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) {
+ if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) {
e->accept();
mainwindow->popupFormWindowMenu( e->globalPos(), this );
} else {
@@ -565,7 +565,7 @@ void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w )
void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
- checkedSelectionsForMove = FALSE;
+ checkedSelectionsForMove = false;
checkSelectionsTimer->stop();
if ( !sizePreviewLabel ) {
sizePreviewLabel = new TQLabel( this );
@@ -576,72 +576,72 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
switch ( currTool ) {
case POINTER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget
+ if ( !isMainContainer( 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 )
w->raise();
if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection
- drawRubber = TRUE;
+ drawRubber = true;
currRect = TQRect( 0, 0, -1, -1 );
startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber );
break;
}
- bool sel = isWidgetSelected( TQT_TQOBJECT(w) );
+ bool sel = isWidgetSelected( w );
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed...
if ( !sel ) { // ...and widget no selectted: unselect all
- clearSelection( FALSE );
+ clearSelection( false );
} else { // ...widget selected
// only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) {
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
- setPropertyShowingBlocked( TRUE );
+ TQObjectList *l = w->queryList( "TQWidget" );
+ setPropertyShowingBlocked( true );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !o->isWidgetType() )
continue;
if ( insertedWidgets.find( (TQWidget*)o ) )
- selectWidget( TQT_TQOBJECT(o), FALSE );
+ selectWidget( o, false );
}
- setPropertyShowingBlocked( FALSE );
+ setPropertyShowingBlocked( false );
delete l;
}
}
tqApp->processEvents();
}
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
- sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget
- selectWidget( TQT_TQOBJECT(w), FALSE );
+ sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget
+ selectWidget( w, false );
break;
}
raiseChildSelections( w ); // raise selections and select widget
- selectWidget( TQT_TQOBJECT(w) );
+ selectWidget( 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();
- if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving
- widgetPressed = TRUE;
+ if ( e->button() == TQt::LeftButton ) { // left button: store original geometry 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;
+ checkedSelectionsForMove = false;
moving.clear();
- if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) {
+ if ( w->parentWidget() && !isMainContainer( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) {
targetContainer = w->parentWidget();
hadOwnPalette = w->parentWidget()->ownPalette();
restorePalette = w->parentWidget()->palette();
}
}
} else { // press was on the formwindow
- if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties
- drawRubber = TRUE;
+ if ( e->button() == TQt::LeftButton ) { // left button: start rubber selection and show formwindow properties
+ drawRubber = true;
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
- clearSelection( FALSE );
+ clearSelection( false );
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
@@ -652,14 +652,14 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
break;
case CONNECT_TOOL:
case BUDDY_TOOL:
- if ( e->button() != Qt::LeftButton )
+ if ( e->button() != TQt::LeftButton )
break;
- validForBuddy = FALSE;
+ validForBuddy = false;
if ( currTool == BUDDY_TOOL ) {
- if ( !::tqqt_cast<TQLabel*>(w) )
+ if ( !::tqt_cast<TQLabel*>(w) )
break;
- clearSelection( FALSE );
- validForBuddy = TRUE;
+ clearSelection( false );
+ validForBuddy = true;
mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) );
} else {
mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) );
@@ -667,13 +667,13 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
saveBackground();
startPos = mapFromGlobal( e->globalPos() );
currentPos = startPos;
- startWidget = designerWidget( TQT_TQOBJECT(w) );
+ startWidget = designerWidget( w );
endWidget = startWidget;
- beginUnclippedPainter( FALSE );
+ beginUnclippedPainter( false );
drawConnectionLine();
break;
case ORDER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget
+ if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.removeRef( w );
orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@@ -686,19 +686,19 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
- commandHistory()->addCommand( cmd, TRUE );
+ commandHistory()->addCommand( cmd, true );
updateOrderIndicators();
}
break;
default: // any insert widget tool
- if ( e->button() == Qt::LeftButton ) {
+ if ( e->button() == TQt::LeftButton ) {
insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent
+ if ( !isMainContainer( w ) ) { // press was not on formwindow, check if we can find another parent
TQWidget *wid = w;
for (;;) {
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( wid ) );
if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) &&
- !::tqqt_cast<TQLayoutWidget*>(wid) && !::tqqt_cast<TQSplitter*>(wid) ) {
+ !::tqt_cast<TQLayoutWidget*>(wid) && !::tqt_cast<TQSplitter*>(wid) ) {
insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it
break;
} else {
@@ -719,7 +719,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
CHECK_MAINWINDOW;
switch ( currTool ) {
case ORDER_TOOL:
- if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget
+ if ( !isMainContainer( w ) ) { // press on a child widget
orderedWidgets.clear();
orderedWidgets.append( w );
for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) {
@@ -732,12 +732,12 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
TQWidgetList oldl = MetaDataBase::tabOrder( this );
TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets );
cmd->execute();
- commandHistory()->addCommand( cmd, TRUE );
+ commandHistory()->addCommand( cmd, true );
updateOrderIndicators();
}
default:
- if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) &&
- ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) )
+ if ( !WidgetFactory::isPassiveInteractor( w ) &&
+ ( isMainContainer( w ) || w == this ) )
mainWindow()->editSource();
break;
}
@@ -746,7 +746,7 @@ void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w )
void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
- if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton )
+ if ( ( e->state() & TQt::LeftButton ) != TQt::LeftButton )
return;
TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid;
@@ -799,10 +799,10 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move
if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected...
- if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time
- setPropertyShowingBlocked( TRUE );
- selectWidget( TQT_TQOBJECT(w) );
- setPropertyShowingBlocked( FALSE );
+ if ( !isWidgetSelected( w ) ) { // and unselect others. Only siblings can be moved at the same time
+ setPropertyShowingBlocked( true );
+ selectWidget( w );
+ setPropertyShowingBlocked( false );
}
checkSelectionsForMove( w );
}
@@ -810,7 +810,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
// check whether we would have to reparent the selection and highlight the possible new parent container
TQMapConstIterator<TQWidget*, TQPoint> it = moving.begin();
TQWidget* wa = containerAt( e->globalPos(), it.key() );
- if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) {
+ if ( wa && !isMainContainer( wa ) && !isCentralWidget( wa ) ) {
wa = WidgetFactory::containerOfWidget( wa );
// ok, looks like we moved onto a container
@@ -845,7 +845,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
sizePreviewLabel->raise();
sizePreviewLabel->show();
#if defined(TQ_WS_WIN32)
- windowsRepaintWorkaroundTimer->start( 100, TRUE );
+ windowsRepaintWorkaroundTimer->start( 100, true );
#endif
} else { // if we don't need to move, do some indication
TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() );
@@ -860,16 +860,16 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
break;
case CONNECT_TOOL:
restoreConnectionLine();
- wid = tqApp->widgetAt( e->globalPos(), TRUE );
+ wid = tqApp->widgetAt( e->globalPos(), true );
if ( wid )
- wid = designerWidget( TQT_TQOBJECT(wid) );
- if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
+ wid = designerWidget( wid );
+ if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
newendWidget = wid;
- if ( ::tqqt_cast<TQLayoutWidget*>(newendWidget) || ::tqqt_cast<Spacer*>(newendWidget) )
+ if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget;
if ( newendWidget &&
- ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
+ ( isMainContainer( newendWidget ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget;
mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ).
arg( endWidget->name() ) );
@@ -884,19 +884,19 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
if ( !validForBuddy )
break;
restoreConnectionLine();
- wid = tqApp->widgetAt( e->globalPos(), TRUE );
+ wid = tqApp->widgetAt( e->globalPos(), true );
if ( wid )
- wid = designerWidget( TQT_TQOBJECT(wid) );
+ wid = designerWidget( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
newendWidget = wid;
else
newendWidget = 0;
- if ( ::tqqt_cast<TQLayoutWidget*>(newendWidget) || ::tqqt_cast<Spacer*>(newendWidget) )
+ if ( ::tqt_cast<TQLayoutWidget*>(newendWidget) || ::tqt_cast<Spacer*>(newendWidget) )
newendWidget = (TQWidget*)endWidget;
drawRecRect = newendWidget != endWidget;
if ( !newendWidget )
endWidget = newendWidget;
- else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) )
+ else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( newendWidget ) )
endWidget = newendWidget;
if ( endWidget )
mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ).
@@ -922,7 +922,7 @@ void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w )
void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
{
CHECK_MAINWINDOW;
- if ( e->button() != Qt::LeftButton )
+ if ( e->button() != TQt::LeftButton )
return;
switch ( currTool ) {
@@ -974,28 +974,28 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
}
// doesn't need to be a command, the MoveCommand does reparenting too
- bool emitSelChanged = FALSE;
+ bool emitSelChanged = false;
for ( TQMap<TQWidget*, TQPoint>::Iterator it = moving.begin(); it != moving.end(); ++it ) {
TQWidget *i = it.key();
- if ( !emitSelChanged && ::tqqt_cast<TQButton*>(i) ) {
- if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqqt_cast<TQButtonGroup*>(wa) )
- emitSelChanged = TRUE;
- if ( !::tqqt_cast<TQButtonGroup*>(wa) ) {
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE );
- if ( ::tqqt_cast<TQButtonGroup*>(i->parentWidget()) )
+ if ( !emitSelChanged && ::tqt_cast<TQButton*>(i) ) {
+ if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
+ emitSelChanged = true;
+ if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
+ MetaDataBase::setPropertyChanged( i, "buttonGroupId", false );
+ if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) )
( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i );
}
}
TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) );
- i->reparent( wa, pos, TRUE );
+ i->reparent( wa, pos, true );
raiseSelection( i );
raiseChildSelections( i );
- widgetChanged( TQT_TQOBJECT(i) );
+ widgetChanged( i );
mainWindow()->objectHierarchy()->widgetRemoved( i );
mainWindow()->objectHierarchy()->widgetInserted( i );
}
if ( emitSelChanged ) {
- emit showProperties( TQT_TQOBJECT(wa) );
+ emit showProperties( wa );
emit showProperties( propertyWidget );
}
newParent = wa;
@@ -1015,9 +1015,9 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
oldPos, newPos, oldParent, newParent ) );
} else if ( drawRubber ) { // we were drawing a rubber selection
endRectDraw(); // get rid of the rectangle
- blockSignals( TRUE );
+ blockSignals( true );
selectWidgets(); // select widgets which intersect the rect
- blockSignals( FALSE );
+ blockSignals( false );
emitSelectionChanged(); // inform about selection changes
if ( propertyWidget )
emitShowProperties( propertyWidget );
@@ -1045,13 +1045,13 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
if ( oldBuddy.isNull() )
oldBuddy = "";
SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ),
- this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(),
+ this, startWidget, mainWindow()->propertyeditor(),
"buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(),
oldBuddy );
- commandHistory()->addCommand( cmd, TRUE );
+ commandHistory()->addCommand( cmd, true );
cmd->execute();
- emitUpdateProperties( TQT_TQOBJECT(startWidget) );
+ emitUpdateProperties( startWidget );
}
}
if ( !toolFixed )
@@ -1085,8 +1085,8 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
}
break;
}
- widgetPressed = FALSE;
- drawRubber = FALSE;
+ widgetPressed = false;
+ drawRubber = false;
insertParent = 0;
delete buffer;
buffer = 0;
@@ -1104,7 +1104,7 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
e->key() == Key_Down ) &&
propertyWidget->isWidgetType() )
checkSelectionsForMove( (TQWidget*)propertyWidget );
- checkSelectionsTimer->start( 1000, TRUE );
+ checkSelectionsTimer->start( 1000, true );
if ( e->key() == Key_Left || e->key() == Key_Right ||
e->key() == Key_Up || e->key() == Key_Down ) {
TQWidgetList widgets;
@@ -1155,15 +1155,15 @@ void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w )
if ( !widgets.isEmpty() ) {
MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this,
widgets, oldPos, newPos, 0, 0 );
- commandHistory()->addCommand( cmd, TRUE );
+ commandHistory()->addCommand( cmd, true );
cmd->execute();
}
}
if ( !e->isAccepted() ) {
- TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = queryList( "TQWidget" );
if ( !l )
return;
- if ( l->find( TQT_TQOBJECT(w) ) != -1 )
+ if ( l->find( w ) != -1 )
e->accept();
delete l;
}
@@ -1185,30 +1185,30 @@ void FormWindow::selectWidget( TQObject *o, bool select )
TQWidget *w = (TQWidget*)o;
- if ( isMainContainer( TQT_TQOBJECT(w) ) ) {
+ if ( isMainContainer( w ) ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
return;
}
- if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
+ if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
return;
}
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
return;
if ( select ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(w);
+ propertyWidget = w;
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
@@ -1238,9 +1238,9 @@ void FormWindow::selectWidget( TQObject *o, bool select )
s->setWidget( 0 );
TQObject *opw = propertyWidget;
if ( !usedSelections.isEmpty() )
- propertyWidget = TQT_TQOBJECT(TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget());
+ propertyWidget = TQPtrDictIterator<WidgetSelection>( usedSelections ).current()->widget();
else
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
if ( !isPropertyShowingBlocked() )
@@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) )
- selectWidget( TQT_TQOBJECT(w), FALSE );
+ selectWidget( w, false );
else if ( s )
s->updateGeometry();
}
@@ -1283,12 +1283,12 @@ void FormWindow::clearSelection( bool changePropertyDisplay )
{
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it )
- it.current()->setWidget( 0, FALSE );
+ it.current()->setWidget( 0, false );
usedSelections.clear();
if ( changePropertyDisplay ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
emitShowProperties( propertyWidget );
@@ -1300,8 +1300,8 @@ void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidge
{
TQPoint pos( p );
pos = mapFromGlobal( global );
- oldRectValid = FALSE;
- beginUnclippedPainter( TRUE );
+ oldRectValid = false;
+ beginUnclippedPainter( true );
if ( t == Rubber )
unclippedPainter->setPen( TQPen( color0, 1 ) );
if ( t == Insert )
@@ -1335,7 +1335,7 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
if ( oldRectValid )
unclippedPainter->drawRect( currRect );
if ( r.width() > 1 || r.height() > 1 ) {
- oldRectValid = TRUE;
+ oldRectValid = true;
currRect = r;
if ( t == Insert ) {
TQString t = i18n( "%1/%2" );
@@ -1344,9 +1344,9 @@ void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWi
}
unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) );
unclippedPainter->drawRect( currRect );
- unclippedPainter->setClipping( FALSE );
+ unclippedPainter->setClipping( false );
} else {
- oldRectValid = FALSE;
+ oldRectValid = false;
if ( t == Insert )
drawSizePreview( pos, i18n("Use Size Hint") );
}
@@ -1365,7 +1365,7 @@ void FormWindow::endRectDraw()
void FormWindow::selectWidgets()
{
- TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
@@ -1374,7 +1374,7 @@ void FormWindow::selectWidgets()
p = mapFromGlobal( p );
TQRect r( p, ( (TQWidget*)o )->size() );
if ( r.intersects( currRect ) && !r.contains( currRect ) )
- selectWidget( TQT_TQOBJECT(o) );
+ selectWidget( o );
}
}
delete l;
@@ -1386,7 +1386,7 @@ bool FormWindow::isWidgetSelected( TQObject *w )
{
if ( w->isWidgetType() )
return usedSelections.find( (TQWidget*)w ) != 0;
- return FALSE; // #### do stuff for TQObjects
+ return false; // #### do stuff for TQObjects
}
void FormWindow::moveSelectedWidgets( int dx, int dy )
@@ -1420,7 +1420,7 @@ void FormWindow::redo()
void FormWindow::raiseChildSelections( TQWidget *w )
{
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1428,7 +1428,7 @@ void FormWindow::raiseChildSelections( TQWidget *w )
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
- if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 )
+ if ( l->findRef( it.current()->widget() ) != -1 )
it.current()->show();
}
delete l;
@@ -1436,7 +1436,7 @@ void FormWindow::raiseChildSelections( TQWidget *w )
void FormWindow::updateChildSelections( TQWidget *w )
{
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o->isWidgetType() &&
@@ -1449,9 +1449,9 @@ void FormWindow::updateChildSelections( TQWidget *w )
void FormWindow::checkSelectionsForMove( TQWidget *w )
{
- checkedSelectionsForMove = TRUE;
+ checkedSelectionsForMove = true;
- TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE );
+ TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, false, false );
moving.clear();
if ( l ) {
TQPtrDictIterator<WidgetSelection> it( usedSelections );
@@ -1460,7 +1460,7 @@ void FormWindow::checkSelectionsForMove( TQWidget *w )
if ( it.current()->widget() == mainContainer() )
continue;
++it;
- if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) {
+ if ( l->find( sel->widget() ) == -1 ) {
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
sel->setWidget( 0 );
} else {
@@ -1483,7 +1483,7 @@ void FormWindow::deleteWidgets()
TQPtrDictIterator<WidgetSelection> it( usedSelections );
for ( ; it.current(); ++it ) {
TQWidget *tb = 0;
- if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) )
+ if ( !( tb = mainWindow()->isAToolBarChild( it.current()->widget() ) ) )
widgets.append( it.current()->widget() );
else
( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() );
@@ -1564,12 +1564,12 @@ TQLabel *FormWindow::sizePreview() const
void FormWindow::invalidCheckedSelections()
{
- checkedSelectionsForMove = FALSE;
+ checkedSelectionsForMove = false;
}
void FormWindow::checkPreviewGeometry( TQRect &r )
{
- if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) {
+ if ( !rect().contains( r ) ) {
if ( r.left() < rect().left() )
r.moveTopLeft( TQPoint( 0, r.top() ) );
if ( r.right() > rect().right() )
@@ -1591,7 +1591,7 @@ void FormWindow::focusOutEvent( TQFocusEvent * )
{
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mainContainer());
+ propertyWidget = mainContainer();
if ( opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
@@ -1603,17 +1603,17 @@ void FormWindow::resizeEvent( TQResizeEvent *e )
if ( currTool == ORDER_TOOL )
repositionOrderIndicators();
if ( isVisible() )
- formFile()->setModified( TRUE, FormFile::WFormWindow );
+ formFile()->setModified( true, FormFile::WFormWindow );
#if defined(TQ_WS_WIN32)
- windowsRepaintWorkaroundTimer->start( 100, TRUE );
+ windowsRepaintWorkaroundTimer->start( 100, true );
#endif
}
void FormWindow::windowsRepaintWorkaroundTimerTimeout()
{
#if defined(TQ_WS_WIN32)
- TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = queryList( "TQWidget" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
flickerfree_update( (TQWidget*)o );
}
@@ -1632,7 +1632,7 @@ TQWidget *FormWindow::designerWidget( TQObject *o ) const
if ( !o || !o->isWidgetType() )
return 0;
TQWidget *w = (TQWidget*)o;
- while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) )
+ while ( w && !isMainContainer( w ) && !insertedWidgets[ (void*)w ] || isCentralWidget( w ) )
w = (TQWidget*)w->parent();
return w;
}
@@ -1646,7 +1646,7 @@ void FormWindow::emitShowProperties( TQObject *w )
repaintSelection( (TQWidget*)opw );
}
showPropertiesTimer->stop();
-// showPropertiesTimer->start( 0, TRUE );
+// showPropertiesTimer->start( 0, true );
showPropertiesTimerDone();
}
@@ -1654,14 +1654,14 @@ void FormWindow::emitUpdateProperties( TQObject *w )
{
if ( w == propertyWidget ) {
updatePropertiesTimer->stop();
- updatePropertiesTimer->start( 0, TRUE );
+ updatePropertiesTimer->start( 0, true );
}
}
void FormWindow::emitSelectionChanged()
{
selectionChangedTimer->stop();
- selectionChangedTimer->start( 0, TRUE );
+ selectionChangedTimer->start( 0, true );
}
void FormWindow::updatePropertiesTimerDone()
@@ -1686,7 +1686,7 @@ void FormWindow::selectionChangedTimerDone()
void FormWindow::currentToolChanged()
{
CHECK_MAINWINDOW;
- toolFixed = FALSE;
+ toolFixed = false;
int t = mainwindow->currentTool();
if ( currTool == t && t != ORDER_TOOL )
return;
@@ -1718,8 +1718,8 @@ void FormWindow::currentToolChanged()
}
startWidget = endWidget = 0;
- widgetPressed = FALSE;
- drawRubber = FALSE;
+ widgetPressed = false;
+ drawRubber = false;
insertParent = 0;
delete buffer;
buffer = 0;
@@ -1727,7 +1727,7 @@ void FormWindow::currentToolChanged()
currTool = t;
if ( hasFocus() )
- clearSelection( FALSE );
+ clearSelection( false );
mainWindow()->statusBar()->clear();
@@ -1735,7 +1735,7 @@ void FormWindow::currentToolChanged()
switch ( currTool ) {
case POINTER_TOOL:
if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
restoreCursors( this, this );
break;
case ORDER_TOOL:
@@ -1744,7 +1744,7 @@ void FormWindow::currentToolChanged()
orderedWidgets.clear();
showOrderIndicators();
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
setCursorToAll( ArrowCursor, this );
}
break;
@@ -1756,13 +1756,13 @@ void FormWindow::currentToolChanged()
mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") );
setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
break;
default:
mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) );
setCursorToAll( CrossCursor, this );
if ( mainWindow()->formWindow() == this )
- emitShowProperties( TQT_TQOBJECT(mainContainer()) );
+ emitShowProperties( mainContainer() );
break;
}
}
@@ -1770,8 +1770,8 @@ void FormWindow::currentToolChanged()
void FormWindow::showOrderIndicators()
{
hideOrderIndicators();
- orderIndicators.setAutoDelete( TRUE );
- TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ orderIndicators.setAutoDelete( true );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
stackedWidgets = MetaDataBase::tabOrder( this );
if ( l ) {
int order = 1;
@@ -1779,7 +1779,7 @@ void FormWindow::showOrderIndicators()
TQWidget* w = (TQWidget*) o;
if ( w->isShown() &&
insertedWidgets[ (void*)w ] &&
- w->focusPolicy() != TQ_NoFocus ) {
+ w->focusPolicy() != TQWidget::NoFocus ) {
OrderIndicator* ind = new OrderIndicator( order++, w, this );
orderIndicators.append( ind );
if ( stackedWidgets.findRef( w ) == -1 )
@@ -1824,7 +1824,7 @@ bool FormWindow::checkCustomWidgets()
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
- TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) );
+ TQString className = WidgetFactory::classNameOf( it.current() );
if ( !MetaDataBase::hasCustomWidget( className ) )
missingCustomWidgets << className;
}
@@ -1839,9 +1839,9 @@ bool FormWindow::checkCustomWidgets()
"the generated code will not compile.\n"
"Do you want to save this form now?" );
if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 )
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void FormWindow::setPropertyShowingBlocked( bool b )
@@ -1903,45 +1903,45 @@ void FormWindow::checkAccels()
{
CHECK_MAINWINDOW;
TQMap<TQChar, TQWidgetList > accels;
- TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
TQWidget *w = (TQWidget*)o;
const TQMetaProperty* text =
- w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
+ w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
const TQMetaProperty* title =
- w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
+ w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
const TQMetaProperty* pageTitle =
- w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
+ w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true );
if ( text )
find_accel( w->property( "text" ).toString(), accels, w );
if ( title )
find_accel( w->property( "title" ).toString(), accels, w );
if ( pageTitle )
find_accel( w->property( "pageTitle" ).toString(), accels, w );
- } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) {
+ } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
((MenuBarEditor *)o)->checkAccels( accels );
}
}
delete l;
}
- bool ok = TRUE;
+ bool ok = true;
TQWidget *wid;
for ( TQMap<TQChar, TQWidgetList >::Iterator it = accels.begin(); it != accels.end(); ++it ) {
if ( (*it).count() > 1 ) {
- ok = FALSE;
+ ok = false;
switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ),
i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count()
).arg( it.key().upper() ),
i18n( "&Select" ),
i18n( "&Cancel" ), TQString(), 2 ) ) {
case 0: // select
- clearSelection( FALSE );
+ clearSelection( false );
for ( wid = (*it).first(); wid; wid = (*it).next() )
- selectWidget( TQT_TQOBJECT(wid), TRUE );
+ selectWidget( wid, true );
return;
case 1: // cancel
return;
@@ -1976,20 +1976,20 @@ void FormWindow::paste( const TQString &cb, TQWidget *parent )
void FormWindow::selectAll()
{
- checkedSelectionsForMove = FALSE;
- blockSignals( TRUE );
- TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ checkedSelectionsForMove = false;
+ blockSignals( true );
+ TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( ( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets[ (void*)o ] ) {
- selectWidget( TQT_TQOBJECT(o) );
+ selectWidget( o );
}
}
delete l;
}
- blockSignals( FALSE );
+ blockSignals( false );
emitSelectionChanged();
if ( propertyWidget )
emitShowProperties( propertyWidget );
@@ -2001,7 +2001,7 @@ void FormWindow::layoutHorizontal()
TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Horizontally" ),
this, mainContainer(), 0, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2011,7 +2011,7 @@ void FormWindow::layoutVertical()
TQWidgetList widgets( selectedWidgets() );
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Vertically" ),
this, mainContainer(), 0, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2021,7 +2021,7 @@ void FormWindow::layoutHorizontalSplit()
TQWidgetList widgets( selectedWidgets() );
LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay Out Horizontally (in splitter)" ),
this, mainContainer(), 0, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2031,7 +2031,7 @@ void FormWindow::layoutVerticalSplit()
TQWidgetList widgets( selectedWidgets() );
LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay Out Vertically (in splitter)" ),
this, mainContainer(), 0, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2044,7 +2044,7 @@ void FormWindow::layoutGrid()
TQWidgetList widgets( selectedWidgets() );
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ),
this, mainContainer(), 0, widgets, xres, yres );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2065,7 +2065,7 @@ void FormWindow::layoutHorizontalContainer( TQWidget *w )
}
LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out Children Horizontally" ),
this, mainContainer(), w, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2086,7 +2086,7 @@ void FormWindow::layoutVerticalContainer( TQWidget *w )
}
LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out Children Vertically" ),
this, mainContainer(), w, widgets );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2110,7 +2110,7 @@ void FormWindow::layoutGridContainer( TQWidget *w )
}
LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ),
this, mainContainer(), w, widgets, xres, yres );
- clearSelection( FALSE );
+ clearSelection( false );
commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -2126,11 +2126,11 @@ void FormWindow::breakLayout( TQWidget *w )
if ( !w || w == this )
break;
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout &&
- WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
Command *cmd = breakLayoutCommand( w );
if ( cmd )
commands.insert( 0, cmd );
- if ( !::tqqt_cast<TQLayoutWidget*>(w) && !::tqqt_cast<TQSplitter*>(w) )
+ if ( !::tqt_cast<TQLayoutWidget*>(w) && !::tqt_cast<TQSplitter*>(w) )
break;
}
w = w->parentWidget();
@@ -2139,7 +2139,7 @@ void FormWindow::breakLayout( TQWidget *w )
if ( commands.isEmpty() )
return;
- clearSelection( FALSE );
+ clearSelection( false );
MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands );
commandHistory()->addCommand( cmd );
cmd->execute();
@@ -2155,7 +2155,7 @@ BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w )
TQWidgetList widgets;
for ( TQObject *o = l.first(); o; o = l.next() ) {
if ( o->isWidgetType() &&
- !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) &&
+ !mainWindow()->isAToolBarChild( o ) &&
( (TQWidget*)o )->isVisibleTo( this ) &&
insertedWidgets.find( (TQWidget*)o ) )
widgets.append( (TQWidget*)o );
@@ -2177,14 +2177,14 @@ int FormWindow::numVisibleWidgets() const
bool FormWindow::hasInsertedChildren( TQWidget *w ) const
{
if ( !w )
- return FALSE;
+ return false;
w = WidgetFactory::containerOfWidget( w );
if ( !w )
- return FALSE;
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ return false;
+ TQObjectList *l = w->queryList( "TQWidget" );
if ( !l || !l->first() ) {
delete l;
- return FALSE;
+ return false;
}
for ( TQObject *o = l->first(); o; o = l->next() ) {
@@ -2192,23 +2192,23 @@ bool FormWindow::hasInsertedChildren( TQWidget *w ) const
( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) &&
insertedWidgets.find( (TQWidget*)o ) ) {
delete l;
- return TRUE;
+ return true;
}
}
delete l;
- return FALSE;
+ return false;
}
bool FormWindow::allowMove( TQWidget *w )
{
w = w->parentWidget();
while ( w ) {
- if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
- return TRUE;
+ if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
+ return true;
w = w->parentWidget();
}
- return FALSE;
+ return false;
}
@@ -2221,8 +2221,8 @@ void FormWindow::editConnections()
ConnectionDialog dlg( mainwindow );
mainWindow()->statusMessage( i18n( "Edit connections...") );
- dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() );
- TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) );
+ dlg.addConnection( startWidget, endWidget, TQString(), TQString() );
+ TQTimer::singleShot( 0, &dlg, TQ_SLOT(ensureConnectionVisible()) );
dlg.exec();
}
@@ -2361,9 +2361,9 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
int num = 1;
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current();) {
- if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) &&
+ if ( it.current() != w &&
qstrcmp( it.current()->name(), s.latin1() ) == 0 ) {
- found = TRUE;
+ found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@@ -2376,7 +2376,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
TQPtrList<TQAction> al;
TQAction *a = 0;
for ( a = actions.first(); a; a = actions.next() ) {
- TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING );
+ TQObjectList *l = a->queryList( "TQAction" );
al.append( a );
for ( TQObject *ao = l->first(); ao; ao = l->next() )
al.append( (TQAction*)ao );
@@ -2385,7 +2385,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
for ( a = al.first(); a; a = al.next() ) {
if ( a != w &&
qstrcmp( a->name(), s.latin1() ) == 0 ) {
- found = TRUE;
+ found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@@ -2393,12 +2393,12 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
}
}
- if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) && !found ) {
+ if ( ::tqt_cast<TQMainWindow*>(mainContainer()) && !found ) {
TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp ( o->name(), s.latin1() ) == 0 ) {
- found = TRUE;
+ found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@@ -2407,13 +2407,13 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
delete l;
}
- if ( ::tqqt_cast<TQMainWindow*>(mainContainer()) ) {
+ if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) {
if ( !found ) {
- TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE );
+ TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 0, true );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( o != w &&
qstrcmp( o->name(), s.latin1() ) == 0 ) {
- found = TRUE;
+ found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@@ -2426,8 +2426,8 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
if ( !found )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
@@ -2435,45 +2435,45 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
- if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 )
- return TRUE;
+ if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
+ return true;
}
}
- return FALSE;
+ return false;
}
bool FormWindow::isDatabaseWidgetUsed() const
{
#ifndef TQT_NO_SQL
TQStringList dbClasses;
- dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here
+ dbClasses << "TQDataTable"; // add more here
TQPtrDictIterator<TQWidget> it( insertedWidgets );
for ( ; it.current(); ++it ) {
TQString c( it.current()->className() );
if ( dbClasses.contains( c ) > 0 ) {
- return TRUE;
+ return true;
}
}
#endif
- return FALSE;
+ return false;
}
bool FormWindow::isDatabaseAware() const
{
#ifndef TQT_NO_SQL
if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" )
- return TRUE;
+ return true;
return isDatabaseWidgetUsed();
#else
- return FALSE;
+ return false;
#endif
}
void FormWindow::visibilityChanged()
{
if ( currTool != ORDER_TOOL ) {
- emitUpdateProperties( TQT_TQOBJECT(currentWidget()) );
+ emitUpdateProperties( currentWidget() );
} else {
updateOrderIndicators();
repositionOrderIndicators();
@@ -2491,7 +2491,7 @@ TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const
{
TQPoint p = pos;
const TQWidget* i = w;
- while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast<TQWidget*>(i)) ) ) {
+ while ( i && !i->isTopLevel() && !isMainContainer( const_cast<TQWidget*>(i) ) ) {
p = i->mapToParent( p );
i = i->parentWidget();
}
@@ -2513,10 +2513,10 @@ static bool isChildOf( TQWidget *c, TQWidget *p )
{
while ( c && !c->isTopLevel() ) {
if ( c == p )
- return TRUE;
+ return true;
c = c->parentWidget();
}
- return FALSE;
+ return false;
}
TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
@@ -2525,27 +2525,27 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
TQWidget *container = 0;
int depth = -1;
TQWidgetList selected = selectedWidgets();
- if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) {
+ if ( rect().contains( mapFromGlobal( pos ) ) ) {
container = mainContainer();
depth = widgetDepth( container );
}
for ( ; it.current(); ++it ) {
- if ( ::tqqt_cast<TQLayoutWidget*>(it.current())
- || ::tqqt_cast<TQSplitter*>(it.current()) )
+ if ( ::tqt_cast<TQLayoutWidget*>(it.current())
+ || ::tqt_cast<TQSplitter*>(it.current()) )
continue;
if ( !it.current()->isVisibleTo( this ) )
continue;
if ( selected.find( it.current() ) != -1 )
continue;
- if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) &&
+ if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( 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 ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) )
+ if ( !w->rect().contains( ( w->mapFromGlobal( pos ) ) ) )
break;
w = w->parentWidget();
}
@@ -2553,8 +2553,8 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
int wd = widgetDepth( it.current() );
if ( wd == depth && container ) {
- if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) >
- ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) )
+ if ( ( it.current()->parentWidget()->childrenListObject() ).find( it.current() ) >
+ ( container->parentWidget()->childrenListObject() ).find( container ) )
wd++;
}
if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) {
@@ -2568,7 +2568,7 @@ TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf )
bool FormWindow::isMainContainer( TQObject *w ) const
{
- return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() );
+ return w && w->isWidgetType() && ( w == this || w == mainContainer() );
}
void FormWindow::setMainContainer( TQWidget *w )
@@ -2576,7 +2576,7 @@ void FormWindow::setMainContainer( TQWidget *w )
bool resetPropertyWidget = isMainContainer( propertyWidget );
if ( mContainer )
insertedWidgets.remove( mContainer );
- if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) )
+ if ( propertyWidget == mContainer )
propertyWidget = 0;
delete mContainer;
mContainer = w;
@@ -2586,24 +2586,24 @@ void FormWindow::setMainContainer( TQWidget *w )
l->addWidget( w );
if ( resetPropertyWidget ) {
TQObject *opw = propertyWidget;
- propertyWidget = TQT_TQOBJECT(mContainer);
+ propertyWidget = mContainer;
if ( opw && opw->isWidgetType() )
repaintSelection( (TQWidget*)opw );
}
if ( project() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() );
if ( iface && !project()->isCpp() && !isFake() ) {
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function",
+ if ( !MetaDataBase::hasFunction( this, "init()" ) )
+ MetaDataBase::addFunction( this, "init()", "", "private", "function",
project()->language(), "void" );
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function",
+ if ( !MetaDataBase::hasFunction( this, "destroy()" ) )
+ MetaDataBase::addFunction( this, "destroy()", "", "private", "function",
project()->language(), "void" );
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) )
- MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" );
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) )
- MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()",
- TQT_TQOBJECT(mainContainer()), "destroy" );
+ if ( !MetaDataBase::hasConnection( this, mainContainer(), "shown()", mainContainer(), "init" ) )
+ MetaDataBase::addConnection( this, mainContainer(), "shown()", mainContainer(), "init" );
+ if ( !MetaDataBase::hasConnection( this, mainContainer(), "destroyed()", mainContainer(), "destroy" ) )
+ MetaDataBase::addConnection( this, mainContainer(), "destroyed()",
+ mainContainer(), "destroy" );
}
}
}
@@ -2627,14 +2627,14 @@ void FormWindow::setSavePixmapInline( bool b )
{
pixInline = b;
if ( b )
- pixProject = FALSE;
+ pixProject = false;
}
void FormWindow::setSavePixmapInProject( bool b )
{
pixProject = b;
if ( b )
- pixInline = FALSE;
+ pixInline = false;
}
void FormWindow::setPixmapLoaderFunction( const TQString &func )
@@ -2663,7 +2663,7 @@ TQAction *FormWindow::findAction( const TQString &name )
for ( TQAction *a = actionList().first(); a; a = actionList().next() ) {
if ( TQString( a->name() ) == name )
return a;
- TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING );
+ TQAction *ac = (TQAction*)a->child( name.latin1(), "TQAction" );
if ( ac )
return ac;
}
@@ -2672,11 +2672,11 @@ TQAction *FormWindow::findAction( const TQString &name )
void FormWindow::killAccels( TQObject *top )
{
- TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING );
+ TQObjectList *l = top->queryList( "TQAccel" );
if ( !l )
return;
for ( TQObject *o = l->first(); o; o = l->next() )
- ( (TQAccel*)o )->setEnabled( FALSE );
+ ( (TQAccel*)o )->setEnabled( false );
delete l;
}
@@ -2689,9 +2689,9 @@ DesignerFormWindow *FormWindow::iFace()
bool FormWindow::isCentralWidget( TQObject *w ) const
{
- if ( !::tqqt_cast<TQMainWindow*>(mainContainer()) )
- return FALSE;
- return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget());
+ if ( !::tqt_cast<TQMainWindow*>(mainContainer()) )
+ return false;
+ return w == ((TQMainWindow*)mainContainer())->centralWidget();
}
int FormWindow::layoutDefaultSpacing() const
@@ -2753,12 +2753,12 @@ void FormWindow::setFormFile( FormFile *f )
{
ff = f;
if ( ff )
- connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) );
+ connect( this, TQ_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQ_SLOT( formWindowChangedSomehow() ) );
}
bool FormWindow::canBeBuddy( const TQWidget *w ) const
{
- return w->focusPolicy() != TQ_NoFocus;
+ return w->focusPolicy() != TQWidget::NoFocus;
}
bool FormWindow::event( TQEvent *e )
diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h
index d4295e7e..52546f79 100644
--- a/kdevdesigner/designer/formwindow.h
+++ b/kdevdesigner/designer/formwindow.h
@@ -64,7 +64,7 @@ class OrderIndicator;
class FormWindow : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( TQString fileName READ fileName WRITE setFileName )
@@ -104,12 +104,12 @@ public:
virtual void breakLayout( TQWidget *w );
- virtual void selectWidget( TQObject *w, bool select = TRUE );
+ virtual void selectWidget( TQObject *w, bool select = true );
virtual void selectAll();
virtual void updateSelection( TQWidget *w );
virtual void raiseSelection( TQWidget *w );
virtual void repaintSelection( TQWidget *w );
- virtual void clearSelection( bool changePropertyDisplay = TRUE );
+ virtual void clearSelection( bool changePropertyDisplay = true );
virtual void selectWidgets();
bool isWidgetSelected( TQObject *w );
virtual void updateChildSelections( TQWidget *w );
@@ -143,7 +143,7 @@ public:
virtual MainWindow *mainWindow() const { return mainwindow; }
bool checkCustomWidgets();
- virtual void insertWidget( TQWidget *w, bool checkName = FALSE );
+ virtual void insertWidget( TQWidget *w, bool checkName = false );
virtual void removeWidget( TQWidget *w );
virtual void deleteWidgets();
virtual void editAdjustSize();
@@ -178,7 +178,7 @@ public:
bool savePixmapInProject() const;
void setSavePixmapInProject( bool b );
- void setToolFixed() { toolFixed = TRUE; }
+ void setToolFixed() { toolFixed = true; }
void setActiveObject( TQObject *o );
diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp
index c6433cd0..781a62a3 100644
--- a/kdevdesigner/designer/hierarchyview.cpp
+++ b/kdevdesigner/designer/hierarchyview.cpp
@@ -90,14 +90,14 @@ void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( rtti() == Function &&
MainWindow::self->currProject()->isCpp() &&
( txt == "init()" || txt == "destroy()" ) ) {
- listView()->setUpdatesEnabled( FALSE );
+ listView()->setUpdatesEnabled( false );
if ( txt == "init()" )
setText( 0, txt + " " + "(Constructor)" );
else
setText( 0, txt + " " + "(Destructor)" );
TQListViewItem::paintCell( p, g, column, width, align );
setText( 0, txt );
- listView()->setUpdatesEnabled( TRUE );
+ listView()->setUpdatesEnabled( true );
} else {
TQListViewItem::paintCell( p, g, column, width, align );
}
@@ -183,8 +183,8 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
init_colors();
setDefaultRenameAction( Accept );
- header()->setMovingEnabled( FALSE );
- header()->setStretchEnabled( TRUE );
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
normalMenu = 0;
tabWidgetMenu = 0;
addColumn( i18n( "Name" ) );
@@ -193,46 +193,46 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) );
(void)*selectedBack; // hack
setPalette( p );
- disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
- this, TQT_SLOT( changeSortColumn( int ) ) );
+ disconnect( header(), TQ_SIGNAL( sectionClicked( int ) ),
+ this, TQ_SLOT( changeSortColumn( int ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
if ( doConnects ) {
- connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ),
- this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
- this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ),
- this, TQT_SLOT( objectClicked( TQListViewItem * ) ) );
- connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ),
- this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) );
+ connect( this, TQ_SIGNAL( clicked( TQListViewItem * ) ),
+ this, TQ_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQ_SLOT( objectDoubleClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( returnPressed( TQListViewItem * ) ),
+ this, TQ_SLOT( objectClicked( TQListViewItem * ) ) );
+ connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ),
+ this, TQ_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) );
}
- deselect = TRUE;
+ deselect = true;
setColumnWidthMode( 1, Manual );
}
void HierarchyList::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Shift || e->key() == Key_Control )
- deselect = FALSE;
+ deselect = false;
else
- deselect = TRUE;
+ deselect = true;
TQListView::keyPressEvent( e );
}
void HierarchyList::keyReleaseEvent( TQKeyEvent *e )
{
- deselect = TRUE;
+ deselect = true;
TQListView::keyReleaseEvent( e );
}
void HierarchyList::viewportMousePressEvent( TQMouseEvent *e )
{
if ( e->state() & ShiftButton || e->state() & ControlButton )
- deselect = FALSE;
+ deselect = false;
else
- deselect = TRUE;
+ deselect = true;
TQListView::viewportMousePressEvent( e );
}
@@ -249,45 +249,45 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
TQObject *o = findObject( i );
if ( !o )
return 0;
- if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) {
+ if ( formWindow == o ) {
if ( deselect )
- formWindow->clearSelection( FALSE );
- formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) );
+ formWindow->clearSelection( false );
+ formWindow->emitShowProperties( formWindow );
return 0;
}
if ( o->isWidgetType() ) {
TQWidget *w = (TQWidget*)o;
if ( !formWindow->widgets()->find( w ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(w->parent()) ) {
- if (::tqqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
+ if ( ::tqt_cast<TQWidgetStack*>(w->parent()) ) {
+ if (::tqt_cast<TQTabWidget*>(w->parent()->parent()) ) {
((TQTabWidget*)w->parent()->parent())->showPage( w );
- o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
- formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
- } else if ( ::tqqt_cast<TQWizard*>(w->parent()->parent()) ) {
+ o = (TQWidget*)w->parent()->parent();
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
+ } else if ( ::tqt_cast<TQWizard*>(w->parent()->parent()) ) {
((QDesignerWizard*)w->parent()->parent())->
setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) );
- o = TQT_TQOBJECT((TQWidget*)w->parent()->parent());
- formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) );
+ o = (TQWidget*)w->parent()->parent();
+ formWindow->emitUpdateProperties( formWindow->currentWidget() );
} else {
( (TQWidgetStack*)w->parent() )->raiseWidget( w );
if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) )
( (QDesignerWidgetStack*)w->parent() )->updateButtons();
}
- } else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQDockWindow*>(w) ) {
- formWindow->setActiveObject( TQT_TQOBJECT(w) );
- } else if ( ::tqqt_cast<TQPopupMenu*>(w) ) {
+ } else if ( ::tqt_cast<TQMenuBar*>(w) || ::tqt_cast<TQDockWindow*>(w) ) {
+ formWindow->setActiveObject( w );
+ } else if ( ::tqt_cast<TQPopupMenu*>(w) ) {
return 0; // ### we could try to find our menu bar and change the currentMenu to our index
} else {
return 0;
}
}
- } else if ( ::tqqt_cast<TQAction*>(o) ) {
+ } else if ( ::tqt_cast<TQAction*>(o) ) {
MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o );
- deselect = TRUE;
+ deselect = true;
}
if ( deselect )
- formWindow->clearSelection( FALSE );
+ formWindow->clearSelection( false );
return o;
}
@@ -303,7 +303,7 @@ void HierarchyList::objectDoubleClicked( TQListViewItem *i )
if ( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout )
w->raise();
- formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
+ formWindow->selectWidget( w, true );
}
}
@@ -314,7 +314,7 @@ void HierarchyList::objectClicked( TQListViewItem *i )
return;
if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) {
TQWidget *w = (TQWidget*)o;
- formWindow->selectWidget( TQT_TQOBJECT(w), TRUE );
+ formWindow->selectWidget( w, true );
}
}
@@ -388,7 +388,7 @@ void HierarchyList::setup()
if ( !widgetStacks )
widgetStacks = new TQPtrList<TQWidgetStack>;
if ( w )
- insertObject( TQT_TQOBJECT(w), 0 );
+ insertObject( w, 0 );
widgetStacks->clear();
}
@@ -401,17 +401,17 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
- bool fakeMainWindow = FALSE;
- if ( ::tqqt_cast<TQMainWindow*>(o) ) {
- TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ bool fakeMainWindow = false;
+ if ( ::tqt_cast<TQMainWindow*>(o) ) {
+ TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) {
o = cw;
- fakeMainWindow = TRUE;
+ fakeMainWindow = true;
}
}
TQListViewItem *item = 0;
TQString className = WidgetFactory::classNameOf( o );
- if ( ::tqqt_cast<TQLayoutWidget*>(o) ) {
+ if ( ::tqt_cast<TQLayoutWidget*>(o) ) {
switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) {
case WidgetFactory::HBox:
className = "HBox";
@@ -433,42 +433,42 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
#endif
TQString name = o->name();
- if ( ::tqqt_cast<TQWidgetStack*>(o->parent()) ) {
- if ( ::tqqt_cast<TQTabWidget*>(o->parent()->parent()) )
+ if ( ::tqt_cast<TQWidgetStack*>(o->parent()) ) {
+ if ( ::tqt_cast<TQTabWidget*>(o->parent()->parent()) )
name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o );
- else if ( ::tqqt_cast<TQWizard*>(o->parent()->parent()) )
+ else if ( ::tqt_cast<TQWizard*>(o->parent()->parent()) )
name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o );
}
TQToolBox *tb;
if ( o->parent() && o->parent()->parent() &&
- (tb = ::tqqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
+ (tb = ::tqt_cast<TQToolBox*>(o->parent()->parent()->parent())) )
name = tb->itemLabel( tb->indexOf((TQWidget*)o) );
if ( fakeMainWindow ) {
name = o->parent()->name();
- className = TQMAINWINDOW_OBJECT_NAME_STRING;
+ className = "TQMainWindow";
}
if ( !parent )
item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo );
else
item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo );
- item->setOpen( TRUE );
+ item->setOpen( true );
if ( !parent )
item->setPixmap( 0, DesignerFormPix );
- else if ( ::tqqt_cast<TQLayoutWidget*>(o) )
+ else if ( ::tqt_cast<TQLayoutWidget*>(o) )
item->setPixmap( 0, DesignerLayoutPix );
else
item->setPixmap( 0, WidgetDatabase::iconSet(
WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ).
pixmap( TQIconSet::Small, TQIconSet::Normal ) );
- if ( ::tqqt_cast<TQAction*>(o) )
+ if ( ::tqt_cast<TQAction*>(o) )
item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() );
( (HierarchyItem*)item )->setObject( o );
TQObjectList l = o->childrenListObject();
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
l.clear();
if ( !l.isEmpty() ) {
TQObjectListIt it( l );
@@ -478,20 +478,20 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
( (TQWidget*)it.current() )->isHidden() )
continue;
if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) {
- if ( ::tqqt_cast<TQWidgetStack*>(it.current()->parent()) ||
- ::tqqt_cast<TQWidgetStack*>(it.current()) ) {
+ if ( ::tqt_cast<TQWidgetStack*>(it.current()->parent()) ||
+ ::tqt_cast<TQWidgetStack*>(it.current()) ) {
TQObject *obj = it.current();
- QDesignerTabWidget *tw = ::tqqt_cast<QDesignerTabWidget*>(it.current()->parent());
- QDesignerWizard *dw = ::tqqt_cast<QDesignerWizard*>(it.current()->parent());
+ QDesignerTabWidget *tw = ::tqt_cast<QDesignerTabWidget*>(it.current()->parent());
+ QDesignerWizard *dw = ::tqt_cast<QDesignerWizard*>(it.current()->parent());
TQWidgetStack *stack = 0;
- if ( dw || tw || ::tqqt_cast<TQWidgetStack*>(obj) )
+ if ( dw || tw || ::tqt_cast<TQWidgetStack*>(obj) )
stack = (TQWidgetStack*)obj;
else
stack = (TQWidgetStack*)obj->parent();
if ( widgetStacks->findRef( stack ) != -1 )
continue;
widgetStacks->append( stack );
- TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE );
+ TQObjectList *l2 = stack->queryList( "TQWidget", 0, true, false );
for ( obj = l2->last(); obj; obj = l2->prev() ) {
if ( qstrcmp( obj->className(),
"TQWidgetStackPrivate::Invisible" ) == 0 ||
@@ -505,12 +505,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
insertObject( obj, item );
}
delete l2;
- } else if ( ::tqqt_cast<TQToolBox*>(it.current()->parent()) ) {
- if ( !::tqqt_cast<TQScrollView*>(it.current()) )
+ } else if ( ::tqt_cast<TQToolBox*>(it.current()->parent()) ) {
+ if ( !::tqt_cast<TQScrollView*>(it.current()) )
continue;
TQToolBox *tb = (TQToolBox*)it.current()->parent();
for ( int i = tb->count() - 1; i >= 0; --i )
- insertObject( TQT_TQOBJECT(tb->item( i )), item );
+ insertObject( tb->item( i ), item );
}
continue;
}
@@ -528,9 +528,9 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
for ( obj = l->first(); obj; obj = l->next() )
insertObject( obj, item );
delete l;
- } else if ( ::tqqt_cast<QDesignerToolBar*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ) {
+ } else if ( ::tqt_cast<QDesignerToolBar*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ) {
TQPtrList<TQAction> actions;
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
actions = ( (QDesignerToolBar*)o )->insertedActions();
else
( (PopupMenuEditor*)o )->insertedActions( actions );
@@ -539,37 +539,37 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
it.toLast();
while ( it.current() ) {
TQAction *a = it.current();
- if ( ::tqqt_cast<QDesignerAction*>(a) ) {
+ if ( ::tqt_cast<QDesignerAction*>(a) ) {
QDesignerAction *da = (QDesignerAction*)a;
if ( da->supportsMenu() )
insertObject( da, item );
else
- insertObject( TQT_TQOBJECT(da->widget()), item );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(a) ) {
+ insertObject( da->widget(), item );
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(a) ) {
insertObject( a, item );
}
--it;
}
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) {
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(o) && !o->childrenListObject().isEmpty() ) {
TQObjectList l = o->childrenListObject();
for ( TQObject *obj = l.last(); obj; obj = l.prev() ) {
- if ( ::tqqt_cast<QDesignerAction*>(obj) ) {
+ if ( ::tqt_cast<QDesignerAction*>(obj) ) {
QDesignerAction *da = (QDesignerAction*)obj;
if ( da->supportsMenu() )
insertObject( da, item );
else
- insertObject( TQT_TQOBJECT(da->widget()), item );
- } else if ( ::tqqt_cast<QDesignerActionGroup*>(obj) ) {
+ insertObject( da->widget(), item );
+ } else if ( ::tqt_cast<QDesignerActionGroup*>(obj) ) {
insertObject( obj, item );
}
}
- } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) {
+ } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
MenuBarEditor *mb = (MenuBarEditor*)o;
for ( int i = mb->count() -1; i >= 0; --i ) {
MenuBarEditorItem *md = mb->item( i );
if ( !md || !md->menu() )
continue;
- insertObject( TQT_TQOBJECT(md->menu()), item );
+ insertObject( md->menu(), item );
}
}
}
@@ -579,10 +579,10 @@ void HierarchyList::setCurrent( TQObject *o )
TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (HierarchyItem*)it.current() )->object() == o ) {
- blockSignals( TRUE );
+ blockSignals( true );
setCurrentItem( it.current() );
ensureItemVisible( it.current() );
- blockSignals( FALSE );
+ blockSignals( false );
return;
}
++it;
@@ -599,12 +599,12 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
return;
if ( !o->isWidgetType() ||
- ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) )
+ ( o != formWindow && !formWindow->widgets()->find( (TQWidget*)o ) ) )
return;
TQWidget *w = (TQWidget*)o;
if ( w->isVisibleTo( formWindow ) ) {
- if ( !::tqqt_cast<TQTabWidget*>(w) && !::tqqt_cast<TQWizard*>(w) ) {
+ if ( !::tqt_cast<TQTabWidget*>(w) && !::tqt_cast<TQWizard*>(w) ) {
if ( !normalMenu )
normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this );
normalMenu->popup( p );
@@ -612,8 +612,8 @@ void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p )
if ( !tabWidgetMenu )
tabWidgetMenu =
formWindow->mainWindow()->setupTabWidgetHierarchyMenu(
- this, TQT_SLOT( addTabPage() ),
- TQT_SLOT( removeTabPage() ) );
+ this, TQ_SLOT( addTabPage() ),
+ TQ_SLOT( removeTabPage() ) );
tabWidgetMenu->popup( p );
}
}
@@ -625,14 +625,14 @@ void HierarchyList::addTabPage()
if ( !o || !o->isWidgetType() )
return;
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ).
arg( tw->name() ), formWindow,
tw, "Tab" );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
- } else if ( ::tqqt_cast<TQWizard*>(w) ) {
+ } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).
arg( wiz->name() ), formWindow,
@@ -648,7 +648,7 @@ void HierarchyList::removeTabPage()
if ( !o || !o->isWidgetType() )
return;
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( tw->currentPage() ) {
QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw;
@@ -659,7 +659,7 @@ void HierarchyList::removeTabPage()
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
- } else if ( ::tqqt_cast<TQWizard*>(w) ) {
+ } else if ( ::tqt_cast<TQWizard*>(w) ) {
TQWizard *wiz = (TQWizard*)formWindow->mainContainer();
if ( wiz->currentPage() ) {
QDesignerWizard *dw = (QDesignerWizard*)wiz;
@@ -667,7 +667,7 @@ void HierarchyList::removeTabPage()
new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ).
arg( dw->pageTitle() ).arg( wiz->name() ),
formWindow, wiz,
- wiz->indexOf( wiz->currentPage() ), TRUE );
+ wiz->indexOf( wiz->currentPage() ), true );
formWindow->commandHistory()->addCommand( cmd );
cmd->execute();
}
@@ -677,13 +677,13 @@ void HierarchyList::removeTabPage()
// ------------------------------------------------------------
FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw )
- : HierarchyList( parent, fw, TRUE )
+ : HierarchyList( parent, fw, true )
{
header()->hide();
removeColumn( 1 );
- connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
- this, TQT_SLOT( renamed( TQListViewItem * ) ) );
- popupOpen = FALSE;
+ connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQ_SLOT( renamed( TQListViewItem * ) ) );
+ popupOpen = false;
}
void FormDefinitionView::setup()
@@ -710,14 +710,14 @@ void FormDefinitionView::setup()
HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0,
i18n( *dit ), TQString(), TQString() );
itemDef->setPixmap( 0, DesignerFolderPix );
- itemDef->setOpen( TRUE );
+ itemDef->setOpen( true );
TQStringList entries =
lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() );
HierarchyItem *item = 0;
for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) {
item = new HierarchyItem( HierarchyItem::Definition,
itemDef, item, *eit, TQString(), TQString() );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
}
}
lIface->release();
@@ -729,7 +729,7 @@ void FormDefinitionView::setup()
void FormDefinitionView::setupVariables()
{
bool pubOpen, protOpen, privOpen;
- pubOpen = protOpen = privOpen = TRUE;
+ pubOpen = protOpen = privOpen = true;
TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::VarParent ) {
@@ -753,7 +753,7 @@ void FormDefinitionView::setupVariables()
HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ),
TQString(), TQString() );
itemVar->setPixmap( 0, DesignerFolderPix );
- itemVar->setOpen( TRUE );
+ itemVar->setOpen( true );
itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ),
TQString(), TQString() );
@@ -762,7 +762,7 @@ void FormDefinitionView::setupVariables()
itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ),
TQString(), TQString() );
- TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Variable> varList = MetaDataBase::variables( formWindow );
TQValueList<MetaDataBase::Variable>::Iterator it = --( varList.end() );
if ( !varList.isEmpty() && itemVar ) {
for (;;) {
@@ -782,7 +782,7 @@ void FormDefinitionView::setupVariables()
--it;
}
}
- itemVar->setOpen( TRUE );
+ itemVar->setOpen( true );
itemVarPriv->setOpen( privOpen );
itemVarProt->setOpen( protOpen );
itemVarPubl->setOpen( pubOpen );
@@ -794,7 +794,7 @@ void FormDefinitionView::refresh()
return;
bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv;
- fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE;
+ fuPub = fuProt = fuPriv = slPub = slProt = slPriv = true;
TQListViewItem *i = firstChild();
while ( i ) {
if ( i->rtti() == HierarchyItem::SlotParent ||
@@ -852,7 +852,7 @@ void FormDefinitionView::refresh()
itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ),
TQString(), TQString() );
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formWindow );
TQValueList<MetaDataBase::Function>::Iterator it = --( functionList.end() );
if ( !functionList.isEmpty() && itemFunct ) {
for (;;) {
@@ -885,12 +885,12 @@ void FormDefinitionView::refresh()
}
}
- itemFunct->setOpen( TRUE );
+ itemFunct->setOpen( true );
itemFunctPubl->setOpen( fuPub );
itemFunctProt->setOpen( fuProt );
itemFunctPriv->setOpen( fuPriv );
- itemSlots->setOpen( TRUE );
+ itemSlots->setOpen( true );
itemPublic->setOpen( slPub );
itemProtected->setOpen( slProt );
itemPrivate->setOpen( slPriv );
@@ -956,7 +956,7 @@ void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const T
TQString(), TQString() );
if ( !pix.isNull() )
item->setPixmap( 0, pix );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
setCurrentItem( item );
ensureItemVisible( item );
tqApp->processEvents();
@@ -981,22 +981,22 @@ void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e )
if ( formWindow->project()->isCpp() )
switch( i->rtti() ) {
case HierarchyItem::FunctPublic:
- execFunctionDialog( "public", "function", TRUE );
+ execFunctionDialog( "public", "function", true );
break;
case HierarchyItem::FunctProtected:
- execFunctionDialog( "protected", "function", TRUE );
+ execFunctionDialog( "protected", "function", true );
break;
case HierarchyItem::FunctPrivate:
- execFunctionDialog( "private", "function", TRUE );
+ execFunctionDialog( "private", "function", true );
break;
case HierarchyItem::SlotPublic:
- execFunctionDialog( "public", "slot", TRUE );
+ execFunctionDialog( "public", "slot", true );
break;
case HierarchyItem::SlotProtected:
- execFunctionDialog( "protected", "slot", TRUE );
+ execFunctionDialog( "protected", "slot", true );
break;
case HierarchyItem::SlotPrivate:
- execFunctionDialog( "private", "slot", TRUE );
+ execFunctionDialog( "private", "slot", true );
break;
case HierarchyItem::VarPublic:
case HierarchyItem::VarProtected:
@@ -1023,7 +1023,7 @@ void FormDefinitionView::execFunctionDialog( const TQString &access, const TQStr
// refresh the functions list in the metadatabase
SourceEditor *editor = formFile->editor();
if ( editor )
- editor->refresh( TRUE );
+ editor->refresh( true );
EditFunctions dlg( this, formWindow );
if ( addFunc )
@@ -1043,7 +1043,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
const int GOIMPL = 5;
TQPopupMenu menu;
- bool insertDelete = FALSE;
+ bool insertDelete = false;
if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent ||
i->rtti() == HierarchyItem::VarParent ) {
@@ -1059,7 +1059,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS );
if ( MetaDataBase::hasEditor( formWindow->project()->language() ) )
menu.insertItem( i18n( "Goto Implementation" ), GOIMPL );
- insertDelete = TRUE;
+ insertDelete = true;
}
if ( insertDelete || i->rtti() == HierarchyItem::Variable ||
i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ||
@@ -1067,19 +1067,19 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
menu.insertSeparator();
menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL );
}
- popupOpen = TRUE;
+ popupOpen = true;
int res = menu.exec( pos );
- popupOpen = FALSE;
+ popupOpen = false;
if ( res == -1 )
return;
if ( res == EDIT ) {
switch( i->rtti() ) {
case HierarchyItem::FunctParent:
- execFunctionDialog( "public", "function", FALSE );
+ execFunctionDialog( "public", "function", false );
break;
case HierarchyItem::SlotParent:
- execFunctionDialog( "public", "slot", FALSE );
+ execFunctionDialog( "public", "slot", false );
break;
case HierarchyItem::VarParent:
case HierarchyItem::VarPublic:
@@ -1091,7 +1091,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
if ( i )
varDia.setCurrentItem( i->text( 0 ) );
if ( varDia.exec() == TQDialog::Accepted )
- formWindow->commandHistory()->setModified( TRUE );
+ formWindow->commandHistory()->setModified( true );
break;
}
case HierarchyItem::Definition:
@@ -1101,7 +1101,7 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
return;
if ( i->rtti() == HierarchyItem::Definition )
i = i->parent();
- ListEditor dia( this, 0, TRUE );
+ ListEditor dia( this, 0, true );
dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) );
TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() );
dia.setList( entries );
@@ -1117,22 +1117,22 @@ void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
i = i->parent();
switch( i->rtti() ) {
case HierarchyItem::SlotPublic:
- execFunctionDialog( "public", "slot", TRUE );
+ execFunctionDialog( "public", "slot", true );
break;
case HierarchyItem::SlotProtected:
- execFunctionDialog( "protected", "slot", TRUE );
+ execFunctionDialog( "protected", "slot", true );
break;
case HierarchyItem::SlotPrivate:
- execFunctionDialog( "private" , "slot", TRUE );
+ execFunctionDialog( "private" , "slot", true );
break;
case HierarchyItem::FunctPublic:
- execFunctionDialog( "public", "function", TRUE );
+ execFunctionDialog( "public", "function", true );
break;
case HierarchyItem::FunctProtected:
- execFunctionDialog( "protected", "function", TRUE );
+ execFunctionDialog( "protected", "function", true );
break;
case HierarchyItem::FunctPrivate:
- execFunctionDialog( "private" , "function", TRUE );
+ execFunctionDialog( "private" , "function", true );
break;
default:
insertEntry( i );
@@ -1192,12 +1192,12 @@ void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i )
}
if ( i && i->rtti() == HierarchyItem::Variable ) {
- i->setRenameEnabled( 0, FALSE );
+ i->setRenameEnabled( 0, false );
TQString varName = i->text( 0 );
varName = varName.simplifyWhiteSpace();
if ( varName[(int)varName.length() - 1] != ';' )
varName += ";";
- if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) {
+ if ( MetaDataBase::hasVariable( formWindow, varName ) ) {
TQMessageBox::information( this, i18n( "Edit Variables" ),
i18n( "This variable has already been declared." ) );
} else {
@@ -1268,9 +1268,9 @@ HierarchyView::HierarchyView( TQWidget *parent )
ClassBrowser cb( ciface->createClassBrowser( this ), ciface );
addTab( cb.lv, i18n( "Class Declarations" ) );
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
- ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
+ ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb );
- setTabEnabled( cb.lv, FALSE );
+ setTabEnabled( cb.lv, false );
}
}
}
@@ -1301,13 +1301,13 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
editor = 0;
}
- setTabEnabled( listview, TRUE );
+ setTabEnabled( listview, true );
setTabEnabled( fView, fw && fw->project()->isCpp() );
if ( fw == formwindow ) {
if ( fw ) {
if ( !fake )
- listview->setCurrent( TQT_TQOBJECT(o) );
+ listview->setCurrent( o );
else
listview->clear();
if ( MainWindow::self->qWorkspace()->activeWindow() == fw )
@@ -1330,7 +1330,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
fView->setFormWindow( fw );
if ( !fake ) {
listview->setup();
- listview->setCurrent( TQT_TQOBJECT(o) );
+ listview->setCurrent( o );
}
fView->setup();
@@ -1356,7 +1356,7 @@ void HierarchyView::showClasses( SourceEditor *se )
return;
lastSourceEditor = se;
- TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) );
+ TQTimer::singleShot( 100, this, TQ_SLOT( showClassesTimeout() ) );
}
void HierarchyView::showClassesTimeout()
@@ -1367,14 +1367,14 @@ void HierarchyView::showClassesTimeout()
if ( !se->object() )
return;
if ( se->formWindow() && se->formWindow()->project()->isCpp() ) {
- setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) );
- MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()),
+ setFormWindow( se->formWindow(), se->formWindow()->currentWidget() );
+ MainWindow::self->propertyeditor()->setWidget( se->formWindow()->currentWidget(),
se->formWindow() );
return;
}
setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() );
- setTabEnabled( fView, FALSE );
+ setTabEnabled( fView, false );
formwindow = 0;
listview->setFormWindow( 0 );
@@ -1389,10 +1389,10 @@ void HierarchyView::showClassesTimeout()
it != classBrowsers->end(); ++it ) {
if ( it.key() == se->project()->language() ) {
(*it).iface->update( se->text() );
- setTabEnabled( (*it).lv, TRUE );
+ setTabEnabled( (*it).lv, true );
showPage( (*it).lv );
} else {
- setTabEnabled( (*it).lv, FALSE );
+ setTabEnabled( (*it).lv, false );
(*it).iface->clear();
}
}
@@ -1445,9 +1445,9 @@ void HierarchyView::widgetsRemoved( const TQWidgetList & )
void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & )
{
TQWidget *w2 = w;
- if ( ::tqqt_cast<TQMainWindow*>(w) )
+ if ( ::tqt_cast<TQMainWindow*>(w) )
w2 = ( (TQMainWindow*)w )->centralWidget();
- listview->changeNameOf( TQT_TQOBJECT(w2), w->name() );
+ listview->changeNameOf( w2, w->name() );
}
@@ -1455,7 +1455,7 @@ void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& in
{
#ifndef TQT_NO_SQL
TQString i = info.join( "." );
- listview->changeDatabaseOf( TQT_TQOBJECT(w), i );
+ listview->changeDatabaseOf( w, i );
#endif
}
diff --git a/kdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h
index cb21ed50..e47754b9 100644
--- a/kdevdesigner/designer/hierarchyview.h
+++ b/kdevdesigner/designer/hierarchyview.h
@@ -31,7 +31,7 @@
#include <tqlistview.h>
#include <tqtabwidget.h>
#include <tqguardedptr.h>
-#include <tqcom_p.h>
+#include <private/tqcom_p.h>
#include "../interfaces/classbrowserinterface.h"
class FormWindow;
@@ -97,11 +97,11 @@ private:
class HierarchyList : public TQListView
{
- Q_OBJECT
+ TQ_OBJECT
public:
- HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = TRUE );
+ HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects = true );
virtual void setup();
virtual void setCurrent( TQObject *o );
@@ -111,9 +111,9 @@ public:
void setFormWindow( FormWindow *fw ) { formWindow = fw; }
void drawContentsOffset( TQPainter *p, int ox, int oy,
int cx, int cy, int cw, int ch ) {
- setUpdatesEnabled( FALSE );
+ setUpdatesEnabled( false );
triggerUpdate();
- setUpdatesEnabled( TRUE );
+ setUpdatesEnabled( true );
TQListView::drawContentsOffset( p, ox, oy, cx, cy, cw, ch );
}
@@ -155,7 +155,7 @@ protected:
class FormDefinitionView : public HierarchyList
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -189,7 +189,7 @@ private:
class HierarchyView : public TQTabWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/iconvieweditor.ui b/kdevdesigner/designer/iconvieweditor.ui
index 8711bd6b..93cb8ac7 100644
--- a/kdevdesigner/designer/iconvieweditor.ui
+++ b/kdevdesigner/designer/iconvieweditor.ui
@@ -439,7 +439,7 @@
<tabstop>buttonHelp</tabstop>
<tabstop>buttonApply</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">applyClicked()</slot>
@@ -451,7 +451,7 @@
<slot access="protected">insertNewItem()</slot>
<slot access="protected">deletePixmap()</slot>
<slot access="protected">okClicked()</slot>
-</Q_SLOTS>
+</slots>
<includes>
<include location="local" impldecl="in implementation">myiconloader.h</include>
</includes>
diff --git a/kdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp
index 32a81412..47c820f6 100644
--- a/kdevdesigner/designer/iconvieweditorimpl.cpp
+++ b/kdevdesigner/designer/iconvieweditorimpl.cpp
@@ -38,16 +38,16 @@
#include <tdelocale.h>
IconViewEditor::IconViewEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : IconViewEditorBase( parent, 0, TRUE ), formwindow( fw )
+ : IconViewEditorBase( parent, 0, true ), formwindow( fw )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
iconview = (TQIconView*)editWidget;
itemText->setText( "" );
- itemText->setEnabled( FALSE );
+ itemText->setEnabled( false );
itemPixmap->setText( "" );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
TQIconViewItem *i = 0;
for ( i = iconview->firstItem(); i; i = i->nextItem() ) {
@@ -62,7 +62,7 @@ void IconViewEditor::insertNewItem()
{
TQIconViewItem *i = new TQIconViewItem( preview, i18n( "New Item" ) );
preview->setCurrentItem( i );
- preview->setSelected( i, TRUE );
+ preview->setSelected( i, true );
itemText->setFocus();
itemText->selectAll();
}
@@ -71,31 +71,31 @@ void IconViewEditor::deleteCurrentItem()
{
delete preview->currentItem();
if ( preview->currentItem() )
- preview->setSelected( preview->currentItem(), TRUE );
+ preview->setSelected( preview->currentItem(), true );
}
void IconViewEditor::currentItemChanged( TQIconViewItem *i )
{
- itemText->blockSignals( TRUE );
+ itemText->blockSignals( true );
itemText->setText( "" );
itemPixmap->setText( "" );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
if ( !i ) {
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
return;
}
- itemText->blockSignals( TRUE );
- itemText->setEnabled( TRUE );
- itemChoosePixmap->setEnabled( TRUE );
+ itemText->blockSignals( true );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
itemText->setText( i->text() );
if ( i->pixmap() )
itemPixmap->setPixmap( *i->pixmap() );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
}
void IconViewEditor::currentTextChanged( const TQString &txt )
@@ -151,7 +151,7 @@ void IconViewEditor::choosePixmap()
preview->currentItem()->setPixmap( pix );
itemPixmap->setPixmap( pix );
- itemDeletePixmap->setEnabled( TRUE );
+ itemDeletePixmap->setEnabled( true );
}
void IconViewEditor::deletePixmap()
@@ -161,5 +161,5 @@ void IconViewEditor::deletePixmap()
preview->currentItem()->setPixmap( TQPixmap() );
itemPixmap->setText( "" );
- itemDeletePixmap->setEnabled( FALSE );
+ itemDeletePixmap->setEnabled( false );
}
diff --git a/kdevdesigner/designer/iconvieweditorimpl.h b/kdevdesigner/designer/iconvieweditorimpl.h
index 969c9cf4..87ac63fa 100644
--- a/kdevdesigner/designer/iconvieweditorimpl.h
+++ b/kdevdesigner/designer/iconvieweditorimpl.h
@@ -33,7 +33,7 @@ class FormWindow;
class IconViewEditor : public IconViewEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp
index 8c8917a2..22add7fd 100644
--- a/kdevdesigner/designer/kdevdesigner_part.cpp
+++ b/kdevdesigner/designer/kdevdesigner_part.cpp
@@ -20,7 +20,7 @@
#include "kdevdesigner_part.h"
-#include <kinstance.h>
+#include <tdeinstance.h>
#include <tdeaction.h>
#include <tdeactionclasses.h>
#include <kstdaction.h>
@@ -62,7 +62,7 @@ KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widge
setReadWrite(true);
setModified(false);
- connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool)));
+ connect(m_widget, TQ_SIGNAL(formModified(bool )), this, TQ_SLOT(formModified(bool)));
}
void KDevDesignerPart::setupDesignerWindow()
@@ -87,48 +87,48 @@ static TQIconSet createPartIconSet( const TQString &name )
void KDevDesignerPart::setupActions( )
{
TDEAction *action;
- action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
- action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
- action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection());
+ action = KStdAction::openNew(this, TQ_SLOT(fileNew()), actionCollection());
+ action = KStdAction::open(this, TQ_SLOT(fileOpen()), actionCollection());
+ action = KStdAction::close(this, TQ_SLOT(fileClose()), actionCollection());
stateSync(action, m_widget->actionFileClose);
- action = KStdAction::save(this, TQT_SLOT(save()), actionCollection());
+ action = KStdAction::save(this, TQ_SLOT(save()), actionCollection());
stateSync(action, m_widget->actionFileSave);
- action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ action = KStdAction::saveAs(this, TQ_SLOT(fileSaveAs()), actionCollection());
stateSync(action, m_widget->actionFileSaveAs);
- action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall");
+ action = new TDEAction(i18n("Save Al&l"), 0, this, TQ_SLOT(fileSaveAs()), actionCollection(), "file_saveall");
stateSync(action, m_widget->actionFileSaveAll);
- new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
+ new TDEAction(i18n("Create &Template..."), 0, this, TQ_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate");
- action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection());
+ action = KStdAction::undo(this, TQ_SLOT(editUndo()), actionCollection());
stateSync(action, m_widget->actionEditUndo);
- action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection());
+ action = KStdAction::redo(this, TQ_SLOT(editRedo()), actionCollection());
stateSync(action, m_widget->actionEditRedo);
- action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection());
+ action = KStdAction::cut(this, TQ_SLOT(editCut()), actionCollection());
stateSync(action, m_widget->actionEditCut);
- action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection());
+ action = KStdAction::copy(this, TQ_SLOT(editCopy()), actionCollection());
stateSync(action, m_widget->actionEditCopy);
- action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection());
+ action = KStdAction::paste(this, TQ_SLOT(editPaste()), actionCollection());
stateSync(action, m_widget->actionEditPaste);
- action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete");
+ action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQ_SLOT(editDelete()), actionCollection(), "edit_delete");
stateSync(action, m_widget->actionEditDelete);
- action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection());
+ action = KStdAction::selectAll(this, TQ_SLOT(editSelectAll()), actionCollection());
stateSync(action, m_widget->actionEditSelectAll);
- action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels");
+ action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQ_SLOT(editAccels()), actionCollection(), "edit_accels");
stateSync(action, m_widget->actionEditAccels);
- action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions");
+ action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQ_SLOT(editFunctions()), actionCollection(), "edit_functions");
stateSync(action, m_widget->actionEditFunctions);
- action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections");
+ action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQ_SLOT(editConnections()), actionCollection(), "edit_connections");
stateSync(action, m_widget->actionEditConnections);
- action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
+ action = new TDEAction(i18n("&Form Settings..."), 0, this, TQ_SLOT(editFormSettings()), actionCollection(), "edit_formsettings");
stateSync(action, m_widget->actionEditFormSettings);
- action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile");
+ action = new TDEAction(i18n("&Add File..."), 0, this, TQ_SLOT(projectAddFile()), actionCollection(), "project_addfile");
stateSync(action, m_widget->actionProjectAddFile);
- action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
+ action = new TDEAction(i18n("&Image Collection..."), 0, this, TQ_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection");
stateSync(action, m_widget->actionEditPixmapCollection);
- action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
+ action = new TDEAction(i18n("&Database Connections..."), 0, this, TQ_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections");
stateSync(action, m_widget->actionEditDatabaseConnections);
- action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings");
+ action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQ_SLOT(projectSettings()), actionCollection(), "project_settings");
stateSync(action, m_widget->actionEditProjectSettings);
TDERadioAction *toggle;
@@ -141,34 +141,34 @@ void KDevDesignerPart::setupActions( )
setupToolsAction(toggle, m_widget->actionOrderTool);
toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy");
setupToolsAction(toggle, m_widget->actionBuddyTool);
- new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
- new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
+ new TDEAction(i18n("Configure Toolbox..."), 0, this, TQ_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox");
+ new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQ_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets");
- action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
+ action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQ_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize");
stateSync(action, m_widget->actionEditAdjustSize);
- action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h");
+ action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQ_SLOT(layoutHLayout()), actionCollection(), "layout_h");
stateSync(action, m_widget->actionEditHLayout);
- action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v");
+ action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQ_SLOT(layoutVLayout()), actionCollection(), "layout_v");
stateSync(action, m_widget->actionEditVLayout);
- action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
+ action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQ_SLOT(layoutGridLayout()), actionCollection(), "layout_grid");
stateSync(action, m_widget->actionEditGridLayout);
- action = new TDEAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
+ action = new TDEAction(i18n("Lay Out Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQ_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith");
stateSync(action, m_widget->actionEditSplitHorizontal);
- action = new TDEAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
+ action = new TDEAction(i18n("Lay Out Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQ_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv");
stateSync(action, m_widget->actionEditSplitVertical);
- action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break");
+ action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQ_SLOT(layoutBreak()), actionCollection(), "layout_break");
stateSync(action, m_widget->actionEditBreakLayout);
toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer");
setupToolsAction(toggle, m_widget->actionInsertSpacer);
- action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview");
+ action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQ_SLOT(windowPreview()), actionCollection(), "window_preview");
stateSync(action, m_widget->actionPreview);
- action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next");
+ action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQ_SLOT(windowNext()), actionCollection(), "window_next");
stateSync(action, m_widget->actionWindowNext);
- action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev");
+ action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQ_SLOT(windowPrev()), actionCollection(), "window_prev");
stateSync(action, m_widget->actionWindowPrevious);
- action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection());
+ action = KStdAction::preferences(this, TQ_SLOT(editPreferences()), actionCollection());
action->setText(i18n("Configure &KDevDesigner..."));
stateSync(action, m_widget->actionEditPreferences);
}
@@ -203,7 +203,7 @@ bool KDevDesignerPart::openFile()
bool KDevDesignerPart::saveFile()
{
- if (isReadWrite() == false)
+ if (!isReadWrite())
return false;
m_widget->actionFileSaveAll->activate();
return true;
@@ -217,7 +217,7 @@ void KDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction )
DesignerAction *ac = dynamic_cast<DesignerAction*>(qaction);
if (!ac)
return;
- connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool )));
+ connect(ac, TQ_SIGNAL(actionEnabled(bool )), tdeaction, TQ_SLOT(setEnabled(bool )));
}
void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action )
@@ -227,8 +227,8 @@ void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * act
toggle->setGroup("tools");
toggle->setExclusiveGroup("tools");
- connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
- connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool)));
+ connect(action, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool )));
+ connect(toggle, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setToggleActionOn(bool)));
toggle->setChecked(action->isOn());
m_actionMap[action] = toggle;
m_actionMap2[toggle] = action;
@@ -495,9 +495,9 @@ void KDevDesignerPart::setToggleActionOn( bool b )
TQAction *qaction = m_actionMap2[action];
if (!qaction)
return;
- disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
+ disconnect(qaction, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool )));
qaction->setOn(b);
- connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool )));
+ connect(qaction, TQ_SIGNAL(toggled(bool )), this, TQ_SLOT(setToggleActionChecked(bool )));
}
void KDevDesignerPart::openProject( const TQString & // projectFile
diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h
index 3006c600..ed940b52 100644
--- a/kdevdesigner/designer/kdevdesigner_part.h
+++ b/kdevdesigner/designer/kdevdesigner_part.h
@@ -38,7 +38,7 @@ class TDERadioAction;
class KDevDesignerPart : public KInterfaceDesigner::Designer
{
- Q_OBJECT
+ TQ_OBJECT
public:
KDevDesignerPart(TQWidget *parentWidget, const char *widgetName,
@@ -130,7 +130,7 @@ class TDEAboutData;
class KDevDesignerPartFactory : public KParts::Factory
{
- Q_OBJECT
+ TQ_OBJECT
public:
KDevDesignerPartFactory();
diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp
index b8fb737c..b776b97b 100644
--- a/kdevdesigner/designer/layout.cpp
+++ b/kdevdesigner/designer/layout.cpp
@@ -64,7 +64,7 @@ bool operator<( const TQGuardedPtr<TQWidget> &p1, const TQGuardedPtr<TQWidget> &
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.setAutoDelete( FALSE );
+ widgets.setAutoDelete( false );
layoutBase = lb;
if ( !doSetup && layoutBase )
oldGeometry = layoutBase->geometry();
@@ -103,7 +103,7 @@ void Layout::setup()
}
if ( !lastList ) {
TQWidgetList l;
- l.setAutoDelete( FALSE );
+ l.setAutoDelete( false );
lists.append( l );
lastList = &lists.last();
}
@@ -124,7 +124,7 @@ void Layout::setup()
// we leave here.
if ( !lastList || ( lastList->count() < 2 &&
( !layoutBase ||
- ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) &&
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() ) )
) ) {
widgets.clear();
@@ -142,8 +142,8 @@ void Layout::setup()
// 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() ) );
+ connect( w, TQ_SIGNAL( destroyed() ),
+ this, TQ_SLOT( widgetDestroyed() ) );
startPoint = TQPoint( TQMIN( startPoint.x(), w->x() ),
TQMIN( startPoint.y(), w->y() ) );
geometries.insert( w, TQRect( w->pos(), w->size() ) );
@@ -163,23 +163,23 @@ void Layout::widgetDestroyed()
bool Layout::prepareLayout( bool &needMove, bool &needReparent )
{
if ( !widgets.count() )
- return FALSE;
+ return false;
for ( TQWidget *w = widgets.first(); w; w = widgets.next() )
w->raise();
needMove = !layoutBase;
- needReparent = needMove || ::tqqt_cast<TQLayoutWidget*>(layoutBase) || ::tqqt_cast<TQSplitter*>(layoutBase);
+ needReparent = needMove || ::tqt_cast<TQLayoutWidget*>(layoutBase) || ::tqt_cast<TQSplitter*>(layoutBase);
if ( !layoutBase ) {
if ( !useSplitter )
- layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ),
+ layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLayoutWidget" ),
WidgetFactory::containerOfWidget( parent ) );
else
- layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( TQSPLITTER_OBJECT_NAME_STRING ),
+ layoutBase = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQSplitter" ),
WidgetFactory::containerOfWidget( parent ) );
} else {
WidgetFactory::deleteLayout( layoutBase );
}
- return TRUE;
+ return true;
}
void Layout::finishLayout( bool needMove, TQLayout *layout )
@@ -195,7 +195,7 @@ void Layout::finishLayout( bool needMove, TQLayout *layout )
layoutBase->show();
layout->activate();
formWindow->insertWidget( layoutBase );
- formWindow->selectWidget( TQT_TQOBJECT(layoutBase) );
+ formWindow->selectWidget( layoutBase );
TQString n = layoutBase->name();
if ( n.find( "qt_dead_widget_" ) != -1 ) {
n.remove( 0, TQString( "qt_dead_widget_" ).length() );
@@ -214,9 +214,9 @@ void Layout::undoLayout()
it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() );
}
- formWindow->selectWidget( TQT_TQOBJECT(layoutBase), FALSE );
+ formWindow->selectWidget( layoutBase, false );
WidgetFactory::deleteLayout( layoutBase );
- if ( parent != layoutBase && !::tqqt_cast<TQMainWindow*>(layoutBase) ) {
+ if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide();
TQString n = layoutBase->name();
n.prepend( "qt_dead_widget_" );
@@ -225,9 +225,9 @@ void Layout::undoLayout()
layoutBase->setGeometry( oldGeometry );
}
if ( widgets.first() )
- formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) );
+ formWindow->selectWidget( widgets.first() );
else
- formWindow->selectWidget( TQT_TQOBJECT(formWindow) );
+ formWindow->selectWidget( formWindow );
}
void Layout::breakLayout()
@@ -239,16 +239,16 @@ void Layout::breakLayout()
rects.insert( w, w->geometry() );
}
WidgetFactory::deleteLayout( layoutBase );
- bool needReparent = qstrcmp( layoutBase->className(), TQLAYOUTWIDGET_OBJECT_NAME_STRING ) == 0 ||
- qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0 ||
- ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(layoutBase) ) ) ) &&
+ bool needReparent = qstrcmp( layoutBase->className(), "TQLayoutWidget" ) == 0 ||
+ qstrcmp( layoutBase->className(), "TQSplitter" ) == 0 ||
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( layoutBase ) ) ) &&
layoutBase != formWindow->mainContainer() );
- bool needResize = qstrcmp( layoutBase->className(), TQSPLITTER_OBJECT_NAME_STRING ) == 0;
+ bool needResize = qstrcmp( layoutBase->className(), "TQSplitter" ) == 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 );
+ layoutBase->pos() + w->pos(), true );
if ( needResize ) {
TQMap<TQWidget*, TQRect>::Iterator it = rects.find( w );
if ( it != rects.end() )
@@ -267,9 +267,9 @@ void Layout::breakLayout()
parent = layoutBase;
}
if ( widgets.first() && widgets.first()->isVisibleTo( formWindow ) )
- formWindow->selectWidget( TQT_TQOBJECT(widgets.first()) );
+ formWindow->selectWidget( widgets.first() );
else
- formWindow->selectWidget( TQT_TQOBJECT(formWindow) );
+ formWindow->selectWidget( formWindow );
}
class HorizontalLayoutList : public TQWidgetList
@@ -314,21 +314,21 @@ void HorizontalLayout::doLayout()
TQHBoxLayout *layout = (TQHBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::HBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else
layout->addWidget( w );
- if ( ::tqqt_cast<TQLayoutWidget*>(w) )
+ if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}
- if ( ::tqqt_cast<TQSplitter*>(layoutBase) )
- ( (TQSplitter*)layoutBase )->setOrientation( Qt::Horizontal );
+ if ( ::tqt_cast<TQSplitter*>(layoutBase) )
+ ( (TQSplitter*)layoutBase )->setOrientation( TQt::Horizontal );
finishLayout( needMove, layout );
}
@@ -378,21 +378,21 @@ void VerticalLayout::doLayout()
TQVBoxLayout *layout = (TQVBoxLayout*)WidgetFactory::createLayout( layoutBase, 0, WidgetFactory::VBox );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
- if ( needReparent && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
else
layout->addWidget( w );
- if ( ::tqqt_cast<TQLayoutWidget*>(w) )
+ if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
}
w->show();
}
- if ( ::tqqt_cast<TQSplitter*>(layoutBase) )
- ( (TQSplitter*)layoutBase )->setOrientation( Qt::Vertical );
+ if ( ::tqt_cast<TQSplitter*>(layoutBase) )
+ ( (TQSplitter*)layoutBase )->setOrientation( TQt::Vertical );
finishLayout( needMove, layout );
}
@@ -495,10 +495,10 @@ bool Grid::isWidgetStartCol( int c ) const
int r;
for ( r = 0; r < nrows; r++ ) {
if ( cell( r, c ) && ( (c==0) || (cell( r, c) != cell( r, c-1) )) ) {
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool Grid::isWidgetEndCol( int c ) const
@@ -506,9 +506,9 @@ bool Grid::isWidgetEndCol( int c ) const
int r;
for ( r = 0; r < nrows; r++ ) {
if ( cell( r, c ) && ((c == ncols-1) || (cell( r, c) != cell( r, c+1) )) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool Grid::isWidgetStartRow( int r ) const
@@ -516,9 +516,9 @@ bool Grid::isWidgetStartRow( int r ) const
int c;
for ( c = 0; c < ncols; c++ ) {
if ( cell( r, c ) && ( (r==0) || (cell( r, c) != cell( r-1, c) )) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool Grid::isWidgetEndRow( int r ) const
@@ -526,9 +526,9 @@ bool Grid::isWidgetEndRow( int r ) const
int c;
for ( c = 0; c < ncols; c++ ) {
if ( cell( r, c ) && ((r == nrows-1) || (cell( r, c) != cell( r+1, c) )) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -536,7 +536,7 @@ bool Grid::isWidgetTopLeft( int r, int c ) const
{
TQWidget* w = cell( r, c );
if ( !w )
- return FALSE;
+ return false;
return ( !r || cell( r-1, c) != w ) && (!c || cell( r, c-1) != w);
}
@@ -677,16 +677,16 @@ void Grid::merge()
{
int r,c;
for ( c = 0; c < ncols; c++ )
- cols[c] = FALSE;
+ cols[c] = false;
for ( r = 0; r < nrows; r++ )
- rows[r] = FALSE;
+ rows[r] = false;
for ( c = 0; c < ncols; c++ ) {
for ( r = 0; r < nrows; r++ ) {
if ( isWidgetTopLeft( r, c ) ) {
- rows[r] = TRUE;
- cols[c] = TRUE;
+ rows[r] = true;
+ cols[c] = true;
}
}
}
@@ -718,11 +718,11 @@ bool Grid::locateWidget( TQWidget* w, int& row, int& col, int& rowspan, int & co
if ( cols[ c2] )
colspan++;
}
- return TRUE;
+ return true;
}
}
}
- return FALSE;
+ return false;
}
@@ -756,14 +756,14 @@ 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 && TQT_BASE_OBJECT(w->parent()) != TQT_BASE_OBJECT(layoutBase) )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ if ( needReparent && w->parent() != layoutBase )
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( rs * cs == 1 ) {
- layout->addWidget( w, r, c, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
+ layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} else {
- layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
+ layout->addMultiCellWidget( w, r, r+rs-1, c, c+cs-1, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
}
- if ( ::tqqt_cast<TQLayoutWidget*>(w) )
+ if ( ::tqt_cast<TQLayoutWidget*>(w) )
( (TQLayoutWidget*)w )->updateSizePolicy();
w->show();
} else {
@@ -865,10 +865,10 @@ void GridLayout::buildGrid()
Spacer::Spacer( TQWidget *parent, const char *name )
: TQWidget( parent, name, WMouseNoMask ),
- orient(Qt::Vertical ), interactive(TRUE), sh( TQSize(20,20) )
+ orient(TQt::Vertical ), interactive(true), sh( TQSize(20,20) )
{
setSizeType( Expanding );
- setAutoMask( TRUE );
+ setAutoMask( true );
}
void Spacer::paintEvent( TQPaintEvent * )
@@ -876,7 +876,7 @@ void Spacer::paintEvent( TQPaintEvent * )
TQPainter p( this );
p.setPen( TQt::blue );
- if ( orient ==Qt::Horizontal ) {
+ if ( orient ==TQt::Horizontal ) {
const int dist = 3;
const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2;
@@ -915,7 +915,7 @@ void Spacer::resizeEvent( TQResizeEvent* e)
void Spacer::updateMask()
{
TQRegion r( rect() );
- if ( orient ==Qt::Horizontal ) {
+ if ( orient ==TQt::Horizontal ) {
const int amplitude = TQMIN( 3, height() / 3 );
const int base = height() / 2;
r = r.subtract( TQRect(1, 0, width() - 2, base - amplitude ) );
@@ -932,7 +932,7 @@ void Spacer::updateMask()
void Spacer::setSizeType( SizeType t )
{
TQSizePolicy sizeP;
- if ( orient ==Qt::Vertical )
+ if ( orient ==TQt::Vertical )
sizeP = TQSizePolicy( TQSizePolicy::Minimum, (TQSizePolicy::SizeType)t );
else
sizeP = TQSizePolicy( (TQSizePolicy::SizeType)t, TQSizePolicy::Minimum );
@@ -942,14 +942,14 @@ void Spacer::setSizeType( SizeType t )
Spacer::SizeType Spacer::sizeType() const
{
- if ( orient ==Qt::Vertical )
+ if ( orient ==TQt::Vertical )
return (SizeType)sizePolicy().verData();
return (SizeType)sizePolicy().horData();
}
int Spacer::alignment() const
{
- if ( orient ==Qt::Vertical )
+ if ( orient ==TQt::Vertical )
return AlignHCenter;
return AlignVCenter;
}
@@ -958,7 +958,7 @@ TQSize Spacer::minimumSize() const
{
TQSize s = TQSize( 20,20 );
if ( sizeType() == Expanding )
- if ( orient ==Qt::Vertical )
+ if ( orient ==TQt::Vertical )
s.rheight() = 0;
else
s.rwidth() = 0;
@@ -979,12 +979,12 @@ void Spacer::setSizeHint( const TQSize &s )
updateGeometry();
}
-Qt::Orientation Spacer::orientation() const
+TQt::Orientation Spacer::orientation() const
{
return orient;
}
-void Spacer::setOrientation( Qt::Orientation o )
+void Spacer::setOrientation( TQt::Orientation o )
{
if ( orient == o )
return;
diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h
index d1ea776e..e870aca0 100644
--- a/kdevdesigner/designer/layout.h
+++ b/kdevdesigner/designer/layout.h
@@ -40,11 +40,11 @@ class TQPaintEvent;
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 );
+ Layout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
virtual ~Layout() {}
virtual void doLayout() = 0;
@@ -75,7 +75,7 @@ protected slots:
class HorizontalLayout : public Layout
{
public:
- HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ HorizontalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
void doLayout();
@@ -87,7 +87,7 @@ protected:
class VerticalLayout : public Layout
{
public:
- VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = TRUE, bool splitter = FALSE );
+ VerticalLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, bool doSetup = true, bool splitter = false );
void doLayout();
@@ -101,7 +101,7 @@ class Grid;
class GridLayout : public Layout
{
public:
- GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = TRUE );
+ GridLayout( const TQWidgetList &wl, TQWidget *p, FormWindow *fw, TQWidget *lb, const TQSize &res, bool doSetup = true );
~GridLayout();
void doLayout();
@@ -118,7 +118,7 @@ protected:
class Spacer : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
TQ_OVERRIDE( TQCString name )
@@ -163,7 +163,7 @@ protected:
class QDesignerGridLayout : public TQGridLayout
{
- Q_OBJECT
+ TQ_OBJECT
public:
QDesignerGridLayout( TQWidget *parent ) : TQGridLayout( parent ){};
diff --git a/kdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp
index 54498478..cfdfd587 100644
--- a/kdevdesigner/designer/listboxdnd.cpp
+++ b/kdevdesigner/designer/listboxdnd.cpp
@@ -35,7 +35,7 @@
class ListBoxItemDrag : public TQStoredDrag
{
public:
- ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = FALSE, TQListBox * parent = 0, const char * name = 0 );
+ ListBoxItemDrag( ListBoxItemList & items, bool sendPtr = false, TQListBox * parent = 0, const char * name = 0 );
~ListBoxItemDrag() {};
static bool canDecode( TQDragMoveEvent * event );
static bool decode( TQDropEvent * event, TQListBox * parent, TQListBoxItem * insertPoint );
@@ -48,7 +48,7 @@ ListBoxDnd::ListBoxDnd( TQListBox * eventSource, const char * name )
void ListBoxDnd::confirmDrop( TQListBoxItem * )
{
- dropConfirmed = TRUE;
+ dropConfirmed = true;
}
bool ListBoxDnd::dropEvent( TQDropEvent * event )
@@ -58,7 +58,7 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
event->accept();
emit dropped( 0 ); // a NullDrop
- return TRUE;
+ return true;
}
TQPoint pos = event->pos();
@@ -74,14 +74,14 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
}
line->hide();
- dragInside = FALSE;
+ dragInside = false;
- return TRUE;
+ return true;
}
bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
{
- if ( event->state() & Qt::LeftButton ) {
+ if ( event->state() & TQt::LeftButton ) {
if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) {
ListBoxItemList list;
@@ -104,15 +104,15 @@ bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
if ( dMode & Move ) {
if ( dropConfirmed ) {
// ###FIX: memleak ? in internal mode, only pointers are transfered...
- //list.setAutoDelete( TRUE );
+ //list.setAutoDelete( true );
list.clear();
- dropConfirmed = FALSE;
+ dropConfirmed = false;
}
insertList( list ); // "show" items
}
}
}
- return FALSE;
+ return false;
}
int ListBoxDnd::buildList( ListBoxItemList & list )
@@ -120,7 +120,7 @@ int ListBoxDnd::buildList( ListBoxItemList & list )
TQListBoxItem * i = ((TQListBox *)src)->firstItem();
while ( i ) {
if ( i->isSelected() ) {
- ((TQListBox *)src)->setSelected( i, FALSE );
+ ((TQListBox *)src)->setSelected( i, false );
list.append( i );
}
i = i->next();
@@ -299,7 +299,7 @@ bool ListBoxItemDrag::decode( TQDropEvent * event, TQListBox * parent, TQListBox
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/kdevdesigner/designer/listboxdnd.h b/kdevdesigner/designer/listboxdnd.h
index 5abf792f..95f3a667 100644
--- a/kdevdesigner/designer/listboxdnd.h
+++ b/kdevdesigner/designer/listboxdnd.h
@@ -35,7 +35,7 @@ typedef TQPtrList<TQListBoxItem> ListBoxItemList;
class ListBoxDnd : public ListDnd
{
- Q_OBJECT
+ TQ_OBJECT
public:
// dragModes are enumerated in ListDnd
diff --git a/kdevdesigner/designer/listboxeditor.ui b/kdevdesigner/designer/listboxeditor.ui
index 6c5a8408..628a622c 100644
--- a/kdevdesigner/designer/listboxeditor.ui
+++ b/kdevdesigner/designer/listboxeditor.ui
@@ -434,7 +434,7 @@
<tabstop>helpButton</tabstop>
<tabstop>buttonApply</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">insertNewItem()</slot>
@@ -448,7 +448,7 @@
<slot access="protected">deletePixmap()</slot>
<slot access="protected">moveItemUp()</slot>
<slot access="protected">moveItemDown()</slot>
-</Q_SLOTS>
+</slots>
<pixmapfunction>BarIcon2</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
<includes>
diff --git a/kdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp
index 01dfa64e..42f97497 100644
--- a/kdevdesigner/designer/listboxeditorimpl.cpp
+++ b/kdevdesigner/designer/listboxeditorimpl.cpp
@@ -41,16 +41,16 @@
#include <tdelocale.h>
ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
- : ListBoxEditorBase( parent, 0, TRUE ), formwindow( fw )
+ : ListBoxEditorBase( parent, 0, true ), formwindow( fw )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
listbox = (TQListBox*)editWidget;
itemText->setText( "" );
- itemText->setEnabled( FALSE );
+ itemText->setEnabled( false );
itemPixmap->setText( "" );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
TQListBoxItem *i = 0;
for ( i = listbox->firstItem(); i; i = i->next() ) {
@@ -65,20 +65,20 @@ ListBoxEditor::ListBoxEditor( TQWidget *parent, TQWidget *editWidget, FormWindow
ListBoxDnd *editorDnd = new ListBoxDnd( preview );
editorDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- TQObject::connect( editorDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
- editorDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
+ TQObject::connect( editorDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ),
+ editorDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) );
ListBoxRename *editorRename = new ListBoxRename( preview );
- TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" );
+ TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
TQObjectListIt it( *l );
TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
TQObject::connect( editorRename,
- TQT_SIGNAL( itemTextChanged( const TQString & ) ),
+ TQ_SIGNAL( itemTextChanged( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
@@ -88,7 +88,7 @@ void ListBoxEditor::insertNewItem()
{
TQListBoxItem *i = new TQListBoxText( preview, i18n("New Item") );
preview->setCurrentItem( i );
- preview->setSelected( i, TRUE );
+ preview->setSelected( i, true );
itemText->setFocus();
itemText->selectAll();
}
@@ -97,32 +97,32 @@ void ListBoxEditor::deleteCurrentItem()
{
delete preview->item( preview->currentItem() );
if ( preview->currentItem() != -1 )
- preview->setSelected( preview->currentItem(), TRUE );
+ preview->setSelected( preview->currentItem(), true );
}
void ListBoxEditor::currentItemChanged( TQListBoxItem *i )
{
- itemText->blockSignals( TRUE );
+ itemText->blockSignals( true );
itemText->setText( "" );
itemPixmap->setText( "" );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
if ( !i ) {
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
return;
}
- itemText->blockSignals( TRUE );
- itemText->setEnabled( TRUE );
- itemChoosePixmap->setEnabled( TRUE );
+ itemText->blockSignals( true );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
itemText->setText( i->text() );
if ( i->pixmap() )
itemPixmap->setPixmap( *i->pixmap() );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
}
void ListBoxEditor::currentTextChanged( const TQString &txt )
@@ -130,12 +130,12 @@ void ListBoxEditor::currentTextChanged( const TQString &txt )
if ( preview->currentItem() == -1 )
return;
- preview->blockSignals( TRUE );
+ preview->blockSignals( true );
if ( preview->item( preview->currentItem() )->pixmap() )
preview->changeItem( *preview->item( preview->currentItem() )->pixmap(), txt, preview->currentItem() );
else
preview->changeItem( txt, preview->currentItem() );
- preview->blockSignals( FALSE );
+ preview->blockSignals( false );
}
void ListBoxEditor::okClicked()
@@ -183,7 +183,7 @@ void ListBoxEditor::choosePixmap()
TQString txt = preview->item( preview->currentItem() )->text();
preview->changeItem( pix, txt, preview->currentItem() );
- itemDeletePixmap->setEnabled( TRUE );
+ itemDeletePixmap->setEnabled( true );
}
void ListBoxEditor::moveItemUp()
@@ -241,5 +241,5 @@ void ListBoxEditor::deletePixmap()
TQListBoxItem *i = preview->item( preview->currentItem() );
preview->changeItem( i->text(), preview->currentItem() );
- itemDeletePixmap->setEnabled( FALSE );
+ itemDeletePixmap->setEnabled( false );
}
diff --git a/kdevdesigner/designer/listboxeditorimpl.h b/kdevdesigner/designer/listboxeditorimpl.h
index 28ca0254..7f0c9ee9 100644
--- a/kdevdesigner/designer/listboxeditorimpl.h
+++ b/kdevdesigner/designer/listboxeditorimpl.h
@@ -34,7 +34,7 @@ class FormWindow;
class ListBoxEditor : public ListBoxEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp
index 0a32d292..748bba88 100644
--- a/kdevdesigner/designer/listboxrename.cpp
+++ b/kdevdesigner/designer/listboxrename.cpp
@@ -40,16 +40,16 @@ public:
ListBoxRename::ListBoxRename( TQListBox * eventSource, const char * name )
: TQObject( eventSource, name ),
- clickedItem( 0 ), activity( FALSE )
+ clickedItem( 0 ), activity( false )
{
src = eventSource;
src->installEventFilter( this );
ed = new TQLineEdit( src->viewport() );
ed->hide();
- ed->setFrame( FALSE );
+ ed->setFrame( false );
- TQObject::connect( ed, TQT_SIGNAL( returnPressed() ),
- this, TQT_SLOT( renameClickedItem() ) );
+ TQObject::connect( ed, TQ_SIGNAL( returnPressed() ),
+ this, TQ_SLOT( renameClickedItem() ) );
}
bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
@@ -63,10 +63,10 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
if ( clickedItem &&
clickedItem->isSelected() &&
(clickedItem == src->itemAt( pos )) ) {
- TQTimer::singleShot( 500, this, TQT_SLOT( showLineEdit() ) );
- activity = FALSE; // no drags or clicks for 500 ms before we start the renaming
+ TQTimer::singleShot( 500, this, TQ_SLOT( showLineEdit() ) );
+ activity = false; // no drags or clicks for 500 ms before we start the renaming
} else { // new item clicked
- activity = TRUE;
+ activity = true;
clickedItem = src->itemAt( pos );
ed->hide();
}
@@ -75,8 +75,8 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQEvent::MouseMove:
- if ( ((TQMouseEvent *) event)->state() & Qt::LeftButton ) {
- activity = TRUE; // drag
+ if ( ((TQMouseEvent *) event)->state() & TQt::LeftButton ) {
+ activity = true; // drag
}
break;
@@ -86,7 +86,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_F2:
- activity = FALSE;
+ activity = false;
clickedItem = src->item( src->currentItem() );
showLineEdit();
break;
@@ -94,7 +94,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_Escape:
if ( !ed->isHidden() ) {
hideLineEdit(); // abort rename
- return TRUE;
+ return true;
}
break;
@@ -104,7 +104,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQt::Key_PageDown:
if ( !ed->isHidden() )
- return TRUE; // Filter out the keystrokes
+ return true; // Filter out the keystrokes
break;
}
@@ -123,7 +123,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
break;
}
- return FALSE;
+ return false;
}
void ListBoxRename::showLineEdit()
diff --git a/kdevdesigner/designer/listboxrename.h b/kdevdesigner/designer/listboxrename.h
index ec666f70..6246eca6 100644
--- a/kdevdesigner/designer/listboxrename.h
+++ b/kdevdesigner/designer/listboxrename.h
@@ -34,7 +34,7 @@ class TQLineEdit;
class ListBoxRename : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
ListBoxRename( TQListBox * eventSource, const char * name = 0 );
diff --git a/kdevdesigner/designer/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp
index 8431fd18..bb43ed02 100644
--- a/kdevdesigner/designer/listdnd.cpp
+++ b/kdevdesigner/designer/listdnd.cpp
@@ -30,10 +30,10 @@
ListDnd::ListDnd( TQScrollView * eventSource, const char * name )
: TQObject( eventSource, name ),
- dragInside( FALSE ), dragDelete( TRUE ), dropConfirmed( FALSE ), dMode( Both )
+ dragInside( false ), dragDelete( true ), dropConfirmed( false ), dMode( Both )
{
src = eventSource;
- src->setAcceptDrops( TRUE );
+ src->setAcceptDrops( true );
src->installEventFilter( this );
src->viewport()->installEventFilter( this );
@@ -71,14 +71,14 @@ bool ListDnd::eventFilter( TQObject *, TQEvent * event )
default:
break;
}
- return FALSE;
+ return false;
}
bool ListDnd::dragEnterEvent( TQDragEnterEvent * event )
{
if ( dMode == None ) {
- return TRUE;
+ return true;
}
bool ok = ( ( ( dMode & Both ) == Both ) ||
@@ -87,20 +87,20 @@ bool ListDnd::dragEnterEvent( TQDragEnterEvent * event )
if ( ok && canDecode( event ) ) {
event->accept();
- dragInside = TRUE;
+ dragInside = true;
if ( !( dMode & NullDrop ) ) {
updateLine( event->pos() );
line->show();
}
}
- return TRUE;
+ return true;
}
bool ListDnd::dragLeaveEvent( TQDragLeaveEvent * )
{
- dragInside = FALSE;
+ dragInside = false;
line->hide();
- return TRUE;
+ return true;
}
bool ListDnd::dragMoveEvent( TQDragMoveEvent * event )
@@ -108,26 +108,26 @@ bool ListDnd::dragMoveEvent( TQDragMoveEvent * event )
if ( dragInside && dMode && !( dMode & NullDrop ) ) {
updateLine( event->pos() );
}
- return TRUE;
+ return true;
}
bool ListDnd::dropEvent( TQDropEvent * )
{
// do nothing
- return FALSE;
+ return false;
}
bool ListDnd::mousePressEvent( TQMouseEvent * event )
{
- if ( event->button() == Qt::LeftButton )
+ if ( event->button() == TQt::LeftButton )
mousePressPos = event->pos();
- return FALSE;
+ return false;
}
bool ListDnd::mouseMoveEvent( TQMouseEvent * )
{
// do nothing
- return FALSE;
+ return false;
}
void ListDnd::updateLine( const TQPoint & )
@@ -138,5 +138,5 @@ void ListDnd::updateLine( const TQPoint & )
bool ListDnd::canDecode( TQDragEnterEvent * )
{
// do nothing
- return FALSE;
+ return false;
}
diff --git a/kdevdesigner/designer/listdnd.h b/kdevdesigner/designer/listdnd.h
index 39e1af11..27b6dc9f 100644
--- a/kdevdesigner/designer/listdnd.h
+++ b/kdevdesigner/designer/listdnd.h
@@ -32,7 +32,7 @@
class ListDnd : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
enum DragMode { None = 0, External = 1, Internal = 2, Both = 3, Move = 4, NullDrop = 8 };
diff --git a/kdevdesigner/designer/listeditor.ui b/kdevdesigner/designer/listeditor.ui
index addab137..2376ea9b 100644
--- a/kdevdesigner/designer/listeditor.ui
+++ b/kdevdesigner/designer/listeditor.ui
@@ -158,7 +158,7 @@
<forwards>
<forward>class TQStringList;</forward>
</forwards>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>setList( const TQStringList &amp; l )</slot>
<slot>addItem()</slot>
@@ -166,7 +166,7 @@
<slot>removeItems()</slot>
<slot returnType="TQStringList">items()</slot>
<slot>renameItem()</slot>
-</Q_SLOTS>
+</slots>
<pixmapfunction>BarIcon2</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
<includes>
diff --git a/kdevdesigner/designer/listeditor.ui.h b/kdevdesigner/designer/listeditor.ui.h
index 7f179cef..772d2290 100644
--- a/kdevdesigner/designer/listeditor.ui.h
+++ b/kdevdesigner/designer/listeditor.ui.h
@@ -22,14 +22,14 @@ void ListEditor::setList( const TQStringList &l )
for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) {
i = new TQListViewItem( listview, i );
i->setText( 0, *it );
- i->setRenameEnabled( 0, TRUE );
+ i->setRenameEnabled( 0, true );
}
}
void ListEditor::addItem()
{
TQListViewItem *i = new TQListViewItem( listview, listview->lastItem() );
- i->setRenameEnabled( 0, TRUE );
+ i->setRenameEnabled( 0, true );
tqApp->processEvents();
i->startRename( 0 );
}
diff --git a/kdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp
index 32dcc6d5..6a2b7130 100644
--- a/kdevdesigner/designer/listviewdnd.cpp
+++ b/kdevdesigner/designer/listviewdnd.cpp
@@ -48,7 +48,7 @@ ListViewDnd::ListViewDnd( TQListView * eventSource, const char * name )
void ListViewDnd::confirmDrop( TQListViewItem * )
{
- dropConfirmed = TRUE;
+ dropConfirmed = true;
}
bool ListViewDnd::dropEvent( TQDropEvent * event )
@@ -58,7 +58,7 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
if ( dMode & NullDrop ) { // combined with Move, a NullDrop will delete an item
event->accept();
emit dropped( 0 ); // a NullDrop
- return TRUE;
+ return true;
}
TQPoint pos = event->pos();
@@ -85,14 +85,14 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
}
line->hide();
- dragInside = FALSE;
+ dragInside = false;
- return TRUE;
+ return true;
}
bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
{
- if ( event->state() & Qt::LeftButton ) {
+ if ( event->state() & TQt::LeftButton ) {
if ( ( event->pos() - mousePressPos ).manhattanLength() > 3 ) {
ListViewItemList list;
@@ -105,7 +105,7 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
if ( dMode & Move ) {
disabledItems = list;
- setVisibleItems( FALSE );
+ setVisibleItems( false );
}
dragobject->dragCopy();
@@ -116,29 +116,29 @@ bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
// Shouldn't autoDelete handle this?
for( list.first(); list.current(); list.next() )
delete list.current();
- dropConfirmed = FALSE;
+ dropConfirmed = false;
} else {
// Reenable disabled items since
// drag'n'drop was aborted
- setVisibleItems( TRUE );
+ setVisibleItems( true );
}
disabledItems.clear();
}
}
}
- return FALSE;
+ return false;
}
int ListViewDnd::buildFlatList( ListViewItemList & list )
{
- bool addKids = FALSE;
+ bool addKids = false;
TQListViewItem *nextSibling = 0;
TQListViewItem *nextParent = 0;
TQListViewItemIterator it = ((TQListView *)src)->firstChild();
for ( ; *it; it++ ) {
// Hit the nextSibling, turn of child processing
if ( (*it) == nextSibling )
- addKids = FALSE;
+ addKids = false;
if ( (*it)->isSelected() ) {
if ( (*it)->childCount() == 0 ) {
@@ -148,7 +148,7 @@ int ListViewDnd::buildFlatList( ListViewItemList & list )
// Children processing not set, so set it
// Also find the item were we shall quit
// processing children...if any such item
- addKids = TRUE;
+ addKids = true;
nextSibling = (*it)->nextSibling();
nextParent = (*it)->parent();
while ( nextParent && !nextSibling ) {
@@ -303,15 +303,15 @@ bool ListViewItemDrag::decode( TQDropEvent * event, TQListView * parent, TQListV
for( int i = 0; i < count; i++ ) {
if ( itemParent ) {
insertPoint = new TQListViewItem( itemParent, insertPoint );
- itemParent->setOpen( TRUE );
+ itemParent->setOpen( true );
} else { // No parent for insertPoint, use TQListView
insertPoint = new TQListViewItem( parent, insertPoint );
}
stream >> *insertPoint;
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
diff --git a/kdevdesigner/designer/listviewdnd.h b/kdevdesigner/designer/listviewdnd.h
index 5a59f4ad..fca1ef93 100644
--- a/kdevdesigner/designer/listviewdnd.h
+++ b/kdevdesigner/designer/listviewdnd.h
@@ -37,7 +37,7 @@ typedef TQPtrList<TQListViewItem> ListViewItemList;
class ListViewDnd : public ListDnd
{
- Q_OBJECT
+ TQ_OBJECT
public:
enum DragMode { Flat = 16 }; // see ListDnd::DragMode
diff --git a/kdevdesigner/designer/listvieweditor.ui b/kdevdesigner/designer/listvieweditor.ui
index 8a0abe14..234b52ba 100644
--- a/kdevdesigner/designer/listvieweditor.ui
+++ b/kdevdesigner/designer/listvieweditor.ui
@@ -897,7 +897,7 @@
<tabstop>colClickable</tabstop>
<tabstop>colResizable</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">applyClicked()</slot>
@@ -925,7 +925,7 @@
<slot access="protected">newColumnClicked()</slot>
<slot access="protected">itemRightClicked()</slot>
<slot access="protected">okClicked()</slot>
-</Q_SLOTS>
+</slots>
<includes>
<include location="local" impldecl="in implementation">myiconloader.h</include>
</includes>
diff --git a/kdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp
index c5ec7498..69a99dfe 100644
--- a/kdevdesigner/designer/listvieweditorimpl.cpp
+++ b/kdevdesigner/designer/listvieweditorimpl.cpp
@@ -47,13 +47,13 @@
#include <tdelocale.h>
ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw )
- : ListViewEditorBase( parent, 0, TRUE ), listview( lv ), formwindow( fw )
+ : ListViewEditorBase( parent, 0, true ), listview( lv ), formwindow( fw )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
setupColumns();
PopulateListViewCommand::transferItems( listview, itemsPreview );
@@ -65,61 +65,61 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
- itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
// Clamp on drag and drop to TQListView
ListViewDnd *itemsDnd = new ListViewDnd( itemsPreview );
itemsDnd->setDragMode( ListViewDnd::Internal | ListViewDnd::Move );
- TQObject::connect( itemsDnd, TQT_SIGNAL( dropped( TQListViewItem * ) ),
- itemsDnd, TQT_SLOT( confirmDrop( TQListViewItem * ) ) );
+ TQObject::connect( itemsDnd, TQ_SIGNAL( dropped( TQListViewItem * ) ),
+ itemsDnd, TQ_SLOT( confirmDrop( TQListViewItem * ) ) );
// Enable rename for all TQListViewItems
TQListViewItemIterator it = ((TQListView *)itemsPreview)->firstChild();
for ( ; *it; it++ )
- (*it)->setRenameEnabled( 0, TRUE );
+ (*it)->setRenameEnabled( 0, true );
// Connect listview signal to signal-relay
TQObject::connect( itemsPreview,
- TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ),
this,
- TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
+ TQ_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) );
// Connect signal-relay to TQLineEdit "itemText"
- TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "itemText" );
+ TQObjectList *l = parent->queryList( "TQLineEdit", "itemText" );
TQObject *obj;
TQObjectListIt itemsLineEditIt( *l );
while ( (obj = itemsLineEditIt.current()) != 0 ) {
++itemsLineEditIt;
TQObject::connect( this,
- TQT_SIGNAL( itemRenamed( const TQString & ) ),
+ TQ_SIGNAL( itemRenamed( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
// Clamp on drag and drop to TQListBox
ListBoxDnd *columnsDnd = new ListBoxDnd( colPreview );
columnsDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- TQObject::connect( columnsDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
- columnsDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
+ TQObject::connect( columnsDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ),
+ columnsDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) );
// Clamp on rename to TQListBox
ListBoxRename *columnsRename = new ListBoxRename( colPreview );
TQObject::connect( columnsRename,
- TQT_SIGNAL( itemTextChanged( const TQString & ) ),
+ TQ_SIGNAL( itemTextChanged( const TQString & ) ),
this,
- TQT_SLOT( columnTextChanged( const TQString & ) ) );
+ TQ_SLOT( columnTextChanged( const TQString & ) ) );
// Find TQLineEdit "colText" and connect
- l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "colText" );
+ l = parent->queryList( "TQLineEdit", "colText" );
TQObjectListIt columnsLineEditIt( *l );
while ( (obj = columnsLineEditIt.current()) != 0 ) {
++columnsLineEditIt;
TQObject::connect( columnsRename,
- TQT_SIGNAL( itemTextChanged( const TQString & ) ),
+ TQ_SIGNAL( itemTextChanged( const TQString & ) ),
obj,
- TQT_SLOT( setText( const TQString & ) ) );
+ TQ_SLOT( setText( const TQString & ) ) );
}
delete l;
}
@@ -161,7 +161,7 @@ void ListViewEditor::columnDownClicked()
colPreview->insertItem( i, below );
colPreview->setCurrentItem( i );
- colPreview->setSelected( i, TRUE );
+ colPreview->setSelected( i, true );
}
void ListViewEditor::columnPixmapChosen()
@@ -180,15 +180,15 @@ void ListViewEditor::columnPixmapChosen()
return;
c->pixmap = pix;
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setPixmap( c->pixmap );
- colPreview->blockSignals( FALSE );
- colDeletePixmap->setEnabled( TRUE );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( true );
}
void ListViewEditor::columnPixmapDeleted()
@@ -198,15 +198,15 @@ void ListViewEditor::columnPixmapDeleted()
return;
c->pixmap = TQPixmap();
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
colPixmap->setText( "" );
- colPreview->blockSignals( FALSE );
- colDeletePixmap->setEnabled( FALSE );
+ colPreview->blockSignals( false );
+ colDeletePixmap->setEnabled( false );
}
void ListViewEditor::columnResizable( bool b )
@@ -224,13 +224,13 @@ void ListViewEditor::columnTextChanged( const TQString &txt )
return;
c->text = txt;
- colPreview->blockSignals( TRUE );
+ colPreview->blockSignals( true );
if ( !c->pixmap.isNull() )
colPreview->changeItem( c->pixmap, c->text, colPreview->index( c->item ) );
else
colPreview->changeItem( c->text, colPreview->index( c->item ) );
c->item = colPreview->item( colPreview->currentItem() );
- colPreview->blockSignals( FALSE );
+ colPreview->blockSignals( false );
}
void ListViewEditor::columnUpClicked()
@@ -246,33 +246,33 @@ void ListViewEditor::columnUpClicked()
colPreview->insertItem( above, i );
colPreview->setCurrentItem( i );
- colPreview->setSelected( i, TRUE );
+ colPreview->setSelected( i, true );
}
void ListViewEditor::currentColumnChanged( TQListBoxItem *i )
{
Column *c = findColumn( i );
if ( !i || !c ) {
- colText->setEnabled( FALSE );
- colPixmap->setEnabled( FALSE );
- colDeletePixmap->setEnabled( FALSE );
- colText->blockSignals( TRUE );
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colDeletePixmap->setEnabled( false );
+ colText->blockSignals( true );
colText->setText( "" );
- colText->blockSignals( FALSE );
- colClickable->setEnabled( FALSE );
- colResizable->setEnabled( FALSE );
+ colText->blockSignals( false );
+ colClickable->setEnabled( false );
+ colResizable->setEnabled( false );
return;
}
- colText->setEnabled( TRUE );
- colPixmap->setEnabled( TRUE );
+ colText->setEnabled( true );
+ colPixmap->setEnabled( true );
colDeletePixmap->setEnabled( i->pixmap() && !i->pixmap()->isNull() );
- colClickable->setEnabled( TRUE );
- colResizable->setEnabled( TRUE );
+ colClickable->setEnabled( true );
+ colResizable->setEnabled( true );
- colText->blockSignals( TRUE );
+ colText->blockSignals( true );
colText->setText( c->text );
- colText->blockSignals( FALSE );
+ colText->blockSignals( false );
if ( !c->pixmap.isNull() )
colPixmap->setPixmap( c->pixmap );
else
@@ -286,15 +286,15 @@ void ListViewEditor::newColumnClicked()
Column col;
col.text = i18n( "New Column" );
col.pixmap = TQPixmap();
- col.clickable = TRUE;
- col.resizable = TRUE;
+ col.clickable = true;
+ col.resizable = true;
if ( !col.pixmap.isNull() )
col.item = new TQListBoxPixmap( colPreview, col.pixmap, col.text );
else
col.item = new TQListBoxText( colPreview, col.text );
columns.append( col );
colPreview->setCurrentItem( col.item );
- colPreview->setSelected( col.item, TRUE );
+ colPreview->setSelected( col.item, true );
}
void ListViewEditor::deleteColumnClicked()
@@ -312,40 +312,40 @@ void ListViewEditor::deleteColumnClicked()
}
if ( colPreview->currentItem() != -1 )
- colPreview->setSelected( colPreview->currentItem(), TRUE );
+ colPreview->setSelected( colPreview->currentItem(), true );
}
void ListViewEditor::currentItemChanged( TQListViewItem *i )
{
if ( !i ) {
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
return;
}
- itemText->setEnabled( TRUE );
- itemChoosePixmap->setEnabled( TRUE );
+ itemText->setEnabled( true );
+ itemChoosePixmap->setEnabled( true );
itemDeletePixmap->setEnabled( i->pixmap( itemColumn->value() ) &&
!i->pixmap( itemColumn->value() )->isNull() );
- itemColumn->setEnabled( TRUE );
+ itemColumn->setEnabled( true );
displayItem( i, itemColumn->value() );
}
void ListViewEditor::displayItem( TQListViewItem *i, int col )
{
- itemText->blockSignals( TRUE );
+ itemText->blockSignals( true );
itemText->setText( i->text( col ) );
- itemText->blockSignals( FALSE );
+ itemText->blockSignals( false );
- itemPixmap->blockSignals( TRUE );
+ itemPixmap->blockSignals( true );
if ( i->pixmap( col ) )
itemPixmap->setPixmap( *i->pixmap( col ) );
else
itemPixmap->setText( "" );
- itemPixmap->blockSignals( FALSE );
+ itemPixmap->blockSignals( false );
}
void ListViewEditor::itemColChanged( int col )
@@ -367,7 +367,7 @@ void ListViewEditor::itemDeleteClicked()
delete i;
if ( itemsPreview->firstChild() ) {
itemsPreview->setCurrentItem( itemsPreview->firstChild() );
- itemsPreview->setSelected( itemsPreview->firstChild(), TRUE );
+ itemsPreview->setSelected( itemsPreview->firstChild(), true );
}
}
@@ -397,9 +397,9 @@ void ListViewEditor::itemNewClicked()
{
TQListViewItem *item = new TQListViewItem( itemsPreview );
item->setText( 0, i18n( "Item" ) );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
- itemsPreview->setSelected( item, TRUE );
+ itemsPreview->setSelected( item, true );
itemText->setFocus();
itemText->selectAll();
}
@@ -410,14 +410,14 @@ void ListViewEditor::itemNewSubClicked()
TQListViewItem *item = 0;
if ( parent ) {
item = new TQListViewItem( parent );
- parent->setOpen( TRUE );
+ parent->setOpen( true );
} else {
item = new TQListViewItem( itemsPreview );
}
item->setText( 0, i18n( "Subitem" ) );
- item->setRenameEnabled( 0, TRUE );
+ item->setRenameEnabled( 0, true );
itemsPreview->setCurrentItem( item );
- itemsPreview->setSelected( item, TRUE );
+ itemsPreview->setSelected( item, true );
}
void ListViewEditor::itemPixmapChoosen()
@@ -437,7 +437,7 @@ void ListViewEditor::itemPixmapChoosen()
i->setPixmap( itemColumn->value(), TQPixmap( pix ) );
itemPixmap->setPixmap( pix );
- itemDeletePixmap->setEnabled( TRUE );
+ itemDeletePixmap->setEnabled( true );
}
void ListViewEditor::itemPixmapDeleted()
@@ -448,7 +448,7 @@ void ListViewEditor::itemPixmapDeleted()
i->setPixmap( itemColumn->value(), TQPixmap() );
itemPixmap->setText( "" );
- itemDeletePixmap->setEnabled( FALSE );
+ itemDeletePixmap->setEnabled( false );
}
void ListViewEditor::itemTextChanged( const TQString &txt )
@@ -518,7 +518,7 @@ void ListViewEditor::itemRightClicked()
}
itemsPreview->setCurrentItem( other );
- itemsPreview->setSelected( other, TRUE );
+ itemsPreview->setSelected( other, true );
}
void ListViewEditor::itemLeftClicked()
@@ -558,7 +558,7 @@ void ListViewEditor::itemLeftClicked()
}
itemsPreview->setCurrentItem( other );
- itemsPreview->setSelected( other, TRUE );
+ itemsPreview->setSelected( other, true );
}
void ListViewEditor::setupColumns()
@@ -579,10 +579,10 @@ void ListViewEditor::setupColumns()
columns.append( col );
}
- colText->setEnabled( FALSE );
- colPixmap->setEnabled( FALSE );
- colClickable->setEnabled( FALSE );
- colResizable->setEnabled( FALSE );
+ colText->setEnabled( false );
+ colPixmap->setEnabled( false );
+ colClickable->setEnabled( false );
+ colResizable->setEnabled( false );
if ( colPreview->firstItem() )
colPreview->setCurrentItem( colPreview->firstItem() );
@@ -631,15 +631,15 @@ void ListViewEditor::initTabPage( const TQString &page )
if ( page == i18n( "&Items" ) ) {
setupItems();
if ( numColumns == 0 ) {
- itemNew->setEnabled( FALSE );
- itemNewSub->setEnabled( FALSE );
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ itemNew->setEnabled( false );
+ itemNewSub->setEnabled( false );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
} else {
- itemNew->setEnabled( TRUE );
- itemNewSub->setEnabled( TRUE );
+ itemNew->setEnabled( true );
+ itemNewSub->setEnabled( true );
}
}
}
diff --git a/kdevdesigner/designer/listvieweditorimpl.h b/kdevdesigner/designer/listvieweditorimpl.h
index 64048c9d..2644d4d8 100644
--- a/kdevdesigner/designer/listvieweditorimpl.h
+++ b/kdevdesigner/designer/listvieweditorimpl.h
@@ -37,7 +37,7 @@ class FormWindow;
class ListViewEditor : public ListViewEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp
index 5d64f8bf..050fc1b2 100644
--- a/kdevdesigner/designer/mainwindow.cpp
+++ b/kdevdesigner/designer/mainwindow.cpp
@@ -119,7 +119,7 @@
#include "kdevdesigner_part.h"
-static bool mblockNewForms = FALSE;
+static bool mblockNewForms = false;
extern TQMap<TQWidget*, TQString> *qwf_forms;
extern TQString *qwf_language;
extern bool qwf_execute_code;
@@ -151,9 +151,9 @@ static TQString textNoAccel( const TQString& text)
MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir )
: TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ),
- grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ),
+ grd( 10, 10 ), sGrid( true ), snGrid( true ), restoreConfig( true ), splashScreen( true ),
fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ),
- previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part)
+ previewing( false ), databaseAutoEdit( false ), autoSaveEnabled( false ), autoSaveInterval( 1800 ), m_part(part)
{
// extern void qInitImages_designercore();
// qInitImages_designercore();
@@ -161,24 +161,24 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
self = this;
setPluginDirectory( plgDir );
customWidgetToolBar = customWidgetToolBar2 = 0;
- guiStuffVisible = TRUE;
- editorsReadOnly = FALSE;
- sSignalHandlers = TRUE;
+ guiStuffVisible = true;
+ editorsReadOnly = false;
+ sSignalHandlers = true;
init_colors();
- shStartDialog = FALSE;
+ shStartDialog = false;
desInterface = new DesignerInterfaceImpl( this );
desInterface->addRef();
- inDebugMode = FALSE;
- savePluginPaths = FALSE;
+ inDebugMode = false;
+ savePluginPaths = false;
updateFunctionsTimer = new TQTimer( this );
- connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( doFunctionsChanged() ) );
+ connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( doFunctionsChanged() ) );
autoSaveTimer = new TQTimer( this );
- connect( autoSaveTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( fileSaveAll() ) );
+ connect( autoSaveTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( fileSaveAll() ) );
set_splash_status( "Loading Plugins..." );
setupPluginManagers();
@@ -201,12 +201,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
singleProject = single;
statusBar()->clear();
-#if defined(TQT_NON_COMMERCIAL)
- statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - "
- "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 );
-#else
statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 );
-#endif
set_splash_status( "Setting up GUI..." );
@@ -239,11 +234,11 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
setupRMBMenus();
- connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) );
- connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) );
+ connect( this, TQ_SIGNAL( projectChanged() ), this, TQ_SLOT( emitProjectSignals() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), this, TQ_SLOT( emitProjectSignals() ) );
- emit hasActiveForm( FALSE );
- emit hasActiveWindow( FALSE );
+ emit hasActiveForm( false );
+ emit hasActiveWindow( false );
lastPressWidget = 0;
tqApp->installEventFilter( this );
@@ -252,41 +247,41 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
as -= TQSize( 30, 30 );
resize( TQSize( 1200, 1000 ).boundedTo( as ) );
- connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ),
- this, TQT_SLOT( clipboardChanged() ) );
+ connect( tqApp->clipboard(), TQ_SIGNAL( dataChanged() ),
+ this, TQ_SLOT( clipboardChanged() ) );
clipboardChanged();
- layoutChilds = FALSE;
- layoutSelected = FALSE;
- breakLayout = FALSE;
- backPix = TRUE;
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
+ backPix = true;
set_splash_status( "Loading User Settings..." );
readConfig();
// hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties)
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, false );
delete w;
- setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), false );
actionEditor->parentWidget()->hide();
- assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) );
+ assistant = new TQAssistantClient( assistantPath(), this );
- statusBar()->setSizeGripEnabled( TRUE );
+ statusBar()->setSizeGripEnabled( true );
set_splash_status( "Initialization Done." );
/* if ( shStartDialog )
- TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/
+ TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/
if ( autoSaveEnabled )
autoSaveTimer->start( autoSaveInterval * 1000 );
- setFocusPolicy( TQ_StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
MainWindow::~MainWindow()
@@ -337,11 +332,11 @@ void MainWindow::setupMDI()
vbox->setLineWidth( 1 );
qworkspace = new TQWorkspace( vbox );
qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) );
- qworkspace->setScrollBarsEnabled( TRUE );
- connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ),
- this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) );
+ qworkspace->setScrollBarsEnabled( true );
+ connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ),
+ this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) );
lastActiveFormWindow = 0;
- qworkspace->setAcceptDrops( TRUE );
+ qworkspace->setAcceptDrops( true );
}
void MainWindow::setupMenuBar()
@@ -352,7 +347,7 @@ void MainWindow::setupMenuBar()
void MainWindow::setupPropertyEditor()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
propertyEditor = new PropertyEditor( dw );
addToolBar( dw, TQt::DockRight );
@@ -381,7 +376,7 @@ void MainWindow::setupPropertyEditor()
void MainWindow::setupOutputWindow()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, TQt::DockBottom );
oWindow = new OutputWindow( dw );
@@ -395,7 +390,7 @@ void MainWindow::setupHierarchyView()
if ( hierarchyView )
return;
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
hierarchyView = new HierarchyView( dw );
addToolBar( dw, TQt::DockRight );
@@ -417,13 +412,13 @@ void MainWindow::setupHierarchyView()
void MainWindow::setupWorkspace()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
TQVBox *vbox = new TQVBox( dw );
QCompletionEdit *edit = new QCompletionEdit( vbox );
TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) );
TQAccel *a = new TQAccel( this );
- a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) );
+ a->connectItem( a->insertItem( ALT + Key_B ), edit, TQ_SLOT( setFocus() ) );
wspace = new Workspace( vbox, this );
wspace->setBufferEdit( edit );
wspace->setCurrentProject( currentProject );
@@ -443,7 +438,7 @@ void MainWindow::setupActionEditor()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 );
addDockWindow( dw, TQt::DockTornOff );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
actionEditor = new ActionEditor( dw );
dw->setWidget( actionEditor );
@@ -457,13 +452,13 @@ void MainWindow::setupActionEditor()
"these are displayed on toolbar buttons and besides their names in "
"menus.</p>" ) );
dw->hide();
- setAppropriate( dw, FALSE );
+ setAppropriate( dw, false );
}
void MainWindow::setupToolbox()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, TQt::DockLeft );
toolBox = new TQToolBox( dw );
@@ -471,11 +466,11 @@ void MainWindow::setupToolbox()
dw->setFixedExtentWidth( 160 );
dw->setCaption( i18n( "Toolbox" ) );
dw->show();
- setDockEnabled( dw, TQt::DockTop, FALSE );
- setDockEnabled( dw, TQt::DockBottom, FALSE );
- commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" );
+ setDockEnabled( dw, TQt::DockTop, false );
+ setDockEnabled( dw, TQt::DockBottom, false );
+ commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, false, "Common Widgets" );
commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame );
- commonWidgetsToolBar->setOrientation( Qt::Vertical );
+ commonWidgetsToolBar->setOrientation( TQt::Vertical );
commonWidgetsToolBar->setBackgroundMode(PaletteBase);
toolBox->addItem( commonWidgetsToolBar, "Common Widgets" );
}
@@ -553,14 +548,14 @@ void MainWindow::runProjectPrecondition()
oWindow->clearErrorMessages();
oWindow->clearDebug();
oWindow->showDebugTab();
- previewing = TRUE;
+ previewing = true;
}
void MainWindow::runProjectPostcondition( TQObjectList *l )
{
- inDebugMode = TRUE;
+ inDebugMode = true;
debuggingForms = *l;
- enableAll( FALSE );
+ enableAll( false );
for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) {
if ( e2->project() == currentProject )
e2->editorInterface()->setMode( EditorInterface::Debugging );
@@ -569,7 +564,7 @@ void MainWindow::runProjectPostcondition( TQObjectList *l )
TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
{
- qwf_execute_code = FALSE;
+ qwf_execute_code = false;
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
e->save();
if ( currentTool() == ORDER_TOOL )
@@ -582,7 +577,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
TQStringList databases;
TQPtrDictIterator<TQWidget> wit( *fw->widgets() );
while ( wit.current() ) {
- TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList();
+ TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList();
if ( !lst.isEmpty() )
databases << lst [ 0 ];
++wit;
@@ -591,7 +586,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
if ( fw->project() ) {
TQStringList::ConstIterator it;
for ( it = databases.begin(); it != databases.end(); ++it )
- fw->project()->openDatabase( *it, FALSE );
+ fw->project()->openDatabase( *it, false );
}
TQApplication::setOverrideCursor( WaitCursor );
@@ -601,12 +596,12 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
Resource resource( this );
resource.setWidget( fw );
TQValueList<Resource::Image> images;
- resource.save( TQT_TQIODEVICE(&buffer) );
+ resource.save( &buffer );
buffer.close();
buffer.open( IO_ReadOnly );
- TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) );
+ TQWidget *w = TQWidgetFactory::create( &buffer );
if ( w ) {
previewedForm = w;
if ( palet ) {
@@ -618,7 +613,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
if ( style )
w->setStyle( style );
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( style )
( (TQWidget*)o )->setStyle( style );
@@ -627,9 +622,9 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
w->move( fw->mapToGlobal( TQPoint(0,0) ) );
((MainWindow*)w )->setWFlags( WDestructiveClose );
- previewing = TRUE;
+ previewing = true;
w->show();
- previewing = FALSE;
+ previewing = false;
TQApplication::restoreOverrideCursor();
return w;
}
@@ -729,17 +724,17 @@ void MainWindow::previewForm( const TQString & style )
if ( !w )
return;
- w->insertChild( TQT_TQOBJECT(st) );
+ w->insertChild( st );
w->show();
}
void MainWindow::helpContents()
{
TQWidget *focusWidget = tqApp->focusWidget();
- bool showClassDocu = TRUE;
+ bool showClassDocu = true;
while ( focusWidget ) {
if ( focusWidget->isA( "PropertyList" ) ) {
- showClassDocu = FALSE;
+ showClassDocu = false;
break;
}
focusWidget = focusWidget->parentWidget();
@@ -793,7 +788,7 @@ void MainWindow::helpContents()
if ( source.isEmpty() || source == "designer-manual.html" ) {
if ( classname.lower() == "spacer" )
source = "qspaceritem.html#details";
- else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
+ else if ( classname == "TQLayoutWidget" )
source = "layout.html";
else
source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
@@ -813,7 +808,7 @@ void MainWindow::helpManual()
void MainWindow::helpAbout()
{
- AboutDialog dlg( this, 0, TRUE );
+ AboutDialog dlg( this, 0, true );
if ( singleProjectMode() ) {
dlg.aboutPixmap->setText( "" );
dlg.aboutVersion->setText( "" );
@@ -886,14 +881,14 @@ void MainWindow::showProperties( TQObject *o )
if ( !o->isWidgetType() ) {
propertyEditor->setWidget( o, lastActiveFormWindow );
if ( lastActiveFormWindow )
- hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) );
+ hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() );
else
hierarchyView->setFormWindow( 0, 0 );
return;
}
TQWidget *w = (TQWidget*)o;
setupHierarchyView();
- FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) );
+ FormWindow *fw = (FormWindow*)isAFormWindowChild( w );
if ( fw ) {
if ( fw->numSelectedWidgets() > 1 ) {
TQWidgetList wl = fw->selectedWidgets();
@@ -903,22 +898,22 @@ void MainWindow::showProperties( TQObject *o )
}
propertyEditor->setWidget( new PropertyObject( wl ), fw );
} else {
- propertyEditor->setWidget( TQT_TQOBJECT(w), fw );
+ propertyEditor->setWidget( w, fw );
}
- hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) );
+ hierarchyView->setFormWindow( fw, w );
} else {
propertyEditor->setWidget( 0, 0 );
hierarchyView->setFormWindow( 0, 0 );
}
if ( currentTool() == POINTER_TOOL && fw &&
- ( !qworkspace->activeWindow() || !::tqqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
+ ( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
fw->setFocus();
}
void MainWindow::resetTool()
{
- actionPointerTool->setOn( TRUE );
+ actionPointerTool->setOn( true );
}
void MainWindow::updateProperties( TQObject * )
@@ -929,21 +924,21 @@ void MainWindow::updateProperties( TQObject * )
bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
{
- if ( ::tqqt_cast<MenuBarEditor*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ||
+ if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ||
( o &&
- ( ::tqqt_cast<MenuBarEditor*>(o->parent()) ||
- ::tqqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
+ ( ::tqt_cast<MenuBarEditor*>(o->parent()) ||
+ ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
- if ( e->type() == TQEvent::Accel && ::tqqt_cast<PopupMenuEditor*>(o) ) {
- return TRUE; // consume accel events
- } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<MenuBarEditor*>(o) ) {
+ if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) {
+ return true; // consume accel events
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) {
TQPoint pos = ((TQMouseEvent*)e)->pos();
- MenuBarEditor *m = ::tqqt_cast<MenuBarEditor*>(o);
+ MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o);
showProperties( o );
if ( m->findItem( pos ) >= m->count() )
m->setFocus();
- } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<PopupMenuEditor*>(o) ) {
- PopupMenuEditor *m = ::tqqt_cast<PopupMenuEditor*>(o);
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<PopupMenuEditor*>(o) ) {
+ PopupMenuEditor *m = ::tqt_cast<PopupMenuEditor*>(o);
PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() );
if ( m->find( i->action() ) != -1 && !i->isSeparator() )
showProperties( i->action() );
@@ -962,14 +957,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
w = (TQWidget*)o;
while ( w ) {
- if ( ::tqqt_cast<PropertyList*>(w) )
+ if ( ::tqt_cast<PropertyList*>(w) )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
if ( w ) {
propertyEditor->propertyList()->showCurrentWhatsThis();
( (TQKeyEvent*)e )->accept();
- return TRUE;
+ return true;
}
}
break;
@@ -978,53 +973,53 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( (TQKeyEvent*)e )->key() == Key_E ) &&
( (TQKeyEvent*)e )->state() & ControlButton ) {
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (TQKeyEvent*)e )->ignore();
- return TRUE;
+ return true;
}
}
break;
case TQEvent::ContextMenu:
case TQEvent::MouseButtonPress:
if ( o && currentTool() == POINTER_TOOL &&
- ( ::tqqt_cast<MenuBarEditor*>(o) ||
- ::tqqt_cast<PopupMenuEditor*>(o) ||
- ::tqqt_cast<QDesignerToolBar*>(o) ||
- ( ::tqqt_cast<TQComboBox*>(o) ||
- ::tqqt_cast<TQToolButton*>(o) ||
- ::tqqt_cast<QDesignerToolBarSeparator*>(o) ) &&
+ ( ::tqt_cast<MenuBarEditor*>(o) ||
+ ::tqt_cast<PopupMenuEditor*>(o) ||
+ ::tqt_cast<QDesignerToolBar*>(o) ||
+ ( ::tqt_cast<TQComboBox*>(o) ||
+ ::tqt_cast<TQToolButton*>(o) ||
+ ::tqt_cast<QDesignerToolBarSeparator*>(o) ) &&
o->parent()
- && ( ::tqqt_cast<QDesignerToolBar*>(o->parent())
- || ::tqqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) {
+ && ( ::tqt_cast<QDesignerToolBar*>(o->parent())
+ || ::tqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) {
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQToolButton*>(w) ||
- ::tqqt_cast<TQComboBox*>(w) ||
- ::tqqt_cast<PopupMenuEditor*>(w) ||
- ::tqqt_cast<QDesignerToolBarSeparator*>(w) )
+ if ( ::tqt_cast<TQToolButton*>(w) ||
+ ::tqt_cast<TQComboBox*>(w) ||
+ ::tqt_cast<PopupMenuEditor*>(w) ||
+ ::tqt_cast<QDesignerToolBarSeparator*>(w) )
w = w->parentWidget();
TQWidget *pw = w->parentWidget();
while ( pw ) {
- if ( ::tqqt_cast<FormWindow*>(pw) ) {
- ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) );
- if ( !::tqqt_cast<QDesignerToolBar*>(o) )
- return ( !::tqqt_cast<TQToolButton*>(o) &&
- !::tqqt_cast<MenuBarEditor*>(o) &&
- !::tqqt_cast<TQComboBox*>(o) &&
- !::tqqt_cast<QDesignerToolBarSeparator*>(o) );
+ if ( ::tqt_cast<FormWindow*>(pw) ) {
+ ( (FormWindow*)pw )->emitShowProperties( w );
+ if ( !::tqt_cast<QDesignerToolBar*>(o) )
+ return ( !::tqt_cast<TQToolButton*>(o) &&
+ !::tqt_cast<MenuBarEditor*>(o) &&
+ !::tqt_cast<TQComboBox*>(o) &&
+ !::tqt_cast<QDesignerToolBarSeparator*>(o) );
}
pw = pw->parentWidget();
}
}
- if ( o && ( ::tqqt_cast<QDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
+ if ( o && ( ::tqt_cast<QDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") )
&& e->type() == TQEvent::ContextMenu )
break;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::tqqt_cast<TQSizeGrip*>(o) )
+ if ( ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
if ( !w->hasFocus() )
w->setFocus();
@@ -1033,7 +1028,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if( e->type() == TQEvent::ContextMenu ) {
( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
- return TRUE;
+ return true;
} else {
( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
@@ -1041,27 +1036,27 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
}
lastPressWidget = (TQWidget*)o;
if ( passiveInteractor )
- TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) );
if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL )
- return TRUE;
+ return true;
return !passiveInteractor;
case TQEvent::MouseButtonRelease:
lastPressWidget = 0;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::tqqt_cast<TQSizeGrip*>(o) )
+ if ( ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
if ( passiveInteractor ) {
- TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) );
- TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( selectionChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) );
}
return !passiveInteractor;
case TQEvent::MouseMove:
@@ -1069,15 +1064,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break;
w = isAFormWindowChild( o );
if ( lastPressWidget != (TQWidget*)o && w &&
- !::tqqt_cast<SizeHandle*>(o) && !::tqqt_cast<OrderIndicator*>(o) &&
- !::tqqt_cast<PopupMenuEditor*>(o) && !::tqqt_cast<TQMenuBar*>(o) &&
- !::tqqt_cast<TQSizeGrip*>(o) )
- return TRUE;
- if ( o && ::tqqt_cast<TQSizeGrip*>(o) )
+ !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) &&
+ !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) &&
+ !::tqt_cast<TQSizeGrip*>(o) )
+ return true;
+ if ( o && ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( lastPressWidget != (TQWidget*)o ||
- ( !w || ::tqqt_cast<SizeHandle*>(o) ) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ( !w || ::tqt_cast<SizeHandle*>(o) ) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
@@ -1087,69 +1082,69 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::KeyPress:
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) {
resetTool();
- return FALSE;
+ return false;
}
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
- if ( ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
qWorkspace()->activeWindow()->setFocus();
- return TRUE;
+ return true;
}
}
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::MouseButtonDblClick:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) ) {
- if ( ::tqqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
- o->parent() && ::tqqt_cast<TQToolBar*>(o->parent()) && formWindow() )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) ) {
+ if ( ::tqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
+ o->parent() && ::tqt_cast<TQToolBar*>(o->parent()) && formWindow() )
formWindow()->setToolFixed();
break;
}
if ( currentTool() == ORDER_TOOL ) {
( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
- return TRUE;
+ return true;
}
if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() )
return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w );
- return TRUE;
+ return true;
case TQEvent::KeyRelease:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::Hide:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
- if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) )
- ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE );
+ if ( ( (FormWindow*)w )->isWidgetSelected( o ) )
+ ( (FormWindow*)w )->selectWidget( o, false );
break;
case TQEvent::Enter:
case TQEvent::Leave:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) ||
- ::tqqt_cast<MenuBarEditor*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) ||
+ ::tqt_cast<MenuBarEditor*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::Resize:
case TQEvent::Move:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) {
( (FormWindow*)w )->updateSelection( (TQWidget*)o );
@@ -1161,68 +1156,68 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) {
if ( lastActiveFormWindow && lastActiveFormWindow->project() ) {
TQStringList lst =
- MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList();
+ MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList();
lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] );
}
}
break;
case TQEvent::DragEnter:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::DragMove:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Drop:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDropEvent( (TQDropEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Show:
- if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) )
+ if ( o != this )
break;
if ( ((TQShowEvent*)e)->spontaneous() )
break;
TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted );
showEvent( (TQShowEvent*)e );
checkTempFiles();
- return TRUE;
+ return true;
case TQEvent::Wheel:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::FocusIn:
- if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE; //FIXME
+ if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
+ return true; //FIXME
if ( hierarchyView->formDefinitionView()->isRenaming()
- && ( o->inherits( "Editor" ) || ::tqqt_cast<FormWindow*>(o) ) )
+ && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) )
TQApplication::sendPostedEvents();
if ( o->inherits( "Editor" ) ) {
TQWidget *w = (TQWidget*)o;
while ( w ) {
- if ( ::tqqt_cast<SourceEditor*>(w) )
+ if ( ::tqt_cast<SourceEditor*>(w) )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
- if ( ::tqqt_cast<SourceEditor*>(w) )
+ if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->checkTimeStamp();
- } else if ( ::tqqt_cast<FormWindow*>(o) ) {
+ } else if ( ::tqt_cast<FormWindow*>(o) ) {
FormWindow *fw = (FormWindow*)o;
if ( fw->formFile() && fw->formFile()->editor() )
fw->formFile()->editor()->checkTimeStamp();
}
break;
case TQEvent::FocusOut:
- if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE;
+ if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
+ return true;
break;
default:
return TQMainWindow::eventFilter( o, e );
@@ -1233,10 +1228,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
{
- if ( ::tqqt_cast<TQWizard*>(o->parent()) && !::tqqt_cast<TQPushButton*>(o) )
+ if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) )
return 0;
while ( o ) {
- if ( ::tqqt_cast<FormWindow*>(o) )
+ if ( ::tqt_cast<FormWindow*>(o) )
return (TQWidget*)o;
o = o->parent();
}
@@ -1246,9 +1241,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
{
while ( o ) {
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
return (TQWidget*)o;
- if ( ::tqqt_cast<FormWindow*>(o) )
+ if ( ::tqt_cast<FormWindow*>(o) )
return 0;
o = o->parent();
}
@@ -1259,7 +1254,7 @@ FormWindow *MainWindow::formWindow()
{
if ( qworkspace->activeWindow() ) {
FormWindow *fw = 0;
- if ( ::tqqt_cast<FormWindow*>(qworkspace->activeWindow()) )
+ if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) )
fw = (FormWindow*)qworkspace->activeWindow();
else if ( lastActiveFormWindow &&
qworkspace->windowList().find( lastActiveFormWindow ) != -1)
@@ -1290,16 +1285,16 @@ void MainWindow::insertFormWindow( FormWindow *fw )
"<p>You can have several forms open, and all open forms are listed "
"in the <b>Form List</b>.") );
- connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ),
- this, TQT_SLOT( showProperties( TQObject * ) ) );
- connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ),
- this, TQT_SLOT( updateProperties( TQObject * ) ) );
- connect( this, TQT_SIGNAL( currentToolChanged() ),
- fw, TQT_SLOT( currentToolChanged() ) );
- connect( fw, TQT_SIGNAL( selectionChanged() ),
- this, TQT_SLOT( selectionChanged() ) );
- connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
- this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) );
+ connect( fw, TQ_SIGNAL( showProperties( TQObject * ) ),
+ this, TQ_SLOT( showProperties( TQObject * ) ) );
+ connect( fw, TQ_SIGNAL( updateProperties( TQObject * ) ),
+ this, TQ_SLOT( updateProperties( TQObject * ) ) );
+ connect( this, TQ_SIGNAL( currentToolChanged() ),
+ fw, TQ_SLOT( currentToolChanged() ) );
+ connect( fw, TQ_SIGNAL( selectionChanged() ),
+ this, TQ_SLOT( selectionChanged() ) );
+ connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ this, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) );
if ( !mblockNewForms ) {
} else {
@@ -1310,9 +1305,9 @@ void MainWindow::insertFormWindow( FormWindow *fw )
if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) )
fw->setCaption( fw->name() );
fw->mainContainer()->setCaption( fw->caption() );
- WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()),
+ WidgetFactory::saveDefaultProperties( fw->mainContainer(),
WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) );
+ idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) );
activeWindowChanged( fw );
emit formWindowsChanged();
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
@@ -1339,7 +1334,7 @@ void MainWindow::createNewProject( const TQString &lang )
}
TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ),
- pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE );
+ pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, true );
projects.insert( a, pro );
addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects );
projectSelected( a );
@@ -1354,9 +1349,9 @@ bool MainWindow::unregisterClient( FormWindow *w )
lastActiveFormWindow = 0;
TQPtrList<SourceEditor> waitingForDelete;
- waitingForDelete.setAutoDelete( TRUE );
+ waitingForDelete.setAutoDelete( true );
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
- if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) )
+ if ( e->object() == w )
waitingForDelete.append( e );
}
@@ -1365,18 +1360,18 @@ bool MainWindow::unregisterClient( FormWindow *w )
actionEditor->parentWidget()->hide();
}
- return TRUE;
+ return true;
}
void MainWindow::activeWindowChanged( TQWidget *w )
{
TQWidget *old = formWindow();
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
FormWindow *fw = (FormWindow*)w;
FormWindow *ofw = lastActiveFormWindow;
lastActiveFormWindow = fw;
lastActiveFormWindow->updateUndoInfo();
- emit hasActiveForm( TRUE );
+ emit hasActiveForm( true );
if ( formWindow() ) {
formWindow()->emitShowProperties();
emit formModified( formWindow()->commandHistory()->isModified() );
@@ -1385,13 +1380,13 @@ void MainWindow::activeWindowChanged( TQWidget *w )
}
workspace()->activeFormChanged( fw );
setAppropriate( (TQDockWindow*)actionEditor->parentWidget(),
- ::tqqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
+ ::tqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) {
if ( actionEditor->wantToBeShown() )
actionEditor->parentWidget()->show();
} else {
TQWidget *mc = 0;
- if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast<TQMainWindow*>(mc) )
+ if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) )
actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
actionEditor->parentWidget()->hide();
}
@@ -1411,40 +1406,40 @@ void MainWindow::activeWindowChanged( TQWidget *w )
propertyEditor->resetFocus();
} else if ( !lastActiveFormWindow ) {
emit formWindowChanged();
- emit hasActiveForm( FALSE );
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
+ emit hasActiveForm( false );
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
}
if ( !w ) {
emit formWindowChanged();
- emit hasActiveForm( FALSE );
+ emit hasActiveForm( false );
propertyEditor->clear();
hierarchyView->clear();
- updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
+ updateUndoRedo( false, false, TQString(), TQString() );
}
selectionChanged();
- if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ if ( ::tqt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w;
TQGuardedPtr<FormWindow> fw = se->formWindow();
if ( se->formWindow() &&
lastActiveFormWindow != fw ) {
activeWindowChanged( se->formWindow() );
}
- actionSearchFind->setEnabled( TRUE );
- actionSearchIncremetal->setEnabled( TRUE );
- actionSearchReplace->setEnabled( TRUE );
- actionSearchGotoLine->setEnabled( TRUE );
- incrementalSearch->setEnabled( TRUE );
-
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
- actionEditCut->setEnabled( TRUE );
- actionEditCopy->setEnabled( TRUE );
- actionEditPaste->setEnabled( TRUE );
- actionEditSelectAll->setEnabled( TRUE );
+ actionSearchFind->setEnabled( true );
+ actionSearchIncremetal->setEnabled( true );
+ actionSearchReplace->setEnabled( true );
+ actionSearchGotoLine->setEnabled( true );
+ incrementalSearch->setEnabled( true );
+
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
+ actionEditCut->setEnabled( true );
+ actionEditCopy->setEnabled( true );
+ actionEditPaste->setEnabled( true );
+ actionEditSelectAll->setEnabled( true );
actionEditUndo->setMenuText( i18n( "&Undo" ) );
actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) );
actionEditRedo->setMenuText( i18n( "&Redo" ) );
@@ -1462,11 +1457,11 @@ void MainWindow::activeWindowChanged( TQWidget *w )
}
workspace()->activeEditorChanged( se );
} else {
- actionSearchFind->setEnabled( FALSE );
- actionSearchIncremetal->setEnabled( FALSE );
- actionSearchReplace->setEnabled( FALSE );
- actionSearchGotoLine->setEnabled( FALSE );
- incrementalSearch->setEnabled( FALSE );
+ actionSearchFind->setEnabled( false );
+ actionSearchIncremetal->setEnabled( false );
+ actionSearchReplace->setEnabled( false );
+ actionSearchGotoLine->setEnabled( false );
+ incrementalSearch->setEnabled( false );
}
if ( currentTool() == ORDER_TOOL && w != old )
@@ -1479,7 +1474,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
const TQString &undoCmd, const TQString &redoCmd )
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; // do not set a formWindow related command
actionEditUndo->setEnabled( undoAvailable );
actionEditRedo->setEnabled( redoAvailable );
@@ -1496,15 +1491,15 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) );
if ( currentTool() == ORDER_TOOL ) {
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
}
}
void MainWindow::updateEditorUndoRedo()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow();
actionEditUndo->setEnabled( editor->editIsUndoAvailable() );
@@ -1554,19 +1549,19 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg
void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w )
{
- const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
+ if ( text && qstrcmp( text->type(), "TQString") != 0 )
text = 0;
- const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
- if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
+ if ( title && qstrcmp( title->type(), "TQString") != 0 )
title = 0;
const TQMetaProperty* pagetitle =
- w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
- if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true );
+ if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 )
pagetitle = 0;
const TQMetaProperty* pixmap =
- w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE );
- if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 )
+ w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true );
+ if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
pixmap = 0;
if ( text && text->designable(w) ||
@@ -1580,7 +1575,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) );
props.insert( "pixmap", id );
}
- if ( text && text->designable(w) && !::tqqt_cast<TQTextEdit*>(w) ) {
+ if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) {
ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) );
props.insert( "text", id );
}
@@ -1599,7 +1594,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w )
{
WidgetInterface *iface = 0;
- widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface );
+ widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface );
if ( !iface )
return 0;
TQWidgetContainerInterfacePrivate *iface2 = 0;
@@ -1616,7 +1611,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{
int id;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (QDesignerTabWidget*)w )->count() > 1) {
@@ -1625,7 +1620,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- } else if ( ::tqqt_cast<QDesignerWidgetStack*>(w) ) {
+ } else if ( ::tqt_cast<QDesignerWidgetStack*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (QDesignerWidgetStack*)w )->count() > 1) {
@@ -1639,7 +1634,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- } else if ( ::tqqt_cast<TQToolBox*>(w) ) {
+ } else if ( ::tqt_cast<TQToolBox*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQToolBox*)w )->count() > 1 ) {
@@ -1651,19 +1646,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
- if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) {
+ if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
- if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) {
+ if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) {
ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) );
commands.insert( "remove", id );
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) {
+ if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) {
ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) );
commands.insert( "rename", id );
}
@@ -1674,7 +1669,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) );
@@ -1687,7 +1682,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{
int id;
- if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) {
+ if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
@@ -1705,7 +1700,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) );
commands.insert( "edit", id );
- } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
+ } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) );
@@ -1718,18 +1713,18 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w )
{
if ( id == props[ "text" ] ) {
- bool ok = FALSE;
- bool oldDoWrap = FALSE;
- if ( ::tqqt_cast<TQLabel*>(w) ) {
+ bool ok = false;
+ bool oldDoWrap = false;
+ if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
- oldDoWrap = TRUE;
+ oldDoWrap = true;
}
bool doWrap = oldDoWrap;
TQString text;
- if ( ::tqqt_cast<TQTextView*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) {
- text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast<TQButton*>(w), &doWrap );
+ if ( ::tqt_cast<TQTextView*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
+ text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull();
} else {
text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ),
@@ -1738,67 +1733,67 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
if ( ok ) {
if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE );
+ MetaDataBase::setPropertyChanged( w, "text", true );
}
} else if ( id == props[ "title" ] ) {
- bool ok = FALSE;
+ bool ok = false;
TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ),
TQLineEdit::Normal, 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(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
title, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE );
+ MetaDataBase::setPropertyChanged( w, "title", true );
}
} else if ( id == props[ "pagetitle" ] ) {
- bool ok = FALSE;
+ bool ok = false;
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this );
if ( ok ) {
TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pageTitle",
w->property( "pageTitle" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pageTitle", true );
}
} else if ( id == props[ "pixmap" ] ) {
TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap();
TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix );
if ( !pix.isNull() ) {
TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pixmap", w->property( "pixmap" ),
pix, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pixmap", true );
}
}
}
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w )
{
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( id == commands[ "add" ] ) {
AddTabPageCommand *cmd =
@@ -1817,7 +1812,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQToolBox*>(w) ) {
+ } else if ( ::tqt_cast<TQToolBox*>(w) ) {
TQToolBox *tb = (TQToolBox*)w;
if ( id == commands[ "add" ] ) {
AddToolBoxPageCommand *cmd =
@@ -1837,7 +1832,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQWidgetStack*>(w) ) {
+ } else if ( ::tqt_cast<TQWidgetStack*>(w) ) {
QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w;
if ( id == commands[ "add" ] ) {
AddWidgetStackPageCommand *cmd =
@@ -1858,27 +1853,27 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
- new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
currentPage + 1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE );
+ MetaDataBase::setPropertyChanged( w, "currentPage", true );
} else if ( id == commands[ "prevpage" ] ) {
int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
- new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
currentPage -1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE );
+ MetaDataBase::setPropertyChanged( w, "currentPage", true );
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
if ( id == commands[ "add" ] ) {
AddContainerPageCommand *cmd =
new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ),
@@ -1888,7 +1883,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "remove" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
DeleteContainerPageCommand *cmd =
new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ).
@@ -1903,8 +1898,8 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "rename" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- bool ok = FALSE;
- TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ bool ok = false;
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal,
@@ -1929,16 +1924,16 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( id == commands[ "edit" ] )
WidgetFactory::editWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() );
+ idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() );
}
}
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw )
{
- if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) {
+ if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
TQWizard *wiz = (TQWizard*)fw->mainContainer();
if ( id == commands[ "add" ] ) {
AddWizardPageCommand *cmd =
@@ -1963,7 +1958,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
delete e;
} else if ( id == commands[ "rename" ] ) {
- bool ok = FALSE;
+ bool ok = false;
QDesignerWizard *dw = (QDesignerWizard*)wiz;
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, dw->pageTitle(), &ok, this );
@@ -1976,7 +1971,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
+ } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if ( id == commands[ "add_toolbar" ] ) {
AddToolBarCommand *cmd =
@@ -2003,23 +1998,23 @@ void MainWindow::clipboardChanged()
void MainWindow::selectionChanged()
{
- layoutChilds = FALSE;
- layoutSelected = FALSE;
- breakLayout = FALSE;
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
if ( !formWindow() ) {
- actionEditCut->setEnabled( FALSE );
- actionEditCopy->setEnabled( FALSE );
- actionEditDelete->setEnabled( FALSE );
- actionEditAdjustSize->setEnabled( FALSE );
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditSplitHorizontal->setEnabled( FALSE );
- actionEditSplitVertical->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
- actionEditLower->setEnabled( FALSE );
- actionEditRaise->setEnabled( FALSE );
- actionEditAdjustSize->setEnabled( FALSE );
+ actionEditCut->setEnabled( false );
+ actionEditCopy->setEnabled( false );
+ actionEditDelete->setEnabled( false );
+ actionEditAdjustSize->setEnabled( false );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditSplitHorizontal->setEnabled( false );
+ actionEditSplitVertical->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
+ actionEditLower->setEnabled( false );
+ actionEditRaise->setEnabled( false );
+ actionEditAdjustSize->setEnabled( false );
return;
}
@@ -2031,11 +2026,11 @@ void MainWindow::selectionChanged()
actionEditLower->setEnabled( enable );
actionEditRaise->setEnabled( enable );
- actionEditAdjustSize->setEnabled( FALSE );
- actionEditSplitHorizontal->setEnabled( FALSE );
- actionEditSplitVertical->setEnabled( FALSE );
+ actionEditAdjustSize->setEnabled( false );
+ actionEditSplitHorizontal->setEnabled( false );
+ actionEditSplitVertical->setEnabled( false );
- enable = FALSE;
+ enable = false;
TQWidgetList widgets = formWindow()->selectedWidgets();
if ( selectedWidgets > 1 ) {
int unlaidout = 0;
@@ -2057,75 +2052,75 @@ void MainWindow::selectionChanged()
breakLayout = laidout > 0;
} else if ( selectedWidgets == 1 ) {
TQWidget *w = widgets.first();
- bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ||
+ bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
w == formWindow()->mainContainer();
actionEditAdjustSize->setEnabled( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout );
if ( !isContainer ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
} else {
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditBreakLayout->setEnabled( false );
}
} else {
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
if ( !formWindow()->hasInsertedChildren( w ) ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
} else {
- actionEditHLayout->setEnabled( TRUE );
- actionEditVLayout->setEnabled( TRUE );
- actionEditGridLayout->setEnabled( TRUE );
- actionEditBreakLayout->setEnabled( FALSE );
- layoutChilds = TRUE;
+ actionEditHLayout->setEnabled( true );
+ actionEditVLayout->setEnabled( true );
+ actionEditGridLayout->setEnabled( true );
+ actionEditBreakLayout->setEnabled( false );
+ layoutChilds = true;
}
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
}
}
} else if ( selectedWidgets == 0 ) {
- actionEditAdjustSize->setEnabled( TRUE );
+ actionEditAdjustSize->setEnabled( true );
TQWidget *w = formWindow()->mainContainer();
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
if ( !formWindow()->hasInsertedChildren( w ) ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
} else {
- actionEditHLayout->setEnabled( TRUE );
- actionEditVLayout->setEnabled( TRUE );
- actionEditGridLayout->setEnabled( TRUE );
- actionEditBreakLayout->setEnabled( FALSE );
- layoutChilds = TRUE;
+ actionEditHLayout->setEnabled( true );
+ actionEditVLayout->setEnabled( true );
+ actionEditGridLayout->setEnabled( true );
+ actionEditBreakLayout->setEnabled( false );
+ layoutChilds = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( TRUE );
- breakLayout = TRUE;
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( true );
+ breakLayout = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
}
}
@@ -2252,12 +2247,12 @@ void MainWindow::readConfig()
config.insertSearchPath( TQSettings::Windows, "/Trolltech" );
bool ok;
- bool readPreviousConfig = FALSE;
+ bool readPreviousConfig = false;
TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" );
- restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok );
+ restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok );
if ( !ok ) {
keybase = DesignerApplication::oldSettingsKey();
- restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok );
+ restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok );
if ( !ok ) {
if ( oWindow ) {
oWindow->shuttingDown();
@@ -2269,7 +2264,7 @@ void MainWindow::readConfig()
qworkspace->setBackgroundPixmap( pix );
return;
}
- readPreviousConfig = TRUE;
+ readPreviousConfig = true;
}
if ( !readPreviousConfig ) {
fileFilter = config.readEntry( keybase + "FileFilter", fileFilter );
@@ -2308,7 +2303,7 @@ void MainWindow::readConfig()
recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" );
}
- backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig;
+ backPix = config.readBoolEntry( keybase + "Background/UsePixmap", true ) | readPreviousConfig;
if ( backPix ) {
TQPixmap pix;
pix.load( backPixName );
@@ -2319,14 +2314,14 @@ void MainWindow::readConfig()
}
if ( !readPreviousConfig ) {
- splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE );
+ splashScreen = config.readBoolEntry( keybase + "SplashScreen", true );
- sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE );
- snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE );
+ sGrid = config.readBoolEntry( keybase + "Grid/Show", true );
+ snGrid = config.readBoolEntry( keybase + "Grid/Snap", true );
grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) );
grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) );
- if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) {
+ if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", false ) ) {
TQRect r( pos(), size() );
r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) );
r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) );
@@ -2340,8 +2335,8 @@ void MainWindow::readConfig()
move( r.topLeft() );
}
}
- setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) );
- setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now
+ setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", false ) );
+ setUsesBigPixmaps( false /*config.readBoolEntry( "BigIcons", false )*/ ); // ### disabled for now
}
}
int num = config.readNumEntry( keybase + "CustomWidgets/num" );
@@ -2489,7 +2484,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
while ( wit.current() ) {
TQWidget *w = wit.current();
++wit;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
if ( ( (FormWindow*)w )->formFile()->formWindow() )
@@ -2498,7 +2493,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
e->ignore();
return;
}
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
if ( !( (SourceEditor*)w )->close() ) {
e->ignore();
return;
@@ -2562,15 +2557,15 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
{
- if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) {
- TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) );
+ if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) {
+ TQString defSignal = WidgetFactory::defaultSignal( w );
if ( defSignal.isEmpty() ) {
editSource();
} else {
TQString s = TQString( w->name() ) + "_" + defSignal;
LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() );
if ( iface ) {
- TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) );
+ TQStrList sigs = iface->signalNames( w );
TQString fullSignal;
for ( int i = 0; i < (int)sigs.count(); ++i ) {
TQString sig = sigs.at( i );
@@ -2586,53 +2581,53 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
fullSignal.remove( (int)fullSignal.length() - 1, 1 );
fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() );
s += "(" + fullSignal + ")";
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot",
+ if ( !MetaDataBase::hasFunction( f, s.latin1() ) )
+ MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot",
f->project()->language(), "void" );
s = s.left( s.find( '(' ) ).latin1();
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) {
+ if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) {
MetaDataBase::Connection conn;
- conn.sender = TQT_TQOBJECT(w);
- conn.receiver = TQT_TQOBJECT(f->mainContainer());
+ conn.sender = w;
+ conn.receiver = f->mainContainer();
conn.signal = signl;
conn.slot = s;
AddConnectionCommand *cmd =
new AddConnectionCommand( i18n( "Add Connection" ), f, conn );
f->commandHistory()->addCommand( cmd );
cmd->execute();
- f->formFile()->setModified( TRUE );
+ f->formFile()->setModified( true );
}
}
}
- editFunction( s, TRUE );
+ editFunction( s, true );
}
- return TRUE;
+ return true;
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
statusMessage( i18n( "Edit %1..." ).arg( w->className() ) );
- WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ),
+ WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ),
this, w, formWindow() );
statusBar()->clear();
- return TRUE;
+ 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->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
+ const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
if ( text && text->designable(w) ) {
- bool ok = FALSE;
- bool oldDoWrap = FALSE;
- if ( ::tqqt_cast<TQLabel*>(w) ) {
+ bool ok = false;
+ bool oldDoWrap = false;
+ if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
- oldDoWrap = TRUE;
+ oldDoWrap = true;
}
bool doWrap = oldDoWrap;
TQString text;
- if ( ::tqqt_cast<TQTextEdit*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) {
+ if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
text = MultiLineEditor::getText( this, w->property( "text" ).toString(),
- !::tqqt_cast<TQButton*>(w), &doWrap );
+ !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull();
} else {
text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ),
@@ -2641,44 +2636,44 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
if ( ok ) {
if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE );
+ MetaDataBase::setPropertyChanged( w, "text", true );
}
- return TRUE;
+ return true;
}
if ( title && title->designable(w) ) {
- bool ok = FALSE;
+ bool ok = false;
TQString text;
text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, 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(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE );
+ MetaDataBase::setPropertyChanged( w, "title", true );
}
- return TRUE;
+ return true;
}
- if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) )
+ if ( !WidgetFactory::isPassiveInteractor( w ) )
editSource();
- return TRUE;
+ return true;
}
void MainWindow::rebuildCustomWidgetGUI()
@@ -2703,7 +2698,7 @@ void MainWindow::rebuildCustomWidgetGUI()
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() );
- a->setToggleAction( TRUE );
+ a->setToggleAction( true );
a->setText( w->className );
a->setIconSet( *w->pixmap );
a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) );
@@ -2730,28 +2725,28 @@ void MainWindow::rebuildCustomWidgetGUI()
void MainWindow::rebuildCommonWidgetsToolBoxPage()
{
- toolBox->setUpdatesEnabled( FALSE );
- commonWidgetsToolBar->setUpdatesEnabled( FALSE );
+ toolBox->setUpdatesEnabled( false );
+ commonWidgetsToolBar->setUpdatesEnabled( false );
commonWidgetsToolBar->clear();
for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
a->addTo( commonWidgetsToolBar );
TQWidget *w;
commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) );
w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() );
- toolBox->setUpdatesEnabled( TRUE );
- commonWidgetsToolBar->setUpdatesEnabled( TRUE );
+ toolBox->setUpdatesEnabled( true );
+ commonWidgetsToolBar->setUpdatesEnabled( true );
}
bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
{
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void MainWindow::setGrid( const TQPoint &p )
@@ -2761,7 +2756,7 @@ void MainWindow::setGrid( const TQPoint &p )
grd = p;
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( !::tqqt_cast<FormWindow*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
}
@@ -2774,7 +2769,7 @@ void MainWindow::setShowGrid( bool b )
sGrid = b;
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( !::tqqt_cast<FormWindow*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
}
@@ -2801,11 +2796,11 @@ void MainWindow::windowsMenuActivated( int id )
void MainWindow::projectSelected( TQAction *a )
{
- a->setOn( TRUE );
+ a->setOn( true );
if ( currentProject )
- currentProject->setActive( FALSE );
+ currentProject->setActive( false );
Project *p = *projects.find( a );
- p->setActive( TRUE );
+ p->setActive( true );
if ( currentProject == p )
return;
currentProject = p;
@@ -2823,8 +2818,8 @@ void MainWindow::openProject( const TQString &fn )
}
TQApplication::setOverrideCursor( waitCursor );
Project *pro = new Project( fn, "", projectSettingsPluginManager );
- pro->setModified( FALSE );
- TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE );
+ pro->setModified( false );
+ TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, true );
projects.insert( a, pro );
projectSelected( a );
TQApplication::restoreOverrideCursor();
@@ -2848,7 +2843,7 @@ void MainWindow::checkTempFiles()
TQApplication::setOverrideCursor( waitCursor );
for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( load )
- openFormWindow( s + "/" + *it, FALSE );
+ openFormWindow( s + "/" + *it, false );
d.remove( *it );
}
}
@@ -2860,48 +2855,48 @@ void MainWindow::showDialogHelp()
TQString link = documentationPath() + "/designer-manual-13.html#";
- if ( ::tqqt_cast<NewFormBase*>(w) || ::tqqt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
+ if ( ::tqt_cast<NewFormBase*>(w) || ::tqt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
link += "dialog-file-new";
- else if ( ::tqqt_cast<CreateTemplate*>(w) )
+ else if ( ::tqt_cast<CreateTemplate*>(w) )
link += "dialog-file-create-template";
- else if ( ::tqqt_cast<EditFunctionsBase*>(w) )
+ else if ( ::tqt_cast<EditFunctionsBase*>(w) )
link += "dialog-edit-functions";
-// else if ( ::tqqt_cast<ConnectionViewerBase*>(w) )
+// else if ( ::tqt_cast<ConnectionViewerBase*>(w) )
else if ( w->inherits("ConnectionViewerBase") )
link += "dialog-view-connections";
- else if ( ::tqqt_cast<FormSettingsBase*>(w) )
+ else if ( ::tqt_cast<FormSettingsBase*>(w) )
link += "dialog-edit-form-settings";
- else if ( ::tqqt_cast<Preferences*>(w) )
+ else if ( ::tqt_cast<Preferences*>(w) )
link += "dialog-edit-preferences";
- else if ( ::tqqt_cast<PixmapCollectionEditor*>(w) )
+ else if ( ::tqt_cast<PixmapCollectionEditor*>(w) )
link += "dialog-image-collection";
-// else if ( ::tqqt_cast<DatabaseConnectionBase*>(w) )
+// else if ( ::tqt_cast<DatabaseConnectionBase*>(w) )
else if ( w->inherits( "DatabaseConnectionBase" ) )
link += "dialog-edit-database-connections";
- else if ( ::tqqt_cast<ProjectSettingsBase*>(w) )
+ else if ( ::tqt_cast<ProjectSettingsBase*>(w) )
link += "dialog-project-settings";
- else if ( ::tqqt_cast<FindDialog*>(w) )
+ else if ( ::tqt_cast<FindDialog*>(w) )
link += "dialog-find-text";
- else if ( ::tqqt_cast<ReplaceDialog*>(w) )
+ else if ( ::tqt_cast<ReplaceDialog*>(w) )
link += "dialog-replace-text";
- else if ( ::tqqt_cast<GotoLineDialog*>(w) )
+ else if ( ::tqt_cast<GotoLineDialog*>(w) )
link += "dialog-go-to-line";
-// else if ( ::tqqt_cast<ConnectionEditorBase*>(w) )
+// else if ( ::tqt_cast<ConnectionEditorBase*>(w) )
else if ( w->inherits("ConnectionEditorBase") )
link += "dialog-edit-connections";
- else if ( ::tqqt_cast<CustomWidgetEditorBase*>(w) )
+ else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) )
link += "dialog-edit-custom-widgets";
- else if ( ::tqqt_cast<PaletteEditorBase*>(w) )
+ else if ( ::tqt_cast<PaletteEditorBase*>(w) )
link += "dialog-edit-palette";
- else if ( ::tqqt_cast<ListBoxEditorBase*>(w) )
+ else if ( ::tqt_cast<ListBoxEditorBase*>(w) )
link += "dialog-edit-listbox";
- else if ( ::tqqt_cast<ListViewEditorBase*>(w) )
+ else if ( ::tqt_cast<ListViewEditorBase*>(w) )
link += "dialog-edit-listview";
- else if ( ::tqqt_cast<IconViewEditorBase*>(w) )
+ else if ( ::tqt_cast<IconViewEditorBase*>(w) )
link += "dialog-edit-iconview";
- else if ( ::tqqt_cast<TableEditorBase*>(w) )
+ else if ( ::tqt_cast<TableEditorBase*>(w) )
link += "dialog-edit-table";
- else if ( ::tqqt_cast<MultiLineEditor*>(w) )
+ else if ( ::tqt_cast<MultiLineEditor*>(w) )
link += "dialog-text";
else {
@@ -2925,7 +2920,7 @@ void MainWindow::setupActionManager()
continue;
iface->connectTo( desInterface );
- TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) );
+ TQAction *a = iface->create( *ait, this );
if ( !a )
continue;
@@ -2935,11 +2930,11 @@ void MainWindow::setupActionManager()
TQPopupMenu *menu = 0;
TQToolBar *tb = 0;
- if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) {
+ if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) {
menu = new TQPopupMenu( this, grp.latin1() );
menuBar()->insertItem( i18n( grp ), menu );
}
- if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) {
+ if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) {
tb = new TQToolBar( this, grp.latin1() );
tb->setCloseMode( TQDockWindow::Undocked );
addToolBar( tb, grp );
@@ -2960,7 +2955,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource )
return;
if ( formWindow()->formFile()->codeFileState() != FormFile::Ok )
- if ( !formWindow()->formFile()->setupUihFile(FALSE) )
+ if ( !formWindow()->formFile()->setupUihFile(false) )
return;
TQString lang = currentProject->language();
@@ -2979,7 +2974,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource )
}
}
- createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource );
+ createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource );
}
void MainWindow::setupRecentlyFilesMenu()
@@ -3189,10 +3184,10 @@ void MainWindow::setModified( bool b, TQWidget *window )
{
TQWidget *w = window;
while ( w ) {
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
( (FormWindow*)w )->modificationChanged( b );
return;
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
FormWindow *fw = ( (SourceEditor*)w )->formWindow();
if ( fw && !fw->isFake() ) {
//fw->commandHistory()->setModified( b );
@@ -3204,7 +3199,7 @@ void MainWindow::setModified( bool b, TQWidget *window )
}
return;
}
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
@@ -3215,19 +3210,19 @@ void MainWindow::editorClosed( SourceEditor *e )
void MainWindow::functionsChanged()
{
- updateFunctionsTimer->start( 0, TRUE );
+ updateFunctionsTimer->start( 0, true );
}
void MainWindow::doFunctionsChanged()
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
- e->refresh( FALSE );
+ e->refresh( false );
hierarchyView->formDefinitionView()->refresh();
}
void MainWindow::updateFunctionList()
{
- if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow();
se->save();
@@ -3238,7 +3233,7 @@ void MainWindow::updateFunctionList()
return;
TQValueList<LanguageInterface::Connection> conns;
iface->connections( se->text(), &conns );
- MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns );
+ MetaDataBase::setupConnections( se->formWindow(), conns );
propertyEditor->eventList()->setup();
}
}
@@ -3276,17 +3271,17 @@ void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &e
ol.append( o );
TQStringList ll;
ll << currentProject->locationOfObject( o );
- oWindow->setErrorMessages( l2, l, TRUE, ll, ol );
+ oWindow->setErrorMessages( l2, l, true, ll, ol );
showSourceLine( o, errorLine, Error );
}
}
void MainWindow::finishedRun()
{
- inDebugMode = FALSE;
- previewing = FALSE;
+ inDebugMode = false;
+ previewing = false;
debuggingForms.clear();
- enableAll( TRUE );
+ enableAll( true );
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
if ( e->project() == currentProject )
e->editorInterface()->setMode( EditorInterface::Editing );
@@ -3298,11 +3293,11 @@ void MainWindow::finishedRun()
void MainWindow::enableAll( bool enable )
{
menuBar()->setEnabled( enable );
- TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING );
+ TQObjectList *l = queryList( "TQDockWindow" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
- if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() ||
- TQT_BASE_OBJECT(o) == oWindow->parentWidget() ||
- TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() )
+ if ( o == wspace->parentWidget() ||
+ o == oWindow->parentWidget() ||
+ o == hierarchyView->parentWidget() )
continue;
( (TQWidget*)o )->setEnabled( enable );
}
@@ -3316,9 +3311,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
FormWindow *fw = 0;
SourceEditor *se = 0;
SourceFile *sf = 0;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
fw = (FormWindow*)w;
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
se = (SourceEditor*)w;
if ( !se->object() )
continue;
@@ -3386,7 +3381,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
}
}
- if ( ::tqqt_cast<SourceFile*>(o) ) {
+ if ( ::tqt_cast<SourceFile*>(o) ) {
for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
@@ -3420,11 +3415,11 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
return;
}
- mblockNewForms = TRUE;
+ mblockNewForms = true;
if ( !fw )
openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) );
else
- fw->formFile()->showEditor( FALSE );
+ fw->formFile()->showEditor( false );
tqApp->processEvents(); // give all views the chance to get the formwindow
SourceEditor *se = editSource();
if ( se ) {
@@ -3440,7 +3435,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
break;
}
}
- mblockNewForms = FALSE;
+ mblockNewForms = false;
}
@@ -3448,12 +3443,12 @@ TQObject *MainWindow::findRealObject( TQObject *o )
{
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( ::tqqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
- return TQT_TQOBJECT(w);
- else if ( ::tqqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
+ if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
+ return w;
+ else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
- return TQT_TQOBJECT(w);
- else if ( ::tqqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
+ return w;
+ else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
( (SourceEditor*)w )->sourceFile() == o )
return o;
}
@@ -3463,8 +3458,8 @@ TQObject *MainWindow::findRealObject( TQObject *o )
void MainWindow::formNameChanged( FormWindow *fw )
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
- if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) )
- e->refresh( TRUE );
+ if ( e->object() == fw )
+ e->refresh( true );
if ( e->project() == fw->project() )
e->resetContext();
}
@@ -3474,7 +3469,7 @@ void MainWindow::breakPointsChanged()
{
if ( !inDebugMode )
return;
- if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow();
if ( !e->object() || !e->project() )
@@ -3558,7 +3553,7 @@ SourceFile *MainWindow::sourceFile()
bool MainWindow::openProjectSettings( Project *pro )
{
- ProjectSettings dia( pro, this, 0, TRUE );
+ ProjectSettings dia( pro, this, 0, true );
SenderObject *senderObject = new SenderObject( designerInterface() );
TQValueList<Tab>::ConstIterator it;
for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
@@ -3567,16 +3562,16 @@ bool MainWindow::openProjectSettings( Project *pro )
continue;
dia.tabWidget->addTab( t.w, t.title );
if ( t.receiver ) {
- connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) );
- connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
- connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ connect( dia.buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) );
+ connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
+ connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
senderObject->emitInitSignal();
- disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
}
}
if ( singleProject )
- dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE );
+ dia.tabWidget->setTabEnabled( dia.tabSettings, false );
int res = dia.exec();
@@ -3585,7 +3580,7 @@ bool MainWindow::openProjectSettings( Project *pro )
for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
Tab t = *it;
dia.tabWidget->removePage( t.w );
- t.w->reparent( 0, TQPoint(0,0), FALSE );
+ t.w->reparent( 0, TQPoint(0,0), false );
}
return res == TQDialog::Accepted;
@@ -3636,35 +3631,35 @@ void MainWindow::setSingleProject( Project *pro )
Project *pro = eProject;
pro->save();
TQWidgetList windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( TRUE );
+ qWorkspace()->blockSignals( true );
TQWidgetListIt wit( windows );
while ( wit.current() ) {
TQWidget *w = wit.current();
++wit;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
( (FormWindow*)w )->formFile()->close();
}
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
( (SourceEditor*)w )->close();
}
}
hierarchyView->clear();
windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( FALSE );
+ qWorkspace()->blockSignals( false );
currentProject = 0;
- updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
+ updateUndoRedo( false, false, TQString(), TQString() );
}
- singleProject = TRUE;
+ singleProject = true;
projects.clear();
TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0,
- actionGroupProjects, 0, TRUE );
+ actionGroupProjects, 0, true );
eProject = pro;
projects.insert( a, eProject );
- a->setOn( TRUE );
+ a->setOn( true );
actionGroupProjects->removeFrom( projectMenu );
actionGroupProjects->removeFrom( projectToolBar );
currentProject = eProject;
@@ -3682,30 +3677,30 @@ void MainWindow::showGUIStuff( bool b )
return;
guiStuffVisible = b;
if ( !b ) {
- setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), false );
toolBox->parentWidget()->hide();
for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
tb->hide();
- setAppropriate( tb, FALSE );
+ setAppropriate( tb, false );
}
- propertyEditor->setPropertyEditorEnabled( FALSE );
- setAppropriate( layoutToolBar, FALSE );
+ propertyEditor->setPropertyEditorEnabled( false );
+ setAppropriate( layoutToolBar, false );
layoutToolBar->hide();
- setAppropriate( toolsToolBar, FALSE );
+ setAppropriate( toolsToolBar, false );
toolsToolBar->hide();
menubar->removeItem( toolsMenuId );
menubar->removeItem( toolsMenuId + 1 );
menubar->removeItem( toolsMenuId + 2 );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
- actionEditFormSettings->setEnabled( FALSE );
- actionEditSource->setEnabled( FALSE );
- actionEditConnections->setEnabled( FALSE );
- actionEditFunctions->setEnabled( FALSE );
- actionEditAccels->setEnabled( FALSE );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
+ actionEditFormSettings->setEnabled( false );
+ actionEditSource->setEnabled( false );
+ actionEditConnections->setEnabled( false );
+ actionEditFunctions->setEnabled( false );
+ actionEditAccels->setEnabled( false );
( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Signal Handlers" ) );
actionGroupNew->removeFrom( fileMenu );
@@ -3719,30 +3714,30 @@ void MainWindow::showGUIStuff( bool b )
actionFileSave->addTo( projectToolBar );
actionFileExit->addTo( fileMenu );
} else {
- setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), true );
toolBox->parentWidget()->show();
for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
- setAppropriate( tb, TRUE );
+ setAppropriate( tb, true );
tb->hide();
}
- propertyEditor->setPropertyEditorEnabled( TRUE );
- setAppropriate( layoutToolBar, TRUE );
+ propertyEditor->setPropertyEditorEnabled( true );
+ setAppropriate( layoutToolBar, true );
layoutToolBar->show();
- setAppropriate( toolsToolBar, TRUE );
+ setAppropriate( toolsToolBar, true );
toolsToolBar->show();
menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex );
menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 );
menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
- actionEditFormSettings->setEnabled( TRUE );
- actionEditSource->setEnabled( TRUE );
- actionEditConnections->setEnabled( TRUE );
- actionEditFunctions->setEnabled( TRUE );
- actionEditAccels->setEnabled( TRUE );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
+ actionEditFormSettings->setEnabled( true );
+ actionEditSource->setEnabled( true );
+ actionEditConnections->setEnabled( true );
+ actionEditFunctions->setEnabled( true );
+ actionEditAccels->setEnabled( true );
( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Property Editor/Signal Handlers" ) );
actionFileSave->removeFrom( fileMenu );
diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h
index 1b68c14d..47c4d710 100644
--- a/kdevdesigner/designer/mainwindow.h
+++ b/kdevdesigner/designer/mainwindow.h
@@ -43,7 +43,7 @@
#include <tqmainwindow.h>
#include <tqmap.h>
#include <tqguardedptr.h>
-#include <tqpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
#include <tqobjectlist.h>
class TQToolBox;
@@ -79,13 +79,13 @@ class KDevDesignerPart;
class MainWindow : public TQMainWindow
{
- Q_OBJECT
+ TQ_OBJECT
public:
enum LineMode { Error, Step, StackFrame };
- MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" );
+ MainWindow( KDevDesignerPart *part, bool asClient, bool single = false, const TQString &plgDir = "/designer" );
~MainWindow();
HierarchyView *objectHierarchy() const;
@@ -112,7 +112,7 @@ public:
TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent );
TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot );
- FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 );
+ FormWindow *openFormWindow( const TQString &fn, bool validFileName = true, FormFile *ff = 0 );
bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w );
void setGrid( const TQPoint &p );
@@ -128,7 +128,7 @@ public:
TQString templatePath() const { return templPath; }
- void editFunction( const TQString &func, bool rereadSource = FALSE );
+ void editFunction( const TQString &func, bool rereadSource = false );
bool isPreviewing() const { return previewing; }
@@ -230,7 +230,7 @@ public slots:
void fileQuit();
void fileCloseProject(); // not visible in menu, called from fileClose
void fileOpen();
- void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE );
+ void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = true );
bool fileSave();
bool fileSaveForm(); // not visible in menu, called from fileSave
bool fileSaveProject(); // not visible in menu, called from fileSaveProject
@@ -267,7 +267,7 @@ public slots:
SourceEditor *createSourceEditor( TQObject *object, Project *project,
const TQString &lang = TQString(),
const TQString &func = TQString(),
- bool rereadSource = FALSE );
+ bool rereadSource = false );
void editFormSettings();
void editProjectSettings();
void editPixmapCollection();
@@ -408,9 +408,6 @@ private:
TQAction* actionCurrentTool;
DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis;
DesignerAction *actionHelpManual;
-#if defined(TQT_NON_COMMERCIAL)
- DesignerAction *actionHelpRegister;
-#endif
DesignerAction *actionToolsCustomWidget, *actionEditPreferences;
DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll;
DesignerAction *actionWindowNext, *actionWindowPrevious;
@@ -490,7 +487,7 @@ friend class KDevDesignerPart;
class SenderObject : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp
index 7917de8b..7e4f92e0 100644
--- a/kdevdesigner/designer/mainwindowactions.cpp
+++ b/kdevdesigner/designer/mainwindowactions.cpp
@@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name )
void MainWindow::setupEditActions()
{
- actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 );
+ actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 );
actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) );
actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
- connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) );
- actionEditUndo->setEnabled( FALSE );
+ connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) );
+ actionEditUndo->setEnabled( false );
- actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 );
+ actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 );
actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") );
actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) );
- connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) );
- actionEditRedo->setEnabled( FALSE );
+ connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) );
+ actionEditRedo->setEnabled( false );
- actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 );
+ actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 );
actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) );
actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) );
- connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) );
- actionEditCut->setEnabled( FALSE );
+ connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) );
+ actionEditCut->setEnabled( false );
- actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 );
+ actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 );
actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) );
actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) );
- connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) );
- actionEditCopy->setEnabled( FALSE );
+ connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) );
+ actionEditCopy->setEnabled( false );
- actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 );
+ actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 );
actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) );
actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) );
- connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) );
- actionEditPaste->setEnabled( FALSE );
+ connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) );
+ actionEditPaste->setEnabled( false );
- actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 );
+ actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 );
actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) );
actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) );
- connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) );
- actionEditDelete->setEnabled( FALSE );
+ connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
+ actionEditDelete->setEnabled( false );
#ifdef TQ_WS_MAC
- TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 );
- connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) );
+ TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
+ connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
#endif
- actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 );
+ actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 );
actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) );
actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
- connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) );
- actionEditSelectAll->setEnabled( TRUE );
+ connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) );
+ actionEditSelectAll->setEnabled( true );
- actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 );
+ actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 );
actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) );
actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) );
- connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) );
- actionEditRaise->setEnabled( FALSE );
+ connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) );
+ actionEditRaise->setEnabled( false );
- actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 );
+ actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 );
actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) );
actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) );
- connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) );
- actionEditLower->setEnabled( FALSE );
+ connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) );
+ actionEditLower->setEnabled( false );
actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(),
- i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 );
+ i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") );
actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) );
- connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditAccels, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAccels() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"),
- i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "S&lots..." ), 0, this, 0 );
actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") );
actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) );
- connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditFunctions, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFunctions() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"),
- i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "Co&nnections..." ), 0, this, 0 );
actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") );
actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) );
- connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editConnections() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(),
- i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 );
+ i18n( "&Source..." ), CTRL + Key_E, this, 0 );
actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") );
actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) );
- connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditSource, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSource() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(),
- i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "&Form Settings..." ), 0, this, 0 );
actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") );
actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) );
- connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditFormSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFormSettings() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(),
- i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "Preferences..." ), 0, this, 0 );
actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") );
actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) );
- connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) );
+ connect( actionEditPreferences, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPreferences() ) );
/* TQToolBar *tb = new TQToolBar( this, "Edit" );
tb->setCloseMode( TQDockWindow::Undocked );
@@ -240,7 +240,7 @@ void MainWindow::setupEditActions()
#endif
TQPopupMenu *menu = new TQPopupMenu( this, "Edit" );
- connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) );
+ connect( menu, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( updateEditorUndoRedo() ) );
menubar->insertItem( i18n( "&Edit" ), menu );
actionEditUndo->addTo( menu );
actionEditRedo->addTo( menu );
@@ -269,27 +269,27 @@ void MainWindow::setupEditActions()
void MainWindow::setupSearchActions()
{
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
- i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 );
- connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) );
- actionSearchFind->setEnabled( FALSE );
+ i18n( "&Find..." ), CTRL + Key_F, this, 0 );
+ connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) );
+ actionSearchFind->setEnabled( false );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
- i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 );
- connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) );
- actionSearchIncremetal->setEnabled( FALSE );
+ i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
+ connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) );
+ actionSearchIncremetal->setEnabled( false );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
- i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 );
- connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) );
- actionSearchReplace->setEnabled( FALSE );
+ i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
+ connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) );
+ actionSearchReplace->setEnabled( false );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
- i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 );
- connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) );
- actionSearchGotoLine->setEnabled( FALSE );
+ i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
+ connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) );
+ actionSearchGotoLine->setEnabled( false );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
/* TQToolBar *tb = new TQToolBar( this, "Search" );
@@ -300,11 +300,11 @@ void MainWindow::setupSearchActions()
incrementalSearch = new TQLineEdit( 0 );
incrementalSearch->hide();
TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) );
- connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ),
- this, TQT_SLOT( searchIncremetalFind() ) );
- connect( incrementalSearch, TQT_SIGNAL( returnPressed() ),
- this, TQT_SLOT( searchIncremetalFindNext() ) );
- incrementalSearch->setEnabled( FALSE );
+ connect( incrementalSearch, TQ_SIGNAL( textChanged( const TQString & ) ),
+ this, TQ_SLOT( searchIncremetalFind() ) );
+ connect( incrementalSearch, TQ_SIGNAL( returnPressed() ),
+ this, TQ_SLOT( searchIncremetalFindNext() ) );
+ incrementalSearch->setEnabled( false );
TQPopupMenu *menu = new TQPopupMenu( this, "Search" );
menubar->insertItem( i18n( "&Search" ), menu );
@@ -319,62 +319,62 @@ void MainWindow::setupLayoutActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
- actionGroupTools->setExclusive( TRUE );
- connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) );
+ actionGroupTools->setExclusive( true );
+ connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) );
}
actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"),
- i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 );
+ i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 );
actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") );
actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
- connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) );
- actionEditAdjustSize->setEnabled( FALSE );
+ connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) );
+ actionEditAdjustSize->setEnabled( false );
actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
- i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 );
+ i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 );
actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") );
actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) );
- connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) );
- actionEditHLayout->setEnabled( FALSE );
+ connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) );
+ actionEditHLayout->setEnabled( false );
actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
- i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 );
+ i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 );
actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") );
actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) );
- connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) );
- actionEditVLayout->setEnabled( FALSE );
+ connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) );
+ actionEditVLayout->setEnabled( false );
actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"),
- i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 );
+ i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 );
actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") );
actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
- connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) );
- actionEditGridLayout->setEnabled( FALSE );
+ connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) );
+ actionEditGridLayout->setEnabled( false );
actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
- i18n( "Lay Out Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 );
actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") );
actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) );
- connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) );
- actionEditSplitHorizontal->setEnabled( FALSE );
+ connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) );
+ actionEditSplitHorizontal->setEnabled( false );
actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
- i18n( "Lay Out Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 );
actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") );
actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) );
- connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) );
- actionEditSplitVertical->setEnabled( FALSE );
+ connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) );
+ actionEditSplitVertical->setEnabled( false );
actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
- i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 );
+ i18n( "&Break Layout" ), CTRL + Key_B, this, 0 );
actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") );
actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
- connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) );
- actionEditBreakLayout->setEnabled( FALSE );
+ connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) );
+ actionEditBreakLayout->setEnabled( false );
int id = WidgetDatabase::idFromClassName( "Spacer" );
actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() );
- actionInsertSpacer->setToggleAction( TRUE );
+ actionInsertSpacer->setToggleAction( true );
actionInsertSpacer->setText( WidgetDatabase::className( id ) );
actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) );
actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) );
@@ -423,15 +423,15 @@ void MainWindow::setupToolActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
- actionGroupTools->setExclusive( TRUE );
- connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ),
- this, TQT_SLOT( toolSelected(TQAction*) ) );
+ actionGroupTools->setExclusive( true );
+ connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ),
+ this, TQ_SLOT( toolSelected(TQAction*) ) );
}
actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"),
i18n("&Pointer"), Key_F2,
actionGroupTools,
- TQString::number(POINTER_TOOL).latin1(), TRUE );
+ TQString::number(POINTER_TOOL).latin1(), true );
actionPointerTool->setStatusTip( i18n("Selects the pointer tool") );
actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) );
@@ -440,21 +440,21 @@ void MainWindow::setupToolActions()
i18n("&Connect Signal/Slots"),
singleProjectMode() ? 0 : Key_F3,
actionGroupTools,
- TQString::number(CONNECT_TOOL).latin1(), TRUE );
+ TQString::number(CONNECT_TOOL).latin1(), true );
actionConnectTool->setStatusTip( i18n("Selects the connection tool") );
actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) );
actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"),
i18n("Tab &Order"), Key_F4,
actionGroupTools,
- TQString::number(ORDER_TOOL).latin1(), TRUE );
+ TQString::number(ORDER_TOOL).latin1(), true );
actionOrderTool->setStatusTip( i18n("Selects the tab order tool") );
actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) );
actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ),
i18n( "Set &Buddy" ), Key_F12,
actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(),
- TRUE );
+ true );
actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) );
actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) );
@@ -463,7 +463,7 @@ void MainWindow::setupToolActions()
toolsToolBar = tb;
TQWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) );
- addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE );
+ addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, false );
actionPointerTool->addTo( tb );
if ( !singleProjectMode() )
actionConnectTool->addTo( tb );
@@ -487,13 +487,13 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"),
createIconSet( "designer_customwidget.png" ),
- i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 );
+ i18n("Edit &Custom Widgets..."), 0, this, 0 );
actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change "
"custom widgets") );
actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom"
"Widgets" ) );
- connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ),
- this, TQT_SLOT( toolsCustomWidget() ) );
+ connect( actionToolsCustomWidget, TQ_SIGNAL( activated() ),
+ this, TQ_SLOT( toolsCustomWidget() ) );
for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) {
TQString grp = WidgetDatabase::widgetGroup( j );
@@ -518,9 +518,9 @@ void MainWindow::setupToolActions()
TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() );
mmenu->insertItem( grp, menu );
- TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() );
+ TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, false, grp.latin1() );
tb2->setFrameStyle( TQFrame::NoFrame );
- tb2->setOrientation( Qt::Vertical );
+ tb2->setOrientation( TQt::Vertical );
tb2->setBackgroundMode( PaletteBase );
toolBox->addItem( tb2, grp );
@@ -538,7 +538,7 @@ void MainWindow::setupToolActions()
continue; // only widgets, i.e. not forms and temp stuff
WidgetAction* a =
new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() );
- a->setToggleAction( TRUE );
+ a->setToggleAction( true );
TQString atext = WidgetDatabase::className( i );
if ( atext[0] == 'Q' )
atext = atext.mid(1);
@@ -594,18 +594,18 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget->addTo( customWidgetMenu );
customWidgetMenu->insertSeparator();
TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0,
- toolBox, FALSE, "Custom Widgets" );
+ toolBox, false, "Custom Widgets" );
tb2->setBackgroundMode(PaletteBase);
- tb2->setOrientation( Qt::Vertical );
+ tb2->setOrientation( TQt::Vertical );
tb2->setFrameStyle( TQFrame::NoFrame );
toolBox->addItem( tb2, "Custom Widgets" );
customWidgetToolBar2 = tb2;
}
- TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) );
+ TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this );
a->setStatusTip( i18n( "Opens a dialog to configure the common "
"widgets page of the toolbox") );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( toolsConfigure() ) );
mmenu->insertSeparator();
a->addTo( mmenu );
resetTool();
@@ -625,7 +625,7 @@ void MainWindow::setupFileActions()
DesignerAction *a = 0;
if ( !singleProject ) {
- DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ DesignerAction *a = new DesignerAction( this, 0 );
a->setText( i18n( "New" ) );
a->setToolTip( i18n( "New dialog or file" ) );
a->setMenuText( i18n( "&New..." ) );
@@ -633,14 +633,14 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_N );
a->setStatusTip( i18n( "Creates a new project, form or source file." ) );
a->setWhatsThis( whatsThisFrom( "File|New" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNew() ) );
a->addTo( tb );
a->addTo( fileMenu );
actionNewFile = a;
} else {
- actionGroupNew = new TQActionGroup( this, 0, FALSE );
+ actionGroupNew = new TQActionGroup( this, 0, false );
TQActionGroup* a = actionGroupNew;
- ( (TQActionGroup*)a )->setUsesDropDown( TRUE );
+ ( (TQActionGroup*)a )->setUsesDropDown( true );
a->setText( i18n( "New" ) );
a->setMenuText( i18n( "&New..." ) );
a->setIconSet( createIconSet("designer_form.png") );
@@ -653,15 +653,15 @@ void MainWindow::setupFileActions()
newForm->setIconSet( createIconSet("designer_form.png") );
newForm->setAccel( CTRL + Key_N );
newForm->setStatusTip( i18n( "Creates a new dialog." ) );
- connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) );
+ connect( newForm, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewDialog() ) );
- DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 );
+ DesignerAction *newFile = new DesignerAction( a, 0 );
newFile->setText( i18n( "New File" ) );
newFile->setMenuText( i18n( "&File..." ) );
newFile->setIconSet( createIconSet("designer_filenew.png") );
newFile->setAccel( ALT + Key_N );
newFile->setStatusTip( i18n( "Creates a new file." ) );
- connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) );
+ connect( newFile, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewFile() ) );
actionNewFile = newFile;
a->addTo( tb );
@@ -670,14 +670,14 @@ void MainWindow::setupFileActions()
fileMenu->insertSeparator();
}
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
a->setText( i18n( "Open" ) );
a->setMenuText( i18n( "&Open..." ) );
a->setIconSet( createIconSet("designer_fileopen.png") );
a->setAccel( CTRL + Key_O );
a->setStatusTip( i18n( "Opens an existing project, form or source file ") );
a->setWhatsThis( whatsThisFrom( "File|Open" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileOpen() ) );
if ( !singleProject ) {
a->addTo( tb );
a->addTo( fileMenu );
@@ -685,20 +685,20 @@ void MainWindow::setupFileActions()
}
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
actionFileClose = a;
a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) );
a->setStatusTip( i18n( "Closes the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Close" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) );
- connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileClose() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
}
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
actionFileSave = a;
a->setText( i18n( "Save" ) );
a->setMenuText( i18n( "&Save" ) );
@@ -706,41 +706,41 @@ void MainWindow::setupFileActions()
a->setAccel( CTRL + Key_S );
a->setStatusTip( i18n( "Saves the current project or document" ) );
a->setWhatsThis(whatsThisFrom( "File|Save" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) );
- connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSave() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
a->addTo( tb );
a->addTo( fileMenu );
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
actionFileSaveAs = a;
a->setText( i18n( "Save As" ) );
a->setMenuText( i18n( "Save &As..." ) );
a->setStatusTip( i18n( "Saves the current form with a new filename" ) );
a->setWhatsThis( whatsThisFrom( "File|Save As" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) );
- connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAs() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( fileMenu );
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
actionFileSaveAll = a;
a->setText( i18n( "Save All" ) );
a->setMenuText( i18n( "Sa&ve All" ) );
a->setStatusTip( i18n( "Saves all open documents" ) );
a->setWhatsThis( whatsThisFrom( "File|Save All" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) );
- connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAll() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject ) {
a->addTo( fileMenu );
fileMenu->insertSeparator();
}
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
a->setText( i18n( "Create Template" ) );
a->setMenuText( i18n( "Create &Template..." ) );
a->setStatusTip( i18n( "Creates a new template" ) );
a->setWhatsThis( whatsThisFrom( "File|Create Template" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileCreateTemplate() ) );
if ( !singleProject )
a->addTo( fileMenu );
@@ -755,19 +755,19 @@ void MainWindow::setupFileActions()
fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu );
}
- connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ),
- this, TQT_SLOT( setupRecentlyFilesMenu() ) );
- connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ),
- this, TQT_SLOT( setupRecentlyProjectsMenu() ) );
- connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ),
- this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) );
- connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ),
- this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) );
+ connect( recentlyFilesMenu, TQ_SIGNAL( aboutToShow() ),
+ this, TQ_SLOT( setupRecentlyFilesMenu() ) );
+ connect( recentlyProjectsMenu, TQ_SIGNAL( aboutToShow() ),
+ this, TQ_SLOT( setupRecentlyProjectsMenu() ) );
+ connect( recentlyFilesMenu, TQ_SIGNAL( activated( int ) ),
+ this, TQ_SLOT( recentlyFilesMenuActivated( int ) ) );
+ connect( recentlyProjectsMenu, TQ_SIGNAL( activated( int ) ),
+ this, TQ_SLOT( recentlyProjectsMenuActivated( int ) ) );
if ( !singleProject )
fileMenu->insertSeparator();
- a = new DesignerAction( TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( this, 0 );
actionFileExit = a;
if ( !singleProjectMode() ) {
a->setText( i18n( "Exit" ) );
@@ -778,7 +778,7 @@ void MainWindow::setupFileActions()
a->setText( i18n( "Close" ) );
a->setMenuText( i18n( "&Close" ) );
}
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileQuit() ) );
a->addTo( fileMenu );
}
@@ -790,14 +790,14 @@ void MainWindow::setupProjectActions()
TQActionGroup *ag = new TQActionGroup( this, 0 );
ag->setText( i18n( "Active Project" ) );
ag->setMenuText( i18n( "Active Project" ) );
- ag->setExclusive( TRUE );
- ag->setUsesDropDown( TRUE );
- connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) );
- connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) );
- DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE );
- eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE );
+ ag->setExclusive( true );
+ ag->setUsesDropDown( true );
+ connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) );
+ connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) );
+ DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, true );
+ eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, true );
projects.insert( a, eProject );
- a->setOn( TRUE );
+ a->setOn( true );
ag->addTo( projectMenu );
ag->addTo( projectToolBar );
actionGroupProjects = ag;
@@ -805,44 +805,44 @@ void MainWindow::setupProjectActions()
if ( !singleProject )
projectMenu->insertSeparator();
- a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 );
actionProjectAddFile = a;
a->setStatusTip( i18n("Adds a file to the current project") );
a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) );
- a->setEnabled( FALSE );
- connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) );
+ a->setEnabled( false );
+ connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( projectMenu );
actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(),
- i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "&Image Collection..." ), 0, this, 0 );
actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") );
actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
- connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) );
- actionEditPixmapCollection->setEnabled( FALSE );
- connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) );
+ actionEditPixmapCollection->setEnabled( false );
+ connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu );
#ifndef TQT_NO_SQL
actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(),
- i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "&Database Connections..." ), 0, this, 0 );
actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") );
actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
- connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) );
- //actionEditDatabaseConnections->setEnabled( FALSE );
- //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) );
+ //actionEditDatabaseConnections->setEnabled( false );
+ //connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
actionEditDatabaseConnections->addTo( projectMenu );
#endif
actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(),
- i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "&Project Settings..." ), 0, this, 0 );
actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") );
actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
- connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) );
- actionEditProjectSettings->setEnabled( FALSE );
- connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) );
+ connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) );
+ actionEditProjectSettings->setEnabled( false );
+ connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu );
}
@@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions()
layoutMenu = menu;
menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 );
- a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 );
+ a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 );
actionPreview = a;
a->setAccel( CTRL + Key_T );
a->setStatusTip( i18n("Opens a preview") );
a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) );
- connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( previewForm() ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
a->addTo( menu );
menu->insertSeparator();
- TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) );
- connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) );
+ TQSignalMapper *mapper = new TQSignalMapper( this );
+ connect( mapper, TQ_SIGNAL(mapped(const TQString&)), this, TQ_SLOT(previewForm(const TQString&)) );
TQStringList styles = TQStyleFactory::keys();
for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) {
TQString info;
@@ -884,59 +884,59 @@ void MainWindow::setupPreviewActions()
info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." );
a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(),
- i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 );
+ i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 );
a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) );
a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>"
"<p>Use the preview to test the design and "
"signal-slot connections of the current form. %2</p>").arg( *it ).arg( info ) );
mapper->setMapping( a, *it );
- connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) );
+ connect( a, TQ_SIGNAL(activated()), mapper, TQ_SLOT(map()) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
a->addTo( menu );
}
}
void MainWindow::setupWindowActions()
{
-/* static bool windowActionsSetup = FALSE;
+/* static bool windowActionsSetup = false;
if ( !windowActionsSetup ) {
- windowActionsSetup = TRUE;
+ windowActionsSetup = true;
*/
- actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) );
+ actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this );
actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") );
actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) );
- connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) );
- actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) );
+ connect( actionWindowTile, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( tile() ) );
+ actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this );
actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") );
actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) );
- connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) );
+ connect( actionWindowCascade, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( cascade() ) );
- actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) );
+ actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this );
actionWindowClose->setStatusTip( i18n( "Closes the active window") );
actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) );
- connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) );
+ connect( actionWindowClose, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeActiveWindow() ) );
- actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) );
+ actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this );
actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") );
actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) );
- connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) );
+ connect( actionWindowCloseAll, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeAllWindows() ) );
- actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) );
+ actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this );
actionWindowNext->setStatusTip( i18n( "Activates the next window" ) );
actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) );
- connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) );
+ connect( actionWindowNext, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activateNextWindow() ) );
- actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) );
+ actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this );
actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) );
actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) );
- connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) );
+ connect( actionWindowPrevious, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activatePreviousWindow() ) );
// }
if ( !windowMenu ) {
windowMenu = new TQPopupMenu( this, "Window" );
menubar->insertItem( i18n( "&Window" ), windowMenu );
- connect( windowMenu, TQT_SIGNAL( aboutToShow() ),
- this, TQT_SLOT( setupWindowActions() ) );
+ connect( windowMenu, TQ_SIGNAL( aboutToShow() ),
+ this, TQ_SLOT( setupWindowActions() ) );
} else {
windowMenu->clear();
}
@@ -958,20 +958,20 @@ void MainWindow::setupWindowActions()
int j = 0;
for ( int i = 0; i < int( windows.count() ); ++i ) {
TQWidget *w = windows.at( i );
- if ( !::tqqt_cast<FormWindow*>(w) && !::tqqt_cast<SourceEditor*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) && !::tqt_cast<SourceEditor*>(w) )
continue;
- if ( ::tqqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) )
+ if ( ::tqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) )
continue;
j++;
TQString itemText;
if ( j < 10 )
itemText = TQString("&%1 ").arg( j );
- if ( ::tqqt_cast<FormWindow*>(w) )
+ if ( ::tqt_cast<FormWindow*>(w) )
itemText += w->name();
else
itemText += w->caption();
- int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) );
+ int id = windowMenu->insertItem( itemText, this, TQ_SLOT( windowsMenuActivated( int ) ) );
windowMenu->setItemParameter( id, i );
windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) );
}
@@ -979,39 +979,31 @@ void MainWindow::setupWindowActions()
void MainWindow::setupHelpActions()
{
- actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 );
+ actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 );
actionHelpContents->setStatusTip( i18n("Opens the online help") );
actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) );
- connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) );
+ connect( actionHelpContents, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpContents() ) );
- actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 );
+ actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 );
actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") );
actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) );
- connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) );
+ connect( actionHelpManual, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpManual() ) );
- actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 );
+ actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 );
actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") );
actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) );
- connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) );
+ connect( actionHelpAbout, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAbout() ) );
- actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 );
+ actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, this, 0 );
actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") );
actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) );
- connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) );
-
-#if 0 //defined(TQT_NON_COMMERCIAL)
- // ### not used anymore -- should be deleted?
- actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 );
- actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") );
- actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") );
- connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) );
-#endif
+ connect( actionHelpAboutTQt, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAboutTQt() ) );
actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ),
- i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 );
+ i18n("What's This?"), SHIFT + Key_F1, this, 0 );
actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") );
actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) );
- connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) );
+ connect( actionHelpWhatsThis, TQ_SIGNAL( activated() ), this, TQ_SLOT( whatsThis() ) );
/* TQToolBar *tb = new TQToolBar( this, "Help" );
tb->setCloseMode( TQDockWindow::Undocked );
@@ -1027,11 +1019,6 @@ void MainWindow::setupHelpActions()
menu->insertSeparator();
actionHelpAbout->addTo( menu );
actionHelpAboutTQt->addTo( menu );
-#if 0 //defined(TQT_NON_COMMERCIAL)
- // ### not used anymore -- should be deleted?
- actionHelpRegister->addTo( menu );
-#endif
-
menu->insertSeparator();
actionHelpWhatsThis->addTo( menu );
}
@@ -1051,23 +1038,23 @@ void MainWindow::fileNewDialog()
while ( currentProject->findFormFile( n + ".ui" ) )
n = "Dialog" + TQString::number( ++forms );
FormWindow *fw = 0;
- FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject );
+ FormFile *ff = new FormFile( n + ".ui", false, currentProject );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
- ff->setModified( TRUE );
- currentProject->setModified( TRUE );
+ ff->setModified( true );
+ currentProject->setModified( true );
workspace()->update();
fw->setProject( currentProject );
- MetaDataBase::addEntry( TQT_TQOBJECT(fw) );
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() );
+ MetaDataBase::addEntry( fw );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w );
fw->setCaption( n );
fw->resize( 600, 480 );
insertFormWindow( fw );
- fw->killAccels( TQT_TQOBJECT(fw) );
- fw->project()->setModified( TRUE );
+ fw->killAccels( fw );
+ fw->project()->setModified( true );
fw->setFocus();
- fw->setSavePixmapInProject( TRUE );
- fw->setSavePixmapInline( FALSE );
+ fw->setSavePixmapInProject( true );
+ fw->setSavePixmapInline( false );
}
void MainWindow::fileNewFile()
@@ -1077,10 +1064,10 @@ void MainWindow::fileNewFile()
return;
if ( name.right( 3 ) != ".qs" )
name += ".qs";
- SourceFile *f = new SourceFile( name, FALSE, currentProject );
+ SourceFile *f = new SourceFile( name, false, currentProject );
MainWindow::self->editSource( f );
- f->setModified( TRUE );
- currentProject->setModified( TRUE );
+ f->setModified( true );
+ currentProject->setModified( true );
workspace()->update();
}
@@ -1098,9 +1085,9 @@ void MainWindow::fileClose()
} else {
TQWidget *w = qworkspace->activeWindow();
if ( w ) {
- if ( ::tqqt_cast<FormWindow*>(w) )
+ if ( ::tqt_cast<FormWindow*>(w) )
( (FormWindow*)w )->formFile()->close();
- else if ( ::tqqt_cast<SourceEditor*>(w) )
+ else if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->close();
}
}
@@ -1140,26 +1127,26 @@ void MainWindow::fileCloseProject()
}
TQWidgetList windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( TRUE );
+ qWorkspace()->blockSignals( true );
TQWidgetListIt wit( windows );
while ( wit.current() ) {
TQWidget *w = wit.current();
++wit;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
if ( !( (FormWindow*)w )->formFile()->close() )
return;
}
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
if ( !( (SourceEditor*)w )->close() )
return;
}
}
hierarchyView->clear();
windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( FALSE );
+ qWorkspace()->blockSignals( false );
actionGroupProjects->removeChild( a );
projects.remove( a );
delete a;
@@ -1170,23 +1157,23 @@ void MainWindow::fileCloseProject()
}
if ( !windows.isEmpty() ) {
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( !::tqqt_cast<FormWindow*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) )
continue;
w->setFocus();
activeWindowChanged( w );
break;
}
} else {
- emit hasActiveWindow( FALSE );
- emit hasActiveForm( FALSE );
- updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
+ emit hasActiveWindow( false );
+ emit hasActiveForm( false );
+ updateUndoRedo( false, false, TQString(), TQString() );
}
}
}
void MainWindow::fileOpen() // as called by the menu
{
- fileOpen( "", "", "", FALSE );
+ fileOpen( "", "", "", false );
}
void MainWindow::projectInsertFile()
@@ -1246,24 +1233,24 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co
if ( !filename.isEmpty() ) {
TQFileInfo fi( filename );
- if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) {
+ if ( fi.extension( false ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) {
addRecentlyOpened( filename, recentlyProjects );
openProject( filename );
- } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) {
+ } else if ( fi.extension( false ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) {
if ( !inProject )
setCurrentProject( eProject );
openFormWindow( filename );
addRecentlyOpened( filename, recentlyFiles );
- } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 ||
- additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) {
+ } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( false ) ) != -1 ||
+ additionalSources.find( fi.extension( false ) ) != additionalSources.end() ) {
SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) );
if ( !sf )
- sf = new SourceFile( project->makeRelative( filename ), FALSE, project );
+ sf = new SourceFile( project->makeRelative( filename ), false, project );
editSource( sf );
} else if ( extension.isEmpty() ) {
TQString filter;
for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) {
- if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) {
+ if ( (*it2).contains( "." + fi.extension( false ), false ) ) {
filter = *it2;
break;
}
@@ -1287,7 +1274,7 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co
setCurrentProject( eProject );
addRecentlyOpened( filename, recentlyFiles );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) {
- openFormWindow( *it, FALSE );
+ openFormWindow( *it, false );
TQFile::remove( *it );
}
statusBar()->clear();
@@ -1302,10 +1289,10 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile
if ( filename.isEmpty() )
return 0;
- bool makeNew = FALSE;
+ bool makeNew = false;
if ( !TQFile::exists( filename ) ) {
- makeNew = TRUE;
+ makeNew = true;
} else {
TQFile f( filename );
f.open( IO_ReadOnly );
@@ -1331,7 +1318,7 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile
TQApplication::setOverrideCursor( WaitCursor );
Resource resource( this );
if ( !ff )
- ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject );
+ ff = new FormFile( currentProject->makeRelative( filename ), false, currentProject );
bool b = resource.load( ff ) && (FormWindow*)resource.widget();
if ( !validFileName && resource.widget() )
( (FormWindow*)resource.widget() )->setFileName( TQString() );
@@ -1358,7 +1345,7 @@ bool MainWindow::fileSave()
bool MainWindow::fileSaveForm()
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
- if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) {
+ if ( e->object() == formWindow() || e == qWorkspace()->activeWindow() ) {
e->save();
}
}
@@ -1367,13 +1354,13 @@ bool MainWindow::fileSaveForm()
TQWidget *w = qWorkspace()->activeWindow();
if ( w ) {
- if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ if ( ::tqt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w;
if ( se->formWindow() )
fw = se->formWindow();
else if ( se->sourceFile() ) {
se->sourceFile()->save();
- return TRUE;
+ return true;
}
}
}
@@ -1381,16 +1368,16 @@ bool MainWindow::fileSaveForm()
if ( !fw )
fw = formWindow();
if ( !fw || !fw->formFile()->save() )
- return FALSE;
+ return false;
TQApplication::restoreOverrideCursor();
- return TRUE;
+ return true;
}
bool MainWindow::fileSaveProject()
{
currentProject->save();
statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */);
- return TRUE;
+ return true;
}
bool MainWindow::fileSaveAs()
@@ -1399,12 +1386,12 @@ bool MainWindow::fileSaveAs()
TQWidget *w = qworkspace->activeWindow();
if ( !w )
- return TRUE;
- if ( ::tqqt_cast<FormWindow*>(w) )
+ return true;
+ if ( ::tqt_cast<FormWindow*>(w) )
return ( (FormWindow*)w )->formFile()->saveAs();
- else if ( ::tqqt_cast<SourceEditor*>(w) )
+ else if ( ::tqt_cast<SourceEditor*>(w) )
return ( (SourceEditor*)w )->saveAs();
- return FALSE;
+ return false;
}
void MainWindow::fileSaveAll()
@@ -1415,7 +1402,7 @@ void MainWindow::fileSaveAll()
void MainWindow::fileCreateTemplate()
{
- CreateTemplate dia( this, 0, TRUE );
+ CreateTemplate dia( this, 0, true );
int i = 0;
for ( i = 0; i < WidgetDatabase::count(); ++i ) {
@@ -1425,7 +1412,7 @@ void MainWindow::fileCreateTemplate()
}
for ( i = 0; i < WidgetDatabase::count(); ++i ) {
if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) &&
- WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) {
+ WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) {
dia.listClass->insertItem( WidgetDatabase::className( i ) );
}
}
@@ -1437,14 +1424,14 @@ void MainWindow::fileCreateTemplate()
}
dia.editName->setText( i18n( "NewTemplate" ) );
- connect( dia.buttonCreate, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( createNewTemplate() ) );
+ connect( dia.buttonCreate, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( createNewTemplate() ) );
dia.exec();
}
void MainWindow::createNewTemplate()
{
- CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent();
+ CreateTemplate *dia = (CreateTemplate*)sender()->parent();
TQString fn = dia->editName->text();
TQString cn = dia->listClass->currentText();
if ( fn.isEmpty() || cn.isEmpty() ) {
@@ -1499,7 +1486,7 @@ void MainWindow::createNewTemplate()
void MainWindow::editUndo()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo();
return;
}
@@ -1510,7 +1497,7 @@ void MainWindow::editUndo()
void MainWindow::editRedo()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo();
return;
}
@@ -1521,7 +1508,7 @@ void MainWindow::editRedo()
void MainWindow::editCut()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editCut();
return;
}
@@ -1532,7 +1519,7 @@ void MainWindow::editCut()
void MainWindow::editCopy()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy();
return;
}
@@ -1543,7 +1530,7 @@ void MainWindow::editCopy()
void MainWindow::editPaste()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste();
return;
}
@@ -1555,7 +1542,7 @@ void MainWindow::editPaste()
if ( l.count() == 1 ) {
w = l.first();
if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ||
- ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) &&
+ ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) &&
w != formWindow()->mainContainer() ) )
w = formWindow()->mainContainer();
}
@@ -1563,7 +1550,7 @@ void MainWindow::editPaste()
if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) );
hierarchyView->widgetInserted( 0 );
- formWindow()->commandHistory()->setModified( TRUE );
+ formWindow()->commandHistory()->setModified( true );
} else {
TQMessageBox::information( this, i18n( "Paste Error" ),
i18n( "Cannot paste widgets. Designer could not find a container\n"
@@ -1582,7 +1569,7 @@ void MainWindow::editDelete()
void MainWindow::editSelectAll()
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll();
return;
}
@@ -1728,7 +1715,7 @@ void MainWindow::editFunctions()
return;
statusMessage( i18n( "Edit the current form's slots..." ) );
- EditFunctions dlg( this, formWindow(), TRUE );
+ EditFunctions dlg( this, formWindow(), true );
dlg.exec();
statusBar()->clear();
}
@@ -1774,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor()
}
if ( !editor )
-editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang );
+editor = createSourceEditor( formWindow(), formWindow()->project(), lang );
return editor;
}
@@ -1822,7 +1809,7 @@ SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project
if ( editor->object() != object )
editor->setObject( object, project );
else if ( rereadSource )
- editor->refresh( FALSE );
+ editor->refresh( false );
editor->show();
editor->setFocus();
@@ -1852,7 +1839,7 @@ void MainWindow::editProjectSettings()
void MainWindow::editPixmapCollection()
{
- PixmapCollectionEditor dia( this, 0, TRUE );
+ PixmapCollectionEditor dia( this, 0, true );
dia.setProject( currentProject );
dia.exec();
}
@@ -1860,7 +1847,7 @@ void MainWindow::editPixmapCollection()
void MainWindow::editDatabaseConnections()
{
#ifndef TQT_NO_SQL
- DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE );
+ DatabaseConnectionsEditor dia( currentProject, this, 0, true );
dia.exec();
#endif
}
@@ -1868,9 +1855,9 @@ void MainWindow::editDatabaseConnections()
void MainWindow::editPreferences()
{
statusMessage( i18n( "Edit preferences..." ) );
- Preferences *dia = new Preferences( this, 0, TRUE );
+ Preferences *dia = new Preferences( this, 0, true );
prefDia = dia;
- connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
dia->buttonColor->setEditor( StyledButton::ColorEditor );
dia->buttonPixmap->setEditor( StyledButton::PixmapEditor );
dia->groupBoxGrid->setChecked( sGrid );
@@ -1885,9 +1872,9 @@ void MainWindow::editPreferences()
if ( qworkspace->backgroundPixmap() )
dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() );
if ( backPix )
- dia->radioPixmap->setChecked( TRUE );
+ dia->radioPixmap->setChecked( true );
else
- dia->radioColor->setChecked( TRUE );
+ dia->radioColor->setChecked( true );
dia->checkBoxSplash->setChecked( splashScreen );
dia->checkAutoEdit->setChecked( !databaseAutoEdit );
dia->checkBoxStartDialog->setChecked( shStartDialog );
@@ -1904,11 +1891,11 @@ void MainWindow::editPreferences()
Tab t = *it;
dia->tabWidget->addTab( t.w, t.title );
if ( t.receiver ) {
- connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) );
- connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
- connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ connect( dia->buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) );
+ connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
+ connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
senderObject->emitInitSignal();
- disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
}
}
@@ -1922,15 +1909,15 @@ void MainWindow::editPreferences()
if (dia->textEditPluginPaths->isModified()) {
pluginPaths = dia->textEditPluginPaths->text();
TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths));
- savePluginPaths = TRUE;
+ savePluginPaths = true;
}
if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) {
qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() );
- backPix = TRUE;
+ backPix = true;
} else {
qworkspace->setBackgroundColor( dia->buttonColor->color() );
- backPix = FALSE;
+ backPix = false;
}
splashScreen = dia->checkBoxSplash->isChecked();
databaseAutoEdit = !dia->checkAutoEdit->isChecked();
@@ -1947,7 +1934,7 @@ void MainWindow::editPreferences()
for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) {
Tab t = *it;
dia->tabWidget->removePage( t.w );
- t.w->reparent( 0, TQPoint(0,0), FALSE );
+ t.w->reparent( 0, TQPoint(0,0), false );
}
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
@@ -1961,11 +1948,11 @@ void MainWindow::editPreferences()
void MainWindow::searchFind()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
if ( !findDialog )
- findDialog = new FindDialog( this, 0, FALSE );
+ findDialog = new FindDialog( this, 0, false );
findDialog->show();
findDialog->raise();
findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@@ -1983,31 +1970,31 @@ void MainWindow::searchIncremetalFindMenu()
void MainWindow::searchIncremetalFind()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
- FALSE, FALSE, TRUE, FALSE );
+ false, false, true, false );
}
void MainWindow::searchIncremetalFindNext()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
- FALSE, FALSE, TRUE, TRUE );
+ false, false, true, true );
}
void MainWindow::searchReplace()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
if ( !replaceDialog )
- replaceDialog = new ReplaceDialog( this, 0, FALSE );
+ replaceDialog = new ReplaceDialog( this, 0, false );
replaceDialog->show();
replaceDialog->raise();
replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(),
@@ -2019,11 +2006,11 @@ void MainWindow::searchReplace()
void MainWindow::searchGotoLine()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
if ( !gotoLineDialog )
- gotoLineDialog = new GotoLineDialog( this, 0, FALSE );
+ gotoLineDialog = new GotoLineDialog( this, 0, false );
gotoLineDialog->show();
gotoLineDialog->raise();
gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() );
diff --git a/kdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp
index f62e15e0..6941c05b 100644
--- a/kdevdesigner/designer/menubareditor.cpp
+++ b/kdevdesigner/designer/menubareditor.cpp
@@ -78,13 +78,13 @@ bool MenuBarEditorItemPtrDrag::decode( TQDropEvent * e, MenuBarEditorItem ** i )
TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
- return FALSE;
+ return false;
TQ_LONG p = 0;
stream >> p;
*i = ( MenuBarEditorItem *) p;
- return TRUE;
+ return true;
}
// MenuBarEditorItem ---------------------------------------------------
@@ -93,9 +93,9 @@ MenuBarEditorItem::MenuBarEditorItem( MenuBarEditor * bar, TQObject * parent, co
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
- visible( TRUE ),
- separator( FALSE ),
- removable( FALSE )
+ visible( true ),
+ separator( false ),
+ removable( false )
{ }
MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * bar,
@@ -103,9 +103,9 @@ MenuBarEditorItem::MenuBarEditorItem( PopupMenuEditor * menu, MenuBarEditor * ba
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( menu ),
- visible( TRUE ),
- separator( FALSE ),
- removable( TRUE )
+ visible( true ),
+ separator( false ),
+ removable( true )
{
text = menu->name();
}
@@ -115,9 +115,9 @@ MenuBarEditorItem::MenuBarEditorItem( TQActionGroup * actionGroup, MenuBarEditor
: TQObject( parent, name ),
menuBar( bar ),
popupMenu( 0 ),
- visible( TRUE ),
- separator( FALSE ),
- removable( TRUE )
+ visible( true ),
+ separator( false ),
+ removable( true )
{
text = actionGroup->menuText();
popupMenu = new PopupMenuEditor( menuBar->formWindow(), menuBar );
@@ -148,11 +148,11 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n
currentIndex( 0 ),
itemHeight( 0 ),
separatorWidth( 32 ),
- hideWhenEmpty( TRUE ),
- hasSeparator( FALSE )
+ hideWhenEmpty( true ),
+ hasSeparator( false )
{
- setAcceptDrops( TRUE );
- setFocusPolicy( TQ_StrongFocus );
+ setAcceptDrops( true );
+ setFocusPolicy( TQWidget::StrongFocus );
addItem.setMenuText( i18n("new menu") );
addSeparator.setMenuText( i18n("new separator") );
@@ -174,7 +174,7 @@ MenuBarEditor::MenuBarEditor( FormWindow * fw, TQWidget * parent, const char * n
MenuBarEditor::~MenuBarEditor()
{
- itemList.setAutoDelete( TRUE );
+ itemList.setAutoDelete( true );
}
FormWindow * MenuBarEditor::formWindow()
@@ -238,9 +238,9 @@ void MenuBarEditor::insertSeparator( int index )
return;
MenuBarEditorItem * i = createItem( index );
- i->setSeparator( TRUE );
+ i->setSeparator( true );
i->setMenuText( i18n( "separator" ) );
- hasSeparator = TRUE;
+ hasSeparator = true;
}
void MenuBarEditor::removeItemAt( int index )
@@ -255,7 +255,7 @@ void MenuBarEditor::removeItem( MenuBarEditorItem * item )
itemList.removeRef( item ) ) {
if ( item->isSeparator() )
- hasSeparator = FALSE;
+ hasSeparator = false;
if ( hideWhenEmpty && itemList.count() == 0 )
hide();
@@ -571,7 +571,7 @@ void MenuBarEditor::paste()
bool MenuBarEditor::eventFilter( TQObject * o, TQEvent * e )
{
- if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) {
+ if ( o == lineEdit && e->type() == TQEvent::FocusOut ) {
leaveEditMode();
lineEdit->hide();
update();
@@ -585,7 +585,7 @@ void MenuBarEditor::paintEvent( TQPaintEvent * )
{
TQPainter p( this );
TQRect r = rect();
- style().tqdrawPrimitive( TQStyle::PE_PanelMenuBar, &p,
+ style().drawPrimitive( TQStyle::PE_PanelMenuBar, &p,
r, colorGroup() );
drawItems( p );
}
@@ -616,22 +616,22 @@ void MenuBarEditor::mouseDoubleClickEvent( TQMouseEvent * e )
void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
{
- if ( e->state() & Qt::LeftButton ) {
+ if ( e->state() & TQt::LeftButton ) {
if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) {
- bool itemCreated = FALSE;
- bool isSeparator = FALSE;
+ bool itemCreated = false;
+ bool isSeparator = false;
draggedItem = item( findItem( mousePressPos ) );
if ( draggedItem == &addItem ) {
draggedItem = createItem();
- itemCreated = TRUE;
+ itemCreated = true;
} else if ( draggedItem == &addSeparator ) {
if (hasSeparator) // we can only have one separator
return;
draggedItem = createItem();
- draggedItem->setSeparator( TRUE );
+ draggedItem->setSeparator( true );
draggedItem->setMenuText( "separator" );
- isSeparator = TRUE;
- itemCreated = TRUE;
+ isSeparator = true;
+ itemCreated = true;
} else {
isSeparator = draggedItem->isSeparator();
}
@@ -640,7 +640,7 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
new MenuBarEditorItemPtrDrag( draggedItem, this );
d->setPixmap( createTextPixmap( draggedItem->menuText() ) );
hideItem();
- draggedItem->setVisible( FALSE );
+ draggedItem->setVisible( false );
update();
// If the item is dropped in the same list,
@@ -648,21 +648,21 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
// in the list.
itemList.find( draggedItem );
TQLNode * node = itemList.currentNode();
- dropConfirmed = FALSE;
+ dropConfirmed = false;
d->dragCopy(); // dragevents and stuff happens
if ( draggedItem ) { // item was not dropped
if ( itemCreated ) {
removeItem( draggedItem );
} else {
hideItem();
- draggedItem->setVisible( TRUE );
+ draggedItem->setVisible( true );
draggedItem = 0;
showItem();
}
} else if ( dropConfirmed ) { // item was dropped
- dropConfirmed = FALSE;
+ dropConfirmed = false;
hideItem();
- itemList.takeNode( node )->setVisible( TRUE );
+ itemList.takeNode( node )->setVisible( true );
hasSeparator = isSeparator || hasSeparator;
showItem();
} else {
@@ -818,7 +818,7 @@ void MenuBarEditor::keyPressEvent( TQKeyEvent * e )
void MenuBarEditor::focusOutEvent( TQFocusEvent * e )
{
TQWidget * fw = tqApp->focusWidget();
- if ( e->lostFocus() && !::tqqt_cast<PopupMenuEditor*>(fw) )
+ if ( e->lostFocus() && !::tqt_cast<PopupMenuEditor*>(fw) )
hideItem();
update();
}
@@ -1007,10 +1007,10 @@ void MenuBarEditor::dropInPlace( MenuBarEditorItem * i, const TQPoint & pos )
int iidx = itemList.findRef( i );
if ( iidx != -1 ) { // internal dnd
cmd = new MoveMenuCommand( i18n( "Item Dragged" ), formWnd, this, iidx, idx );
- item( iidx )->setVisible( TRUE );
+ item( iidx )->setVisible( true );
} else {
cmd = new AddMenuCommand( i18n( "Add Menu" ), formWnd, this, i, idx );
- dropConfirmed = TRUE; // let mouseMoveEvent set the item visible
+ dropConfirmed = true; // let mouseMoveEvent set the item visible
}
formWnd->commandHistory()->addCommand( cmd );
cmd->execute();
diff --git a/kdevdesigner/designer/menubareditor.h b/kdevdesigner/designer/menubareditor.h
index f6279f2b..72d7968a 100644
--- a/kdevdesigner/designer/menubareditor.h
+++ b/kdevdesigner/designer/menubareditor.h
@@ -36,7 +36,7 @@ class TQActionGroup;
class MenuBarEditorItem : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
friend class MenuBarEditor;
@@ -81,7 +81,7 @@ class FormWindow;
class MenuBarEditor : public TQMenuBar
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -90,7 +90,7 @@ public:
FormWindow * formWindow();
- MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = TRUE );
+ MenuBarEditorItem * createItem( int index = -1, bool addToCmdStack = true );
void insertItem( MenuBarEditorItem * item, int index = -1 );
void insertItem( TQString text, PopupMenuEditor * menu, int index = -1 );
void insertItem( TQString text, TQActionGroup * group, int index = -1 );
diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp
index 39711a64..67c9338d 100644
--- a/kdevdesigner/designer/metadatabase.cpp
+++ b/kdevdesigner/designer/metadatabase.cpp
@@ -38,7 +38,7 @@
#include <kiconloader.h>
#include <tdeapplication.h>
-#include <kstandarddirs.h>
+#include <tdestandarddirs.h>
#include <tqapplication.h>
#include <tqobject.h>
@@ -50,7 +50,7 @@
#include <tqwidgetlist.h>
#include <tqmainwindow.h>
#include <tqregexp.h>
-#include <tqpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
#include <tqdatetime.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -85,7 +85,7 @@ public:
static TQPtrDict<MetaDataBaseRecord> *db = 0;
static TQPtrList<MetaDataBase::CustomWidget> *cWidgets = 0;
-static bool doUpdate = TRUE;
+static bool doUpdate = true;
static TQStringList langList;
static TQStringList editorLangList;
static TQPluginManager<LanguageInterface> *languageInterfaceManager = 0;
@@ -107,9 +107,9 @@ inline void setupDataBase()
{
if ( !db || !cWidgets ) {
db = new TQPtrDict<MetaDataBaseRecord>( 1481 );
- db->setAutoDelete( TRUE );
+ db->setAutoDelete( true );
cWidgets = new TQPtrList<MetaDataBase::CustomWidget>;
- cWidgets->setAutoDelete( TRUE );
+ cWidgets->setAutoDelete( true );
}
}
@@ -166,20 +166,20 @@ void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bo
if ( doUpdate &&
( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) {
- doUpdate = FALSE;
+ doUpdate = false;
setPropertyChanged( o, "alignment", changed ||
isPropertyChanged( o, "hAlign" ) ||
isPropertyChanged( o, "vAlign" ) ||
isPropertyChanged( o, "wordwrap" ) );
- doUpdate = TRUE;
+ doUpdate = true;
}
if ( doUpdate && property == "alignment" ) {
- doUpdate = FALSE;
+ doUpdate = false;
setPropertyChanged( o, "hAlign", changed );
setPropertyChanged( o, "vAlign", changed );
setPropertyChanged( o, "wordwrap", changed );
- doUpdate = TRUE;
+ doUpdate = true;
}
}
@@ -192,7 +192,7 @@ bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
return r->changedProperties.findIndex( property ) != -1;
@@ -321,8 +321,8 @@ int MetaDataBase::spacing( TQObject *o )
if ( !o )
return -1;
setupDataBase();
- if ( ::tqqt_cast<TQMainWindow*>(o) )
- o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ if ( ::tqt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -349,13 +349,13 @@ void MetaDataBase::setMargin( TQObject *o, int margin )
TQLayout * layout = 0;
WidgetFactory::layoutType( (TQWidget*)o, layout );
- bool isInnerLayout = TRUE;
+ bool isInnerLayout = true;
TQWidget *widget = (TQWidget*)o;
- if ( widget && !::tqqt_cast<TQLayoutWidget*>(widget) &&
- ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ||
- widget && widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) )
- isInnerLayout = FALSE;
+ if ( widget && !::tqt_cast<TQLayoutWidget*>(widget) &&
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
+ widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
+ isInnerLayout = false;
if ( layout ) {
@@ -378,8 +378,8 @@ int MetaDataBase::margin( TQObject *o )
if ( !o )
return -1;
setupDataBase();
- if ( ::tqqt_cast<TQMainWindow*>(o) )
- o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ if ( ::tqt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -409,8 +409,8 @@ TQString MetaDataBase::resizeMode( TQObject *o )
if ( !o )
return TQString();
setupDataBase();
- if ( ::tqqt_cast<TQMainWindow*>(o) )
- o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget());
+ if ( ::tqt_cast<TQMainWindow*>(o) )
+ o = ( (TQMainWindow*)o )->centralWidget();
MetaDataBaseRecord *r = db->find( (void*)o );
if ( !r || !o->isWidgetType() ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
@@ -440,15 +440,15 @@ void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString
r->connections.append( conn );
if ( addCode ) {
TQString rec = receiver->name();
- if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() )
+ if ( ::tqt_cast<FormWindow*>(o) && receiver ==( (FormWindow*)o )->mainContainer() )
rec = "this";
TQString sen = sender->name();
- if ( ::tqqt_cast<FormWindow*>(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() )
+ if ( ::tqt_cast<FormWindow*>(o) && sender ==( (FormWindow*)o )->mainContainer() )
sen = "this";
FormFile *ff = 0;
- if ( ::tqqt_cast<FormFile*>(o) )
+ if ( ::tqt_cast<FormFile*>(o) )
ff = (FormFile*)o;
- else if ( ::tqqt_cast<FormWindow*>(o) )
+ else if ( ::tqt_cast<FormWindow*>(o) )
ff = ( (FormWindow*)o )->formFile();
ff->addConnection( sen, signal, rec, slot );
}
@@ -468,17 +468,17 @@ void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCStr
return;
for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
Connection conn = *it;
- if ( TQT_BASE_OBJECT(conn.sender) ==sender &&
+ if ( conn.sender ==sender &&
conn.signal == signal &&
- TQT_BASE_OBJECT(conn.receiver) ==receiver &&
+ conn.receiver ==receiver &&
conn.slot == slot ) {
r->connections.remove( it );
break;
}
}
- if ( ::tqqt_cast<FormWindow*>(o) ) {
+ if ( ::tqt_cast<FormWindow*>(o) ) {
TQString rec = receiver->name();
- if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() )
+ if ( receiver ==( (FormWindow*)o )->mainContainer() )
rec = "this";
( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot );
}
@@ -494,7 +494,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
return;
}
- if ( !::tqqt_cast<FormFile*>(o) )
+ if ( !::tqt_cast<FormFile*>(o) )
return;
FormFile *formfile = (FormFile*)o;
@@ -514,8 +514,8 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
sender = formfile->project()->objectForFakeFormFile( formfile );
if ( !sender && senderName == "this" )
sender = formfile->formWindow() ?
- TQT_TQOBJECT(formfile->formWindow()->mainContainer()) :
- TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile ));
+ formfile->formWindow()->mainContainer() :
+ formfile->project()->objectForFakeFormFile( formfile );
if ( !sender )
continue;
MetaDataBase::addConnection( formfile->formWindow() ?
@@ -524,10 +524,10 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
sender,
(*cit).signal.latin1(),
formfile->formWindow() ?
- TQT_TQOBJECT(formfile->formWindow()->mainContainer()) :
- TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )),
+ formfile->formWindow()->mainContainer() :
+ formfile->project()->objectForFakeFormFile( formfile ),
(*cit).slot.latin1(),
- FALSE );
+ false );
}
}
@@ -539,18 +539,18 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
for ( TQValueList<Connection>::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) {
Connection conn = *it;
- if ( TQT_BASE_OBJECT(conn.sender) ==sender &&
+ if ( conn.sender ==sender &&
conn.signal == signal &&
- TQT_BASE_OBJECT(conn.receiver) ==receiver &&
+ conn.receiver ==receiver &&
conn.slot == slot )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -581,8 +581,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ
TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
- if ( TQT_BASE_OBJECT((*conn).sender) ==sender &&
- TQT_BASE_OBJECT((*conn).receiver) ==receiver )
+ if ( (*conn).sender ==sender &&
+ (*conn).receiver ==receiver )
ret << *conn;
}
@@ -603,8 +603,8 @@ TQValueList<MetaDataBase::Connection> MetaDataBase::connections( TQObject *o, TQ
TQValueList<Connection>::Iterator conn;
while ( ( conn = it ) != r->connections.end() ) {
++it;
- if ( TQT_BASE_OBJECT((*conn).sender) ==object ||
- TQT_BASE_OBJECT((*conn).receiver) ==object )
+ if ( (*conn).sender ==object ||
+ (*conn).receiver ==object )
ret << *conn;
}
return ret;
@@ -628,7 +628,7 @@ void MetaDataBase::doConnections( TQObject *o )
if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) {
sender = o;
} else {
- l = o->queryList( 0, conn.sender->name(), FALSE );
+ l = o->queryList( 0, conn.sender->name(), false );
if ( !l || !l->first() ) {
delete l;
continue;
@@ -639,7 +639,7 @@ void MetaDataBase::doConnections( TQObject *o )
if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) {
receiver = o;
} else {
- l = o->queryList( 0, conn.receiver->name(), FALSE );
+ l = o->queryList( 0, conn.receiver->name(), false );
if ( !l || !l->first() ) {
delete l;
continue;
@@ -652,8 +652,8 @@ void MetaDataBase::doConnections( TQObject *o )
TQString s2 = "1""%1";
s2 = s2.arg( conn.slot.data() );
- TQStrList signalList = sender->metaObject()->signalNames( TRUE );
- TQStrList slotList = receiver->metaObject()->slotNames( TRUE );
+ TQStrList signalList = sender->metaObject()->signalNames( true );
+ TQStrList slotList = receiver->metaObject()->slotNames( true );
// avoid warnings
if ( signalList.find( conn.signal ) == -1 ||
@@ -671,22 +671,22 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
if ( !onlyCustom ) {
- TQStrList slotList = o->metaObject()->slotNames( TRUE );
+ TQStrList slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
- return TRUE;
+ return true;
- if ( ::tqqt_cast<FormWindow*>(o) ) {
- o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer());
- slotList = o->metaObject()->slotNames( TRUE );
+ if ( ::tqt_cast<FormWindow*>(o) ) {
+ o = ( (FormWindow*)o )->mainContainer();
+ slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
- return TRUE;
+ return true;
}
- //if ( ::tqqt_cast<CustomWidget*>(o) ) {
+ //if ( ::tqt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
@@ -694,7 +694,7 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
if ( !s.data() )
continue;
if ( s == slot )
- return TRUE;
+ return true;
}
}
}
@@ -702,10 +702,10 @@ bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom
for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
@@ -715,15 +715,15 @@ bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
TQValueList<Connection> conns = connections( o );
for ( TQValueList<Connection>::Iterator it = conns.begin(); it != conns.end(); ++it ) {
if ( (*it).slot == slot )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -901,22 +901,22 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
if ( !onlyCustom ) {
- TQStrList functionList = o->metaObject()->slotNames( TRUE );
+ TQStrList functionList = o->metaObject()->slotNames( true );
if ( functionList.find( function ) != -1 )
- return TRUE;
+ return true;
- if ( ::tqqt_cast<FormWindow*>(o) ) {
- o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer());
- functionList = o->metaObject()->slotNames( TRUE );
+ if ( ::tqt_cast<FormWindow*>(o) ) {
+ o = ( (FormWindow*)o )->mainContainer();
+ functionList = o->metaObject()->slotNames( true );
if ( functionList.find( function ) != -1 )
- return TRUE;
+ return true;
}
- //if ( ::tqqt_cast<CustomWidget*>(o) ) {
+ //if ( ::tqt_cast<CustomWidget*>(o) ) {
if ( o->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget();
for ( TQValueList<Function>::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) {
@@ -924,7 +924,7 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
if ( !s.data() )
continue;
if ( s == function )
- return TRUE;
+ return true;
}
}
}
@@ -932,10 +932,10 @@ bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onl
for ( TQValueList<Function>::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) {
Function f = *it;
if ( normalizeFunction( f.function ) == normalizeFunction( function ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function )
@@ -975,7 +975,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
w->lstProperties.append( *it3 );
}
delete wid;
- return FALSE;
+ return false;
}
}
@@ -988,7 +988,7 @@ bool MetaDataBase::addCustomWidget( CustomWidget *wid )
r->isContainer = wid->isContainer;
wid->id = WidgetDatabase::addCustomWidget( r );
cWidgets->append( wid );
- return TRUE;
+ return true;
}
void MetaDataBase::removeCustomWidget( CustomWidget *w )
@@ -1017,18 +1017,18 @@ bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid )
if ( w == wid )
continue;
if ( wid->className == w->className )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool MetaDataBase::hasCustomWidget( const TQString &className )
{
for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) {
if ( w->className == className )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order )
@@ -1175,15 +1175,15 @@ bool MetaDataBase::hasVariable( TQObject *o, const TQString &name )
if ( !r ) {
tqWarning( "No entry for %p (%s, %s) found in MetaDataBase",
o, o->name(), o->className() );
- return FALSE;
+ return false;
}
TQValueList<Variable>::Iterator it = r->variables.begin();
for ( ; it != r->variables.end(); ++it ) {
if ( extractVariableName( name ) == extractVariableName( (*it).varName ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQString MetaDataBase::extractVariableName( const TQString &name )
@@ -1280,7 +1280,7 @@ MetaDataBase::CustomWidget::CustomWidget()
pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) );
id = -1;
sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred );
- isContainer = FALSE;
+ isContainer = false;
}
MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w )
@@ -1354,40 +1354,40 @@ MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomW
bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const
{
- TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE );
+ TQStrList sigList = TQWidget::staticMetaObject()->signalNames( true );
if ( sigList.find( signal ) != -1 )
- return TRUE;
+ return true;
for ( TQValueList<TQCString>::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) {
if ( normalizeFunction( *it ) == normalizeFunction( signal ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const
{
- TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE );
+ TQStrList slotList = TQWidget::staticMetaObject()->slotNames( true );
if ( slotList.find( normalizeFunction( slot ) ) != -1 )
- return TRUE;
+ return true;
for ( TQValueList<MetaDataBase::Function>::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) {
if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const
{
- TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE );
+ TQStrList propList = TQWidget::staticMetaObject()->propertyNames( true );
if ( propList.find( prop ) != -1 )
- return TRUE;
+ return true;
for ( TQValueList<MetaDataBase::Property>::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) {
if ( (*it).property == prop )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg )
diff --git a/kdevdesigner/designer/metadatabase.h b/kdevdesigner/designer/metadatabase.h
index e9535945..c76475c5 100644
--- a/kdevdesigner/designer/metadatabase.h
+++ b/kdevdesigner/designer/metadatabase.h
@@ -135,7 +135,7 @@ public:
struct MetaInfo
{
- MetaInfo() : classNameChanged( FALSE ) { }
+ MetaInfo() : classNameChanged( false ) { }
TQString className;
bool classNameChanged;
TQString comment;
@@ -166,7 +166,7 @@ public:
static TQString resizeMode( TQObject *o );
static void addConnection( TQObject *o, TQObject *sender, const TQCString &signal,
- TQObject *receiver, const TQCString &slot, bool addCode = TRUE );
+ TQObject *receiver, const TQCString &slot, bool addCode = true );
static void removeConnection( TQObject *o, TQObject *sender, const TQCString &signal,
TQObject *receiver, const TQCString &slot );
static bool hasConnection( TQObject *o, TQObject *sender, const TQCString &signal,
@@ -184,11 +184,11 @@ public:
const TQString &access, const TQString &type, const TQString &language,
const TQString &returnType );
static void removeFunction( TQObject *o, const TQString &function );
- static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = FALSE );
+ static TQValueList<Function> functionList( TQObject *o, bool onlyFunctions = false );
static TQValueList<Function> slotList( TQObject *o );
static bool isSlotUsed( TQObject *o, const TQCString &slot );
- static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = FALSE );
- static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = FALSE );
+ static bool hasFunction( TQObject *o, const TQCString &function, bool onlyCustom = false );
+ static bool hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom = false );
static void changeFunction( TQObject *o, const TQString &function, const TQString &newName,
const TQString &returnType );
static void changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName,
diff --git a/kdevdesigner/designer/multilineeditor.ui b/kdevdesigner/designer/multilineeditor.ui
index f0ff2129..83579b04 100644
--- a/kdevdesigner/designer/multilineeditor.ui
+++ b/kdevdesigner/designer/multilineeditor.ui
@@ -172,10 +172,10 @@
<slot>cancelClicked()</slot>
</connection>
</connections>
-<Q_SLOTS>
+<slots>
<slot>applyClicked()</slot>
<slot>okClicked()</slot>
<slot>cancelClicked()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp
index ef06f77b..702e1ca8 100644
--- a/kdevdesigner/designer/multilineeditorimpl.cpp
+++ b/kdevdesigner/designer/multilineeditorimpl.cpp
@@ -36,7 +36,7 @@
#include "kdevdesigner_part.h"
#include <tqtextedit.h>
-#include <tqrichtext_p.h>
+#include <private/tqrichtext_p.h>
#include <tqpushbutton.h>
#include <tqlayout.h>
#include <tqtoolbutton.h>
@@ -56,7 +56,7 @@ ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar,
setAccel( key );
addTo( toolBar );
tag = tagstr;
- connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) );
+ connect( this, TQ_SIGNAL( activated() ), this, TQ_SLOT( wasActivated() ) );
}
ToolBarItem::~ToolBarItem()
@@ -84,7 +84,7 @@ TQTextParagraph* TextEdit::paragraph()
MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget,
FormWindow *fw, const TQString &text )
- : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE )
+ : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( false )
{
callStatic = call_static;
@@ -103,26 +103,26 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ),
"i", BarIcon( "designer_textitalic.png", KDevDesignerPartFactory::instance() ), CTRL+Key_I );
it->addTo( stylesMenu );
- connect( it, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( it, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ),
"b", BarIcon( "designer_textbold.png", KDevDesignerPartFactory::instance() ), CTRL+Key_B );
b->addTo( stylesMenu );
- connect( b, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( b, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ),
"u", BarIcon( "designer_textunderline.png" , KDevDesignerPartFactory::instance()), CTRL+Key_U );
ul->addTo( stylesMenu );
- connect( ul, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( ul, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ),
"tt", BarIcon( "designer_textteletext.png", KDevDesignerPartFactory::instance() ) );
tt->addTo( stylesMenu );
- connect( tt, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( tt, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
basicToolBar->addSeparator();
@@ -134,39 +134,39 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
brAction->setText( i18n("Break" ) );
brAction->addTo( basicToolBar );
brAction->addTo( layoutMenu );
- connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) );
+ connect( brAction, TQ_SIGNAL( activated() ) , this, TQ_SLOT( insertBR() ) );
ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ),
"p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) );
p->addTo( layoutMenu );
- connect( p, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( p, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
layoutMenu->insertSeparator();
basicToolBar->addSeparator();
ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ),
"p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) );
al->addTo( layoutMenu );
- connect( al, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( al, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ),
"p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) );
ac->addTo( layoutMenu );
- connect( ac, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( ac, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ),
"p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) );
ar->addTo( layoutMenu );
- connect( ar, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( ar, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ),
"blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) );
block->addTo( layoutMenu );
- connect( block, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( block, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
TQPopupMenu *fontMenu = new TQPopupMenu( this );
@@ -179,67 +179,67 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
fontAction->setText( i18n("Font" ) );
fontAction->addTo( fontToolBar );
fontAction->addTo( fontMenu );
- connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) );
+ connect( fontAction, TQ_SIGNAL( activated() ) , this, TQ_SLOT( showFontDialog() ) );
ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ),
"font size=\"+1\"", BarIcon( "designer_textlarger.png", KDevDesignerPartFactory::instance() ) );
- connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( fp1, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ),
"font size=\"-1\"", BarIcon( "designer_textsmaller.png", KDevDesignerPartFactory::instance() ) );
- connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( fm1, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ),
"h1", BarIcon( "designer_texth1.png", KDevDesignerPartFactory::instance() ) );
- connect( h1, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( h1, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ),
"h2", BarIcon( "designer_texth2.png", KDevDesignerPartFactory::instance() ) );
- connect( h2, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( h2, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ),
"h3", BarIcon( "designer_texth3.png", KDevDesignerPartFactory::instance() ) );
- connect( h3, TQT_SIGNAL( clicked( const TQString& ) ),
- this, TQT_SLOT( insertTags( const TQString& )));
+ connect( h3, TQ_SIGNAL( clicked( const TQString& ) ),
+ this, TQ_SLOT( insertTags( const TQString& )));
TQPopupMenu *optionsMenu = new TQPopupMenu( this );
menuBar->insertItem( i18n( "O&ptions" ), optionsMenu );
optionsToolBar = new TQToolBar( "Options", this, DockTop );
wrapAction = new TQAction( this );
- wrapAction->setToggleAction( TRUE );
+ wrapAction->setToggleAction( true );
wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", KDevDesignerPartFactory::instance() ) );
wrapAction->setText( i18n( "Word Wrapping" ) );
wrapAction->addTo( optionsToolBar );
wrapAction->addTo( optionsMenu );
- connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) );
+ connect( wrapAction, TQ_SIGNAL( toggled( bool ) ), this, TQ_SLOT( changeWrapMode( bool ) ) );
oldDoWrap = doWrap;
wrapAction->setOn( doWrap );
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
textEdit->document()->setFormatter( new TQTextFormatterBreakInWords );
- textEdit->document()->setUseFormatCollection( FALSE );
+ textEdit->document()->setUseFormatCollection( false );
textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML );
- if ( !callStatic && ::tqqt_cast<TQTextEdit*>(editWidget) ) {
+ if ( !callStatic && ::tqt_cast<TQTextEdit*>(editWidget) ) {
mlined = (TQTextEdit*)editWidget;
- mlined->setReadOnly( TRUE );
+ mlined->setReadOnly( true );
const TQMetaProperty *wordWrap = mlined->metaObject()->property(
- mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE );
+ mlined->metaObject()->findProperty( "wordWrap", true ), true );
oldWrapMode = 0;
oldWrapString = "NoWrap";
if ( wordWrap ) {
oldWrapMode = mlined->property( "wordWrap" );
oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) );
if ( oldWrapString != "NoWrap" )
- doWrap = TRUE;
+ doWrap = true;
}
textEdit->setAlignment( mlined->alignment() );
textEdit->setWordWrap( mlined->wordWrap() );
@@ -286,17 +286,17 @@ void MultiLineEditor::applyClicked()
SetPropertyCommand *propcmd;
if ( doWrap )
propcmd = new SetPropertyCommand( pn, formwindow,
- TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(),
- "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ),
+ mlined, MainWindow::self->propertyeditor(),
+ "wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
TQVariant( 1 ), "WidgetWidth", oldWrapString );
else
propcmd = new SetPropertyCommand( pn, formwindow,
- TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(),
- "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ),
+ mlined, MainWindow::self->propertyeditor(),
+ "wordWrap", WidgetFactory::property( mlined, "wordWrap" ),
TQVariant( 0 ), "NoWrap", oldWrapString );
propcmd->execute();
- formwindow->commandHistory()->addCommand( propcmd, TRUE );
+ formwindow->commandHistory()->addCommand( propcmd, true );
}
textEdit->setFocus();
}
@@ -346,11 +346,11 @@ void MultiLineEditor::insertBR()
void MultiLineEditor::showFontDialog()
{
- bool selText = FALSE;
+ bool selText = false;
int pfrom, pto, ifrom, ito;
if ( textEdit->hasSelectedText() ) {
textEdit->getSelection( &pfrom, &ifrom, &pto, &ito );
- selText = TRUE;
+ selText = true;
}
RichTextFontDialog *fd = new RichTextFontDialog( this );
if ( fd->exec() == TQDialog::Accepted ) {
@@ -380,7 +380,7 @@ TQString MultiLineEditor::getStaticText()
TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap )
{
- MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text );
+ MultiLineEditor medit( true, richtextMode, parent, 0, 0, text );
if ( richtextMode )
medit.setUseWrapping( *useWrap );
if ( medit.exec() == TQDialog::Accepted ) {
diff --git a/kdevdesigner/designer/multilineeditorimpl.h b/kdevdesigner/designer/multilineeditorimpl.h
index 34d47b3e..895a397a 100644
--- a/kdevdesigner/designer/multilineeditorimpl.h
+++ b/kdevdesigner/designer/multilineeditorimpl.h
@@ -29,7 +29,7 @@
#include <tqaction.h>
#include <tqtextedit.h>
-#include <tqrichtext_p.h>
+#include <private/tqrichtext_p.h>
#include "multilineeditor.h"
class FormWindow;
@@ -38,7 +38,7 @@ class TQTextDocument;
class TextEdit : public TQTextEdit
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -50,7 +50,7 @@ public:
class ToolBarItem : public TQAction
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -70,7 +70,7 @@ private:
class MultiLineEditor : public MultiLineEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/newform.ui b/kdevdesigner/designer/newform.ui
index 81cb4fa5..7b95ee55 100644
--- a/kdevdesigner/designer/newform.ui
+++ b/kdevdesigner/designer/newform.ui
@@ -230,9 +230,9 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">itemChanged( TQIconViewItem * )</slot>
<slot access="protected">projectChanged( const TQString &amp; )</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp
index 17dfc1b7..72c8323e 100644
--- a/kdevdesigner/designer/newformimpl.cpp
+++ b/kdevdesigner/designer/newformimpl.cpp
@@ -74,23 +74,23 @@ void FormItem::insert( Project *pro )
{
TQString n = "Form" + TQString::number( ++forms );
FormWindow *fw = 0;
- FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro );
+ FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), true, pro );
fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n );
fw->setProject( pro );
- MetaDataBase::addEntry( TQT_TQOBJECT(fw) );
+ MetaDataBase::addEntry( fw );
if ( fType == Widget ) {
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ),
fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == Dialog ) {
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == Wizard ) {
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWizard" ),
fw, n.latin1() );
fw->setMainContainer( w );
} else if ( fType == MainWindow ) {
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ),
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQMainWindow" ),
fw, n.latin1() );
fw->setMainContainer( w );
}
@@ -109,15 +109,15 @@ void FormItem::insert( Project *pro )
// the wizard might have changed a lot, lets update everything
MainWindow::self->actioneditor()->setFormWindow( fw );
- MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) );
+ MainWindow::self->objectHierarchy()->setFormWindow( fw, fw );
MainWindow::self->objectHierarchy()->formDefinitionView()->refresh();
MainWindow::self->objectHierarchy()->rebuild();
- fw->killAccels( TQT_TQOBJECT(fw) );
- fw->project()->setModified( TRUE );
+ fw->killAccels( fw );
+ fw->project()->setModified( true );
fw->setFocus();
if ( !pro->isDummy() ) {
- fw->setSavePixmapInProject( TRUE );
- fw->setSavePixmapInline( FALSE );
+ fw->setSavePixmapInProject( true );
+ fw->setSavePixmapInline( false );
}
}
@@ -155,7 +155,7 @@ void CustomFormItem::insert( Project *pro )
TQString filename = templateFileName();
if ( !filename.isEmpty() && TQFile::exists( filename ) ) {
Resource resource( MainWindow::self );
- FormFile *ff = new FormFile( filename, TRUE, pro );
+ FormFile *ff = new FormFile( filename, true, pro );
if ( !resource.load( ff ) ) {
TQMessageBox::information( MainWindow::self, i18n("Load Template"),
i18n("Could not load form description from template '%1'" ).arg( filename ) );
@@ -167,8 +167,8 @@ void CustomFormItem::insert( Project *pro )
MainWindow::self->formWindow()->setFileName( TQString() );
unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() );
if ( !pro->isDummy() ) {
- MainWindow::self->formWindow()->setSavePixmapInProject( TRUE );
- MainWindow::self->formWindow()->setSavePixmapInline( FALSE );
+ MainWindow::self->formWindow()->setSavePixmapInProject( true );
+ MainWindow::self->formWindow()->setSavePixmapInline( false );
}
}
}
@@ -177,13 +177,13 @@ void CustomFormItem::insert( Project *pro )
SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text )
- : NewItem( view, text ), visible( TRUE )
+ : NewItem( view, text ), visible( true )
{
}
void SourceFileItem::insert( Project *pro )
{
- SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro );
+ SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), true, pro );
MainWindow::self->editSource( f );
}
@@ -203,7 +203,7 @@ void SourceFileItem::setProject( Project *pro )
SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text )
- : NewItem( view, text ), visible( TRUE )
+ : NewItem( view, text ), visible( true )
{
}
@@ -217,13 +217,13 @@ void SourceTemplateItem::insert( Project *pro )
if ( src.type == SourceTemplateInterface::Source::Invalid )
return;
if ( src.type == SourceTemplateInterface::Source::FileName )
- f = new SourceFile( src.filename, FALSE, pro );
+ f = new SourceFile( src.filename, false, pro );
else
- f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro );
+ f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), true, pro );
if ( f->isAccepted()) {
f->setText( src.code );
MainWindow::self->editSource( f );
- f->setModified( TRUE );
+ f->setModified( true );
} else {
delete f;
}
@@ -253,7 +253,7 @@ void NewForm::insertTemplates( TQIconView *tView,
allItems.append( pi );
pi->setLanguage( *it );
pi->setPixmap( BarIcon( "designer_project.png" , KDevDesignerPartFactory::instance()) );
- pi->setDragEnabled( FALSE );
+ pi->setDragEnabled( false );
}
}
TQIconViewItem *cur = 0;
@@ -261,24 +261,24 @@ void NewForm::insertTemplates( TQIconView *tView,
allItems.append( fi );
fi->setFormType( FormItem::Dialog );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
- fi->setDragEnabled( FALSE );
+ fi->setDragEnabled( false );
cur = fi;
if ( !MainWindow::self->singleProjectMode() ) {
fi = new FormItem( tView,i18n( "Wizard" ) );
allItems.append( fi );
fi->setFormType( FormItem::Wizard );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
- fi->setDragEnabled( FALSE );
+ fi->setDragEnabled( false );
fi = new FormItem( tView, i18n( "Widget" ) );
allItems.append( fi );
fi->setFormType( FormItem::Widget );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
- fi->setDragEnabled( FALSE );
+ fi->setDragEnabled( false );
fi = new FormItem( tView, i18n( "Main Window" ) );
allItems.append( fi );
fi->setFormType( FormItem::MainWindow );
fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
- fi->setDragEnabled( FALSE );
+ fi->setDragEnabled( false );
TQString templPath = templatePath;
TQStringList templRoots;
@@ -309,7 +309,7 @@ void NewForm::insertTemplates( TQIconView *tView,
name = name.replace( '_', ' ' );
CustomFormItem *ci = new CustomFormItem( tView, name );
allItems.append( ci );
- ci->setDragEnabled( FALSE );
+ ci->setDragEnabled( false );
ci->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) );
ci->setTemplateFile( fi->absFilePath() );
}
@@ -329,7 +329,7 @@ void NewForm::insertTemplates( TQIconView *tView,
si->setExtension( eit.key() );
si->setLanguage( *it );
si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) );
- si->setDragEnabled( FALSE );
+ si->setDragEnabled( false );
}
iface->release();
}
@@ -346,7 +346,7 @@ void NewForm::insertTemplates( TQIconView *tView,
si->setTemplate( *sit );
si->setLanguage( siface->language( *sit ) );
si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) );
- si->setDragEnabled( FALSE );
+ si->setDragEnabled( false );
siface->release();
}
}
@@ -366,9 +366,9 @@ NewForm::NewForm( TQIconView *templateView, const TQString &templatePath )
NewForm::NewForm( TQWidget *parent, const TQStringList& projects,
const TQString& currentProject, const TQString &templatePath )
- : NewFormBase( parent, 0, TRUE )
+ : NewFormBase( parent, 0, true )
{
- connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
projectCombo->insertStringList( projects );
projectCombo->setCurrentText( currentProject );
@@ -399,7 +399,7 @@ void NewForm::projectChanged( const TQString &project )
for ( i = allItems.first(); i; i = allItems.next() )
( (NewItem*)i )->setProject( pro );
templateView->setCurrentItem( templateView->firstItem() );
- templateView->arrangeItemsInGrid( TRUE );
+ templateView->arrangeItemsInGrid( true );
}
void NewForm::itemChanged( TQIconViewItem *item )
diff --git a/kdevdesigner/designer/newformimpl.h b/kdevdesigner/designer/newformimpl.h
index 863f5b9d..6f32cd8a 100644
--- a/kdevdesigner/designer/newformimpl.h
+++ b/kdevdesigner/designer/newformimpl.h
@@ -142,7 +142,7 @@ private:
class NewForm : public NewFormBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/orderindicator.cpp b/kdevdesigner/designer/orderindicator.cpp
index 2904cfbf..445e835f 100644
--- a/kdevdesigner/designer/orderindicator.cpp
+++ b/kdevdesigner/designer/orderindicator.cpp
@@ -39,7 +39,7 @@ OrderIndicator::OrderIndicator( int i, TQWidget* w, FormWindow *fw )
order = -1;
widget = w;
setBackgroundMode( NoBackground );
- setAutoMask( TRUE );
+ setAutoMask( true );
setOrder( i, w );
}
@@ -67,7 +67,7 @@ void OrderIndicator::setOrder( int i, TQWidget* wid )
int w = fontMetrics().width( TQString::number( i ) ) + 10;
int h = fontMetrics().lineSpacing() * 3 / 2;
TQFont f( font() );
- f.setBold( TRUE );
+ f.setBold( true );
setFont( f );
resize( TQMAX( w, h ), h );
update(); // in case the size didn't change
diff --git a/kdevdesigner/designer/orderindicator.h b/kdevdesigner/designer/orderindicator.h
index 33e486d4..401554f0 100644
--- a/kdevdesigner/designer/orderindicator.h
+++ b/kdevdesigner/designer/orderindicator.h
@@ -33,7 +33,7 @@ class FormWindow;
class OrderIndicator : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp
index a23c14a7..60604d97 100644
--- a/kdevdesigner/designer/outputwindow.cpp
+++ b/kdevdesigner/designer/outputwindow.cpp
@@ -40,7 +40,7 @@
#include <tdelocale.h>
static TQTextEdit *debugoutput = 0;
-bool debugToStderr = FALSE;
+bool debugToStderr = false;
TQtMsgHandler OutputWindow::oldMsgHandler = 0;
@@ -57,24 +57,24 @@ OutputWindow::~OutputWindow()
debugoutput = debugView = 0;
errorView = 0;
if ( !debugToStderr )
- tqInstallMsgHandler( oldMsgHandler );
+ qInstallMsgHandler( oldMsgHandler );
delete iface;
}
void OutputWindow::shuttingDown()
{
if ( !debugToStderr )
- tqInstallMsgHandler( oldMsgHandler );
+ qInstallMsgHandler( oldMsgHandler );
}
void OutputWindow::setupError()
{
errorView = new TQListView( this, "OutputWindow::errorView" );
errorView->setSorting( -1 );
- connect( errorView, TQT_SIGNAL( currentChanged( TQListViewItem* ) ),
- this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
- connect( errorView, TQT_SIGNAL( clicked( TQListViewItem* ) ),
- this, TQT_SLOT( currentErrorChanged( TQListViewItem* ) ) );
+ connect( errorView, TQ_SIGNAL( currentChanged( TQListViewItem* ) ),
+ this, TQ_SLOT( currentErrorChanged( TQListViewItem* ) ) );
+ connect( errorView, TQ_SIGNAL( clicked( TQListViewItem* ) ),
+ this, TQ_SLOT( currentErrorChanged( TQListViewItem* ) ) );
if ( MetaDataBase::languages().count() > 1 )
addTab( errorView, i18n( "Warnings/Errors" ) );
@@ -89,7 +89,7 @@ void OutputWindow::setupError()
errorView->setColumnWidth( 1, errorView->fontMetrics().width( "ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOP" ) );
errorView->setColumnWidth( 2, errorView->fontMetrics().width( "9999999" ) );
errorView->setColumnAlignment( 2, TQt::AlignRight );
- errorView->setAllColumnsShowFocus( TRUE );
+ errorView->setAllColumnsShowFocus( true );
}
static void debugMessageOutput( TQtMsgType type, const char *msg )
@@ -115,11 +115,11 @@ static void debugMessageOutput( TQtMsgType type, const char *msg )
void OutputWindow::setupDebug()
{
debugoutput = debugView = new TQTextEdit( this, "OutputWindow::debugView" );
- //debugView->setReadOnly( TRUE );
+ //debugView->setReadOnly( true );
addTab( debugView, "Debug Output" );
if ( !debugToStderr )
- oldMsgHandler = tqInstallMsgHandler( debugMessageOutput );
+ oldMsgHandler = qInstallMsgHandler( debugMessageOutput );
}
void OutputWindow::setErrorMessages( const TQStringList &errors, const TQValueList<uint> &lines,
@@ -169,7 +169,7 @@ void OutputWindow::currentErrorChanged( TQListViewItem *i )
if ( !i )
return;
ErrorItem *ei = (ErrorItem*)i;
- ei->setRead( TRUE );
+ ei->setRead( true );
MainWindow::self->showSourceLine( ei->location(), ei->line() - 1, MainWindow::Error );
}
@@ -179,7 +179,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString
const TQString &locationString, TQObject *locationObject )
: TQListViewItem( parent, after )
{
- setMultiLinesEnabled( TRUE );
+ setMultiLinesEnabled( true );
TQString m( message );
type = m.startsWith( "Warning: " ) ? Warning : Error;
m = m.mid( m.find( ':' ) + 1 );
@@ -190,7 +190,7 @@ ErrorItem::ErrorItem( TQListView *parent, TQListViewItem *after, const TQString
object = locationObject;
read = !after;
if ( !after ) {
- parent->setSelected( this, TRUE );
+ parent->setSelected( this, true );
parent->setCurrentItem( this );
}
}
@@ -202,7 +202,7 @@ void ErrorItem::paintCell( TQPainter *p, const TQColorGroup & cg,
g.setColor( TQColorGroup::Text, type == Error ? TQt::red : TQt::darkYellow );
if ( !read ) {
TQFont f( p->font() );
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
TQListViewItem::paintCell( p, g, column, width, alignment );
diff --git a/kdevdesigner/designer/outputwindow.h b/kdevdesigner/designer/outputwindow.h
index 79b3e79a..d3190e0e 100644
--- a/kdevdesigner/designer/outputwindow.h
+++ b/kdevdesigner/designer/outputwindow.h
@@ -61,7 +61,7 @@ private:
class OutputWindow : public TQTabWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
index 903c1a4f..219abaec 100644
--- a/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
+++ b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
@@ -59,7 +59,7 @@ BoldListBoxText::BoldListBoxText( TQString text, TQListBox* lb )
void BoldListBoxText::paint( TQPainter* painter )
{
TQFont f = painter->font();
- f.setBold( TRUE );
+ f.setBold( true );
painter->setFont( f );
TQListBoxText::paint( painter );
@@ -69,7 +69,7 @@ PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
const char * name, bool modal, WFlags f )
: PaletteEditorAdvancedBase( parent, name, modal, f ), formWindow( fw ), selectedPalette(0)
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
buttonPixmap->setEditor( StyledButton::PixmapEditor );
@@ -79,8 +79,8 @@ PaletteEditorAdvanced::PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent,
buttonPixmap->setFormWindow( formWindow );
// force toggle event
- checkBuildEffect->setChecked(FALSE);
- checkBuildEffect->setChecked(TRUE);
+ checkBuildEffect->setChecked(false);
+ checkBuildEffect->setChecked(true);
}
PaletteEditorAdvanced::~PaletteEditorAdvanced()
@@ -126,8 +126,8 @@ void PaletteEditorAdvanced::paletteSelected(int p)
groupEffect->setDisabled(checkBuildDisabled->isChecked());
}
else {
- groupCentral->setEnabled(TRUE);
- groupEffect->setEnabled(TRUE);
+ groupCentral->setEnabled(true);
+ groupEffect->setEnabled(true);
}
updateStyledButtons();
}
@@ -622,7 +622,7 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
BackgroundMode mode, TQWidget* parent,
const char* name, FormWindow *fw )
{
- PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, TRUE );
+ PaletteEditorAdvanced* dlg = new PaletteEditorAdvanced( fw, parent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
@@ -632,11 +632,11 @@ TQPalette PaletteEditorAdvanced::getPalette( bool *ok, const TQPalette &init,
TQPalette result = init;
if ( resultCode == TQDialog::Accepted ) {
if ( ok )
- *ok = TRUE;
+ *ok = true;
result = dlg->pal();
} else {
if ( ok )
- *ok = FALSE;
+ *ok = false;
}
delete dlg;
return result;
diff --git a/kdevdesigner/designer/paletteeditoradvancedimpl.h b/kdevdesigner/designer/paletteeditoradvancedimpl.h
index 1fb59912..4a86abb6 100644
--- a/kdevdesigner/designer/paletteeditoradvancedimpl.h
+++ b/kdevdesigner/designer/paletteeditoradvancedimpl.h
@@ -33,11 +33,11 @@ class FormWindow;
class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
PaletteEditorAdvanced( FormWindow *fw, TQWidget * parent=0, const char * name=0,
- bool modal=FALSE, WFlags f=0 );
+ bool modal=false, WFlags f=0 );
~PaletteEditorAdvanced();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
diff --git a/kdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp
index ae0cf7fd..bacfb70a 100644
--- a/kdevdesigner/designer/paletteeditorimpl.cpp
+++ b/kdevdesigner/designer/paletteeditorimpl.cpp
@@ -39,7 +39,7 @@
PaletteEditor::PaletteEditor( FormWindow *fw, TQWidget * parent, const char * name, bool modal, WFlags f )
: PaletteEditorBase( parent, name, modal, f ), formWindow( fw )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
editPalette = TQApplication::palette();
setPreviewPalette( editPalette );
@@ -283,7 +283,7 @@ TQPalette PaletteEditor::pal() const
TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, BackgroundMode mode,
TQWidget* parent, const char* name, FormWindow *fw )
{
- PaletteEditor* dlg = new PaletteEditor( fw, parent, name, TRUE );
+ PaletteEditor* dlg = new PaletteEditor( fw, parent, name, true );
dlg->setupBackgroundMode( mode );
if ( init != TQPalette() )
@@ -293,11 +293,11 @@ TQPalette PaletteEditor::getPalette( bool *ok, const TQPalette &init, Background
TQPalette result = init;
if ( resultCode == TQDialog::Accepted ) {
if ( ok )
- *ok = TRUE;
+ *ok = true;
result = dlg->pal();
} else {
if ( ok )
- *ok = FALSE;
+ *ok = false;
}
delete dlg;
return result;
diff --git a/kdevdesigner/designer/paletteeditorimpl.h b/kdevdesigner/designer/paletteeditorimpl.h
index c1943a61..83a598c3 100644
--- a/kdevdesigner/designer/paletteeditorimpl.h
+++ b/kdevdesigner/designer/paletteeditorimpl.h
@@ -33,11 +33,11 @@ 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 * parent=0, const char * name=0, bool modal=false, WFlags f=0 );
~PaletteEditor();
static TQPalette getPalette( bool *ok, const TQPalette &pal, BackgroundMode mode = PaletteBackground,
diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp
index 92d68ac1..79cb0cab 100644
--- a/kdevdesigner/designer/pixmapchooser.cpp
+++ b/kdevdesigner/designer/pixmapchooser.cpp
@@ -66,7 +66,7 @@ void PixmapView::setPixmap( const TQPixmap &pix )
{
pixmap = pix;
resizeContents( pixmap.size().width(), pixmap.size().height() );
- viewport()->repaint( FALSE );
+ viewport()->repaint( false );
}
void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch )
@@ -114,9 +114,9 @@ TQStringList qChoosePixmaps( TQWidget *parent )
TQString all;
buildImageFormatList( filter, all );
- TQFileDialog fd( TQString(), filter, parent, 0, TRUE );
+ TQFileDialog fd( TQString(), filter, parent, 0, true );
fd.setMode( TQFileDialog::ExistingFiles );
- fd.setContentsPreviewEnabled( TRUE );
+ fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
@@ -148,8 +148,8 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQString all;
buildImageFormatList( filter, all );
- TQFileDialog fd( TQString(), filter, parent, 0, TRUE );
- fd.setContentsPreviewEnabled( TRUE );
+ TQFileDialog fd( TQString(), filter, parent, 0, true );
+ fd.setContentsPreviewEnabled( true );
PixmapView *pw = new PixmapView( &fd );
fd.setContentsPreview( pw, pw );
fd.setViewMode( TQFileDialog::List );
@@ -174,31 +174,31 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
TQPixmap pix( dlg.selectedURL().path() );
if ( fn )
*fn = dlg.selectedURL().path();
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() );
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dlg.selectedURL().path() );
return pix;
}
} else if ( fw && fw->savePixmapInProject() ) {
- PixmapCollectionEditor dia( parent, 0, TRUE );
+ PixmapCollectionEditor dia( parent, 0, true );
dia.setProject( fw->project() );
- dia.setChooserMode( TRUE );
- dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) );
+ dia.setChooserMode( true );
+ dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() );
+ MetaDataBase::setPixmapKey( fw, pix.serialNumber(), dia.viewPixmaps->currentItem()->text() );
return pix;
}
} else {
- PixmapFunction dia( parent, 0, TRUE );
- TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ PixmapFunction dia( parent, 0, true );
+ TQObject::connect( dia.helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" );
- dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) );
+ dia.editArguments->setText( MetaDataBase::pixmapArgument( fw, old.serialNumber() ) );
dia.editArguments->setFocus();
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix;
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() );
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() );
+ MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), dia.editArguments->text() );
return pix;
}
}
@@ -211,7 +211,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
}
ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name )
- : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) )
+ : TQFileIconProvider( parent, name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) )
{
fmts = TQImage::inputFormats();
}
diff --git a/kdevdesigner/designer/pixmapchooser.h b/kdevdesigner/designer/pixmapchooser.h
index c6523488..0f1ac04a 100644
--- a/kdevdesigner/designer/pixmapchooser.h
+++ b/kdevdesigner/designer/pixmapchooser.h
@@ -37,7 +37,7 @@ class FormWindow;
class PixmapView : public TQScrollView,
public TQFilePreview
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -53,7 +53,7 @@ private:
class ImageIconProvider : public TQFileIconProvider
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/pixmapcollection.cpp b/kdevdesigner/designer/pixmapcollection.cpp
index 880423a3..4b14bf8d 100644
--- a/kdevdesigner/designer/pixmapcollection.cpp
+++ b/kdevdesigner/designer/pixmapcollection.cpp
@@ -54,14 +54,14 @@ bool PixmapCollection::addPixmap( const Pixmap &pix, bool force )
if ( !force ) {
for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( (*it).name == pixmap.name )
- return FALSE;
+ return false;
}
}
pixList.append( pixmap );
mimeSourceFactory->setPixmap( pixmap.name, pixmap.pix );
- project->setModified( TRUE );
- return TRUE;
+ project->setModified( true );
+ return true;
}
void PixmapCollection::removePixmap( const TQString &name )
@@ -72,7 +72,7 @@ void PixmapCollection::removePixmap( const TQString &name )
break;
}
}
- project->setModified( TRUE );
+ project->setModified( true );
}
TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
@@ -83,18 +83,18 @@ TQValueList<PixmapCollection::Pixmap> PixmapCollection::pixmaps() const
TQString PixmapCollection::unifyName( const TQString &n )
{
TQString name = n;
- bool restart = FALSE;
+ bool restart = false;
int added = 1;
for ( TQValueList<Pixmap>::Iterator it = pixList.begin(); it != pixList.end(); ++it ) {
if ( restart )
it = pixList.begin();
- restart = FALSE;
+ restart = false;
if ( name == (*it).name ) {
name = n;
name += "_" + TQString::number( added );
++added;
- restart = TRUE;
+ restart = true;
}
}
@@ -138,13 +138,13 @@ void PixmapCollection::savePixmap( Pixmap &pix )
TQString PixmapCollection::imageDir() const
{
- return TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/images";
+ return TQFileInfo( project->fileName() ).dirPath( true ) + "/images";
}
void PixmapCollection::mkdir()
{
TQString f = project->fileName();
- TQDir d( TQFileInfo( f ).dirPath( TRUE ) );
+ TQDir d( TQFileInfo( f ).dirPath( true ) );
d.mkdir( "images" );
}
@@ -156,7 +156,7 @@ void PixmapCollection::load( const TQString& filename )
if ( filename[0] == '/' )
absfile = filename;
else
- absfile = TQFileInfo( project->fileName() ).dirPath( TRUE ) + "/" + filename;
+ absfile = TQFileInfo( project->fileName() ).dirPath( true ) + "/" + filename;
TQPixmap pm( absfile );
if ( pm.isNull() )
@@ -166,7 +166,7 @@ void PixmapCollection::load( const TQString& filename )
pix.name = TQFileInfo( absfile ).fileName();
pix.absname = absfile;
pix.pix = pm;
- addPixmap( pix, TRUE );
+ addPixmap( pix, true );
}
DesignerPixmapCollection *PixmapCollection::iFace()
diff --git a/kdevdesigner/designer/pixmapcollection.h b/kdevdesigner/designer/pixmapcollection.h
index 10d630fc..87e68bad 100644
--- a/kdevdesigner/designer/pixmapcollection.h
+++ b/kdevdesigner/designer/pixmapcollection.h
@@ -49,7 +49,7 @@ public:
PixmapCollection( Project *pro );
~PixmapCollection();
- bool addPixmap( const Pixmap &pix, bool force = TRUE );
+ bool addPixmap( const Pixmap &pix, bool force = true );
void removePixmap( const TQString &name );
TQPixmap pixmap( const TQString &name );
diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui b/kdevdesigner/designer/pixmapcollectioneditor.ui
index 30f74183..e939397f 100644
--- a/kdevdesigner/designer/pixmapcollectioneditor.ui
+++ b/kdevdesigner/designer/pixmapcollectioneditor.ui
@@ -202,7 +202,7 @@
<variable>Project *project;</variable>
<variable>bool chooser;</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>destroy()</slot>
<slot>addPixmap()</slot>
@@ -213,6 +213,6 @@
<slot>setCurrentItem(const TQString &amp; name)</slot>
<slot>setProject(Project * pro)</slot>
<slot returnType="TQPixmap">scaledPixmap(const TQPixmap &amp; p)</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h
index 82bd7929..d644ad38 100644
--- a/kdevdesigner/designer/pixmapcollectioneditor.ui.h
+++ b/kdevdesigner/designer/pixmapcollectioneditor.ui.h
@@ -28,7 +28,7 @@
void PixmapCollectionEditor::init()
{
project = 0;
- setChooserMode( FALSE );
+ setChooserMode( false );
}
void PixmapCollectionEditor::destroy()
@@ -55,7 +55,7 @@ void PixmapCollectionEditor::addPixmap()
TQFileInfo fi ( *it );
pixmap.name = fi.fileName();
pixmap.absname = fi.filePath();
- if ( !project->pixmapCollection()->addPixmap( pixmap, FALSE ) )
+ if ( !project->pixmapCollection()->addPixmap( pixmap, false ) )
continue;
lastName = pixmap.name;
}
@@ -88,9 +88,9 @@ void PixmapCollectionEditor::updateView()
for ( TQValueList<PixmapCollection::Pixmap>::Iterator it = pixmaps.begin(); it != pixmaps.end(); ++it ) {
// #### might need to scale down the pixmap
TQIconViewItem *item = new TQIconViewItem( viewPixmaps, (*it).name, scaledPixmap( (*it).pix ) );
- //item->setRenameEnabled( TRUE ); // this will be a bit harder to implement
- item->setDragEnabled( FALSE );
- item->setDropEnabled( FALSE );
+ //item->setRenameEnabled( true ); // this will be a bit harder to implement
+ item->setDragEnabled( false );
+ item->setDropEnabled( false );
}
viewPixmaps->setCurrentItem( viewPixmaps->firstItem() );
currentChanged( viewPixmaps->firstItem() );
@@ -108,16 +108,16 @@ void PixmapCollectionEditor::setChooserMode( bool c )
buttonClose->hide();
buttonOk->show();
buttonCancel->show();
- buttonOk->setEnabled( FALSE );
- buttonOk->setDefault( TRUE );
- connect( viewPixmaps, TQT_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) );
- connect( viewPixmaps, TQT_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQT_SIGNAL( clicked() ) );
+ buttonOk->setEnabled( false );
+ buttonOk->setDefault( true );
+ connect( viewPixmaps, TQ_SIGNAL( doubleClicked( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) );
+ connect( viewPixmaps, TQ_SIGNAL( returnPressed( TQIconViewItem * ) ), buttonOk, TQ_SIGNAL( clicked() ) );
setCaption( i18n( "Choose Image" ) );
} else {
buttonClose->show();
buttonOk->hide();
buttonCancel->hide();
- buttonClose->setDefault( TRUE );
+ buttonClose->setDefault( true );
}
updateView();
}
diff --git a/kdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp
index da6289dd..629d40fe 100644
--- a/kdevdesigner/designer/popupmenueditor.cpp
+++ b/kdevdesigner/designer/popupmenueditor.cpp
@@ -84,13 +84,13 @@ bool PopupMenuEditorItemPtrDrag::decode( TQDropEvent * e, PopupMenuEditorItem **
TQDataStream stream( data, IO_ReadOnly );
if ( !data.size() )
- return FALSE;
+ return false;
TQ_LONG p = 0;
stream >> p;
*i = ( PopupMenuEditorItem *) p;
- return TRUE;
+ return true;
}
// PopupMenuEditorItem Implementation -----------------------------------
@@ -100,12 +100,12 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditor * menu, TQObject * par
a( 0 ),
s( 0 ),
m( menu ),
- separator( FALSE ),
- removable( FALSE )
+ separator( false ),
+ removable( false )
{
init();
a = new TQAction( this );
- TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) );
+ TQObject::connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( selfDestruct() ) );
}
@@ -115,12 +115,12 @@ PopupMenuEditorItem::PopupMenuEditorItem( TQAction * action, PopupMenuEditor * m
a( action ),
s( 0 ),
m( menu ),
- separator( FALSE ),
- removable( TRUE )
+ separator( false ),
+ removable( true )
{
init();
- if ( /*a->name() == "qt_separator_action" ||*/ ::tqqt_cast<QSeparatorAction*>(a) )
- separator = TRUE;
+ if ( /*a->name() == "qt_separator_action" ||*/ ::tqt_cast<QSeparatorAction*>(a) )
+ separator = true;
if ( a && !a->childrenListObject().isEmpty() )
a->installEventFilter( this );
}
@@ -135,7 +135,7 @@ PopupMenuEditorItem::PopupMenuEditorItem( PopupMenuEditorItem * item, PopupMenuE
removable( item->removable )
{
init();
- if ( ::tqqt_cast<TQActionGroup*>(a) )
+ if ( ::tqt_cast<TQActionGroup*>(a) )
a->installEventFilter( this );
}
@@ -147,13 +147,13 @@ PopupMenuEditorItem::~PopupMenuEditorItem()
void PopupMenuEditorItem::init()
{
if ( a ) {
- TQObject::connect( a, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( selfDestruct() ) );
+ TQObject::connect( a, TQ_SIGNAL( destroyed() ), this, TQ_SLOT( selfDestruct() ) );
if ( m && !isSeparator() ) {
s = new PopupMenuEditor( m->formWindow(), m );
TQString n = "PopupMenuEditor";
- m->formWindow()->unify( TQT_TQOBJECT(s), n, TRUE );
+ m->formWindow()->unify( s, n, true );
s->setName( n );
- MetaDataBase::addEntry( TQT_TQOBJECT(s) );
+ MetaDataBase::addEntry( s );
}
}
}
@@ -175,12 +175,12 @@ void PopupMenuEditorItem::setVisible( bool enable )
bool PopupMenuEditorItem::isVisible() const
{
- TQActionGroup *g = ::tqqt_cast<TQActionGroup*>(a);
+ TQActionGroup *g = ::tqt_cast<TQActionGroup*>(a);
if ( g )
return ( g->isVisible() && g->usesDropDown() );
else if ( a )
return a->isVisible();
- return FALSE;
+ return false;
}
void PopupMenuEditorItem::showMenu( int x, int y )
@@ -212,7 +212,7 @@ int PopupMenuEditorItem::count() const
{
if ( s ) {
return s->count();
- } else if ( ::tqqt_cast<TQActionGroup*>(a) ) {
+ } else if ( ::tqt_cast<TQActionGroup*>(a) ) {
const TQObjectList l = a->childrenListObject();
if ( !l.isEmpty() )
return l.count();
@@ -222,21 +222,21 @@ int PopupMenuEditorItem::count() const
bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
{
- if ( ! ::tqqt_cast<TQActionGroup*>( o ) )
- return FALSE;
+ if ( ! ::tqt_cast<TQActionGroup*>( o ) )
+ return false;
if ( event->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = ( TQChildEvent * ) event;
- TQObject * c = TQT_TQOBJECT(ce->child());
- TQAction * action = ::tqqt_cast<TQAction*>( c );
+ TQObject * c = ce->child();
+ TQAction * action = ::tqt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates
- return FALSE;
- TQActionGroup * actionGroup = ::tqqt_cast<TQActionGroup*>( c );
+ return false;
+ TQActionGroup * actionGroup = ::tqt_cast<TQActionGroup*>( c );
if ( actionGroup )
s->insert( actionGroup );
else if ( action )
s->insert( action );
}
- return FALSE;
+ return false;
}
void PopupMenuEditorItem::selfDestruct()
@@ -293,7 +293,7 @@ PopupMenuEditor::PopupMenuEditor( FormWindow * fw, PopupMenuEditor * menu,
PopupMenuEditor::~PopupMenuEditor()
{
- itemList.setAutoDelete( TRUE );
+ itemList.setAutoDelete( true );
}
void PopupMenuEditor::init()
@@ -303,8 +303,8 @@ void PopupMenuEditor::init()
addItem.action()->setMenuText( i18n("new item") );
addSeparator.action()->setMenuText( i18n("new separator") );
- setAcceptDrops( TRUE );
- setFocusPolicy( TQ_StrongFocus );
+ setAcceptDrops( true );
+ setFocusPolicy( TQWidget::StrongFocus );
lineEdit = new TQLineEdit( this );
lineEdit->hide();
@@ -357,11 +357,11 @@ void PopupMenuEditor::insert( TQActionGroup * actionGroup, int index )
PopupMenuEditorItem *i = new PopupMenuEditorItem( (TQAction *)actionGroup, this, 0,
TQString( actionGroup->name() ) + "Menu" );
TQActionGroup *g = 0;
- TQObjectList *l = actionGroup->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE );
+ TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
insert( i, index );
for ( ; it.current(); ++it ) {
- g = ::tqqt_cast<TQActionGroup*>(it.current());
+ g = ::tqt_cast<TQActionGroup*>(it.current());
if ( g ) {
if ( dropdown )
i->s->insert( g );
@@ -566,7 +566,7 @@ void PopupMenuEditor::setAccelerator( int key, TQt::ButtonState state, int index
if ( n < 4 )
keys[n] = key | shift | ctrl | alt | meta;
a->setAccel( TQKeySequence( keys[0], keys[1], keys[2], keys[3] ) );
- MetaDataBase::setPropertyChanged( a, "accel", TRUE );
+ MetaDataBase::setPropertyChanged( a, "accel", true );
resizeToContents();
}
@@ -625,7 +625,7 @@ PopupMenuEditorItem * PopupMenuEditor::createItem( TQAction * a )
a = ae->newActionEx();
PopupMenuEditorItem * i = new PopupMenuEditorItem( a, this );
TQString n = TQString( a->name() ) + "Item";
- formWindow()->unify( i, n, FALSE );
+ formWindow()->unify( i, n, false );
i->setName( n );
AddActionToPopupCommand * cmd =
new AddActionToPopupCommand( i18n( "Add Item" ), formWnd, this, i );
@@ -714,7 +714,7 @@ void PopupMenuEditor::setFocusAt( const TQPoint & pos )
bool PopupMenuEditor::eventFilter( TQObject * o, TQEvent * e )
{
- if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(lineEdit) && e->type() == TQEvent::FocusOut ) {
+ if ( o == lineEdit && e->type() == TQEvent::FocusOut ) {
leaveEditMode( 0 );
update();
}
@@ -730,7 +730,7 @@ void PopupMenuEditor::paintEvent( TQPaintEvent * )
rect().width() - borderSize * 2, rect().height() - borderSize * 2 );
reg -= mid;
p.setClipRegion( reg );
- style().tqdrawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() );
+ style().drawPrimitive( TQStyle::PE_PanelPopup, &p, rect(), colorGroup() );
p.restore();
drawItems( &p );
}
@@ -748,7 +748,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
setFocusAt( mousePressPos );
if ( currentItem() == &addSeparator ) {
PopupMenuEditorItem * i = createItem( new QSeparatorAction( 0 ) );
- i->setSeparator( TRUE );
+ i->setSeparator( true );
return;
}
if ( currentField == 0 ) {
@@ -761,7 +761,7 @@ void PopupMenuEditor::mouseDoubleClickEvent( TQMouseEvent * )
void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
{
- if ( e->state() & Qt::LeftButton ) {
+ if ( e->state() & TQt::LeftButton ) {
if ( ( e->pos() - mousePressPos ).manhattanLength() > 3 ) {
draggedItem = itemAt( mousePressPos.y() );
if ( draggedItem == &addItem ) {
@@ -772,7 +772,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
// FIXME: start rename after drop
} else if ( draggedItem == &addSeparator ) {
draggedItem = createItem( new QSeparatorAction( 0 ) );
- draggedItem->setSeparator( TRUE );
+ draggedItem->setSeparator( true );
}
PopupMenuEditorItemPtrDrag * d =
@@ -780,7 +780,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
hideSubMenu();
- draggedItem->setVisible( FALSE );
+ draggedItem->setVisible( false );
resizeToContents();
// If the item is dropped in the same list,
@@ -792,7 +792,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
d->dragCopy(); // dragevents and stuff happens
if ( draggedItem ) { // item was not dropped
- draggedItem->setVisible( TRUE );
+ draggedItem->setVisible( true );
draggedItem = 0;
if ( hasFocus() ) {
hideSubMenu();
@@ -800,7 +800,7 @@ void PopupMenuEditor::mouseMoveEvent( TQMouseEvent * e )
showSubMenu();
}
} else { // item was dropped
- itemList.takeNode( node )->setVisible( TRUE );
+ itemList.takeNode( node )->setVisible( true );
if ( currentIndex > 0 && currentIndex > idx )
--currentIndex;
// the drop might happen in another menu, so we'll resize
@@ -847,7 +847,7 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
// Hide the sub menu of the current item, but do it later
if ( currentIndex < (int)itemList.count() ) {
PopupMenuEditor *s = itemList.at( currentIndex )->s;
- TQTimer::singleShot( 0, s, TQT_SLOT( hide() ) );
+ TQTimer::singleShot( 0, s, TQ_SLOT( hide() ) );
}
draggedItem = 0;
@@ -857,16 +857,16 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
PopupMenuEditorItemPtrDrag::decode( e, &i );
} else {
if ( e->provides( "application/x-designer-actiongroup" ) ) {
- TQActionGroup * g = ::tqqt_cast<QDesignerActionGroup*>(ActionDrag::action());
+ TQActionGroup * g = ::tqt_cast<QDesignerActionGroup*>(ActionDrag::action());
if ( g->usesDropDown() ) {
i = new PopupMenuEditorItem( g, this );
TQString n = TQString( g->name() ) + "Item";
- formWindow()->unify( i, n, FALSE );
+ formWindow()->unify( i, n, false );
i->setName( n );
- TQObjectList *l = g->queryList( TQACTION_OBJECT_NAME_STRING, 0, FALSE, FALSE );
+ TQObjectList *l = g->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
for ( ; it.current(); ++it ) {
- g = ::tqqt_cast<TQActionGroup*>(it.current());
+ g = ::tqt_cast<TQActionGroup*>(it.current());
if ( g )
i->s->insert( g );
else
@@ -877,18 +877,18 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
dropInPlace( g, e->pos().y() );
}
} else if ( e->provides( "application/x-designer-actions" ) ) {
- TQAction *a = ::tqqt_cast<QDesignerAction*>(ActionDrag::action());
+ TQAction *a = ::tqt_cast<QDesignerAction*>(ActionDrag::action());
i = new PopupMenuEditorItem( a, this );
}
}
if ( i ) {
dropInPlace( i, e->pos().y() );
- TQTimer::singleShot( 0, this, TQT_SLOT( resizeToContents() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( resizeToContents() ) );
}
- TQTimer::singleShot( 0, this, TQT_SLOT( showSubMenu() ) );
- TQTimer::singleShot( 0, this, TQT_SLOT( setFocus() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( showSubMenu() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( setFocus() ) );
dropLine->hide();
e->accept();
}
@@ -1012,12 +1012,12 @@ void PopupMenuEditor::focusInEvent( TQFocusEvent * )
void PopupMenuEditor::focusOutEvent( TQFocusEvent * )
{
TQWidget * fw = tqApp->focusWidget();
- if ( !fw || ( !::tqqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) {
+ if ( !fw || ( !::tqt_cast<PopupMenuEditor*>(fw) && fw != lineEdit ) ) {
hideSubMenu();
- if ( fw && ::tqqt_cast<MenuBarEditor*>(fw) )
+ if ( fw && ::tqt_cast<MenuBarEditor*>(fw) )
return;
TQWidget * w = this;
- while ( w && w != fw && ::tqqt_cast<PopupMenuEditor*>(w) ) { // hide all popups
+ while ( w && w != fw && ::tqt_cast<PopupMenuEditor*>(w) ) { // hide all popups
w->hide();
w = ((PopupMenuEditor *)w)->parentEditor();
}
@@ -1034,7 +1034,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i,
p->fillRect( r, colorGroup().brush( TQColorGroup::Background ) );
if ( i->isSeparator() ) {
- style().tqdrawPrimitive( TQStyle::PE_Separator, p,
+ style().drawPrimitive( TQStyle::PE_Separator, p,
TQRect( r.x(), r.y() + 2, r.width(), 1 ),
colorGroup(), TQStyle::Style_Sunken | f );
return;
@@ -1042,7 +1042,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i,
const TQAction * a = i->action();
if ( a->isToggleAction() && a->isOn() ) {
- style().tqdrawPrimitive( TQStyle::PE_CheckMark, p,
+ style().drawPrimitive( TQStyle::PE_CheckMark, p,
TQRect( x , y, iconWidth, h ),
colorGroup(), f );
} else {
@@ -1064,7 +1064,7 @@ void PopupMenuEditor::drawItem( TQPainter * p, PopupMenuEditorItem * i,
TQPainter::AlignLeft | TQPainter::AlignVCenter,
a->accel() );
if ( i->count() ) // Item has submenu
- style().tqdrawPrimitive( TQStyle::PE_ArrowRight, p,
+ style().drawPrimitive( TQStyle::PE_ArrowRight, p,
TQRect( r.width() - arrowWidth, r.y(), arrowWidth, r.height() ),
colorGroup(), f );
}
@@ -1243,8 +1243,8 @@ void PopupMenuEditor::dropInPlace( TQActionGroup * g, int y )
if (l.isEmpty())
return;
for ( int i = 0; i < (int)l.count(); ++i ) {
- TQAction *a = ::tqqt_cast<TQAction*>(l.at(i));
- TQActionGroup *g = ::tqqt_cast<TQActionGroup*>(l.at(i));
+ TQAction *a = ::tqt_cast<TQAction*>(l.at(i));
+ TQActionGroup *g = ::tqt_cast<TQActionGroup*>(l.at(i));
if ( g )
dropInPlace( g, y );
else if ( a )
@@ -1416,10 +1416,10 @@ void PopupMenuEditor::leaveEditMode( TQKeyEvent * e )
a->setMenuText( menuText );
i = createItem( a );
TQString n = constructName( i );
- formWindow()->unify( a, n, TRUE );
+ formWindow()->unify( a, n, true );
a->setName( n );
MetaDataBase::addEntry( a );
- MetaDataBase::setPropertyChanged( a, "menuText", TRUE );
+ MetaDataBase::setPropertyChanged( a, "menuText", true );
ActionEditor *ae = (ActionEditor*)formWindow()->mainWindow()->child( 0, "ActionEditor" );
if ( ae )
ae->updateActionName( a );
@@ -1449,13 +1449,13 @@ TQString PopupMenuEditor::constructName( PopupMenuEditorItem *item )
TQString s;
TQString name = item->action()->menuText();
TQWidget *e = parentEditor();
- PopupMenuEditor *p = ::tqqt_cast<PopupMenuEditor*>(e);
+ PopupMenuEditor *p = ::tqt_cast<PopupMenuEditor*>(e);
if ( p ) {
int idx = p->find( item->m );
PopupMenuEditorItem * i = ( idx > -1 ? p->at( idx ) : 0 );
s = ( i ? TQString( i->action()->name() ).remove( "Action" ) : TQString( "" ) );
} else {
- MenuBarEditor *b = ::tqqt_cast<MenuBarEditor*>(e);
+ MenuBarEditor *b = ::tqt_cast<MenuBarEditor*>(e);
if ( b ) {
int idx = b->findItem( item->m );
MenuBarEditorItem * i = ( idx > -1 ? b->item( idx ) : 0 );
diff --git a/kdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h
index 714ecf42..cfb42749 100644
--- a/kdevdesigner/designer/popupmenueditor.h
+++ b/kdevdesigner/designer/popupmenueditor.h
@@ -36,7 +36,7 @@ class TQMenuItem;
class PopupMenuEditorItem : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
friend class PopupMenuEditor;
@@ -100,7 +100,7 @@ class TQLineEdit;
class PopupMenuEditor : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
friend class PopupMenuEditorItem;
diff --git a/kdevdesigner/designer/preferences.ui b/kdevdesigner/designer/preferences.ui
index c00cf82a..c5ee2847 100644
--- a/kdevdesigner/designer/preferences.ui
+++ b/kdevdesigner/designer/preferences.ui
@@ -636,9 +636,9 @@
<tabstop>checkBoxTextLabels</tabstop>
<tabstop>helpButton</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/previewframe.h b/kdevdesigner/designer/previewframe.h
index 1883a062..9c479b06 100644
--- a/kdevdesigner/designer/previewframe.h
+++ b/kdevdesigner/designer/previewframe.h
@@ -34,7 +34,7 @@
class PreviewWorkspace : public TQWorkspace
{
- Q_OBJECT
+ TQ_OBJECT
public:
PreviewWorkspace( TQWidget* parent = 0, const char* name = 0 )
@@ -47,7 +47,7 @@ protected:
class PreviewFrame : public TQVBox
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp
index d574f9ae..d703959f 100644
--- a/kdevdesigner/designer/previewwidgetimpl.cpp
+++ b/kdevdesigner/designer/previewwidgetimpl.cpp
@@ -31,13 +31,13 @@ PreviewWidget::PreviewWidget( TQWidget *parent, const char *name )
: PreviewWidgetBase( parent, name )
{
// install event filter on child widgets
- TQObjectList *l = queryList(TQWIDGET_OBJECT_NAME_STRING);
+ TQObjectList *l = queryList("TQWidget");
TQObjectListIt it(*l);
TQObject * obj;
while ((obj = it.current()) != 0) {
++it;
obj->installEventFilter(this);
- ((TQWidget*)obj)->setFocusPolicy(TQ_NoFocus);
+ ((TQWidget*)obj)->setFocusPolicy(TQWidget::NoFocus);
}
}
@@ -57,9 +57,9 @@ bool PreviewWidget::eventFilter(TQObject *, TQEvent *e)
case TQEvent::KeyRelease:
case TQEvent::Enter:
case TQEvent::Leave:
- return TRUE; // ignore;
+ return true; // ignore;
default:
break;
}
- return FALSE;
+ return false;
}
diff --git a/kdevdesigner/designer/previewwidgetimpl.h b/kdevdesigner/designer/previewwidgetimpl.h
index d8887bee..9a4c092c 100644
--- a/kdevdesigner/designer/previewwidgetimpl.h
+++ b/kdevdesigner/designer/previewwidgetimpl.h
@@ -31,7 +31,7 @@
class PreviewWidget : public PreviewWidgetBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp
index 0ab26894..974259bf 100644
--- a/kdevdesigner/designer/project.cpp
+++ b/kdevdesigner/designer/project.cpp
@@ -71,9 +71,9 @@ bool DatabaseConnection::refreshCatalog()
{
#ifndef TQT_NO_SQL
if ( loaded )
- return TRUE;
+ return true;
if ( !open() )
- return FALSE;
+ return false;
tbls = conn->tables( TQSql::TableType( TQSql::Tables | TQSql::Views ) );
flds.clear();
for ( TQStringList::Iterator it = tbls.begin(); it != tbls.end(); ++it ) {
@@ -83,11 +83,11 @@ bool DatabaseConnection::refreshCatalog()
lst << fil.field( j )->name();
flds.insert( *it, lst );
}
- loaded = TRUE;
+ loaded = true;
conn->close();
return loaded;
#else
- return FALSE;
+ return false;
#endif
}
@@ -124,16 +124,16 @@ bool DatabaseConnection::open( bool suppressDialog )
conn->setHostName( hname );
conn->setPort( prt );
bool success = conn->open();
- for( ; suppressDialog == FALSE ; ) {
- bool done = FALSE;
+ for( ; !suppressDialog ; ) {
+ bool done = false;
if ( !success ) {
- DatabaseConnectionEditor dia( this, 0 , 0 , TRUE );
+ DatabaseConnectionEditor dia( this, 0 , 0 , true );
switch( dia.exec() ) {
case TQDialog::Accepted:
- done = FALSE;
+ done = false;
break;
case TQDialog::Rejected:
- done = TRUE;
+ done = true;
break;
}
}
@@ -156,7 +156,7 @@ bool DatabaseConnection::open( bool suppressDialog )
case 0: // OK or Enter
continue;
case 1: // Cancel or Escape
- done = TRUE;
+ done = true;
break;
}
} else
@@ -170,7 +170,7 @@ bool DatabaseConnection::open( bool suppressDialog )
}
return success;
#else
- return FALSE;
+ return false;
#endif
}
@@ -206,7 +206,7 @@ Project::Project( const TQString &fn, const TQString &pName,
const TQString &l )
: proName( pName ), projectSettingsPluginManager( pm ), isDummyProject( isDummy )
{
- modified = TRUE;
+ modified = true;
pixCollection = new PixmapCollection( this );
iface = 0;
lang = l;
@@ -216,10 +216,10 @@ Project::Project( const TQString &fn, const TQString &pName,
setFileName( fn );
if ( !pName.isEmpty() )
proName = pName;
- sourcefiles.setAutoDelete( TRUE );
- modified = FALSE;
- objs.setAutoDelete( FALSE );
- fakeFormFiles.setAutoDelete( FALSE );
+ sourcefiles.setAutoDelete( true );
+ modified = false;
+ objs.setAutoDelete( false );
+ fakeFormFiles.setAutoDelete( false );
}
Project::~Project()
@@ -315,13 +315,13 @@ TQString Project::projectName() const
static TQString parse_part( const TQString &part )
{
TQString res;
- bool inName = FALSE;
+ bool inName = false;
TQString currName;
for ( int i = 0; i < (int)part.length(); ++i ) {
TQChar c = part[ i ];
if ( !inName ) {
if ( c != ' ' && c != '\t' && c != '\n' && c != '=' && c != '\\' && c != '+' )
- inName = TRUE;
+ inName = true;
else
continue;
}
@@ -373,15 +373,15 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key
if ( start )
*start = i - lastWord.length() - extraWhiteSpaceCount + 1;
TQStringList lst;
- bool inName = FALSE;
+ bool inName = false;
TQString currName;
- bool hadEqual = FALSE;
+ bool hadEqual = false;
for ( ; i < (int)contents.length(); ++i ) {
c = contents[ i ];
if ( !hadEqual && c != '=' )
continue;
if ( !hadEqual ) {
- hadEqual = TRUE;
+ hadEqual = true;
continue;
}
if ( ( c.isLetter() || c.isDigit() || c == '.' || c == '/' || c == '_' || c == '\\' ||
@@ -392,11 +392,11 @@ TQStringList parse_multiline_part( const TQString &contents, const TQString &key
currName = TQString();
if ( c != '\\' || contents[i+1] != '\n' ) {
currName += c;
- inName = TRUE;
+ inName = true;
}
} else {
if ( inName ) {
- inName = FALSE;
+ inName = false;
if ( currName.simplifyWhiteSpace() != "\\" )
lst.append( currName );
}
@@ -427,7 +427,7 @@ void Project::parse()
int i = contents.find( "LANGUAGE" );
if ( i != -1 ) {
lang = "";
- is_cpp = FALSE;
+ is_cpp = false;
TQString part = contents.mid( i + TQString( "LANGUAGE" ).length() );
lang = parse_part( part );
is_cpp = lang == "C++";
@@ -445,7 +445,7 @@ void Project::parse()
for ( it = uifiles.begin(); it != uifiles.end(); ++it ) {
if ( (*it).startsWith( "__APPOBJ" ) )
continue;
- (void) new FormFile( *it, FALSE, this );
+ (void) new FormFile( *it, false, this );
}
@@ -470,7 +470,7 @@ void Project::parse()
for ( TQStringList::Iterator it = sourceKeys.begin(); it != sourceKeys.end(); ++it ) {
TQStringList lst = parse_multiline_part( contents, *it );
for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it )
- (void) new SourceFile( *it, FALSE, this );
+ (void) new SourceFile( *it, false, this );
}
}
@@ -491,11 +491,11 @@ void Project::parse()
TQStringList images = parse_multiline_part( contents, "IMAGES" );
// ### remove that for the final - this is beta-compatibility
- if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).exists() ) {
- images = TQDir( TQFileInfo( filename ).dirPath( TRUE ) + "/images" ).entryList();
+ if ( images.isEmpty() && TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).exists() ) {
+ images = TQDir( TQFileInfo( filename ).dirPath( true ) + "/images" ).entryList();
for ( int i = 0; i < (int)images.count(); ++i )
images[ i ].prepend( "images/" );
- modified = TRUE;
+ modified = true;
}
for ( TQStringList::ConstIterator pit = images.begin(); pit != images.end(); ++pit )
@@ -512,13 +512,13 @@ void Project::clear()
bool Project::removeSourceFile( SourceFile *sf )
{
if ( !sourcefiles.containsRef( sf ) )
- return FALSE;
+ return false;
if ( !sf->close() )
- return FALSE;
+ return false;
sourcefiles.removeRef( sf );
- modified = TRUE;
+ modified = true;
emit sourceFileRemoved( sf );
- return TRUE;
+ return true;
}
void Project::setDatabaseDescription( const TQString &db )
@@ -541,16 +541,16 @@ bool Project::isValid() const
{
// #### do more checking here?
if ( filename.isEmpty() || proName.isEmpty() )
- return FALSE;
+ return false;
- return TRUE;
+ return true;
}
TQString Project::makeAbsolute( const TQString &f )
{
if ( isDummy() )
return f;
- TQString encodedUrl = TQFileInfo( filename ).dirPath( TRUE );
+ TQString encodedUrl = TQFileInfo( filename ).dirPath( true );
TQUrl::encode( encodedUrl );
TQUrl u( encodedUrl, f );
return u.path();
@@ -560,7 +560,7 @@ TQString Project::makeRelative( const TQString &f )
{
if ( isDummy() )
return f;
- TQString p = TQFileInfo( filename ).dirPath( TRUE );
+ TQString p = TQFileInfo( filename ).dirPath( true );
TQString f2 = f;
if ( f2.left( p.length() ) == p )
f2.remove( 0, p.length() + 1 );
@@ -585,7 +585,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in
if ( strt )
*strt = i;
int start = i;
- bool lastWasBackspash = FALSE;
+ bool lastWasBackspash = false;
if ( i != -1 && ( i == 0 || contents[ i - 1 ] != '{' || contents[ i - 1 ] != ':' ) ) {
for ( ; i < (int)contents.length(); ++i ) {
if ( contents[ i ] == '\n' && !lastWasBackspash )
@@ -599,7 +599,7 @@ static void remove_multiline_contents( TQString &contents, const TQString &s, in
void Project::save( bool onlyProjectFile )
{
- bool anythingModified = FALSE;
+ bool anythingModified = false;
// save sources and forms
if ( !onlyProjectFile ) {
@@ -635,12 +635,12 @@ void Project::save( bool onlyProjectFile )
TQString original = "";
// read the existing file
- bool hasPreviousContents = FALSE;
+ bool hasPreviousContents = false;
if ( f.open( IO_ReadOnly ) ) {
TQTextStream ts( &f );
original = ts.read();
f.close();
- hasPreviousContents = TRUE;
+ hasPreviousContents = true;
remove_contents( original, "{SOURCES+=" ); // ### compatibility with early 3.0 betas
remove_contents( original, "DBFILE" );
remove_contents( original, "LANGUAGE" );
@@ -769,12 +769,12 @@ void Project::save( bool onlyProjectFile )
f.close();
- setModified( FALSE );
+ setModified( false );
if ( singleProjectMode() ) {
LanguageInterface *iface = MetaDataBase::languageInterface( language() );
if ( iface && iface->supports( LanguageInterface::CompressProject ) )
- iface->compressProject( makeAbsolute( filename ), singleProFileName, TRUE );
+ iface->compressProject( makeAbsolute( filename ), singleProFileName, true );
}
}
@@ -796,7 +796,7 @@ void Project::setDatabaseConnections( const TQPtrList<DatabaseConnection> &lst )
void Project::addDatabaseConnection( DatabaseConnection *conn )
{
dbConnections.append( conn );
- modified = TRUE;
+ modified = true;
}
#endif
@@ -879,7 +879,7 @@ void Project::saveConnections()
if ( f.exists() )
f.remove();
setDatabaseDescription( "" );
- modified = TRUE;
+ modified = true;
return;
}
@@ -1026,13 +1026,13 @@ bool Project::openDatabase( const TQString &connection, bool suppressDialog )
if ( connection.isEmpty() && !conn )
conn = databaseConnection( "(default)" );
if ( !conn )
- return FALSE;
+ return false;
bool b = conn->open( suppressDialog );
return b;
#else
Q_UNUSED( connection );
Q_UNUSED( suppressDialog );
- return FALSE;
+ return false;
#endif
}
@@ -1066,7 +1066,7 @@ TQObjectList *Project::formList( bool resolveFakeObjects ) const
if ( resolveFakeObjects && f->formWindow()->isFake() )
l->append( objectForFakeForm( f->formWindow() ) );
else
- l->append( f->formWindow()->child( 0, TQWIDGET_OBJECT_NAME_STRING ) );
+ l->append( f->formWindow()->child( 0, "TQWidget" ) );
} else if ( f->isFake() ) {
l->append( objectForFakeFormFile( f ) );
}
@@ -1088,7 +1088,7 @@ void Project::setLanguage( const TQString &l )
lang = l;
is_cpp = lang == "C++";
updateCustomSettings();
- modified = TRUE;
+ modified = true;
}
TQString Project::language() const
@@ -1100,7 +1100,7 @@ void Project::setCustomSetting( const TQString &key, const TQString &value )
{
customSettings.remove( key );
customSettings.insert( key, value );
- modified = TRUE;
+ modified = true;
}
TQString Project::customSetting( const TQString &key ) const
@@ -1139,7 +1139,7 @@ void Project::setActive( bool b )
void Project::addSourceFile( SourceFile *sf )
{
sourcefiles.append( sf );
- modified = TRUE;
+ modified = true;
emit sourceFileAdded( sf );
}
@@ -1171,7 +1171,7 @@ void Project::setIncludePath( const TQString &platform, const TQString &path )
if ( inclPath[platform] == path )
return;
inclPath.replace( platform, path );
- modified = TRUE;
+ modified = true;
}
void Project::setLibs( const TQString &platform, const TQString &path )
@@ -1275,27 +1275,27 @@ void Project::writePlatformSettings( TQString &contents, const TQString &setting
void Project::addFormFile( FormFile *ff )
{
formfiles.append( ff );
- modified = TRUE;
+ modified = true;
emit formFileAdded( ff );
}
bool Project::removeFormFile( FormFile *ff )
{
if ( !formfiles.containsRef( ff ) )
- return FALSE;
+ return false;
if ( !ff->close() )
- return FALSE;
+ return false;
formfiles.removeRef( ff );
- modified = TRUE;
+ modified = true;
emit formFileRemoved( ff );
- return TRUE;
+ return true;
}
void Project::addObject( TQObject *o )
{
bool wasModified = modified;
objs.append( o );
- FormFile *ff = new FormFile( "", FALSE, this, "qt_fakewindow" );
+ FormFile *ff = new FormFile( "", false, this, "qt_fakewindow" );
ff->setFileName( "__APPOBJ" + TQString( o->name() ) + ".ui" );
fakeFormFiles.insert( (void*)o, ff );
MetaDataBase::addEntry( o );
@@ -1305,15 +1305,15 @@ void Project::addObject( TQObject *o )
fw->setProject( this );
if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
- MetaDataBase::languageInterface( language() ), FALSE );
+ MetaDataBase::languageInterface( language() ), false );
if ( MainWindow::self )
fw->setMainWindow( MainWindow::self );
if ( MainWindow::self ) {
TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(), TQEvent::ChildInserted );
connect( fw,
- TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
MainWindow::self,
- TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) )
+ TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) )
);
}
if ( fw->parentWidget() ) {
@@ -1323,7 +1323,7 @@ void Project::addObject( TQObject *o )
} else {
if ( TQFile::exists( ff->absFileName() ) )
Resource::loadExtraSource( ff, ff->absFileName(),
- MetaDataBase::languageInterface( language() ), FALSE );
+ MetaDataBase::languageInterface( language() ), false );
}
emit objectAdded( o );
modified = wasModified;
@@ -1415,11 +1415,11 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func
if ( i != -1 )
func = func.left( i );
- bool found = FALSE;
+ bool found = false;
for ( TQValueList<LanguageInterface::Function>::Iterator it = funcs.begin();
it != funcs.end(); ++it ) {
if ( (*it).name.left( (*it).name.find( '(' ) ) == func ) {
- found = TRUE;
+ found = true;
break;
}
}
@@ -1433,7 +1433,7 @@ void Project::addAndEditFunction( const TQString &function, const TQString &func
"()\n" + functionBody + "\n";
f->setText( code );
if ( f->editor() )
- f->editor()->refresh( FALSE );
+ f->editor()->refresh( false );
}
if ( openDeveloper ) {
@@ -1452,9 +1452,9 @@ bool Project::hasParentObject( TQObject *o )
for ( TQObject *p = objs.first(); p; p = objs.next() ) {
TQObject *c = p->child( o->name(), o->className() );
if ( c )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
TQString Project::qualifiedName( TQObject *o )
@@ -1487,11 +1487,11 @@ void Project::designerCreated()
if ( !fw || fw->mainWindow() )
continue;
fw->setMainWindow( MainWindow::self );
- connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &,
+ connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &,
const TQString & ) ),
- MainWindow::self, TQT_SLOT( updateUndoRedo( bool, bool,
+ MainWindow::self, TQ_SLOT( updateUndoRedo( bool, bool,
const TQString &, const TQString & ) ) );
- fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), FALSE );
+ fw->reparent( MainWindow::self->qWorkspace(), TQPoint( 0, 0 ), false );
TQApplication::sendPostedEvents( MainWindow::self->qWorkspace(),
TQEvent::ChildInserted );
fw->parentWidget()->setFixedSize( 1, 1 );
@@ -1514,8 +1514,8 @@ TQString Project::locationOfObject( TQObject *o )
if ( MainWindow::self ) {
TQWidgetList windows = MainWindow::self->qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- FormWindow *fw = ::tqqt_cast<FormWindow*>(w);
- SourceEditor *se = ::tqqt_cast<SourceEditor*>(w);
+ FormWindow *fw = ::tqt_cast<FormWindow*>(w);
+ SourceEditor *se = ::tqt_cast<SourceEditor*>(w);
if ( fw ) {
if ( fw->isFake() )
return objectForFakeForm( fw )->name() + TQString( " [Source]" );
@@ -1532,7 +1532,7 @@ TQString Project::locationOfObject( TQObject *o )
}
}
- if ( ::tqqt_cast<SourceFile*>(o) ) {
+ if ( ::tqt_cast<SourceFile*>(o) ) {
for ( TQPtrListIterator<SourceFile> sources = sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
diff --git a/kdevdesigner/designer/project.h b/kdevdesigner/designer/project.h
index 3e80428f..032ee0aa 100644
--- a/kdevdesigner/designer/project.h
+++ b/kdevdesigner/designer/project.h
@@ -33,7 +33,7 @@
#include <tqstringlist.h>
#include <tqptrlist.h>
#include <tqmap.h>
-#include <tqpluginmanager_p.h>
+#include <private/tqpluginmanager_p.h>
#include "../interfaces/projectsettingsiface.h"
#include "sourcefile.h"
#include "formfile.h"
@@ -57,11 +57,11 @@ public:
#ifndef TQT_NO_SQL
conn( 0 ),
#endif
- project( p ), loaded( FALSE ), iface( 0 ) {}
+ project( p ), loaded( false ), iface( 0 ) {}
~DatabaseConnection();
bool refreshCatalog();
- bool open( bool suppressDialog = TRUE );
+ bool open( bool suppressDialog = true );
void close();
DesignerDatabase *iFace();
@@ -110,18 +110,18 @@ private:
class Project : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
friend class DatabaseConnection;
public:
Project( const TQString &fn, const TQString &pName = TQString(),
- TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = FALSE,
+ TQPluginManager<ProjectSettingsInterface> *pm = 0, bool isDummy = false,
const TQString &l = "C++" );
~Project();
- void setFileName( const TQString &fn, bool doClear = TRUE );
- TQString fileName( bool singlePro = FALSE ) const;
+ void setFileName( const TQString &fn, bool doClear = true );
+ TQString fileName( bool singlePro = false ) const;
TQString projectName() const;
void setDatabaseDescription( const TQString &db );
@@ -136,13 +136,13 @@ public:
bool isValid() const;
- // returns TRUE if this project is the <No Project> project
+ // returns true if this project is the <No Project> project
bool isDummy() const;
TQString makeAbsolute( const TQString &f );
TQString makeRelative( const TQString &f );
- void save( bool onlyProjectFile = FALSE );
+ void save( bool onlyProjectFile = false );
#ifndef TQT_NO_SQL
TQPtrList<DatabaseConnection> databaseConnections() const;
@@ -157,10 +157,10 @@ public:
void saveConnections();
void loadConnections();
- bool openDatabase( const TQString &connection, bool suppressDialog = TRUE );
+ bool openDatabase( const TQString &connection, bool suppressDialog = true );
void closeDatabase( const TQString &connection );
- TQObjectList *formList( bool resolveFakeObjects = FALSE ) const;
+ TQObjectList *formList( bool resolveFakeObjects = false ) const;
DesignerProject *iFace();
diff --git a/kdevdesigner/designer/projectsettings.ui b/kdevdesigner/designer/projectsettings.ui
index 2e03d928..cac4e813 100644
--- a/kdevdesigner/designer/projectsettings.ui
+++ b/kdevdesigner/designer/projectsettings.ui
@@ -288,7 +288,7 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">chooseDatabaseFile()</slot>
<slot access="protected">chooseProjectFile()</slot>
<slot access="protected">destroy()</slot>
@@ -296,7 +296,7 @@
<slot access="protected">init()</slot>
<slot access="protected">languageChanged( const TQString &amp; )</slot>
<slot access="protected">okClicked()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
diff --git a/kdevdesigner/designer/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp
index 99bb800d..0aeae976 100644
--- a/kdevdesigner/designer/projectsettingsimpl.cpp
+++ b/kdevdesigner/designer/projectsettingsimpl.cpp
@@ -52,17 +52,17 @@
* name 'name' and widget flags set to 'f'
*
* The dialog will by default be modeless, unless you set 'modal' to
- * TRUE to construct a modal dialog.
+ * true to construct a modal dialog.
*/
ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* name, bool modal, WFlags fl )
: ProjectSettingsBase( parent, name, modal, fl ), project( pro )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
editProjectFile->setFocus();
if ( project->isDummy() ) {
- editProjectFile->setEnabled( FALSE );
+ editProjectFile->setEnabled( false );
editProjectFile->setText( project->projectName() );
} else {
if ( project->fileName().isEmpty() || project->fileName() == ".pro" ) {
@@ -114,10 +114,10 @@ void ProjectSettings::helpClicked()
void ProjectSettings::okClicked()
{
// ### check for validity
- project->setFileName( editProjectFile->text(), FALSE );
+ project->setFileName( editProjectFile->text(), false );
project->setDatabaseDescription( editDatabaseFile->text() );
project->setLanguage( comboLanguage->text( comboLanguage->currentItem() ) );
- project->setModified( TRUE );
+ project->setModified( true );
accept();
}
diff --git a/kdevdesigner/designer/projectsettingsimpl.h b/kdevdesigner/designer/projectsettingsimpl.h
index c1b7fb0c..6609d506 100644
--- a/kdevdesigner/designer/projectsettingsimpl.h
+++ b/kdevdesigner/designer/projectsettingsimpl.h
@@ -36,11 +36,11 @@ class SourceFile;
class ProjectSettings : public ProjectSettingsBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
- ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ ProjectSettings( Project *pro, TQWidget* parent = 0, const char* name = 0, bool modal = false, WFlags fl = 0 );
~ProjectSettings();
protected slots:
diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp
index 10fd4aaf..41d21a02 100644
--- a/kdevdesigner/designer/propertyeditor.cpp
+++ b/kdevdesigner/designer/propertyeditor.cpp
@@ -151,7 +151,7 @@ bool PropertyWhatsThis::clicked( const TQString& href )
TQAssistantClient *ac = MainWindow::self->assistantClient();
ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href );
}
- return FALSE; // do not hide window
+ return false; // do not hide window
}
@@ -173,10 +173,10 @@ bool PropertyWhatsThis::clicked( const TQString& href )
PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName )
: TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName )
{
- setSelectable( FALSE );
- open = FALSE;
+ setSelectable( false );
+ open = false;
setText( 0, propertyName );
- changed = FALSE;
+ changed = false;
setText( 1, "" );
resetButton = 0;
}
@@ -247,7 +247,7 @@ void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( isChanged() && column == 0 ) {
p->save();
TQFont f = p->font();
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
@@ -294,18 +294,18 @@ void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg,
void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r )
{
p->save();
- TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg,
+ TQApplication::style().drawPrimitive(TQStyle::PE_Panel, p, r, cg,
TQStyle::Style_Sunken, TQStyleOption(1,1) );
p->restore();
}
-/*! Subclasses which are expandable items have to return TRUE
- here. Default is FALSE.
+/*! Subclasses which are expandable items have to return true
+ here. Default is false.
*/
bool PropertyItem::hasSubItems() const
{
- return FALSE;
+ return false;
}
/*! Returns the parent property item here if this is a child or 0
@@ -329,9 +329,9 @@ void PropertyItem::setOpen( bool b )
open = b;
if ( !open ) {
- children.setAutoDelete( TRUE );
+ children.setAutoDelete( true );
children.clear();
- children.setAutoDelete( FALSE );
+ children.setAutoDelete( false );
tqApp->processEvents();
listview->updateEditorSize();
return;
@@ -417,8 +417,8 @@ void PropertyItem::createResetButton()
hbox->layout()->setAlignment( TQt::AlignRight );
listview->addChild( hbox );
hbox->hide();
- TQObject::connect( resetButton, TQT_SIGNAL( clicked() ),
- listview, TQT_SLOT( resetProperty() ) );
+ TQObject::connect( resetButton, TQ_SIGNAL( clicked() ),
+ listview, TQ_SLOT( resetProperty() ) );
TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) );
TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) );
updateResetButtonState();
@@ -429,7 +429,7 @@ void PropertyItem::updateResetButtonState()
if ( !resetButton )
return;
if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) )
- resetButton->setEnabled( FALSE );
+ resetButton->setEnabled( false );
else
resetButton->setEnabled( isChanged() );
}
@@ -445,7 +445,7 @@ void PropertyItem::placeEditor( TQWidget *w )
if ( !r.size().isValid() ) {
listview->ensureItemVisible( this );
#if defined(TQ_WS_WIN)
- listview->repaintContents( FALSE );
+ listview->repaintContents( false );
#endif
r = listview->itemRect( this );
}
@@ -468,12 +468,12 @@ void PropertyItem::notifyValueChange()
{
if ( !propertyParent() ) {
listview->valueChanged( this );
- setChanged( TRUE );
+ setChanged( true );
if ( hasSubItems() )
initChildren();
} else {
propertyParent()->childValueChanged( this );
- setChanged( TRUE );
+ setChanged( true );
}
}
@@ -507,12 +507,12 @@ PropertyItem *PropertyItem::child( int i ) const
/*! If the contents of the item is not displayable with a text, but
you want to draw it yourself (using drawCustomContents()), return
- TRUE here.
+ true here.
*/
bool PropertyItem::hasCustomContents() const
{
- return FALSE;
+ return false;
}
/*!
@@ -555,7 +555,7 @@ void PropertyItem::setFocus( TQWidget *w )
{
if ( !tqApp->focusWidget() ||
listview->propertyEditor()->formWindow() &&
- ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) &&
+ ( !MainWindow::self->isAFormWindowChild( tqApp->focusWidget() ) &&
!tqApp->focusWidget()->inherits( "Editor" ) ) )
w->setFocus();
}
@@ -598,15 +598,15 @@ TQLineEdit *PropertyTextItem::lined()
if ( asciiOnly ) {
if ( PropertyItem::name() == "name" ) {
- lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) );
+ lin->setValidator( new AsciiValidator( TQString(":"), lin, "ascii_validator" ) );
if ( listview->propertyEditor()->formWindow()->isFake() )
- lin->setEnabled( FALSE );
+ lin->setEnabled( false );
} 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"), TQT_TQOBJECT(lin), "ascii_validator" ) );
+ "\xbd\xbe\xbf"), lin, "ascii_validator" ) );
}
} if ( !hasMultiLines ) {
lin->hide();
@@ -614,18 +614,18 @@ TQLineEdit *PropertyTextItem::lined()
button = new TQPushButton( "...", box );
setupStyle( button );
button->setFixedWidth( 20 );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( getText() ) );
- lin->setFrame( FALSE );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( getText() ) );
+ lin->setFrame( false );
}
- connect( lin, TQT_SIGNAL( returnPressed() ),
- this, TQT_SLOT( setValue() ) );
- connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( lin, TQ_SIGNAL( returnPressed() ),
+ this, TQ_SLOT( setValue() ) );
+ connect( lin, TQ_SIGNAL( textChanged( const TQString & ) ),
+ this, TQ_SLOT( setValue() ) );
if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" )
- connect( lin, TQT_SIGNAL( returnPressed() ),
+ connect( lin, TQ_SIGNAL( returnPressed() ),
listview->propertyEditor()->formWindow()->commandHistory(),
- TQT_SLOT( checkCompressedCommand() ) );
+ TQ_SLOT( checkCompressedCommand() ) );
lin->installEventFilter( listview );
return lin;
}
@@ -657,16 +657,16 @@ void PropertyTextItem::childValueChanged( PropertyItem *child )
PropertyItem::name(), child->value().toString() );
else
MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() );
- listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE );
+ listview->propertyEditor()->formWindow()->commandHistory()->setModified( true );
}
void PropertyTextItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin || lin->text().length() == 0 ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( value().toString() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
TQWidget* w;
@@ -686,7 +686,7 @@ void PropertyTextItem::createChildren()
{
PropertyTextItem *i = new PropertyTextItem( listview, this, this,
PropertyItem::name() == "name" ?
- "export macro" : "comment", FALSE, FALSE,
+ "export macro" : "comment", false, false,
PropertyItem::name() == "name" );
i->lined()->setEnabled( isChanged() );
addChild( i );
@@ -724,13 +724,13 @@ void PropertyTextItem::setValue( const TQVariant &v )
&& value() == v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
lined()->setText( v.toString() );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, v.toString() );
PropertyItem::setValue( v );
@@ -753,17 +753,17 @@ void PropertyTextItem::setValue()
void PropertyTextItem::getText()
{
- bool richText = !::tqqt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
+ bool richText = !::tqt_cast<TQButton*>(listview->propertyEditor()->widget()) ||
( text( 0 ) == "whatsThis" );
- bool doWrap = FALSE;
+ bool doWrap = false;
TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap );
if ( !txt.isEmpty() ) {
setText( 1, txt );
PropertyItem::setValue( txt );
notifyValueChange();
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( txt );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
}
@@ -781,12 +781,12 @@ TQLineEdit *PropertyDoubleItem::lined()
if ( lin )
return lin;
lin = new TQLineEdit( listview->viewport() );
- lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) );
+ lin->setValidator( new TQDoubleValidator( lin, "double_validator" ) );
- connect( lin, TQT_SIGNAL( returnPressed() ),
- this, TQT_SLOT( setValue() ) );
- connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( lin, TQ_SIGNAL( returnPressed() ),
+ this, TQ_SLOT( setValue() ) );
+ connect( lin, TQ_SIGNAL( textChanged( const TQString & ) ),
+ this, TQ_SLOT( setValue() ) );
lin->installEventFilter( listview );
return lin;
}
@@ -801,9 +801,9 @@ void PropertyDoubleItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setText( TQString::number( value().toDouble() ) );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
TQWidget* w = lined();
@@ -827,13 +827,13 @@ void PropertyDoubleItem::setValue( const TQVariant &v )
if ( value() == v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
int oldCursorPos;
oldCursorPos = lin->cursorPosition();
lined()->setText( TQString::number( v.toDouble() ) );
if ( oldCursorPos < (int)lin->text().length() )
lin->setCursorPosition( oldCursorPos );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
setText( 1, TQString::number( v.toDouble() ) );
PropertyItem::setValue( v );
@@ -861,12 +861,12 @@ TQDateEdit *PropertyDateItem::lined()
if ( lin )
return lin;
lin = new TQDateEdit( listview->viewport() );
- TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
- connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( lin, TQ_SIGNAL( valueChanged( const TQDate & ) ),
+ this, TQ_SLOT( setValue() ) );
return lin;
}
@@ -880,9 +880,9 @@ void PropertyDateItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setDate( value().toDate() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -905,18 +905,18 @@ void PropertyDateItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->date() != v.toDate() )
lined()->setDate( v.toDate() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
- setText( 1, v.toDate().toString( ::Qt::ISODate ) );
+ setText( 1, v.toDate().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
}
void PropertyDateItem::setValue()
{
- setText( 1, lined()->date().toString( ::Qt::ISODate ) );
+ setText( 1, lined()->date().toString( ::TQt::ISODate ) );
TQVariant v;
v = lined()->date();
PropertyItem::setValue( v );
@@ -936,9 +936,9 @@ TQTimeEdit *PropertyTimeItem::lined()
if ( lin )
return lin;
lin = new TQTimeEdit( listview->viewport() );
- connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ),
- this, TQT_SLOT( setValue() ) );
- TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ connect( lin, TQ_SIGNAL( valueChanged( const TQTime & ) ),
+ this, TQ_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -955,9 +955,9 @@ void PropertyTimeItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setTime( value().toTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -980,18 +980,18 @@ void PropertyTimeItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->time() != v.toTime() )
lined()->setTime( v.toTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
- setText( 1, v.toTime().toString( ::Qt::ISODate ) );
+ setText( 1, v.toTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
}
void PropertyTimeItem::setValue()
{
- setText( 1, lined()->time().toString( ::Qt::ISODate ) );
+ setText( 1, lined()->time().toString( ::TQt::ISODate ) );
TQVariant v;
v = lined()->time();
PropertyItem::setValue( v );
@@ -1011,9 +1011,9 @@ TQDateTimeEdit *PropertyDateTimeItem::lined()
if ( lin )
return lin;
lin = new TQDateTimeEdit( listview->viewport() );
- connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ),
- this, TQT_SLOT( setValue() ) );
- TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ connect( lin, TQ_SIGNAL( valueChanged( const TQDateTime & ) ),
+ this, TQ_SLOT( setValue() ) );
+ TQObjectList *l = lin->queryList( "TQLineEdit" );
for ( TQObject *o = l->first(); o; o = l->next() )
o->installEventFilter( listview );
delete l;
@@ -1030,9 +1030,9 @@ void PropertyDateTimeItem::showEditor()
{
PropertyItem::showEditor();
if ( !lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
lined()->setDateTime( value().toDateTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
placeEditor( lin );
if ( !lin->isVisible() ) {
@@ -1055,18 +1055,18 @@ void PropertyDateTimeItem::setValue( const TQVariant &v )
return;
if ( lin ) {
- lined()->blockSignals( TRUE );
+ lined()->blockSignals( true );
if ( lined()->dateTime() != v.toDateTime() )
lined()->setDateTime( v.toDateTime() );
- lined()->blockSignals( FALSE );
+ lined()->blockSignals( false );
}
- setText( 1, v.toDateTime().toString( ::Qt::ISODate ) );
+ setText( 1, v.toDateTime().toString( ::TQt::ISODate ) );
PropertyItem::setValue( v );
}
void PropertyDateTimeItem::setValue()
{
- setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) );
+ setText( 1, lined()->dateTime().toString( ::TQt::ISODate ) );
TQVariant v;
v = lined()->dateTime();
PropertyItem::setValue( v );
@@ -1085,12 +1085,12 @@ TQComboBox *PropertyBoolItem::combo()
{
if ( comb )
return comb;
- comb = new TQComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( false, listview->viewport() );
comb->hide();
comb->insertItem( i18n( "False" ) );
comb->insertItem( i18n( "True" ) );
- connect( comb, TQT_SIGNAL( activated( int ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( comb, TQ_SIGNAL( activated( int ) ),
+ this, TQ_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
@@ -1112,12 +1112,12 @@ void PropertyBoolItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
if ( value().toBool() )
combo()->setCurrentItem( 1 );
else
combo()->setCurrentItem( 0 );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -1139,12 +1139,12 @@ void PropertyBoolItem::setValue( const TQVariant &v )
return;
if ( comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
if ( v.toBool() )
combo()->setCurrentItem( 1 );
else
combo()->setCurrentItem( 0 );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
TQString tmp = i18n( "True" );
if ( !v.toBool() )
@@ -1158,7 +1158,7 @@ void PropertyBoolItem::setValue()
if ( !comb )
return;
setText( 1, combo()->currentText() );
- bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE;
+ bool b = combo()->currentItem() != 0;
PropertyItem::setValue( TQVariant( b ) );
notifyValueChange();
}
@@ -1182,12 +1182,12 @@ TQSpinBox *PropertyIntItem::spinBox()
spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() );
spinBx->hide();
spinBx->installEventFilter( listview );
- TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( spinBx, TQ_SIGNAL( valueChanged( int ) ),
+ this, TQ_SLOT( setValue() ) );
return spinBx;
}
@@ -1201,12 +1201,12 @@ void PropertyIntItem::showEditor()
{
PropertyItem::showEditor();
if ( !spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
if ( signedValue )
spinBox()->setValue( value().toInt() );
else
spinBox()->setValue( value().toUInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
placeEditor( spinBox() );
if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) {
@@ -1228,12 +1228,12 @@ void PropertyIntItem::setValue( const TQVariant &v )
return;
if ( spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
if ( signedValue )
spinBox()->setValue( v.toInt() );
else
spinBox()->setValue( v.toUInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
if ( signedValue )
@@ -1278,12 +1278,12 @@ TQSpinBox* PropertyLayoutItem::spinBox()
spinBx->setSpecialValueText( i18n( "default" ) );
spinBx->hide();
spinBx->installEventFilter( listview );
- TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ TQObjectList *ol = spinBx->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
- connect( spinBx, TQT_SIGNAL( valueChanged( int ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( spinBx, TQ_SIGNAL( valueChanged( int ) ),
+ this, TQ_SLOT( setValue() ) );
return spinBx;
}
@@ -1291,9 +1291,9 @@ void PropertyLayoutItem::showEditor()
{
PropertyItem::showEditor();
if ( !spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
spinBox()->setValue( value().toInt() );
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
}
placeEditor( spinBox() );
if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) {
@@ -1311,9 +1311,9 @@ void PropertyLayoutItem::hideEditor()
void PropertyLayoutItem::setValue( const TQVariant &v )
{
if ( spinBx ) {
- spinBox()->blockSignals( TRUE );
+ spinBox()->blockSignals( true );
spinBox()->setValue( v.toInt() );
- spinBox()->blockSignals( FALSE );
+ spinBox()->blockSignals( false );
}
TQString s = v.toString();
if ( v.toInt() == -1 )
@@ -1347,11 +1347,11 @@ TQComboBox *PropertyListItem::combo()
return comb;
comb = new TQComboBox( editable, listview->viewport() );
comb->hide();
- connect( comb, TQT_SIGNAL( activated( int ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( comb, TQ_SIGNAL( activated( int ) ),
+ this, TQ_SLOT( setValue() ) );
comb->installEventFilter( listview );
if ( editable ) {
- TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING );
+ TQObjectList *ol = comb->queryList( "TQLineEdit" );
if ( ol && ol->first() )
ol->first()->installEventFilter( listview );
delete ol;
@@ -1369,10 +1369,10 @@ void PropertyListItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -1390,10 +1390,10 @@ void PropertyListItem::hideEditor()
void PropertyListItem::setValue( const TQVariant &v )
{
if ( comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( v.toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
setText( 1, v.toStringList().first() );
PropertyItem::setValue( v );
@@ -1424,10 +1424,10 @@ void PropertyListItem::setCurrentItem( const TQString &s )
return;
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
for ( uint i = 0; i < combo()->listBox()->count(); ++i ) {
if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) {
@@ -1451,10 +1451,10 @@ void PropertyListItem::setCurrentItem( int i )
return;
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->clear();
combo()->insertStringList( value().toStringList() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
combo()->setCurrentItem( i );
setText( 1, combo()->currentText() );
@@ -1492,7 +1492,7 @@ TQLineEdit *PropertyCoordItem::lined()
if ( lin )
return lin;
lin = new TQLineEdit( listview->viewport() );
- lin->setReadOnly( TRUE );
+ lin->setReadOnly( true );
lin->installEventFilter( listview );
lin->hide();
return lin;
@@ -1502,15 +1502,15 @@ void PropertyCoordItem::createChildren()
{
PropertyItem *i = this;
if ( typ == Rect || typ == Point ) {
- i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "x" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "y" ), true );
addChild( i );
}
if ( typ == Rect || typ == Size ) {
- i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "width" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "height" ), true );
addChild( i );
}
}
@@ -1592,7 +1592,7 @@ void PropertyCoordItem::setValue( const TQVariant &v )
bool PropertyCoordItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyCoordItem::childValueChanged( PropertyItem *child )
@@ -1644,8 +1644,8 @@ PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, Pr
box->setLineWidth( 2 );
pixPrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( getPixmap() ) );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( getPixmap() ) );
}
PropertyPixmapItem::~PropertyPixmapItem()
@@ -1699,7 +1699,7 @@ void PropertyPixmapItem::getPixmap()
bool PropertyPixmapItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -1747,18 +1747,18 @@ PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, Prop
pal.setDisabled( cg );
colorPrev->setPalette( pal );
box->installEventFilter( listview );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( getColor() ) );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( getColor() ) );
}
void PropertyColorItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Red" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Green" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), true );
addChild( i );
}
@@ -1838,7 +1838,7 @@ void PropertyColorItem::getColor()
bool PropertyColorItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -1863,22 +1863,22 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- lined->setFrame( FALSE );
- lined->setReadOnly( TRUE );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
box->setFocusProxy( lined );
box->installEventFilter( listview );
lined->installEventFilter( listview );
button->installEventFilter( listview );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( getFont() ) );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( getFont() ) );
}
void PropertyFontItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "Family" ), false );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), true );
addChild( i );
i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) );
addChild( i );
@@ -1944,7 +1944,7 @@ void PropertyFontItem::setValue( const TQVariant &v )
void PropertyFontItem::getFont()
{
- bool ok = FALSE;
+ bool ok = false;
TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview );
if ( ok && f != val.toFont() ) {
setValue( f );
@@ -1954,7 +1954,7 @@ void PropertyFontItem::getFont()
bool PropertyFontItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyFontItem::childValueChanged( PropertyItem *child )
@@ -1990,8 +1990,8 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after
button->setFixedWidth( 20 );
box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken );
box->setLineWidth( 2 );
- lined->setFrame( FALSE );
- lined->setReadOnly( TRUE );
+ lined->setFrame( false );
+ lined->setReadOnly( true );
box->setFocusProxy( lined );
box->installEventFilter( listview );
lined->installEventFilter( listview );
@@ -2001,12 +2001,12 @@ PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after
void PropertyDatabaseItem::createChildren()
{
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Connection" ), true );
addChild( i );
- i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Table" ), true );
addChild( i );
if ( withField ) {
- i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE );
+ i = new PropertyListItem( listview, i, this, i18n( "Field" ), true );
addChild( i );
}
}
@@ -2026,13 +2026,13 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 0 )
item->setValue( TQStringList( lst[ 0 ] ) );
else if ( withField )
- item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()),
+ item->setValue( TQStringList( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] ) );
if ( lst.count() > 0 && !lst[ 0 ].isEmpty() )
item->setCurrentItem( lst[ 0 ] );
else if ( !isChanged() && withField )
- item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()),
+ item->setCurrentItem( MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(),
"database" ).toStringList()[ 0 ] );
else
item->setCurrentItem( 0 );
@@ -2044,7 +2044,7 @@ void PropertyDatabaseItem::initChildren()
else if ( lst.count() > 1 )
item->setValue( TQStringList( lst[ 1 ] ) );
else if ( withField ) {
- TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setValue( fakeLst[ 1 ] );
}
@@ -2052,7 +2052,7 @@ void PropertyDatabaseItem::initChildren()
if ( lst.count() > 1 && !lst[ 1 ].isEmpty() )
item->setCurrentItem( lst[ 1 ] );
else if ( !isChanged() && withField ) {
- TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList();
+ TQStringList fakeLst = MetaDataBase::fakeProperty( listview->propertyEditor()->formWindow()->mainContainer(), "database" ).toStringList();
if ( fakeLst.count() > 1 )
item->setCurrentItem( fakeLst[ 1 ] );
else
@@ -2110,7 +2110,7 @@ void PropertyDatabaseItem::setValue( const TQVariant &v )
bool PropertyDatabaseItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
void PropertyDatabaseItem::childValueChanged( PropertyItem *c )
@@ -2158,7 +2158,7 @@ TQLineEdit *PropertySizePolicyItem::lined()
return lin;
lin = new TQLineEdit( listview->viewport() );
lin->hide();
- lin->setReadOnly( TRUE );
+ lin->setReadOnly( true );
return lin;
}
@@ -2168,15 +2168,15 @@ void PropertySizePolicyItem::createChildren()
lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored";
PropertyItem *i = this;
- i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), false );
i->setValue( lst );
addChild( i );
- i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE );
+ i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), false );
i->setValue( lst );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), true );
addChild( i );
- i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE );
+ i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), true );
addChild( i );
}
@@ -2250,7 +2250,7 @@ void PropertySizePolicyItem::childValueChanged( PropertyItem *child )
bool PropertySizePolicyItem::hasSubItems() const
{
- return TRUE;
+ return true;
}
// --------------------------------------------------------------
@@ -2269,8 +2269,8 @@ PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after,
box->setLineWidth( 2 );
palettePrev->setFrameStyle( TQFrame::NoFrame );
box->installEventFilter( listview );
- connect( button, TQT_SIGNAL( clicked() ),
- this, TQT_SLOT( getPalette() ) );
+ connect( button, TQ_SIGNAL( clicked() ),
+ this, TQ_SLOT( getPalette() ) );
}
PropertyPaletteItem::~PropertyPaletteItem()
{
@@ -2305,16 +2305,12 @@ void PropertyPaletteItem::getPalette()
{
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
- bool ok = FALSE;
+ bool ok = false;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
- if ( ::tqqt_cast<TQScrollView*>(w) )
+ if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport();
TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(),
-#if defined(TQT_NON_COMMERCIAL)
- w->backgroundMode(), listview->topLevelWidget(),
-#else
w->backgroundMode(), listview,
-#endif
"choose_palette", listview->propertyEditor()->formWindow() );
if ( !ok )
return;
@@ -2324,7 +2320,7 @@ void PropertyPaletteItem::getPalette()
bool PropertyPaletteItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -2358,7 +2354,7 @@ TQComboBox *PropertyCursorItem::combo()
{
if ( comb )
return comb;
- comb = new TQComboBox( FALSE, listview->viewport() );
+ comb = new TQComboBox( false, listview->viewport() );
comb->hide();
TQBitmap cur;
@@ -2395,8 +2391,8 @@ TQComboBox *PropertyCursorItem::combo()
comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor );
comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor );
- connect( comb, TQT_SIGNAL( activated( int ) ),
- this, TQT_SLOT( setValue() ) );
+ connect( comb, TQ_SIGNAL( activated( int ) ),
+ this, TQ_SLOT( setValue() ) );
comb->installEventFilter( listview );
return comb;
}
@@ -2410,9 +2406,9 @@ void PropertyCursorItem::showEditor()
{
PropertyItem::showEditor();
if ( !comb ) {
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->setCurrentItem( (int)value().toCursor().shape() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
}
placeEditor( combo() );
if ( !combo()->isVisible() || !combo()->hasFocus() ) {
@@ -2433,9 +2429,9 @@ void PropertyCursorItem::setValue( const TQVariant &v )
&& value() == v )
return;
- combo()->blockSignals( TRUE );
+ combo()->blockSignals( true );
combo()->setCurrentItem( (int)v.toCursor().shape() );
- combo()->blockSignals( FALSE );
+ combo()->blockSignals( false );
setText( 1, combo()->currentText() );
PropertyItem::setValue( v );
}
@@ -2458,13 +2454,13 @@ PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l,
PropertyItem *prop,
const TQString &propName )
: PropertyItem( l, after, prop, propName ),
- k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE )
+ k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( false )
{
box = new TQHBox( listview->viewport() );
box->hide();
sequence = new TQLineEdit( box );
- connect( sequence, TQT_SIGNAL(textChanged( const TQString & )),
- this, TQT_SLOT(setValue()) );
+ connect( sequence, TQ_SIGNAL(textChanged( const TQString & )),
+ this, TQ_SLOT(setValue()) );
sequence->installEventFilter( this );
}
@@ -2497,22 +2493,22 @@ bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e )
if ( !mouseEnter &&
(k->key() == TQObject::Key_Up ||
k->key() == TQObject::Key_Down) )
- return FALSE;
+ return false;
handleKeyEvent( k );
- return TRUE;
+ return true;
} else if ( (e->type() == TQEvent::FocusIn) ||
(e->type() == TQEvent::MouseButtonPress) ) {
mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) ||
(e->type() == TQEvent::MouseButtonPress);
- return TRUE;
+ return true;
}
// Lets eat accelerators now..
if ( e->type() == TQEvent::Accel ||
e->type() == TQEvent::AccelOverride ||
e->type() == TQEvent::KeyRelease )
- return TRUE;
- return FALSE;
+ return true;
+ return false;
}
void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e )
@@ -2572,7 +2568,7 @@ void PropertyKeysequenceItem::setValue()
PropertyItem::setValue( v );
if ( sequence->hasFocus() )
notifyValueChange();
- setChanged( TRUE );
+ setChanged( true );
}
void PropertyKeysequenceItem::setValue( const TQVariant &v )
@@ -2599,7 +2595,7 @@ EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f )
setFrameStyle( Panel | Plain );
setPaletteBackgroundColor( TQt::white );
popLayout = new TQVBoxLayout( this, 3 );
- checkBoxList.setAutoDelete( TRUE );
+ checkBoxList.setAutoDelete( true );
}
EnumPopup::~EnumPopup()
@@ -2658,20 +2654,20 @@ EnumBox::EnumBox( TQWidget *parent, const char *name )
: TQComboBox( parent, name )
{
pop = new EnumPopup( this, "popup", TQObject::WType_Popup );
- connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) );
- connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) );
- popupShown = FALSE;
- arrowDown = FALSE;
+ connect( pop, TQ_SIGNAL( hidden() ), this, TQ_SLOT( popupHidden() ) );
+ connect( pop, TQ_SIGNAL( closed() ), this, TQ_SLOT( popupClosed() ) );
+ popupShown = false;
+ arrowDown = false;
}
void EnumBox::popupHidden()
{
- popupShown = FALSE;
+ popupShown = false;
}
void EnumBox::popupClosed()
{
- popupShown = FALSE;
+ popupShown = false;
emit valueChanged();
}
@@ -2688,7 +2684,7 @@ void EnumBox::paintEvent( TQPaintEvent * )
flags |= TQStyle::Style_HasFocus;
if ( width() < 5 || height() < 5 ) {
- qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2,
+ qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, false, 2,
&g.brush( TQColorGroup::Button ) );
return;
}
@@ -2727,19 +2723,19 @@ void EnumBox::popup()
{
if ( popupShown ) {
pop->closeWidget();
- popupShown = FALSE;
+ popupShown = false;
return;
}
pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) );
pop->setMinimumWidth( width() );
emit aboutToShowPopup();
pop->show();
- popupShown = TRUE;
+ popupShown = true;
}
void EnumBox::mousePressEvent( TQMouseEvent *e )
{
- if ( e->button() != Qt::LeftButton )
+ if ( e->button() != TQt::LeftButton )
return;
TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this,
@@ -2749,19 +2745,19 @@ void EnumBox::mousePressEvent( TQMouseEvent *e )
arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) );
if ( arrowRect.contains( e->pos() ) ) {
- arrowDown = TRUE;
- repaint( FALSE );
+ arrowDown = true;
+ repaint( false );
}
popup();
- TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQ_SLOT( restoreArrow() ) );
}
void EnumBox::keyPressEvent( TQKeyEvent *e )
{
if ( e->key() == Key_Space ) {
popup();
- TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) );
+ TQTimer::singleShot( 100, this, TQ_SLOT( restoreArrow() ) );
} else if ( e->key() == Key_Enter || e->key() == Key_Return ) {
popup();
}
@@ -2769,14 +2765,14 @@ void EnumBox::keyPressEvent( TQKeyEvent *e )
void EnumBox::restoreArrow()
{
- arrowDown = FALSE;
- repaint( FALSE );
+ arrowDown = false;
+ repaint( false );
}
void EnumBox::setText( const TQString &text )
{
str = text;
- repaint( FALSE );
+ repaint( false );
}
@@ -2790,8 +2786,8 @@ PropertyEnumItem::PropertyEnumItem( PropertyList *l,
box = new EnumBox( listview->viewport() );
box->hide();
box->installEventFilter( listview );
- connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) );
- connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) );
+ connect( box, TQ_SIGNAL( aboutToShowPopup() ), this, TQ_SLOT( insertEnums() ) );
+ connect( box, TQ_SIGNAL( valueChanged() ), this, TQ_SLOT( setValue() ) );
}
PropertyEnumItem::~PropertyEnumItem()
@@ -2824,8 +2820,8 @@ void PropertyEnumItem::setValue( const TQVariant &v )
TQStringList lst = v.toStringList();
TQValueListConstIterator<TQString> it = lst.begin();
for ( ; it != lst.end(); ++it )
- enumList.append( EnumItem( *it, FALSE ) );
- enumList.first().selected = TRUE;
+ enumList.append( EnumItem( *it, false ) );
+ enumList.first().selected = true;
enumString = enumList.first().key;
box->setText( enumString );
setText( 1, enumString );
@@ -2860,10 +2856,10 @@ void PropertyEnumItem::setCurrentValues( TQStrList lst )
TQStrList::ConstIterator it = lst.begin();
TQValueList<EnumItem>::Iterator eit = enumList.begin();
for ( ; eit != enumList.end(); ++eit ) {
- (*eit).selected = FALSE;
+ (*eit).selected = false;
for ( it = lst.begin(); it != lst.end(); ++it ) {
if ( TQString( *it ) == (*eit).key ) {
- (*eit).selected = TRUE;
+ (*eit).selected = true;
enumString += "|" + (*eit).key;
break;
}
@@ -2913,29 +2909,29 @@ PropertyList::PropertyList( PropertyEditor *e )
init_colors();
whatsThis = new PropertyWhatsThis( this );
- showSorted = FALSE;
- header()->setMovingEnabled( FALSE );
- header()->setStretchEnabled( TRUE );
+ showSorted = false;
+ header()->setMovingEnabled( false );
+ header()->setStretchEnabled( true );
setResizePolicy( TQScrollView::Manual );
- viewport()->setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
viewport()->installEventFilter( this );
addColumn( i18n( "Property" ) );
addColumn( i18n( "Value" ) );
- connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ),
- this, TQT_SLOT( updateEditorSize() ) );
- disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ),
- this, TQT_SLOT( changeSortColumn( int ) ) );
- connect( header(), TQT_SIGNAL( sectionClicked( int ) ),
- this, TQT_SLOT( toggleSort() ) );
- connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ),
- this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) );
- connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
- this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) );
+ connect( header(), TQ_SIGNAL( sizeChange( int, int, int ) ),
+ this, TQ_SLOT( updateEditorSize() ) );
+ disconnect( header(), TQ_SIGNAL( sectionClicked( int ) ),
+ this, TQ_SLOT( changeSortColumn( int ) ) );
+ connect( header(), TQ_SIGNAL( sectionClicked( int ) ),
+ this, TQ_SLOT( toggleSort() ) );
+ connect( this, TQ_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQ_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) );
+ connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQ_SLOT( toggleOpen( TQListViewItem * ) ) );
setSorting( -1 );
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
setColumnWidthMode( 1, Manual );
- mousePressed = FALSE;
+ mousePressed = false;
pressItem = 0;
theLastEvent = MouseEvent;
header()->installEventFilter( this );
@@ -3023,11 +3019,11 @@ static bool parent_is_data_aware( TQWidget *w )
{
TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
- if ( ::tqqt_cast<QDesignerDataBrowser*>(p) || ::tqqt_cast<QDesignerDataView*>(p) )
- return TRUE;
+ if ( ::tqt_cast<QDesignerDataBrowser*>(p) || ::tqt_cast<QDesignerDataView*>(p) )
+ return true;
p = p->parentWidget();
}
- return FALSE;
+ return false;
}
#endif
@@ -3039,7 +3035,7 @@ void PropertyList::setupProperties()
{
if ( !editor->widget() )
return;
- bool allProperties = !::tqqt_cast<Spacer*>(editor->widget());
+ bool allProperties = !::tqt_cast<Spacer*>(editor->widget());
TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties );
PropertyItem *item = 0;
TQMap<TQString, bool> unique;
@@ -3047,7 +3043,7 @@ void PropertyList::setupProperties()
TQStringList valueSet;
bool parentHasLayout =
w->isWidgetType() &&
- !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() &&
+ !editor->formWindow()->isMainContainer( w ) && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
const TQMetaProperty* p =
@@ -3057,8 +3053,8 @@ void PropertyList::setupProperties()
continue;
if ( unique.contains( TQString::fromLatin1( it.current() ) ) )
continue;
- if ( ::tqqt_cast<QDesignerToolBar*>(editor->widget()) ||
- ::tqqt_cast<MenuBarEditor*>(editor->widget()) ) {
+ if ( ::tqt_cast<QDesignerToolBar*>(editor->widget()) ||
+ ::tqt_cast<MenuBarEditor*>(editor->widget()) ) {
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumWidth" ) == 0 )
@@ -3076,9 +3072,9 @@ void PropertyList::setupProperties()
if ( qstrcmp( p->name(), "maximumSize" ) == 0 )
continue;
}
- unique.insert( TQString::fromLatin1( it.current() ), TRUE );
+ unique.insert( TQString::fromLatin1( it.current() ), true );
if ( editor->widget()->isWidgetType() &&
- editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) {
+ editor->formWindow()->isMainContainer( editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
continue;
} else { // hide some toplevel-only stuff
@@ -3094,7 +3090,7 @@ void PropertyList::setupProperties()
continue;
if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 )
continue;
- if ( ::tqqt_cast<TQLayoutWidget*>(w) || ::tqqt_cast<Spacer*>(w) ) {
+ if ( ::tqt_cast<TQLayoutWidget*>(w) || ::tqt_cast<Spacer*>(w) ) {
if ( qstrcmp( p->name(), "sizePolicy" ) == 0 )
continue;
if ( qstrcmp( p->name(), "minimumHeight" ) == 0 )
@@ -3137,7 +3133,7 @@ void PropertyList::setupProperties()
continue;
}
}
- if ( ::tqqt_cast<TQActionGroup*>(w) ) {
+ if ( ::tqt_cast<TQActionGroup*>(w) ) {
if ( qstrcmp( p->name(), "usesDropDown" ) == 0 )
continue;
if ( qstrcmp( p->name(), "toggleAction" ) == 0 )
@@ -3154,7 +3150,7 @@ void PropertyList::setupProperties()
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() ||
- !::tqqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
+ !::tqt_cast<TQButtonGroup*>(editor->widget()->parent()) )
continue;
}
@@ -3171,27 +3167,27 @@ void PropertyList::setupProperties()
<< p->valueToKey( AlignHCenter )
<< p->valueToKey( AlignRight )
<< p->valueToKey( AlignJustify );
- item = new PropertyListItem( this, item, 0, "hAlign", FALSE );
+ item = new PropertyListItem( this, item, 0, "hAlign", false );
item->setValue( lst );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) )
- item->setChanged( TRUE, FALSE );
- if ( !::tqqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
+ item->setChanged( true, false );
+ if ( !::tqt_cast<TQMultiLineEdit*>(editor->widget()) ) {
lst.clear();
lst << p->valueToKey( AlignTop )
<< p->valueToKey( AlignVCenter )
<< p->valueToKey( AlignBottom );
- item = new PropertyListItem( this, item, 0, "vAlign", FALSE );
+ item = new PropertyListItem( this, item, 0, "vAlign", false );
item->setValue( lst );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "wordwrap" );
- if ( ::tqqt_cast<TQGroupBox*>(w) )
- item->setVisible( FALSE );
+ if ( ::tqt_cast<TQGroupBox*>(w) )
+ item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
} else {
TQStrList lst( p->enumKeys() );
@@ -3205,7 +3201,7 @@ void PropertyList::setupProperties()
item->setValue( l );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
} else if ( p->isEnumType() ) {
TQStrList l = p->enumKeys();
@@ -3217,7 +3213,7 @@ void PropertyList::setupProperties()
continue;
lst << k;
}
- item = new PropertyListItem( this, item, 0, p->name(), FALSE );
+ item = new PropertyListItem( this, item, 0, p->name(), false );
item->setValue( lst );
} else {
TQVariant::Type t = TQVariant::nameToType( p->type() );
@@ -3231,30 +3227,30 @@ void PropertyList::setupProperties()
valueSet << item->name();
}
if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
}
- if ( !::tqqt_cast<TQSplitter*>(w) && !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) &&
+ if ( !::tqt_cast<TQSplitter*>(w) && !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) &&
w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) {
item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" )
|| MetaDataBase::spacing( editor->widget() ) != -1 )
- layoutInitValue( item, TRUE );
+ layoutInitValue( item, true );
else
layoutInitValue( item );
item = new PropertyLayoutItem( this, item, 0, "layoutMargin" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" )
|| MetaDataBase::margin( editor->widget() ) != -1 )
- layoutInitValue( item, TRUE );
+ layoutInitValue( item, true );
else
layoutInitValue( item );
TQWidget *widget = (TQWidget*)w;
- if ( ( !::tqqt_cast<TQLayoutWidget*>(widget) &&
- widget->parentWidget() && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
- item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
+ if ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
+ widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
+ item = new PropertyListItem( this, item, 0, "resizeMode", false );
TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
item->setValue( lst );
@@ -3262,43 +3258,43 @@ void PropertyList::setupProperties()
TQString resizeMod = MetaDataBase::resizeMode( editor->widget() );
if ( !resizeMod.isEmpty() &&
resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) {
- item->setChanged( TRUE, FALSE );
- MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE );
+ item->setChanged( true, false );
+ MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", true );
}
}
}
- if ( !::tqqt_cast<Spacer*>(w) && !::tqqt_cast<TQLayoutWidget*>(w) &&
- !::tqqt_cast<MenuBarEditor*>(w) && !::tqqt_cast<QDesignerToolBar*>(w) ) {
- item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE );
+ if ( !::tqt_cast<Spacer*>(w) && !::tqt_cast<TQLayoutWidget*>(w) &&
+ !::tqt_cast<MenuBarEditor*>(w) && !::tqt_cast<QDesignerToolBar*>(w) ) {
+ item = new PropertyTextItem( this, item, 0, "toolTip", true, false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) )
- item->setChanged( TRUE, FALSE );
- item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE );
+ item->setChanged( true, false );
+ item = new PropertyTextItem( this, item, 0, "whatsThis", true, true );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
#ifndef TQT_NO_SQL
- if ( !::tqqt_cast<TQDataTable*>(editor->widget()) && !::tqqt_cast<TQDataBrowser*>(editor->widget()) &&
- !::tqqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqqt_cast<TQWidget*>(editor->widget()) ) ) {
- item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) );
+ if ( !::tqt_cast<TQDataTable*>(editor->widget()) && !::tqt_cast<TQDataBrowser*>(editor->widget()) &&
+ !::tqt_cast<TQDataView*>(editor->widget()) && parent_is_data_aware( ::tqt_cast<TQWidget*>(editor->widget()) ) ) {
+ item = new PropertyDatabaseItem( this, item, 0, "database", editor->formWindow()->mainContainer() != w );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
- if ( ::tqqt_cast<TQDataTable*>(editor->widget()) || ::tqqt_cast<TQDataBrowser*>(editor->widget()) ||
- ::tqqt_cast<TQDataView*>(editor->widget()) ) {
- item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
+ if ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
+ ::tqt_cast<TQDataView*>(editor->widget()) ) {
+ item = new PropertyDatabaseItem( this, item, 0, "database", false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
item = new PropertyBoolItem( this, item, 0, "frameworkCode" );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
#endif
@@ -3341,18 +3337,18 @@ void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw,
cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) {
if ( unique.contains( TQString( (*it).property ) ) )
continue;
- unique.insert( TQString( (*it).property ), TRUE );
+ unique.insert( TQString( (*it).property ), true );
addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
}
bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t )
{
if ( name == "buddy" ) {
- PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE );
+ PropertyListItem *itm = new PropertyListItem( this, item, 0, name, true );
TQPtrDict<TQWidget> *widgets = editor->formWindow()->widgets();
TQPtrDictIterator<TQWidget> it( *widgets );
TQStringList l;
@@ -3367,21 +3363,21 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
l.sort();
itm->setValue( l );
item = itm;
- return TRUE;
+ return true;
}
switch ( t ) {
case TQVariant::String:
- item = new PropertyTextItem( this, item, 0, name, TRUE,
- ::tqqt_cast<TQLabel*>(editor->widget()) ||
- ::tqqt_cast<TQTextView*>(editor->widget()) ||
- ::tqqt_cast<TQButton*>(editor->widget()) );
+ item = new PropertyTextItem( this, item, 0, name, true,
+ ::tqt_cast<TQLabel*>(editor->widget()) ||
+ ::tqt_cast<TQTextView*>(editor->widget()) ||
+ ::tqt_cast<TQButton*>(editor->widget()) );
break;
case TQVariant::CString:
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
- TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()),
- FALSE, TRUE );
+ editor->widget() == editor->formWindow()->mainContainer(),
+ false, true );
break;
case TQVariant::Bool:
item = new PropertyBoolItem( this, item, 0, name );
@@ -3391,13 +3387,13 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
break;
case TQVariant::Int:
if ( name == "accel" )
- item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE );
+ item = new PropertyTextItem( this, item, 0, name, false, false, false, true );
else if ( name == "layoutSpacing" || name == "layoutMargin" )
item = new PropertyLayoutItem( this, item, 0, name );
else if ( name == "resizeMode" )
- item = new PropertyListItem( this, item, 0, name, TRUE );
+ item = new PropertyListItem( this, item, 0, name, true );
else
- item = new PropertyIntItem( this, item, 0, name, TRUE );
+ item = new PropertyIntItem( this, item, 0, name, true );
break;
case TQVariant::Double:
item = new PropertyDoubleItem( this, item, 0, name );
@@ -3406,10 +3402,10 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyKeysequenceItem( this, item, 0, name );
break;
case TQVariant::UInt:
- item = new PropertyIntItem( this, item, 0, name, FALSE );
+ item = new PropertyIntItem( this, item, 0, name, false );
break;
case TQVariant::StringList:
- item = new PropertyListItem( this, item, 0, name, TRUE );
+ item = new PropertyListItem( this, item, 0, name, true );
break;
case TQVariant::Rect:
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect );
@@ -3421,7 +3417,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size );
break;
case TQVariant::Color:
- item = new PropertyColorItem( this, item, 0, name, TRUE );
+ item = new PropertyColorItem( this, item, 0, name, true );
break;
case TQVariant::Pixmap:
item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap );
@@ -3451,9 +3447,9 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyDateTimeItem( this, item, 0, name );
break;
default:
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r )
@@ -3493,7 +3489,7 @@ void PropertyList::valueChanged( PropertyItem *i )
i->value(), i->currentItem(), i->currentItemFromObject() );
cmd->execute();
- editor->formWindow()->commandHistory()->addCommand( cmd, TRUE );
+ editor->formWindow()->commandHistory()->addCommand( cmd, true );
}
void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
@@ -3507,7 +3503,7 @@ void PropertyList::layoutInitValue( PropertyItem *i, bool changed )
i->value(), i->currentItem(), i->currentItemFromObject() );
cmd->execute();
if ( i->value().toString() != "-1" )
- changed = TRUE;
+ changed = true;
i->setChanged( changed );
}
@@ -3538,7 +3534,7 @@ void PropertyList::toggleOpen( TQListViewItem *i )
bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
{
if ( !o || !e )
- return TRUE;
+ return true;
PropertyItem *i = (PropertyItem*)currentItem();
if ( e->type() == TQEvent::KeyPress )
@@ -3546,53 +3542,53 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
else if ( e->type() == TQEvent::MouseButtonPress )
theLastEvent = MouseEvent;
- if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) {
+ if ( o != this &&e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) &&
- ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) &&
+ ( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
- return TRUE;
- } else if ( ( !::tqqt_cast<TQLineEdit*>(o) ||
- ( ::tqqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
+ return true;
+ } else if ( ( !::tqt_cast<TQLineEdit*>(o) ||
+ ( ::tqt_cast<TQLineEdit*>(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) &&
i && i->hasSubItems() ) {
if ( !i->isOpen() &&
( ke->key() == Key_Plus ||
ke->key() == Key_Right ))
- i->setOpen( TRUE );
+ i->setOpen( true );
else if ( i->isOpen() &&
( ke->key() == Key_Minus ||
ke->key() == Key_Left ) )
- i->setOpen( FALSE );
- } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast<TQComboBox*>(o) ) {
+ i->setOpen( false );
+ } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqt_cast<TQComboBox*>(o) ) {
TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 );
TQApplication::sendEvent( o, &ke2 );
- return TRUE;
+ return true;
}
- } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
- TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) );
- } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) {
+ } else if ( e->type() == TQEvent::FocusOut && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
+ TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQ_SLOT( checkCompressedCommand() ) );
+ } else if ( o == viewport() ) {
TQMouseEvent *me;
PropertyListItem* i;
switch ( e->type() ) {
case TQEvent::MouseButtonPress:
me = (TQMouseEvent*)e;
i = (PropertyListItem*) itemAt( me->pos() );
- if ( i && ( ::tqqt_cast<PropertyColorItem*>(i) || ::tqqt_cast<PropertyPixmapItem*>(i) ) ) {
+ if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
pressPos = me->pos();
- mousePressed = TRUE;
+ mousePressed = true;
}
break;
case TQEvent::MouseMove:
me = (TQMouseEvent*)e;
- if ( me && me->state() & Qt::LeftButton && mousePressed) {
+ if ( me && me->state() & TQt::LeftButton && mousePressed) {
i = (PropertyListItem*) itemAt( me->pos() );
if ( i && i == pressItem ) {
if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){
- if ( ::tqqt_cast<PropertyColorItem*>(i) ) {
+ if ( ::tqt_cast<PropertyColorItem*>(i) ) {
TQColor col = i->value().asColor();
TQColorDrag *drg = new TQColorDrag( col, this );
TQPixmap pix( 25, 25 );
@@ -3601,16 +3597,16 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
TQPixmap pix = i->value().asPixmap();
if( !pix.isNull() ) {
TQImage img = pix.convertToImage();
TQImageDrag *drg = new TQImageDrag( img, this );
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
}
@@ -3621,19 +3617,19 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
- } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) {
+ } else if ( o == header() ) {
if ( e->type() == TQEvent::ContextMenu ) {
((TQContextMenuEvent *)e)->accept();
TQPopupMenu menu( 0 );
- menu.setCheckable( TRUE );
+ menu.setCheckable( true );
const int cat_id = 1;
const int alpha_id = 2;
menu.insertItem( i18n( "Sort &Categorized" ), cat_id );
int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id );
if ( showSorted )
- menu.setItemChecked( alpha_id, TRUE );
+ menu.setItemChecked( alpha_id, true );
else
- menu.setItemChecked( cat_id, TRUE );
+ menu.setItemChecked( cat_id, true );
int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() );
if ( res != -1 ) {
bool newShowSorted = ( res == alpha );
@@ -3643,7 +3639,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
editor->setup();
}
}
- return TRUE;
+ return true;
}
}
@@ -3665,12 +3661,12 @@ void PropertyList::refetchData()
bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() );
if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) {
if ( i->value().toString() != "-1" )
- i->setChanged( TRUE, FALSE );
+ i->setChanged( true, false );
else
- i->setChanged( FALSE, FALSE );
+ i->setChanged( false, false );
}
else if ( changed != i->isChanged() )
- i->setChanged( changed, FALSE );
+ i->setChanged( changed, false );
}
updateEditorSize();
}
@@ -3693,12 +3689,12 @@ void PropertyList::setPropertyValue( PropertyItem *i )
{
const TQMetaProperty *p =
editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE );
+ property( editor->widget()->metaObject()->findProperty( 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 );
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
align &= ~AlignVertical_Mask;
TQStrList l = p->valueToKeys( align );
clearAlignList( l );
@@ -3706,7 +3702,7 @@ void PropertyList::setPropertyValue( PropertyItem *i )
} else if ( i->name() == "vAlign" ) {
int align = editor->widget()->property( "alignment" ).toInt();
p = editor->widget()->metaObject()->
- property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE );
+ property( editor->widget()->metaObject()->findProperty( "alignment", true ), true );
align &= ~AlignHorizontal_Mask;
( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() );
} else if ( i->name() == "wordwrap" ) {
@@ -3716,11 +3712,11 @@ void PropertyList::setPropertyValue( PropertyItem *i )
else
i->setValue( TQVariant( false ) );
} else if ( i->name() == "layoutSpacing" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) ));
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ));
} else if ( i->name() == "layoutMargin" ) {
- ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) ));
+ ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( WidgetFactory::containerOfWidget( static_cast<TQWidget*>(editor->widget()) ) ));
} else if ( i->name() == "resizeMode" ) {
- ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) );
+ ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( static_cast<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" ) ) {
@@ -3775,9 +3771,9 @@ void PropertyList::resetProperty()
i->name(), i->value(),
WidgetFactory::defaultValue( editor->widget(), i->name() ),
WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ),
- i->currentItem(), TRUE );
+ i->currentItem(), true );
cmd->execute();
- editor->formWindow()->commandHistory()->addCommand( cmd, FALSE );
+ editor->formWindow()->commandHistory()->addCommand( cmd, false );
if ( i->hasSubItems() )
i->initChildren();
}
@@ -3790,9 +3786,9 @@ void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e )
return;
}
- if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3806,9 +3802,9 @@ void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e )
return;
}
- if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) )
e->accept();
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) )
e->accept();
else
e->ignore();
@@ -3822,14 +3818,14 @@ void PropertyList::viewportDropEvent ( TQDropEvent *e )
return;
}
- if ( ::tqqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
+ if ( ::tqt_cast<PropertyColorItem*>(i) && TQColorDrag::canDecode( e ) ) {
TQColor color;
TQColorDrag::decode( e, color );
i->setValue( TQVariant( color ) );
valueChanged( i );
e->accept();
}
- else if ( ::tqqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
+ else if ( ::tqt_cast<PropertyPixmapItem*>(i) && TQImageDrag::canDecode( e ) ) {
TQImage img;
TQImageDrag::decode( e, img );
TQPixmap pm;
@@ -3917,13 +3913,13 @@ PropertyList::LastEventType PropertyList::lastEvent()
// ------------------------------------------------------------
EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e )
- : HierarchyList( parent, fw, TRUE ), editor( e )
+ : HierarchyList( parent, fw, true ), editor( e )
{
header()->hide();
removeColumn( 1 );
- setRootIsDecorated( TRUE );
- connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
- this, TQT_SLOT( renamed( TQListViewItem * ) ) );
+ setRootIsDecorated( true );
+ connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
+ this, TQ_SLOT( renamed( TQListViewItem * ) ) );
}
TQString clean_arguments( const TQString &s )
@@ -3968,9 +3964,9 @@ void EventList::setup()
while ( it.current() ) {
HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0,
it.current(), TQString(), TQString() );
- eventItem->setOpen( TRUE );
+ eventItem->setOpen( true );
TQValueList<MetaDataBase::Connection> conns =
- MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) );
+ MetaDataBase::connections( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0;
for ( TQValueList<MetaDataBase::Connection>::Iterator cit = conns.begin();
cit != conns.end(); ++cit ) {
@@ -4046,7 +4042,7 @@ void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos )
} else if ( res == DEL_ITEM && i->parent() ) {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
- conn.receiver = TQT_TQOBJECT(formWindow->mainContainer());
+ conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 );
delete i;
@@ -4066,21 +4062,21 @@ void EventList::renamed( TQListViewItem *i )
if ( !i->parent() )
return;
TQListViewItem *itm = i->parent()->firstChild();
- bool del = FALSE;
+ bool del = false;
while ( itm ) {
if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) {
- del = TRUE;
+ del = true;
break;
}
itm = itm->nextSibling();
}
- i->setRenameEnabled( 0, FALSE );
+ i->setRenameEnabled( 0, false );
if ( del ) {
delete i;
} else {
MetaDataBase::Connection conn;
conn.sender = editor->widget();
- conn.receiver = TQT_TQOBJECT(formWindow->mainContainer());
+ conn.receiver = formWindow->mainContainer();
conn.signal = i->parent()->text( 0 );
conn.slot = i->text( 0 );
AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ),
@@ -4110,11 +4106,11 @@ void EventList::renamed( TQListViewItem *i )
/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public",
"slot", formWindow->project()->language(), "void" );
editor->formWindow()->mainWindow()->
- editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/
+ editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), true );*/
cmd->execute();
cmd2->execute();
editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
- editor->formWindow()->formFile()->setModified( TRUE );
+ editor->formWindow()->formFile()->setModified( true );
}
}
@@ -4164,13 +4160,13 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
if ( w && w == wid ) {
// if there is no properties displayed then we really should show them.
// to do this check the number of properties in the list.
- bool ret = (listview->childCount() > 0) ? TRUE : FALSE;
+ bool ret = listview->childCount() > 0;
if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) {
TQListViewItemIterator it( listview );
- ret = FALSE;
+ ret = false;
while ( it.current() ) {
if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) {
- ret = TRUE;
+ ret = true;
break;
}
++it;
@@ -4191,11 +4187,11 @@ void PropertyEditor::setWidget( TQObject *w, FormWindow *fw )
wid = w;
formwindow = fw;
setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) );
- listview->viewport()->setUpdatesEnabled( FALSE );
- listview->setUpdatesEnabled( FALSE );
+ listview->viewport()->setUpdatesEnabled( false );
+ listview->setUpdatesEnabled( false );
clear();
- listview->viewport()->setUpdatesEnabled( TRUE );
- listview->setUpdatesEnabled( TRUE );
+ listview->viewport()->setUpdatesEnabled( true );
+ listview->setUpdatesEnabled( true );
setup();
}
@@ -4211,15 +4207,15 @@ void PropertyEditor::setup()
{
if ( !formwindow || !wid )
return;
- listview->viewport()->setUpdatesEnabled( FALSE );
+ listview->viewport()->setUpdatesEnabled( false );
listview->setupProperties();
- listview->viewport()->setUpdatesEnabled( TRUE );
+ listview->viewport()->setUpdatesEnabled( true );
listview->updateEditorSize();
if ( !wid->isA( "PropertyObject" ) ) {
- eList->viewport()->setUpdatesEnabled( FALSE );
+ eList->viewport()->setUpdatesEnabled( false );
eList->setup();
- eList->viewport()->setUpdatesEnabled( TRUE );
+ eList->viewport()->setUpdatesEnabled( true );
}
}
@@ -4276,7 +4272,7 @@ TQString PropertyEditor::classOfCurrentProperty() const
TQString curr = currentProperty();
TQMetaObject *mo = o->metaObject();
while ( mo ) {
- TQStrList props = mo->propertyNames( FALSE );
+ TQStrList props = mo->propertyNames( false );
if ( props.find( curr.latin1() ) != -1 )
return mo->className();
mo = mo->superClass();
@@ -4324,9 +4320,9 @@ void PropertyEditor::updateWindow()
{
if ( isHidden() && count() ) {
parentWidget()->show();
- MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), true );
} else if ( isShown() && !count() ) {
parentWidget()->hide();
- MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE );
+ MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), false );
}
}
diff --git a/kdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h
index 7b7eccd8..8326fa8d 100644
--- a/kdevdesigner/designer/propertyeditor.h
+++ b/kdevdesigner/designer/propertyeditor.h
@@ -85,7 +85,7 @@ public:
TQString name() const;
virtual void notifyValueChange();
- virtual void setChanged( bool b, bool updateDb = TRUE );
+ virtual void setChanged( bool b, bool updateDb = true );
bool isChanged() const;
virtual void placeEditor( TQWidget *w );
@@ -138,12 +138,12 @@ private:
class PropertyTextItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop,
- const TQString &propName, bool comment, bool multiLine, bool ascii = FALSE, bool a = FALSE );
+ const TQString &propName, bool comment, bool multiLine, bool ascii = false, bool a = false );
~PropertyTextItem();
virtual void createChildren();
@@ -156,7 +156,7 @@ public:
virtual bool hasSubItems() const;
virtual void childValueChanged( PropertyItem *child );
- virtual void setChanged( bool b, bool updateDb = TRUE );
+ virtual void setChanged( bool b, bool updateDb = true );
private slots:
void setValue();
@@ -175,7 +175,7 @@ private:
class PropertyBoolItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -200,7 +200,7 @@ private:
class PropertyIntItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -226,7 +226,7 @@ private:
class PropertyLayoutItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -251,7 +251,7 @@ private:
class PropertyDoubleItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -275,7 +275,7 @@ private:
class PropertyListItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -311,7 +311,7 @@ private:
class PropertyFontItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -341,7 +341,7 @@ private:
class PropertyCoordItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -371,7 +371,7 @@ private:
class PropertyColorItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -406,7 +406,7 @@ private:
class PropertyPixmapItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -439,7 +439,7 @@ private:
class PropertySizePolicyItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -466,7 +466,7 @@ private:
class PropertyPaletteItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -495,7 +495,7 @@ private:
class PropertyCursorItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -520,7 +520,7 @@ private:
class PropertyKeysequenceItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -551,7 +551,7 @@ private:
class PropertyDatabaseItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -579,7 +579,7 @@ private:
struct EnumItem {
EnumItem( const TQString &k, bool s )
: key( k ), selected( s ) {}
- EnumItem() : key( TQString() ), selected( FALSE ) {}
+ EnumItem() : key( TQString() ), selected( false ) {}
bool operator==( const EnumItem &item ) const {
return key == item.key;
}
@@ -589,7 +589,7 @@ struct EnumItem {
class EnumPopup : public TQFrame
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -614,7 +614,7 @@ private:
class EnumBox : public TQComboBox
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -649,7 +649,7 @@ private:
class PropertyEnumItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -676,7 +676,7 @@ private:
class PropertyList : public TQListView
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -690,7 +690,7 @@ public:
virtual void setPropertyValue( PropertyItem *i );
virtual void setCurrentProperty( const TQString &n );
- void layoutInitValue( PropertyItem *i, bool changed = FALSE );
+ void layoutInitValue( PropertyItem *i, bool changed = false );
PropertyEditor *propertyEditor() const;
TQString whatsThisAt( const TQPoint &p );
void showCurrentWhatsThis();
@@ -739,7 +739,7 @@ private:
class EventList : public HierarchyList
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -767,7 +767,7 @@ private:
class PropertyEditor : public TQTabWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -819,7 +819,7 @@ private:
class PropertyDateItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -843,7 +843,7 @@ private:
class PropertyTimeItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -867,7 +867,7 @@ private:
class PropertyDateTimeItem : public TQObject,
public PropertyItem
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp
index 1bd1883f..c9ac7680 100644
--- a/kdevdesigner/designer/propertyobject.cpp
+++ b/kdevdesigner/designer/propertyobject.cpp
@@ -36,9 +36,9 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
{
TQPtrVector<TQPtrList<TQMetaObject> > v;
v.resize( objects.count() );
- v.setAutoDelete( TRUE );
+ v.setAutoDelete( true );
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) {
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
const TQMetaObject *m = o->metaObject();
TQPtrList<TQMetaObject> *mol = new TQPtrList<TQMetaObject>;
while ( m ) {
@@ -74,10 +74,10 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
bool PropertyObject::setProperty( const char *name, const TQVariant& value )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
o->setProperty( name, value );
- return TRUE;
+ return true;
}
TQVariant PropertyObject::property( const char *name ) const
@@ -87,44 +87,44 @@ TQVariant PropertyObject::property( const char *name ) const
void PropertyObject::mdPropertyChanged( const TQString &property, bool changed )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyChanged( o, property, changed );
}
bool PropertyObject::mdIsPropertyChanged( const TQString &property )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) {
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( MetaDataBase::isPropertyChanged( o, property ) )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void PropertyObject::mdSetPropertyComment( const TQString &property, const TQString &comment )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPropertyComment( o, property, comment );
}
TQString PropertyObject::mdPropertyComment( const TQString &property )
{
- return MetaDataBase::propertyComment( TQT_TQOBJECT(objects.first()), property );
+ return MetaDataBase::propertyComment( objects.first(), property );
}
void PropertyObject::mdSetFakeProperty( const TQString &property, const TQVariant &value )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setFakeProperty( o, property, value );
}
TQVariant PropertyObject::mdFakeProperty( const TQString &property )
{
- return MetaDataBase::fakeProperty( TQT_TQOBJECT(objects.first()), property );
+ return MetaDataBase::fakeProperty( objects.first(), property );
}
void PropertyObject::mdSetCursor( const TQCursor &c )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) ) {
+ for ( TQObject *o = objects.first(); o; o = objects.next() ) {
if ( o->isWidgetType() )
MetaDataBase::setCursor( (TQWidget*)o, c );
}
@@ -137,22 +137,22 @@ TQCursor PropertyObject::mdCursor()
void PropertyObject::mdSetPixmapKey( int pixmap, const TQString &arg )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setPixmapKey( o, pixmap, arg );
}
TQString PropertyObject::mdPixmapKey( int pixmap )
{
- return MetaDataBase::pixmapKey( TQT_TQOBJECT(objects.first()), pixmap );
+ return MetaDataBase::pixmapKey( objects.first(), pixmap );
}
void PropertyObject::mdSetExportMacro( const TQString &macro )
{
- for ( TQObject *o = TQT_TQOBJECT(objects.first()); o; o = TQT_TQOBJECT(objects.next()) )
+ for ( TQObject *o = objects.first(); o; o = objects.next() )
MetaDataBase::setExportMacro( o, macro );
}
TQString PropertyObject::mdExportMacro()
{
- return MetaDataBase::exportMacro( TQT_TQOBJECT(objects.first()) );
+ return MetaDataBase::exportMacro( objects.first() );
}
diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp
index ed0c986e..25ba5f47 100644
--- a/kdevdesigner/designer/qcompletionedit.cpp
+++ b/kdevdesigner/designer/qcompletionedit.cpp
@@ -31,7 +31,7 @@
#include <tqvbox.h>
QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
- : TQLineEdit( parent, name ), aAdd( FALSE ), caseSensitive( FALSE )
+ : TQLineEdit( parent, name ), aAdd( false ), caseSensitive( false )
{
popup = new TQVBox( 0, 0, WType_Popup );
popup->setFrameStyle( TQFrame::Box | TQFrame::Plain );
@@ -45,8 +45,8 @@ QCompletionEdit::QCompletionEdit( TQWidget *parent, const char *name )
listbox->setHScrollBarMode( TQScrollView::AlwaysOn );
listbox->setVScrollBarMode( TQScrollView::AlwaysOn );
listbox->setCornerWidget( new TQSizeGrip( listbox, "completion sizegrip" ) );
- connect( this, TQT_SIGNAL( textChanged( const TQString & ) ),
- this, TQT_SLOT( textDidChange( const TQString & ) ) );
+ connect( this, TQ_SIGNAL( textChanged( const TQString & ) ),
+ this, TQ_SLOT( textDidChange( const TQString & ) ) );
popup->setFocusProxy( listbox );
installEventFilter( this );
}
@@ -98,7 +98,7 @@ void QCompletionEdit::placeListBox()
popup->move( p.x(), p.y() - listbox->height() );
popup->show();
listbox->setCurrentItem( 0 );
- listbox->setSelected( 0, TRUE );
+ listbox->setSelected( 0, true );
setFocus();
}
@@ -116,27 +116,27 @@ void QCompletionEdit::updateListBox()
bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
{
- 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 ( o == popup || o == listbox || o == listbox->viewport() ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Enter || ke->key() == Key_Return || ke->key() == Key_Tab ) {
if ( ke->key() == Key_Tab && listbox->count() > 1 &&
listbox->currentItem() < (int)listbox->count() - 1 ) {
listbox->setCurrentItem( listbox->currentItem() + 1 );
- return TRUE;
+ return true;
}
popup->close();
setFocus();
- blockSignals( TRUE );
+ blockSignals( true );
setText( listbox->currentText() );
- blockSignals( FALSE );
+ blockSignals( false );
emit chosen( text() );
- return TRUE;
+ return true;
} else if ( ke->key() == Key_Left || ke->key() == Key_Right ||
ke->key() == Key_Up || ke->key() == Key_Down ||
ke->key() == Key_Home || ke->key() == Key_End ||
ke->key() == Key_Prior || ke->key() == Key_Next ) {
- return FALSE;
+ return false;
} else if ( ke->key() == Key_Escape ) {
popup->close();
setFocus();
@@ -148,18 +148,18 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
setFocus();
}
TQApplication::sendEvent( this, e );
- return TRUE;
+ return true;
}
} else if ( e->type() == TQEvent::MouseButtonDblClick ) {
popup->close();
setFocus();
- blockSignals( TRUE );
+ blockSignals( true );
setText( listbox->currentText() );
- blockSignals( FALSE );
+ blockSignals( false );
emit chosen( text() );
- return TRUE;
+ return true;
}
- } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(this) ) {
+ } else if ( o == this ) {
if ( e->type() == TQEvent::KeyPress ) {
TQKeyEvent *ke = (TQKeyEvent*)e;
if ( ke->key() == Key_Up ||
@@ -171,7 +171,7 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
ke->key() == Key_Tab ||
ke->key() == Key_Escape ) {
TQApplication::sendEvent( listbox, e );
- return TRUE;
+ return true;
}
}
}
diff --git a/kdevdesigner/designer/qcompletionedit.h b/kdevdesigner/designer/qcompletionedit.h
index 5c3f7fe1..c16644e8 100644
--- a/kdevdesigner/designer/qcompletionedit.h
+++ b/kdevdesigner/designer/qcompletionedit.h
@@ -35,7 +35,7 @@ class TQVBox;
class QCompletionEdit : public TQLineEdit
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( bool autoAdd READ autoAdd WRITE setAutoAdd )
TQ_PROPERTY( bool caseSensitive READ isCaseSensitive WRITE setCaseSensitive )
diff --git a/kdevdesigner/designer/replacedialog.ui b/kdevdesigner/designer/replacedialog.ui
index 27d01a58..e983e9d3 100644
--- a/kdevdesigner/designer/replacedialog.ui
+++ b/kdevdesigner/designer/replacedialog.ui
@@ -307,12 +307,12 @@
<variable>EditorInterface *editor;</variable>
<variable>TQObject *formWindow;</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>destroy()</slot>
<slot>doReplace()</slot>
<slot>doReplaceAll()</slot>
<slot>setEditor( EditorInterface * e, TQObject * fw )</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/replacedialog.ui.h b/kdevdesigner/designer/replacedialog.ui.h
index 63946525..bec17c38 100644
--- a/kdevdesigner/designer/replacedialog.ui.h
+++ b/kdevdesigner/designer/replacedialog.ui.h
@@ -45,10 +45,10 @@ void ReplaceDialog::doReplace()
return;
if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(),
- checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), FALSE ) )
- checkBegin->setChecked( TRUE );
+ checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), false ) )
+ checkBegin->setChecked( true );
else
- checkBegin->setChecked( FALSE );
+ checkBegin->setChecked( false );
}
void ReplaceDialog::doReplaceAll()
@@ -57,16 +57,16 @@ void ReplaceDialog::doReplaceAll()
return;
if ( !editor->replace( comboFind->currentText(), comboReplace->currentText(), checkCase->isChecked(),
- checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), TRUE ) )
- checkBegin->setChecked( TRUE );
+ checkWords->isChecked(), radioForward->isChecked(), !checkBegin->isChecked(), true ) )
+ checkBegin->setChecked( true );
else
- checkBegin->setChecked( FALSE );
+ checkBegin->setChecked( false );
}
void ReplaceDialog::setEditor( EditorInterface * e, TQObject * fw )
{
if ( fw != formWindow )
- checkBegin->setChecked( TRUE );
+ checkBegin->setChecked( true );
formWindow = fw;
if ( editor )
editor->release();
diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp
index f86490c4..b6a9e234 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -79,7 +79,7 @@
#include <tqworkspace.h>
#include <tqworkspace.h>
#include <tqsplitter.h>
-#include <tqucom_p.h>
+#include <private/tqucom_p.h>
#include <kiconloader.h>
#include <tdefiledialog.h>
@@ -94,7 +94,7 @@ static TQString makeIndent( int indent )
return s;
}
-static TQString entitize( const TQString &s, bool attribute = FALSE )
+static TQString entitize( const TQString &s, bool attribute = false )
{
TQString s2 = s;
s2 = s2.replace( "&", "&amp;" );
@@ -112,87 +112,87 @@ static struct {
int key;
const char* name;
} keyname[] = {
- { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) },
- { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) },
- { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) },
- { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) },
- { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) },
- { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) },
- { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) },
- { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) },
- { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) },
- { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) },
- { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) },
- { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) },
- { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
- { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) },
- { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) },
- { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) },
- { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) },
- { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) },
- { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) },
- { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) },
- { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) },
- { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) },
- { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) },
- { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) },
- { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) },
+ { TQt::Key_Space, TQT_TRANSLATE_NOOP( "TQAccel", "Space" ) },
+ { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Esc" ) },
+ { TQt::Key_Tab, TQT_TRANSLATE_NOOP( "TQAccel", "Tab" ) },
+ { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( "TQAccel", "Backtab" ) },
+ { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( "TQAccel", "Backspace" ) },
+ { TQt::Key_Return, TQT_TRANSLATE_NOOP( "TQAccel", "Return" ) },
+ { TQt::Key_Enter, TQT_TRANSLATE_NOOP( "TQAccel", "Enter" ) },
+ { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Ins" ) },
+ { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Del" ) },
+ { TQt::Key_Pause, TQT_TRANSLATE_NOOP( "TQAccel", "Pause" ) },
+ { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print" ) },
+ { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "SysReq" ) },
+ { TQt::Key_Home, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) },
+ { TQt::Key_End, TQT_TRANSLATE_NOOP( "TQAccel", "End" ) },
+ { TQt::Key_Left, TQT_TRANSLATE_NOOP( "TQAccel", "Left" ) },
+ { TQt::Key_Up, TQT_TRANSLATE_NOOP( "TQAccel", "Up" ) },
+ { TQt::Key_Right, TQT_TRANSLATE_NOOP( "TQAccel", "Right" ) },
+ { TQt::Key_Down, TQT_TRANSLATE_NOOP( "TQAccel", "Down" ) },
+ { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "PgUp" ) },
+ { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "PgDown" ) },
+ { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "CapsLock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "NumLock" ) },
+ { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "ScrollLock" ) },
+ { TQt::Key_Menu, TQT_TRANSLATE_NOOP( "TQAccel", "Menu" ) },
+ { TQt::Key_Help, TQT_TRANSLATE_NOOP( "TQAccel", "Help" ) },
// Multimedia keys
- { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) },
- { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) },
- { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) },
- { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) },
- { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) },
- { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) },
- { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) },
- { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) },
- { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) },
- { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) },
- { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) },
- { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) },
- { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) },
- { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) },
- { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) },
- { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) },
- { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) },
- { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) },
- { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) },
- { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) },
- { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) },
- { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) },
- { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) },
- { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) },
- { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) },
- { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) },
- { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) },
- { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) },
- { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) },
- { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) },
- { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) },
- { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) },
- { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) },
- { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) },
- { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) },
- { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) },
- { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) },
- { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) },
- { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) },
- { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) },
+ { TQt::Key_Back, TQT_TRANSLATE_NOOP( "TQAccel", "Back" ) },
+ { TQt::Key_Forward, TQT_TRANSLATE_NOOP( "TQAccel", "Forward" ) },
+ { TQt::Key_Stop, TQT_TRANSLATE_NOOP( "TQAccel", "Stop" ) },
+ { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( "TQAccel", "Refresh" ) },
+ { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Down" ) },
+ { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Mute" ) },
+ { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( "TQAccel", "Volume Up" ) },
+ { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Boost" ) },
+ { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Up" ) },
+ { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( "TQAccel", "Bass Down" ) },
+ { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Up" ) },
+ { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( "TQAccel", "Treble Down" ) },
+ { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( "TQAccel", "Media Play" ) },
+ { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( "TQAccel", "Media Stop" ) },
+ { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( "TQAccel", "Media Previous" ) },
+ { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( "TQAccel", "Media Next" ) },
+ { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( "TQAccel", "Media Record" ) },
+ { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( "TQAccel", "Home" ) },
+ { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( "TQAccel", "Favorites" ) },
+ { TQt::Key_Search, TQT_TRANSLATE_NOOP( "TQAccel", "Search" ) },
+ { TQt::Key_Standby, TQT_TRANSLATE_NOOP( "TQAccel", "Standby" ) },
+ { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( "TQAccel", "Open URL" ) },
+ { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Mail" ) },
+ { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( "TQAccel", "Launch Media" ) },
+ { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (0)" ) },
+ { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (1)" ) },
+ { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (2)" ) },
+ { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (3)" ) },
+ { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (4)" ) },
+ { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (5)" ) },
+ { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (6)" ) },
+ { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (7)" ) },
+ { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (8)" ) },
+ { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (9)" ) },
+ { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (A)" ) },
+ { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (B)" ) },
+ { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (C)" ) },
+ { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (D)" ) },
+ { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (E)" ) },
+ { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( "TQAccel", "Launch (F)" ) },
// --------------------------------------------------------------
// More consistent namings
- { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) },
- { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) },
- { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) },
- { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) },
- { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) },
- { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) },
- { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) },
- { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) },
- { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) },
- { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) },
- { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) },
+ { TQt::Key_Print, TQT_TRANSLATE_NOOP( "TQAccel", "Print Screen" ) },
+ { TQt::Key_Prior, TQT_TRANSLATE_NOOP( "TQAccel", "Page Up" ) },
+ { TQt::Key_Next, TQT_TRANSLATE_NOOP( "TQAccel", "Page Down" ) },
+ { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( "TQAccel", "Caps Lock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Num Lock" ) },
+ { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( "TQAccel", "Number Lock" ) },
+ { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( "TQAccel", "Scroll Lock" ) },
+ { TQt::Key_Insert, TQT_TRANSLATE_NOOP( "TQAccel", "Insert" ) },
+ { TQt::Key_Delete, TQT_TRANSLATE_NOOP( "TQAccel", "Delete" ) },
+ { TQt::Key_Escape, TQT_TRANSLATE_NOOP( "TQAccel", "Escape" ) },
+ { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( "TQAccel", "System Request" ) },
{ 0, 0 }
};
@@ -273,11 +273,11 @@ Resource::Resource()
mainwindow = 0;
formwindow = 0;
toplevel = 0;
- copying = FALSE;
- pasting = FALSE;
- hadGeometry = FALSE;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
langIface = 0;
- hasFunctions = FALSE;
+ hasFunctions = false;
}
Resource::Resource( MainWindow* mw )
@@ -285,11 +285,11 @@ Resource::Resource( MainWindow* mw )
{
formwindow = 0;
toplevel = 0;
- copying = FALSE;
- pasting = FALSE;
- hadGeometry = FALSE;
+ copying = false;
+ pasting = false;
+ hadGeometry = false;
langIface = 0;
- hasFunctions = FALSE;
+ hasFunctions = false;
}
Resource::~Resource()
@@ -312,14 +312,14 @@ TQWidget *Resource::widget() const
bool Resource::load( FormFile *ff, Project *defProject )
{
if ( !ff || ff->absFileName().isEmpty() )
- return FALSE;
+ return false;
currFileName = ff->absFileName();
- mainContainerSet = FALSE;
+ mainContainerSet = false;
TQFile f( ff->absFileName() );
f.open( IO_ReadOnly | IO_Translate );
- bool b = load( ff, TQT_TQIODEVICE(&f), defProject );
+ bool b = load( ff, &f, defProject );
f.close();
return b;
@@ -334,7 +334,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
TQString errMsg;
int errLine;
if ( !doc.setContent( dev, &errMsg, &errLine ) ) {
- return FALSE;
+ return false;
}
DomTool::fixDocument( doc );
@@ -347,7 +347,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setProject( MainWindow::self->currProject() );
if ( mainwindow )
formwindow->setMainWindow( mainwindow );
- MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::addEntry( formwindow );
if ( !langIface ) {
TQString lang = "TQt Script";
@@ -429,7 +429,20 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
inc.implDecl = "in implementation";
inc.header = e.firstChild().toText().data();
if ( inc.header.right( 5 ) != ".ui.h" ) {
- metaIncludes.append( inc );
+ bool found = false;
+ TQValueList<MetaDataBase::Include>::Iterator it;
+ for ( it = metaIncludes.begin(); it != metaIncludes.end(); ++it ) {
+ MetaDataBase::Include currInc = *it;
+ if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl &&
+ currInc.header == inc.header) {
+ found = true;
+ break;
+ }
+ }
+ if ( !found )
+ {
+ metaIncludes.append( inc );
+ }
} else {
if ( formwindow->formFile() )
formwindow->formFile()->setCodeFileState( FormFile::Ok );
@@ -449,14 +462,14 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
metaInfo.className = e.firstChild().toText().data();
} else if ( e.tagName() == "pixmapfunction" ) {
if ( formwindow ) {
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( FALSE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( false );
formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() );
}
} else if ( e.tagName() == "pixmapinproject" ) {
if ( formwindow ) {
- formwindow->setSavePixmapInline( FALSE );
- formwindow->setSavePixmapInProject( TRUE );
+ formwindow->setSavePixmapInline( false );
+ formwindow->setSavePixmapInProject( true );
}
} else if ( e.tagName() == "exportmacro" ) {
exportMacro = e.firstChild().toText().data();
@@ -467,7 +480,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->setSpacingFunction( e.attribute( "spacing" ) );
formwindow->setMarginFunction( e.attribute( "margin" ) );
if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() )
- formwindow->hasLayoutFunctions( TRUE );
+ formwindow->hasLayoutFunctions( true );
}
e = e.nextSibling().toElement();
@@ -478,17 +491,8 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( !customWidgets.isNull() )
loadCustomWidgets( customWidgets, this );
-#if defined (TQT_NON_COMMERCIAL)
- bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE;
- TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self );
- if ( !w )
- return FALSE;
- if ( previewMode )
- w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE );
-#else
if ( !createObject( widget, formwindow) )
- return FALSE;
-#endif
+ return false;
if ( !forwards.isNull() ) {
for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
@@ -509,7 +513,20 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
inc.implDecl = "in implementation";
inc.header = n.firstChild().toText().data();
if ( inc.header.right( 5 ) != ".ui.h" ) {
- metaIncludes.append( inc );
+ bool found = false;
+ TQValueList<MetaDataBase::Include>::Iterator it;
+ for ( it = metaIncludes.begin(); it != metaIncludes.end(); ++it ) {
+ MetaDataBase::Include currInc = *it;
+ if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl &&
+ currInc.header == inc.header) {
+ found = true;
+ break;
+ }
+ }
+ if ( !found )
+ {
+ metaIncludes.append( inc );
+ }
} else {
if ( formwindow->formFile() )
formwindow->formFile()->setCodeFileState( FormFile::Ok );
@@ -552,11 +569,11 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void";
function.type = "slot";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier,
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
+ MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, "slot", function.language, function.returnType );
else
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function,
+ MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
function.specifier, function.access,
"slot", function.language,
function.returnType );
@@ -580,12 +597,12 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
if ( function.returnType.isEmpty() )
function.returnType = "void";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier,
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
+ MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, function.type, function.language,
function.returnType );
else
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function,
+ MetaDataBase::changeFunctionAttributes( formwindow, function.function, function.function,
function.specifier, function.access,
function.type, function.language, function.returnType );
}
@@ -606,13 +623,13 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadTabOrder( tabOrder );
if ( formwindow ) {
- MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes );
- MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards );
- MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables );
- MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals );
+ MetaDataBase::setIncludes( formwindow, metaIncludes );
+ MetaDataBase::setForwards( formwindow, metaForwards );
+ MetaDataBase::setVariables( formwindow, metaVariables );
+ MetaDataBase::setSignalList( formwindow, metaSignals );
metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() );
- MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo );
- MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro );
+ MetaDataBase::setMetaInfo( formwindow, metaInfo );
+ MetaDataBase::setExportMacro( formwindow->mainContainer(), exportMacro );
}
loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions );
@@ -621,7 +638,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
mainwindow->insertFormWindow( formwindow );
if ( formwindow ) {
- formwindow->killAccels( TQT_TQOBJECT(formwindow) );
+ formwindow->killAccels( formwindow );
if ( formwindow->layout() )
formwindow->layout()->activate();
if ( hadGeometry )
@@ -631,7 +648,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) );
}
- return TRUE;
+ return true;
}
static bool saveCode( const TQString &filename, const TQString &code )
@@ -640,15 +657,15 @@ static bool saveCode( const TQString &filename, const TQString &code )
if ( f.open(IO_WriteOnly | IO_Translate) ) {
TQTextStream ts( &f );
ts << code;
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
bool Resource::save( const TQString& filename, bool formCodeOnly )
{
if ( !formwindow || filename.isEmpty() )
- return FALSE;
+ return false;
if (!langIface) {
TQString lang = "TQt Script";
if ( mainwindow )
@@ -659,8 +676,8 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
}
if ( formCodeOnly && langIface ) {
if ( saveFormCode(formwindow->formFile(), langIface) )
- return TRUE;
- bool breakout = FALSE;
+ return true;
+ bool breakout = false;
FormFile *ff = formwindow->formFile();
TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() );
TQString filter = langIface->fileFilterList().join("\n");
@@ -669,7 +686,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
breakout = fn.isEmpty();
if ( !breakout ) {
if ( saveCode(fn, ff->code()) )
- return TRUE;
+ return true;
}
}
}
@@ -677,8 +694,8 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
- return FALSE;
- bool b = save( TQT_TQIODEVICE(&f) );
+ return false;
+ bool b = save( &f );
f.close();
return b;
}
@@ -686,7 +703,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
bool Resource::save( TQIODevice* dev )
{
if ( !formwindow )
- return FALSE;
+ return false;
if ( !langIface ) {
TQString lang = "C++";
@@ -702,23 +719,22 @@ bool Resource::save( TQIODevice* dev )
ts << "<!DOCTYPE UI><UI version=\"3.3\" stdsetdef=\"1\">" << endl;
saveMetaInfoBefore( ts, 0 );
- saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 );
- if ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
+ saveObject( formwindow->mainContainer(), 0, ts, 0 );
+ if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) ) {
saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
- if ( ::tqqt_cast<TQMainWindow*>(formwindow->mainContainer()) )
+ if ( ::tqt_cast<TQMainWindow*>(formwindow->mainContainer()) )
saveActions( formwindow->actionList(), ts, 0 );
if ( !images.isEmpty() )
saveImageCollection( ts, 0 );
- if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() ||
- !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() )
+ if ( !MetaDataBase::connections( formwindow ).isEmpty() ||
+ !MetaDataBase::slotList( formwindow ).isEmpty() )
saveConnections( ts, 0 );
saveTabOrder( ts, 0 );
saveMetaInfoAfter( ts, 0 );
- saveIncludeHints( ts, 0 );
ts << "</UI>" << endl;
bool ok = saveFormCode( formwindow->formFile(), langIface );
images.clear();
@@ -731,7 +747,7 @@ TQString Resource::copy()
if ( !formwindow )
return TQString();
- copying = TRUE;
+ copying = true;
TQString s;
TQTextOStream ts( &s );
@@ -740,16 +756,16 @@ TQString Resource::copy()
TQWidgetList tmp( widgets );
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
TQWidget *p = w->parentWidget();
- bool save = TRUE;
+ bool save = true;
while ( p ) {
if ( tmp.findRef( p ) != -1 ) {
- save = FALSE;
+ save = false;
break;
}
p = p->parentWidget();
}
if ( save )
- saveObject( TQT_TQOBJECT(w), 0, ts, 0 );
+ saveObject( w, 0, ts, 0 );
}
if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() )
saveCustomWidgets( ts, 0 );
@@ -765,9 +781,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
{
if ( !formwindow )
return;
- mainContainerSet = TRUE;
+ mainContainerSet = true;
- pasting = TRUE;
+ pasting = true;
TQDomDocument doc;
TQString errMsg;
int errLine;
@@ -790,9 +806,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
loadCustomWidgets( customWidgets, this );
TQWidgetList widgets;
- formwindow->clearSelection( FALSE );
- formwindow->setPropertyShowingBlocked( TRUE );
- formwindow->clearSelection( FALSE );
+ formwindow->clearSelection( false );
+ formwindow->setPropertyShowingBlocked( true );
+ formwindow->clearSelection( false );
while ( !firstWidget.isNull() ) {
if ( firstWidget.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 );
@@ -807,9 +823,9 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
y = TQMAX( 0, parent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( TQT_TQOBJECT(w) );
+ formwindow->selectWidget( w );
} else if ( firstWidget.tagName() == "spacer" ) {
- TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal );
+ TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? TQt::Vertical : TQt::Horizontal );
if ( !w )
continue;
widgets.append( w );
@@ -821,11 +837,11 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
y = TQMAX( 0, parent->height() - w->height() );
if ( x != w->x() || y != w->y() )
w->move( x, y );
- formwindow->selectWidget( TQT_TQOBJECT(w) );
+ formwindow->selectWidget( w );
}
firstWidget = firstWidget.nextSibling().toElement();
}
- formwindow->setPropertyShowingBlocked( FALSE );
+ formwindow->setPropertyShowingBlocked( false );
formwindow->emitShowProperties();
PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets );
@@ -843,10 +859,29 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
if ( obj->isWidgetType() ) {
if ( obj->isA("CustomWidget") || isPlugin ) {
usedCustomWidgets << TQString( className );
- includeHints << WidgetDatabase::includeFile( classID );
+ MetaDataBase::Include inc;
+ inc.location = "global";
+ inc.implDecl = "in implementation";
+ inc.header = WidgetDatabase::includeFile( classID );
+ bool found = false;
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
+ TQValueList<MetaDataBase::Include>::Iterator it;
+ for ( it = includes.begin(); it != includes.end(); ++it ) {
+ MetaDataBase::Include currInc = *it;
+ if ( currInc.location == inc.location && currInc.implDecl == inc.implDecl &&
+ currInc.header == inc.header) {
+ found = true;
+ break;
+ }
+ }
+ if ( !found )
+ {
+ includes << inc;
+ }
+ MetaDataBase::setIncludes( formwindow, includes );
}
- if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) )
+ if ( obj != formwindow && !formwindow->widgets()->find( (TQWidget*)obj ) )
return; // we don't know anything about this thing
TQString attributes;
@@ -879,9 +914,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
QDesignerWidgetStack* ws = 0;
- if ( ::tqqt_cast<TQTabWidget*>(obj) ) {
+ if ( ::tqt_cast<TQTabWidget*>(obj) ) {
TQTabWidget* tw = (TQTabWidget*) obj;
- TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING );
+ TQObjectList* tmpl = tw->queryList( "TQWidgetStack" );
TQWidgetStack *ws = (TQWidgetStack*)tmpl->first();
TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar();
for ( int i = 0; i < tb->count(); ++i ) {
@@ -891,7 +926,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
TQWidget *w = ws->widget( t->identifier() );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 )
+ if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(w) ) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
@@ -906,17 +941,17 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<string>" << entitize( t->text() ) << "</string>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
+ saveChildrenOf( w, ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
delete tmpl;
- } else if ( (ws = ::tqqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
+ } else if ( (ws = ::tqt_cast<QDesignerWidgetStack*>(obj)) != 0 ) {
for ( int i = 0; i < ws->count(); ++i ) {
TQWidget *w = ws->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
@@ -930,17 +965,17 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "<number>" << TQString::number(i) << "</number>" << endl;
indent--;
ts << makeIndent( indent ) << "</attribute>" << endl;
- saveChildrenOf( TQT_TQOBJECT(w), ts, indent );
+ saveChildrenOf( w, ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::tqqt_cast<TQToolBox*>(obj) ) {
+ } else if ( ::tqt_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(TQT_TQOBJECT(w))) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
@@ -951,7 +986,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<property name=\"backgroundMode\">" << endl;
indent++;
- saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent );
+ saveEnumProperty( w, "backgroundMode", TQVariant::Invalid, ts, indent );
indent--;
ts << makeIndent( indent ) << "</property>" << endl;
ts << makeIndent( indent ) << "<attribute name=\"label\">" << endl;
@@ -959,17 +994,17 @@ 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( TQT_TQOBJECT(w), ts, indent );
+ saveChildrenOf( w, ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::tqqt_cast<TQWizard*>(obj) ) {
+ } else if ( ::tqt_cast<TQWizard*>(obj) ) {
TQWizard* wiz = (TQWizard*)obj;
for ( int i = 0; i < wiz->pageCount(); ++i ) {
TQWidget *w = wiz->page( i );
if ( !w )
continue;
- if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 )
+ if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(w)) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\"TQWidget\">" << endl;
++indent;
@@ -984,14 +1019,14 @@ 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( TQT_TQOBJECT(w), ts, indent );
+ saveChildrenOf( w, ts, indent );
--indent;
ts << makeIndent( indent ) << "</widget>" << endl;
}
- } else if ( ::tqqt_cast<TQMainWindow*>(obj) ) {
- saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent );
+ } else if ( ::tqt_cast<TQMainWindow*>(obj) ) {
+ saveChildrenOf( ( (TQMainWindow*)obj )->centralWidget(), ts, indent );
} else {
- bool saved = FALSE;
+ bool saved = false;
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( isPlugin ) {
WidgetInterface *iface = 0;
@@ -1003,14 +1038,14 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
if ( iface2->supportsPages( className ) ) {
TQWidgetList containers = iface2->pages( className, (TQWidget*)obj );
if ( !containers.isEmpty() ) {
- saved = TRUE;
+ saved = true;
int i = 0;
for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) {
if ( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 )
+ idFromClassName( WidgetFactory::classNameOf( w ) ) == -1 )
continue; // we don't know this widget
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( TQT_TQOBJECT(w) )
+ << WidgetFactory::classNameOf( w )
<< "\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@@ -1032,11 +1067,11 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
} else {
- saved = TRUE;
+ saved = true;
TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj );
if ( obj != w ) {
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( TQT_TQOBJECT(w) )
+ << WidgetFactory::classNameOf( w )
<< "\">" << endl;
++indent;
ts << makeIndent( indent ) << "<property name=\"name\">" << endl;
@@ -1054,14 +1089,14 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget;
cw->className = className;
cw->includeFile = WidgetDatabase::includeFile( classID );
- TQStrList lst = w->metaObject()->signalNames( TRUE );
+ TQStrList lst = w->metaObject()->signalNames( true );
for ( TQPtrListIterator<char> it(lst); it.current(); ++it )
cw->lstSignals.append(it.current());
int i;
- int total = w->metaObject()->numProperties( TRUE );
+ int total = w->metaObject()->numProperties( true );
for ( i = 0; i < total; i++ ) {
- const TQMetaProperty *p = w->metaObject()->property( i, TRUE );
+ const TQMetaProperty *p = w->metaObject()->property( i, true );
if ( p->designable(w) ) {
MetaDataBase::Property prop;
prop.property = p->name();
@@ -1079,9 +1114,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
}
}
- total = w->metaObject()->numSlots( TRUE );
+ total = w->metaObject()->numSlots( true );
for ( i = 0; i < total; i++ ) {
- const TQMetaData *md = w->metaObject()->slot( i, TRUE );
+ const TQMetaData *md = w->metaObject()->slot( i, true );
MetaDataBase::Function funky;
// Find out if we have a return type.
if ( md->method->count > 0 ) {
@@ -1123,9 +1158,9 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
{
- if ( ::tqqt_cast<TQListBox*>(obj) || ::tqqt_cast<TQComboBox*>(obj) ) {
+ if ( ::tqt_cast<TQListBox*>(obj) || ::tqt_cast<TQComboBox*>(obj) ) {
TQListBox *lb = 0;
- if ( ::tqqt_cast<TQListBox*>(obj) )
+ if ( ::tqt_cast<TQListBox*>(obj) )
lb = (TQListBox*)obj;
else
lb = ( (TQComboBox*)obj )->listBox();
@@ -1143,7 +1178,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::tqqt_cast<TQIconView*>(obj) ) {
+ } else if ( ::tqt_cast<TQIconView*>(obj) ) {
TQIconView *iv = (TQIconView*)obj;
TQIconViewItem *i = iv->firstItem();
@@ -1159,7 +1194,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</item>" << endl;
}
- } else if ( ::tqqt_cast<TQListView*>(obj) ) {
+ } else if ( ::tqt_cast<TQListView*>(obj) ) {
TQListView *lv = (TQListView*)obj;
int i;
for ( i = 0; i < lv->header()->count(); ++i ) {
@@ -1168,7 +1203,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << lv->header()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( lv->header()->iconSet( i ) )
pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1185,15 +1220,18 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</column>" << endl;
}
- saveItem( lv->firstChild(), ts, indent - 1 );
+ if (lv->firstChild())
+ {
+ saveItem( lv->firstChild(), ts, indent - 1 );
+ }
}
#if !defined (TQT_NO_TABLE)
- else if ( ::tqqt_cast<TQTable*>(obj) ) {
+ else if ( ::tqt_cast<TQTable*>(obj) ) {
TQTable *table = (TQTable*)obj;
int i;
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( table );
# ifndef TQT_NO_SQL
- bool isDataTable = ::tqqt_cast<TQDataTable*>(table);
+ bool isDataTable = ::tqt_cast<TQDataTable*>(table);
# else
bool isDataTable = false;
# endif
@@ -1207,7 +1245,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->horizontalHeader()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( table->horizontalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1231,7 +1269,7 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
TQStringList l;
l << table->verticalHeader()->label( i );
TQPtrList<TQPixmap> pix;
- pix.setAutoDelete( TRUE );
+ pix.setAutoDelete( true );
if ( table->verticalHeader()->iconSet( i ) )
pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) );
saveItem( l, pix, ts, indent );
@@ -1245,6 +1283,10 @@ void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent )
void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent )
{
+ if (!i)
+ {
+ return;
+ }
TQListView *lv = i->listView();
while ( i ) {
ts << makeIndent( indent ) << "<item>" << endl;
@@ -1277,10 +1319,10 @@ void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, cons
if ( formwindow && formwindow->savePixmapInline() )
ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "</" << tagname << ">" << endl;
else if ( formwindow && formwindow->savePixmapInProject() )
- ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() )
+ ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( formwindow, p.serialNumber() )
<< "</" << tagname << ">" << endl;
else
- ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() )
+ ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( formwindow, p.serialNumber() )
<< "</" << tagname << ">" << endl;
}
@@ -1292,7 +1334,7 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
TQImage img = loadFromCollection( arg );
TQPixmap pix;
pix.convertFromImage( img );
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
} else if ( formwindow && formwindow->savePixmapInProject() ) {
TQPixmap pix;
@@ -1304,13 +1346,13 @@ TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*
pix.convertFromImage( pix.convertToImage() );
}
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
+ MetaDataBase::setPixmapKey( formwindow, pix.serialNumber(), arg );
return pix;
}
TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() );
// we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that
pix.convertFromImage( pix.convertToImage() );
- MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg );
+ MetaDataBase::setPixmapArgument( formwindow, pix.serialNumber(), arg );
return pix;
}
@@ -1350,7 +1392,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
// 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 ( !::tqqt_cast<TQSplitter*>(obj) &&
+ if ( !::tqt_cast<TQSplitter*>(obj) &&
WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) &&
obj->isWidgetType() &&
WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) {
@@ -1378,7 +1420,7 @@ void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent )
// save properties of layout
if ( lay != WidgetFactory::NoLayout )
- saveObjectProperties( TQT_TQOBJECT(layout), ts, indent );
+ saveObjectProperties( layout, ts, indent );
}
@@ -1398,28 +1440,28 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
TQStringList changed;
changed = MetaDataBase::changedProperties( w );
if ( w->isWidgetType() ) {
- if ( ::tqqt_cast<Spacer*>(w) ) {
+ if ( ::tqt_cast<Spacer*>(w) ) {
if ( !changed.contains( "sizeHint" ) )
changed << "sizeHint";
if ( !changed.contains( "geometry" ) )
changed << "geometry";
} else {
- TQToolButton *tb = ::tqqt_cast<TQToolButton*>(w);
+ TQToolButton *tb = ::tqt_cast<TQToolButton*>(w);
if ( tb && !tb->iconSet().isNull() ) {
changed << "iconSet";
}
}
- } else if ( ::tqqt_cast<TQLayout*>(w) ) {
- if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
+ } else if ( ::tqt_cast<TQLayout*>(w) ) {
+ if ( MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 )
changed << "spacing";
- if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 )
+ if ( MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) > -1 )
changed << "margin";
- if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto"
- && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() )
+ if ( MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) != "Auto"
+ && !MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ).isEmpty() )
changed << "resizeMode";
}
- if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ if ( w == formwindow->mainContainer() ) {
if ( changed.findIndex( "geometry" ) == -1 )
changed << "geometry";
if ( changed.findIndex( "caption" ) == -1 )
@@ -1429,10 +1471,10 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
if ( changed.isEmpty() )
return;
- bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
+ bool inLayout = w != formwindow->mainContainer() && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() &&
WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout;
- TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast<Spacer*>(w) );
+ TQStrList lst = w->metaObject()->propertyNames( !::tqt_cast<Spacer*>(w) );
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() )
continue;
@@ -1440,13 +1482,13 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
continue;
saved << TQString::fromLatin1( it.current() );
const TQMetaProperty* p = w->metaObject()->
- property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE );
+ property( w->metaObject()->findProperty( it.current(), true ), true );
if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) )
continue;
- if ( ::tqqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
+ if ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) )
continue;
- if ( ::tqqt_cast<MenuBarEditor*>(w) &&
+ if ( ::tqt_cast<MenuBarEditor*>(w) &&
( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 ||
qstrcmp( p->name(), "itemText" ) == 0 ) )
continue;
@@ -1460,7 +1502,7 @@ void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent )
ts << " stdset=\"0\"";
ts << ">" << endl;
indent++;
- if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast<TQLayout*>(w) ) {
+ if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqt_cast<TQLayout*>(w) ) {
saveProperty( w, it.current(), "", TQVariant::String, ts, indent );
} else if ( p->isSetType() ) {
saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent );
@@ -1496,7 +1538,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->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
TQStrList l( p->valueToKeys( w->property( name ).toInt() ) );
TQString v;
for ( uint i = 0; i < l.count(); ++i ) {
@@ -1509,7 +1551,7 @@ 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->metaObject()->property( w->metaObject()->findProperty( name, true ), true );
ts << makeIndent( indent ) << "<enum>" << p->valueToKey( w->property( name ).toInt() ) << "</enum>" << endl;
}
@@ -1527,7 +1569,7 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
switch ( t ) {
case TQVariant::String:
if ( name == "resizeMode" ) {
- TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
+ TQString resmod = MetaDataBase::resizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
if ( !resmod.isNull() && resmod != "Auto" ) {
ts << makeIndent( indent ) << "<enum>";
ts << resmod;
@@ -1547,12 +1589,12 @@ void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant
ts << makeIndent( indent ) << "<bool>" << mkBool( value.toBool() ) << "</bool>" << endl;
break;
case TQVariant::Int:
- if ( ::tqqt_cast<TQLayout*>(w) ) {
+ if ( ::tqt_cast<TQLayout*>(w) ) {
num = -1;
if ( name == "spacing" )
- num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
+ num = MetaDataBase::spacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
else if ( name == "margin" )
- num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) );
+ num = MetaDataBase::margin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) );
if ( num != -1 )
ts << makeIndent( indent ) << "<number>" << TQString::number( num ) << "</number>" << endl;
} else {
@@ -1772,7 +1814,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( colspan < 1 )
colspan = 1;
- TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING );
+ TQString className = e.attribute( "class", "TQWidget" );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
TQString parentClassName = WidgetFactory::classNameOf( parent );
bool isPlugin =
@@ -1782,7 +1824,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
// ### TODO loading for custom container widgets without pages
#endif
if ( !className.isNull() ) {
- obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE ));
+ obj = WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, false );
if ( !obj ) {
TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ),
i18n( "Error loading %1.\n"
@@ -1793,10 +1835,10 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( !mainContainerSet ) {
if ( formwindow )
formwindow->setMainContainer( (TQWidget*)obj );
- mainContainerSet = TRUE;
+ mainContainerSet = true;
}
w = (TQWidget*)obj;
- if ( ::tqqt_cast<TQMainWindow*>(w) )
+ if ( ::tqt_cast<TQMainWindow*>(w) )
w = ( (TQMainWindow*)w )->centralWidget();
if ( layout ) {
switch ( WidgetFactory::layoutType( layout ) ) {
@@ -1821,25 +1863,25 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( w && formwindow ) {
if ( !parent ||
- ( !::tqqt_cast<TQTabWidget*>(parent) &&
- !::tqqt_cast<TQWidgetStack*>(parent) &&
- !::tqqt_cast<TQToolBox*>(parent) &&
- !::tqqt_cast<TQWizard*>(parent)
+ ( !::tqt_cast<TQTabWidget*>(parent) &&
+ !::tqt_cast<TQWidgetStack*>(parent) &&
+ !::tqt_cast<TQToolBox*>(parent) &&
+ !::tqt_cast<TQWizard*>(parent)
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
&& !isPlugin
#endif
) )
formwindow->insertWidget( w, pasting );
else if ( parent &&
- ( ::tqqt_cast<TQTabWidget*>(parent) ||
- ::tqqt_cast<TQWidgetStack*>(parent) ||
- ::tqqt_cast<TQToolBox*>(parent) ||
- ::tqqt_cast<TQWizard*>(parent)
+ ( ::tqt_cast<TQTabWidget*>(parent) ||
+ ::tqt_cast<TQWidgetStack*>(parent) ||
+ ::tqt_cast<TQToolBox*>(parent) ||
+ ::tqt_cast<TQWizard*>(parent)
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
|| isPlugin
#endif
) )
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( w );
}
}
@@ -1848,22 +1890,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, layout, TQt::Horizontal );
} else if ( n.tagName() == "widget" ) {
createObject( n, w, layout );
} else if ( n.tagName() == "hbox" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "grid" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "vbox" ) {
layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox );
- obj = TQT_TQOBJECT(layout);
+ obj = layout;
n = n.firstChild().toElement();
continue;
} else if ( n.tagName() == "property" && obj ) {
@@ -1877,16 +1919,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 ( ::tqqt_cast<TQTabWidget*>(parent) ) {
+ if ( ::tqt_cast<TQTabWidget*>(parent) ) {
if ( attrib == "title" )
( (TQTabWidget*)parent )->insertTab( w, v.toString() );
- } else if ( ::tqqt_cast<TQWidgetStack*>(parent) ) {
+ } else if ( ::tqt_cast<TQWidgetStack*>(parent) ) {
if ( attrib == "id" )
( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() );
- } else if ( ::tqqt_cast<TQToolBox*>(parent) ) {
+ } else if ( ::tqt_cast<TQToolBox*>(parent) ) {
if ( attrib == "label" )
( (TQToolBox*)parent )->addItem( w, v.toString() );
- } else if ( ::tqqt_cast<TQWizard*>(parent) ) {
+ } else if ( ::tqt_cast<TQWizard*>(parent) ) {
if ( attrib == "title" )
( (TQWizard*)parent )->addPage( w, v.toString() );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
@@ -1926,7 +1968,7 @@ TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLay
if ( w->isWidgetType() )
widgets.insert( w->name(), w );
- return TQT_TQOBJECT(w);
+ return w;
}
void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
@@ -1934,13 +1976,13 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
if ( !widget )
return;
- if ( ::tqqt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
+ if ( ::tqt_cast<TQListView*>(widget) && e.tagName() == "column" ) {
TQListView *lv = (TQListView*)widget;
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
- bool clickable = TRUE, resizable = TRUE;
+ bool clickable = true, resizable = true;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -1968,7 +2010,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
lv->header()->setResizeEnabled( resizable, i );
}
#ifndef TQT_NO_TABLE
- else if ( ::tqqt_cast<TQTable*>(widget) ) {
+ else if ( ::tqt_cast<TQTable*>(widget) ) {
TQTable *table = (TQTable*)widget;
bool isRow;
if ( ( isRow = e.tagName() == "row" ) )
@@ -1978,10 +2020,10 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
TQString field;
- TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) );
+ TQMap<TQString, TQString> fieldMap = MetaDataBase::columnFields( table );
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2006,7 +2048,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
h->setLabel( i, txt );
if ( !isRow && !field.isEmpty() )
fieldMap.insert( txt, field );
- MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap );
+ MetaDataBase::setColumnFields( table, fieldMap );
}
#endif
}
@@ -2014,7 +2056,7 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap )
{
TQDomElement n = e;
- hasPixmap = FALSE;
+ hasPixmap = false;
while ( !n.isNull() ) {
if ( n.tagName() == "property" ) {
TQString attrib = n.attribute( "name" );
@@ -2032,17 +2074,17 @@ 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( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) )
+ if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ), widget ) )
return;
- if ( ::tqqt_cast<TQListBox*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ) {
+ if ( ::tqt_cast<TQListBox*>(widget) || ::tqt_cast<TQComboBox*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQListBox *lb = 0;
- if ( ::tqqt_cast<TQListBox*>(widget) )
+ if ( ::tqt_cast<TQListBox*>(widget) )
lb = (TQListBox*)widget;
else
lb = ( (TQComboBox*)widget)->listBox();
@@ -2051,10 +2093,10 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} else {
new TQListBoxText( lb, txt );
}
- } else if ( ::tqqt_cast<TQIconView*>(widget) ) {
+ } else if ( ::tqt_cast<TQIconView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
- bool hasPixmap = FALSE;
+ bool hasPixmap = false;
TQString txt;
loadItem( n, pix, txt, hasPixmap );
TQIconView *iv = (TQIconView*)widget;
@@ -2062,7 +2104,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
new TQIconViewItem( iv, txt, pix );
else
new TQIconViewItem( iv, txt );
- } else if ( ::tqqt_cast<TQListView*>(widget) ) {
+ } else if ( ::tqt_cast<TQListView*>(widget) ) {
TQDomElement n = e.firstChild().toElement();
TQPixmap pix;
TQValueList<TQPixmap> pixmaps;
@@ -2089,7 +2131,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
}
}
} else if ( n.tagName() == "item" ) {
- item->setOpen( TRUE );
+ item->setOpen( true );
createItem( n, widget, item );
}
@@ -2104,7 +2146,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 *parent, TQLayout *layout, TQt::Orientation o )
{
TQDomElement n = e.firstChild().toElement();
int row = e.attribute( "row" ).toInt();
@@ -2117,19 +2159,19 @@ TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLay
colspan = 1;
Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"),
- parent, "spacer", FALSE);
+ parent, "spacer", false);
spacer->setOrientation( o );
- spacer->setInteraciveMode( FALSE );
+ spacer->setInteraciveMode( false );
while ( !n.isNull() ) {
if ( n.tagName() == "property" )
- setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( spacer, n.attribute( "name" ), n.firstChild().toElement() );
n = n.nextSibling().toElement();
}
- spacer->setInteraciveMode( TRUE );
+ spacer->setInteraciveMode( true );
if ( formwindow )
formwindow->insertWidget( spacer, pasting );
if ( layout ) {
- if ( ::tqqt_cast<TQBoxLayout*>(layout) )
+ if ( ::tqt_cast<TQBoxLayout*>(layout) )
( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() );
else
( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1,
@@ -2143,15 +2185,15 @@ 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->metaObject()->property( obj->metaObject()->findProperty( prop, true ), true );
- if ( !::tqqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
+ if ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget();
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
return;
}
- MetaDataBase::setPropertyChanged( obj, prop, TRUE );
+ MetaDataBase::setPropertyChanged( obj, prop, true );
}
TQVariant defVarient;
@@ -2187,7 +2229,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( !p ) {
MetaDataBase::setFakeProperty( obj, prop, v );
if ( obj->isWidgetType() ) {
- if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) {
+ if ( prop == "database" && obj != toplevel ) {
TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList();
if ( lst.count() > 2 )
dbControls.insert( obj->name(), lst[ 2 ] );
@@ -2241,32 +2283,32 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
}
if ( prop == "icon" ) {
formwindow->setIcon( v.toPixmap() );
- TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() );
- MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow),
+ TQString pmk = MetaDataBase::pixmapKey( formwindow, v.toPixmap().serialNumber() );
+ MetaDataBase::setPixmapKey( formwindow,
formwindow->icon()->serialNumber(), pmk );
}
if ( prop == "geometry" ) {
- if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) {
- hadGeometry = TRUE;
+ if ( obj == toplevel ) {
+ hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
- } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
- hadGeometry = TRUE;
+ } else if ( obj == formwindow->mainContainer() ) {
+ hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
}
}
- if ( ::tqqt_cast<TQLayout*>(obj) ) {
+ if ( ::tqt_cast<TQLayout*>(obj) ) {
if ( prop == "spacing" ) {
- MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
+ MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() );
return;
} else if ( prop == "margin" ) {
- MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() );
+ MetaDataBase::setMargin( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toInt() );
return;
} else if ( e.tagName() == "enum" && prop == "resizeMode" ) {
- MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() );
+ MetaDataBase::setResizeMode( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) , v.toString() );
return;
}
}
@@ -2274,10 +2316,10 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
- formwindow->unify( TQT_TQOBJECT(obj), s, TRUE );
+ formwindow->unify( obj, s, true );
obj->setName( s );
return;
- } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) {
+ } else if ( formwindow && obj == formwindow->mainContainer() ) {
formwindow->setName( v.toCString() );
}
}
@@ -2321,12 +2363,12 @@ void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent )
TQBuffer buf( ba );
buf.open( IO_WriteOnly | IO_Translate );
TQString format;
- bool compress = FALSE;
+ bool compress = false;
if (img.hasAlphaBuffer()) {
format = "PNG";
} else {
format = img.depth() > 1 ? "XPM" : "XBM";
- compress = TRUE;
+ compress = true;
}
TQImageIO iio( &buf, format );
iio.setImage( img );
@@ -2443,7 +2485,7 @@ TQImage Resource::loadFromCollection( const TQString &name )
void Resource::saveConnections( TQTextStream &ts, int indent )
{
- TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Connection> connections = MetaDataBase::connections( formwindow );
if ( connections.isEmpty() )
return;
ts << makeIndent( indent ) << "<connections>" << endl;
@@ -2456,8 +2498,8 @@ void Resource::saveConnections( TQTextStream &ts, int indent )
( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 &&
qstrcmp( conn.receiver->name(), "this" ) != 0 ) )
continue;
- if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) &&
- !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
+ if ( formwindow->isMainContainer( (*it).receiver ) &&
+ !MetaDataBase::hasSlot( formwindow, MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) )
continue;
if ( conn.sender->inherits( "CustomWidget" ) ) {
@@ -2500,11 +2542,11 @@ 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 = TQT_TQOBJECT(toplevel);
+ conn.sender = toplevel;
} else {
if ( name == "this" )
name = toplevel->name();
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.sender = l->first();
@@ -2520,9 +2562,9 @@ void Resource::loadConnections( const TQDomElement &e )
conn.receiver = 0;
TQString name = n2.firstChild().toText().data();
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
- conn.receiver = TQT_TQOBJECT(toplevel);
+ conn.receiver = toplevel;
} else {
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() )
conn.receiver = l->first();
@@ -2538,14 +2580,14 @@ void Resource::loadConnections( const TQDomElement &e )
n2 = n2.nextSibling().toElement();
}
if ( formwindow ) {
- 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 == formwindow )
+ conn.sender = formwindow->mainContainer();
+ if ( conn.receiver == formwindow )
+ conn.receiver = formwindow->mainContainer();
}
if ( conn.sender && conn.receiver ) {
if ( lang == "C++" ) {
- MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel),
+ MetaDataBase::addConnection( formwindow ? formwindow : toplevel,
conn.sender, conn.signal, conn.receiver, conn.slot );
}
}
@@ -2562,11 +2604,11 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier,
+ if ( !MetaDataBase::hasFunction( formwindow, slot.function, true ) )
+ MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType );
else
- MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function,
+ MetaDataBase::changeFunctionAttributes( formwindow, slot.function, slot.function,
slot.specifier, slot.access,
"slot", slot.language, slot.returnType );
}
@@ -2735,7 +2777,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
TQString name = n.firstChild().toText().data();
if ( name.isEmpty() )
continue;
- TQObjectList *l = toplevel->queryList( 0, name, FALSE );
+ TQObjectList *l = toplevel->queryList( 0, name, false );
if ( l ) {
if ( l->first() ) {
TQWidget *w = (TQWidget*)l->first();
@@ -2756,7 +2798,7 @@ void Resource::loadTabOrder( const TQDomElement &e )
void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
TQString cn;
if ( info.classNameChanged && !info.className.isEmpty() )
cn = info.className;
@@ -2771,16 +2813,16 @@ void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent )
void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
{
- MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) );
+ MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( formwindow );
if ( !langIface || formwindow->project()->isCpp() ) {
- TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Include> includes = MetaDataBase::includes( formwindow );
TQString extensionInclude;
- bool needExtensionInclude = FALSE;
+ bool needExtensionInclude = false;
if ( langIface &&
formwindow->formFile()->hasFormCode() &&
formwindow->formFile()->codeFileState() != FormFile::Deleted ) {
extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension();
- needExtensionInclude = TRUE;
+ needExtensionInclude = true;
}
if ( !includes.isEmpty() || needExtensionInclude ) {
ts << makeIndent( indent ) << "<includes>" << endl;
@@ -2800,7 +2842,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</includes>" << endl;
}
- TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) );
+ TQStringList forwards = MetaDataBase::forwards( formwindow );
if ( !forwards.isEmpty() ) {
ts << makeIndent( indent ) << "<forwards>" << endl;
indent++;
@@ -2809,7 +2851,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</forwards>" << endl;
}
- TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formwindow );
if ( !varLst.isEmpty() ) {
ts << makeIndent( indent ) << "<variables>" << endl;
indent++;
@@ -2825,7 +2867,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
indent--;
ts << makeIndent( indent ) << "</variables>" << endl;
}
- TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) );
+ TQStringList sigs = MetaDataBase::signalList( formwindow );
if ( !sigs.isEmpty() ) {
ts << makeIndent( indent ) << "<signals>" << endl;
indent++;
@@ -2835,7 +2877,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</signals>" << endl;
}
- TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) );
+ TQValueList<MetaDataBase::Function> slotList = MetaDataBase::slotList( formwindow );
if ( !slotList.isEmpty() ) {
ts << makeIndent( indent ) << "<slots>" << endl;
indent++;
@@ -2858,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, true );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
@@ -2888,7 +2930,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "<pixmapinproject/>" << endl;
else
ts << makeIndent( indent ) << "<pixmapfunction>" << formwindow->pixmapLoaderFunction() << "</pixmapfunction>" << endl;
- if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() )
+ if ( !( exportMacro = MetaDataBase::exportMacro( formwindow->mainContainer() ) ).isEmpty() )
ts << makeIndent( indent ) << "<exportmacro>" << exportMacro << "</exportmacro>" << endl;
if ( formwindow ) {
ts << makeIndent( indent ) << "<layoutdefaults spacing=\"" << formwindow->layoutDefaultSpacing()
@@ -2905,18 +2947,6 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
}
}
-void Resource::saveIncludeHints( TQTextStream &ts, int indent )
-{
- if ( includeHints.isEmpty() )
- return;
- ts << makeIndent( indent ) << "<includehints>" << endl;
- indent++;
- for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it )
- ts << makeIndent( indent ) << "<includehint>" << *it << "</includehint>" << endl;
- indent--;
- ts << makeIndent( indent ) << "</includehints>" << endl;
-}
-
TQColorGroup Resource::loadColorGroup( const TQDomElement &e )
{
TQColorGroup cg;
@@ -2945,10 +2975,10 @@ void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent )
while ( it.current() ) {
TQObject *o = it.current();
++it;
- if ( !::tqqt_cast<TQAction*>(o) )
+ if ( !::tqt_cast<TQAction*>(o) )
continue;
TQAction *ac = (TQAction*)o;
- bool isGroup = ::tqqt_cast<TQActionGroup*>(ac);
+ bool isGroup = ::tqt_cast<TQActionGroup*>(ac);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -2977,7 +3007,7 @@ void Resource::saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts
TQPtrListIterator<TQAction> it( actions );
while ( it.current() ) {
TQAction *a = it.current();
- bool isGroup = ::tqqt_cast<TQActionGroup*>(a);
+ bool isGroup = ::tqt_cast<TQActionGroup*>(a);
if ( isGroup )
ts << makeIndent( indent ) << "<actiongroup>" << endl;
else
@@ -3008,13 +3038,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
a = new QDesignerAction( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
- bool hasMenuText = FALSE;
+ bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
TQDomElement value(n3.firstChild().toElement());
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@@ -3022,19 +3052,19 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !::tqqt_cast<TQAction*>(parent) )
+ if ( !::tqt_cast<TQAction*>(parent) )
formwindow->actionList().append( a );
} else if ( n.tagName() == "actiongroup" ) {
a = new QDesignerActionGroup( parent );
MetaDataBase::addEntry( a );
TQDomElement n2 = n.firstChild().toElement();
- bool hasMenuText = FALSE;
+ bool hasMenuText = false;
while ( !n2.isNull() ) {
if ( n2.tagName() == "property" ) {
TQDomElement n3(n2); // don't modify n2
TQString prop = n3.attribute( "name" );
if (prop == "menuText")
- hasMenuText = TRUE;
+ hasMenuText = true;
TQDomElement value = n3.firstChild().toElement();
setObjectProperty( a, prop, value );
if (!hasMenuText && uiFileVersion < "3.3" && prop == "text")
@@ -3045,7 +3075,7 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
}
n2 = n2.nextSibling().toElement();
}
- if ( !::tqqt_cast<TQAction*>(parent) )
+ if ( !::tqt_cast<TQAction*>(parent) )
formwindow->actionList().append( a );
}
}
@@ -3055,9 +3085,9 @@ void Resource::loadActions( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
while ( !n.isNull() ) {
if ( n.tagName() == "action" ) {
- loadChildAction( TQT_TQOBJECT(formwindow), n );
+ loadChildAction( formwindow, n );
} else if ( n.tagName() == "actiongroup" ) {
- loadChildAction( TQT_TQOBJECT(formwindow), n );
+ loadChildAction( formwindow, n );
}
n = n.nextSibling().toElement();
}
@@ -3078,23 +3108,23 @@ void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent )
continue;
ts << makeIndent( indent ) << "<toolbar dock=\"" << i << "\">" << endl;
indent++;
- saveObjectProperties( TQT_TQOBJECT(tb), ts, indent );
+ saveObjectProperties( tb, ts, indent );
TQPtrList<TQAction> actionList = ( (QDesignerToolBar*)tb )->insertedActions();
for ( TQAction *a = actionList.first(); a; a = actionList.next() ) {
- if ( ::tqqt_cast<QSeparatorAction*>(a) ) {
+ if ( ::tqt_cast<QSeparatorAction*>(a) ) {
ts << makeIndent( indent ) << "<separator/>" << endl;
} else {
- if ( ::tqqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
+ if ( ::tqt_cast<QDesignerAction*>(a) && !( (QDesignerAction*)a )->supportsMenu() ) {
TQWidget *w = ( (QDesignerAction*)a )->widget();
ts << makeIndent( indent ) << "<widget class=\""
- << WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) << "\">" << endl;
+ << WidgetFactory::classNameOf( w ) << "\">" << endl;
indent++;
- const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ const char *className = WidgetFactory::classNameOf( w );
if ( w->isA( "CustomWidget" ) )
usedCustomWidgets << TQString( className );
- if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) )
- saveItems( TQT_TQOBJECT(w), ts, indent );
- saveObjectProperties( TQT_TQOBJECT(w), ts, indent );
+ if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ), w ) )
+ saveItems( w, ts, indent );
+ saveObjectProperties( w, ts, indent );
indent--;
ts << makeIndent( indent ) << "</widget>" << endl;
} else {
@@ -3117,8 +3147,8 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove
- saveObjectProperties( TQT_TQOBJECT(mb), ts, indent );
+ MetaDataBase::setPropertyChanged( mb, "name", true ); // FIXME: remove
+ saveObjectProperties( mb, ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) {
MenuBarEditorItem *m = mb->item( i );
@@ -3143,11 +3173,11 @@ void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStrea
{
for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) {
TQAction *a = i->action();
- if ( ::tqqt_cast<QSeparatorAction*>(a) )
+ if ( ::tqt_cast<QSeparatorAction*>(a) )
ts << makeIndent( indent ) << "<separator/>" << endl;
- else if ( ::tqqt_cast<QDesignerAction*>(a) )
+ else if ( ::tqt_cast<QDesignerAction*>(a) )
ts << makeIndent( indent ) << "<action name=\"" << a->name() << "\"/>" << endl;
- else if ( ::tqqt_cast<QDesignerActionGroup*>(a) )
+ else if ( ::tqt_cast<QDesignerActionGroup*>(a) )
ts << makeIndent( indent ) << "<actiongroup name=\"" << a->name() << "\"/>" << endl;
PopupMenuEditor *s = i->subMenu();
if ( s && s->count() ) {
@@ -3187,12 +3217,12 @@ void Resource::loadToolBars( const TQDomElement &e )
tb->addAction( a );
} else if ( n2.tagName() == "widget" ) {
TQWidget *w = (TQWidget*)createObject( n2, tb );
- QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) );
+ QDesignerAction *a = new QDesignerAction( w, tb );
a->addTo( tb );
tb->addAction( a );
tb->installEventFilters( w );
} else if ( n2.tagName() == "property" ) {
- setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() );
+ setObjectProperty( tb, n2.attribute( "name" ), n2.firstChild().toElement() );
}
n2 = n2.nextSibling().toElement();
}
@@ -3206,16 +3236,16 @@ void Resource::loadMenuBar( const TQDomElement &e )
TQDomElement n = e.firstChild().toElement();
TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer();
MenuBarEditor *mb = new MenuBarEditor( formwindow, mw );
- MetaDataBase::addEntry( TQT_TQOBJECT(mb) );
+ MetaDataBase::addEntry( mb );
while ( !n.isNull() ) {
if ( n.tagName() == "item" ) {
PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw );
loadPopupMenu( popup, n );
popup->setName( n.attribute( "name" ) );
mb->insertItem( n.attribute( "text" ), popup );
- MetaDataBase::addEntry( TQT_TQOBJECT(popup) );
+ MetaDataBase::addEntry( popup );
} else if ( n.tagName() == "property" ) {
- setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() );
+ setObjectProperty( mb, n.attribute( "name" ), n.firstChild().toElement() );
} else if ( n.tagName() == "separator" ) {
mb->insertSeparator();
}
@@ -3225,7 +3255,7 @@ void Resource::loadMenuBar( const TQDomElement &e )
void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
{
- MetaDataBase::addEntry( TQT_TQOBJECT(p) );
+ MetaDataBase::addEntry( p );
TQDomElement n = e.firstChild().toElement();
TQAction *a = 0;
while ( !n.isNull() ) {
@@ -3238,7 +3268,7 @@ void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e )
PopupMenuEditorItem *i = p->at( p->find( a ) );
if ( i ) {
TQString name = n.attribute( "name" );
- formwindow->unify( i, name, TRUE );
+ formwindow->unify( i, name, true );
i->setName( name );
MetaDataBase::addEntry( i );
loadPopupMenu( i->subMenu(), n );
@@ -3258,7 +3288,7 @@ bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface
formfile->code().isEmpty() ||
!formfile->hasFormCode() ||
!formfile->isModified(FormFile::WFormCode) )
- return TRUE; // There is no code to be saved.
+ return true; // There is no code to be saved.
return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()),
formfile->code() );
}
diff --git a/kdevdesigner/designer/resource.h b/kdevdesigner/designer/resource.h
index 06598254..d3de2923 100644
--- a/kdevdesigner/designer/resource.h
+++ b/kdevdesigner/designer/resource.h
@@ -75,7 +75,7 @@ public:
bool load( FormFile *ff, TQIODevice*, Project *defProject = 0 );
TQString copy();
- bool save( const TQString& filename, bool formCodeOnly = FALSE);
+ bool save( const TQString& filename, bool formCodeOnly = false);
bool save( TQIODevice* );
void paste( const TQString &cb, TQWidget *parent );
@@ -103,7 +103,6 @@ private:
void saveColor( TQTextStream &ts, int indent, const TQColor &c );
void saveMetaInfoBefore( TQTextStream &ts, int indent );
void saveMetaInfoAfter( TQTextStream &ts, int indent );
- void saveIncludeHints( TQTextStream &ts, int indent );
void savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname = "pixmap" );
void saveActions( const TQPtrList<TQAction> &actions, TQTextStream &ts, int indent );
void saveChildActions( TQAction *a, TQTextStream &ts, int indent );
@@ -112,7 +111,7 @@ private:
void savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent );
TQObject *createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout = 0 );
- TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o );
+ TQWidget *createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, TQt::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);
@@ -157,7 +156,6 @@ private:
TQString currFileName;
LanguageInterface *langIface;
bool hasFunctions;
- TQStringList includeHints;
TQString uiFileVersion;
};
diff --git a/kdevdesigner/designer/richtextfontdialog.ui b/kdevdesigner/designer/richtextfontdialog.ui
index d7d6c5a7..bebb31f5 100644
--- a/kdevdesigner/designer/richtextfontdialog.ui
+++ b/kdevdesigner/designer/richtextfontdialog.ui
@@ -330,11 +330,11 @@
<include location="local" impldecl="in implementation">richtextfontdialog.ui.h</include>
</includes>
<variables>
- <variable>QString font</variable>
- <variable>QColor color</variable>
- <variable>QString size</variable>
+ <variable>TQString font</variable>
+ <variable>TQColor color</variable>
+ <variable>TQString size</variable>
</variables>
-<Q_SLOTS>
+<slots>
<slot>init()</slot>
<slot>selectColor()</slot>
<slot>accept()</slot>
@@ -342,6 +342,6 @@
<slot returnType="TQString">getSize()</slot>
<slot returnType="TQString">getColor()</slot>
<slot returnType="TQString">getFont()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp
index d60f223b..a0e971bc 100644
--- a/kdevdesigner/designer/sizehandle.cpp
+++ b/kdevdesigner/designer/sizehandle.cpp
@@ -38,12 +38,12 @@
SizeHandle::SizeHandle( FormWindow *parent, Direction d, WidgetSelection *s )
: TQWidget( parent )
{
- active = TRUE;
+ active = true;
setBackgroundMode( active ? PaletteText : PaletteDark );
setFixedSize( 6, 6 );
widget = 0;
dir =d ;
- setMouseTracking( FALSE );
+ setMouseTracking( false );
formWindow = parent;
sel = s;
updateCursor();
@@ -107,7 +107,7 @@ void SizeHandle::paintEvent( TQPaintEvent * )
void SizeHandle::mousePressEvent( TQMouseEvent *e )
{
- if ( !widget || e->button() != Qt::LeftButton || !active )
+ if ( !widget || e->button() != TQt::LeftButton || !active )
return;
oldPressPos = e->pos();
geom = origGeom = TQRect( widget->pos(), widget->size() );
@@ -115,7 +115,7 @@ void SizeHandle::mousePressEvent( TQMouseEvent *e )
void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
{
- if ( !widget || ( e->state() & Qt::LeftButton ) != Qt::LeftButton || !active )
+ if ( !widget || ( e->state() & TQt::LeftButton ) != TQt::LeftButton || !active )
return;
TQPoint rp = mapFromGlobal( e->globalPos() );
TQPoint d = oldPressPos - rp;
@@ -227,7 +227,7 @@ void SizeHandle::mouseMoveEvent( TQMouseEvent *e )
void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
{
- if ( e->button() != Qt::LeftButton || !active )
+ if ( e->button() != TQt::LeftButton || !active )
return;
formWindow->sizePreview()->hide();
@@ -236,7 +236,7 @@ void SizeHandle::mouseReleaseEvent( TQMouseEvent *e )
formWindow,
widget, origGeom,
widget->geometry() ) );
- formWindow->emitUpdateProperties( TQT_TQOBJECT(widget) );
+ formWindow->emitUpdateProperties( widget );
}
void SizeHandle::trySetGeometry( TQWidget *w, int x, int y, int width, int height )
diff --git a/kdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h
index 44917884..0d71fc99 100644
--- a/kdevdesigner/designer/sizehandle.h
+++ b/kdevdesigner/designer/sizehandle.h
@@ -38,7 +38,7 @@ class TQPaintEvent;
class SizeHandle : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -77,7 +77,7 @@ class WidgetSelection
public:
WidgetSelection( FormWindow *parent, TQPtrDict<WidgetSelection> *selDict );
- void setWidget( TQWidget *w, bool updateDict = TRUE );
+ void setWidget( TQWidget *w, bool updateDict = true );
bool isUsed() const;
void updateGeometry();
diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp
index 2850e20e..b7db3d2c 100644
--- a/kdevdesigner/designer/sourceeditor.cpp
+++ b/kdevdesigner/designer/sourceeditor.cpp
@@ -47,7 +47,7 @@ SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageIn
lIface->addRef();
editor = iFace->editor( MainWindow::self->areEditorsReadOnly(),
this, MainWindow::self->designerInterface() );
- iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) );
+ iFace->onBreakPointChange( MainWindow::self, TQ_SLOT( breakPointsChanged() ) );
resize( 600, 400 );
setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) );
}
@@ -57,7 +57,7 @@ SourceEditor::~SourceEditor()
saveBreakPoints();
editor = 0;
if ( formWindow() ) {
- formWindow()->formFile()->setCodeEdited( FALSE );
+ formWindow()->formFile()->setCodeEdited( false );
formWindow()->formFile()->setEditor( 0 );
} else if ( sourceFile() ) {
sourceFile()->setEditor( 0 );
@@ -74,16 +74,16 @@ void SourceEditor::setObject( TQObject *o, Project *p )
if ( sourceFile() )
sourceFile()->setEditor( 0 );
if ( formWindow() ) {
- formWindow()->formFile()->setCodeEdited( FALSE );
+ formWindow()->formFile()->setCodeEdited( false );
formWindow()->formFile()->setEditor( 0 );
}
- if ( ::tqqt_cast<FormWindow*>(o) )
- ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE );
+ if ( ::tqt_cast<FormWindow*>(o) )
+ ( (FormWindow*)o )->formFile()->setCodeEdited( true );
save();
- bool changed = FALSE;
+ bool changed = false;
if ( &(*obj) != o ) {
saveBreakPoints();
- changed = TRUE;
+ changed = true;
}
obj = o;
pro = p;
@@ -104,7 +104,7 @@ void SourceEditor::setObject( TQObject *o, Project *p )
if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else
- iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) );
+ iFace->setContext( formWindow()->mainContainer() );
} else {
iFace->setContext( 0 );
}
@@ -119,9 +119,9 @@ TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &,
TQString txt;
if ( !o )
return txt;
- if ( ::tqqt_cast<FormWindow*>(o) )
+ if ( ::tqt_cast<FormWindow*>(o) )
txt = ( (FormWindow*)o )->formFile()->code();
- else if ( ::tqqt_cast<SourceFile*>(o) )
+ else if ( ::tqt_cast<SourceFile*>(o) )
txt = ( (SourceFile*)o )->text();
return txt;
}
@@ -235,7 +235,7 @@ void SourceEditor::resetContext()
if ( formWindow()->isFake() )
iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) );
else
- iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) );
+ iFace->setContext( formWindow()->mainContainer() );
} else {
iFace->setContext( 0 );
}
@@ -244,7 +244,7 @@ void SourceEditor::resetContext()
void SourceEditor::setFocus()
{
if ( formWindow() )
- formWindow()->formFile()->setCodeEdited( TRUE );
+ formWindow()->formFile()->setCodeEdited( true );
if ( editor )
editor->setFocus();
}
@@ -302,19 +302,19 @@ bool SourceEditor::saveAs()
return formWindow()->formFile()->saveAs();
else if ( sourceFile() )
return sourceFile()->saveAs();
- return FALSE;
+ return false;
}
SourceFile *SourceEditor::sourceFile() const
{
- if ( !::tqqt_cast<SourceFile*>((TQObject *)obj) )
+ if ( !::tqt_cast<SourceFile*>((TQObject *)obj) )
return 0;
return (SourceFile*)(TQObject*)obj;
}
FormWindow *SourceEditor::formWindow() const
{
- if ( !::tqqt_cast<FormWindow*>((TQObject *)obj) )
+ if ( !::tqt_cast<FormWindow*>((TQObject *)obj) )
return 0;
return (FormWindow*)(TQObject*)obj;
}
diff --git a/kdevdesigner/designer/sourceeditor.h b/kdevdesigner/designer/sourceeditor.h
index 3dde636e..0f14c5f6 100644
--- a/kdevdesigner/designer/sourceeditor.h
+++ b/kdevdesigner/designer/sourceeditor.h
@@ -39,7 +39,7 @@ class SourceFile;
class SourceEditor : public TQVBox
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/sourcefile.cpp b/kdevdesigner/designer/sourcefile.cpp
index 3d848bbf..b1d7b488 100644
--- a/kdevdesigner/designer/sourcefile.cpp
+++ b/kdevdesigner/designer/sourcefile.cpp
@@ -42,13 +42,13 @@
SourceFile::SourceFile( const TQString &fn, bool temp, Project *p )
: filename( fn ), ed( 0 ), fileNameTemp( temp ),
- timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( FALSE )
- , accepted( TRUE )
+ timeStamp( 0, p->makeAbsolute( fn ) ), pro( p ), pkg( false )
+ , accepted( true )
{
iface = 0;
if ( !temp )
- accepted = checkFileName( TRUE );
+ accepted = checkFileName( true );
if (accepted) {
load();
@@ -79,7 +79,7 @@ bool SourceFile::save( bool ignoreModified )
if ( fileNameTemp )
return saveAs();
if ( !ignoreModified && !isModified() )
- return TRUE;
+ return true;
if ( ed )
ed->save();
@@ -108,8 +108,8 @@ bool SourceFile::save( bool ignoreModified )
TQTextStream ts( &f );
ts << txt;
timeStamp.update();
- setModified( FALSE );
- return TRUE;
+ setModified( false );
+ return true;
}
bool SourceFile::saveAs( bool ignoreModified )
@@ -128,18 +128,18 @@ bool SourceFile::saveAs( bool ignoreModified )
}
TQString fn = KFileDialog::getSaveFileName( initFn, filter );
if ( fn.isEmpty() )
- return FALSE;
- fileNameTemp = FALSE;
+ return false;
+ fileNameTemp = false;
filename = pro->makeRelative( fn );
- if ( !checkFileName( TRUE ) ) {
+ if ( !checkFileName( true ) ) {
filename = old;
- return FALSE;
+ return false;
}
- pro->setModified( TRUE );
+ pro->setModified( true );
timeStamp.setFileName( pro->makeAbsolute( filename ) );
if ( ed )
ed->setCaption( i18n( "Edit %1" ).arg( filename ) );
- setModified( TRUE );
+ setModified( true );
if ( pro->isDummy() ) {
TQObject *o = ed->parent();
while ( o && !o->isA( "MainWindow" ) )
@@ -154,11 +154,11 @@ bool SourceFile::load()
{
TQFile f( pro->makeAbsolute( filename ) );
if ( !f.open( IO_ReadOnly ) )
- return FALSE;
+ return false;
TQTextStream ts( &f );
txt = ts.read();
timeStamp.update();
- return TRUE;
+ return true;
}
DesignerSourceFile *SourceFile::iFace()
@@ -176,7 +176,7 @@ void SourceFile::setEditor( SourceEditor *e )
bool SourceFile::isModified() const
{
if ( !ed )
- return FALSE;
+ return false;
return ed->isModified();
}
@@ -210,11 +210,11 @@ bool SourceFile::closeEvent()
{
if ( !isModified() && fileNameTemp ) {
pro->removeSourceFile( this );
- return TRUE;
+ return true;
}
if ( !isModified() )
- return TRUE;
+ return true;
if ( ed )
ed->save();
@@ -224,7 +224,7 @@ bool SourceFile::closeEvent()
i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) {
case 0: // save
if ( !save() )
- return FALSE;
+ return false;
break;
case 1: // don't save
load();
@@ -232,24 +232,24 @@ bool SourceFile::closeEvent()
ed->editorInterface()->setText( txt );
if ( fileNameTemp ) {
pro->removeSourceFile( this );
- return TRUE;
+ return true;
}
if ( MainWindow::self )
MainWindow::self->workspace()->update();
break;
case 2: // cancel
- return FALSE;
+ return false;
default:
break;
}
- setModified( FALSE );
- return TRUE;
+ setModified( false );
+ return true;
}
bool SourceFile::close()
{
if ( !ed )
- return TRUE;
+ return true;
return ed->close();
}
@@ -289,10 +289,10 @@ bool SourceFile::checkFileName( bool allowBreak )
while ( fn.isEmpty() ) {
fn = KFileDialog::getSaveFileName( pro->makeAbsolute( filename ), filter );
if ( allowBreak && fn.isEmpty() )
- return FALSE;
+ return false;
}
filename = pro->makeRelative( fn );
sf = pro->findSourceFile( filename, this );
}
- return TRUE;
+ return true;
}
diff --git a/kdevdesigner/designer/sourcefile.h b/kdevdesigner/designer/sourcefile.h
index ef4d31db..004c8898 100644
--- a/kdevdesigner/designer/sourcefile.h
+++ b/kdevdesigner/designer/sourcefile.h
@@ -36,7 +36,7 @@ class Project;
class SourceFile : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -46,8 +46,8 @@ public:
void setText( const TQString &s );
void setModified( bool m );
- bool save( bool ignoreModified = FALSE );
- bool saveAs( bool ignoreModified = FALSE );
+ bool save( bool ignoreModified = false );
+ bool saveAs( bool ignoreModified = false );
bool load();
bool close();
bool closeEvent();
diff --git a/kdevdesigner/designer/startdialog.ui b/kdevdesigner/designer/startdialog.ui
index 383fdfda..ef1d96f3 100644
--- a/kdevdesigner/designer/startdialog.ui
+++ b/kdevdesigner/designer/startdialog.ui
@@ -199,9 +199,6 @@
<property name="text">
<string>&amp;Help</string>
</property>
- <property name="accel">
- <number>4144</number>
- </property>
<property name="autoDefault">
<bool>true</bool>
</property>
@@ -230,9 +227,6 @@
<property name="text">
<string>&amp;OK</string>
</property>
- <property name="accel">
- <number>0</number>
- </property>
<property name="autoDefault">
<bool>true</bool>
</property>
@@ -247,9 +241,6 @@
<property name="text">
<string>&amp;Cancel</string>
</property>
- <property name="accel">
- <number>0</number>
- </property>
<property name="autoDefault">
<bool>true</bool>
</property>
@@ -314,11 +305,11 @@
<slot>recentItemChanged(TQIconViewItem*)</slot>
</connection>
</connections>
-<Q_SLOTS>
+<slots>
<slot>recentItemChanged( TQIconViewItem * )</slot>
<slot>clearFileInfo()</slot>
<slot>accept()</slot>
<slot>reject()</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp
index adff44fd..b74c3ae5 100644
--- a/kdevdesigner/designer/startdialogimpl.cpp
+++ b/kdevdesigner/designer/startdialogimpl.cpp
@@ -43,15 +43,15 @@ StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath )
newForm = new NewForm( templateView, templatePath );
recentFiles.clear();
initFileOpen();
- showInFuture = TRUE;
-
- connect( buttonHelp, TQT_SIGNAL( clicked() ),
- MainWindow::self, TQT_SLOT( showDialogHelp() ) );
- connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ),
- this, TQT_SLOT( accept() ) );
- connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ),
- this, TQT_SLOT( accept() ) );
- connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) );
+ showInFuture = true;
+
+ connect( buttonHelp, TQ_SIGNAL( clicked() ),
+ MainWindow::self, TQ_SLOT( showDialogHelp() ) );
+ connect( recentView, TQ_SIGNAL( doubleClicked(TQIconViewItem*) ),
+ this, TQ_SLOT( accept() ) );
+ connect( recentView, TQ_SIGNAL( returnPressed(TQIconViewItem*) ),
+ this, TQ_SLOT( accept() ) );
+ connect( fd, TQ_SIGNAL( fileSelected() ), this, TQ_SLOT( accept() ) );
}
void StartDialog::accept()
@@ -119,12 +119,12 @@ void StartDialog::clearFileInfo()
void StartDialog::setRecentlyFiles( TQStringList &files )
{
- insertRecentItems( files, FALSE );
+ insertRecentItems( files, false );
}
void StartDialog::setRecentlyProjects( TQStringList &projects )
{
- insertRecentItems( projects, TRUE );
+ insertRecentItems( projects, true );
}
void StartDialog::insertRecentItems( TQStringList &files, bool isProject )
@@ -139,7 +139,7 @@ void StartDialog::insertRecentItems( TQStringList &files, bool isProject )
item = new TQIconViewItem( recentView, fi.fileName() );
recentFiles[recentView->index( item )] = *it;
item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) );
- item->setDragEnabled( FALSE );
+ item->setDragEnabled( false );
}
}
@@ -151,7 +151,7 @@ void StartDialog::initFileOpen()
TQPoint point( 0, 0 );
fd->reparent( tab, point );
- TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING );
+ TQObjectList *l = fd->queryList( "TQPushButton" );
TQObjectListIt it( *l );
TQObject *obj;
while ( (obj = it.current()) != 0 ) {
@@ -160,7 +160,7 @@ void StartDialog::initFileOpen()
}
delete l;
- fd->setSizeGripEnabled ( FALSE );
+ fd->setSizeGripEnabled ( false );
tabLayout->addWidget( fd );
TQPluginManager<ImportFilterInterface> manager( IID_ImportFilter, TQApplication::libraryPaths(),
diff --git a/kdevdesigner/designer/startdialogimpl.h b/kdevdesigner/designer/startdialogimpl.h
index 8fb574d0..bd250d4b 100644
--- a/kdevdesigner/designer/startdialogimpl.h
+++ b/kdevdesigner/designer/startdialogimpl.h
@@ -39,7 +39,7 @@
class FileDialog : public TQFileDialog
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -55,7 +55,7 @@ signals:
class StartDialog : public StartDialogBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp
index 82c9ddb8..2976be3b 100644
--- a/kdevdesigner/designer/styledbutton.cpp
+++ b/kdevdesigner/designer/styledbutton.cpp
@@ -39,12 +39,12 @@
#include <tqstyle.h>
StyledButton::StyledButton(TQWidget* parent, const char* name)
- : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( FALSE )
+ : TQButton( parent, name ), pix( 0 ), spix( 0 ), s( 0 ), formWindow( 0 ), mousePressed( false )
{
setMinimumSize( minimumSizeHint() );
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
- connect( this, TQT_SIGNAL(clicked()), TQT_SLOT(onEditor()));
+ connect( this, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor()));
setEditor( ColorEditor );
}
@@ -151,12 +151,12 @@ void StyledButton::resizeEvent( TQResizeEvent* e )
void StyledButton::drawButton( TQPainter *paint )
{
- style().tqdrawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
+ style().drawPrimitive(TQStyle::PE_ButtonBevel, paint, rect(), colorGroup(),
isDown() ? TQStyle::Style_Sunken : TQStyle::Style_Raised);
drawButtonLabel(paint);
if (hasFocus())
- style().tqdrawPrimitive(TQStyle::PE_FocusRect, paint,
+ style().drawPrimitive(TQStyle::PE_FocusRect, paint,
style().subRect(TQStyle::SR_PushButtonFocusRect, this),
colorGroup(), TQStyle::Style_Default);
}
@@ -209,7 +209,7 @@ void StyledButton::onEditor()
void StyledButton::mousePressEvent(TQMouseEvent* e)
{
TQButton::mousePressEvent(e);
- mousePressed = TRUE;
+ mousePressed = true;
pressPos = e->pos();
}
@@ -228,7 +228,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
p.drawRect( 0, 0, pix.width(), pix.height() );
p.end();
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
else if ( edit == PixmapEditor && pix && !pix->isNull() ) {
@@ -236,7 +236,7 @@ void StyledButton::mouseMoveEvent(TQMouseEvent* e)
TQImageDrag *drg = new TQImageDrag( img, this );
if(spix)
drg->setPixmap( *spix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
}
diff --git a/kdevdesigner/designer/styledbutton.h b/kdevdesigner/designer/styledbutton.h
index 8065fe84..70e97608 100644
--- a/kdevdesigner/designer/styledbutton.h
+++ b/kdevdesigner/designer/styledbutton.h
@@ -36,7 +36,7 @@ class FormWindow;
class StyledButton : public TQButton
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( TQColor color READ color WRITE setColor )
diff --git a/kdevdesigner/designer/syntaxhighlighter_html.cpp b/kdevdesigner/designer/syntaxhighlighter_html.cpp
index 5bb681f9..ddc6f649 100644
--- a/kdevdesigner/designer/syntaxhighlighter_html.cpp
+++ b/kdevdesigner/designer/syntaxhighlighter_html.cpp
@@ -66,7 +66,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
if ( string->prev() ) {
if ( string->prev()->endState() == -1 )
- process( doc, string->prev(), 0, FALSE );
+ process( doc, string->prev(), 0, false );
state = string->prev()->endState();
}
@@ -77,50 +77,50 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
if ( c == '<' ) {
if ( state != StateStandard )
- string->setFormat( i - buffer.length(), buffer.length(), formatStandard, FALSE );
+ string->setFormat( i - buffer.length(), buffer.length(), formatStandard, false );
buffer = c;
state = StateTag;
- string->setFormat( i, 1, formatKeyword, FALSE );
+ string->setFormat( i, 1, formatKeyword, false );
}
else if ( c == '>' && ( state != StateStandard ) ) {
- string->setFormat( i, 1, formatKeyword, FALSE );
+ string->setFormat( i, 1, formatKeyword, false );
buffer = "";
state = StateStandard;
}
else if ( c == ' ' && state == StateTag ) {
buffer += c;
- string->setFormat( i, 1, formatStandard, FALSE );
+ string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( c == '=' && state == StateAttribute ) {
buffer += c;
- string->setFormat( i, 1, formatStandard, FALSE );
+ string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( c == '\"' && state == StateAttribute ) {
buffer += c;
- string->setFormat( i, 1, formatStandard, FALSE );
+ string->setFormat( i, 1, formatStandard, false );
state = StateAttribVal;
}
else if ( c == '\"' && state == StateAttribVal ) {
buffer += c;
- string->setFormat( i, 1, formatStandard, FALSE );
+ string->setFormat( i, 1, formatStandard, false );
state = StateAttribute;
}
else if ( state == StateAttribute ) {
buffer += c;
- string->setFormat( i, 1, formatAttribute, FALSE );
+ string->setFormat( i, 1, formatAttribute, false );
}
else if ( state == StateAttribVal ) {
buffer += c;
- string->setFormat( i, 1, formatAttribValue, FALSE );
+ string->setFormat( i, 1, formatAttribValue, false );
}
else if ( state == StateTag ) {
- string->setFormat( i, 1, formatKeyword, FALSE );
+ string->setFormat( i, 1, formatKeyword, false );
buffer += c;
}
else if ( state == StateStandard ) {
- string->setFormat( i, 1, formatStandard, FALSE );
+ string->setFormat( i, 1, formatStandard, false );
}
i++;
@@ -129,7 +129,7 @@ void SyntaxHighlighter_HTML::process( TQTextDocument *doc, TQTextParagraph *stri
}
string->setEndState( state );
- string->setFirstPreProcess( FALSE );
+ string->setFirstPreProcess( false );
if ( invalidate && string->next() &&
!string->next()->firstPreProcess() && string->next()->endState() != -1 ) {
diff --git a/kdevdesigner/designer/syntaxhighlighter_html.h b/kdevdesigner/designer/syntaxhighlighter_html.h
index efd1a616..4de3fba8 100644
--- a/kdevdesigner/designer/syntaxhighlighter_html.h
+++ b/kdevdesigner/designer/syntaxhighlighter_html.h
@@ -27,7 +27,7 @@
#ifndef SYNTAXHIGHLIGHTER_HTML_H
#define SYNTAXHIGHLIGHTER_HTML_H
-#include <tqrichtext_p.h>
+#include <private/tqrichtext_p.h>
class SyntaxHighlighter_HTML : public TQTextPreProcessor
{
@@ -42,7 +42,7 @@ public:
SyntaxHighlighter_HTML();
virtual ~SyntaxHighlighter_HTML();
- void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = TRUE );
+ void process( TQTextDocument *doc, TQTextParagraph *string, int start, bool invalidate = true );
TQTextFormat *format( int id );
private:
diff --git a/kdevdesigner/designer/tableeditor.ui b/kdevdesigner/designer/tableeditor.ui
index 21874754..86995ec0 100644
--- a/kdevdesigner/designer/tableeditor.ui
+++ b/kdevdesigner/designer/tableeditor.ui
@@ -793,7 +793,7 @@
<tabstop>buttonRowDown</tabstop>
<tabstop>buttonHelp</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">applyClicked()</slot>
@@ -815,7 +815,7 @@
<slot access="protected">rowTextChanged( const TQString &amp; )</slot>
<slot access="protected">rowUpClicked()</slot>
<slot access="protected">columnDownClicked()</slot>
-</Q_SLOTS>
+</slots>
<pixmapfunction>BarIcon2</pixmapfunction>
<layoutdefaults spacing="6" margin="11"/>
<includes>
diff --git a/kdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp
index 060611f6..e6c12039 100644
--- a/kdevdesigner/designer/tableeditorimpl.cpp
+++ b/kdevdesigner/designer/tableeditorimpl.cpp
@@ -53,13 +53,13 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
#endif
formWindow( fw )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
#ifndef TQT_NO_TABLE
labelColumnPixmap->setText( "" );
labelRowPixmap->setText( "" );
#ifndef TQT_NO_SQL
- if ( !::tqqt_cast<TQDataTable*>(editTable) )
+ if ( !::tqt_cast<TQDataTable*>(editTable) )
#endif
{
labelFields->hide();
@@ -68,16 +68,16 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
labelTableValue->hide();
}
#ifndef TQT_NO_SQL
- if ( ::tqqt_cast<TQDataTable*>(editTable) ) {
+ if ( ::tqt_cast<TQDataTable*>(editTable) ) {
// ## why does this behave weird?
// TabWidget->removePage( rows_tab );
// rows_tab->hide();
// ## do this in the meantime...
- TabWidget->setTabEnabled( rows_tab, FALSE );
+ TabWidget->setTabEnabled( rows_tab, false );
}
- if ( formWindow->project() && ::tqqt_cast<TQDataTable*>(editTable) ) {
- TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(editTable), "database" ).toStringList();
+ if ( formWindow->project() && ::tqt_cast<TQDataTable*>(editTable) ) {
+ TQStringList lst = MetaDataBase::fakeProperty( editTable, "database" ).toStringList();
if ( lst.count() == 2 && !lst[ 0 ].isEmpty() && !lst[ 1 ].isEmpty() ) {
TQStringList fields;
fields << "<no field>";
@@ -118,9 +118,9 @@ void TableEditor::columnTextChanged( const TQString &s )
{
if ( listColumns->currentItem() == -1 )
return;
- listColumns->blockSignals( TRUE );
+ listColumns->blockSignals( true );
listColumns->changeItem( s, listColumns->currentItem() );
- listColumns->blockSignals( FALSE );
+ listColumns->blockSignals( false );
#ifndef TQT_NO_TABLE
if ( table->horizontalHeader()->iconSet( listColumns->currentItem() ) )
table->horizontalHeader()->setLabel( listColumns->currentItem(),
@@ -150,16 +150,16 @@ void TableEditor::currentColumnChanged( TQListBoxItem *i )
{
if ( !i )
return;
- editColumnText->blockSignals( TRUE );
+ editColumnText->blockSignals( true );
editColumnText->setText( i->text() );
if ( i->pixmap() )
labelColumnPixmap->setPixmap( *i->pixmap() );
else
labelColumnPixmap->setText( "" );
- editColumnText->blockSignals( FALSE );
+ editColumnText->blockSignals( false );
#ifndef TQT_NO_SQL
- if ( ::tqqt_cast<TQDataTable*>(editTable) ) {
+ if ( ::tqt_cast<TQDataTable*>(editTable) ) {
TQString s = *fieldMap.find( listColumns->index( i ) );
if ( s.isEmpty() )
comboFields->setCurrentItem( 0 );
@@ -177,24 +177,24 @@ void TableEditor::currentFieldChanged( const TQString &s )
return;
fieldMap.remove( listColumns->currentItem() );
fieldMap.insert( listColumns->currentItem(), s );
- editColumnText->blockSignals( TRUE ); //## necessary
+ editColumnText->blockSignals( true ); //## necessary
TQString newColText = s.mid(0,1).upper() + s.mid(1);
editColumnText->setText( newColText );
columnTextChanged( newColText );
- editColumnText->blockSignals( FALSE );
+ editColumnText->blockSignals( false );
}
void TableEditor::currentRowChanged( TQListBoxItem *i )
{
if ( !i )
return;
- editRowText->blockSignals( TRUE );
+ editRowText->blockSignals( true );
editRowText->setText( i->text() );
if ( i->pixmap() )
labelRowPixmap->setPixmap( *i->pixmap() );
else
labelRowPixmap->setText( "" );
- editRowText->blockSignals( FALSE );
+ editRowText->blockSignals( false );
}
void TableEditor::deleteColumnClicked()
@@ -207,7 +207,7 @@ void TableEditor::deleteColumnClicked()
readColumns();
if ( listColumns->firstItem() ) {
listColumns->setCurrentItem( listColumns->firstItem() );
- listColumns->setSelected( listColumns->firstItem(), TRUE );
+ listColumns->setSelected( listColumns->firstItem(), true );
}
#endif
}
@@ -222,7 +222,7 @@ void TableEditor::deleteRowClicked()
readRows();
if ( listRows->firstItem() ) {
listRows->setCurrentItem( listRows->firstItem() );
- listRows->setSelected( listRows->firstItem(), TRUE );
+ listRows->setSelected( listRows->firstItem(), true );
}
#endif
}
@@ -233,7 +233,7 @@ void TableEditor::newColumnClicked()
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 );
+ m.insert( table->horizontalHeader()->label( i ), true );
int n = table->numCols() - 1;
TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
@@ -242,9 +242,9 @@ void TableEditor::newColumnClicked()
listColumns->insertItem( t );
TQListBoxItem *item = listColumns->item( listColumns->count() - 1 );
listColumns->setCurrentItem( item );
- listColumns->setSelected( item, TRUE );
+ listColumns->setSelected( item, true );
#ifndef TQT_NO_SQL
- if ( ::tqqt_cast<TQDataTable*>(editTable) ) {
+ if ( ::tqt_cast<TQDataTable*>(editTable) ) {
comboFields->setFocus();
} else
#endif
@@ -261,7 +261,7 @@ void TableEditor::newRowClicked()
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 );
+ m.insert( table->verticalHeader()->label( i ), true );
int n = table->numRows() - 1;
TQString t = TQString::number( n );
while ( m.find( t ) != m.end() )
@@ -270,7 +270,7 @@ void TableEditor::newRowClicked()
listRows->insertItem( t );
TQListBoxItem *item = listRows->item( listRows->count() - 1 );
listRows->setCurrentItem( item );
- listRows->setSelected( item, TRUE );
+ listRows->setSelected( item, true );
#endif
}
@@ -412,7 +412,7 @@ void TableEditor::readFromTable()
#ifndef TQT_NO_TABLE
TQHeader *cols = editTable->horizontalHeader();
table->setNumCols( cols->count() );
- TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(editTable) );
+ TQMap<TQString, TQString> columnFields = MetaDataBase::columnFields( editTable );
for ( int i = 0; i < cols->count(); ++i ) {
if ( editTable->horizontalHeader()->iconSet( i ) ) {
table->horizontalHeader()->setLabel( i, *editTable->horizontalHeader()->iconSet( i ),
@@ -429,7 +429,7 @@ void TableEditor::readFromTable()
if ( listColumns->firstItem() ) {
listColumns->setCurrentItem( listColumns->firstItem() );
- listColumns->setSelected( listColumns->firstItem(), TRUE );
+ listColumns->setSelected( listColumns->firstItem(), true );
}
TQHeader *rows = editTable->verticalHeader();
@@ -448,7 +448,7 @@ void TableEditor::readFromTable()
if ( listRows->firstItem() ) {
listRows->setCurrentItem( listRows->firstItem() );
- listRows->setSelected( listRows->firstItem(), TRUE );
+ listRows->setSelected( listRows->firstItem(), true );
}
#endif
}
diff --git a/kdevdesigner/designer/tableeditorimpl.h b/kdevdesigner/designer/tableeditorimpl.h
index 7729f33e..d6b42f04 100644
--- a/kdevdesigner/designer/tableeditorimpl.h
+++ b/kdevdesigner/designer/tableeditorimpl.h
@@ -36,12 +36,12 @@ class FormWindow;
class TableEditor : public TableEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
TableEditor( TQWidget* parent = 0, TQWidget *editWidget = 0, FormWindow *fw = 0,
- const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
+ const char* name = 0, bool modal = false, WFlags fl = 0 );
~TableEditor();
protected slots:
diff --git a/kdevdesigner/designer/timestamp.cpp b/kdevdesigner/designer/timestamp.cpp
index 553d9e3f..f92e7872 100644
--- a/kdevdesigner/designer/timestamp.cpp
+++ b/kdevdesigner/designer/timestamp.cpp
@@ -31,10 +31,10 @@
class TQTimer;
TimeStamp::TimeStamp( TQObject *parent, const TQString &f )
- : TQObject( parent ), filename( f ), autoCheck( FALSE )
+ : TQObject( parent ), filename( f ), autoCheck( false )
{
timer = new TQTimer( this );
- connect( timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( autoCheckTimeStamp() ) );
+ connect( timer, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoCheckTimeStamp() ) );
update();
}
@@ -70,7 +70,7 @@ bool TimeStamp::isUpToDate() const
{
TQFile f( filename );
if ( !f.exists() )
- return TRUE;
+ return true;
return lastTimeStamp == TQFileInfo( f ).lastModified();
}
diff --git a/kdevdesigner/designer/timestamp.h b/kdevdesigner/designer/timestamp.h
index 078a925d..1ac0d13a 100644
--- a/kdevdesigner/designer/timestamp.h
+++ b/kdevdesigner/designer/timestamp.h
@@ -33,7 +33,7 @@
class TimeStamp : public TQObject
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/variabledialog.ui b/kdevdesigner/designer/variabledialog.ui
index d9cdc7ef..721c45c4 100644
--- a/kdevdesigner/designer/variabledialog.ui
+++ b/kdevdesigner/designer/variabledialog.ui
@@ -282,14 +282,14 @@
<tabstop>okButton</tabstop>
<tabstop>cancelButton</tabstop>
</tabstops>
-<Q_SLOTS>
+<slots>
<slot>addVariable()</slot>
<slot>deleteVariable()</slot>
<slot>accessChanged()</slot>
<slot>nameChanged()</slot>
<slot>okClicked()</slot>
<slot>currentItemChanged( TQListViewItem * i )</slot>
-</Q_SLOTS>
+</slots>
<layoutdefaults spacing="6" margin="11"/>
<includes>
<include location="global" impldecl="in implementation">klineedit.h</include>
diff --git a/kdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp
index d2d7ef67..070ab14c 100644
--- a/kdevdesigner/designer/variabledialogimpl.cpp
+++ b/kdevdesigner/designer/variabledialogimpl.cpp
@@ -44,7 +44,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent )
: VariableDialogBase( parent ), formWindow( fw )
{
varView->setSorting( -1 );
- TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( TQT_TQOBJECT(formWindow) );
+ TQValueList<MetaDataBase::Variable> varLst = MetaDataBase::variables( formWindow );
TQValueList<MetaDataBase::Variable>::Iterator it = varLst.begin();
for ( ; it != varLst.end(); ++it ) {
TQListViewItem *i = new TQListViewItem( varView );
@@ -55,7 +55,7 @@ VariableDialog::VariableDialog( FormWindow *fw, TQWidget *parent )
if ( varView->firstChild() )
varView->setCurrentItem( varView->firstChild() );
else
- propBox->setEnabled( FALSE );
+ propBox->setEnabled( false );
}
VariableDialog::~VariableDialog()
@@ -131,7 +131,7 @@ void VariableDialog::addVariable()
i->setText( 0, "int newVariable" );
i->setText( 1, "protected" );
varView->setCurrentItem( i );
- varView->setSelected( i, TRUE );
+ varView->setSelected( i, true );
varName->setFocus();
varName->selectAll();
}
@@ -144,7 +144,7 @@ void VariableDialog::deleteVariable()
delete i;
i = 0;
if ( varView->firstChild() )
- varView->setSelected( varView->firstChild(), TRUE );
+ varView->setSelected( varView->firstChild(), true );
}
void VariableDialog::currentItemChanged( TQListViewItem *i )
@@ -152,7 +152,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i )
if ( !i ) {
varName->clear();
accessCombo->setCurrentItem( 1 );
- propBox->setEnabled( FALSE );
+ propBox->setEnabled( false );
return;
}
varName->setText( i->text( 0 ) );
@@ -162,7 +162,7 @@ void VariableDialog::currentItemChanged( TQListViewItem *i )
accessCombo->setCurrentItem( 1 );
else
accessCombo->setCurrentItem( 2 );
- propBox->setEnabled( TRUE );
+ propBox->setEnabled( true );
}
void VariableDialog::nameChanged()
diff --git a/kdevdesigner/designer/variabledialogimpl.h b/kdevdesigner/designer/variabledialogimpl.h
index 65295073..ba258bed 100644
--- a/kdevdesigner/designer/variabledialogimpl.h
+++ b/kdevdesigner/designer/variabledialogimpl.h
@@ -34,7 +34,7 @@ class TQListView;
class VariableDialog : public VariableDialogBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
VariableDialog( FormWindow *fw, TQWidget* parent = 0 );
diff --git a/kdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp
index c2ce0721..def64c17 100644
--- a/kdevdesigner/designer/widgetaction.cpp
+++ b/kdevdesigner/designer/widgetaction.cpp
@@ -35,11 +35,11 @@ static TQStyle *windowsStyle = 0;
void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
{
- if ( ::tqqt_cast<TQToolButton*>(w) && ::tqqt_cast<TQScrollView*>(container->parent()->parent()) ) {
+ if ( ::tqt_cast<TQToolButton*>(w) && ::tqt_cast<TQScrollView*>(container->parent()->parent()) ) {
if ( !windowsStyle )
windowsStyle = TQStyleFactory::create( "windows" );
w->setStyle( windowsStyle );
- ( (TQToolButton*)w )->setUsesTextLabel( TRUE );
+ ( (TQToolButton*)w )->setUsesTextLabel( true );
( (TQToolButton*)w )->setTextPosition( TQToolButton::Right );
w->setBackgroundMode( container->backgroundMode() );
}
diff --git a/kdevdesigner/designer/widgetaction.h b/kdevdesigner/designer/widgetaction.h
index 161bc8a0..b3c81368 100644
--- a/kdevdesigner/designer/widgetaction.h
+++ b/kdevdesigner/designer/widgetaction.h
@@ -31,20 +31,20 @@
class WidgetAction : public TQAction
{
- Q_OBJECT
+ TQ_OBJECT
public:
WidgetAction( const TQString &grp, TQObject* parent,
- const char* name = 0, bool toggle = FALSE )
+ const char* name = 0, bool toggle = false )
: TQAction( parent, name, toggle ) { init( grp ); }
WidgetAction( const TQString &grp, const TQString& text,
const TQIconSet& icon, const TQString& menuText, TQKeySequence accel,
- TQObject* parent, const char* name = 0, bool toggle = FALSE )
+ TQObject* parent, const char* name = 0, bool toggle = false )
: TQAction( text, icon, menuText, accel, parent, name, toggle ) { init( grp ); }
WidgetAction( const TQString &grp, const TQString& text,
const TQString& menuText, TQKeySequence accel, TQObject* parent,
- const char* name = 0, bool toggle = FALSE )
+ const char* name = 0, bool toggle = false )
: TQAction( text, menuText, accel, parent, name, toggle ) { init( grp ); }
~WidgetAction();
diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp
index 9423b6a6..595cae71 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -107,7 +107,7 @@ FormWindow *find_formwindow( TQWidget *w )
if ( !w )
return 0;
for (;;) {
- if ( ::tqqt_cast<FormWindow*>(w) )
+ if ( ::tqt_cast<FormWindow*>(w) )
return (FormWindow*)w;
if ( !w->parentWidget() )
return 0;
@@ -124,9 +124,9 @@ void TQLayoutWidget::paintEvent( TQPaintEvent* )
QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name )
- : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE )
+ : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( false )
{
- tabBar()->setAcceptDrops( TRUE );
+ tabBar()->setAcceptDrops( true );
tabBar()->installEventFilter( this );
}
@@ -170,11 +170,11 @@ int QDesignerTabWidget::count() const
bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
{
- if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE;
+ if ( o != tabBar() ) return false;
switch ( e->type() ) {
case TQEvent::MouseButtonPress: {
- mousePressed = TRUE;
+ mousePressed = true;
TQMouseEvent *me = (TQMouseEvent*)e;
pressPoint = me->pos();
}
@@ -183,7 +183,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
TQMouseEvent *me = (TQMouseEvent*)e;
if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) {
TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this );
- mousePressed = FALSE;
+ mousePressed = false;
dragPage = TQTabWidget::currentPage();
dragLabel = TQTabWidget::tabLabel( dragPage );
@@ -212,7 +212,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
if ( text == TQString::number( (long)this ) )
de->accept();
else
- return FALSE;
+ return false;
}
int index = 0;
@@ -286,7 +286,7 @@ bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e )
default:
break;
}
- return FALSE;
+ return false;
}
@@ -294,15 +294,15 @@ QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name )
: TQWidgetStack( parent, name )
{
prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" );
- prev->setAutoRaise( TRUE );
- prev->setAutoRepeat( TRUE );
+ prev->setAutoRaise( true );
+ prev->setAutoRepeat( true );
prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" );
- next->setAutoRaise( TRUE );
- next->setAutoRepeat( TRUE );
+ next->setAutoRaise( true );
+ next->setAutoRepeat( true );
next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) );
- connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) );
- connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) );
+ connect( prev, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) );
+ connect( next, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) );
updateButtons();
}
@@ -498,7 +498,7 @@ TQMap< int, TQStringList > *changedProperties = 0;
void WidgetFactory::saveDefaultProperties( TQObject *w, int id )
{
TQMap< TQString, TQVariant> propMap;
- TQStrList lst = w->metaObject()->propertyNames( TRUE );
+ TQStrList lst = w->metaObject()->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 )
@@ -517,12 +517,12 @@ void WidgetFactory::saveChangedProperties( TQObject *w, int id )
}
/*! 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 parent. 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 *parent, const char *name, bool init, const TQRect *r, TQt::Orientation orient )
{
TQString n = WidgetDatabase::className( id );
if ( n.isEmpty() )
@@ -537,18 +537,18 @@ TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, boo
TQString str = WidgetDatabase::createWidgetName( id );
const char *s = str.latin1();
w = createWidget( n, parent, name ? name : s, init, r, orient );
- if ( ::tqqt_cast<TQScrollView*>(w) )
+ if ( ::tqt_cast<TQScrollView*>(w) )
( (TQScrollView*)w )->disableSizeHintCaching();
if ( !w && WidgetDatabase::isCustomWidget( id ) )
w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) );
if ( !w )
return 0;
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( w );
if ( !defaultProperties->contains( id ) )
- saveDefaultProperties( TQT_TQOBJECT(w), id );
+ saveDefaultProperties( w, id );
if ( !changedProperties->contains( id ) )
- saveChangedProperties( TQT_TQOBJECT(w), id );
+ saveChangedProperties( w, id );
return w;
}
@@ -562,36 +562,36 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
int spacing = MainWindow::self->currentLayoutDefaultSpacing();
int margin = 0;
- int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) );
- int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) );
+ int metaspacing = MetaDataBase::spacing( widget );
+ int metamargin = MetaDataBase::margin( widget );
- if ( ::tqqt_cast<TQLayoutWidget*>(widget) &&
- ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) ||
- widget && ::tqqt_cast<FormWindow*>(widget->parentWidget()) ) )
+ if ( ::tqt_cast<TQLayoutWidget*>(widget) &&
+ ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
+ widget && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
margin = MainWindow::self->currentLayoutDefaultMargin();
- if ( !layout && ::tqqt_cast<TQTabWidget*>(widget) )
+ if ( !layout && ::tqt_cast<TQTabWidget*>(widget) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( !layout && ::tqqt_cast<TQWizard*>(widget) )
+ if ( !layout && ::tqt_cast<TQWizard*>(widget) )
widget = ((TQWizard*)widget)->currentPage();
- if ( !layout && ::tqqt_cast<TQMainWindow*>(widget) )
+ if ( !layout && ::tqt_cast<TQMainWindow*>(widget) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( !layout && ::tqqt_cast<TQWidgetStack*>(widget) )
+ if ( !layout && ::tqt_cast<TQWidgetStack*>(widget) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( !layout && ::tqqt_cast<TQToolBox*>(widget) )
+ if ( !layout && ::tqt_cast<TQToolBox*>(widget) )
widget = ((TQToolBox*)widget)->currentItem();
- MetaDataBase::addEntry( TQT_TQOBJECT(widget) );
+ MetaDataBase::addEntry( widget );
TQLayout *l = 0;
int align = 0;
- if ( !layout && ::tqqt_cast<TQGroupBox*>(widget) ) {
+ if ( !layout && ::tqt_cast<TQGroupBox*>(widget) ) {
TQGroupBox *gb = (TQGroupBox*)widget;
- gb->setColumnLayout( 0, Qt::Vertical );
+ gb->setColumnLayout( 0, TQt::Vertical );
layout = gb->layout();
layout->setMargin( 0 );
layout->setSpacing( 0 );
@@ -609,8 +609,8 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
return 0;
}
align = TQt::AlignTop;
- MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing );
+ MetaDataBase::setMargin( gb, metamargin );
+ MetaDataBase::setSpacing( gb, metaspacing );
} else {
if ( layout ) {
switch ( type ) {
@@ -626,7 +626,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
default:
return 0;
}
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
l->setSpacing( spacing );
l->setMargin( margin );
} else {
@@ -643,10 +643,10 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
default:
return 0;
}
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
if ( widget ) {
- MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin );
- MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing );
+ MetaDataBase::setMargin( widget, metamargin );
+ MetaDataBase::setSpacing( widget, metaspacing );
} else {
l->setMargin( margin );
l->setSpacing( spacing );
@@ -654,7 +654,7 @@ TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, Layou
}
}
l->setAlignment( align );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
+ MetaDataBase::addEntry( l );
return l;
}
@@ -663,15 +663,15 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
if ( !widget )
return;
- if ( ::tqqt_cast<TQTabWidget*>(widget) )
+ if ( ::tqt_cast<TQTabWidget*>(widget) )
widget = ((TQTabWidget*)widget)->currentPage();
- if ( ::tqqt_cast<TQWizard*>(widget) )
+ if ( ::tqt_cast<TQWizard*>(widget) )
widget = ((TQWizard*)widget)->currentPage();
- if ( ::tqqt_cast<TQMainWindow*>(widget) )
+ if ( ::tqt_cast<TQMainWindow*>(widget) )
widget = ((TQMainWindow*)widget)->centralWidget();
- if ( ::tqqt_cast<TQWidgetStack*>(widget) )
+ if ( ::tqt_cast<TQWidgetStack*>(widget) )
widget = ((TQWidgetStack*)widget)->visibleWidget();
- if ( ::tqqt_cast<TQToolBox*>(widget) )
+ if ( ::tqt_cast<TQToolBox*>(widget) )
widget = ((TQToolBox*)widget)->currentItem();
delete widget->layout();
}
@@ -679,14 +679,14 @@ void WidgetFactory::deleteLayout( TQWidget *widget )
/*! Factory functions for creating a widget of the type \a className
as child of \a parent with the name \a name.
- If \a init is TRUE, some initial default properties are set. This
+ 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,
- const TQRect *r, Qt::Orientation orient )
+ const TQRect *r, TQt::Orientation orient )
{
- if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) {
+ if ( className == "TQPushButton" ) {
TQPushButton *b = 0;
if ( init ) {
b = new QDesignerPushButton( parent, name );
@@ -695,15 +695,15 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
b = new QDesignerPushButton( parent, name );
}
TQWidget *w = find_formwindow( b );
- b->setAutoDefault( w && ::tqqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) );
+ b->setAutoDefault( w && ::tqt_cast<TQDialog*>(((FormWindow*)w)->mainContainer()) );
return b;
- } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQToolButton" ) {
if ( init ) {
QDesignerToolButton *tb = new QDesignerToolButton( parent, name );
- if ( ::tqqt_cast<TQToolBox*>(widgetOfContainer(parent))) {
- tb->setUsesTextLabel(TRUE);
+ if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) {
+ tb->setUsesTextLabel(true);
tb->setTextLabel("...");
- tb->setAutoRaise(TRUE);
+ tb->setAutoRaise(true);
tb->setTextPosition(TQToolButton::BesideIcon);
} else {
tb->setText( "..." );
@@ -711,29 +711,29 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return tb;
}
return new QDesignerToolButton( parent, name );
- } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQCheckBox" ) {
if ( init ) {
QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name );
cb->setText( TQString::fromLatin1( name ) );
return cb;
}
return new QDesignerCheckBox( parent, name );
- } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQRadioButton" ) {
if ( init ) {
QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name );
rb->setText( TQString::fromLatin1( name ) );
return rb;
}
return new QDesignerRadioButton( parent, name );
- } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQGroupBox" ) {
if ( init )
return new TQGroupBox( TQString::fromLatin1( name ), parent, name );
return new TQGroupBox( parent, name );
- } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQButtonGroup" ) {
if ( init )
return new TQButtonGroup( TQString::fromLatin1( name ), parent, name );
return new TQButtonGroup( parent, name );
- } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQIconView" ) {
#if !defined(TQT_NO_ICONVIEW)
TQIconView* iv = new TQIconView( parent, name );
if ( init )
@@ -742,7 +742,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
#else
return 0;
#endif
- } else if ( className == TQTABLE_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQTable" ) {
#if !defined(TQT_NO_TABLE)
if ( init )
return new TQTable( 3, 3, parent, name );
@@ -751,24 +751,24 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return 0;
#endif
#ifndef TQT_NO_SQL
- } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQDataTable" ) {
return new TQDataTable( parent, name );
#endif //TQT_NO_SQL
- } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQDateEdit" ) {
return new TQDateEdit( parent, name );
- } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQTimeEdit" ) {
return new TQTimeEdit( parent, name );
- } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQDateTimeEdit" ) {
return new TQDateTimeEdit( parent, name );
}
- else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) {
+ else if ( className == "TQListBox" ) {
TQListBox* lb = new TQListBox( parent, name );
if ( init ) {
lb->insertItem( i18n( "New Item" ) );
lb->setCurrentItem( 0 );
}
return lb;
- } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQListView" ) {
TQListView *lv = new TQListView( parent, name );
lv->setSorting( -1 );
if ( init ) {
@@ -776,152 +776,144 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) );
}
return lv;
- } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING )
+ } else if ( className == "TQLineEdit" )
return new TQLineEdit( parent, name );
- else if ( className == TQSPINBOX_OBJECT_NAME_STRING )
+ else if ( className == "TQSpinBox" )
return new TQSpinBox( parent, name );
- else if ( className == TQSPLITTER_OBJECT_NAME_STRING )
+ else if ( className == "TQSplitter" )
return new TQSplitter( parent, name );
- else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING )
+ else if ( className == "TQMultiLineEdit" )
return new TQMultiLineEdit( parent, name );
- else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING )
+ else if ( className == "TQTextEdit" )
return new TQTextEdit( parent, name );
- else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) {
+ else if ( className == "TQLabel" || className == "TextLabel" ) {
QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) {
l->setText( TQString::fromLatin1( name ) );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE );
+ MetaDataBase::addEntry( l );
+ MetaDataBase::setPropertyChanged( l, "text", true );
}
return l;
} else if ( className == "PixmapLabel" ) {
QDesignerLabel *l = new QDesignerLabel( parent, name );
if ( init ) {
l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) );
- l->setScaledContents( TRUE );
- MetaDataBase::addEntry( TQT_TQOBJECT(l) );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE );
+ l->setScaledContents( true );
+ MetaDataBase::addEntry( l );
+ MetaDataBase::setPropertyChanged( l, "pixmap", true );
+ MetaDataBase::setPropertyChanged( l, "scaledContents", true );
}
return l;
- } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
+ } else if ( className == "TQLayoutWidget" )
return new TQLayoutWidget( parent, name );
- else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) {
+ else if ( className == "TQTabWidget" ) {
TQTabWidget *tw = new QDesignerTabWidget( parent, name );
if ( init ) {
FormWindow *fw = find_formwindow( parent );
TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 1") );
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( w );
w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" );
tw->addTab( w, i18n("Tab 2") );
- MetaDataBase::addEntry( TQT_TQOBJECT(tw) );
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( tw );
+ MetaDataBase::addEntry( w );
}
return tw;
- } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQWidgetStack" ) {
QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name );
if ( init ) {
FormWindow *fw = find_formwindow( parent );
TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" );
ws->insertPage( w );
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
- MetaDataBase::addEntry( TQT_TQOBJECT(ws) );
+ MetaDataBase::addEntry( w );
+ MetaDataBase::addEntry( ws );
}
return ws;
- } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) {
- return new TQComboBox( FALSE, parent, name );
- } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQComboBox" ) {
+ return new TQComboBox( false, parent, name );
+ } else if ( className == "TQWidget" ) {
if ( parent &&
- ( ::tqqt_cast<FormWindow*>(parent) ||
- ::tqqt_cast<TQWizard*>(parent) ||
- ::tqqt_cast<TQTabWidget*>(parent) ||
- ::tqqt_cast<TQWidgetStack*>(parent) ||
- ::tqqt_cast<TQToolBox*>(parent) ||
- ::tqqt_cast<TQMainWindow*>(parent) ) ) {
+ ( ::tqt_cast<FormWindow*>(parent) ||
+ ::tqt_cast<TQWizard*>(parent) ||
+ ::tqt_cast<TQTabWidget*>(parent) ||
+ ::tqt_cast<TQWidgetStack*>(parent) ||
+ ::tqt_cast<TQToolBox*>(parent) ||
+ ::tqt_cast<TQMainWindow*>(parent) ) ) {
FormWindow *fw = find_formwindow( parent );
if ( fw ) {
QDesignerWidget *dw = new QDesignerWidget( fw, parent, name );
- MetaDataBase::addEntry( TQT_TQOBJECT(dw) );
+ MetaDataBase::addEntry( dw );
return dw;
}
}
return new TQWidget( parent, name );
- } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQDialog" ) {
TQDialog *dia = 0;
- if ( ::tqqt_cast<FormWindow*>(parent) )
+ if ( ::tqt_cast<FormWindow*>(parent) )
dia = new QDesignerDialog( (FormWindow*)parent, parent, name );
else
dia = new TQDialog( parent, name );
-#if defined(TQT_NON_COMMERCIAL)
- if ( ::tqqt_cast<MainWindow*>(parent) )
-#else
if ( parent )
-#endif
- dia->reparent( parent, TQPoint( 0, 0 ), TRUE );
+ dia->reparent( parent, TQPoint( 0, 0 ), true );
return dia;
- } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQWizard" ) {
TQWizard *wiz = new QDesignerWizard( parent, name );
-#if defined(TQT_NON_COMMERCIAL)
- if ( ::tqqt_cast<MainWindow*>(parent) )
-#else
if ( parent )
-#endif
- wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
- if ( init && ::tqqt_cast<FormWindow*>(parent) ) {
+ wiz->reparent( parent, TQPoint( 0, 0 ), true );
+ if ( init && ::tqt_cast<FormWindow*>(parent) ) {
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
- MetaDataBase::addEntry( TQT_TQOBJECT(dw) );
+ MetaDataBase::addEntry( dw );
wiz->addPage( dw, i18n( "Page" ) );
- TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) );
+ TQTimer::singleShot( 0, wiz, TQ_SLOT( next() ) );
}
return wiz;
} else if ( className == "Spacer" ) {
Spacer *s = new Spacer( parent, name );
- MetaDataBase::addEntry( TQT_TQOBJECT(s) );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE );
+ MetaDataBase::addEntry( s );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
+ MetaDataBase::setPropertyChanged( s, "sizeType", true );
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::Vertical );
+ s->setOrientation( TQt::Vertical );
else
- s->setOrientation( Qt::Horizontal );
+ s->setOrientation( TQt::Horizontal );
return s;
- } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING )
+ } else if ( className == "TQLCDNumber" )
return new TQLCDNumber( parent, name );
- else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING )
+ else if ( className == "TQProgressBar" )
return new TQProgressBar( parent, name );
- else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING )
+ else if ( className == "TQTextView" )
return new TQTextView( parent, name );
- else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING )
+ else if ( className == "TQTextBrowser" )
return new TQTextBrowser( parent, name );
- else if ( className == TQDIAL_OBJECT_NAME_STRING )
+ else if ( className == "TQDial" )
return new TQDial( parent, name );
- else if ( className == TQSLIDER_OBJECT_NAME_STRING ) {
+ else if ( className == "TQSlider" ) {
TQSlider *s = new TQSlider( parent, 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( TQT_TQOBJECT(s) );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE );
+ s->setOrientation( TQt::Horizontal );
+ MetaDataBase::addEntry( s );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
- } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQScrollBar" ) {
TQScrollBar *s = new TQScrollBar( parent, 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( TQT_TQOBJECT(s) );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE );
+ s->setOrientation( TQt::Horizontal );
+ MetaDataBase::addEntry( s );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
- } else if ( className == TQFRAME_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQFrame" ) {
if ( !init )
return new TQFrame( parent, name );
TQFrame *f = new TQFrame( parent, name );
@@ -929,28 +921,28 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return f;
} else if ( className == "Line" ) {
Line *l = new Line( parent, 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 );
+ MetaDataBase::addEntry( l );
+ MetaDataBase::setPropertyChanged( l, "orientation", true );
+ MetaDataBase::setPropertyChanged( l, "frameShadow", true );
+ MetaDataBase::setPropertyChanged( l, "frameShape", true );
if ( !r )
return l;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
l->setOrientation( orient );
else if ( r->width() < r->height() )
- l->setOrientation( Qt::Vertical );
+ l->setOrientation( TQt::Vertical );
return l;
- } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQMainWindow" ) {
TQMainWindow *mw = new TQMainWindow( parent, name, 0 );
- mw->setDockEnabled( TQt::DockMinimized, FALSE );
+ mw->setDockEnabled( TQt::DockMinimized, false );
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" );
- mw->setDockMenuEnabled( FALSE );
- MetaDataBase::addEntry( TQT_TQOBJECT(dw) );
+ mw->setDockMenuEnabled( false );
+ MetaDataBase::addEntry( dw );
mw->setCentralWidget( dw );
(void)mw->statusBar();
dw->show();
return mw;
- } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQToolBox" ) {
if ( !init )
return new QDesignerToolBox( parent, name );
TQToolBox *tb = new QDesignerToolBox( parent, name );
@@ -958,23 +950,23 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) :
new TQWidget( tb, "page1" );
tb->addItem( w, i18n("Page 1") );
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( w );
w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" );
tb->addItem( w, i18n("Page 2") );
- MetaDataBase::addEntry( TQT_TQOBJECT(tb) );
- MetaDataBase::addEntry( TQT_TQOBJECT(w) );
+ MetaDataBase::addEntry( tb );
+ MetaDataBase::addEntry( w );
return tb;
}
#ifndef TQT_NO_SQL
- else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) {
+ else if ( className == "TQDataBrowser" ) {
TQWidget *w = new QDesignerDataBrowser( parent, name );
if ( parent )
- w->reparent( parent, TQPoint( 0, 0 ), TRUE );
+ w->reparent( parent, TQPoint( 0, 0 ), true );
return w;
- } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) {
+ } else if ( className == "TQDataView" ) {
TQWidget *w = new QDesignerDataView( parent, name );
if ( parent )
- w->reparent( parent, TQPoint( 0, 0 ), TRUE );
+ w->reparent( parent, TQPoint( 0, 0 ), true );
return w;
}
#endif
@@ -1010,37 +1002,37 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
{
layout = 0;
- if ( ::tqqt_cast<TQTabWidget*>(w) )
+ if ( ::tqt_cast<TQTabWidget*>(w) )
w = ((TQTabWidget*)w)->currentPage();
- if ( ::tqqt_cast<TQWizard*>(w) )
+ if ( ::tqt_cast<TQWizard*>(w) )
w = ((TQWizard*)w)->currentPage();
- if ( ::tqqt_cast<TQMainWindow*>(w) )
+ if ( ::tqt_cast<TQMainWindow*>(w) )
w = ((TQMainWindow*)w)->centralWidget();
- if ( ::tqqt_cast<TQWidgetStack*>(w) )
+ if ( ::tqt_cast<TQWidgetStack*>(w) )
w = ((TQWidgetStack*)w)->visibleWidget();
- if ( ::tqqt_cast<TQToolBox*>(w) )
+ if ( ::tqt_cast<TQToolBox*>(w) )
w = ((TQToolBox*)w)->currentItem();
- if ( ::tqqt_cast<TQSplitter*>(w) )
- return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox;
+ if ( ::tqt_cast<TQSplitter*>(w) )
+ return ( (TQSplitter*)w )->orientation() ==TQt::Horizontal ? HBox : VBox;
if ( !w || !w->layout() )
return NoLayout;
TQLayout *lay = w->layout();
- if ( ::tqqt_cast<TQGroupBox*>(w) ) {
- TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING );
+ if ( ::tqt_cast<TQGroupBox*>(w) ) {
+ TQObjectList *l = lay->queryList( "TQLayout" );
if ( l && l->first() )
lay = (TQLayout*)l->first();
delete l;
}
layout = lay;
- if ( ::tqqt_cast<TQHBoxLayout*>(lay) )
+ if ( ::tqt_cast<TQHBoxLayout*>(lay) )
return HBox;
- else if ( ::tqqt_cast<TQVBoxLayout*>(lay) )
+ else if ( ::tqt_cast<TQVBoxLayout*>(lay) )
return VBox;
- else if ( ::tqqt_cast<TQGridLayout*>(lay) )
+ else if ( ::tqt_cast<TQGridLayout*>(lay) )
return Grid;
return NoLayout;
}
@@ -1050,11 +1042,11 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&lay
*/
WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout )
{
- if ( ::tqqt_cast<TQHBoxLayout*>(layout) )
+ if ( ::tqt_cast<TQHBoxLayout*>(layout) )
return HBox;
- else if ( ::tqqt_cast<TQVBoxLayout*>(layout) )
+ else if ( ::tqt_cast<TQVBoxLayout*>(layout) )
return VBox;
- else if ( ::tqqt_cast<TQGridLayout*>(layout) )
+ else if ( ::tqt_cast<TQGridLayout*>(layout) )
return Grid;
return NoLayout;
}
@@ -1071,7 +1063,7 @@ WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w )
TQWidget *WidgetFactory::layoutParent( TQLayout *layout )
{
- TQObject *o = TQT_TQOBJECT(layout);
+ TQObject *o = layout;
while ( o ) {
if ( o->isWidgetType() )
return (TQWidget*)o;
@@ -1093,15 +1085,15 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
{
if ( !w )
return w;
- if ( ::tqqt_cast<TQTabWidget*>(w) )
+ if ( ::tqt_cast<TQTabWidget*>(w) )
return ((TQTabWidget*)w)->currentPage();
- if ( ::tqqt_cast<TQWizard*>(w) )
+ if ( ::tqt_cast<TQWizard*>(w) )
return ((TQWizard*)w)->currentPage();
- if ( ::tqqt_cast<TQWidgetStack*>(w) )
+ if ( ::tqt_cast<TQWidgetStack*>(w) )
return ((TQWidgetStack*)w)->visibleWidget();
- if ( ::tqqt_cast<TQToolBox*>(w) )
+ if ( ::tqt_cast<TQToolBox*>(w) )
return ((TQToolBox*)w)->currentItem();
- if ( ::tqqt_cast<TQMainWindow*>(w) )
+ if ( ::tqt_cast<TQMainWindow*>(w) )
return ((TQMainWindow*)w)->centralWidget();
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) )
@@ -1133,16 +1125,16 @@ TQWidget* WidgetFactory::containerOfWidget( TQWidget *w )
TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
{
- if ( w && ::tqqt_cast<TQWidgetStack*>(w->parentWidget()) )
+ if ( w && ::tqt_cast<TQWidgetStack*>(w->parentWidget()) )
w = w->parentWidget();
if ( w->parentWidget() && w->parentWidget()->parentWidget() &&
w->parentWidget()->parentWidget()->parentWidget() &&
- ::tqqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
+ ::tqt_cast<TQToolBox*>(w->parentWidget()->parentWidget()->parentWidget()) )
return w->parentWidget()->parentWidget()->parentWidget();
while ( w ) {
- int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) );
+ int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) );
if ( WidgetDatabase::isContainer( id ) ||
- w && ::tqqt_cast<FormWindow*>(w->parentWidget()) )
+ w && ::tqt_cast<FormWindow*>(w->parentWidget()) )
return w;
w = w->parentWidget();
}
@@ -1153,58 +1145,58 @@ TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w )
Returns whether \a o is a passive interactor or not.
*/
-bool WidgetFactory::lastWasAPassiveInteractor = FALSE;
+bool WidgetFactory::lastWasAPassiveInteractor = false;
TQGuardedPtr<TQObject> *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr<TQObject>();
bool WidgetFactory::isPassiveInteractor( TQObject* o )
{
if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o )
return lastWasAPassiveInteractor;
- lastWasAPassiveInteractor = FALSE;
+ lastWasAPassiveInteractor = false;
(*lastPassiveInteractor) = 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 ( lastWasAPassiveInteractor = TRUE );
-
- if ( ::tqqt_cast<TQTabBar*>(o) )
- return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::tqqt_cast<TQSizeGrip*>(o) )
- return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::tqqt_cast<TQButton*>(o) &&
- ( ::tqqt_cast<TQTabBar*>(o->parent()) || ::tqqt_cast<TQToolBox*>(o->parent()) ) )
- return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::tqqt_cast<TQPushButton*>(o) && ::tqqt_cast<TQWizard*>(o->parent()) )
- return ( lastWasAPassiveInteractor = TRUE );
- else if ( ::tqqt_cast<TQMenuBar*>(o) && ::tqqt_cast<TQMainWindow*>(o->parent()) )
- return ( lastWasAPassiveInteractor = TRUE );
-// else if ( ::tqqt_cast<TQDockWindowHandle*>(o) )
- else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) )
- return ( lastWasAPassiveInteractor = TRUE );
-// else if ( ::tqqt_cast<TQHideDock*>(o) )
- else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
+
+ if ( ::tqt_cast<TQTabBar*>(o) )
+ return ( lastWasAPassiveInteractor = true );
+ else if ( ::tqt_cast<TQSizeGrip*>(o) )
+ return ( lastWasAPassiveInteractor = true );
+ else if ( ::tqt_cast<TQButton*>(o) &&
+ ( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) )
+ return ( lastWasAPassiveInteractor = true );
+ else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) )
+ return ( lastWasAPassiveInteractor = true );
+ else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) )
+ return ( lastWasAPassiveInteractor = true );
+// else if ( ::tqt_cast<TQDockWindowHandle*>(o) )
+ else if ( o->inherits( "TQDockWindowHandle" ) )
+ return ( lastWasAPassiveInteractor = true );
+// else if ( ::tqt_cast<TQHideDock*>(o) )
+ else if ( o->inherits( "TQHideDock" ) )
+ return ( lastWasAPassiveInteractor = true );
else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
if ( !o->isWidgetType() )
- return ( lastWasAPassiveInteractor = FALSE );
+ return ( lastWasAPassiveInteractor = false );
WidgetInterface *iface = 0;
TQWidget *w = (TQWidget*)o;
- while ( !iface && w && !::tqqt_cast<FormWindow*>(w) ) {
+ while ( !iface && w && !::tqt_cast<FormWindow*>(w) ) {
widgetManager()->queryInterface( classNameOf( w ), &iface );
w = w->parentWidget();
}
if ( !iface )
- return ( lastWasAPassiveInteractor = FALSE );
+ return ( lastWasAPassiveInteractor = false );
TQWidgetContainerInterfacePrivate *iface2 = 0;
iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 );
if ( !iface2 )
- return ( lastWasAPassiveInteractor = FALSE );
+ return ( lastWasAPassiveInteractor = false );
TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o );
if ( !fw )
- return ( lastWasAPassiveInteractor = FALSE );
+ return ( lastWasAPassiveInteractor = false );
TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o );
if ( !dw )
- return ( lastWasAPassiveInteractor = FALSE );
+ return ( lastWasAPassiveInteractor = false );
lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o );
iface2->release();
iface->release();
@@ -1222,76 +1214,76 @@ const char* WidgetFactory::classNameOf( TQObject* o )
return o->className();
if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className())))
return o->className();
- else if ( ::tqqt_cast<QDesignerTabWidget*>(o) )
- return TQTABWIDGET_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerWidgetStack*>(o) )
- return TQWIDGETSTACK_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<TQWidgetStack*>(o) )
+ else if ( ::tqt_cast<QDesignerTabWidget*>(o) )
+ return "TQTabWidget";
+ else if ( ::tqt_cast<QDesignerWidgetStack*>(o) )
+ return "TQWidgetStack";
+ else if ( ::tqt_cast<TQWidgetStack*>(o) )
return "TQWeDoNotWantToBreakTabWidget";
- else if ( ::tqqt_cast<QDesignerDialog*>(o) )
- return TQDIALOG_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerWidget*>(o) )
- return TQWIDGET_OBJECT_NAME_STRING;
+ else if ( ::tqt_cast<QDesignerDialog*>(o) )
+ return "TQDialog";
+ else if ( ::tqt_cast<QDesignerWidget*>(o) )
+ return "TQWidget";
else if ( o->inherits( "CustomWidget" ) )
return ( (CustomWidget*)o )->realClassName().latin1();
- else if ( ::tqqt_cast<QDesignerLabel*>(o) )
- return TQLABEL_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerWizard*>(o) )
- return TQWIZARD_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerPushButton*>(o) )
- return TQPUSHBUTTON_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerToolButton*>(o) )
- return TQTOOLBUTTON_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerRadioButton*>(o) )
- return TQRADIOBUTTON_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerCheckBox*>(o) )
- return TQCHECKBOX_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<MenuBarEditor*>(o) )
- return TQMENUBAR_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerToolBar*>(o) )
- return TQTOOLBAR_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerAction*>(o) )
- return TQACTION_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerActionGroup*>(o) )
- return TQACTIONGROUP_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<PopupMenuEditor*>(o) )
- return TQPOPUPMENU_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerToolBox*>(o) )
- return TQTOOLBOX_OBJECT_NAME_STRING;
+ else if ( ::tqt_cast<QDesignerLabel*>(o) )
+ return "TQLabel";
+ else if ( ::tqt_cast<QDesignerWizard*>(o) )
+ return "TQWizard";
+ else if ( ::tqt_cast<QDesignerPushButton*>(o) )
+ return "TQPushButton";
+ else if ( ::tqt_cast<QDesignerToolButton*>(o) )
+ return "TQToolButton";
+ else if ( ::tqt_cast<QDesignerRadioButton*>(o) )
+ return "TQRadioButton";
+ else if ( ::tqt_cast<QDesignerCheckBox*>(o) )
+ return "TQCheckBox";
+ else if ( ::tqt_cast<MenuBarEditor*>(o) )
+ return "TQMenuBar";
+ else if ( ::tqt_cast<QDesignerToolBar*>(o) )
+ return "TQToolBar";
+ else if ( ::tqt_cast<QDesignerAction*>(o) )
+ return "TQAction";
+ else if ( ::tqt_cast<QDesignerActionGroup*>(o) )
+ return "TQActionGroup";
+ else if ( ::tqt_cast<PopupMenuEditor*>(o) )
+ return "TQPopupMenu";
+ else if ( ::tqt_cast<QDesignerToolBox*>(o) )
+ return "TQToolBox";
#ifndef TQT_NO_SQL
- else if ( ::tqqt_cast<QDesignerDataBrowser*>(o) )
- return TQDATABROWSER_OBJECT_NAME_STRING;
- else if ( ::tqqt_cast<QDesignerDataView*>(o) )
- return TQDATAVIEW_OBJECT_NAME_STRING;
+ else if ( ::tqt_cast<QDesignerDataBrowser*>(o) )
+ return "TQDataBrowser";
+ else if ( ::tqt_cast<QDesignerDataView*>(o) )
+ return "TQDataView";
#endif
return o->className();
}
TQString WidgetFactory::defaultSignal( TQObject *w )
{
- if ( ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQCheckBox*>(w) )
+ if ( ::tqt_cast<TQRadioButton*>(w) || ::tqt_cast<TQCheckBox*>(w) )
return "toggled";
- else if ( ::tqqt_cast<TQButton*>(w) || ::tqqt_cast<TQButtonGroup*>(w) )
+ else if ( ::tqt_cast<TQButton*>(w) || ::tqt_cast<TQButtonGroup*>(w) )
return "clicked";
- else if ( ::tqqt_cast<TQTextBrowser*>(w) )
+ else if ( ::tqt_cast<TQTextBrowser*>(w) )
return "linkClicked";
- else if ( ::tqqt_cast<TQLineEdit*>(w) || ::tqqt_cast<TQTextEdit*>(w) )
+ else if ( ::tqt_cast<TQLineEdit*>(w) || ::tqt_cast<TQTextEdit*>(w) )
return "textChanged";
- else if ( ::tqqt_cast<TQListView*>(w) || ::tqqt_cast<TQIconView*>(w) ||
- ::tqqt_cast<TQListBox*>(w) || ::tqqt_cast<TQTable*>(w) )
+ else if ( ::tqt_cast<TQListView*>(w) || ::tqt_cast<TQIconView*>(w) ||
+ ::tqt_cast<TQListBox*>(w) || ::tqt_cast<TQTable*>(w) )
return "selectionChanged";
- else if ( ::tqqt_cast<TQTabWidget*>(w) )
+ else if ( ::tqt_cast<TQTabWidget*>(w) )
return "selected";
- else if ( ::tqqt_cast<TQToolBox*>(w) )
+ else if ( ::tqt_cast<TQToolBox*>(w) )
return "currentChanged";
- else if ( ::tqqt_cast<TQWidgetStack*>(w) )
+ else if ( ::tqt_cast<TQWidgetStack*>(w) )
return "aboutToShow";
- else if ( ::tqqt_cast<TQSpinBox*>(w) || ::tqqt_cast<TQSlider*>(w) ||
- ::tqqt_cast<TQScrollBar*>(w) || ::tqqt_cast<TQDateEdit*>(w) ||
- ::tqqt_cast<TQTimeEdit*>(w) || ::tqqt_cast<TQDateTimeEdit*>(w) ||
- ::tqqt_cast<TQDial*>(w) )
+ else if ( ::tqt_cast<TQSpinBox*>(w) || ::tqt_cast<TQSlider*>(w) ||
+ ::tqt_cast<TQScrollBar*>(w) || ::tqt_cast<TQDateEdit*>(w) ||
+ ::tqt_cast<TQTimeEdit*>(w) || ::tqt_cast<TQDateTimeEdit*>(w) ||
+ ::tqt_cast<TQDial*>(w) )
return "valueChanged";
- else if ( ::tqqt_cast<TQComboBox*>(w) )
+ else if ( ::tqt_cast<TQComboBox*>(w) )
return "activated";
return TQString();
}
@@ -1306,50 +1298,50 @@ void WidgetFactory::initChangedProperties( TQObject *o )
if ( MainWindow::self && MainWindow::self->currProject() &&
MainWindow::self->currProject()->fakeFormFileFor( o ) )
return;
- MetaDataBase::setPropertyChanged( o, "name", TRUE );
- if ( !::tqqt_cast<QDesignerToolBar*>(o) && !::tqqt_cast<MenuBarEditor*>(o) )
- MetaDataBase::setPropertyChanged( o, "geometry", TRUE );
-
- if ( ::tqqt_cast<TQPushButton*>(o) ||
- ::tqqt_cast<TQRadioButton*>(o) ||
- ::tqqt_cast<TQCheckBox*>(o) ||
- ::tqqt_cast<TQToolButton*>(o) ) {
- if (::tqqt_cast<TQToolButton*>(o) && ::tqqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
- MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE );
- MetaDataBase::setPropertyChanged( o, "textLabel", TRUE );
- MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE );
- MetaDataBase::setPropertyChanged( o, "textPosition", TRUE );
+ MetaDataBase::setPropertyChanged( o, "name", true );
+ if ( !::tqt_cast<QDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) )
+ MetaDataBase::setPropertyChanged( o, "geometry", true );
+
+ if ( ::tqt_cast<TQPushButton*>(o) ||
+ ::tqt_cast<TQRadioButton*>(o) ||
+ ::tqt_cast<TQCheckBox*>(o) ||
+ ::tqt_cast<TQToolButton*>(o) ) {
+ if (::tqt_cast<TQToolButton*>(o) && ::tqt_cast<TQToolBox*>(widgetOfContainer((TQWidget*)o->parent()))) {
+ MetaDataBase::setPropertyChanged( o, "usesTextLabel", true );
+ MetaDataBase::setPropertyChanged( o, "textLabel", true );
+ MetaDataBase::setPropertyChanged( o, "autoRaise", true );
+ MetaDataBase::setPropertyChanged( o, "textPosition", true );
} else {
- MetaDataBase::setPropertyChanged( o, "text", TRUE );
+ MetaDataBase::setPropertyChanged( o, "text", true );
}
}
- else if ( ::tqqt_cast<TQGroupBox*>(o) )
- MetaDataBase::setPropertyChanged( o, "title", TRUE );
- else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) {
- MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );
- MetaDataBase::setPropertyChanged( o, "frameShape", TRUE );
- } else if ( ::tqqt_cast<TQTabWidget*>(o) || ::tqqt_cast<TQWizard*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE );
- MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
- MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
- } else if ( ::tqqt_cast<TQWidgetStack*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "currentPage", TRUE );
- MetaDataBase::setPropertyChanged( o, "pageName", TRUE );
- } else if ( ::tqqt_cast<TQToolBox*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE );
+ else if ( ::tqt_cast<TQGroupBox*>(o) )
+ MetaDataBase::setPropertyChanged( o, "title", true );
+ else if ( o->isA( "TQFrame" ) ) {
+ MetaDataBase::setPropertyChanged( o, "frameShadow", true );
+ MetaDataBase::setPropertyChanged( o, "frameShape", true );
+ } else if ( ::tqt_cast<TQTabWidget*>(o) || ::tqt_cast<TQWizard*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "pageTitle", true );
+ MetaDataBase::setPropertyChanged( o, "pageName", true );
+ MetaDataBase::setPropertyChanged( o, "currentPage", true );
+ } else if ( ::tqt_cast<TQWidgetStack*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "currentPage", true );
+ MetaDataBase::setPropertyChanged( o, "pageName", true );
+ } else if ( ::tqt_cast<TQToolBox*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "currentIndex", true );
+ MetaDataBase::setPropertyChanged( o, "itemName", true );
+ MetaDataBase::setPropertyChanged( o, "itemLabel", true );
+ MetaDataBase::setPropertyChanged( o, "itemIconSet", true );
+ MetaDataBase::setPropertyChanged( o, "itemToolTip", true );
+ MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", true );
#ifndef TQT_NO_TABLE
- } else if ( ::tqqt_cast<TQTable*>(o) ) {
+ } else if ( ::tqt_cast<TQTable*>(o) ) {
# ifndef TQT_NO_SQL
- if (!::tqqt_cast<TQDataTable*>(o) )
+ if (!::tqt_cast<TQDataTable*>(o) )
# endif
{
- MetaDataBase::setPropertyChanged( o, "numRows", TRUE );
- MetaDataBase::setPropertyChanged( o, "numCols", TRUE );
+ MetaDataBase::setPropertyChanged( o, "numRows", true );
+ MetaDataBase::setPropertyChanged( o, "numCols", true );
TQTable *t = (TQTable*)o;
for ( int i = 0; i < 3; ++i ) {
t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) );
@@ -1357,14 +1349,14 @@ void WidgetFactory::initChangedProperties( TQObject *o )
}
}
#endif
- } else if ( ::tqqt_cast<TQSplitter*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "orientation", TRUE );
- } else if ( ::tqqt_cast<QDesignerToolBar*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "label", TRUE );
- } else if ( ::tqqt_cast<MenuBarEditor*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "itemName", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE );
- MetaDataBase::setPropertyChanged( o, "itemText", TRUE );
+ } else if ( ::tqt_cast<TQSplitter*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "orientation", true );
+ } else if ( ::tqt_cast<QDesignerToolBar*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "label", true );
+ } else if ( ::tqt_cast<MenuBarEditor*>(o) ) {
+ MetaDataBase::setPropertyChanged( o, "itemName", true );
+ MetaDataBase::setPropertyChanged( o, "itemNumber", true );
+ MetaDataBase::setPropertyChanged( o, "itemText", true );
}
}
@@ -1373,19 +1365,19 @@ bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget )
TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) )
- return TRUE;
+ return true;
if ( className.contains( "ComboBox" ) )
- return TRUE;
+ return true;
if ( className.contains( "ListView" ) )
- return TRUE;
+ return true;
if ( className.contains( "IconView" ) )
- return TRUE;
- if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING )
- return TRUE;
- if ( ::tqqt_cast<TQTable*>(editorWidget) != 0 )
- return TRUE;
+ return true;
+ if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
+ return true;
+ if ( ::tqt_cast<TQTable*>(editorWidget) != 0 )
+ return true;
- return FALSE;
+ return false;
}
bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
@@ -1394,10 +1386,10 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
- ::tqqt_cast<TQTable*>(editorWidget) != 0 )
- return TRUE;
+ ::tqt_cast<TQTable*>(editorWidget) != 0 )
+ return true;
- return FALSE;
+ return false;
}
void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
@@ -1405,7 +1397,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
TQString className = WidgetDatabase::className( id );
if ( className.contains( "ListBox" ) ) {
- if ( !::tqqt_cast<TQListBox*>(editWidget) )
+ if ( !::tqt_cast<TQListBox*>(editWidget) )
return;
ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw );
e->exec();
@@ -1414,7 +1406,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if ( className.contains( "ComboBox" ) ) {
- if ( !::tqqt_cast<TQComboBox*>(editWidget) )
+ if ( !::tqt_cast<TQComboBox*>(editWidget) )
return;
TQComboBox *cb = (TQComboBox*)editWidget;
ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw );
@@ -1425,7 +1417,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if ( className.contains( "ListView" ) ) {
- if ( !::tqqt_cast<TQListView*>(editWidget) )
+ if ( !::tqt_cast<TQListView*>(editWidget) )
return;
TQListView *lv = (TQListView*)editWidget;
ListViewEditor *e = new ListViewEditor( parent, lv, fw );
@@ -1435,7 +1427,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if ( className.contains( "IconView" ) ) {
- if ( !::tqqt_cast<TQIconView*>(editWidget) )
+ if ( !::tqt_cast<TQIconView*>(editWidget) )
return;
IconViewEditor *e = new IconViewEditor( parent, editWidget, fw );
e->exec();
@@ -1443,14 +1435,14 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
return;
}
- if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) {
- MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw );
+ if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) {
+ MultiLineEditor *e = new MultiLineEditor( false, true, parent, editWidget, fw );
e->exec();
delete e;
return;
}
#ifndef TQT_NO_TABLE
- if (::tqqt_cast<TQTable*>(editWidget) != 0) {
+ if (::tqt_cast<TQTable*>(editWidget) != 0) {
TableEditor *e = new TableEditor( parent, editWidget, fw );
e->exec();
delete e;
@@ -1462,7 +1454,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
{
if ( propName == "name" || propName == "geometry" )
- return FALSE;
+ return false;
TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) );
return l.findIndex( propName ) == -1;
}
@@ -1470,9 +1462,9 @@ bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName )
bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->
- findProperty( propName, TRUE ), TRUE );
+ findProperty( propName, true ), true );
if (!p )
- return FALSE;
+ return false;
return p->reset( w );
}
@@ -1497,7 +1489,7 @@ TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName )
TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName )
{
const TQMetaProperty *p = w->metaObject()->
- property( w->metaObject()->findProperty( propName, TRUE ), TRUE );
+ property( w->metaObject()->findProperty( propName, true ), true );
if ( !p ) {
int v = defaultValue( w, "alignment" ).toInt();
if ( propName == "hAlign" ) {
@@ -1536,8 +1528,8 @@ TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name,
TQVariant WidgetFactory::property( TQObject *w, const char *name )
{
- int id = w->metaObject()->findProperty( name, TRUE );
- const TQMetaProperty* p = w->metaObject()->property( id, TRUE );
+ int id = w->metaObject()->findProperty( name, true );
+ const TQMetaProperty* p = w->metaObject()->property( id, true );
if ( !p || !p->isValid() )
return MetaDataBase::fakeProperty( w, name );
return w->property( name );
@@ -1549,7 +1541,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE );
+ TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;
@@ -1633,15 +1625,15 @@ void TQLayoutWidget::updateSizePolicy()
if ( parent() && parent()->isWidgetType() ) {
parentLayout = ((TQWidget *)parent())->layout();
if ( parentLayout &&
- ::tqqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) )
+ ::tqt_cast<TQLayoutWidget*>(parentLayout->mainWidget()) )
parentLayout = 0;
}
TQObjectListIt it( childrenListObject() );
TQObject *o;
- if ( ::tqqt_cast<TQVBoxLayout*>(layout()) ) {
- if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) )
+ if ( ::tqt_cast<TQVBoxLayout*>(layout()) ) {
+ if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) )
vt = TQSizePolicy::Minimum;
else
vt = TQSizePolicy::Fixed;
@@ -1661,8 +1653,8 @@ void TQLayoutWidget::updateSizePolicy()
if ( w->sizePolicy().mayShrinkVertically() )
vt |= TQSizePolicy::Maximum;
}
- } else if ( ::tqqt_cast<TQHBoxLayout*>(layout()) ) {
- if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) )
+ } else if ( ::tqt_cast<TQHBoxLayout*>(layout()) ) {
+ if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) )
ht = TQSizePolicy::Minimum;
else
ht = TQSizePolicy::Fixed;
@@ -1682,13 +1674,13 @@ void TQLayoutWidget::updateSizePolicy()
if ( !w->sizePolicy().mayShrinkVertically() )
vt &= ~TQSizePolicy::Maximum;
}
- } else if ( ::tqqt_cast<TQGridLayout*>(layout()) ) {
+ } else if ( ::tqt_cast<TQGridLayout*>(layout()) ) {
ht = TQSizePolicy::Fixed;
vt = TQSizePolicy::Fixed;
if ( parentLayout ) {
- if ( ::tqqt_cast<TQVBoxLayout*>(parentLayout) )
+ if ( ::tqt_cast<TQVBoxLayout*>(parentLayout) )
ht = TQSizePolicy::Minimum;
- else if ( ::tqqt_cast<TQHBoxLayout*>(parentLayout) )
+ else if ( ::tqt_cast<TQHBoxLayout*>(parentLayout) )
vt = TQSizePolicy::Minimum;
}
@@ -1708,17 +1700,9 @@ void TQLayoutWidget::updateSizePolicy()
vt |= TQSizePolicy::Maximum;
}
}
-#ifdef USE_QT4
- if ( layout()->expanding() & TQSizePolicy::Horizontally )
-#else // USE_QT4
if ( layout()->expanding() & TQSizePolicy::Horizontally )
-#endif // USE_QT4
ht = TQSizePolicy::Expanding;
-#ifdef USE_QT4
- if ( layout()->expanding() & TQSizePolicy::Vertically )
-#else // USE_QT4
if ( layout()->expanding() & TQSizePolicy::Vertically )
-#endif // USE_QT4
vt = TQSizePolicy::Expanding;
layout()->invalidate();
@@ -1730,7 +1714,7 @@ void TQLayoutWidget::updateSizePolicy()
void CustomWidget::paintEvent( TQPaintEvent *e )
{
- if ( ::tqqt_cast<FormWindow*>(parentWidget()) ) {
+ if ( ::tqt_cast<FormWindow*>(parentWidget()) ) {
( (FormWindow*)parentWidget() )->paintGrid( this, e );
} else {
TQPainter p( this );
diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h
index feebe9c7..cddc84d3 100644
--- a/kdevdesigner/designer/widgetfactory.h
+++ b/kdevdesigner/designer/widgetfactory.h
@@ -76,7 +76,7 @@ public:
NoLayout
};
- static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = TRUE,
+ static TQWidget *create( int id, TQWidget *parent, const char *name = 0, bool init = true,
const TQRect *rect = 0, Orientation orient = TQt::Horizontal );
static TQLayout *createLayout( TQWidget *widget, TQLayout* layout, LayoutType type );
static void deleteLayout( TQWidget *widget );
@@ -121,7 +121,7 @@ private:
class QDesignerTabWidget : public TQTabWidget
{
- Q_OBJECT
+ 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 )
@@ -151,7 +151,7 @@ private:
class QDesignerWidgetStack : public TQWidgetStack
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( int currentPage READ currentPage WRITE setCurrentPage STORED false DESIGNABLE true )
TQ_PROPERTY( TQCString pageName READ pageName WRITE setPageName STORED false DESIGNABLE true )
@@ -195,7 +195,7 @@ private:
class QDesignerWizard : public TQWizard
{
- Q_OBJECT
+ 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 )
@@ -204,7 +204,7 @@ class QDesignerWizard : public TQWizard
public:
QDesignerWizard( TQWidget *parent, const char *name )
- : TQWizard( parent, name ), modal(FALSE) {}
+ : TQWizard( parent, name ), modal(false) {}
int currentPageNum() const;
void setCurrentPage( int i );
@@ -238,7 +238,7 @@ private:
class TQLayoutWidget : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -257,7 +257,7 @@ protected:
class CustomWidget : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -290,7 +290,7 @@ protected:
class Line : public TQFrame
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( Orientation orientation READ orientation WRITE setOrientation )
@@ -317,7 +317,7 @@ public:
class QDesignerLabel : public TQLabel
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( TQCString buddy READ buddyWidget WRITE setBuddyWidget )
@@ -350,7 +350,7 @@ private:
class QDesignerWidget : public TQWidget
{
- Q_OBJECT
+ TQ_OBJECT
public:
@@ -371,13 +371,13 @@ private:
class QDesignerDialog : public TQDialog
{
- Q_OBJECT
+ TQ_OBJECT
TQ_OVERRIDE( bool modal READ isModal WRITE setModal )
public:
QDesignerDialog( FormWindow *fw, TQWidget *parent, const char *name )
- : TQDialog( parent, name, FALSE, WResizeNoErase ), formwindow( fw ), modal(FALSE) {}
+ : TQDialog( parent, name, false, WResizeNoErase ), formwindow( fw ), modal(false) {}
bool isModal() const { return modal; }
void setModal(bool b) { modal = b; }
@@ -393,7 +393,7 @@ private:
class QDesignerToolButton : public TQToolButton
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
@@ -402,13 +402,13 @@ public:
: TQToolButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
( (TQButtonGroup*)parentWidget() )->remove( this );
( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
@@ -417,7 +417,7 @@ public:
class QDesignerRadioButton : public TQRadioButton
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
@@ -426,13 +426,13 @@ public:
: TQRadioButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
( (TQButtonGroup*)parentWidget() )->remove( this );
( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
@@ -442,7 +442,7 @@ public:
class QDesignerPushButton : public TQPushButton
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
@@ -451,13 +451,13 @@ public:
: TQPushButton( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
( (TQButtonGroup*)parentWidget() )->remove( this );
( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
@@ -467,7 +467,7 @@ public:
class QDesignerCheckBox : public TQCheckBox
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( int buttonGroupId READ buttonGroupId WRITE setButtonGroupId )
@@ -476,13 +476,13 @@ public:
: TQCheckBox( parent, name ) {}
bool isInButtonGroup() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING );
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" );
}
int buttonGroupId() const {
- return parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
+ return parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ? ( (TQButtonGroup*)parentWidget() )->id( (TQButton*)this ) : -1;
}
void setButtonGroupId( int id ) {
- if ( parentWidget() && parentWidget()->inherits( TQBUTTONGROUP_OBJECT_NAME_STRING ) ) {
+ if ( parentWidget() && parentWidget()->inherits( "TQButtonGroup" ) ) {
( (TQButtonGroup*)parentWidget() )->remove( this );
( (TQButtonGroup*)parentWidget() )->insert( this, id );
}
@@ -492,7 +492,7 @@ public:
class QDesignerToolBox : public TQToolBox
{
- Q_OBJECT
+ TQ_OBJECT
TQ_PROPERTY( TQString itemLabel READ itemLabel WRITE setItemLabel STORED false DESIGNABLE true )
TQ_PROPERTY( TQCString itemName READ itemName WRITE setItemName STORED false DESIGNABLE true )
diff --git a/kdevdesigner/designer/wizardeditor.ui b/kdevdesigner/designer/wizardeditor.ui
index 84302d09..8885a825 100644
--- a/kdevdesigner/designer/wizardeditor.ui
+++ b/kdevdesigner/designer/wizardeditor.ui
@@ -319,7 +319,7 @@
<slot>cancelClicked()</slot>
</connection>
</connections>
-<Q_SLOTS>
+<slots>
<slot access="protected">init()</slot>
<slot access="protected">destroy()</slot>
<slot access="protected">addClicked()</slot>
@@ -332,7 +332,7 @@
<slot access="protected">okClicked()</slot>
<slot access="protected">removeClicked()</slot>
<slot access="protected">upClicked()</slot>
-</Q_SLOTS>
+</slots>
<includes>
<include location="local" impldecl="in implementation">myiconloader.h</include>
</includes>
diff --git a/kdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp
index c4c4f83d..2de28547 100644
--- a/kdevdesigner/designer/wizardeditorimpl.cpp
+++ b/kdevdesigner/designer/wizardeditorimpl.cpp
@@ -41,19 +41,19 @@
WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
: WizardEditorBase( parent, 0 ), formwindow( fw ), wizard( w ), draggedItem( 0 )
{
- connect( buttonHelp, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) );
+ connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
fillListBox();
// Add drag and drop
ListBoxDnd *listBoxDnd = new ListBoxDnd( listBox );
listBoxDnd->setDragMode( ListBoxDnd::Internal | ListBoxDnd::Move );
- TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
- listBoxDnd, TQT_SLOT( confirmDrop( TQListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ),
+ listBoxDnd, TQ_SLOT( confirmDrop( TQListBoxItem * ) ) );
- TQObject::connect( listBoxDnd, TQT_SIGNAL( dragged( TQListBoxItem * ) ),
- this, TQT_SLOT( itemDragged( TQListBoxItem * ) ) );
- TQObject::connect( listBoxDnd, TQT_SIGNAL( dropped( TQListBoxItem * ) ),
- this, TQT_SLOT( itemDropped( TQListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQ_SIGNAL( dragged( TQListBoxItem * ) ),
+ this, TQ_SLOT( itemDragged( TQListBoxItem * ) ) );
+ TQObject::connect( listBoxDnd, TQ_SIGNAL( dropped( TQListBoxItem * ) ),
+ this, TQ_SLOT( itemDropped( TQListBoxItem * ) ) );
// Add in-place rename
new ListBoxRename( listBox );
@@ -61,7 +61,7 @@ WizardEditor::WizardEditor( TQWidget *parent, TQWizard *w, FormWindow *fw )
WizardEditor::~WizardEditor()
{
- commands.setAutoDelete( TRUE );
+ commands.setAutoDelete( true );
}
void WizardEditor::okClicked()
@@ -93,20 +93,20 @@ void WizardEditor::applyClicked()
TQWidget * page = wizard->page( i );
if ( i == 0 ) { // first page
- wizard->setBackEnabled( page, FALSE );
- wizard->setNextEnabled( page, TRUE );
+ wizard->setBackEnabled( page, false );
+ wizard->setNextEnabled( page, true );
}
else if ( i == wizard->pageCount() - 1 ) { // last page
- wizard->setBackEnabled( page, TRUE );
- wizard->setNextEnabled( page, FALSE );
+ wizard->setBackEnabled( page, true );
+ wizard->setNextEnabled( page, false );
}
else {
- wizard->setBackEnabled( page, TRUE );
- wizard->setNextEnabled( page, TRUE );
+ wizard->setBackEnabled( page, true );
+ wizard->setNextEnabled( page, true );
}
- wizard->setFinishEnabled( page, FALSE );
+ wizard->setFinishEnabled( page, false );
}
// update listbox
@@ -131,7 +131,7 @@ void WizardEditor::addClicked()
// schedule add command
AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wizard->name() ),
- formwindow, wizard, "Page", index, FALSE);
+ formwindow, wizard, "Page", index, false);
commands.append( cmd );
// update buttons
@@ -150,7 +150,7 @@ void WizardEditor::removeClicked()
// schedule remove command
DeleteWizardPageCommand *cmd = new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" )
.arg( listBox->text( index ) ).arg( wizard->name() ),
- formwindow, wizard, index, FALSE );
+ formwindow, wizard, index, false );
commands.append( cmd );
// update buttons
@@ -231,7 +231,7 @@ void WizardEditor::updateButtons()
buttonRemove->setEnabled( index >= 0 );
if ( listBox->count() < 2 )
- buttonRemove->setEnabled( FALSE );
+ buttonRemove->setEnabled( false );
}
void WizardEditor::itemDragged( TQListBoxItem * i )
diff --git a/kdevdesigner/designer/wizardeditorimpl.h b/kdevdesigner/designer/wizardeditorimpl.h
index f49a6b6c..844739a3 100644
--- a/kdevdesigner/designer/wizardeditorimpl.h
+++ b/kdevdesigner/designer/wizardeditorimpl.h
@@ -37,7 +37,7 @@ class FormWindow;
class WizardEditor : public WizardEditorBase
{
- Q_OBJECT
+ TQ_OBJECT
public:
diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp
index b806cc6c..df14b51e 100644
--- a/kdevdesigner/designer/workspace.cpp
+++ b/kdevdesigner/designer/workspace.cpp
@@ -60,7 +60,7 @@ WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p )
project = p;
t = ProjectType;
setPixmap( 0, SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()) );
- setExpandable( FALSE );
+ setExpandable( false );
}
WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf )
@@ -80,8 +80,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p )
project = p;
t = ObjectType;
setPixmap( 0, SmallIcon( "designer_object.png" , KDevDesignerPartFactory::instance()) );
- TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ),
- listView(), TQT_SLOT( update() ) );
+ TQObject::connect( p->fakeFormFileFor( o ), TQ_SIGNAL( somethingChanged(FormFile*) ),
+ listView(), TQ_SLOT( update() ) );
}
WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
@@ -92,7 +92,7 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
t = type;
if ( type == FormFileType ) {
setPixmap( 0, SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
- TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) );
+ TQObject::connect( ff, TQ_SIGNAL( somethingChanged(FormFile*) ), listView(), TQ_SLOT( update(FormFile*) ) );
if ( formFile->supportsCodeFile() ) {
(void) new WorkspaceItem( this, formFile, FormSourceType );
}
@@ -104,8 +104,8 @@ WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type )
void WorkspaceItem::init()
{
- autoOpen = FALSE;
- useOddColor = FALSE;
+ autoOpen = false;
+ useOddColor = false;
project = 0;
sourceFile = 0;
formFile = 0;
@@ -130,7 +130,7 @@ void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column,
if ( isModified() ) {
TQFont f = p->font();
- f.setBold( TRUE );
+ f.setBold( true );
p->setFont( f );
}
@@ -215,7 +215,7 @@ bool WorkspaceItem::checkCompletion( const TQString& completion )
case ObjectType:
return completion == object->name();
}
- return FALSE;
+ return false;
}
@@ -234,7 +234,7 @@ bool WorkspaceItem::isModified() const
return project->fakeFormFileFor( object )->isModified();
break;
}
- return FALSE; // shut up compiler
+ return false; // shut up compiler
}
TQString WorkspaceItem::key( int column, bool ) const
@@ -261,7 +261,7 @@ TQColor WorkspaceItem::backgroundColor()
void WorkspaceItem::setOpen( bool b )
{
TQListViewItem::setOpen( b );
- autoOpen = FALSE;
+ autoOpen = false;
}
void WorkspaceItem::setAutoOpen( bool b )
@@ -273,14 +273,14 @@ void WorkspaceItem::setAutoOpen( bool b )
Workspace::Workspace( TQWidget *parent, MainWindow *mw )
: TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title |
WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ),
- project( 0 ), completionDirty( FALSE )
+ project( 0 ), completionDirty( false )
{
init_colors();
setDefaultRenameAction( Accept );
- blockNewForms = FALSE;
+ blockNewForms = false;
bufferEdit = 0;
- header()->setStretchEnabled( TRUE );
+ header()->setStretchEnabled( true );
header()->hide();
setSorting( 0 );
setResizePolicy( TQScrollView::Manual );
@@ -291,17 +291,17 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
setPalette( p );
#endif
addColumn( i18n( "Files" ) );
- setAllColumnsShowFocus( TRUE );
- connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ),
- this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ),
- connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ),
- this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ),
- connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
- this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ),
+ setAllColumnsShowFocus( true );
+ connect( this, TQ_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ),
+ this, TQ_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ),
+ connect( this, TQ_SIGNAL( doubleClicked( TQListViewItem * ) ),
+ this, TQ_SLOT( itemDoubleClicked( TQListViewItem * ) ) ),
+ connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
+ this, TQ_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ),
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
- viewport()->setAcceptDrops( TRUE );
- setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
+ setAcceptDrops( true );
setColumnWidthMode( 1, Manual );
}
@@ -319,23 +319,23 @@ void Workspace::setCurrentProject( Project *pro )
if ( project == pro )
return;
if ( project ) {
- disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) );
- disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) );
- disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) );
- disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) );
- disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) );
- disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) );
- disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) );
+ disconnect( project, TQ_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQ_SLOT( sourceFileAdded(SourceFile*) ) );
+ disconnect( project, TQ_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQ_SLOT( sourceFileRemoved(SourceFile*) ) );
+ disconnect( project, TQ_SIGNAL( formFileAdded(FormFile*) ), this, TQ_SLOT( formFileAdded(FormFile*) ) );
+ disconnect( project, TQ_SIGNAL( formFileRemoved(FormFile*) ), this, TQ_SLOT( formFileRemoved(FormFile*) ) );
+ disconnect( project, TQ_SIGNAL( objectAdded(TQObject*) ), this, TQ_SLOT( objectAdded(TQObject*) ) );
+ disconnect( project, TQ_SIGNAL( objectRemoved(TQObject*) ), this, TQ_SLOT( objectRemoved(TQObject*) ) );
+ disconnect( project, TQ_SIGNAL( projectModified() ), this, TQ_SLOT( update() ) );
}
project = pro;
- connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) );
- connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) );
- connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) );
- connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) );
- connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) );
- connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) );
- connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) );
- connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) );
+ connect( project, TQ_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQ_SLOT( sourceFileAdded(SourceFile*) ) );
+ connect( project, TQ_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQ_SLOT( sourceFileRemoved(SourceFile*) ) );
+ connect( project, TQ_SIGNAL( formFileAdded(FormFile*) ), this, TQ_SLOT( formFileAdded(FormFile*) ) );
+ connect( project, TQ_SIGNAL( formFileRemoved(FormFile*) ), this, TQ_SLOT( formFileRemoved(FormFile*) ) );
+ connect( project, TQ_SIGNAL( destroyed(TQObject*) ), this, TQ_SLOT( projectDestroyed(TQObject*) ) );
+ connect( project, TQ_SIGNAL( objectAdded(TQObject*) ), this, TQ_SLOT( objectAdded(TQObject*) ) );
+ connect( project, TQ_SIGNAL( objectRemoved(TQObject*) ), this, TQ_SLOT( objectRemoved(TQObject*) ) );
+ connect( project, TQ_SIGNAL( projectModified() ), this, TQ_SLOT( update() ) );
clear();
if ( bufferEdit )
@@ -343,7 +343,7 @@ void Workspace::setCurrentProject( Project *pro )
projectItem = new WorkspaceItem( this, project );
- projectItem->setOpen( TRUE );
+ projectItem->setOpen( true );
for ( TQPtrListIterator<SourceFile> sources = project->sourceFiles();
sources.current(); ++sources ) {
@@ -368,7 +368,7 @@ void Workspace::setCurrentProject( Project *pro )
}
updateColors();
- completionDirty = TRUE;
+ completionDirty = true;
}
void Workspace::sourceFileAdded( SourceFile* sf )
@@ -411,7 +411,7 @@ void Workspace::objectRemoved( TQObject *o )
void Workspace::update()
{
- completionDirty = TRUE;
+ completionDirty = true;
triggerUpdate();
}
@@ -431,9 +431,9 @@ void Workspace::activeFormChanged( FormWindow *fw )
WorkspaceItem *i = findItem( fw->formFile() );
if ( i ) {
setCurrentItem( i );
- setSelected( i, TRUE );
+ setSelected( i, true );
if ( !i->isOpen() )
- i->setAutoOpen( TRUE );
+ i->setAutoOpen( true );
}
closeAutoOpenItems();
@@ -449,15 +449,15 @@ void Workspace::activeEditorChanged( SourceEditor *se )
WorkspaceItem *i = findItem( se->formWindow()->formFile() );
if ( i && i->firstChild() ) {
if ( !i->isOpen() )
- i->setAutoOpen( TRUE );
+ i->setAutoOpen( true );
setCurrentItem( i->firstChild() );
- setSelected( i->firstChild(), TRUE );
+ setSelected( i->firstChild(), true );
}
} else {
WorkspaceItem *i = findItem( se->sourceFile() );
if ( i ) {
setCurrentItem( i );
- setSelected( i, TRUE );
+ setSelected( i, true );
}
}
@@ -503,7 +503,7 @@ void Workspace::closeAutoOpenItems()
if ( i->type() == WorkspaceItem::FormSourceType ) {
if ( !i->isSelected() && !ip->isSelected()
&& ip->isAutoOpen() ) {
- ip->setAutoOpen( FALSE );
+ ip->setAutoOpen( false );
}
}
}
@@ -518,12 +518,12 @@ void Workspace::closeEvent( TQCloseEvent *e )
void Workspace::itemDoubleClicked( TQListViewItem *i )
{
if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType )
- i->setOpen( TRUE );
+ i->setOpen( true );
}
void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
{
- if ( !i || button != Qt::LeftButton )
+ if ( !i || button != TQt::LeftButton )
return;
closeAutoOpenItems();
@@ -536,7 +536,7 @@ void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& )
wi->formFile->showFormWindow();
break;
case WorkspaceItem::FormSourceType:
- wi->formFile->showEditor( FALSE );
+ wi->formFile->showEditor( false );
break;
case WorkspaceItem::SourceFileType:
mainWindow->editSource( wi->sourceFile );
@@ -592,7 +592,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM,
OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE };
TQPopupMenu menu( this );
- menu.setCheckable( TRUE );
+ menu.setCheckable( true );
switch ( wi->type() ) {
case WorkspaceItem::SourceFileType:
menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE );
@@ -632,7 +632,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
project->removeFormFile( wi->formFile );
break;
case REMOVE_FORM_SOURCE:
- ( (WorkspaceItem*)i )->formFile->setModified( TRUE );
+ ( (WorkspaceItem*)i )->formFile->setModified( true );
( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted );
delete ( (WorkspaceItem*)i )->formFile->editor();
break;
@@ -640,7 +640,7 @@ void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos )
case OPEN_SOURCE:
case OPEN_FORM:
case OPEN_FORM_SOURCE:
- itemClicked( Qt::LeftButton, i, pos );
+ itemClicked( TQt::LeftButton, i, pos );
break;
}
}
@@ -648,7 +648,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 ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved )
+ if ( o == bufferEdit && e->type() != TQEvent::ChildRemoved )
updateBufferEdit();
return TQListView::eventFilter( o, e );
}
@@ -656,8 +656,8 @@ bool Workspace::eventFilter( TQObject *o, TQEvent * e )
void Workspace::setBufferEdit( QCompletionEdit *edit )
{
bufferEdit = edit;
- connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ),
- this, TQT_SLOT( bufferChosen( const TQString & ) ) );
+ connect( bufferEdit, TQ_SIGNAL( chosen( const TQString & ) ),
+ this, TQ_SLOT( bufferChosen( const TQString & ) ) );
bufferEdit->installEventFilter( this );
}
@@ -665,7 +665,7 @@ void Workspace::updateBufferEdit()
{
if ( !bufferEdit || !completionDirty || !MainWindow::self)
return;
- completionDirty = FALSE;
+ completionDirty = false;
TQStringList completion = MainWindow::self->projectFileNames();
TQListViewItemIterator it( this );
while ( it.current() ) {
@@ -689,7 +689,7 @@ void Workspace::bufferChosen( const TQString &buffer )
TQListViewItemIterator it( this );
while ( it.current() ) {
if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) {
- itemClicked( Qt::LeftButton, it.current(), TQPoint() );
+ itemClicked( TQt::LeftButton, it.current(), TQPoint() );
break;
}
++it;
@@ -701,7 +701,7 @@ void Workspace::updateColors()
TQListViewItem* i = firstChild();
if ( i )
i = i->firstChild();
- bool b = TRUE;
+ bool b = true;
while ( i ) {
WorkspaceItem* wi = ( WorkspaceItem*) i;
i = i->nextSibling();
diff --git a/kdevdesigner/designer/workspace.h b/kdevdesigner/designer/workspace.h
index 052a1b87..f16e9fcf 100644
--- a/kdevdesigner/designer/workspace.h
+++ b/kdevdesigner/designer/workspace.h
@@ -86,7 +86,7 @@ private:
class Workspace : public TQListView
{
- Q_OBJECT
+ TQ_OBJECT
public: