summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer')
-rw-r--r--kdevdesigner/designer/actiondnd.cpp90
-rw-r--r--kdevdesigner/designer/actioneditorimpl.cpp56
-rw-r--r--kdevdesigner/designer/actionlistview.cpp8
-rw-r--r--kdevdesigner/designer/actionlistview.h6
-rw-r--r--kdevdesigner/designer/asciivalidator.cpp12
-rw-r--r--kdevdesigner/designer/command.cpp170
-rw-r--r--kdevdesigner/designer/command.h10
-rw-r--r--kdevdesigner/designer/configtoolboxdialog.ui.h16
-rw-r--r--kdevdesigner/designer/connectiondialog.ui.h8
-rw-r--r--kdevdesigner/designer/connectionitems.cpp26
-rw-r--r--kdevdesigner/designer/connectionitems.h4
-rw-r--r--kdevdesigner/designer/connectiontable.cpp16
-rw-r--r--kdevdesigner/designer/customwidgeteditorimpl.cpp194
-rw-r--r--kdevdesigner/designer/database.cpp8
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.cpp14
-rw-r--r--kdevdesigner/designer/dbconnectionimpl.h2
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.cpp26
-rw-r--r--kdevdesigner/designer/dbconnectionsimpl.h2
-rw-r--r--kdevdesigner/designer/designeraction.h4
-rw-r--r--kdevdesigner/designer/designerapp.cpp8
-rw-r--r--kdevdesigner/designer/designerappiface.cpp30
-rw-r--r--kdevdesigner/designer/designerappiface.h4
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.cpp54
-rw-r--r--kdevdesigner/designer/editfunctionsimpl.h2
-rw-r--r--kdevdesigner/designer/finddialog.ui.h6
-rw-r--r--kdevdesigner/designer/formfile.cpp110
-rw-r--r--kdevdesigner/designer/formfile.h8
-rw-r--r--kdevdesigner/designer/formsettingsimpl.cpp26
-rw-r--r--kdevdesigner/designer/formwindow.cpp228
-rw-r--r--kdevdesigner/designer/formwindow.h8
-rw-r--r--kdevdesigner/designer/hierarchyview.cpp120
-rw-r--r--kdevdesigner/designer/hierarchyview.h6
-rw-r--r--kdevdesigner/designer/iconvieweditorimpl.cpp32
-rw-r--r--kdevdesigner/designer/kdevdesigner_part.cpp2
-rw-r--r--kdevdesigner/designer/layout.cpp52
-rw-r--r--kdevdesigner/designer/layout.h8
-rw-r--r--kdevdesigner/designer/listboxdnd.cpp22
-rw-r--r--kdevdesigner/designer/listboxeditorimpl.cpp38
-rw-r--r--kdevdesigner/designer/listboxrename.cpp18
-rw-r--r--kdevdesigner/designer/listdnd.cpp26
-rw-r--r--kdevdesigner/designer/listeditor.ui.h4
-rw-r--r--kdevdesigner/designer/listviewdnd.cpp28
-rw-r--r--kdevdesigner/designer/listvieweditorimpl.cpp134
-rw-r--r--kdevdesigner/designer/mainwindow.cpp506
-rw-r--r--kdevdesigner/designer/mainwindow.h10
-rw-r--r--kdevdesigner/designer/mainwindowactions.cpp188
-rw-r--r--kdevdesigner/designer/menubareditor.cpp62
-rw-r--r--kdevdesigner/designer/menubareditor.h2
-rw-r--r--kdevdesigner/designer/metadatabase.cpp118
-rw-r--r--kdevdesigner/designer/metadatabase.h10
-rw-r--r--kdevdesigner/designer/multilineeditorimpl.cpp20
-rw-r--r--kdevdesigner/designer/newformimpl.cpp46
-rw-r--r--kdevdesigner/designer/orderindicator.cpp4
-rw-r--r--kdevdesigner/designer/outputwindow.cpp14
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.cpp16
-rw-r--r--kdevdesigner/designer/paletteeditoradvancedimpl.h2
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.cpp6
-rw-r--r--kdevdesigner/designer/paletteeditorimpl.h2
-rw-r--r--kdevdesigner/designer/pixmapchooser.cpp16
-rw-r--r--kdevdesigner/designer/pixmapcollection.cpp22
-rw-r--r--kdevdesigner/designer/pixmapcollection.h2
-rw-r--r--kdevdesigner/designer/pixmapcollectioneditor.ui.h16
-rw-r--r--kdevdesigner/designer/popupmenueditor.cpp52
-rw-r--r--kdevdesigner/designer/previewwidgetimpl.cpp4
-rw-r--r--kdevdesigner/designer/project.cpp130
-rw-r--r--kdevdesigner/designer/project.h18
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.cpp8
-rw-r--r--kdevdesigner/designer/projectsettingsimpl.h2
-rw-r--r--kdevdesigner/designer/propertyeditor.cpp426
-rw-r--r--kdevdesigner/designer/propertyeditor.h10
-rw-r--r--kdevdesigner/designer/propertyobject.cpp8
-rw-r--r--kdevdesigner/designer/qcompletionedit.cpp24
-rw-r--r--kdevdesigner/designer/replacedialog.ui.h14
-rw-r--r--kdevdesigner/designer/resource.cpp170
-rw-r--r--kdevdesigner/designer/resource.h2
-rw-r--r--kdevdesigner/designer/sizehandle.cpp4
-rw-r--r--kdevdesigner/designer/sizehandle.h2
-rw-r--r--kdevdesigner/designer/sourceeditor.cpp14
-rw-r--r--kdevdesigner/designer/sourcefile.cpp50
-rw-r--r--kdevdesigner/designer/sourcefile.h4
-rw-r--r--kdevdesigner/designer/startdialogimpl.cpp10
-rw-r--r--kdevdesigner/designer/styledbutton.cpp10
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.cpp26
-rw-r--r--kdevdesigner/designer/syntaxhighlighter_html.h2
-rw-r--r--kdevdesigner/designer/tableeditorimpl.cpp34
-rw-r--r--kdevdesigner/designer/tableeditorimpl.h2
-rw-r--r--kdevdesigner/designer/timestamp.cpp4
-rw-r--r--kdevdesigner/designer/variabledialogimpl.cpp10
-rw-r--r--kdevdesigner/designer/widgetaction.cpp2
-rw-r--r--kdevdesigner/designer/widgetaction.h6
-rw-r--r--kdevdesigner/designer/widgetfactory.cpp190
-rw-r--r--kdevdesigner/designer/widgetfactory.h6
-rw-r--r--kdevdesigner/designer/wizardeditorimpl.cpp22
-rw-r--r--kdevdesigner/designer/workspace.cpp56
94 files changed, 2015 insertions, 2015 deletions
diff --git a/kdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp
index c76f13b6..0d524d9e 100644
--- a/kdevdesigner/designer/actiondnd.cpp
+++ b/kdevdesigner/designer/actiondnd.cpp
@@ -106,12 +106,12 @@ bool QDesignerAction::addTo( TQWidget *w )
return TQAction::addTo( w );
if ( ::tqt_cast<TQPopupMenu*>(w) )
- return FALSE;
+ 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,15 +120,15 @@ bool QDesignerAction::removeFrom( TQWidget *w )
return TQAction::removeFrom( w );
remove();
- return TRUE;
+ return true;
}
void QDesignerAction::remove()
{
if ( !widgetToInsert )
return;
- MainWindow::self->formWindow()->selectWidget( widgetToInsert, FALSE );
- widgetToInsert->reparent( 0, TQPoint( 0, 0 ), FALSE );
+ MainWindow::self->formWindow()->selectWidget( widgetToInsert, false );
+ widgetToInsert->reparent( 0, TQPoint( 0, 0 ), false );
}
QDesignerToolBarSeparator::QDesignerToolBarSeparator(TQt::Orientation o , TQToolBar *parent,
@@ -187,25 +187,25 @@ bool QSeparatorAction::addTo( TQWidget *w )
if ( ::tqt_cast<TQToolBar*>(w) ) {
TQToolBar *tb = (TQToolBar*)w;
wid = new QDesignerToolBarSeparator( tb->orientation(), tb );
- return TRUE;
+ 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 ( ::tqt_cast<TQToolBar*>(w) ) {
delete wid;
- return TRUE;
+ 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,31 +219,31 @@ QDesignerToolBar::QDesignerToolBar( TQMainWindow *mw )
: TQToolBar( mw ), lastIndicatorPos( -1, -1 )
{
insertAnchor = 0;
- afterAnchor = TRUE;
- setAcceptDrops( TRUE );
+ 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( this );
installEventFilter( this );
- widgetInserting = FALSE;
+ widgetInserting = false;
findFormWindow();
- mw->setDockEnabled( DockTornOff, FALSE );
+ mw->setDockEnabled( DockTornOff, false );
}
void QDesignerToolBar::findFormWindow()
@@ -287,7 +287,7 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
if ( o == this && e->type() == TQEvent::MouseButtonPress &&
( ( TQMouseEvent*)e )->button() == TQt::LeftButton ) {
mousePressEvent( (TQMouseEvent*)e );
- return TRUE;
+ return true;
}
if ( o == this )
@@ -297,30 +297,30 @@ bool QDesignerToolBar::eventFilter( TQObject *o, TQEvent *e )
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;
+ 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 )
@@ -438,7 +438,7 @@ void QDesignerToolBar::buttonContextMenuEvent( TQContextMenuEvent *e, TQObject *
void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
{
- widgetInserting = FALSE;
+ widgetInserting = false;
if ( e->button() == TQt::MidButton )
return;
@@ -448,7 +448,7 @@ void QDesignerToolBar::buttonMousePressEvent( TQMouseEvent *e, TQObject * )
MainWindow::self->currentTool() != ORDER_TOOL &&
MainWindow::self->currentTool() != CONNECT_TOOL &&
MainWindow::self->currentTool() != BUDDY_TOOL ) {
- widgetInserting = TRUE;
+ widgetInserting = true;
return;
}
@@ -500,7 +500,7 @@ void QDesignerToolBar::buttonMouseMoveEvent( TQMouseEvent *e, TQObject *o )
drag->setPixmap( a->iconSet().pixmap() );
if ( ::tqt_cast<QDesignerAction*>(a) ) {
if ( formWindow->widgets()->find( ( (QDesignerAction*)a )->widget() ) )
- formWindow->selectWidget( ( ( (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 )
@@ -614,7 +614,7 @@ TQPoint QDesignerToolBar::calcIndicatorPos( const TQPoint &pos )
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;
}
}
}
@@ -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 )
diff --git a/kdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp
index f97e8a47..45b70994 100644
--- a/kdevdesigner/designer/actioneditorimpl.cpp
+++ b/kdevdesigner/designer/actioneditorimpl.cpp
@@ -50,8 +50,8 @@ 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, TQ_SLOT( newAction() ) );
@@ -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, 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();
}
@@ -141,7 +141,7 @@ void ActionEditor::deleteAction()
if ( formWindow ) {
formWindow->setActiveObject( formWindow->mainContainer() );
if ( formWindow->formFile() )
- formWindow->formFile()->setModified( TRUE );
+ formWindow->formFile()->setModified( true );
}
}
@@ -157,28 +157,28 @@ 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, 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()
@@ -191,33 +191,33 @@ void ActionEditor::newActionGroup()
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, 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 )
@@ -226,9 +226,9 @@ void ActionEditor::setFormWindow( FormWindow *fw )
formWindow = fw;
if ( !formWindow ||
!::tqt_cast<TQMainWindow*>(formWindow->mainContainer()) ) {
- setEnabled( FALSE );
+ setEnabled( false );
} else {
- setEnabled( TRUE );
+ setEnabled( true );
for ( TQAction *a = formWindow->actionList().first(); a; a = formWindow->actionList().next() ) {
ActionItem *i = 0;
if ( ::tqt_cast<TQAction*>(a->parent()) )
@@ -247,7 +247,7 @@ void ActionEditor::setFormWindow( FormWindow *fw )
}
if ( listActions->firstChild() ) {
listActions->setCurrentItem( listActions->firstChild() );
- listActions->setSelected( listActions->firstChild(), TRUE );
+ listActions->setSelected( listActions->firstChild(), true );
}
}
}
@@ -265,7 +265,7 @@ void ActionEditor::insertChildActions( ActionItem *i )
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
diff --git a/kdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp
index 8f99679a..d34aca5d 100644
--- a/kdevdesigner/designer/actionlistview.cpp
+++ b/kdevdesigner/designer/actionlistview.cpp
@@ -33,9 +33,9 @@
ActionListView::ActionListView( TQWidget *parent, const char *name )
: TQListView( parent, name )
{
- setShowSortIndicator( TRUE );
+ setShowSortIndicator( true );
setResizeMode( LastColumn );
- setRootIsDecorated( TRUE );
+ setRootIsDecorated( true );
connect( this, TQ_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ),
this, TQ_SLOT( rmbMenu( TQListViewItem *, const TQPoint & ) ) );
}
@@ -46,7 +46,7 @@ ActionItem::ActionItem( TQListView *lv, TQAction *ac )
g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
a = ::tqt_cast<QDesignerAction*>(ac);
- setDragEnabled( TRUE );
+ setDragEnabled( true );
}
ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
@@ -55,7 +55,7 @@ ActionItem::ActionItem( TQListViewItem *i, TQAction *ac )
g = ::tqt_cast<QDesignerActionGroup*>(ac);
if ( !g )
a = ::tqt_cast<QDesignerAction*>(ac);
- setDragEnabled( TRUE );
+ setDragEnabled( true );
moveToEnd();
}
diff --git a/kdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h
index 093c884c..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; }
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/command.cpp b/kdevdesigner/designer/command.cpp
index 4b3b3109..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;
}
// ------------------------------------------------------------
@@ -278,7 +278,7 @@ void InsertCommand::execute()
}
widget->show();
formWindow()->widgets()->insert( widget, widget );
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
formWindow()->selectWidget( widget );
formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget );
}
@@ -286,7 +286,7 @@ void InsertCommand::execute()
void InsertCommand::unexecute()
{
widget->hide();
- formWindow()->selectWidget( widget, FALSE );
+ 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,7 +323,7 @@ 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( w );
@@ -344,7 +344,7 @@ 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( w );
@@ -365,9 +365,9 @@ 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() ) {
@@ -385,14 +385,14 @@ 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( w, FALSE );
+ formWindow()->selectWidget( w, false );
formWindow()->widgets()->remove( w );
TQValueList<MetaDataBase::Connection> conns = MetaDataBase::connections( formWindow(), w );
connections.insert( w, conns );
@@ -402,7 +402,7 @@ void DeleteCommand::execute()
(*it).signal, (*it).receiver, (*it).slot );
}
}
- formWindow()->setPropertyShowingBlocked( FALSE );
+ formWindow()->setPropertyShowingBlocked( false );
formWindow()->emitShowProperties();
formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets );
@@ -410,8 +410,8 @@ 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();
@@ -426,7 +426,7 @@ void DeleteCommand::unexecute()
(*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,9 +453,9 @@ 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 ) && formWindow() != widget )
formWindow()->selectWidget( widget );
@@ -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;
+ 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 ( ::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 )
@@ -563,16 +563,16 @@ void SetPropertyCommand::setProperty( const TQVariant &v, const TQString &curren
if ( select )
editor->propertyList()->setCurrentProperty( propName );
const TQMetaProperty *p =
- widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE );
+ widget->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 );
@@ -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();
}
@@ -795,18 +795,18 @@ BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw,
margin = MetaDataBase::margin( layoutBase );
layout = 0;
if ( lay == WidgetFactory::HBox )
- layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqt_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, ::tqt_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,7 +817,7 @@ void BreakLayoutCommand::unexecute()
{
if ( !layout )
return;
- formWindow()->clearSelection( FALSE );
+ formWindow()->clearSelection( false );
layout->doLayout();
formWindow()->mainWindow()->objectHierarchy()->rebuild();
MetaDataBase::setSpacing( WidgetFactory::containerOfWidget( lb ), spacing );
@@ -1190,7 +1190,7 @@ void AddFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddFunctionCommand::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 );
}
// ------------------------------------------------------------
@@ -1252,7 +1252,7 @@ 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()
@@ -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 );
}
// ------------------------------------------------------------
@@ -1321,7 +1321,7 @@ void RemoveFunctionCommand::execute()
formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f);
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveFunctionCommand::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 );
}
// ------------------------------------------------------------
@@ -1357,7 +1357,7 @@ void AddVariableCommand::execute()
MetaDataBase::addVariable( formWindow(), varName, access );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void AddVariableCommand::unexecute()
@@ -1365,7 +1365,7 @@ void AddVariableCommand::unexecute()
MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1382,7 +1382,7 @@ void SetVariablesCommand::execute()
MetaDataBase::setVariables( formWindow(), newList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void SetVariablesCommand::unexecute()
@@ -1390,7 +1390,7 @@ void SetVariablesCommand::unexecute()
MetaDataBase::setVariables( formWindow(), oldList );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
// ------------------------------------------------------------
@@ -1412,7 +1412,7 @@ void RemoveVariableCommand::execute()
MetaDataBase::removeVariable( formWindow(), varName );
formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView();
if ( formWindow()->formFile() )
- formWindow()->formFile()->setModified( TRUE );
+ formWindow()->formFile()->setModified( true );
}
void RemoveVariableCommand::unexecute()
@@ -1420,7 +1420,7 @@ void RemoveVariableCommand::unexecute()
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 );
}
// ------------------------------------------------------------
@@ -1520,7 +1520,7 @@ void PasteCommand::unexecute()
{
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
w->hide();
- formWindow()->selectWidget( 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 );
}
@@ -1768,7 +1768,7 @@ PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, F
void PopulateMultiLineEditCommand::execute()
{
mlined->setText( newText );
- MetaDataBase::setPropertyChanged( mlined, "text", TRUE );
+ MetaDataBase::setPropertyChanged( mlined, "text", true );
formWindow()->emitUpdateProperties( mlined );
}
@@ -1955,7 +1955,7 @@ void AddToolBarCommand::execute()
if ( !toolBar ) {
toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar";
- formWindow()->unify( toolBar, n, TRUE );
+ formWindow()->unify( toolBar, n, true );
toolBar->setName( n );
mainWindow->addToolBar( toolBar, n );
} else {
@@ -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( popup, legal, TRUE );
+ formWindow()->unify( popup, legal, true );
popup->setName( legal );
formWindow()->mainWindow()->objectHierarchy()->rebuild();
}
diff --git a/kdevdesigner/designer/command.h b/kdevdesigner/designer/command.h
index a4c1243d..eb34952d 100644
--- a/kdevdesigner/designer/command.h
+++ b/kdevdesigner/designer/command.h
@@ -155,7 +155,7 @@ class CommandHistory : public TQObject
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.h b/kdevdesigner/designer/configtoolboxdialog.ui.h
index 77e294b1..ef7c280e 100644
--- a/kdevdesigner/designer/configtoolboxdialog.ui.h
+++ b/kdevdesigner/designer/configtoolboxdialog.ui.h
@@ -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.h b/kdevdesigner/designer/connectiondialog.ui.h
index 0e0877da..7163d793 100644
--- a/kdevdesigner/designer/connectiondialog.ui.h
+++ b/kdevdesigner/designer/connectiondialog.ui.h
@@ -73,7 +73,7 @@ void ConnectionDialog::init()
this, TQ_SLOT( updateEditSlotsButton() ) );
connect( connectionsTable, TQ_SIGNAL( resorted() ),
this, TQ_SLOT( updateConnectionContainers() ) );
- buttonEditSlots->setEnabled( FALSE );
+ buttonEditSlots->setEnabled( false );
if ( !invalidConnection ) {
invalidConnection = new TQPixmap( invalid_connection );
@@ -86,7 +86,7 @@ void ConnectionDialog::init()
it != conns.end(); ++it ) {
ConnectionContainer *c = addConnection( (*it).sender, (*it).receiver,
(*it).signal, (*it).slot );
- c->setModified( FALSE );
+ c->setModified( false );
updateConnectionState( c );
}
@@ -169,7 +169,7 @@ ConnectionContainer *ConnectionDialog::addConnection( TQObject *sender, TQObject
sl->setCurrentItem( slot );
}
- c->setModified( TRUE );
+ c->setModified( true );
return c;
}
@@ -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 322d9e4b..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 * )
@@ -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 );
}
@@ -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)" );
@@ -409,25 +409,25 @@ bool SlotItem::ignoreSlot( const char* slot ) const
#ifndef TQT_NO_SQL
if ( qstrcmp( slot, "update()" ) == 0 &&
::tqt_cast<TQDataBrowser*>(lastReceiver) )
- return FALSE;
+ 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( lastReceiver ) ) {
if ( qstrcmp( slot, "close()" ) == 0 )
- return TRUE;
+ return true;
}
if ( qstrcmp( slot, "setFocus()" ) == 0 )
if ( lastReceiver->isWidgetType() &&
( (TQWidget*)lastReceiver )->focusPolicy() == TQWidget::NoFocus )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void SlotItem::updateSlotList()
@@ -441,15 +441,15 @@ 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 )->access == TQMetaData::Public) ||
+ 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 ==
+ lastReceiver->metaObject()->slot(i, true)->access ==
TQMetaData::Protected) ) &&
!ignoreSlot( md->name ) &&
checkConnectArgs( signal.latin1(), lastReceiver, md->name ) )
diff --git a/kdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h
index 0883b961..ef1a060d 100644
--- a/kdevdesigner/designer/connectionitems.h
+++ b/kdevdesigner/designer/connectionitems.h
@@ -170,7 +170,7 @@ class ConnectionContainer : public TQObject
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 );
@@ -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/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp
index cc736635..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, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
checkTimer = new TQTimer( this );
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->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 ) );
+ editSignal->setValidator( new AsciiValidator( true, editSignal ) );
+ editSlot->setValidator( new AsciiValidator( true, editSignal ) );
editProperty->setValidator( new AsciiValidator( editSignal ) );
- editSignal->setEnabled( FALSE );
- buttonRemoveSignal->setEnabled( FALSE );
+ 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/database.cpp b/kdevdesigner/designer/database.cpp
index e7fdf0df..f8065d5c 100644
--- a/kdevdesigner/designer/database.cpp
+++ b/kdevdesigner/designer/database.cpp
@@ -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/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp
index 678dbad0..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->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 bb92c27e..27578bc6 100644
--- a/kdevdesigner/designer/dbconnectionimpl.h
+++ b/kdevdesigner/designer/dbconnectionimpl.h
@@ -40,7 +40,7 @@ class DatabaseConnectionEditor : public DatabaseConnectionEditorBase
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 e71718a0..bd9a594c 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.cpp
+++ b/kdevdesigner/designer/dbconnectionsimpl.cpp
@@ -42,14 +42,14 @@
#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 )
@@ -64,7 +64,7 @@ DatabaseConnectionsEditor::DatabaseConnectionsEditor( Project *pro, TQWidget* pa
connectionWidget->comboDriver->insertStringList( TQSqlDatabase::drivers() );
#endif
connectionWidget->editName->setValidator( new AsciiValidator( connectionWidget->editName ) );
- enableAll( FALSE );
+ 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 18bd60bb..66f43b29 100644
--- a/kdevdesigner/designer/dbconnectionsimpl.h
+++ b/kdevdesigner/designer/dbconnectionsimpl.h
@@ -39,7 +39,7 @@ class DatabaseConnectionsEditor : public DatabaseConnectionBase
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 9d6aeaed..eade6982 100644
--- a/kdevdesigner/designer/designeraction.h
+++ b/kdevdesigner/designer/designeraction.h
@@ -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 c871e301..9cb8957f 100644
--- a/kdevdesigner/designer/designerappiface.cpp
+++ b/kdevdesigner/designer/designerappiface.cpp
@@ -585,7 +585,7 @@ 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->insertWidget( w, true );
formWindow->killAccels( formWindow->mainContainer() );
return w;
}
@@ -674,7 +674,7 @@ void DesignerFormWindowImpl::breakLayout()
void DesignerFormWindowImpl::selectWidget( TQWidget * w )
{
- formWindow->selectWidget( 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 )
@@ -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 );
@@ -963,7 +963,7 @@ void DesignerFormWindowImpl::addMenu( const TQString &text, const TQString &name
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
PopupMenuEditor *popup = new PopupMenuEditor( formWindow, mw );
TQString n = name;
- formWindow->unify( popup, n, TRUE );
+ formWindow->unify( popup, n, true );
popup->setName( n );
MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" );
if ( !mb ) {
@@ -1009,7 +1009,7 @@ void DesignerFormWindowImpl::addToolBar( const TQString &text, const TQString &n
TQMainWindow *mw = (TQMainWindow*)formWindow->mainContainer();
TQToolBar *tb = new QDesignerToolBar( mw );
TQString n = name;
- formWindow->unify( tb, n, TRUE );
+ formWindow->unify( tb, n, true );
tb->setName( n );
mw->addToolBar( tb, text );
}
@@ -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/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp
index 40c7eae2..b0c5ffaf 100644
--- a/kdevdesigner/designer/editfunctionsimpl.cpp
+++ b/kdevdesigner/designer/editfunctionsimpl.cpp
@@ -50,7 +50,7 @@
#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, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@@ -95,8 +95,8 @@ EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots )
}
}
- boxProperties->setEnabled( FALSE );
- functionName->setValidator( new AsciiValidator( TRUE, functionName ) );
+ boxProperties->setEnabled( false );
+ functionName->setValidator( new AsciiValidator( true, functionName ) );
if ( functionListView->firstChild() )
functionListView->setCurrentItem( functionListView->firstChild() );
@@ -107,7 +107,7 @@ 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,
@@ -137,12 +137,12 @@ void EditFunctions::okClicked()
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" );
@@ -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 )
@@ -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;
}
@@ -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 c4ddf83b..a0c8fc66 100644
--- a/kdevdesigner/designer/editfunctionsimpl.h
+++ b/kdevdesigner/designer/editfunctionsimpl.h
@@ -41,7 +41,7 @@ class EditFunctions : public EditFunctionsBase
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/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 ef111031..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,7 +75,7 @@ FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name
pro->addFormFile( this );
loadCode();
if ( !temp )
- checkFileName( FALSE );
+ checkFileName( false );
connect(this, TQ_SIGNAL(somethingChanged(FormFile* )), this, TQ_SLOT(emitNewStatus(FormFile* )));
}
@@ -96,7 +96,7 @@ void FormFile::setFormWindow( FormWindow *f )
fw = f;
if ( fw )
fw->setFormFile( this );
- parseCode( cod, FALSE );
+ parseCode( cod, false );
TQTimer::singleShot( 0, this, TQ_SLOT( notifyFormWindowChange() ) );
}
@@ -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 ( formWindow() && isModified( WFormWindow ) ) {
if ( withMsgBox ) {
if ( !formWindow()->checkCustomWidgets() )
- return FALSE;
+ return false;
}
if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) {
@@ -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,11 +237,11 @@ 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 )
@@ -252,7 +252,7 @@ bool FormFile::saveAs( bool ignoreModified )
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 && 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()
@@ -309,18 +309,18 @@ bool FormFile::close()
}
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 )
@@ -373,7 +373,7 @@ bool FormFile::isModified( int who )
bool FormFile::isFormWindowModified() const
{
if ( !formWindow() || !formWindow()->commandHistory() )
- return FALSE;
+ return false;
return formWindow()->commandHistory()->isModified();
}
@@ -422,7 +422,7 @@ void FormFile::showFormWindow()
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 )
@@ -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
@@ -585,13 +585,13 @@ void FormFile::parseCode( const TQString &txt, bool allowModify )
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,12 +627,12 @@ 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( formWindow(), newFunctions );
}
@@ -641,7 +641,7 @@ 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;
}
}
@@ -718,7 +718,7 @@ void FormFile::addFunctionCode( MetaDataBase::Function function )
"\n" + iface->createEmptyFunction();
cod += body;
if ( codeEdited ) {
- setModified( TRUE );
+ setModified( true );
emit somethingChanged( this );
}
}
@@ -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 6f80e040..8988e5dc 100644
--- a/kdevdesigner/designer/formfile.h
+++ b/kdevdesigner/designer/formfile.h
@@ -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/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp
index 412d6067..f3de8578 100644
--- a/kdevdesigner/designer/formsettingsimpl.cpp
+++ b/kdevdesigner/designer/formsettingsimpl.cpp
@@ -41,7 +41,7 @@
#include <tqcheckbox.h>
FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
- : FormSettingsBase( parent, 0, TRUE ), formwindow( fw )
+ : FormSettingsBase( parent, 0, true ), formwindow( fw )
{
connect( buttonHelp, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( fw );
@@ -56,11 +56,11 @@ FormSettings::FormSettings( TQWidget *parent, FormWindow *fw )
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() );
@@ -81,7 +81,7 @@ void FormSettings::okClicked()
info.author = editAuthor->text();
MetaDataBase::setMetaInfo( formwindow, info );
- formwindow->commandHistory()->setModified( TRUE );
+ formwindow->commandHistory()->setModified( true );
if ( formwindow->savePixmapInline() ) {
MetaDataBase::clearPixmapArguments( formwindow );
@@ -93,20 +93,20 @@ void FormSettings::okClicked()
}
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/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp
index ab4aed7e..6bea093f 100644
--- a/kdevdesigner/designer/formwindow.cpp
+++ b/kdevdesigner/designer/formwindow.cpp
@@ -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();
@@ -161,14 +161,14 @@ void FormWindow::init()
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;
+ widgetPressed = false;
+ drawRubber = false;
setFocusPolicy( TQWidget::ClickFocus );
sizePreviewLabel = 0;
checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" );
@@ -190,7 +190,7 @@ void FormWindow::init()
insertParent = 0;
connect( &commands, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
this, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) );
- propShowBlocked = FALSE;
+ propShowBlocked = false;
setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) );
@@ -202,11 +202,11 @@ void FormWindow::init()
setMainContainer( 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 )
@@ -365,7 +365,7 @@ void FormWindow::insertWidget()
}
- TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient );
+ TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, true, &currRect, orient );
if ( !w )
return;
@@ -393,7 +393,7 @@ void FormWindow::insertWidget()
}
TQString s = w->name();
- unify( w, s, TRUE );
+ unify( w, s, true );
w->setName( s );
insertWidget( w );
TQRect r( currRect );
@@ -497,7 +497,7 @@ void FormWindow::insertWidget( TQWidget *w, bool checkName )
return;
if ( checkName ) {
TQString s = w->name();
- unify( w, s, TRUE );
+ unify( w, s, true );
w->setName( s );
}
@@ -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 );
@@ -581,7 +581,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
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;
@@ -590,19 +590,19 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *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" );
- setPropertyShowingBlocked( TRUE );
+ setPropertyShowingBlocked( true );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( !o->isWidgetType() )
continue;
if ( insertedWidgets.find( (TQWidget*)o ) )
- selectWidget( o, FALSE );
+ selectWidget( o, false );
}
- setPropertyShowingBlocked( FALSE );
+ setPropertyShowingBlocked( false );
delete l;
}
}
@@ -610,7 +610,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
}
if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) &&
sel && e->button() == TQt::LeftButton ) { // control pressed and selected, unselect widget
- selectWidget( w, FALSE );
+ selectWidget( w, false );
break;
}
@@ -623,11 +623,11 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
w = w->parentWidget();
if ( e->button() == TQt::LeftButton ) { // left button: store original geometry and more as the widget might start moving
- widgetPressed = TRUE;
+ 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( w->parentWidget() ) && !isCentralWidget( w->parentWidget() ) ) {
targetContainer = w->parentWidget();
@@ -637,9 +637,9 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
}
} else { // press was on the formwindow
if ( e->button() == TQt::LeftButton ) { // left button: start rubber selection and show formwindow properties
- drawRubber = TRUE;
+ drawRubber = true;
if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) {
- clearSelection( FALSE );
+ clearSelection( false );
TQObject *opw = propertyWidget;
propertyWidget = mainContainer();
if ( opw->isWidgetType() )
@@ -654,12 +654,12 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
case BUDDY_TOOL:
if ( e->button() != TQt::LeftButton )
break;
- validForBuddy = FALSE;
+ validForBuddy = false;
if ( currTool == BUDDY_TOOL ) {
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() ) );
@@ -669,7 +669,7 @@ void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w )
currentPos = startPos;
startWidget = designerWidget( w );
endWidget = startWidget;
- beginUnclippedPainter( FALSE );
+ beginUnclippedPainter( false );
drawConnectionLine();
break;
case ORDER_TOOL:
@@ -686,7 +686,7 @@ 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;
@@ -732,7 +732,7 @@ 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:
@@ -800,9 +800,9 @@ 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( w ) ) { // and unselect others. Only siblings can be moved at the same time
- setPropertyShowingBlocked( TRUE );
+ setPropertyShowingBlocked( true );
selectWidget( w );
- setPropertyShowingBlocked( FALSE );
+ setPropertyShowingBlocked( false );
}
checkSelectionsForMove( w );
}
@@ -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,7 +860,7 @@ 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( wid );
if ( wid && ( isMainContainer( wid ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) )
@@ -884,7 +884,7 @@ 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( wid );
if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) )
@@ -974,20 +974,20 @@ 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 && ::tqt_cast<TQButton*>(i) ) {
if ( ::tqt_cast<TQButtonGroup*>(i->parentWidget()) || ::tqt_cast<TQButtonGroup*>(wa) )
- emitSelChanged = TRUE;
+ emitSelChanged = true;
if ( !::tqt_cast<TQButtonGroup*>(wa) ) {
- MetaDataBase::setPropertyChanged( i, "buttonGroupId", FALSE );
+ 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( i );
@@ -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 );
@@ -1049,7 +1049,7 @@ void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w )
"buddy", startWidget->property( "buddy" ),
endWidget->name(), endWidget->name(),
oldBuddy );
- commandHistory()->addCommand( cmd, TRUE );
+ commandHistory()->addCommand( cmd, true );
cmd->execute();
emitUpdateProperties( startWidget );
}
@@ -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,7 +1155,7 @@ 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();
}
}
@@ -1260,7 +1260,7 @@ void FormWindow::updateSelection( TQWidget *w )
{
WidgetSelection *s = usedSelections.find( w );
if ( !w->isVisibleTo( this ) )
- selectWidget( w, FALSE );
+ selectWidget( w, false );
else if ( s )
s->updateGeometry();
}
@@ -1283,7 +1283,7 @@ 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 ) {
@@ -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") );
}
@@ -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 )
@@ -1449,9 +1449,9 @@ void FormWindow::updateChildSelections( TQWidget *w )
void FormWindow::checkSelectionsForMove( TQWidget *w )
{
- checkedSelectionsForMove = TRUE;
+ checkedSelectionsForMove = true;
- TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, FALSE, FALSE );
+ TQObjectList *l = w->parentWidget()->queryList( "TQWidget", 0, false, false );
moving.clear();
if ( l ) {
TQPtrDictIterator<WidgetSelection> it( usedSelections );
@@ -1564,7 +1564,7 @@ TQLabel *FormWindow::sizePreview() const
void FormWindow::invalidCheckedSelections()
{
- checkedSelectionsForMove = FALSE;
+ checkedSelectionsForMove = false;
}
void FormWindow::checkPreviewGeometry( TQRect &r )
@@ -1603,10 +1603,10 @@ 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
}
@@ -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();
@@ -1770,7 +1770,7 @@ void FormWindow::currentToolChanged()
void FormWindow::showOrderIndicators()
{
hideOrderIndicators();
- orderIndicators.setAutoDelete( TRUE );
+ orderIndicators.setAutoDelete( true );
TQObjectList *l = mainContainer()->queryList( "TQWidget" );
stackedWidgets = MetaDataBase::tabOrder( this );
if ( l ) {
@@ -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 )
@@ -1910,11 +1910,11 @@ void FormWindow::checkAccels()
insertedWidgets[ (void*)o ] ) {
TQWidget *w = (TQWidget*)o;
const TQMetaProperty* text =
- w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
+ w->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 )
@@ -1928,20 +1928,20 @@ void FormWindow::checkAccels()
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( wid, TRUE );
+ selectWidget( wid, true );
return;
case 1: // cancel
return;
@@ -1976,8 +1976,8 @@ void FormWindow::paste( const TQString &cb, TQWidget *parent )
void FormWindow::selectAll()
{
- checkedSelectionsForMove = FALSE;
- blockSignals( TRUE );
+ checkedSelectionsForMove = false;
+ blockSignals( true );
TQObjectList *l = mainContainer()->queryList( "TQWidget" );
if ( l ) {
for ( TQObject *o = l->first(); o; o = l->next() ) {
@@ -1989,7 +1989,7 @@ void FormWindow::selectAll()
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();
}
@@ -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();
@@ -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;
+ 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,12 +2192,12 @@ 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 )
@@ -2205,10 +2205,10 @@ bool FormWindow::allowMove( TQWidget *w )
w = w->parentWidget();
while ( w ) {
if ( ( isMainContainer( w ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout )
- return TRUE;
+ return true;
w = w->parentWidget();
}
- return FALSE;
+ return false;
}
@@ -2363,7 +2363,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
for ( ; it.current();) {
if ( it.current() != w &&
qstrcmp( it.current()->name(), s.latin1() ) == 0 ) {
- found = TRUE;
+ found = true;
if ( !changeIt )
break;
s = orig + "_" + TQString::number( ++num );
@@ -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 );
@@ -2398,7 +2398,7 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
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 );
@@ -2409,11 +2409,11 @@ bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt )
}
if ( ::tqt_cast<TQMainWindow*>(mainContainer()) ) {
if ( !found ) {
- TQObjectList *l = mainContainer()->queryList( "TQDockWindow", 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 )
@@ -2436,11 +2436,11 @@ bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w )
for ( ; it.current(); ++it ) {
if ( it.current()->isA( "CustomWidget" ) ) {
if ( qstrcmp( WidgetFactory::classNameOf( it.current() ), w->className.utf8() ) == 0 )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
bool FormWindow::isDatabaseWidgetUsed() const
@@ -2452,21 +2452,21 @@ bool FormWindow::isDatabaseWidgetUsed() const
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
}
@@ -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 )
@@ -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 )
@@ -2676,7 +2676,7 @@ void FormWindow::killAccels( TQObject *top )
if ( !l )
return;
for ( TQObject *o = l->first(); o; o = l->next() )
- ( (TQAccel*)o )->setEnabled( FALSE );
+ ( (TQAccel*)o )->setEnabled( false );
delete l;
}
@@ -2690,7 +2690,7 @@ DesignerFormWindow *FormWindow::iFace()
bool FormWindow::isCentralWidget( TQObject *w ) const
{
if ( !::tqt_cast<TQMainWindow*>(mainContainer()) )
- return FALSE;
+ return false;
return w == ((TQMainWindow*)mainContainer())->centralWidget();
}
diff --git a/kdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h
index 43e26321..52546f79 100644
--- a/kdevdesigner/designer/formwindow.h
+++ b/kdevdesigner/designer/formwindow.h
@@ -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 138b9499..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" ) );
@@ -208,31 +208,31 @@ HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects
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 );
}
@@ -251,7 +251,7 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
return 0;
if ( formWindow == o ) {
if ( deselect )
- formWindow->clearSelection( FALSE );
+ formWindow->clearSelection( false );
formWindow->emitShowProperties( formWindow );
return 0;
}
@@ -283,11 +283,11 @@ TQObject *HierarchyList::handleObjectClick( TQListViewItem *i )
}
} 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( 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( w, TRUE );
+ formWindow->selectWidget( w, true );
}
}
@@ -401,12 +401,12 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
{
if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) )
return;
- bool fakeMainWindow = FALSE;
+ bool fakeMainWindow = false;
if ( ::tqt_cast<TQMainWindow*>(o) ) {
TQObject *cw = ( (TQMainWindow*)o )->centralWidget();
if ( cw ) {
o = cw;
- fakeMainWindow = TRUE;
+ fakeMainWindow = true;
}
}
TQListViewItem *item = 0;
@@ -454,7 +454,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *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 ( ::tqt_cast<TQLayoutWidget*>(o) )
@@ -491,7 +491,7 @@ void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent )
if ( widgetStacks->findRef( stack ) != -1 )
continue;
widgetStacks->append( stack );
- TQObjectList *l2 = stack->queryList( "TQWidget", 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 ||
@@ -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;
@@ -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, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
this, TQ_SLOT( renamed( TQListViewItem * ) ) );
- popupOpen = FALSE;
+ 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() );
@@ -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 ||
@@ -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,7 +1192,7 @@ 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] != ';' )
@@ -1270,7 +1270,7 @@ HierarchyView::HierarchyView( TQWidget *parent )
setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) );
ciface->onClick( this, TQ_SLOT( jumpTo( const TQString &, const TQString &, int ) ) );
classBrowsers->insert( *it, cb );
- setTabEnabled( cb.lv, FALSE );
+ setTabEnabled( cb.lv, false );
}
}
}
@@ -1301,7 +1301,7 @@ void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o )
editor = 0;
}
- setTabEnabled( listview, TRUE );
+ setTabEnabled( listview, true );
setTabEnabled( fView, fw && fw->project()->isCpp() );
if ( fw == formwindow ) {
@@ -1374,7 +1374,7 @@ void HierarchyView::showClassesTimeout()
}
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();
}
}
diff --git a/kdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h
index fc4e563f..51ff9fe8 100644
--- a/kdevdesigner/designer/hierarchyview.h
+++ b/kdevdesigner/designer/hierarchyview.h
@@ -101,7 +101,7 @@ class HierarchyList : public TQListView
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 );
}
diff --git a/kdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp
index 340047ac..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, 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/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp
index 1e4a208c..b2c10f03 100644
--- a/kdevdesigner/designer/kdevdesigner_part.cpp
+++ b/kdevdesigner/designer/kdevdesigner_part.cpp
@@ -203,7 +203,7 @@ bool KDevDesignerPart::openFile()
bool KDevDesignerPart::saveFile()
{
- if (isReadWrite() == false)
+ if (!isReadWrite())
return false;
m_widget->actionFileSaveAll->activate();
return true;
diff --git a/kdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp
index 7c593025..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();
}
@@ -163,7 +163,7 @@ 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;
@@ -179,7 +179,7 @@ bool Layout::prepareLayout( bool &needMove, bool &needReparent )
WidgetFactory::deleteLayout( layoutBase );
}
- return TRUE;
+ return true;
}
void Layout::finishLayout( bool needMove, TQLayout *layout )
@@ -214,7 +214,7 @@ void Layout::undoLayout()
it.key()->reparent( WidgetFactory::containerOfWidget( parent ), 0, ( *it ).topLeft(), it.key()->isVisibleTo( formWindow ) );
it.key()->resize( ( *it ).size() );
}
- formWindow->selectWidget( layoutBase, FALSE );
+ formWindow->selectWidget( layoutBase, false );
WidgetFactory::deleteLayout( layoutBase );
if ( parent != layoutBase && !::tqt_cast<TQMainWindow*>(layoutBase) ) {
layoutBase->hide();
@@ -248,7 +248,7 @@ void Layout::breakLayout()
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() )
@@ -315,7 +315,7 @@ void HorizontalLayout::doLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@@ -379,7 +379,7 @@ void VerticalLayout::doLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( !useSplitter ) {
if ( qstrcmp( w->className(), "Spacer" ) == 0 )
layout->addWidget( w, 0, ( (Spacer*)w )->alignment() );
@@ -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;
}
@@ -757,7 +757,7 @@ void GridLayout::doLayout()
for ( w = widgets.first(); w; w = widgets.next() ) {
if ( grid->locateWidget( w, r, c, rs, cs) ) {
if ( needReparent && w->parent() != layoutBase )
- w->reparent( layoutBase, 0, TQPoint( 0, 0 ), FALSE );
+ w->reparent( layoutBase, 0, TQPoint( 0, 0 ), false );
if ( rs * cs == 1 ) {
layout->addWidget( w, r, c, ::tqt_cast<Spacer*>(w) ? ( (Spacer*)w )->alignment() : 0 );
} else {
@@ -865,10 +865,10 @@ void GridLayout::buildGrid()
Spacer::Spacer( TQWidget *parent, const char *name )
: TQWidget( parent, name, WMouseNoMask ),
- orient(TQt::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 * )
diff --git a/kdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h
index af37b323..e870aca0 100644
--- a/kdevdesigner/designer/layout.h
+++ b/kdevdesigner/designer/layout.h
@@ -44,7 +44,7 @@ class Layout : public TQObject
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();
diff --git a/kdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp
index 4e8a7822..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,9 +74,9 @@ bool ListBoxDnd::dropEvent( TQDropEvent * event )
}
line->hide();
- dragInside = FALSE;
+ dragInside = false;
- return TRUE;
+ return true;
}
bool ListBoxDnd::mouseMoveEvent( TQMouseEvent * event )
@@ -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/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp
index 67720ed9..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, 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() ) {
@@ -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/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp
index 05999779..748bba88 100644
--- a/kdevdesigner/designer/listboxrename.cpp
+++ b/kdevdesigner/designer/listboxrename.cpp
@@ -40,13 +40,13 @@ 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, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( renameClickedItem() ) );
@@ -64,9 +64,9 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
clickedItem->isSelected() &&
(clickedItem == src->itemAt( pos )) ) {
TQTimer::singleShot( 500, this, TQ_SLOT( showLineEdit() ) );
- activity = FALSE; // no drags or clicks for 500 ms before we start the renaming
+ 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();
}
@@ -76,7 +76,7 @@ bool ListBoxRename::eventFilter( TQObject *, TQEvent * event )
case TQEvent::MouseMove:
if ( ((TQMouseEvent *) event)->state() & TQt::LeftButton ) {
- activity = TRUE; // drag
+ 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/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp
index 2e3206ae..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() == 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/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 f5f89d4d..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,9 +85,9 @@ bool ListViewDnd::dropEvent( TQDropEvent * event )
}
line->hide();
- dragInside = FALSE;
+ dragInside = false;
- return TRUE;
+ return true;
}
bool ListViewDnd::mouseMoveEvent( TQMouseEvent * event )
@@ -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/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp
index 32f71562..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, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
- itemText->setEnabled( FALSE );
- itemChoosePixmap->setEnabled( FALSE );
- itemDeletePixmap->setEnabled( FALSE );
- itemColumn->setEnabled( FALSE );
+ itemText->setEnabled( false );
+ itemChoosePixmap->setEnabled( false );
+ itemDeletePixmap->setEnabled( false );
+ itemColumn->setEnabled( false );
setupColumns();
PopulateListViewCommand::transferItems( listview, itemsPreview );
@@ -65,7 +65,7 @@ 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
@@ -77,7 +77,7 @@ ListViewEditor::ListViewEditor( TQWidget *parent, TQListView *lv, FormWindow *fw
// 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,
@@ -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/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp
index cd1bcd93..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,16 +161,16 @@ 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, TQ_SIGNAL( timeout() ),
@@ -237,8 +237,8 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
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 );
@@ -250,30 +250,30 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
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" ), this, 0, FALSE );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), 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(), this );
- statusBar()->setSizeGripEnabled( TRUE );
+ statusBar()->setSizeGripEnabled( true );
set_splash_status( "Initialization Done." );
/* if ( shStartDialog )
TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/
@@ -332,11 +332,11 @@ void MainWindow::setupMDI()
vbox->setLineWidth( 1 );
qworkspace = new TQWorkspace( vbox );
qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) );
- qworkspace->setScrollBarsEnabled( TRUE );
+ 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()
@@ -347,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 );
@@ -376,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 );
@@ -390,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 );
@@ -412,7 +412,7 @@ 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 );
@@ -438,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 );
@@ -452,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 );
@@ -466,9 +466,9 @@ 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( TQt::Vertical );
commonWidgetsToolBar->setBackgroundMode(PaletteBase);
@@ -548,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 );
@@ -564,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 )
@@ -586,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 );
@@ -622,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;
}
@@ -731,10 +731,10 @@ void MainWindow::previewForm( const TQString & style )
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();
@@ -808,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( "" );
@@ -913,7 +913,7 @@ void MainWindow::showProperties( TQObject *o )
void MainWindow::resetTool()
{
- actionPointerTool->setOn( TRUE );
+ actionPointerTool->setOn( true );
}
void MainWindow::updateProperties( TQObject * )
@@ -930,7 +930,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) {
- return TRUE; // consume accel events
+ return true; // consume accel events
} else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) {
TQPoint pos = ((TQMouseEvent*)e)->pos();
MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o);
@@ -959,12 +959,12 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
while ( 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;
@@ -975,7 +975,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if ( qWorkspace()->activeWindow() &&
::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (TQKeyEvent*)e )->ignore();
- return TRUE;
+ return true;
}
}
break;
@@ -1028,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 ) );
@@ -1038,7 +1038,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if ( passiveInteractor )
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;
@@ -1067,7 +1067,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
!::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) &&
!::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) &&
!::tqt_cast<TQSizeGrip*>(o) )
- return TRUE;
+ return true;
if ( o && ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( lastPressWidget != (TQWidget*)o ||
@@ -1082,12 +1082,12 @@ 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 ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
qWorkspace()->activeWindow()->setFocus();
- return TRUE;
+ return true;
}
}
if ( !( w = isAFormWindowChild( o ) ) ||
@@ -1096,7 +1096,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
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 ) ) ||
@@ -1110,11 +1110,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
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 ) ) ||
::tqt_cast<SizeHandle*>(o) ||
@@ -1122,7 +1122,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
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 ) ) ||
@@ -1130,7 +1130,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
::tqt_cast<OrderIndicator*>(o) )
break;
if ( ( (FormWindow*)w )->isWidgetSelected( o ) )
- ( (FormWindow*)w )->selectWidget( o, FALSE );
+ ( (FormWindow*)w )->selectWidget( o, false );
break;
case TQEvent::Enter:
case TQEvent::Leave:
@@ -1139,7 +1139,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
::tqt_cast<OrderIndicator*>(o) ||
::tqt_cast<MenuBarEditor*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::Resize:
case TQEvent::Move:
if ( !( w = isAFormWindowChild( o ) ) ||
@@ -1164,19 +1164,19 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::DragEnter:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::DragMove:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Drop:
if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDropEvent( (TQDropEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Show:
@@ -1187,16 +1187,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted );
showEvent( (TQShowEvent*)e );
checkTempFiles();
- return TRUE;
+ return true;
case TQEvent::Wheel:
if ( !( w = isAFormWindowChild( o ) ) ||
::tqt_cast<SizeHandle*>(o) ||
::tqt_cast<OrderIndicator*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::FocusIn:
if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE; //FIXME
+ return true; //FIXME
if ( hierarchyView->formDefinitionView()->isRenaming()
&& ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) )
TQApplication::sendPostedEvents();
@@ -1205,7 +1205,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
while ( w ) {
if ( ::tqt_cast<SourceEditor*>(w) )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->checkTimeStamp();
@@ -1217,7 +1217,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break;
case TQEvent::FocusOut:
if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE;
+ return true;
break;
default:
return TQMainWindow::eventFilter( o, e );
@@ -1334,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 );
@@ -1349,7 +1349,7 @@ 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 ( e->object() == w )
waitingForDelete.append( e );
@@ -1360,7 +1360,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
actionEditor->parentWidget()->hide();
}
- return TRUE;
+ return true;
}
void MainWindow::activeWindowChanged( TQWidget *w )
@@ -1371,7 +1371,7 @@ void MainWindow::activeWindowChanged( TQWidget *w )
FormWindow *ofw = lastActiveFormWindow;
lastActiveFormWindow = fw;
lastActiveFormWindow->updateUndoInfo();
- emit hasActiveForm( TRUE );
+ emit hasActiveForm( true );
if ( formWindow() ) {
formWindow()->emitShowProperties();
emit formModified( formWindow()->commandHistory()->isModified() );
@@ -1406,17 +1406,17 @@ 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();
@@ -1428,18 +1428,18 @@ void MainWindow::activeWindowChanged( TQWidget *w )
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" ) );
@@ -1457,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 )
@@ -1491,8 +1491,8 @@ 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 );
}
}
@@ -1549,18 +1549,18 @@ 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 );
+ 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 );
+ 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 );
+ 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 );
+ w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true );
if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
pixmap = 0;
@@ -1713,12 +1713,12 @@ 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;
+ 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;
@@ -1738,7 +1738,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
@@ -1747,10 +1747,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( 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 ) {
@@ -1760,10 +1760,10 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
title, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( 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 ) {
@@ -1774,7 +1774,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "pageTitle", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pageTitle", true );
}
} else if ( id == props[ "pixmap" ] ) {
TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap();
@@ -1786,7 +1786,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
pix, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "pixmap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pixmap", true );
}
}
}
@@ -1858,7 +1858,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
currentPage + 1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( 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() ) );
@@ -1868,7 +1868,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
currentPage -1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "currentPage", TRUE );
+ MetaDataBase::setPropertyChanged( w, "currentPage", true );
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase::
@@ -1898,7 +1898,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "rename" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- bool ok = FALSE;
+ 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" ),
@@ -1958,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 );
@@ -1998,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;
}
@@ -2026,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;
@@ -2058,69 +2058,69 @@ void MainWindow::selectionChanged()
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( w ) );
- breakLayout = TRUE;
+ 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( w ) );
- breakLayout = TRUE;
+ breakLayout = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
- breakLayout = TRUE;
+ 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 );
}
}
@@ -2247,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();
@@ -2264,7 +2264,7 @@ void MainWindow::readConfig()
qworkspace->setBackgroundPixmap( pix );
return;
}
- readPreviousConfig = TRUE;
+ readPreviousConfig = true;
}
if ( !readPreviousConfig ) {
fileFilter = config.readEntry( keybase + "FileFilter", fileFilter );
@@ -2303,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 );
@@ -2314,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() ) );
@@ -2335,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" );
@@ -2595,13 +2595,13 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
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( w ) ), w ) ) {
@@ -2609,18 +2609,18 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
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;
+ 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;
@@ -2641,7 +2641,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
@@ -2650,12 +2650,12 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( 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 ) {
@@ -2665,15 +2665,15 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( w, "title", TRUE );
+ MetaDataBase::setPropertyChanged( w, "title", true );
}
- return TRUE;
+ return true;
}
if ( !WidgetFactory::isPassiveInteractor( w ) )
editSource();
- return TRUE;
+ return true;
}
void MainWindow::rebuildCustomWidgetGUI()
@@ -2698,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 ) );
@@ -2725,16 +2725,16 @@ 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 )
@@ -2743,10 +2743,10 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void MainWindow::setGrid( const TQPoint &p )
@@ -2796,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;
@@ -2818,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();
@@ -2843,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 );
}
}
@@ -2955,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();
@@ -3199,7 +3199,7 @@ void MainWindow::setModified( bool b, TQWidget *window )
}
return;
}
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
@@ -3210,13 +3210,13 @@ 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();
}
@@ -3271,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 );
@@ -3415,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 ) {
@@ -3435,7 +3435,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
break;
}
}
- mblockNewForms = FALSE;
+ mblockNewForms = false;
}
@@ -3459,7 +3459,7 @@ void MainWindow::formNameChanged( FormWindow *fw )
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
if ( e->object() == fw )
- e->refresh( TRUE );
+ e->refresh( true );
if ( e->project() == fw->project() )
e->resetContext();
}
@@ -3553,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 ) {
@@ -3571,7 +3571,7 @@ bool MainWindow::openProjectSettings( Project *pro )
}
if ( singleProject )
- dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE );
+ dia.tabWidget->setTabEnabled( dia.tabSettings, false );
int res = dia.exec();
@@ -3580,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;
@@ -3631,7 +3631,7 @@ 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();
@@ -3648,18 +3648,18 @@ void MainWindow::setSingleProject( Project *pro )
}
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;
@@ -3677,16 +3677,16 @@ 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 );
@@ -3696,11 +3696,11 @@ void MainWindow::showGUIStuff( bool b )
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 );
+ 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 );
@@ -3714,16 +3714,16 @@ 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 );
@@ -3733,11 +3733,11 @@ void MainWindow::showGUIStuff( bool b )
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 );
+ 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 605aa578..a659a254 100644
--- a/kdevdesigner/designer/mainwindow.h
+++ b/kdevdesigner/designer/mainwindow.h
@@ -85,7 +85,7 @@ class MainWindow : public TQMainWindow
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();
diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp
index 86837088..7e4f92e0 100644
--- a/kdevdesigner/designer/mainwindowactions.cpp
+++ b/kdevdesigner/designer/mainwindowactions.cpp
@@ -128,37 +128,37 @@ void MainWindow::setupEditActions()
actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) );
actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) );
connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) );
- actionEditUndo->setEnabled( FALSE );
+ actionEditUndo->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) );
- actionEditRedo->setEnabled( FALSE );
+ actionEditRedo->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) );
- actionEditCut->setEnabled( FALSE );
+ actionEditCut->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) );
- actionEditCopy->setEnabled( FALSE );
+ actionEditCopy->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) );
- actionEditPaste->setEnabled( FALSE );
+ actionEditPaste->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
- actionEditDelete->setEnabled( FALSE );
+ actionEditDelete->setEnabled( false );
#ifdef TQ_WS_MAC
TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 );
connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) );
@@ -168,19 +168,19 @@ void MainWindow::setupEditActions()
actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) );
actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) );
connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) );
- actionEditSelectAll->setEnabled( TRUE );
+ actionEditSelectAll->setEnabled( true );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) );
- actionEditRaise->setEnabled( FALSE );
+ actionEditRaise->setEnabled( false );
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) );
- actionEditLower->setEnabled( FALSE );
+ actionEditLower->setEnabled( false );
actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(),
i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 );
@@ -271,25 +271,25 @@ void MainWindow::setupSearchActions()
actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ),
i18n( "&Find..." ), CTRL + Key_F, this, 0 );
connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) );
- actionSearchFind->setEnabled( FALSE );
+ actionSearchFind->setEnabled( false );
actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) );
actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(),
i18n( "Find &Incremental" ), ALT + Key_I, this, 0 );
connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) );
- actionSearchIncremetal->setEnabled( FALSE );
+ actionSearchIncremetal->setEnabled( false );
actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) );
actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(),
i18n( "&Replace..." ), CTRL + Key_R, this, 0 );
connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) );
- actionSearchReplace->setEnabled( FALSE );
+ actionSearchReplace->setEnabled( false );
actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) );
actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(),
i18n( "&Goto Line..." ), ALT + Key_G, this, 0 );
connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) );
- actionSearchGotoLine->setEnabled( FALSE );
+ actionSearchGotoLine->setEnabled( false );
actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) );
/* TQToolBar *tb = new TQToolBar( this, "Search" );
@@ -304,7 +304,7 @@ void MainWindow::setupSearchActions()
this, TQ_SLOT( searchIncremetalFind() ) );
connect( incrementalSearch, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( searchIncremetalFindNext() ) );
- incrementalSearch->setEnabled( FALSE );
+ incrementalSearch->setEnabled( false );
TQPopupMenu *menu = new TQPopupMenu( this, "Search" );
menubar->insertItem( i18n( "&Search" ), menu );
@@ -319,7 +319,7 @@ void MainWindow::setupLayoutActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
- actionGroupTools->setExclusive( TRUE );
+ actionGroupTools->setExclusive( true );
connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) );
}
@@ -328,53 +328,53 @@ void MainWindow::setupLayoutActions()
actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") );
actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) );
connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) );
- actionEditAdjustSize->setEnabled( FALSE );
+ actionEditAdjustSize->setEnabled( false );
actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"),
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) );
- actionEditHLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"),
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) );
- actionEditVLayout->setEnabled( FALSE );
+ 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, this, 0 );
actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") );
actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) );
connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) );
- actionEditGridLayout->setEnabled( FALSE );
+ actionEditGridLayout->setEnabled( false );
actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"),
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) );
- actionEditSplitHorizontal->setEnabled( FALSE );
+ actionEditSplitHorizontal->setEnabled( false );
actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"),
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, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) );
- actionEditSplitVertical->setEnabled( FALSE );
+ actionEditSplitVertical->setEnabled( false );
actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"),
i18n( "&Break Layout" ), CTRL + Key_B, this, 0 );
actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") );
actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) );
connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) );
- actionEditBreakLayout->setEnabled( FALSE );
+ 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,7 +423,7 @@ void MainWindow::setupToolActions()
{
if ( !actionGroupTools ) {
actionGroupTools = new TQActionGroup( this );
- actionGroupTools->setExclusive( TRUE );
+ actionGroupTools->setExclusive( true );
connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ),
this, TQ_SLOT( toolSelected(TQAction*) ) );
}
@@ -431,7 +431,7 @@ void MainWindow::setupToolActions()
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 );
@@ -518,7 +518,7 @@ 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( TQt::Vertical );
tb2->setBackgroundMode( PaletteBase );
@@ -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,7 +594,7 @@ 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( TQt::Vertical );
tb2->setFrameStyle( TQFrame::NoFrame );
@@ -638,9 +638,9 @@ void MainWindow::setupFileActions()
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") );
@@ -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 );
+ 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 );
+ 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;
@@ -810,7 +810,7 @@ void MainWindow::setupProjectActions()
a->setStatusTip( i18n("Adds a file to the current project") );
a->setWhatsThis( whatsThisFrom( "Project|Add File" ) );
connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) );
- a->setEnabled( FALSE );
+ a->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
a->addTo( projectMenu );
@@ -820,7 +820,7 @@ void MainWindow::setupProjectActions()
actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") );
actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) );
connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) );
- actionEditPixmapCollection->setEnabled( FALSE );
+ actionEditPixmapCollection->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) );
actionEditPixmapCollection->addTo( projectMenu );
@@ -830,7 +830,7 @@ void MainWindow::setupProjectActions()
actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") );
actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) );
connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) );
- //actionEditDatabaseConnections->setEnabled( FALSE );
+ //actionEditDatabaseConnections->setEnabled( false );
//connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) );
if ( !singleProject )
actionEditDatabaseConnections->addTo( projectMenu );
@@ -841,7 +841,7 @@ void MainWindow::setupProjectActions()
actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") );
actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) );
connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) );
- actionEditProjectSettings->setEnabled( FALSE );
+ actionEditProjectSettings->setEnabled( false );
connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) );
actionEditProjectSettings->addTo( projectMenu );
@@ -898,9 +898,9 @@ void MainWindow::setupPreviewActions()
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, this );
actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") );
@@ -1038,10 +1038,10 @@ 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( fw );
@@ -1051,10 +1051,10 @@ void MainWindow::fileNewDialog()
fw->resize( 600, 480 );
insertFormWindow( fw );
fw->killAccels( fw );
- fw->project()->setModified( TRUE );
+ fw->project()->setModified( true );
fw->setFocus();
- fw->setSavePixmapInProject( TRUE );
- fw->setSavePixmapInline( FALSE );
+ fw->setSavePixmapInProject( true );
+ fw->setSavePixmapInline( false );
}
void MainWindow::fileNewFile()
@@ -1064,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();
}
@@ -1127,7 +1127,7 @@ void MainWindow::fileCloseProject()
}
TQWidgetList windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( TRUE );
+ qWorkspace()->blockSignals( true );
TQWidgetListIt wit( windows );
while ( wit.current() ) {
TQWidget *w = wit.current();
@@ -1146,7 +1146,7 @@ void MainWindow::fileCloseProject()
}
hierarchyView->clear();
windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( FALSE );
+ qWorkspace()->blockSignals( false );
actionGroupProjects->removeChild( a );
projects.remove( a );
delete a;
@@ -1164,16 +1164,16 @@ void MainWindow::fileCloseProject()
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()
@@ -1233,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;
}
@@ -1274,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();
@@ -1289,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 );
@@ -1318,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() );
@@ -1360,7 +1360,7 @@ bool MainWindow::fileSaveForm()
fw = se->formWindow();
else if ( se->sourceFile() ) {
se->sourceFile()->save();
- return TRUE;
+ return true;
}
}
}
@@ -1368,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()
@@ -1386,12 +1386,12 @@ bool MainWindow::fileSaveAs()
TQWidget *w = qworkspace->activeWindow();
if ( !w )
- return TRUE;
+ return true;
if ( ::tqt_cast<FormWindow*>(w) )
return ( (FormWindow*)w )->formFile()->saveAs();
else if ( ::tqt_cast<SourceEditor*>(w) )
return ( (SourceEditor*)w )->saveAs();
- return FALSE;
+ return false;
}
void MainWindow::fileSaveAll()
@@ -1402,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 ) {
@@ -1550,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"
@@ -1715,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();
}
@@ -1809,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();
@@ -1839,7 +1839,7 @@ void MainWindow::editProjectSettings()
void MainWindow::editPixmapCollection()
{
- PixmapCollectionEditor dia( this, 0, TRUE );
+ PixmapCollectionEditor dia( this, 0, true );
dia.setProject( currentProject );
dia.exec();
}
@@ -1847,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
}
@@ -1855,7 +1855,7 @@ 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, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
dia->buttonColor->setEditor( StyledButton::ColorEditor );
@@ -1872,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 );
@@ -1909,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();
@@ -1934,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() )
@@ -1952,7 +1952,7 @@ void MainWindow::searchFind()
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(),
@@ -1974,7 +1974,7 @@ void MainWindow::searchIncremetalFind()
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
- FALSE, FALSE, TRUE, FALSE );
+ false, false, true, false );
}
void MainWindow::searchIncremetalFindNext()
@@ -1984,7 +1984,7 @@ void MainWindow::searchIncremetalFindNext()
return;
( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(),
- FALSE, FALSE, TRUE, TRUE );
+ false, false, true, true );
}
void MainWindow::searchReplace()
@@ -1994,7 +1994,7 @@ void MainWindow::searchReplace()
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(),
@@ -2010,7 +2010,7 @@ void MainWindow::searchGotoLine()
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 a3e53973..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,10 +148,10 @@ 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 );
+ setAcceptDrops( true );
setFocusPolicy( TQWidget::StrongFocus );
addItem.setMenuText( i18n("new menu") );
@@ -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();
@@ -618,20 +618,20 @@ void MenuBarEditor::mouseMoveEvent( TQMouseEvent * e )
{
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 {
@@ -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 11277258..72d7968a 100644
--- a/kdevdesigner/designer/menubareditor.h
+++ b/kdevdesigner/designer/menubareditor.h
@@ -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 2639639b..7aad4776 100644
--- a/kdevdesigner/designer/metadatabase.cpp
+++ b/kdevdesigner/designer/metadatabase.cpp
@@ -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;
@@ -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 && !::tqt_cast<TQLayoutWidget*>(widget) &&
( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( widget ) ) ) ||
widget && widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) )
- isInnerLayout = FALSE;
+ isInnerLayout = false;
if ( layout ) {
@@ -527,7 +527,7 @@ void MetaDataBase::setupConnections( TQObject *o, const TQValueList<LanguageInte
formfile->formWindow()->mainContainer() :
formfile->project()->objectForFakeFormFile( formfile ),
(*cit).slot.latin1(),
- FALSE );
+ false );
}
}
@@ -539,7 +539,7 @@ 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 ) {
@@ -548,9 +548,9 @@ bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString
conn.signal == signal &&
conn.receiver ==receiver &&
conn.slot == slot )
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -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,19 +671,19 @@ 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 ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer();
- slotList = o->metaObject()->slotNames( TRUE );
+ slotList = o->metaObject()->slotNames( true );
if ( slotList.find( slot ) != -1 )
- return TRUE;
+ return true;
}
//if ( ::tqt_cast<CustomWidget*>(o) ) {
@@ -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,19 +901,19 @@ 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 ( ::tqt_cast<FormWindow*>(o) ) {
o = ( (FormWindow*)o )->mainContainer();
- functionList = o->metaObject()->slotNames( TRUE );
+ functionList = o->metaObject()->slotNames( true );
if ( functionList.find( function ) != -1 )
- return TRUE;
+ return true;
}
//if ( ::tqt_cast<CustomWidget*>(o) ) {
@@ -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/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp
index dbe5bcd8..46d1f70e 100644
--- a/kdevdesigner/designer/multilineeditorimpl.cpp
+++ b/kdevdesigner/designer/multilineeditorimpl.cpp
@@ -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;
@@ -212,7 +212,7 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
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 );
@@ -224,22 +224,22 @@ MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget
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 && ::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() );
@@ -296,7 +296,7 @@ void MultiLineEditor::applyClicked()
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/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp
index 629d53ff..72c8323e 100644
--- a/kdevdesigner/designer/newformimpl.cpp
+++ b/kdevdesigner/designer/newformimpl.cpp
@@ -74,7 +74,7 @@ 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( fw );
@@ -113,11 +113,11 @@ void FormItem::insert( Project *pro )
MainWindow::self->objectHierarchy()->formDefinitionView()->refresh();
MainWindow::self->objectHierarchy()->rebuild();
fw->killAccels( fw );
- fw->project()->setModified( TRUE );
+ 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,7 +366,7 @@ 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, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@@ -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/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/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp
index 84087f01..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;
@@ -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,7 +115,7 @@ 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 )
@@ -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/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp
index e27d3a21..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 );
@@ -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 70d0baa4..4a86abb6 100644
--- a/kdevdesigner/designer/paletteeditoradvancedimpl.h
+++ b/kdevdesigner/designer/paletteeditoradvancedimpl.h
@@ -37,7 +37,7 @@ class PaletteEditorAdvanced : public PaletteEditorAdvancedBase
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 fca7fe90..bacfb70a 100644
--- a/kdevdesigner/designer/paletteeditorimpl.cpp
+++ b/kdevdesigner/designer/paletteeditorimpl.cpp
@@ -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 ac1cf229..83a598c3 100644
--- a/kdevdesigner/designer/paletteeditorimpl.h
+++ b/kdevdesigner/designer/paletteeditorimpl.h
@@ -37,7 +37,7 @@ class PaletteEditor : public PaletteEditorBase
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 bf521b48..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 );
@@ -178,9 +178,9 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
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.setChooserMode( true );
dia.setCurrentItem( MetaDataBase::pixmapKey( fw, old.serialNumber() ) );
if ( dia.exec() == TQDialog::Accepted ) {
TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) );
@@ -188,7 +188,7 @@ TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, T
return pix;
}
} else {
- PixmapFunction dia( parent, 0, TRUE );
+ 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( fw, old.serialNumber() ) );
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.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h
index c32fc135..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,8 +108,8 @@ void PixmapCollectionEditor::setChooserMode( bool c )
buttonClose->hide();
buttonOk->show();
buttonCancel->show();
- buttonOk->setEnabled( FALSE );
- buttonOk->setDefault( TRUE );
+ 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" ) );
@@ -117,7 +117,7 @@ void PixmapCollectionEditor::setChooserMode( bool c )
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 bf60b215..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,8 +100,8 @@ 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 );
@@ -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" ||*/ ::tqt_cast<QSeparatorAction*>(a) )
- separator = TRUE;
+ separator = true;
if ( a && !a->childrenListObject().isEmpty() )
a->installEventFilter( this );
}
@@ -151,7 +151,7 @@ void PopupMenuEditorItem::init()
if ( m && !isSeparator() ) {
s = new PopupMenuEditor( m->formWindow(), m );
TQString n = "PopupMenuEditor";
- m->formWindow()->unify( s, n, TRUE );
+ m->formWindow()->unify( s, n, true );
s->setName( n );
MetaDataBase::addEntry( s );
}
@@ -180,7 +180,7 @@ bool PopupMenuEditorItem::isVisible() const
return ( g->isVisible() && g->usesDropDown() );
else if ( a )
return a->isVisible();
- return FALSE;
+ return false;
}
void PopupMenuEditorItem::showMenu( int x, int y )
@@ -223,20 +223,20 @@ int PopupMenuEditorItem::count() const
bool PopupMenuEditorItem::eventFilter( TQObject * o, TQEvent * event )
{
if ( ! ::tqt_cast<TQActionGroup*>( o ) )
- return FALSE;
+ return false;
if ( event->type() == TQEvent::ChildInserted ) {
TQChildEvent * ce = ( TQChildEvent * ) event;
TQObject * c = ce->child();
TQAction * action = ::tqt_cast<TQAction*>( c );
if ( s->find( action ) != -1 ) // avoid duplicates
- return FALSE;
+ 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,7 +303,7 @@ void PopupMenuEditor::init()
addItem.action()->setMenuText( i18n("new item") );
addSeparator.action()->setMenuText( i18n("new separator") );
- setAcceptDrops( TRUE );
+ setAcceptDrops( true );
setFocusPolicy( TQWidget::StrongFocus );
lineEdit = new TQLineEdit( this );
@@ -357,7 +357,7 @@ 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", 0, FALSE, FALSE );
+ TQObjectList *l = actionGroup->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
insert( i, index );
for ( ; it.current(); ++it ) {
@@ -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 );
@@ -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 ) {
@@ -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
@@ -861,9 +861,9 @@ void PopupMenuEditor::dropEvent( TQDropEvent * e )
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", 0, FALSE, FALSE );
+ TQObjectList *l = g->queryList( "TQAction", 0, false, false );
TQObjectListIterator it( *l );
for ( ; it.current(); ++it ) {
g = ::tqt_cast<TQActionGroup*>(it.current());
@@ -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 );
diff --git a/kdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp
index c3c16e32..d703959f 100644
--- a/kdevdesigner/designer/previewwidgetimpl.cpp
+++ b/kdevdesigner/designer/previewwidgetimpl.cpp
@@ -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/project.cpp b/kdevdesigner/designer/project.cpp
index 8dcf8b28..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
}
@@ -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,7 +1305,7 @@ 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 ) {
@@ -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 )
@@ -1491,7 +1491,7 @@ void Project::designerCreated()
const TQString & ) ),
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 );
diff --git a/kdevdesigner/designer/project.h b/kdevdesigner/designer/project.h
index e2d4ef2d..e2ec4149 100644
--- a/kdevdesigner/designer/project.h
+++ b/kdevdesigner/designer/project.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();
@@ -116,12 +116,12 @@ class Project : public TQObject
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/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp
index 77ac4f25..0aeae976 100644
--- a/kdevdesigner/designer/projectsettingsimpl.cpp
+++ b/kdevdesigner/designer/projectsettingsimpl.cpp
@@ -52,7 +52,7 @@
* 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 )
@@ -62,7 +62,7 @@ ProjectSettings::ProjectSettings( Project *pro, TQWidget* parent, const char* n
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 ad784a3c..6609d506 100644
--- a/kdevdesigner/designer/projectsettingsimpl.h
+++ b/kdevdesigner/designer/projectsettingsimpl.h
@@ -40,7 +40,7 @@ class ProjectSettings : public ProjectSettingsBase
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 af1d26d7..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 );
}
@@ -299,13 +299,13 @@ void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRec
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;
@@ -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;
}
/*!
@@ -600,7 +600,7 @@ TQLineEdit *PropertyTextItem::lined()
if ( PropertyItem::name() == "name" ) {
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"
@@ -616,7 +616,7 @@ TQLineEdit *PropertyTextItem::lined()
button->setFixedWidth( 20 );
connect( button, TQ_SIGNAL( clicked() ),
this, TQ_SLOT( getText() ) );
- lin->setFrame( FALSE );
+ lin->setFrame( false );
}
connect( lin, TQ_SIGNAL( returnPressed() ),
this, TQ_SLOT( setValue() ) );
@@ -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 );
@@ -755,15 +755,15 @@ void PropertyTextItem::getText()
{
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 );
}
}
@@ -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 );
@@ -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,10 +905,10 @@ 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( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -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,10 +980,10 @@ 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( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -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,10 +1055,10 @@ 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( ::TQt::ISODate ) );
PropertyItem::setValue( v );
@@ -1085,7 +1085,7 @@ 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" ) );
@@ -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();
}
@@ -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 )
@@ -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 )
@@ -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 )
@@ -1699,7 +1699,7 @@ void PropertyPixmapItem::getPixmap()
bool PropertyPixmapItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -1754,11 +1754,11 @@ PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, Prop
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,8 +1863,8 @@ 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 );
@@ -1876,9 +1876,9 @@ PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, Proper
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 );
}
}
@@ -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;
}
// --------------------------------------------------------------
@@ -2305,7 +2305,7 @@ void PropertyPaletteItem::getPalette()
{
if ( !listview->propertyEditor()->widget()->isWidgetType() )
return;
- bool ok = FALSE;
+ bool ok = false;
TQWidget *w = (TQWidget*)listview->propertyEditor()->widget();
if ( ::tqt_cast<TQScrollView*>(w) )
w = ( (TQScrollView*)w )->viewport();
@@ -2320,7 +2320,7 @@ void PropertyPaletteItem::getPalette()
bool PropertyPaletteItem::hasCustomContents() const
{
- return TRUE;
+ return true;
}
void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r )
@@ -2354,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;
@@ -2406,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() ) {
@@ -2429,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 );
}
@@ -2454,7 +2454,7 @@ 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();
@@ -2493,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 )
@@ -2568,7 +2568,7 @@ void PropertyKeysequenceItem::setValue()
PropertyItem::setValue( v );
if ( sequence->hasFocus() )
notifyValueChange();
- setChanged( TRUE );
+ setChanged( true );
}
void PropertyKeysequenceItem::setValue( const TQVariant &v )
@@ -2595,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()
@@ -2656,18 +2656,18 @@ EnumBox::EnumBox( TQWidget *parent, const char *name )
pop = new EnumPopup( this, "popup", TQObject::WType_Popup );
connect( pop, TQ_SIGNAL( hidden() ), this, TQ_SLOT( popupHidden() ) );
connect( pop, TQ_SIGNAL( closed() ), this, TQ_SLOT( popupClosed() ) );
- popupShown = FALSE;
- arrowDown = FALSE;
+ popupShown = false;
+ arrowDown = false;
}
void EnumBox::popupHidden()
{
- popupShown = FALSE;
+ popupShown = false;
}
void EnumBox::popupClosed()
{
- popupShown = FALSE;
+ popupShown = false;
emit valueChanged();
}
@@ -2684,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;
}
@@ -2723,14 +2723,14 @@ 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 )
@@ -2745,8 +2745,8 @@ 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();
@@ -2765,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 );
}
@@ -2820,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 );
@@ -2856,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;
}
@@ -2909,11 +2909,11 @@ 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" ) );
@@ -2931,7 +2931,7 @@ PropertyList::PropertyList( PropertyEditor *e )
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
setColumnWidthMode( 1, Manual );
- mousePressed = FALSE;
+ mousePressed = false;
pressItem = 0;
theLastEvent = MouseEvent;
header()->installEventFilter( this );
@@ -3020,10 +3020,10 @@ static bool parent_is_data_aware( TQWidget *w )
TQWidget *p = w ? w->parentWidget() : 0;
while ( p && !p->isTopLevel() ) {
if ( ::tqt_cast<QDesignerDataBrowser*>(p) || ::tqt_cast<QDesignerDataView*>(p) )
- return TRUE;
+ return true;
p = p->parentWidget();
}
- return FALSE;
+ return false;
}
#endif
@@ -3072,7 +3072,7 @@ 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( editor->widget() ) ) {
if ( qstrcmp( p->name(), "geometry" ) == 0 )
@@ -3167,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 );
+ 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 ( ::tqt_cast<TQGroupBox*>(w) )
- item->setVisible( FALSE );
+ item->setVisible( false );
setPropertyValue( item );
if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
} else {
TQStrList lst( p->enumKeys() );
@@ -3201,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();
@@ -3213,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() );
@@ -3227,7 +3227,7 @@ void PropertyList::setupProperties()
valueSet << item->name();
}
if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) )
- item->setChanged( TRUE, FALSE );
+ item->setChanged( true, false );
}
}
@@ -3237,20 +3237,20 @@ void PropertyList::setupProperties()
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 ( ( !::tqt_cast<TQLayoutWidget*>(widget) &&
widget->parentWidget() && ::tqt_cast<FormWindow*>(widget->parentWidget()) ) ) {
- item = new PropertyListItem( this, item, 0, "resizeMode", FALSE );
+ item = new PropertyListItem( this, item, 0, "resizeMode", false );
TQStringList lst;
lst << "Auto" << "FreeResize" << "Minimum" << "Fixed";
item->setValue( lst );
@@ -3258,22 +3258,22 @@ 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 ( !::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 );
+ 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
@@ -3282,19 +3282,19 @@ void PropertyList::setupProperties()
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 ( ::tqt_cast<TQDataTable*>(editor->widget()) || ::tqt_cast<TQDataBrowser*>(editor->widget()) ||
::tqt_cast<TQDataView*>(editor->widget()) ) {
- item = new PropertyDatabaseItem( this, item, 0, "database", FALSE );
+ 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
@@ -3337,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;
@@ -3363,12 +3363,12 @@ 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,
+ item = new PropertyTextItem( this, item, 0, name, true,
::tqt_cast<TQLabel*>(editor->widget()) ||
::tqt_cast<TQTextView*>(editor->widget()) ||
::tqt_cast<TQButton*>(editor->widget()) );
@@ -3377,7 +3377,7 @@ bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name,
item = new PropertyTextItem( this, item, 0,
name, name == "name" &&
editor->widget() == editor->formWindow()->mainContainer(),
- FALSE, TRUE );
+ false, true );
break;
case TQVariant::Bool:
item = new PropertyBoolItem( this, item, 0, name );
@@ -3387,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 );
@@ -3402,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 );
@@ -3417,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 );
@@ -3447,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 )
@@ -3489,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 )
@@ -3503,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 );
}
@@ -3534,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 )
@@ -3548,22 +3548,22 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
( o != this || o != viewport() ) &&
!( ke->state() & ControlButton ) ) {
TQApplication::sendEvent( this, (TQKeyEvent*)e );
- return TRUE;
+ 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 );
+ 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 && ::tqt_cast<TQLineEdit*>(o) && editor->formWindow() ) {
TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQ_SLOT( checkCompressedCommand() ) );
@@ -3577,7 +3577,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
if ( i && ( ::tqt_cast<PropertyColorItem*>(i) || ::tqt_cast<PropertyPixmapItem*>(i) ) ) {
pressItem = i;
pressPos = me->pos();
- mousePressed = TRUE;
+ mousePressed = true;
}
break;
case TQEvent::MouseMove:
@@ -3597,7 +3597,7 @@ 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 ( ::tqt_cast<PropertyPixmapItem*>(i) ) {
@@ -3606,7 +3606,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
TQImage img = pix.convertToImage();
TQImageDrag *drg = new TQImageDrag( img, this );
drg->setPixmap( pix );
- mousePressed = FALSE;
+ mousePressed = false;
drg->dragCopy();
}
}
@@ -3621,15 +3621,15 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
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 );
@@ -3639,7 +3639,7 @@ bool PropertyList::eventFilter( TQObject *o, TQEvent *e )
editor->setup();
}
}
- return TRUE;
+ return true;
}
}
@@ -3661,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();
}
@@ -3689,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 );
@@ -3702,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" ) {
@@ -3771,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();
}
@@ -3913,11 +3913,11 @@ 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 );
+ setRootIsDecorated( true );
connect( this, TQ_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ),
this, TQ_SLOT( renamed( TQListViewItem * ) ) );
}
@@ -3964,7 +3964,7 @@ 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( formWindow, editor->widget(), formWindow->mainContainer() );
HierarchyItem *item = 0;
@@ -4062,15 +4062,15 @@ 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 {
@@ -4106,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 );
}
}
@@ -4160,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;
@@ -4187,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();
}
@@ -4207,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 );
}
}
@@ -4272,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();
@@ -4320,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 93d8c71b..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 );
@@ -143,7 +143,7 @@ class PropertyTextItem : public TQObject,
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();
@@ -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;
}
@@ -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();
diff --git a/kdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp
index 70629f31..c9ac7680 100644
--- a/kdevdesigner/designer/propertyobject.cpp
+++ b/kdevdesigner/designer/propertyobject.cpp
@@ -36,7 +36,7 @@ PropertyObject::PropertyObject( const TQWidgetList &objs )
{
TQPtrVector<TQPtrList<TQMetaObject> > v;
v.resize( objects.count() );
- v.setAutoDelete( TRUE );
+ v.setAutoDelete( true );
for ( TQObject *o = objects.first(); o; o = objects.next() ) {
const TQMetaObject *m = o->metaObject();
@@ -77,7 +77,7 @@ bool PropertyObject::setProperty( const char *name, const TQVariant& value )
for ( TQObject *o = objects.first(); o; o = objects.next() )
o->setProperty( name, value );
- return TRUE;
+ return true;
}
TQVariant PropertyObject::property( const char *name ) const
@@ -95,9 +95,9 @@ bool PropertyObject::mdIsPropertyChanged( const TQString &property )
{
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 )
diff --git a/kdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp
index 87a40ecf..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 );
@@ -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();
}
@@ -123,20 +123,20 @@ bool QCompletionEdit::eventFilter( TQObject *o, TQEvent *e )
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,16 +148,16 @@ 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 ( o == this ) {
if ( e->type() == TQEvent::KeyPress ) {
@@ -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/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 18b00d30..7d853ce7 100644
--- a/kdevdesigner/designer/resource.cpp
+++ b/kdevdesigner/designer/resource.cpp
@@ -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;" );
@@ -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,9 +312,9 @@ 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 );
@@ -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 );
@@ -462,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();
@@ -480,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();
@@ -492,7 +492,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
loadCustomWidgets( customWidgets, this );
if ( !createObject( widget, formwindow) )
- return FALSE;
+ return false;
if ( !forwards.isNull() ) {
for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() )
@@ -569,7 +569,7 @@ bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject )
function.returnType = "void";
function.type = "slot";
function.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, function.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, "slot", function.language, function.returnType );
else
@@ -597,7 +597,7 @@ 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( formwindow, function.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, function.function, true ) )
MetaDataBase::addFunction( formwindow, function.function, function.specifier,
function.access, function.type, function.language,
function.returnType );
@@ -648,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 )
@@ -657,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 )
@@ -676,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");
@@ -686,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;
}
}
}
@@ -694,7 +694,7 @@ bool Resource::save( const TQString& filename, bool formCodeOnly )
TQFile f( filename );
if ( !f.open( IO_WriteOnly | IO_Translate ) )
- return FALSE;
+ return false;
bool b = save( &f );
f.close();
return b;
@@ -703,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++";
@@ -747,7 +747,7 @@ TQString Resource::copy()
if ( !formwindow )
return TQString();
- copying = TRUE;
+ copying = true;
TQString s;
TQTextOStream ts( &s );
@@ -756,10 +756,10 @@ 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();
@@ -781,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;
@@ -806,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 );
@@ -841,7 +841,7 @@ void Resource::paste( const TQString &cb, TQWidget *parent )
}
firstWidget = firstWidget.nextSibling().toElement();
}
- formwindow->setPropertyShowingBlocked( FALSE );
+ formwindow->setPropertyShowingBlocked( false );
formwindow->emitShowProperties();
PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets );
@@ -1026,7 +1026,7 @@ void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStrea
} 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;
@@ -1038,7 +1038,7 @@ 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::
@@ -1067,7 +1067,7 @@ 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=\""
@@ -1089,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();
@@ -1114,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 ) {
@@ -1203,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 );
@@ -1245,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 );
@@ -1269,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 );
@@ -1482,7 +1482,7 @@ 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 ( ::tqt_cast<TQLabel*>(w) && qstrcmp( p->name(), "pixmap" ) == 0 &&
@@ -1538,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 ) {
@@ -1551,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;
}
@@ -1824,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 = 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"
@@ -1835,7 +1835,7 @@ 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 ( ::tqt_cast<TQMainWindow*>(w) )
@@ -1980,9 +1980,9 @@ void Resource::createColumn( const TQDomElement &e, TQWidget *widget )
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" );
@@ -2020,7 +2020,7 @@ 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( table );
@@ -2056,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" );
@@ -2080,7 +2080,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
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;
@@ -2096,7 +2096,7 @@ void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewIt
} 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;
@@ -2131,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 );
}
@@ -2159,15 +2159,15 @@ 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( 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 ) {
@@ -2185,7 +2185,7 @@ 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 ( !::tqt_cast<TQLayout*>(obj) ) {// no layouts in metadatabase... (RS)
if ( obj->inherits( "CustomWidget" ) ) {
@@ -2193,7 +2193,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" )
return;
}
- MetaDataBase::setPropertyChanged( obj, prop, TRUE );
+ MetaDataBase::setPropertyChanged( obj, prop, true );
}
TQVariant defVarient;
@@ -2290,11 +2290,11 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "geometry" ) {
if ( obj == toplevel ) {
- hadGeometry = TRUE;
+ hadGeometry = true;
toplevel->resize( v.toRect().size() );
return;
} else if ( obj == formwindow->mainContainer() ) {
- hadGeometry = TRUE;
+ hadGeometry = true;
formwindow->resize( v.toRect().size() );
return;
}
@@ -2316,7 +2316,7 @@ void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQD
if ( prop == "name" ) {
if ( pasting ) {
TQString s = v.toString();
- formwindow->unify( obj, s, TRUE );
+ formwindow->unify( obj, s, true );
obj->setName( s );
return;
} else if ( formwindow && obj == formwindow->mainContainer() ) {
@@ -2363,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 );
@@ -2546,7 +2546,7 @@ void Resource::loadConnections( const TQDomElement &e )
} 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();
@@ -2564,7 +2564,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) {
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();
@@ -2604,7 +2604,7 @@ void Resource::loadConnections( const TQDomElement &e )
if ( slot.returnType.isEmpty() )
slot.returnType = "void";
slot.function = n.firstChild().toText().data();
- if ( !MetaDataBase::hasFunction( formwindow, slot.function, TRUE ) )
+ if ( !MetaDataBase::hasFunction( formwindow, slot.function, true ) )
MetaDataBase::addFunction( formwindow, slot.function, slot.specifier,
slot.access, "slot", slot.language, slot.returnType );
else
@@ -2777,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();
@@ -2817,12 +2817,12 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
if ( !langIface || formwindow->project()->isCpp() ) {
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;
@@ -2900,7 +2900,7 @@ void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent )
ts << makeIndent( indent ) << "</slots>" << endl;
}
- TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, TRUE );
+ TQValueList<MetaDataBase::Function> functionList = MetaDataBase::functionList( formwindow, true );
if ( !functionList.isEmpty() ) {
ts << makeIndent( indent ) << "<functions>" << endl;
indent++;
@@ -3038,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")
@@ -3058,13 +3058,13 @@ void Resource::loadChildAction( TQObject *parent, const TQDomElement &e )
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")
@@ -3147,7 +3147,7 @@ void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent )
return;
ts << makeIndent( indent ) << "<menubar>" << endl;
indent++;
- MetaDataBase::setPropertyChanged( mb, "name", TRUE ); // FIXME: remove
+ MetaDataBase::setPropertyChanged( mb, "name", true ); // FIXME: remove
saveObjectProperties( mb, ts, indent );
for ( int i = 0; i < (int)mb->count(); ++i ) {
@@ -3268,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 );
@@ -3288,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 7d32cf65..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 );
diff --git a/kdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp
index a3433003..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();
diff --git a/kdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h
index d022c4e5..0d71fc99 100644
--- a/kdevdesigner/designer/sizehandle.h
+++ b/kdevdesigner/designer/sizehandle.h
@@ -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 82ebc991..b7db3d2c 100644
--- a/kdevdesigner/designer/sourceeditor.cpp
+++ b/kdevdesigner/designer/sourceeditor.cpp
@@ -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 ( ::tqt_cast<FormWindow*>(o) )
- ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE );
+ ( (FormWindow*)o )->formFile()->setCodeEdited( true );
save();
- bool changed = FALSE;
+ bool changed = false;
if ( &(*obj) != o ) {
saveBreakPoints();
- changed = TRUE;
+ changed = true;
}
obj = o;
pro = p;
@@ -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,7 +302,7 @@ bool SourceEditor::saveAs()
return formWindow()->formFile()->saveAs();
else if ( sourceFile() )
return sourceFile()->saveAs();
- return FALSE;
+ return false;
}
SourceFile *SourceEditor::sourceFile() const
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 81fe540a..004c8898 100644
--- a/kdevdesigner/designer/sourcefile.h
+++ b/kdevdesigner/designer/sourcefile.h
@@ -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/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp
index d5d10d84..b74c3ae5 100644
--- a/kdevdesigner/designer/startdialogimpl.cpp
+++ b/kdevdesigner/designer/startdialogimpl.cpp
@@ -43,7 +43,7 @@ StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath )
newForm = new NewForm( templateView, templatePath );
recentFiles.clear();
initFileOpen();
- showInFuture = TRUE;
+ showInFuture = true;
connect( buttonHelp, TQ_SIGNAL( clicked() ),
MainWindow::self, TQ_SLOT( showDialogHelp() ) );
@@ -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 );
}
}
@@ -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/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp
index 8ea02a98..2976be3b 100644
--- a/kdevdesigner/designer/styledbutton.cpp
+++ b/kdevdesigner/designer/styledbutton.cpp
@@ -39,10 +39,10 @@
#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, TQ_SIGNAL(clicked()), TQ_SLOT(onEditor()));
@@ -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/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..d0d85a63 100644
--- a/kdevdesigner/designer/syntaxhighlighter_html.h
+++ b/kdevdesigner/designer/syntaxhighlighter_html.h
@@ -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/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp
index 19fe6e48..e6c12039 100644
--- a/kdevdesigner/designer/tableeditorimpl.cpp
+++ b/kdevdesigner/designer/tableeditorimpl.cpp
@@ -73,7 +73,7 @@ TableEditor::TableEditor( TQWidget* parent, TQWidget *editWidget, FormWindow *f
// 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() && ::tqt_cast<TQDataTable*>(editTable) ) {
@@ -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,13 +150,13 @@ 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 ( ::tqt_cast<TQDataTable*>(editTable) ) {
@@ -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,7 +242,7 @@ 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 ( ::tqt_cast<TQDataTable*>(editTable) ) {
comboFields->setFocus();
@@ -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
}
@@ -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 f6889bc3..d6b42f04 100644
--- a/kdevdesigner/designer/tableeditorimpl.h
+++ b/kdevdesigner/designer/tableeditorimpl.h
@@ -41,7 +41,7 @@ class TableEditor : public TableEditorBase
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 79a51e67..f92e7872 100644
--- a/kdevdesigner/designer/timestamp.cpp
+++ b/kdevdesigner/designer/timestamp.cpp
@@ -31,7 +31,7 @@
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, TQ_SIGNAL( timeout() ), this, TQ_SLOT( autoCheckTimeStamp() ) );
@@ -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/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp
index c35fb300..070ab14c 100644
--- a/kdevdesigner/designer/variabledialogimpl.cpp
+++ b/kdevdesigner/designer/variabledialogimpl.cpp
@@ -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/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp
index 1d71f4e0..def64c17 100644
--- a/kdevdesigner/designer/widgetaction.cpp
+++ b/kdevdesigner/designer/widgetaction.cpp
@@ -39,7 +39,7 @@ void WidgetAction::addedTo( TQWidget *w, TQWidget *container )
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 2e0c8e26..b3c81368 100644
--- a/kdevdesigner/designer/widgetaction.h
+++ b/kdevdesigner/designer/widgetaction.h
@@ -36,15 +36,15 @@ class WidgetAction : public TQAction
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 7db821df..595cae71 100644
--- a/kdevdesigner/designer/widgetfactory.cpp
+++ b/kdevdesigner/designer/widgetfactory.cpp
@@ -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 ( o != 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,12 +294,12 @@ 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, TQ_SIGNAL( clicked() ), this, TQ_SLOT( prevPage() ) );
connect( next, TQ_SIGNAL( clicked() ), this, TQ_SLOT( nextPage() ) );
@@ -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,7 +517,7 @@ 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.
*/
@@ -679,7 +679,7 @@ 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!
*/
@@ -701,9 +701,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( init ) {
QDesignerToolButton *tb = new QDesignerToolButton( parent, name );
if ( ::tqt_cast<TQToolBox*>(widgetOfContainer(parent))) {
- tb->setUsesTextLabel(TRUE);
+ tb->setUsesTextLabel(true);
tb->setTextLabel("...");
- tb->setAutoRaise(TRUE);
+ tb->setAutoRaise(true);
tb->setTextPosition(TQToolButton::BesideIcon);
} else {
tb->setText( "..." );
@@ -791,17 +791,17 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
if ( init ) {
l->setText( TQString::fromLatin1( name ) );
MetaDataBase::addEntry( l );
- MetaDataBase::setPropertyChanged( l, "text", TRUE );
+ 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 );
+ l->setScaledContents( true );
MetaDataBase::addEntry( l );
- MetaDataBase::setPropertyChanged( l, "pixmap", TRUE );
- MetaDataBase::setPropertyChanged( l, "scaledContents", TRUE );
+ MetaDataBase::setPropertyChanged( l, "pixmap", true );
+ MetaDataBase::setPropertyChanged( l, "scaledContents", true );
}
return l;
} else if ( className == "TQLayoutWidget" )
@@ -830,7 +830,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
}
return ws;
} else if ( className == "TQComboBox" ) {
- return new TQComboBox( FALSE, parent, name );
+ return new TQComboBox( false, parent, name );
} else if ( className == "TQWidget" ) {
if ( parent &&
( ::tqt_cast<FormWindow*>(parent) ||
@@ -854,12 +854,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else
dia = new TQDialog( parent, name );
if ( parent )
- dia->reparent( parent, TQPoint( 0, 0 ), TRUE );
+ dia->reparent( parent, TQPoint( 0, 0 ), true );
return dia;
} else if ( className == "TQWizard" ) {
TQWizard *wiz = new QDesignerWizard( parent, name );
if ( parent )
- wiz->reparent( parent, TQPoint( 0, 0 ), TRUE );
+ wiz->reparent( parent, TQPoint( 0, 0 ), true );
if ( init && ::tqt_cast<FormWindow*>(parent) ) {
QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" );
MetaDataBase::addEntry( dw );
@@ -870,8 +870,8 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == "Spacer" ) {
Spacer *s = new Spacer( parent, name );
MetaDataBase::addEntry( s );
- MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
- MetaDataBase::setPropertyChanged( s, "sizeType", TRUE );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
+ MetaDataBase::setPropertyChanged( s, "sizeType", true );
if ( !r )
return s;
if ( !r->isValid() || r->width() < 2 && r->height() < 2 )
@@ -900,7 +900,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( s );
- MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
} else if ( className == "TQScrollBar" ) {
TQScrollBar *s = new TQScrollBar( parent, name );
@@ -911,7 +911,7 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
else if ( r->width() > r->height() )
s->setOrientation( TQt::Horizontal );
MetaDataBase::addEntry( s );
- MetaDataBase::setPropertyChanged( s, "orientation", TRUE );
+ MetaDataBase::setPropertyChanged( s, "orientation", true );
return s;
} else if ( className == "TQFrame" ) {
if ( !init )
@@ -922,9 +922,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
} else if ( className == "Line" ) {
Line *l = new Line( parent, name );
MetaDataBase::addEntry( l );
- MetaDataBase::setPropertyChanged( l, "orientation", TRUE );
- MetaDataBase::setPropertyChanged( l, "frameShadow", TRUE );
- MetaDataBase::setPropertyChanged( l, "frameShape", TRUE );
+ 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 )
@@ -934,9 +934,9 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
return l;
} 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 );
+ mw->setDockMenuEnabled( false );
MetaDataBase::addEntry( dw );
mw->setCentralWidget( dw );
(void)mw->statusBar();
@@ -961,12 +961,12 @@ TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *pare
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" ) {
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
@@ -1145,40 +1145,40 @@ 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 );
+ return ( lastWasAPassiveInteractor = true );
if ( ::tqt_cast<TQTabBar*>(o) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQSizeGrip*>(o) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQButton*>(o) &&
( ::tqt_cast<TQTabBar*>(o->parent()) || ::tqt_cast<TQToolBox*>(o->parent()) ) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQPushButton*>(o) && ::tqt_cast<TQWizard*>(o->parent()) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
else if ( ::tqt_cast<TQMenuBar*>(o) && ::tqt_cast<TQMainWindow*>(o->parent()) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
// else if ( ::tqt_cast<TQDockWindowHandle*>(o) )
else if ( o->inherits( "TQDockWindowHandle" ) )
- return ( lastWasAPassiveInteractor = TRUE );
+ return ( lastWasAPassiveInteractor = true );
// else if ( ::tqt_cast<TQHideDock*>(o) )
else if ( o->inherits( "TQHideDock" ) )
- return ( lastWasAPassiveInteractor = TRUE );
+ 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 && !::tqt_cast<FormWindow*>(w) ) {
@@ -1186,17 +1186,17 @@ bool WidgetFactory::isPassiveInteractor( TQObject* o )
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();
@@ -1298,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 );
+ MetaDataBase::setPropertyChanged( o, "name", true );
if ( !::tqt_cast<QDesignerToolBar*>(o) && !::tqt_cast<MenuBarEditor*>(o) )
- MetaDataBase::setPropertyChanged( o, "geometry", TRUE );
+ 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 );
+ 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 ( ::tqt_cast<TQGroupBox*>(o) )
- MetaDataBase::setPropertyChanged( o, "title", TRUE );
+ MetaDataBase::setPropertyChanged( o, "title", true );
else if ( o->isA( "TQFrame" ) ) {
- MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE );
- MetaDataBase::setPropertyChanged( o, "frameShape", TRUE );
+ 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 );
+ 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 );
+ 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 );
+ 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 ( ::tqt_cast<TQTable*>(o) ) {
# ifndef TQT_NO_SQL
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 ) );
@@ -1350,13 +1350,13 @@ void WidgetFactory::initChangedProperties( TQObject *o )
}
#endif
} else if ( ::tqt_cast<TQSplitter*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "orientation", TRUE );
+ MetaDataBase::setPropertyChanged( o, "orientation", true );
} else if ( ::tqt_cast<QDesignerToolBar*>(o) ) {
- MetaDataBase::setPropertyChanged( o, "label", TRUE );
+ 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 );
+ MetaDataBase::setPropertyChanged( o, "itemName", true );
+ MetaDataBase::setPropertyChanged( o, "itemNumber", true );
+ MetaDataBase::setPropertyChanged( o, "itemText", true );
}
}
@@ -1365,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;
+ return true;
if ( className == "TQTextEdit" || className == "TQMultiLineEdit" )
- return TRUE;
+ return true;
if ( ::tqt_cast<TQTable*>(editorWidget) != 0 )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
@@ -1387,9 +1387,9 @@ bool WidgetFactory::hasItems( int id, TQObject *editorWidget )
if ( className.contains( "ListBox" ) || className.contains( "ListView" ) ||
className.contains( "IconView" ) || className.contains( "ComboBox" ) ||
::tqt_cast<TQTable*>(editorWidget) != 0 )
- return TRUE;
+ return true;
- return FALSE;
+ return false;
}
void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw )
@@ -1436,7 +1436,7 @@ void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget,
}
if ( className == "TQMultiLineEdit" || className == "TQTextEdit" ) {
- MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw );
+ MultiLineEditor *e = new MultiLineEditor( false, true, parent, editWidget, fw );
e->exec();
delete e;
return;
@@ -1454,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;
}
@@ -1462,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 );
}
@@ -1489,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" ) {
@@ -1528,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 );
@@ -1541,7 +1541,7 @@ void QDesignerLabel::updateBuddy()
if ( myBuddy.isEmpty() )
return;
- TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, FALSE, TRUE );
+ TQObjectList *l = topLevelWidget()->queryList( "TQWidget", myBuddy, false, true );
if ( !l || !l->first() ) {
delete l;
return;
diff --git a/kdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h
index b120313b..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 );
@@ -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 );
@@ -377,7 +377,7 @@ class QDesignerDialog : public TQDialog
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; }
diff --git a/kdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp
index 1342c3ac..2de28547 100644
--- a/kdevdesigner/designer/wizardeditorimpl.cpp
+++ b/kdevdesigner/designer/wizardeditorimpl.cpp
@@ -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/workspace.cpp b/kdevdesigner/designer/workspace.cpp
index 4cd0c26f..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 )
@@ -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,7 +291,7 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
setPalette( p );
#endif
addColumn( i18n( "Files" ) );
- setAllColumnsShowFocus( TRUE );
+ 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 * ) ),
@@ -300,8 +300,8 @@ Workspace::Workspace( TQWidget *parent, MainWindow *mw )
this, TQ_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ),
setHScrollBarMode( AlwaysOff );
setVScrollBarMode( AlwaysOn );
- viewport()->setAcceptDrops( TRUE );
- setAcceptDrops( TRUE );
+ viewport()->setAcceptDrops( true );
+ setAcceptDrops( true );
setColumnWidthMode( 1, Manual );
}
@@ -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,7 +518,7 @@ 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& )
@@ -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;
@@ -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() ) {
@@ -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();