summaryrefslogtreecommitdiffstats
path: root/kdevdesigner/designer/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kdevdesigner/designer/mainwindow.cpp')
-rw-r--r--kdevdesigner/designer/mainwindow.cpp1001
1 files changed, 498 insertions, 503 deletions
diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp
index 5d64f8bf..050fc1b2 100644
--- a/kdevdesigner/designer/mainwindow.cpp
+++ b/kdevdesigner/designer/mainwindow.cpp
@@ -119,7 +119,7 @@
#include "kdevdesigner_part.h"
-static bool mblockNewForms = FALSE;
+static bool mblockNewForms = false;
extern TQMap<TQWidget*, TQString> *qwf_forms;
extern TQString *qwf_language;
extern bool qwf_execute_code;
@@ -151,9 +151,9 @@ static TQString textNoAccel( const TQString& text)
MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir )
: TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ),
- grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ),
+ grd( 10, 10 ), sGrid( true ), snGrid( true ), restoreConfig( true ), splashScreen( true ),
fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ),
- previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part)
+ previewing( false ), databaseAutoEdit( false ), autoSaveEnabled( false ), autoSaveInterval( 1800 ), m_part(part)
{
// extern void qInitImages_designercore();
// qInitImages_designercore();
@@ -161,24 +161,24 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
self = this;
setPluginDirectory( plgDir );
customWidgetToolBar = customWidgetToolBar2 = 0;
- guiStuffVisible = TRUE;
- editorsReadOnly = FALSE;
- sSignalHandlers = TRUE;
+ guiStuffVisible = true;
+ editorsReadOnly = false;
+ sSignalHandlers = true;
init_colors();
- shStartDialog = FALSE;
+ shStartDialog = false;
desInterface = new DesignerInterfaceImpl( this );
desInterface->addRef();
- inDebugMode = FALSE;
- savePluginPaths = FALSE;
+ inDebugMode = false;
+ savePluginPaths = false;
updateFunctionsTimer = new TQTimer( this );
- connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( doFunctionsChanged() ) );
+ connect( updateFunctionsTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( doFunctionsChanged() ) );
autoSaveTimer = new TQTimer( this );
- connect( autoSaveTimer, TQT_SIGNAL( timeout() ),
- this, TQT_SLOT( fileSaveAll() ) );
+ connect( autoSaveTimer, TQ_SIGNAL( timeout() ),
+ this, TQ_SLOT( fileSaveAll() ) );
set_splash_status( "Loading Plugins..." );
setupPluginManagers();
@@ -201,12 +201,7 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
singleProject = single;
statusBar()->clear();
-#if defined(TQT_NON_COMMERCIAL)
- statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - "
- "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 );
-#else
statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 );
-#endif
set_splash_status( "Setting up GUI..." );
@@ -239,11 +234,11 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
setupRMBMenus();
- connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) );
- connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) );
+ connect( this, TQ_SIGNAL( projectChanged() ), this, TQ_SLOT( emitProjectSignals() ) );
+ connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), this, TQ_SLOT( emitProjectSignals() ) );
- emit hasActiveForm( FALSE );
- emit hasActiveWindow( FALSE );
+ emit hasActiveForm( false );
+ emit hasActiveWindow( false );
lastPressWidget = 0;
tqApp->installEventFilter( this );
@@ -252,41 +247,41 @@ MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, cons
as -= TQSize( 30, 30 );
resize( TQSize( 1200, 1000 ).boundedTo( as ) );
- connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ),
- this, TQT_SLOT( clipboardChanged() ) );
+ connect( tqApp->clipboard(), TQ_SIGNAL( dataChanged() ),
+ this, TQ_SLOT( clipboardChanged() ) );
clipboardChanged();
- layoutChilds = FALSE;
- layoutSelected = FALSE;
- breakLayout = FALSE;
- backPix = TRUE;
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
+ backPix = true;
set_splash_status( "Loading User Settings..." );
readConfig();
// hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties)
- TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE );
+ TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQLabel" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQTabWidget" ), this, 0, false );
delete w;
- w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE );
+ w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQFrame" ), this, 0, false );
delete w;
- setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), false );
actionEditor->parentWidget()->hide();
- assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) );
+ assistant = new TQAssistantClient( assistantPath(), this );
- statusBar()->setSizeGripEnabled( TRUE );
+ statusBar()->setSizeGripEnabled( true );
set_splash_status( "Initialization Done." );
/* if ( shStartDialog )
- TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/
+ TQTimer::singleShot( 0, this, TQ_SLOT( showStartDialog() ));*/
if ( autoSaveEnabled )
autoSaveTimer->start( autoSaveInterval * 1000 );
- setFocusPolicy( TQ_StrongFocus );
+ setFocusPolicy( TQWidget::StrongFocus );
}
MainWindow::~MainWindow()
@@ -337,11 +332,11 @@ void MainWindow::setupMDI()
vbox->setLineWidth( 1 );
qworkspace = new TQWorkspace( vbox );
qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) );
- qworkspace->setScrollBarsEnabled( TRUE );
- connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ),
- this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) );
+ qworkspace->setScrollBarsEnabled( true );
+ connect( qworkspace, TQ_SIGNAL( windowActivated( TQWidget * ) ),
+ this, TQ_SLOT( activeWindowChanged( TQWidget * ) ) );
lastActiveFormWindow = 0;
- qworkspace->setAcceptDrops( TRUE );
+ qworkspace->setAcceptDrops( true );
}
void MainWindow::setupMenuBar()
@@ -352,7 +347,7 @@ void MainWindow::setupMenuBar()
void MainWindow::setupPropertyEditor()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
propertyEditor = new PropertyEditor( dw );
addToolBar( dw, TQt::DockRight );
@@ -381,7 +376,7 @@ void MainWindow::setupPropertyEditor()
void MainWindow::setupOutputWindow()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, TQt::DockBottom );
oWindow = new OutputWindow( dw );
@@ -395,7 +390,7 @@ void MainWindow::setupHierarchyView()
if ( hierarchyView )
return;
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
hierarchyView = new HierarchyView( dw );
addToolBar( dw, TQt::DockRight );
@@ -417,13 +412,13 @@ void MainWindow::setupHierarchyView()
void MainWindow::setupWorkspace()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
TQVBox *vbox = new TQVBox( dw );
QCompletionEdit *edit = new QCompletionEdit( vbox );
TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) );
TQAccel *a = new TQAccel( this );
- a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) );
+ a->connectItem( a->insertItem( ALT + Key_B ), edit, TQ_SLOT( setFocus() ) );
wspace = new Workspace( vbox, this );
wspace->setBufferEdit( edit );
wspace->setCurrentProject( currentProject );
@@ -443,7 +438,7 @@ void MainWindow::setupActionEditor()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 );
addDockWindow( dw, TQt::DockTornOff );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
actionEditor = new ActionEditor( dw );
dw->setWidget( actionEditor );
@@ -457,13 +452,13 @@ void MainWindow::setupActionEditor()
"these are displayed on toolbar buttons and besides their names in "
"menus.</p>" ) );
dw->hide();
- setAppropriate( dw, FALSE );
+ setAppropriate( dw, false );
}
void MainWindow::setupToolbox()
{
TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this );
- dw->setResizeEnabled( TRUE );
+ dw->setResizeEnabled( true );
dw->setCloseMode( TQDockWindow::Always );
addToolBar( dw, TQt::DockLeft );
toolBox = new TQToolBox( dw );
@@ -471,11 +466,11 @@ void MainWindow::setupToolbox()
dw->setFixedExtentWidth( 160 );
dw->setCaption( i18n( "Toolbox" ) );
dw->show();
- setDockEnabled( dw, TQt::DockTop, FALSE );
- setDockEnabled( dw, TQt::DockBottom, FALSE );
- commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" );
+ setDockEnabled( dw, TQt::DockTop, false );
+ setDockEnabled( dw, TQt::DockBottom, false );
+ commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, false, "Common Widgets" );
commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame );
- commonWidgetsToolBar->setOrientation( Qt::Vertical );
+ commonWidgetsToolBar->setOrientation( TQt::Vertical );
commonWidgetsToolBar->setBackgroundMode(PaletteBase);
toolBox->addItem( commonWidgetsToolBar, "Common Widgets" );
}
@@ -553,14 +548,14 @@ void MainWindow::runProjectPrecondition()
oWindow->clearErrorMessages();
oWindow->clearDebug();
oWindow->showDebugTab();
- previewing = TRUE;
+ previewing = true;
}
void MainWindow::runProjectPostcondition( TQObjectList *l )
{
- inDebugMode = TRUE;
+ inDebugMode = true;
debuggingForms = *l;
- enableAll( FALSE );
+ enableAll( false );
for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) {
if ( e2->project() == currentProject )
e2->editorInterface()->setMode( EditorInterface::Debugging );
@@ -569,7 +564,7 @@ void MainWindow::runProjectPostcondition( TQObjectList *l )
TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
{
- qwf_execute_code = FALSE;
+ qwf_execute_code = false;
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
e->save();
if ( currentTool() == ORDER_TOOL )
@@ -582,7 +577,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
TQStringList databases;
TQPtrDictIterator<TQWidget> wit( *fw->widgets() );
while ( wit.current() ) {
- TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList();
+ TQStringList lst = MetaDataBase::fakeProperty( wit.current(), "database" ).toStringList();
if ( !lst.isEmpty() )
databases << lst [ 0 ];
++wit;
@@ -591,7 +586,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
if ( fw->project() ) {
TQStringList::ConstIterator it;
for ( it = databases.begin(); it != databases.end(); ++it )
- fw->project()->openDatabase( *it, FALSE );
+ fw->project()->openDatabase( *it, false );
}
TQApplication::setOverrideCursor( WaitCursor );
@@ -601,12 +596,12 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
Resource resource( this );
resource.setWidget( fw );
TQValueList<Resource::Image> images;
- resource.save( TQT_TQIODEVICE(&buffer) );
+ resource.save( &buffer );
buffer.close();
buffer.open( IO_ReadOnly );
- TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) );
+ TQWidget *w = TQWidgetFactory::create( &buffer );
if ( w ) {
previewedForm = w;
if ( palet ) {
@@ -618,7 +613,7 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
if ( style )
w->setStyle( style );
- TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING );
+ TQObjectList *l = w->queryList( "TQWidget" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
if ( style )
( (TQWidget*)o )->setStyle( style );
@@ -627,9 +622,9 @@ TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet )
w->move( fw->mapToGlobal( TQPoint(0,0) ) );
((MainWindow*)w )->setWFlags( WDestructiveClose );
- previewing = TRUE;
+ previewing = true;
w->show();
- previewing = FALSE;
+ previewing = false;
TQApplication::restoreOverrideCursor();
return w;
}
@@ -729,17 +724,17 @@ void MainWindow::previewForm( const TQString & style )
if ( !w )
return;
- w->insertChild( TQT_TQOBJECT(st) );
+ w->insertChild( st );
w->show();
}
void MainWindow::helpContents()
{
TQWidget *focusWidget = tqApp->focusWidget();
- bool showClassDocu = TRUE;
+ bool showClassDocu = true;
while ( focusWidget ) {
if ( focusWidget->isA( "PropertyList" ) ) {
- showClassDocu = FALSE;
+ showClassDocu = false;
break;
}
focusWidget = focusWidget->parentWidget();
@@ -793,7 +788,7 @@ void MainWindow::helpContents()
if ( source.isEmpty() || source == "designer-manual.html" ) {
if ( classname.lower() == "spacer" )
source = "qspaceritem.html#details";
- else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING )
+ else if ( classname == "TQLayoutWidget" )
source = "layout.html";
else
source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details";
@@ -813,7 +808,7 @@ void MainWindow::helpManual()
void MainWindow::helpAbout()
{
- AboutDialog dlg( this, 0, TRUE );
+ AboutDialog dlg( this, 0, true );
if ( singleProjectMode() ) {
dlg.aboutPixmap->setText( "" );
dlg.aboutVersion->setText( "" );
@@ -886,14 +881,14 @@ void MainWindow::showProperties( TQObject *o )
if ( !o->isWidgetType() ) {
propertyEditor->setWidget( o, lastActiveFormWindow );
if ( lastActiveFormWindow )
- hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) );
+ hierarchyView->setFormWindow( lastActiveFormWindow, lastActiveFormWindow->mainContainer() );
else
hierarchyView->setFormWindow( 0, 0 );
return;
}
TQWidget *w = (TQWidget*)o;
setupHierarchyView();
- FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) );
+ FormWindow *fw = (FormWindow*)isAFormWindowChild( w );
if ( fw ) {
if ( fw->numSelectedWidgets() > 1 ) {
TQWidgetList wl = fw->selectedWidgets();
@@ -903,22 +898,22 @@ void MainWindow::showProperties( TQObject *o )
}
propertyEditor->setWidget( new PropertyObject( wl ), fw );
} else {
- propertyEditor->setWidget( TQT_TQOBJECT(w), fw );
+ propertyEditor->setWidget( w, fw );
}
- hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) );
+ hierarchyView->setFormWindow( fw, w );
} else {
propertyEditor->setWidget( 0, 0 );
hierarchyView->setFormWindow( 0, 0 );
}
if ( currentTool() == POINTER_TOOL && fw &&
- ( !qworkspace->activeWindow() || !::tqqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
+ ( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
fw->setFocus();
}
void MainWindow::resetTool()
{
- actionPointerTool->setOn( TRUE );
+ actionPointerTool->setOn( true );
}
void MainWindow::updateProperties( TQObject * )
@@ -929,21 +924,21 @@ void MainWindow::updateProperties( TQObject * )
bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
{
- if ( ::tqqt_cast<MenuBarEditor*>(o) || ::tqqt_cast<PopupMenuEditor*>(o) ||
+ if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ||
( o &&
- ( ::tqqt_cast<MenuBarEditor*>(o->parent()) ||
- ::tqqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
+ ( ::tqt_cast<MenuBarEditor*>(o->parent()) ||
+ ::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
- if ( e->type() == TQEvent::Accel && ::tqqt_cast<PopupMenuEditor*>(o) ) {
- return TRUE; // consume accel events
- } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<MenuBarEditor*>(o) ) {
+ if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) {
+ return true; // consume accel events
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) {
TQPoint pos = ((TQMouseEvent*)e)->pos();
- MenuBarEditor *m = ::tqqt_cast<MenuBarEditor*>(o);
+ MenuBarEditor *m = ::tqt_cast<MenuBarEditor*>(o);
showProperties( o );
if ( m->findItem( pos ) >= m->count() )
m->setFocus();
- } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast<PopupMenuEditor*>(o) ) {
- PopupMenuEditor *m = ::tqqt_cast<PopupMenuEditor*>(o);
+ } else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<PopupMenuEditor*>(o) ) {
+ PopupMenuEditor *m = ::tqt_cast<PopupMenuEditor*>(o);
PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() );
if ( m->find( i->action() ) != -1 && !i->isSeparator() )
showProperties( i->action() );
@@ -962,14 +957,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
w = (TQWidget*)o;
while ( w ) {
- if ( ::tqqt_cast<PropertyList*>(w) )
+ if ( ::tqt_cast<PropertyList*>(w) )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
if ( w ) {
propertyEditor->propertyList()->showCurrentWhatsThis();
( (TQKeyEvent*)e )->accept();
- return TRUE;
+ return true;
}
}
break;
@@ -978,53 +973,53 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
( (TQKeyEvent*)e )->key() == Key_E ) &&
( (TQKeyEvent*)e )->state() & ControlButton ) {
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
( (TQKeyEvent*)e )->ignore();
- return TRUE;
+ return true;
}
}
break;
case TQEvent::ContextMenu:
case TQEvent::MouseButtonPress:
if ( o && currentTool() == POINTER_TOOL &&
- ( ::tqqt_cast<MenuBarEditor*>(o) ||
- ::tqqt_cast<PopupMenuEditor*>(o) ||
- ::tqqt_cast<QDesignerToolBar*>(o) ||
- ( ::tqqt_cast<TQComboBox*>(o) ||
- ::tqqt_cast<TQToolButton*>(o) ||
- ::tqqt_cast<QDesignerToolBarSeparator*>(o) ) &&
+ ( ::tqt_cast<MenuBarEditor*>(o) ||
+ ::tqt_cast<PopupMenuEditor*>(o) ||
+ ::tqt_cast<QDesignerToolBar*>(o) ||
+ ( ::tqt_cast<TQComboBox*>(o) ||
+ ::tqt_cast<TQToolButton*>(o) ||
+ ::tqt_cast<QDesignerToolBarSeparator*>(o) ) &&
o->parent()
- && ( ::tqqt_cast<QDesignerToolBar*>(o->parent())
- || ::tqqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) {
+ && ( ::tqt_cast<QDesignerToolBar*>(o->parent())
+ || ::tqt_cast<QDesignerWidgetStack*>(o->parent())) ) ) {
TQWidget *w = (TQWidget*)o;
- if ( ::tqqt_cast<TQToolButton*>(w) ||
- ::tqqt_cast<TQComboBox*>(w) ||
- ::tqqt_cast<PopupMenuEditor*>(w) ||
- ::tqqt_cast<QDesignerToolBarSeparator*>(w) )
+ if ( ::tqt_cast<TQToolButton*>(w) ||
+ ::tqt_cast<TQComboBox*>(w) ||
+ ::tqt_cast<PopupMenuEditor*>(w) ||
+ ::tqt_cast<QDesignerToolBarSeparator*>(w) )
w = w->parentWidget();
TQWidget *pw = w->parentWidget();
while ( pw ) {
- if ( ::tqqt_cast<FormWindow*>(pw) ) {
- ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) );
- if ( !::tqqt_cast<QDesignerToolBar*>(o) )
- return ( !::tqqt_cast<TQToolButton*>(o) &&
- !::tqqt_cast<MenuBarEditor*>(o) &&
- !::tqqt_cast<TQComboBox*>(o) &&
- !::tqqt_cast<QDesignerToolBarSeparator*>(o) );
+ if ( ::tqt_cast<FormWindow*>(pw) ) {
+ ( (FormWindow*)pw )->emitShowProperties( w );
+ if ( !::tqt_cast<QDesignerToolBar*>(o) )
+ return ( !::tqt_cast<TQToolButton*>(o) &&
+ !::tqt_cast<MenuBarEditor*>(o) &&
+ !::tqt_cast<TQComboBox*>(o) &&
+ !::tqt_cast<QDesignerToolBarSeparator*>(o) );
}
pw = pw->parentWidget();
}
}
- if ( o && ( ::tqqt_cast<QDesignerToolBar*>(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) )
+ if ( o && ( ::tqt_cast<QDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") )
&& e->type() == TQEvent::ContextMenu )
break;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::tqqt_cast<TQSizeGrip*>(o) )
+ if ( ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
if ( !w->hasFocus() )
w->setFocus();
@@ -1033,7 +1028,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if( e->type() == TQEvent::ContextMenu ) {
( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
- return TRUE;
+ return true;
} else {
( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
@@ -1041,27 +1036,27 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
}
lastPressWidget = (TQWidget*)o;
if ( passiveInteractor )
- TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) );
if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL )
- return TRUE;
+ return true;
return !passiveInteractor;
case TQEvent::MouseButtonRelease:
lastPressWidget = 0;
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
break;
- if ( ::tqqt_cast<TQSizeGrip*>(o) )
+ if ( ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
if ( passiveInteractor ) {
- TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) );
- TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) );
+ TQTimer::singleShot( 0, this, TQ_SLOT( selectionChanged() ) );
+ TQTimer::singleShot( 0, formWindow(), TQ_SLOT( visibilityChanged() ) );
}
return !passiveInteractor;
case TQEvent::MouseMove:
@@ -1069,15 +1064,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
break;
w = isAFormWindowChild( o );
if ( lastPressWidget != (TQWidget*)o && w &&
- !::tqqt_cast<SizeHandle*>(o) && !::tqqt_cast<OrderIndicator*>(o) &&
- !::tqqt_cast<PopupMenuEditor*>(o) && !::tqqt_cast<TQMenuBar*>(o) &&
- !::tqqt_cast<TQSizeGrip*>(o) )
- return TRUE;
- if ( o && ::tqqt_cast<TQSizeGrip*>(o) )
+ !::tqt_cast<SizeHandle*>(o) && !::tqt_cast<OrderIndicator*>(o) &&
+ !::tqt_cast<PopupMenuEditor*>(o) && !::tqt_cast<TQMenuBar*>(o) &&
+ !::tqt_cast<TQSizeGrip*>(o) )
+ return true;
+ if ( o && ::tqt_cast<TQSizeGrip*>(o) )
break;
if ( lastPressWidget != (TQWidget*)o ||
- ( !w || ::tqqt_cast<SizeHandle*>(o) ) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ( !w || ::tqt_cast<SizeHandle*>(o) ) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
if ( !passiveInteractor )
@@ -1087,69 +1082,69 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
case TQEvent::KeyPress:
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) {
resetTool();
- return FALSE;
+ return false;
}
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
- if ( ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
+ if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
qWorkspace()->activeWindow()->setFocus();
- return TRUE;
+ return true;
}
}
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::MouseButtonDblClick:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) ) {
- if ( ::tqqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
- o->parent() && ::tqqt_cast<TQToolBar*>(o->parent()) && formWindow() )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) ) {
+ if ( ::tqt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
+ o->parent() && ::tqt_cast<TQToolBar*>(o->parent()) && formWindow() )
formWindow()->setToolFixed();
break;
}
if ( currentTool() == ORDER_TOOL ) {
( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e,
( (FormWindow*)w )->designerWidget( o ) );
- return TRUE;
+ return true;
}
if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() )
return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w );
- return TRUE;
+ return true;
case TQEvent::KeyRelease:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) );
if ( ((TQKeyEvent*)e)->isAccepted() )
- return TRUE;
+ return true;
break;
case TQEvent::Hide:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
- if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) )
- ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE );
+ if ( ( (FormWindow*)w )->isWidgetSelected( o ) )
+ ( (FormWindow*)w )->selectWidget( o, false );
break;
case TQEvent::Enter:
case TQEvent::Leave:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) ||
- ::tqqt_cast<MenuBarEditor*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) ||
+ ::tqt_cast<MenuBarEditor*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::Resize:
case TQEvent::Move:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) {
( (FormWindow*)w )->updateSelection( (TQWidget*)o );
@@ -1161,68 +1156,68 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) {
if ( lastActiveFormWindow && lastActiveFormWindow->project() ) {
TQStringList lst =
- MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList();
+ MetaDataBase::fakeProperty( lastActiveFormWindow, "database" ).toStringList();
lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] );
}
}
break;
case TQEvent::DragEnter:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::DragMove:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Drop:
- if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) {
+ if ( o == qWorkspace() || o == workspace() || o == workspace()->viewport() ) {
workspace()->contentsDropEvent( (TQDropEvent*)e );
- return TRUE;
+ return true;
}
break;
case TQEvent::Show:
- if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) )
+ if ( o != this )
break;
if ( ((TQShowEvent*)e)->spontaneous() )
break;
TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted );
showEvent( (TQShowEvent*)e );
checkTempFiles();
- return TRUE;
+ return true;
case TQEvent::Wheel:
if ( !( w = isAFormWindowChild( o ) ) ||
- ::tqqt_cast<SizeHandle*>(o) ||
- ::tqqt_cast<OrderIndicator*>(o) )
+ ::tqt_cast<SizeHandle*>(o) ||
+ ::tqt_cast<OrderIndicator*>(o) )
break;
- return TRUE;
+ return true;
case TQEvent::FocusIn:
- if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE; //FIXME
+ if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
+ return true; //FIXME
if ( hierarchyView->formDefinitionView()->isRenaming()
- && ( o->inherits( "Editor" ) || ::tqqt_cast<FormWindow*>(o) ) )
+ && ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) )
TQApplication::sendPostedEvents();
if ( o->inherits( "Editor" ) ) {
TQWidget *w = (TQWidget*)o;
while ( w ) {
- if ( ::tqqt_cast<SourceEditor*>(w) )
+ if ( ::tqt_cast<SourceEditor*>(w) )
break;
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
- if ( ::tqqt_cast<SourceEditor*>(w) )
+ if ( ::tqt_cast<SourceEditor*>(w) )
( (SourceEditor*)w )->checkTimeStamp();
- } else if ( ::tqqt_cast<FormWindow*>(o) ) {
+ } else if ( ::tqt_cast<FormWindow*>(o) ) {
FormWindow *fw = (FormWindow*)o;
if ( fw->formFile() && fw->formFile()->editor() )
fw->formFile()->editor()->checkTimeStamp();
}
break;
case TQEvent::FocusOut:
- if ( !::tqqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
- return TRUE;
+ if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
+ return true;
break;
default:
return TQMainWindow::eventFilter( o, e );
@@ -1233,10 +1228,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
{
- if ( ::tqqt_cast<TQWizard*>(o->parent()) && !::tqqt_cast<TQPushButton*>(o) )
+ if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) )
return 0;
while ( o ) {
- if ( ::tqqt_cast<FormWindow*>(o) )
+ if ( ::tqt_cast<FormWindow*>(o) )
return (TQWidget*)o;
o = o->parent();
}
@@ -1246,9 +1241,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
{
while ( o ) {
- if ( ::tqqt_cast<QDesignerToolBar*>(o) )
+ if ( ::tqt_cast<QDesignerToolBar*>(o) )
return (TQWidget*)o;
- if ( ::tqqt_cast<FormWindow*>(o) )
+ if ( ::tqt_cast<FormWindow*>(o) )
return 0;
o = o->parent();
}
@@ -1259,7 +1254,7 @@ FormWindow *MainWindow::formWindow()
{
if ( qworkspace->activeWindow() ) {
FormWindow *fw = 0;
- if ( ::tqqt_cast<FormWindow*>(qworkspace->activeWindow()) )
+ if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) )
fw = (FormWindow*)qworkspace->activeWindow();
else if ( lastActiveFormWindow &&
qworkspace->windowList().find( lastActiveFormWindow ) != -1)
@@ -1290,16 +1285,16 @@ void MainWindow::insertFormWindow( FormWindow *fw )
"<p>You can have several forms open, and all open forms are listed "
"in the <b>Form List</b>.") );
- connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ),
- this, TQT_SLOT( showProperties( TQObject * ) ) );
- connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ),
- this, TQT_SLOT( updateProperties( TQObject * ) ) );
- connect( this, TQT_SIGNAL( currentToolChanged() ),
- fw, TQT_SLOT( currentToolChanged() ) );
- connect( fw, TQT_SIGNAL( selectionChanged() ),
- this, TQT_SLOT( selectionChanged() ) );
- connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
- this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) );
+ connect( fw, TQ_SIGNAL( showProperties( TQObject * ) ),
+ this, TQ_SLOT( showProperties( TQObject * ) ) );
+ connect( fw, TQ_SIGNAL( updateProperties( TQObject * ) ),
+ this, TQ_SLOT( updateProperties( TQObject * ) ) );
+ connect( this, TQ_SIGNAL( currentToolChanged() ),
+ fw, TQ_SLOT( currentToolChanged() ) );
+ connect( fw, TQ_SIGNAL( selectionChanged() ),
+ this, TQ_SLOT( selectionChanged() ) );
+ connect( fw, TQ_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ),
+ this, TQ_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) );
if ( !mblockNewForms ) {
} else {
@@ -1310,9 +1305,9 @@ void MainWindow::insertFormWindow( FormWindow *fw )
if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) )
fw->setCaption( fw->name() );
fw->mainContainer()->setCaption( fw->caption() );
- WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()),
+ WidgetFactory::saveDefaultProperties( fw->mainContainer(),
WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) );
+ idFromClassName( WidgetFactory::classNameOf( fw->mainContainer() ) ) );
activeWindowChanged( fw );
emit formWindowsChanged();
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
@@ -1339,7 +1334,7 @@ void MainWindow::createNewProject( const TQString &lang )
}
TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ),
- pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE );
+ pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, true );
projects.insert( a, pro );
addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects );
projectSelected( a );
@@ -1354,9 +1349,9 @@ bool MainWindow::unregisterClient( FormWindow *w )
lastActiveFormWindow = 0;
TQPtrList<SourceEditor> waitingForDelete;
- waitingForDelete.setAutoDelete( TRUE );
+ waitingForDelete.setAutoDelete( true );
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
- if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) )
+ if ( e->object() == w )
waitingForDelete.append( e );
}
@@ -1365,18 +1360,18 @@ bool MainWindow::unregisterClient( FormWindow *w )
actionEditor->parentWidget()->hide();
}
- return TRUE;
+ return true;
}
void MainWindow::activeWindowChanged( TQWidget *w )
{
TQWidget *old = formWindow();
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
FormWindow *fw = (FormWindow*)w;
FormWindow *ofw = lastActiveFormWindow;
lastActiveFormWindow = fw;
lastActiveFormWindow->updateUndoInfo();
- emit hasActiveForm( TRUE );
+ emit hasActiveForm( true );
if ( formWindow() ) {
formWindow()->emitShowProperties();
emit formModified( formWindow()->commandHistory()->isModified() );
@@ -1385,13 +1380,13 @@ void MainWindow::activeWindowChanged( TQWidget *w )
}
workspace()->activeFormChanged( fw );
setAppropriate( (TQDockWindow*)actionEditor->parentWidget(),
- ::tqqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
+ ::tqt_cast<TQMainWindow*>(lastActiveFormWindow->mainContainer()) );
if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) {
if ( actionEditor->wantToBeShown() )
actionEditor->parentWidget()->show();
} else {
TQWidget *mc = 0;
- if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast<TQMainWindow*>(mc) )
+ if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) )
actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
actionEditor->parentWidget()->hide();
}
@@ -1411,40 +1406,40 @@ void MainWindow::activeWindowChanged( TQWidget *w )
propertyEditor->resetFocus();
} else if ( !lastActiveFormWindow ) {
emit formWindowChanged();
- emit hasActiveForm( FALSE );
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
+ emit hasActiveForm( false );
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
}
if ( !w ) {
emit formWindowChanged();
- emit hasActiveForm( FALSE );
+ emit hasActiveForm( false );
propertyEditor->clear();
hierarchyView->clear();
- updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
+ updateUndoRedo( false, false, TQString(), TQString() );
}
selectionChanged();
- if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ if ( ::tqt_cast<SourceEditor*>(w) ) {
SourceEditor *se = (SourceEditor*)w;
TQGuardedPtr<FormWindow> fw = se->formWindow();
if ( se->formWindow() &&
lastActiveFormWindow != fw ) {
activeWindowChanged( se->formWindow() );
}
- actionSearchFind->setEnabled( TRUE );
- actionSearchIncremetal->setEnabled( TRUE );
- actionSearchReplace->setEnabled( TRUE );
- actionSearchGotoLine->setEnabled( TRUE );
- incrementalSearch->setEnabled( TRUE );
-
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
- actionEditCut->setEnabled( TRUE );
- actionEditCopy->setEnabled( TRUE );
- actionEditPaste->setEnabled( TRUE );
- actionEditSelectAll->setEnabled( TRUE );
+ actionSearchFind->setEnabled( true );
+ actionSearchIncremetal->setEnabled( true );
+ actionSearchReplace->setEnabled( true );
+ actionSearchGotoLine->setEnabled( true );
+ incrementalSearch->setEnabled( true );
+
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
+ actionEditCut->setEnabled( true );
+ actionEditCopy->setEnabled( true );
+ actionEditPaste->setEnabled( true );
+ actionEditSelectAll->setEnabled( true );
actionEditUndo->setMenuText( i18n( "&Undo" ) );
actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) );
actionEditRedo->setMenuText( i18n( "&Redo" ) );
@@ -1462,11 +1457,11 @@ void MainWindow::activeWindowChanged( TQWidget *w )
}
workspace()->activeEditorChanged( se );
} else {
- actionSearchFind->setEnabled( FALSE );
- actionSearchIncremetal->setEnabled( FALSE );
- actionSearchReplace->setEnabled( FALSE );
- actionSearchGotoLine->setEnabled( FALSE );
- incrementalSearch->setEnabled( FALSE );
+ actionSearchFind->setEnabled( false );
+ actionSearchIncremetal->setEnabled( false );
+ actionSearchReplace->setEnabled( false );
+ actionSearchGotoLine->setEnabled( false );
+ incrementalSearch->setEnabled( false );
}
if ( currentTool() == ORDER_TOOL && w != old )
@@ -1479,7 +1474,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
const TQString &undoCmd, const TQString &redoCmd )
{
if ( qWorkspace()->activeWindow() &&
- ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return; // do not set a formWindow related command
actionEditUndo->setEnabled( undoAvailable );
actionEditRedo->setEnabled( redoAvailable );
@@ -1496,15 +1491,15 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) );
if ( currentTool() == ORDER_TOOL ) {
- actionEditUndo->setEnabled( FALSE );
- actionEditRedo->setEnabled( FALSE );
+ actionEditUndo->setEnabled( false );
+ actionEditRedo->setEnabled( false );
}
}
void MainWindow::updateEditorUndoRedo()
{
if ( !qWorkspace()->activeWindow() ||
- !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow();
actionEditUndo->setEnabled( editor->editIsUndoAvailable() );
@@ -1554,19 +1549,19 @@ void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidg
void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int> &props, TQWidget *w )
{
- const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
+ if ( text && qstrcmp( text->type(), "TQString") != 0 )
text = 0;
- const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
- if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
+ if ( title && qstrcmp( title->type(), "TQString") != 0 )
title = 0;
const TQMetaProperty* pagetitle =
- w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE );
- if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 )
+ w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", true ), true );
+ if ( pagetitle && qstrcmp( pagetitle->type(), "TQString") != 0 )
pagetitle = 0;
const TQMetaProperty* pixmap =
- w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE );
- if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 )
+ w->metaObject()->property( w->metaObject()->findProperty( "pixmap", true ), true );
+ if ( pixmap && qstrcmp( pixmap->type(), "TQPixmap") != 0 )
pixmap = 0;
if ( text && text->designable(w) ||
@@ -1580,7 +1575,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) );
props.insert( "pixmap", id );
}
- if ( text && text->designable(w) && !::tqqt_cast<TQTextEdit*>(w) ) {
+ if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) {
ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) );
props.insert( "text", id );
}
@@ -1599,7 +1594,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w )
{
WidgetInterface *iface = 0;
- widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface );
+ widgetManager()->queryInterface( WidgetFactory::classNameOf( w ), &iface );
if ( !iface )
return 0;
TQWidgetContainerInterfacePrivate *iface2 = 0;
@@ -1616,7 +1611,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{
int id;
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (QDesignerTabWidget*)w )->count() > 1) {
@@ -1625,7 +1620,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- } else if ( ::tqqt_cast<QDesignerWidgetStack*>(w) ) {
+ } else if ( ::tqt_cast<QDesignerWidgetStack*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (QDesignerWidgetStack*)w )->count() > 1) {
@@ -1639,7 +1634,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- } else if ( ::tqqt_cast<TQToolBox*>(w) ) {
+ } else if ( ::tqt_cast<TQToolBox*>(w) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
if ( ( (TQToolBox*)w )->count() > 1 ) {
@@ -1651,19 +1646,19 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
- if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) {
+ if ( iface && iface->supportsPages( WidgetFactory::classNameOf( w ) ) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
- if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) {
+ if ( iface->count( WidgetFactory::classNameOf( w ), w ) > 1 ) {
ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) );
commands.insert( "remove", id );
}
ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) );
commands.insert( "add", id );
- if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) {
+ if ( iface->currentIndex( WidgetFactory::classNameOf( w ), w ) != -1 ) {
ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) );
commands.insert( "rename", id );
}
@@ -1674,7 +1669,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( ids.isEmpty() )
ids << rmbWidgets->insertSeparator( 0 );
ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) );
@@ -1687,7 +1682,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
{
int id;
- if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) {
+ if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
@@ -1705,7 +1700,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) );
commands.insert( "edit", id );
- } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
+ } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
if ( ids.isEmpty() )
ids << rmbFormWindow->insertSeparator( 0 );
ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) );
@@ -1718,18 +1713,18 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWidget *w )
{
if ( id == props[ "text" ] ) {
- bool ok = FALSE;
- bool oldDoWrap = FALSE;
- if ( ::tqqt_cast<TQLabel*>(w) ) {
+ bool ok = false;
+ bool oldDoWrap = false;
+ if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
- oldDoWrap = TRUE;
+ oldDoWrap = true;
}
bool doWrap = oldDoWrap;
TQString text;
- if ( ::tqqt_cast<TQTextView*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) {
- text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast<TQButton*>(w), &doWrap );
+ if ( ::tqt_cast<TQTextView*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
+ text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull();
} else {
text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ),
@@ -1738,67 +1733,67 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
if ( ok ) {
if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE );
+ MetaDataBase::setPropertyChanged( w, "text", true );
}
} else if ( id == props[ "title" ] ) {
- bool ok = FALSE;
+ bool ok = false;
TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ),
TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) {
TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
title, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE );
+ MetaDataBase::setPropertyChanged( w, "title", true );
}
} else if ( id == props[ "pagetitle" ] ) {
- bool ok = FALSE;
+ bool ok = false;
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this );
if ( ok ) {
TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pageTitle",
w->property( "pageTitle" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pageTitle", true );
}
} else if ( id == props[ "pixmap" ] ) {
TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap();
TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix );
if ( !pix.isNull() ) {
TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"pixmap", w->property( "pixmap" ),
pix, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "pixmap", true );
}
}
}
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w )
{
- if ( ::tqqt_cast<TQTabWidget*>(w) ) {
+ if ( ::tqt_cast<TQTabWidget*>(w) ) {
TQTabWidget *tw = (TQTabWidget*)w;
if ( id == commands[ "add" ] ) {
AddTabPageCommand *cmd =
@@ -1817,7 +1812,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQToolBox*>(w) ) {
+ } else if ( ::tqt_cast<TQToolBox*>(w) ) {
TQToolBox *tb = (TQToolBox*)w;
if ( id == commands[ "add" ] ) {
AddToolBoxPageCommand *cmd =
@@ -1837,7 +1832,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQWidgetStack*>(w) ) {
+ } else if ( ::tqt_cast<TQWidgetStack*>(w) ) {
QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w;
if ( id == commands[ "add" ] ) {
AddWidgetStackPageCommand *cmd =
@@ -1858,27 +1853,27 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
- new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
currentPage + 1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE );
+ MetaDataBase::setPropertyChanged( w, "currentPage", true );
} else if ( id == commands[ "prevpage" ] ) {
int currentPage = w->property( "currentPage" ).toInt();
TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) );
SetPropertyCommand *cmd =
- new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"currentPage", currentPage,
currentPage -1, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE );
+ MetaDataBase::setPropertyChanged( w, "currentPage", true );
}
#ifdef TQT_CONTAINER_CUSTOM_WIDGETS
} else if ( WidgetDatabase::
isCustomPluginWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ) ) ) {
if ( id == commands[ "add" ] ) {
AddContainerPageCommand *cmd =
new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ),
@@ -1888,7 +1883,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "remove" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
DeleteContainerPageCommand *cmd =
new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ).
@@ -1903,8 +1898,8 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
} else if ( id == commands[ "rename" ] ) {
TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w );
if ( iface ) {
- bool ok = FALSE;
- TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) );
+ bool ok = false;
+ TQString wClassName = WidgetFactory::classNameOf( w );
int index = iface->currentIndex( wClassName, w );
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal,
@@ -1929,16 +1924,16 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
if ( id == commands[ "edit" ] )
WidgetFactory::editWidget( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() );
+ idFromClassName( WidgetFactory::classNameOf( w ) ), this, w, formWindow() );
}
}
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw )
{
- if ( ::tqqt_cast<TQWizard*>(fw->mainContainer()) ) {
+ if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
TQWizard *wiz = (TQWizard*)fw->mainContainer();
if ( id == commands[ "add" ] ) {
AddWizardPageCommand *cmd =
@@ -1963,7 +1958,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
delete e;
} else if ( id == commands[ "rename" ] ) {
- bool ok = FALSE;
+ bool ok = false;
QDesignerWizard *dw = (QDesignerWizard*)wiz;
TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ),
TQLineEdit::Normal, dw->pageTitle(), &ok, this );
@@ -1976,7 +1971,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
cmd->execute();
}
}
- } else if ( ::tqqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
+ } else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
if ( id == commands[ "add_toolbar" ] ) {
AddToolBarCommand *cmd =
@@ -2003,23 +1998,23 @@ void MainWindow::clipboardChanged()
void MainWindow::selectionChanged()
{
- layoutChilds = FALSE;
- layoutSelected = FALSE;
- breakLayout = FALSE;
+ layoutChilds = false;
+ layoutSelected = false;
+ breakLayout = false;
if ( !formWindow() ) {
- actionEditCut->setEnabled( FALSE );
- actionEditCopy->setEnabled( FALSE );
- actionEditDelete->setEnabled( FALSE );
- actionEditAdjustSize->setEnabled( FALSE );
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditSplitHorizontal->setEnabled( FALSE );
- actionEditSplitVertical->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
- actionEditLower->setEnabled( FALSE );
- actionEditRaise->setEnabled( FALSE );
- actionEditAdjustSize->setEnabled( FALSE );
+ actionEditCut->setEnabled( false );
+ actionEditCopy->setEnabled( false );
+ actionEditDelete->setEnabled( false );
+ actionEditAdjustSize->setEnabled( false );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditSplitHorizontal->setEnabled( false );
+ actionEditSplitVertical->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
+ actionEditLower->setEnabled( false );
+ actionEditRaise->setEnabled( false );
+ actionEditAdjustSize->setEnabled( false );
return;
}
@@ -2031,11 +2026,11 @@ void MainWindow::selectionChanged()
actionEditLower->setEnabled( enable );
actionEditRaise->setEnabled( enable );
- actionEditAdjustSize->setEnabled( FALSE );
- actionEditSplitHorizontal->setEnabled( FALSE );
- actionEditSplitVertical->setEnabled( FALSE );
+ actionEditAdjustSize->setEnabled( false );
+ actionEditSplitHorizontal->setEnabled( false );
+ actionEditSplitVertical->setEnabled( false );
- enable = FALSE;
+ enable = false;
TQWidgetList widgets = formWindow()->selectedWidgets();
if ( selectedWidgets > 1 ) {
int unlaidout = 0;
@@ -2057,75 +2052,75 @@ void MainWindow::selectionChanged()
breakLayout = laidout > 0;
} else if ( selectedWidgets == 1 ) {
TQWidget *w = widgets.first();
- bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ||
+ bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) ||
w == formWindow()->mainContainer();
actionEditAdjustSize->setEnabled( !w->parentWidget() ||
WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout );
if ( !isContainer ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
} else {
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditBreakLayout->setEnabled( false );
}
} else {
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
if ( !formWindow()->hasInsertedChildren( w ) ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
} else {
- actionEditHLayout->setEnabled( TRUE );
- actionEditVLayout->setEnabled( TRUE );
- actionEditGridLayout->setEnabled( TRUE );
- actionEditBreakLayout->setEnabled( FALSE );
- layoutChilds = TRUE;
+ actionEditHLayout->setEnabled( true );
+ actionEditVLayout->setEnabled( true );
+ actionEditGridLayout->setEnabled( true );
+ actionEditBreakLayout->setEnabled( false );
+ layoutChilds = true;
}
if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) {
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) );
- breakLayout = TRUE;
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( !isAToolBarChild( w ) );
+ breakLayout = true;
}
}
} else if ( selectedWidgets == 0 ) {
- actionEditAdjustSize->setEnabled( TRUE );
+ actionEditAdjustSize->setEnabled( true );
TQWidget *w = formWindow()->mainContainer();
if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) {
if ( !formWindow()->hasInsertedChildren( w ) ) {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
} else {
- actionEditHLayout->setEnabled( TRUE );
- actionEditVLayout->setEnabled( TRUE );
- actionEditGridLayout->setEnabled( TRUE );
- actionEditBreakLayout->setEnabled( FALSE );
- layoutChilds = TRUE;
+ actionEditHLayout->setEnabled( true );
+ actionEditVLayout->setEnabled( true );
+ actionEditGridLayout->setEnabled( true );
+ actionEditBreakLayout->setEnabled( false );
+ layoutChilds = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( TRUE );
- breakLayout = TRUE;
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( true );
+ breakLayout = true;
}
} else {
- actionEditHLayout->setEnabled( FALSE );
- actionEditVLayout->setEnabled( FALSE );
- actionEditGridLayout->setEnabled( FALSE );
- actionEditBreakLayout->setEnabled( FALSE );
+ actionEditHLayout->setEnabled( false );
+ actionEditVLayout->setEnabled( false );
+ actionEditGridLayout->setEnabled( false );
+ actionEditBreakLayout->setEnabled( false );
}
}
@@ -2252,12 +2247,12 @@ void MainWindow::readConfig()
config.insertSearchPath( TQSettings::Windows, "/Trolltech" );
bool ok;
- bool readPreviousConfig = FALSE;
+ bool readPreviousConfig = false;
TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" );
- restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok );
+ restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok );
if ( !ok ) {
keybase = DesignerApplication::oldSettingsKey();
- restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok );
+ restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", true, &ok );
if ( !ok ) {
if ( oWindow ) {
oWindow->shuttingDown();
@@ -2269,7 +2264,7 @@ void MainWindow::readConfig()
qworkspace->setBackgroundPixmap( pix );
return;
}
- readPreviousConfig = TRUE;
+ readPreviousConfig = true;
}
if ( !readPreviousConfig ) {
fileFilter = config.readEntry( keybase + "FileFilter", fileFilter );
@@ -2308,7 +2303,7 @@ void MainWindow::readConfig()
recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" );
}
- backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig;
+ backPix = config.readBoolEntry( keybase + "Background/UsePixmap", true ) | readPreviousConfig;
if ( backPix ) {
TQPixmap pix;
pix.load( backPixName );
@@ -2319,14 +2314,14 @@ void MainWindow::readConfig()
}
if ( !readPreviousConfig ) {
- splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE );
+ splashScreen = config.readBoolEntry( keybase + "SplashScreen", true );
- sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE );
- snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE );
+ sGrid = config.readBoolEntry( keybase + "Grid/Show", true );
+ snGrid = config.readBoolEntry( keybase + "Grid/Snap", true );
grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) );
grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) );
- if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) {
+ if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", false ) ) {
TQRect r( pos(), size() );
r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) );
r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) );
@@ -2340,8 +2335,8 @@ void MainWindow::readConfig()
move( r.topLeft() );
}
}
- setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) );
- setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now
+ setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", false ) );
+ setUsesBigPixmaps( false /*config.readBoolEntry( "BigIcons", false )*/ ); // ### disabled for now
}
}
int num = config.readNumEntry( keybase + "CustomWidgets/num" );
@@ -2489,7 +2484,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
while ( wit.current() ) {
TQWidget *w = wit.current();
++wit;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
if ( ( (FormWindow*)w )->formFile()->formWindow() )
@@ -2498,7 +2493,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
e->ignore();
return;
}
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
if ( !( (SourceEditor*)w )->close() ) {
e->ignore();
return;
@@ -2562,15 +2557,15 @@ ActionEditor *MainWindow::actioneditor() const
bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
{
- if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) {
- TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) );
+ if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( w ) ) {
+ TQString defSignal = WidgetFactory::defaultSignal( w );
if ( defSignal.isEmpty() ) {
editSource();
} else {
TQString s = TQString( w->name() ) + "_" + defSignal;
LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() );
if ( iface ) {
- TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) );
+ TQStrList sigs = iface->signalNames( w );
TQString fullSignal;
for ( int i = 0; i < (int)sigs.count(); ++i ) {
TQString sig = sigs.at( i );
@@ -2586,53 +2581,53 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
fullSignal.remove( (int)fullSignal.length() - 1, 1 );
fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() );
s += "(" + fullSignal + ")";
- if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) )
- MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot",
+ if ( !MetaDataBase::hasFunction( f, s.latin1() ) )
+ MetaDataBase::addFunction( f, s.latin1(), "", "public", "slot",
f->project()->language(), "void" );
s = s.left( s.find( '(' ) ).latin1();
- if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) {
+ if ( !MetaDataBase::hasConnection( f, w, defSignal.latin1(), f->mainContainer(), s.latin1() ) ) {
MetaDataBase::Connection conn;
- conn.sender = TQT_TQOBJECT(w);
- conn.receiver = TQT_TQOBJECT(f->mainContainer());
+ conn.sender = w;
+ conn.receiver = f->mainContainer();
conn.signal = signl;
conn.slot = s;
AddConnectionCommand *cmd =
new AddConnectionCommand( i18n( "Add Connection" ), f, conn );
f->commandHistory()->addCommand( cmd );
cmd->execute();
- f->formFile()->setModified( TRUE );
+ f->formFile()->setModified( true );
}
}
}
- editFunction( s, TRUE );
+ editFunction( s, true );
}
- return TRUE;
+ return true;
}
if ( WidgetFactory::hasSpecialEditor( WidgetDatabase::
- idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) {
+ idFromClassName( WidgetFactory::classNameOf( w ) ), w ) ) {
statusMessage( i18n( "Edit %1..." ).arg( w->className() ) );
- WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ),
+ WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ),
this, w, formWindow() );
statusBar()->clear();
- return TRUE;
+ return true;
}
- const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE );
- const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE );
+ const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", true ), true );
+ const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", true ), true );
if ( text && text->designable(w) ) {
- bool ok = FALSE;
- bool oldDoWrap = FALSE;
- if ( ::tqqt_cast<TQLabel*>(w) ) {
+ bool ok = false;
+ bool oldDoWrap = false;
+ if ( ::tqt_cast<TQLabel*>(w) ) {
int align = w->property( "alignment" ).toInt();
if ( align & WordBreak )
- oldDoWrap = TRUE;
+ oldDoWrap = true;
}
bool doWrap = oldDoWrap;
TQString text;
- if ( ::tqqt_cast<TQTextEdit*>(w) || ::tqqt_cast<TQLabel*>(w) || ::tqqt_cast<TQButton*>(w) ) {
+ if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
text = MultiLineEditor::getText( this, w->property( "text" ).toString(),
- !::tqqt_cast<TQButton*>(w), &doWrap );
+ !::tqt_cast<TQButton*>(w), &doWrap );
ok = !text.isNull();
} else {
text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ),
@@ -2641,44 +2636,44 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
if ( ok ) {
if ( oldDoWrap != doWrap ) {
TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"wordwrap", TQVariant( oldDoWrap ),
TQVariant( doWrap ), TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE );
+ MetaDataBase::setPropertyChanged( w, "wordwrap", true );
}
TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"text", w->property( "text" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE );
+ MetaDataBase::setPropertyChanged( w, "text", true );
}
- return TRUE;
+ return true;
}
if ( title && title->designable(w) ) {
- bool ok = FALSE;
+ bool ok = false;
TQString text;
text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this );
if ( ok ) {
TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) );
- SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor,
+ SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), w, propertyEditor,
"title", w->property( "title" ),
text, TQString(), TQString() );
cmd->execute();
formWindow()->commandHistory()->addCommand( cmd );
- MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE );
+ MetaDataBase::setPropertyChanged( w, "title", true );
}
- return TRUE;
+ return true;
}
- if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) )
+ if ( !WidgetFactory::isPassiveInteractor( w ) )
editSource();
- return TRUE;
+ return true;
}
void MainWindow::rebuildCustomWidgetGUI()
@@ -2703,7 +2698,7 @@ void MainWindow::rebuildCustomWidgetGUI()
for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) {
WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() );
- a->setToggleAction( TRUE );
+ a->setToggleAction( true );
a->setText( w->className );
a->setIconSet( *w->pixmap );
a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) );
@@ -2730,28 +2725,28 @@ void MainWindow::rebuildCustomWidgetGUI()
void MainWindow::rebuildCommonWidgetsToolBoxPage()
{
- toolBox->setUpdatesEnabled( FALSE );
- commonWidgetsToolBar->setUpdatesEnabled( FALSE );
+ toolBox->setUpdatesEnabled( false );
+ commonWidgetsToolBar->setUpdatesEnabled( false );
commonWidgetsToolBar->clear();
for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() )
a->addTo( commonWidgetsToolBar );
TQWidget *w;
commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) );
w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() );
- toolBox->setUpdatesEnabled( TRUE );
- commonWidgetsToolBar->setUpdatesEnabled( TRUE );
+ toolBox->setUpdatesEnabled( true );
+ commonWidgetsToolBar->setUpdatesEnabled( true );
}
bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
{
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
void MainWindow::setGrid( const TQPoint &p )
@@ -2761,7 +2756,7 @@ void MainWindow::setGrid( const TQPoint &p )
grd = p;
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( !::tqqt_cast<FormWindow*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
}
@@ -2774,7 +2769,7 @@ void MainWindow::setShowGrid( bool b )
sGrid = b;
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( !::tqqt_cast<FormWindow*>(w) )
+ if ( !::tqt_cast<FormWindow*>(w) )
continue;
( (FormWindow*)w )->mainContainer()->update();
}
@@ -2801,11 +2796,11 @@ void MainWindow::windowsMenuActivated( int id )
void MainWindow::projectSelected( TQAction *a )
{
- a->setOn( TRUE );
+ a->setOn( true );
if ( currentProject )
- currentProject->setActive( FALSE );
+ currentProject->setActive( false );
Project *p = *projects.find( a );
- p->setActive( TRUE );
+ p->setActive( true );
if ( currentProject == p )
return;
currentProject = p;
@@ -2823,8 +2818,8 @@ void MainWindow::openProject( const TQString &fn )
}
TQApplication::setOverrideCursor( waitCursor );
Project *pro = new Project( fn, "", projectSettingsPluginManager );
- pro->setModified( FALSE );
- TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE );
+ pro->setModified( false );
+ TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, true );
projects.insert( a, pro );
projectSelected( a );
TQApplication::restoreOverrideCursor();
@@ -2848,7 +2843,7 @@ void MainWindow::checkTempFiles()
TQApplication::setOverrideCursor( waitCursor );
for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) {
if ( load )
- openFormWindow( s + "/" + *it, FALSE );
+ openFormWindow( s + "/" + *it, false );
d.remove( *it );
}
}
@@ -2860,48 +2855,48 @@ void MainWindow::showDialogHelp()
TQString link = documentationPath() + "/designer-manual-13.html#";
- if ( ::tqqt_cast<NewFormBase*>(w) || ::tqqt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
+ if ( ::tqt_cast<NewFormBase*>(w) || ::tqt_cast<StartDialogBase*>(w) ) // own doc for startdialog?
link += "dialog-file-new";
- else if ( ::tqqt_cast<CreateTemplate*>(w) )
+ else if ( ::tqt_cast<CreateTemplate*>(w) )
link += "dialog-file-create-template";
- else if ( ::tqqt_cast<EditFunctionsBase*>(w) )
+ else if ( ::tqt_cast<EditFunctionsBase*>(w) )
link += "dialog-edit-functions";
-// else if ( ::tqqt_cast<ConnectionViewerBase*>(w) )
+// else if ( ::tqt_cast<ConnectionViewerBase*>(w) )
else if ( w->inherits("ConnectionViewerBase") )
link += "dialog-view-connections";
- else if ( ::tqqt_cast<FormSettingsBase*>(w) )
+ else if ( ::tqt_cast<FormSettingsBase*>(w) )
link += "dialog-edit-form-settings";
- else if ( ::tqqt_cast<Preferences*>(w) )
+ else if ( ::tqt_cast<Preferences*>(w) )
link += "dialog-edit-preferences";
- else if ( ::tqqt_cast<PixmapCollectionEditor*>(w) )
+ else if ( ::tqt_cast<PixmapCollectionEditor*>(w) )
link += "dialog-image-collection";
-// else if ( ::tqqt_cast<DatabaseConnectionBase*>(w) )
+// else if ( ::tqt_cast<DatabaseConnectionBase*>(w) )
else if ( w->inherits( "DatabaseConnectionBase" ) )
link += "dialog-edit-database-connections";
- else if ( ::tqqt_cast<ProjectSettingsBase*>(w) )
+ else if ( ::tqt_cast<ProjectSettingsBase*>(w) )
link += "dialog-project-settings";
- else if ( ::tqqt_cast<FindDialog*>(w) )
+ else if ( ::tqt_cast<FindDialog*>(w) )
link += "dialog-find-text";
- else if ( ::tqqt_cast<ReplaceDialog*>(w) )
+ else if ( ::tqt_cast<ReplaceDialog*>(w) )
link += "dialog-replace-text";
- else if ( ::tqqt_cast<GotoLineDialog*>(w) )
+ else if ( ::tqt_cast<GotoLineDialog*>(w) )
link += "dialog-go-to-line";
-// else if ( ::tqqt_cast<ConnectionEditorBase*>(w) )
+// else if ( ::tqt_cast<ConnectionEditorBase*>(w) )
else if ( w->inherits("ConnectionEditorBase") )
link += "dialog-edit-connections";
- else if ( ::tqqt_cast<CustomWidgetEditorBase*>(w) )
+ else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) )
link += "dialog-edit-custom-widgets";
- else if ( ::tqqt_cast<PaletteEditorBase*>(w) )
+ else if ( ::tqt_cast<PaletteEditorBase*>(w) )
link += "dialog-edit-palette";
- else if ( ::tqqt_cast<ListBoxEditorBase*>(w) )
+ else if ( ::tqt_cast<ListBoxEditorBase*>(w) )
link += "dialog-edit-listbox";
- else if ( ::tqqt_cast<ListViewEditorBase*>(w) )
+ else if ( ::tqt_cast<ListViewEditorBase*>(w) )
link += "dialog-edit-listview";
- else if ( ::tqqt_cast<IconViewEditorBase*>(w) )
+ else if ( ::tqt_cast<IconViewEditorBase*>(w) )
link += "dialog-edit-iconview";
- else if ( ::tqqt_cast<TableEditorBase*>(w) )
+ else if ( ::tqt_cast<TableEditorBase*>(w) )
link += "dialog-edit-table";
- else if ( ::tqqt_cast<MultiLineEditor*>(w) )
+ else if ( ::tqt_cast<MultiLineEditor*>(w) )
link += "dialog-text";
else {
@@ -2925,7 +2920,7 @@ void MainWindow::setupActionManager()
continue;
iface->connectTo( desInterface );
- TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) );
+ TQAction *a = iface->create( *ait, this );
if ( !a )
continue;
@@ -2935,11 +2930,11 @@ void MainWindow::setupActionManager()
TQPopupMenu *menu = 0;
TQToolBar *tb = 0;
- if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) {
+ if ( !( menu = (TQPopupMenu*)child( grp.latin1(), "TQPopupMenu" ) ) ) {
menu = new TQPopupMenu( this, grp.latin1() );
menuBar()->insertItem( i18n( grp ), menu );
}
- if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) {
+ if ( !( tb = (TQToolBar*)child( grp.latin1(), "TQToolBar" ) ) ) {
tb = new TQToolBar( this, grp.latin1() );
tb->setCloseMode( TQDockWindow::Undocked );
addToolBar( tb, grp );
@@ -2960,7 +2955,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource )
return;
if ( formWindow()->formFile()->codeFileState() != FormFile::Ok )
- if ( !formWindow()->formFile()->setupUihFile(FALSE) )
+ if ( !formWindow()->formFile()->setupUihFile(false) )
return;
TQString lang = currentProject->language();
@@ -2979,7 +2974,7 @@ void MainWindow::editFunction( const TQString &func, bool rereadSource )
}
}
- createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource );
+ createSourceEditor( formWindow(), formWindow()->project(), lang, func, rereadSource );
}
void MainWindow::setupRecentlyFilesMenu()
@@ -3189,10 +3184,10 @@ void MainWindow::setModified( bool b, TQWidget *window )
{
TQWidget *w = window;
while ( w ) {
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
( (FormWindow*)w )->modificationChanged( b );
return;
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
FormWindow *fw = ( (SourceEditor*)w )->formWindow();
if ( fw && !fw->isFake() ) {
//fw->commandHistory()->setModified( b );
@@ -3204,7 +3199,7 @@ void MainWindow::setModified( bool b, TQWidget *window )
}
return;
}
- w = w->parentWidget( TRUE );
+ w = w->parentWidget( true );
}
}
@@ -3215,19 +3210,19 @@ void MainWindow::editorClosed( SourceEditor *e )
void MainWindow::functionsChanged()
{
- updateFunctionsTimer->start( 0, TRUE );
+ updateFunctionsTimer->start( 0, true );
}
void MainWindow::doFunctionsChanged()
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() )
- e->refresh( FALSE );
+ e->refresh( false );
hierarchyView->formDefinitionView()->refresh();
}
void MainWindow::updateFunctionList()
{
- if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow();
se->save();
@@ -3238,7 +3233,7 @@ void MainWindow::updateFunctionList()
return;
TQValueList<LanguageInterface::Connection> conns;
iface->connections( se->text(), &conns );
- MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns );
+ MetaDataBase::setupConnections( se->formWindow(), conns );
propertyEditor->eventList()->setup();
}
}
@@ -3276,17 +3271,17 @@ void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &e
ol.append( o );
TQStringList ll;
ll << currentProject->locationOfObject( o );
- oWindow->setErrorMessages( l2, l, TRUE, ll, ol );
+ oWindow->setErrorMessages( l2, l, true, ll, ol );
showSourceLine( o, errorLine, Error );
}
}
void MainWindow::finishedRun()
{
- inDebugMode = FALSE;
- previewing = FALSE;
+ inDebugMode = false;
+ previewing = false;
debuggingForms.clear();
- enableAll( TRUE );
+ enableAll( true );
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
if ( e->project() == currentProject )
e->editorInterface()->setMode( EditorInterface::Editing );
@@ -3298,11 +3293,11 @@ void MainWindow::finishedRun()
void MainWindow::enableAll( bool enable )
{
menuBar()->setEnabled( enable );
- TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING );
+ TQObjectList *l = queryList( "TQDockWindow" );
for ( TQObject *o = l->first(); o; o = l->next() ) {
- if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() ||
- TQT_BASE_OBJECT(o) == oWindow->parentWidget() ||
- TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() )
+ if ( o == wspace->parentWidget() ||
+ o == oWindow->parentWidget() ||
+ o == hierarchyView->parentWidget() )
continue;
( (TQWidget*)o )->setEnabled( enable );
}
@@ -3316,9 +3311,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
FormWindow *fw = 0;
SourceEditor *se = 0;
SourceFile *sf = 0;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
fw = (FormWindow*)w;
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
se = (SourceEditor*)w;
if ( !se->object() )
continue;
@@ -3386,7 +3381,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
}
}
- if ( ::tqqt_cast<SourceFile*>(o) ) {
+ if ( ::tqt_cast<SourceFile*>(o) ) {
for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
sources.current(); ++sources ) {
SourceFile* f = sources.current();
@@ -3420,11 +3415,11 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
return;
}
- mblockNewForms = TRUE;
+ mblockNewForms = true;
if ( !fw )
openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) );
else
- fw->formFile()->showEditor( FALSE );
+ fw->formFile()->showEditor( false );
tqApp->processEvents(); // give all views the chance to get the formwindow
SourceEditor *se = editSource();
if ( se ) {
@@ -3440,7 +3435,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
break;
}
}
- mblockNewForms = FALSE;
+ mblockNewForms = false;
}
@@ -3448,12 +3443,12 @@ TQObject *MainWindow::findRealObject( TQObject *o )
{
TQWidgetList windows = qWorkspace()->windowList();
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
- if ( ::tqqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
- return TQT_TQOBJECT(w);
- else if ( ::tqqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
+ if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
+ return w;
+ else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
- return TQT_TQOBJECT(w);
- else if ( ::tqqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
+ return w;
+ else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
( (SourceEditor*)w )->sourceFile() == o )
return o;
}
@@ -3463,8 +3458,8 @@ TQObject *MainWindow::findRealObject( TQObject *o )
void MainWindow::formNameChanged( FormWindow *fw )
{
for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) {
- if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) )
- e->refresh( TRUE );
+ if ( e->object() == fw )
+ e->refresh( true );
if ( e->project() == fw->project() )
e->resetContext();
}
@@ -3474,7 +3469,7 @@ void MainWindow::breakPointsChanged()
{
if ( !inDebugMode )
return;
- if ( !qWorkspace()->activeWindow() || !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
+ if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
return;
SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow();
if ( !e->object() || !e->project() )
@@ -3558,7 +3553,7 @@ SourceFile *MainWindow::sourceFile()
bool MainWindow::openProjectSettings( Project *pro )
{
- ProjectSettings dia( pro, this, 0, TRUE );
+ ProjectSettings dia( pro, this, 0, true );
SenderObject *senderObject = new SenderObject( designerInterface() );
TQValueList<Tab>::ConstIterator it;
for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
@@ -3567,16 +3562,16 @@ bool MainWindow::openProjectSettings( Project *pro )
continue;
dia.tabWidget->addTab( t.w, t.title );
if ( t.receiver ) {
- connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) );
- connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
- connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ connect( dia.buttonOk, TQ_SIGNAL( clicked() ), senderObject, TQ_SLOT( emitAcceptSignal() ) );
+ connect( senderObject, TQ_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot );
+ connect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
senderObject->emitInitSignal();
- disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
+ disconnect( senderObject, TQ_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot );
}
}
if ( singleProject )
- dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE );
+ dia.tabWidget->setTabEnabled( dia.tabSettings, false );
int res = dia.exec();
@@ -3585,7 +3580,7 @@ bool MainWindow::openProjectSettings( Project *pro )
for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) {
Tab t = *it;
dia.tabWidget->removePage( t.w );
- t.w->reparent( 0, TQPoint(0,0), FALSE );
+ t.w->reparent( 0, TQPoint(0,0), false );
}
return res == TQDialog::Accepted;
@@ -3636,35 +3631,35 @@ void MainWindow::setSingleProject( Project *pro )
Project *pro = eProject;
pro->save();
TQWidgetList windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( TRUE );
+ qWorkspace()->blockSignals( true );
TQWidgetListIt wit( windows );
while ( wit.current() ) {
TQWidget *w = wit.current();
++wit;
- if ( ::tqqt_cast<FormWindow*>(w) ) {
+ if ( ::tqt_cast<FormWindow*>(w) ) {
if ( ( (FormWindow*)w )->project() == pro ) {
if ( ( (FormWindow*)w )->formFile()->editor() )
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
( (FormWindow*)w )->formFile()->close();
}
- } else if ( ::tqqt_cast<SourceEditor*>(w) ) {
+ } else if ( ::tqt_cast<SourceEditor*>(w) ) {
( (SourceEditor*)w )->close();
}
}
hierarchyView->clear();
windows = qWorkspace()->windowList();
- qWorkspace()->blockSignals( FALSE );
+ qWorkspace()->blockSignals( false );
currentProject = 0;
- updateUndoRedo( FALSE, FALSE, TQString(), TQString() );
+ updateUndoRedo( false, false, TQString(), TQString() );
}
- singleProject = TRUE;
+ singleProject = true;
projects.clear();
TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0,
- actionGroupProjects, 0, TRUE );
+ actionGroupProjects, 0, true );
eProject = pro;
projects.insert( a, eProject );
- a->setOn( TRUE );
+ a->setOn( true );
actionGroupProjects->removeFrom( projectMenu );
actionGroupProjects->removeFrom( projectToolBar );
currentProject = eProject;
@@ -3682,30 +3677,30 @@ void MainWindow::showGUIStuff( bool b )
return;
guiStuffVisible = b;
if ( !b ) {
- setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), false );
toolBox->parentWidget()->hide();
for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
tb->hide();
- setAppropriate( tb, FALSE );
+ setAppropriate( tb, false );
}
- propertyEditor->setPropertyEditorEnabled( FALSE );
- setAppropriate( layoutToolBar, FALSE );
+ propertyEditor->setPropertyEditorEnabled( false );
+ setAppropriate( layoutToolBar, false );
layoutToolBar->hide();
- setAppropriate( toolsToolBar, FALSE );
+ setAppropriate( toolsToolBar, false );
toolsToolBar->hide();
menubar->removeItem( toolsMenuId );
menubar->removeItem( toolsMenuId + 1 );
menubar->removeItem( toolsMenuId + 2 );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
- disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
- actionEditFormSettings->setEnabled( FALSE );
- actionEditSource->setEnabled( FALSE );
- actionEditConnections->setEnabled( FALSE );
- actionEditFunctions->setEnabled( FALSE );
- actionEditAccels->setEnabled( FALSE );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
+ disconnect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
+ actionEditFormSettings->setEnabled( false );
+ actionEditSource->setEnabled( false );
+ actionEditConnections->setEnabled( false );
+ actionEditFunctions->setEnabled( false );
+ actionEditAccels->setEnabled( false );
( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Signal Handlers" ) );
actionGroupNew->removeFrom( fileMenu );
@@ -3719,30 +3714,30 @@ void MainWindow::showGUIStuff( bool b )
actionFileSave->addTo( projectToolBar );
actionFileExit->addTo( fileMenu );
} else {
- setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE );
+ setAppropriate( (TQDockWindow*)toolBox->parentWidget(), true );
toolBox->parentWidget()->show();
for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) {
- setAppropriate( tb, TRUE );
+ setAppropriate( tb, true );
tb->hide();
}
- propertyEditor->setPropertyEditorEnabled( TRUE );
- setAppropriate( layoutToolBar, TRUE );
+ propertyEditor->setPropertyEditorEnabled( true );
+ setAppropriate( layoutToolBar, true );
layoutToolBar->show();
- setAppropriate( toolsToolBar, TRUE );
+ setAppropriate( toolsToolBar, true );
toolsToolBar->show();
menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex );
menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 );
menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) );
- connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) );
- actionEditFormSettings->setEnabled( TRUE );
- actionEditSource->setEnabled( TRUE );
- actionEditConnections->setEnabled( TRUE );
- actionEditFunctions->setEnabled( TRUE );
- actionEditAccels->setEnabled( TRUE );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) );
+ connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) );
+ actionEditFormSettings->setEnabled( true );
+ actionEditSource->setEnabled( true );
+ actionEditConnections->setEnabled( true );
+ actionEditFunctions->setEnabled( true );
+ actionEditAccels->setEnabled( true );
( (TQDockWindow*)propertyEditor->parentWidget() )->
setCaption( i18n( "Property Editor/Signal Handlers" ) );
actionFileSave->removeFrom( fileMenu );