summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/formwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/formwindow.cpp')
-rw-r--r--kdevdesigner/designer/formwindow.cpp228
1 files changed, 114 insertions, 114 deletions
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();
}