|
|
|
@ -911,7 +911,7 @@ void MainWindow::showProperties( TQObject *o )
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( currentTool() == POINTER_TOOL && fw &&
|
|
|
|
|
( !qworkspace->activeWindow() || !::qt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
|
|
|
|
|
( !qworkspace->activeWindow() || !::tqt_cast<SourceEditor*>(qworkspace->activeWindow()) ) )
|
|
|
|
|
fw->setFocus();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -928,21 +928,21 @@ void MainWindow::updateProperties( TQObject * )
|
|
|
|
|
|
|
|
|
|
bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
{
|
|
|
|
|
if ( ::qt_cast<MenuBarEditor*>(o) || ::qt_cast<PopupMenuEditor*>(o) ||
|
|
|
|
|
if ( ::tqt_cast<MenuBarEditor*>(o) || ::tqt_cast<PopupMenuEditor*>(o) ||
|
|
|
|
|
( o &&
|
|
|
|
|
( ::qt_cast<MenuBarEditor*>(o->parent()) ||
|
|
|
|
|
::qt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
|
|
|
|
|
( ::tqt_cast<MenuBarEditor*>(o->parent()) ||
|
|
|
|
|
::tqt_cast<PopupMenuEditor*>(o->parent()) ) ) ) {
|
|
|
|
|
|
|
|
|
|
if ( e->type() == TQEvent::Accel && ::qt_cast<PopupMenuEditor*>(o) ) {
|
|
|
|
|
if ( e->type() == TQEvent::Accel && ::tqt_cast<PopupMenuEditor*>(o) ) {
|
|
|
|
|
return TRUE; // consume accel events
|
|
|
|
|
} else if ( e->type() == TQEvent::MouseButtonPress && ::qt_cast<MenuBarEditor*>(o) ) {
|
|
|
|
|
} else if ( e->type() == TQEvent::MouseButtonPress && ::tqt_cast<MenuBarEditor*>(o) ) {
|
|
|
|
|
TQPoint pos = ((TQMouseEvent*)e)->pos();
|
|
|
|
|
MenuBarEditor *m = ::qt_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 && ::qt_cast<PopupMenuEditor*>(o) ) {
|
|
|
|
|
PopupMenuEditor *m = ::qt_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() );
|
|
|
|
@ -961,7 +961,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) {
|
|
|
|
|
w = (TQWidget*)o;
|
|
|
|
|
while ( w ) {
|
|
|
|
|
if ( ::qt_cast<PropertyList*>(w) )
|
|
|
|
|
if ( ::tqt_cast<PropertyList*>(w) )
|
|
|
|
|
break;
|
|
|
|
|
w = w->parentWidget( TRUE );
|
|
|
|
|
}
|
|
|
|
@ -977,7 +977,7 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
( (TQKeyEvent*)e )->key() == Key_E ) &&
|
|
|
|
|
( (TQKeyEvent*)e )->state() & ControlButton ) {
|
|
|
|
|
if ( qWorkspace()->activeWindow() &&
|
|
|
|
|
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
|
|
|
|
|
::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
|
|
|
|
|
( (TQKeyEvent*)e )->ignore();
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
@ -986,44 +986,44 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
case TQEvent::ContextMenu:
|
|
|
|
|
case TQEvent::MouseButtonPress:
|
|
|
|
|
if ( o && currentTool() == POINTER_TOOL &&
|
|
|
|
|
( ::qt_cast<MenuBarEditor*>(o) ||
|
|
|
|
|
::qt_cast<PopupMenuEditor*>(o) ||
|
|
|
|
|
::qt_cast<TQDesignerToolBar*>(o) ||
|
|
|
|
|
( ::qt_cast<TQComboBox*>(o) ||
|
|
|
|
|
::qt_cast<TQToolButton*>(o) ||
|
|
|
|
|
::qt_cast<TQDesignerToolBarSeparator*>(o) ) &&
|
|
|
|
|
( ::tqt_cast<MenuBarEditor*>(o) ||
|
|
|
|
|
::tqt_cast<PopupMenuEditor*>(o) ||
|
|
|
|
|
::tqt_cast<TQDesignerToolBar*>(o) ||
|
|
|
|
|
( ::tqt_cast<TQComboBox*>(o) ||
|
|
|
|
|
::tqt_cast<TQToolButton*>(o) ||
|
|
|
|
|
::tqt_cast<TQDesignerToolBarSeparator*>(o) ) &&
|
|
|
|
|
o->parent()
|
|
|
|
|
&& ( ::qt_cast<TQDesignerToolBar*>(o->parent())
|
|
|
|
|
|| ::qt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) {
|
|
|
|
|
&& ( ::tqt_cast<TQDesignerToolBar*>(o->parent())
|
|
|
|
|
|| ::tqt_cast<TQDesignerWidgetStack*>(o->parent())) ) ) {
|
|
|
|
|
TQWidget *w = (TQWidget*)o;
|
|
|
|
|
if ( ::qt_cast<TQToolButton*>(w) ||
|
|
|
|
|
::qt_cast<TQComboBox*>(w) ||
|
|
|
|
|
::qt_cast<PopupMenuEditor*>(w) ||
|
|
|
|
|
::qt_cast<TQDesignerToolBarSeparator*>(w) )
|
|
|
|
|
if ( ::tqt_cast<TQToolButton*>(w) ||
|
|
|
|
|
::tqt_cast<TQComboBox*>(w) ||
|
|
|
|
|
::tqt_cast<PopupMenuEditor*>(w) ||
|
|
|
|
|
::tqt_cast<TQDesignerToolBarSeparator*>(w) )
|
|
|
|
|
w = w->parentWidget();
|
|
|
|
|
TQWidget *pw = w->parentWidget();
|
|
|
|
|
while ( pw ) {
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(pw) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(pw) ) {
|
|
|
|
|
( (FormWindow*)pw )->emitShowProperties( w );
|
|
|
|
|
if ( !::qt_cast<TQDesignerToolBar*>(o) )
|
|
|
|
|
return ( !::qt_cast<TQToolButton*>(o) &&
|
|
|
|
|
!::qt_cast<MenuBarEditor*>(o) &&
|
|
|
|
|
!::qt_cast<TQComboBox*>(o) &&
|
|
|
|
|
!::qt_cast<TQDesignerToolBarSeparator*>(o) );
|
|
|
|
|
if ( !::tqt_cast<TQDesignerToolBar*>(o) )
|
|
|
|
|
return ( !::tqt_cast<TQToolButton*>(o) &&
|
|
|
|
|
!::tqt_cast<MenuBarEditor*>(o) &&
|
|
|
|
|
!::tqt_cast<TQComboBox*>(o) &&
|
|
|
|
|
!::tqt_cast<TQDesignerToolBarSeparator*>(o) );
|
|
|
|
|
}
|
|
|
|
|
pw = pw->parentWidget();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( o && ( ::qt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") )
|
|
|
|
|
if ( o && ( ::tqt_cast<TQDesignerToolBar*>(o) || o->inherits("TQDockWindowHandle") )
|
|
|
|
|
&& e->type() == TQEvent::ContextMenu )
|
|
|
|
|
break;
|
|
|
|
|
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
|
|
|
|
|
break;
|
|
|
|
|
if ( ::qt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
if ( ::tqt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) )
|
|
|
|
|
::tqt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
if ( !w->hasFocus() )
|
|
|
|
|
w->setFocus();
|
|
|
|
@ -1048,11 +1048,11 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
lastPressWidget = 0;
|
|
|
|
|
if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL )
|
|
|
|
|
break;
|
|
|
|
|
if ( ::qt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
if ( ::tqt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) )
|
|
|
|
|
::tqt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
|
|
|
|
|
if ( !passiveInteractor )
|
|
|
|
@ -1068,15 +1068,15 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
break;
|
|
|
|
|
w = isAFormWindowChild( o );
|
|
|
|
|
if ( lastPressWidget != (TQWidget*)o && w &&
|
|
|
|
|
!::qt_cast<SizeHandle*>(o) && !::qt_cast<OrderIndicator*>(o) &&
|
|
|
|
|
!::qt_cast<PopupMenuEditor*>(o) && !::qt_cast<TQMenuBar*>(o) &&
|
|
|
|
|
!::qt_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 && ::qt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
if ( o && ::tqt_cast<TQSizeGrip*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
if ( lastPressWidget != (TQWidget*)o ||
|
|
|
|
|
( !w || ::qt_cast<SizeHandle*>(o) ) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) )
|
|
|
|
|
( !w || ::tqt_cast<SizeHandle*>(o) ) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
passiveInteractor = WidgetFactory::isPassiveInteractor( o );
|
|
|
|
|
if ( !passiveInteractor )
|
|
|
|
@ -1089,14 +1089,14 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
return FALSE;
|
|
|
|
|
}
|
|
|
|
|
if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) {
|
|
|
|
|
if ( ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
|
|
|
|
|
if ( ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) {
|
|
|
|
|
qWorkspace()->activeWindow()->setFocus();
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_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() )
|
|
|
|
@ -1104,10 +1104,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
break;
|
|
|
|
|
case TQEvent::MouseButtonDblClick:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) ) {
|
|
|
|
|
if ( ::qt_cast<TQToolButton*>(o) && ((TQToolButton*)o)->isOn() &&
|
|
|
|
|
o->parent() && ::qt_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;
|
|
|
|
|
}
|
|
|
|
@ -1121,8 +1121,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
return TRUE;
|
|
|
|
|
case TQEvent::KeyRelease:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_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() )
|
|
|
|
@ -1130,8 +1130,8 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
break;
|
|
|
|
|
case TQEvent::Hide:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) )
|
|
|
|
|
::tqt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
if ( ( (FormWindow*)w )->isWidgetSelected( (TQWidget*)o ) )
|
|
|
|
|
( (FormWindow*)w )->selectWidget( (TQWidget*)o, FALSE );
|
|
|
|
@ -1139,16 +1139,16 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
case TQEvent::Enter:
|
|
|
|
|
case TQEvent::Leave:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) ||
|
|
|
|
|
::qt_cast<MenuBarEditor*>(o) )
|
|
|
|
|
::tqt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) ||
|
|
|
|
|
::tqt_cast<MenuBarEditor*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
return TRUE;
|
|
|
|
|
case TQEvent::Resize:
|
|
|
|
|
case TQEvent::Move:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_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 );
|
|
|
|
@ -1194,33 +1194,33 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
return TRUE;
|
|
|
|
|
case TQEvent::Wheel:
|
|
|
|
|
if ( !( w = isAFormWindowChild( o ) ) ||
|
|
|
|
|
::qt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::qt_cast<OrderIndicator*>(o) )
|
|
|
|
|
::tqt_cast<SizeHandle*>(o) ||
|
|
|
|
|
::tqt_cast<OrderIndicator*>(o) )
|
|
|
|
|
break;
|
|
|
|
|
return TRUE;
|
|
|
|
|
case TQEvent::FocusIn:
|
|
|
|
|
if ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
|
|
|
|
|
if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
|
|
|
|
|
return TRUE; //FIXME
|
|
|
|
|
if ( hierarchyView->formDefinitionView()->isRenaming()
|
|
|
|
|
&& ( o->inherits( "Editor" ) || ::qt_cast<FormWindow*>(o) ) )
|
|
|
|
|
&& ( o->inherits( "Editor" ) || ::tqt_cast<FormWindow*>(o) ) )
|
|
|
|
|
TQApplication::sendPostedEvents();
|
|
|
|
|
if ( o->inherits( "Editor" ) ) {
|
|
|
|
|
TQWidget *w = (TQWidget*)o;
|
|
|
|
|
while ( w ) {
|
|
|
|
|
if ( ::qt_cast<SourceEditor*>(w) )
|
|
|
|
|
if ( ::tqt_cast<SourceEditor*>(w) )
|
|
|
|
|
break;
|
|
|
|
|
w = w->parentWidget( TRUE );
|
|
|
|
|
}
|
|
|
|
|
if ( ::qt_cast<SourceEditor*>(w) )
|
|
|
|
|
if ( ::tqt_cast<SourceEditor*>(w) )
|
|
|
|
|
( (SourceEditor*)w )->checkTimeStamp();
|
|
|
|
|
} else if ( ::qt_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 ( !::qt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
|
|
|
|
|
if ( !::tqt_cast<FormWindow*>(o) && isAFormWindowChild( o ) )
|
|
|
|
|
return TRUE;
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
@ -1232,10 +1232,10 @@ bool MainWindow::eventFilter( TQObject *o, TQEvent *e )
|
|
|
|
|
|
|
|
|
|
TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
|
|
|
|
|
{
|
|
|
|
|
if ( ::qt_cast<TQWizard*>(o->parent()) && !::qt_cast<TQPushButton*>(o) )
|
|
|
|
|
if ( ::tqt_cast<TQWizard*>(o->parent()) && !::tqt_cast<TQPushButton*>(o) )
|
|
|
|
|
return 0;
|
|
|
|
|
while ( o ) {
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(o) )
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(o) )
|
|
|
|
|
return (TQWidget*)o;
|
|
|
|
|
o = o->parent();
|
|
|
|
|
}
|
|
|
|
@ -1245,9 +1245,9 @@ TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const
|
|
|
|
|
TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const
|
|
|
|
|
{
|
|
|
|
|
while ( o ) {
|
|
|
|
|
if ( ::qt_cast<TQDesignerToolBar*>(o) )
|
|
|
|
|
if ( ::tqt_cast<TQDesignerToolBar*>(o) )
|
|
|
|
|
return (TQWidget*)o;
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(o) )
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(o) )
|
|
|
|
|
return 0;
|
|
|
|
|
o = o->parent();
|
|
|
|
|
}
|
|
|
|
@ -1258,7 +1258,7 @@ FormWindow *MainWindow::formWindow()
|
|
|
|
|
{
|
|
|
|
|
if ( qworkspace->activeWindow() ) {
|
|
|
|
|
FormWindow *fw = 0;
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(qworkspace->activeWindow()) )
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(qworkspace->activeWindow()) )
|
|
|
|
|
fw = (FormWindow*)qworkspace->activeWindow();
|
|
|
|
|
else if ( lastActiveFormWindow &&
|
|
|
|
|
qworkspace->windowList().find( lastActiveFormWindow ) != -1)
|
|
|
|
@ -1370,7 +1370,7 @@ bool MainWindow::unregisterClient( FormWindow *w )
|
|
|
|
|
void MainWindow::activeWindowChanged( TQWidget *w )
|
|
|
|
|
{
|
|
|
|
|
TQWidget *old = formWindow();
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) ) {
|
|
|
|
|
FormWindow *fw = (FormWindow*)w;
|
|
|
|
|
FormWindow *ofw = lastActiveFormWindow;
|
|
|
|
|
lastActiveFormWindow = fw;
|
|
|
|
@ -1384,13 +1384,13 @@ void MainWindow::activeWindowChanged( TQWidget *w )
|
|
|
|
|
}
|
|
|
|
|
workspace()->activeFormChanged( fw );
|
|
|
|
|
setAppropriate( (TQDockWindow*)actionEditor->parentWidget(),
|
|
|
|
|
::qt_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()) && ::qt_cast<TQMainWindow*>(mc) )
|
|
|
|
|
if ( ofw && (mc = ofw->mainContainer()) && ::tqt_cast<TQMainWindow*>(mc) )
|
|
|
|
|
actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() );
|
|
|
|
|
actionEditor->parentWidget()->hide();
|
|
|
|
|
}
|
|
|
|
@ -1425,7 +1425,7 @@ void MainWindow::activeWindowChanged( TQWidget *w )
|
|
|
|
|
|
|
|
|
|
selectionChanged();
|
|
|
|
|
|
|
|
|
|
if ( ::qt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
SourceEditor *se = (SourceEditor*)w;
|
|
|
|
|
TQGuardedPtr<FormWindow> fw = se->formWindow();
|
|
|
|
|
if ( se->formWindow() &&
|
|
|
|
@ -1480,7 +1480,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
|
|
|
|
|
const TQString &undoCmd, const TQString &redoCmd )
|
|
|
|
|
{
|
|
|
|
|
if ( qWorkspace()->activeWindow() &&
|
|
|
|
|
::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
return; // do not set a formWindow related command
|
|
|
|
|
actionEditUndo->setEnabled( undoAvailable );
|
|
|
|
|
actionEditRedo->setEnabled( redoAvailable );
|
|
|
|
@ -1505,7 +1505,7 @@ void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable,
|
|
|
|
|
void MainWindow::updateEditorUndoRedo()
|
|
|
|
|
{
|
|
|
|
|
if ( !qWorkspace()->activeWindow() ||
|
|
|
|
|
!::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
!::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
return;
|
|
|
|
|
SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow();
|
|
|
|
|
actionEditUndo->setEnabled( editor->editIsUndoAvailable() );
|
|
|
|
@ -1581,7 +1581,7 @@ void MainWindow::setupRMBProperties( TQValueList<uint> &ids, TQMap<TQString, int
|
|
|
|
|
ids << ( id = rmbWidgets->insertItem( tr("Choose Pixmap..."), -1, 0) );
|
|
|
|
|
props.insert( "pixmap", id );
|
|
|
|
|
}
|
|
|
|
|
if ( text && text->designable(w) && !::qt_cast<TQTextEdit*>(w) ) {
|
|
|
|
|
if ( text && text->designable(w) && !::tqt_cast<TQTextEdit*>(w) ) {
|
|
|
|
|
ids << ( id = rmbWidgets->insertItem( tr("Edit Text..."), -1, 0) );
|
|
|
|
|
props.insert( "text", id );
|
|
|
|
|
}
|
|
|
|
@ -1617,7 +1617,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
|
|
|
|
|
{
|
|
|
|
|
int id;
|
|
|
|
|
|
|
|
|
|
if ( ::qt_cast<TQTabWidget*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<TQTabWidget*>(w) ) {
|
|
|
|
|
if ( ids.isEmpty() )
|
|
|
|
|
ids << rmbWidgets->insertSeparator( 0 );
|
|
|
|
|
if ( ( (TQDesignerTabWidget*)w )->count() > 1) {
|
|
|
|
@ -1626,7 +1626,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
|
|
|
|
|
}
|
|
|
|
|
ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) );
|
|
|
|
|
commands.insert( "add", id );
|
|
|
|
|
} else if ( ::qt_cast<TQDesignerWidgetStack*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQDesignerWidgetStack*>(w) ) {
|
|
|
|
|
if ( ids.isEmpty() )
|
|
|
|
|
ids << rmbWidgets->insertSeparator( 0 );
|
|
|
|
|
if ( ( (TQDesignerWidgetStack*)w )->count() > 1) {
|
|
|
|
@ -1640,7 +1640,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
|
|
|
|
|
}
|
|
|
|
|
ids << ( id = rmbWidgets->insertItem( tr("Add Page"), -1, 0 ) );
|
|
|
|
|
commands.insert( "add", id );
|
|
|
|
|
} else if ( ::qt_cast<TQToolBox*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQToolBox*>(w) ) {
|
|
|
|
|
if ( ids.isEmpty() )
|
|
|
|
|
ids << rmbWidgets->insertSeparator( 0 );
|
|
|
|
|
if ( ( (TQToolBox*)w )->count() > 1 ) {
|
|
|
|
@ -1688,7 +1688,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
|
|
|
|
|
{
|
|
|
|
|
int id;
|
|
|
|
|
|
|
|
|
|
if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) {
|
|
|
|
|
if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
|
|
|
|
|
if ( ids.isEmpty() )
|
|
|
|
|
ids << rmbFormWindow->insertSeparator( 0 );
|
|
|
|
|
|
|
|
|
@ -1706,7 +1706,7 @@ void MainWindow::setupRMBSpecialCommands( TQValueList<uint> &ids,
|
|
|
|
|
ids << ( id = rmbFormWindow->insertItem( tr("Edit Pages..."), -1, 0 ) );
|
|
|
|
|
commands.insert( "edit", id );
|
|
|
|
|
|
|
|
|
|
} else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
|
|
|
|
|
if ( ids.isEmpty() )
|
|
|
|
|
ids << rmbFormWindow->insertSeparator( 0 );
|
|
|
|
|
ids << ( id = rmbFormWindow->insertItem( tr( "Add Menu Item" ), -1, 0 ) );
|
|
|
|
@ -1721,7 +1721,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
|
|
|
|
|
if ( id == props[ "text" ] ) {
|
|
|
|
|
bool ok = FALSE;
|
|
|
|
|
bool oldDoWrap = FALSE;
|
|
|
|
|
if ( ::qt_cast<TQLabel*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<TQLabel*>(w) ) {
|
|
|
|
|
int align = w->property( "alignment" ).toInt();
|
|
|
|
|
if ( align & WordBreak )
|
|
|
|
|
oldDoWrap = TRUE;
|
|
|
|
@ -1729,8 +1729,8 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
|
|
|
|
|
bool doWrap = oldDoWrap;
|
|
|
|
|
|
|
|
|
|
TQString text;
|
|
|
|
|
if ( ::qt_cast<TQTextView*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) {
|
|
|
|
|
text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::qt_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( tr("Text"), tr( "New text" ),
|
|
|
|
@ -1799,7 +1799,7 @@ void MainWindow::handleRMBProperties( int id, TQMap<TQString, int> &props, TQWid
|
|
|
|
|
|
|
|
|
|
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, TQWidget *w )
|
|
|
|
|
{
|
|
|
|
|
if ( ::qt_cast<TQTabWidget*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<TQTabWidget*>(w) ) {
|
|
|
|
|
TQTabWidget *tw = (TQTabWidget*)w;
|
|
|
|
|
if ( id == commands[ "add" ] ) {
|
|
|
|
|
AddTabPageCommand *cmd =
|
|
|
|
@ -1818,7 +1818,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
|
|
|
|
|
cmd->execute();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ( ::qt_cast<TQToolBox*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQToolBox*>(w) ) {
|
|
|
|
|
TQToolBox *tb = (TQToolBox*)w;
|
|
|
|
|
if ( id == commands[ "add" ] ) {
|
|
|
|
|
AddToolBoxPageCommand *cmd =
|
|
|
|
@ -1838,7 +1838,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
|
|
|
|
|
cmd->execute();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ( ::qt_cast<TQWidgetStack*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQWidgetStack*>(w) ) {
|
|
|
|
|
TQDesignerWidgetStack *ws = (TQDesignerWidgetStack*)w;
|
|
|
|
|
if ( id == commands[ "add" ] ) {
|
|
|
|
|
AddWidgetStackPageCommand *cmd =
|
|
|
|
@ -1939,7 +1939,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
|
|
|
|
|
|
|
|
|
|
void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &commands, FormWindow *fw )
|
|
|
|
|
{
|
|
|
|
|
if ( ::qt_cast<TQWizard*>(fw->mainContainer()) ) {
|
|
|
|
|
if ( ::tqt_cast<TQWizard*>(fw->mainContainer()) ) {
|
|
|
|
|
TQWizard *wiz = (TQWizard*)fw->mainContainer();
|
|
|
|
|
if ( id == commands[ "add" ] ) {
|
|
|
|
|
AddWizardPageCommand *cmd =
|
|
|
|
@ -1977,7 +1977,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
|
|
|
|
|
cmd->execute();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else if ( ::qt_cast<TQMainWindow*>(fw->mainContainer()) ) {
|
|
|
|
|
} else if ( ::tqt_cast<TQMainWindow*>(fw->mainContainer()) ) {
|
|
|
|
|
TQMainWindow *mw = (TQMainWindow*)fw->mainContainer();
|
|
|
|
|
if ( id == commands[ "add_toolbar" ] ) {
|
|
|
|
|
AddToolBarCommand *cmd =
|
|
|
|
@ -1998,7 +1998,7 @@ void MainWindow::handleRMBSpecialCommands( int id, TQMap<TQString, int> &command
|
|
|
|
|
void MainWindow::clipboardChanged()
|
|
|
|
|
{
|
|
|
|
|
TQString text( tqApp->clipboard()->text() );
|
|
|
|
|
if (qWorkspace()->activeWindow() && ::qt_cast<SourceEditor*>(qWorkspace()->activeWindow())) {
|
|
|
|
|
if (qWorkspace()->activeWindow() && ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow())) {
|
|
|
|
|
actionEditPaste->setEnabled(!text.isEmpty());
|
|
|
|
|
} else {
|
|
|
|
|
TQString start( "<!DOCTYPE UI-SELECTION>" );
|
|
|
|
@ -2494,7 +2494,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
|
|
|
|
|
while ( wit.current() ) {
|
|
|
|
|
TQWidget *w = wit.current();
|
|
|
|
|
++wit;
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ( (FormWindow*)w )->formFile()->editor() )
|
|
|
|
|
windows.removeRef( ( (FormWindow*)w )->formFile()->editor() );
|
|
|
|
|
if ( ( (FormWindow*)w )->formFile()->formWindow() )
|
|
|
|
@ -2503,7 +2503,7 @@ void MainWindow::closeEvent( TQCloseEvent *e )
|
|
|
|
|
e->ignore();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
} else if ( ::qt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
if ( !( (SourceEditor*)w )->close() ) {
|
|
|
|
|
e->ignore();
|
|
|
|
|
return;
|
|
|
|
@ -2627,7 +2627,7 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
|
|
|
|
|
if ( text && text->designable(w) ) {
|
|
|
|
|
bool ok = FALSE;
|
|
|
|
|
bool oldDoWrap = FALSE;
|
|
|
|
|
if ( ::qt_cast<TQLabel*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<TQLabel*>(w) ) {
|
|
|
|
|
int align = w->property( "alignment" ).toInt();
|
|
|
|
|
if ( align & WordBreak )
|
|
|
|
|
oldDoWrap = TRUE;
|
|
|
|
@ -2635,9 +2635,9 @@ bool MainWindow::openEditor( TQWidget *w, FormWindow *f )
|
|
|
|
|
bool doWrap = oldDoWrap;
|
|
|
|
|
|
|
|
|
|
TQString text;
|
|
|
|
|
if ( ::qt_cast<TQTextEdit*>(w) || ::qt_cast<TQLabel*>(w) || ::qt_cast<TQButton*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<TQTextEdit*>(w) || ::tqt_cast<TQLabel*>(w) || ::tqt_cast<TQButton*>(w) ) {
|
|
|
|
|
text = MultiLineEditor::getText( this, w->property( "text" ).toString(),
|
|
|
|
|
!::qt_cast<TQButton*>(w), &doWrap );
|
|
|
|
|
!::tqt_cast<TQButton*>(w), &doWrap );
|
|
|
|
|
ok = !text.isNull();
|
|
|
|
|
} else {
|
|
|
|
|
text = TQInputDialog::getText( tr("Text"), tr( "New text" ),
|
|
|
|
@ -2751,7 +2751,7 @@ bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid )
|
|
|
|
|
{
|
|
|
|
|
TQWidgetList windows = qWorkspace()->windowList();
|
|
|
|
|
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) )
|
|
|
|
|
return TRUE;
|
|
|
|
|
}
|
|
|
|
@ -2766,7 +2766,7 @@ void MainWindow::setGrid( const TQPoint &p )
|
|
|
|
|
grd = p;
|
|
|
|
|
TQWidgetList windows = qWorkspace()->windowList();
|
|
|
|
|
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
|
|
|
|
|
if ( !::qt_cast<FormWindow*>(w) )
|
|
|
|
|
if ( !::tqt_cast<FormWindow*>(w) )
|
|
|
|
|
continue;
|
|
|
|
|
( (FormWindow*)w )->mainContainer()->update();
|
|
|
|
|
}
|
|
|
|
@ -2779,7 +2779,7 @@ void MainWindow::setShowGrid( bool b )
|
|
|
|
|
sGrid = b;
|
|
|
|
|
TQWidgetList windows = qWorkspace()->windowList();
|
|
|
|
|
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
|
|
|
|
|
if ( !::qt_cast<FormWindow*>(w) )
|
|
|
|
|
if ( !::tqt_cast<FormWindow*>(w) )
|
|
|
|
|
continue;
|
|
|
|
|
( (FormWindow*)w )->mainContainer()->update();
|
|
|
|
|
}
|
|
|
|
@ -2865,48 +2865,48 @@ void MainWindow::showDialogHelp()
|
|
|
|
|
|
|
|
|
|
TQString link = documentationPath() + "/designer-manual-13.html#";
|
|
|
|
|
|
|
|
|
|
if ( ::qt_cast<NewFormBase*>(w) || ::qt_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 ( ::qt_cast<CreateTemplate*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<CreateTemplate*>(w) )
|
|
|
|
|
link += "dialog-file-create-template";
|
|
|
|
|
else if ( ::qt_cast<EditFunctionsBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<EditFunctionsBase*>(w) )
|
|
|
|
|
link += "dialog-edit-functions";
|
|
|
|
|
// else if ( ::qt_cast<ConnectionViewerBase*>(w) )
|
|
|
|
|
// else if ( ::tqt_cast<ConnectionViewerBase*>(w) )
|
|
|
|
|
else if ( w->inherits("ConnectionViewerBase") )
|
|
|
|
|
link += "dialog-view-connections";
|
|
|
|
|
else if ( ::qt_cast<FormSettingsBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<FormSettingsBase*>(w) )
|
|
|
|
|
link += "dialog-edit-form-settings";
|
|
|
|
|
else if ( ::qt_cast<Preferences*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<Preferences*>(w) )
|
|
|
|
|
link += "dialog-edit-preferences";
|
|
|
|
|
else if ( ::qt_cast<PixmapCollectionEditor*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<PixmapCollectionEditor*>(w) )
|
|
|
|
|
link += "dialog-image-collection";
|
|
|
|
|
// else if ( ::qt_cast<DatabaseConnectionBase*>(w) )
|
|
|
|
|
// else if ( ::tqt_cast<DatabaseConnectionBase*>(w) )
|
|
|
|
|
else if ( w->inherits( "DatabaseConnectionBase" ) )
|
|
|
|
|
link += "dialog-edit-database-connections";
|
|
|
|
|
else if ( ::qt_cast<ProjectSettingsBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<ProjectSettingsBase*>(w) )
|
|
|
|
|
link += "dialog-project-settings";
|
|
|
|
|
else if ( ::qt_cast<FindDialog*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<FindDialog*>(w) )
|
|
|
|
|
link += "dialog-find-text";
|
|
|
|
|
else if ( ::qt_cast<ReplaceDialog*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<ReplaceDialog*>(w) )
|
|
|
|
|
link += "dialog-replace-text";
|
|
|
|
|
else if ( ::qt_cast<GotoLineDialog*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<GotoLineDialog*>(w) )
|
|
|
|
|
link += "dialog-go-to-line";
|
|
|
|
|
// else if ( ::qt_cast<ConnectionEditorBase*>(w) )
|
|
|
|
|
// else if ( ::tqt_cast<ConnectionEditorBase*>(w) )
|
|
|
|
|
else if ( w->inherits("ConnectionEditorBase") )
|
|
|
|
|
link += "dialog-edit-connections";
|
|
|
|
|
else if ( ::qt_cast<CustomWidgetEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<CustomWidgetEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-custom-widgets";
|
|
|
|
|
else if ( ::qt_cast<PaletteEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<PaletteEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-palette";
|
|
|
|
|
else if ( ::qt_cast<ListBoxEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<ListBoxEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-listbox";
|
|
|
|
|
else if ( ::qt_cast<ListViewEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<ListViewEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-listview";
|
|
|
|
|
else if ( ::qt_cast<IconViewEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<IconViewEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-iconview";
|
|
|
|
|
else if ( ::qt_cast<TableEditorBase*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<TableEditorBase*>(w) )
|
|
|
|
|
link += "dialog-edit-table";
|
|
|
|
|
else if ( ::qt_cast<MultiLineEditor*>(w) )
|
|
|
|
|
else if ( ::tqt_cast<MultiLineEditor*>(w) )
|
|
|
|
|
link += "dialog-text";
|
|
|
|
|
|
|
|
|
|
else {
|
|
|
|
@ -3194,10 +3194,10 @@ void MainWindow::setModified( bool b, TQWidget *window )
|
|
|
|
|
{
|
|
|
|
|
TQWidget *w = window;
|
|
|
|
|
while ( w ) {
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) ) {
|
|
|
|
|
( (FormWindow*)w )->modificationChanged( b );
|
|
|
|
|
return;
|
|
|
|
|
} else if ( ::qt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
FormWindow *fw = ( (SourceEditor*)w )->formWindow();
|
|
|
|
|
if ( fw && !fw->isFake() ) {
|
|
|
|
|
//fw->commandHistory()->setModified( b );
|
|
|
|
@ -3232,7 +3232,7 @@ void MainWindow::doFunctionsChanged()
|
|
|
|
|
|
|
|
|
|
void MainWindow::updateFunctionList()
|
|
|
|
|
{
|
|
|
|
|
if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
return;
|
|
|
|
|
SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow();
|
|
|
|
|
se->save();
|
|
|
|
@ -3321,9 +3321,9 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
|
|
|
|
|
FormWindow *fw = 0;
|
|
|
|
|
SourceEditor *se = 0;
|
|
|
|
|
SourceFile *sf = 0;
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) ) {
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) ) {
|
|
|
|
|
fw = (FormWindow*)w;
|
|
|
|
|
} else if ( ::qt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
se = (SourceEditor*)w;
|
|
|
|
|
if ( !se->object() )
|
|
|
|
|
continue;
|
|
|
|
@ -3391,7 +3391,7 @@ void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm )
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( ::qt_cast<SourceFile*>(o) ) {
|
|
|
|
|
if ( ::tqt_cast<SourceFile*>(o) ) {
|
|
|
|
|
for ( TQPtrListIterator<SourceFile> sources = currentProject->sourceFiles();
|
|
|
|
|
sources.current(); ++sources ) {
|
|
|
|
|
SourceFile* f = sources.current();
|
|
|
|
@ -3453,12 +3453,12 @@ TQObject *MainWindow::findRealObject( TQObject *o )
|
|
|
|
|
{
|
|
|
|
|
TQWidgetList windows = qWorkspace()->windowList();
|
|
|
|
|
for ( TQWidget *w = windows.first(); w; w = windows.next() ) {
|
|
|
|
|
if ( ::qt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
|
|
|
|
|
if ( ::tqt_cast<FormWindow*>(w) && TQString( w->name() ) == TQString( o->name() ) )
|
|
|
|
|
return w;
|
|
|
|
|
else if ( ::qt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
|
|
|
|
|
else if ( ::tqt_cast<SourceEditor*>(w) && ( (SourceEditor*)w )->formWindow() &&
|
|
|
|
|
TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) )
|
|
|
|
|
return w;
|
|
|
|
|
else if ( ::qt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
|
|
|
|
|
else if ( ::tqt_cast<SourceFile*>(w) && ( (SourceEditor*)w )->sourceFile() &&
|
|
|
|
|
( (SourceEditor*)w )->sourceFile() == o )
|
|
|
|
|
return o;
|
|
|
|
|
}
|
|
|
|
@ -3479,7 +3479,7 @@ void MainWindow::breakPointsChanged()
|
|
|
|
|
{
|
|
|
|
|
if ( !inDebugMode )
|
|
|
|
|
return;
|
|
|
|
|
if ( !qWorkspace()->activeWindow() || !::qt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
if ( !qWorkspace()->activeWindow() || !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) )
|
|
|
|
|
return;
|
|
|
|
|
SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow();
|
|
|
|
|
if ( !e->object() || !e->project() )
|
|
|
|
@ -3646,13 +3646,13 @@ void MainWindow::setSingleProject( Project *pro )
|
|
|
|
|
while ( wit.current() ) {
|
|
|
|
|
TQWidget *w = wit.current();
|
|
|
|
|
++wit;
|
|
|
|
|
if ( ::qt_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 ( ::qt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
} else if ( ::tqt_cast<SourceEditor*>(w) ) {
|
|
|
|
|
( (SourceEditor*)w )->close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|