|
|
@ -850,7 +850,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQTabWidget *tw, const TQString &label )
|
|
|
|
TQTabWidget *tw, const TQString &label )
|
|
|
|
: Command( n, fw ), tabWidget( tw ), tabLabel( label )
|
|
|
|
: Command( n, fw ), tabWidget( tw ), tabLabel( label )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tabPage = new TQDesignerWidget( formWindow(), tabWidget, "TabPage" );
|
|
|
|
tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" );
|
|
|
|
tabPage->hide();
|
|
|
|
tabPage->hide();
|
|
|
|
index = -1;
|
|
|
|
index = -1;
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
|
|
|
@ -859,7 +859,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
void AddTabPageCommand::execute()
|
|
|
|
void AddTabPageCommand::execute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( index == -1 )
|
|
|
|
if ( index == -1 )
|
|
|
|
index = ( (TQDesignerTabWidget*)tabWidget )->count();
|
|
|
|
index = ( (QDesignerTabWidget*)tabWidget )->count();
|
|
|
|
tabWidget->insertTab( tabPage, tabLabel, index );
|
|
|
|
tabWidget->insertTab( tabPage, tabLabel, index );
|
|
|
|
tabWidget->showPage( tabPage );
|
|
|
|
tabWidget->showPage( tabPage );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
@ -886,18 +886,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
|
|
|
|
|
|
|
|
void MoveTabPageCommand::execute()
|
|
|
|
void MoveTabPageCommand::execute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MoveTabPageCommand::unexecute()
|
|
|
|
void MoveTabPageCommand::unexecute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
|
|
|
|
((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
|
|
|
|
((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -908,8 +908,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQTabWidget *tw, TQWidget *page )
|
|
|
|
TQTabWidget *tw, TQWidget *page )
|
|
|
|
: Command( n, fw ), tabWidget( tw ), tabPage( page )
|
|
|
|
: Command( n, fw ), tabWidget( tw ), tabPage( page )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle();
|
|
|
|
tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
|
|
|
|
index = ( (TQDesignerTabWidget*)tabWidget )->currentPage();
|
|
|
|
index = ( (QDesignerTabWidget*)tabWidget )->currentPage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void DeleteTabPageCommand::execute()
|
|
|
|
void DeleteTabPageCommand::execute()
|
|
|
@ -931,10 +931,10 @@ void DeleteTabPageCommand::unexecute()
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
// ------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQDesignerWidgetStack *ws )
|
|
|
|
QDesignerWidgetStack *ws )
|
|
|
|
: Command( n, fw ), widgetStack( ws )
|
|
|
|
: Command( n, fw ), widgetStack( ws )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
stackPage = new TQDesignerWidget( formWindow(), widgetStack, "WStackPage" );
|
|
|
|
stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" );
|
|
|
|
stackPage->hide();
|
|
|
|
stackPage->hide();
|
|
|
|
index = -1;
|
|
|
|
index = -1;
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) );
|
|
|
@ -956,7 +956,7 @@ void AddWidgetStackPageCommand::unexecute()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQDesignerWidgetStack *ws, TQWidget *page )
|
|
|
|
QDesignerWidgetStack *ws, TQWidget *page )
|
|
|
|
: Command( n, fw), widgetStack( ws ), stackPage( page )
|
|
|
|
: Command( n, fw), widgetStack( ws ), stackPage( page )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
index = -1;
|
|
|
|
index = -1;
|
|
|
@ -984,7 +984,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQWizard *w, const TQString &label, int i, bool s )
|
|
|
|
TQWizard *w, const TQString &label, int i, bool s )
|
|
|
|
: Command( n, fw ), wizard( w ), pageLabel( label )
|
|
|
|
: Command( n, fw ), wizard( w ), pageLabel( label )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
page = new TQDesignerWidget( formWindow(), wizard, "WizardPage" );
|
|
|
|
page = new QDesignerWidget( formWindow(), wizard, "WizardPage" );
|
|
|
|
page->hide();
|
|
|
|
page->hide();
|
|
|
|
index = i;
|
|
|
|
index = i;
|
|
|
|
show = s;
|
|
|
|
show = s;
|
|
|
@ -997,7 +997,7 @@ void AddWizardPageCommand::execute()
|
|
|
|
index = wizard->pageCount();
|
|
|
|
index = wizard->pageCount();
|
|
|
|
wizard->insertPage( page, pageLabel, index );
|
|
|
|
wizard->insertPage( page, pageLabel, index );
|
|
|
|
if ( show )
|
|
|
|
if ( show )
|
|
|
|
( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
|
|
|
|
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1033,7 +1033,7 @@ void DeleteWizardPageCommand::unexecute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
wizard->insertPage( page, pageLabel, index );
|
|
|
|
wizard->insertPage( page, pageLabel, index );
|
|
|
|
if ( show )
|
|
|
|
if ( show )
|
|
|
|
( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
|
|
|
|
( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
|
|
|
|
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1857,18 +1857,18 @@ void AddActionToToolBarCommand::execute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
action->addTo( toolBar );
|
|
|
|
action->addTo( toolBar );
|
|
|
|
|
|
|
|
|
|
|
|
if ( ::tqqt_cast<TQDesignerAction*>(action) ) {
|
|
|
|
if ( ::tqqt_cast<QDesignerAction*>(action) ) {
|
|
|
|
TQString s = ( (TQDesignerAction*)action )->widget()->name();
|
|
|
|
TQString s = ( (QDesignerAction*)action )->widget()->name();
|
|
|
|
if ( s.startsWith( "qt_dead_widget_" ) ) {
|
|
|
|
if ( s.startsWith( "qt_dead_widget_" ) ) {
|
|
|
|
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
|
|
|
|
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
|
|
|
|
( (TQDesignerAction*)action )->widget()->setName( s );
|
|
|
|
( (QDesignerAction*)action )->widget()->setName( s );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action );
|
|
|
|
toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
|
|
|
|
( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar );
|
|
|
|
( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
|
|
|
|
} else if ( ::tqqt_cast<TQDesignerActionGroup*>(action) ) {
|
|
|
|
} else if ( ::tqqt_cast<QDesignerActionGroup*>(action) ) {
|
|
|
|
if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) {
|
|
|
|
if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
|
|
|
|
toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action );
|
|
|
|
toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
|
|
|
|
( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
|
|
|
|
( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
|
|
|
|
} else if ( ::tqqt_cast<QSeparatorAction*>(action) ) {
|
|
|
|
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
|
|
|
|
toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
|
|
|
@ -1892,8 +1892,8 @@ void AddActionToToolBarCommand::execute()
|
|
|
|
if ( !::tqqt_cast<TQAction*>(o) )
|
|
|
|
if ( !::tqqt_cast<TQAction*>(o) )
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
// ### fix it for nested actiongroups
|
|
|
|
// ### fix it for nested actiongroups
|
|
|
|
if ( ::tqqt_cast<TQDesignerAction*>(o) ) {
|
|
|
|
if ( ::tqqt_cast<QDesignerAction*>(o) ) {
|
|
|
|
TQDesignerAction *ac = (TQDesignerAction*)o;
|
|
|
|
QDesignerAction *ac = (QDesignerAction*)o;
|
|
|
|
toolBar->insertAction( ac->widget(), ac );
|
|
|
|
toolBar->insertAction( ac->widget(), ac );
|
|
|
|
ac->widget()->installEventFilter( toolBar );
|
|
|
|
ac->widget()->installEventFilter( toolBar );
|
|
|
|
if ( index == -1 )
|
|
|
|
if ( index == -1 )
|
|
|
@ -1912,10 +1912,10 @@ void AddActionToToolBarCommand::execute()
|
|
|
|
|
|
|
|
|
|
|
|
void AddActionToToolBarCommand::unexecute()
|
|
|
|
void AddActionToToolBarCommand::unexecute()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if ( ::tqqt_cast<TQDesignerAction*>(action) ) {
|
|
|
|
if ( ::tqqt_cast<QDesignerAction*>(action) ) {
|
|
|
|
TQString s = ( (TQDesignerAction*)action )->widget()->name();
|
|
|
|
TQString s = ( (QDesignerAction*)action )->widget()->name();
|
|
|
|
s.prepend( "qt_dead_widget_" );
|
|
|
|
s.prepend( "qt_dead_widget_" );
|
|
|
|
( (TQDesignerAction*)action )->widget()->setName( s );
|
|
|
|
( (QDesignerAction*)action )->widget()->setName( s );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
toolBar->removeAction( action );
|
|
|
|
toolBar->removeAction( action );
|
|
|
@ -1932,7 +1932,7 @@ void AddActionToToolBarCommand::unexecute()
|
|
|
|
++it;
|
|
|
|
++it;
|
|
|
|
if ( !::tqqt_cast<TQAction*>(o) )
|
|
|
|
if ( !::tqqt_cast<TQAction*>(o) )
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
if ( ::tqqt_cast<TQDesignerAction*>(o) ) {
|
|
|
|
if ( ::tqqt_cast<QDesignerAction*>(o) ) {
|
|
|
|
o->removeEventFilter( toolBar );
|
|
|
|
o->removeEventFilter( toolBar );
|
|
|
|
toolBar->removeAction( (TQAction*)o );
|
|
|
|
toolBar->removeAction( (TQAction*)o );
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -2426,7 +2426,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
|
|
|
|
TQToolBox *tw, const TQString &label )
|
|
|
|
TQToolBox *tw, const TQString &label )
|
|
|
|
: Command( n, fw ), toolBox( tw ), toolBoxLabel( label )
|
|
|
|
: Command( n, fw ), toolBox( tw ), toolBoxLabel( label )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
toolBoxPage = new TQDesignerWidget( formWindow(), toolBox, "page" );
|
|
|
|
toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" );
|
|
|
|
toolBoxPage->hide();
|
|
|
|
toolBoxPage->hide();
|
|
|
|
index = -1;
|
|
|
|
index = -1;
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );
|
|
|
|
MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) );
|
|
|
|