summaryrefslogtreecommitdiffstats
path: root/kommander/editor/command.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kommander/editor/command.cpp')
-rw-r--r--kommander/editor/command.cpp90
1 files changed, 45 insertions, 45 deletions
diff --git a/kommander/editor/command.cpp b/kommander/editor/command.cpp
index a549c915..e20ba086 100644
--- a/kommander/editor/command.cpp
+++ b/kommander/editor/command.cpp
@@ -806,7 +806,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, const TQString &label )
: Command( n, fw ), tabWidget( tw ), tabLabel( label )
{
- tabPage = new TQDesignerWidget( formWindow(), tabWidget, "tab" );
+ tabPage = new QDesignerWidget( formWindow(), tabWidget, "tab" );
tabPage->hide();
index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) );
@@ -815,7 +815,7 @@ AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw,
void AddTabPageCommand::execute()
{
if ( index == -1 )
- index = ( (TQDesignerTabWidget*)tabWidget )->count();
+ index = ( (QDesignerTabWidget*)tabWidget )->count();
tabWidget->insertTab( tabPage, tabLabel, index );
tabWidget->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
@@ -837,7 +837,7 @@ AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw,
TQToolBox *tw, const TQString &_label )
: Command( n, fw ), toolBox( tw ), label( _label )
{
- page = new TQDesignerWidget( formWindow(), toolBox, "tab" );
+ page = new QDesignerWidget( formWindow(), toolBox, "tab" );
page->hide();
index = -1;
MetaDataBase::addEntry( TQT_TQOBJECT(page) );
@@ -873,18 +873,18 @@ MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw,
void MoveTabPageCommand::execute()
{
- ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
- ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
- ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex );
+ ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
void MoveTabPageCommand::unexecute()
{
- ((TQDesignerTabWidget*)tabWidget )->removePage( tabPage );
- ((TQDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
- ((TQDesignerTabWidget*)tabWidget )->showPage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->removePage( tabPage );
+ ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex );
+ ((QDesignerTabWidget*)tabWidget )->showPage( tabPage );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget );
}
@@ -895,8 +895,8 @@ DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw,
TQTabWidget *tw, TQWidget *page )
: Command( n, fw ), tabWidget( tw ), tabPage( page )
{
- tabLabel = ( (TQDesignerTabWidget*)tabWidget )->pageTitle();
- index = ( (TQDesignerTabWidget*)tabWidget )->currentPage();
+ tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle();
+ index = ( (QDesignerTabWidget*)tabWidget )->currentPage();
}
void DeleteTabPageCommand::execute()
@@ -947,7 +947,7 @@ AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw,
TQWizard *w, const TQString &label, int i, bool s )
: Command( n, fw ), wizard( w ), pageLabel( label )
{
- page = new TQDesignerWidget( formWindow(), wizard, "page" );
+ page = new QDesignerWidget( formWindow(), wizard, "page" );
page->hide();
index = i;
show = s;
@@ -960,7 +960,7 @@ void AddWizardPageCommand::execute()
index = wizard->pageCount();
wizard->insertPage( page, pageLabel, index );
if ( show )
- ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
+ ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -996,7 +996,7 @@ void DeleteWizardPageCommand::unexecute()
{
wizard->insertPage( page, pageLabel, index );
if ( show )
- ( (TQDesignerWizard*)wizard )->setCurrentPage( ( (TQDesignerWizard*)wizard )->pageNum( page ) );
+ ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) );
formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) );
formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard );
}
@@ -1576,7 +1576,7 @@ void PopulateTableCommand::unexecute()
// ------------------------------------------------------------
AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw,
- TQAction *a, TQDesignerToolBar *tb, int idx )
+ TQAction *a, QDesignerToolBar *tb, int idx )
: Command( n, fw ), action( a ), toolBar( tb ), index( idx )
{
}
@@ -1585,25 +1585,25 @@ void AddActionToToolBarCommand::execute()
{
action->addTo( toolBar );
- if ( action->inherits( "TQDesignerAction" ) ) {
- TQString s = ( (TQDesignerAction*)action )->widget()->name();
+ if ( action->inherits( "QDesignerAction" ) ) {
+ TQString s = ( (QDesignerAction*)action )->widget()->name();
if ( s.startsWith( "qt_dead_widget_" ) ) {
s.remove( 0, TQString( "qt_dead_widget_" ).length() );
- ( (TQDesignerAction*)action )->widget()->setName( s );
+ ( (QDesignerAction*)action )->widget()->setName( s );
}
}
- if ( action->inherits( "TQDesignerAction" ) ) {
- toolBar->insertAction( ( (TQDesignerAction*)action )->widget(), action );
- ( (TQDesignerAction*)action )->widget()->installEventFilter( toolBar );
- } else if ( action->inherits( "TQDesignerActionGroup" ) ) {
- if ( ( (TQDesignerActionGroup*)action )->usesDropDown() ) {
- toolBar->insertAction( ( (TQDesignerActionGroup*)action )->widget(), action );
- ( (TQDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
+ if ( action->inherits( "QDesignerAction" ) ) {
+ toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action );
+ ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( action->inherits( "QDesignerActionGroup" ) ) {
+ if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) {
+ toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action );
+ ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar );
}
- } else if ( action->inherits( "TQSeparatorAction" ) ) {
- toolBar->insertAction( ( (TQSeparatorAction*)action )->widget(), action );
- ( (TQSeparatorAction*)action )->widget()->installEventFilter( toolBar );
+ } else if ( action->inherits( "QSeparatorAction" ) ) {
+ toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action );
+ ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar );
}
if ( !action->inherits( TQACTIONGROUP_OBJECT_NAME_STRING ) || ( (TQActionGroup*)action )->usesDropDown()) {
if ( index == -1 )
@@ -1623,8 +1623,8 @@ void AddActionToToolBarCommand::execute()
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
// ### fix it for nested actiongroups
- if ( o->inherits( "TQDesignerAction" ) ) {
- TQDesignerAction *ac = (TQDesignerAction*)o;
+ if ( o->inherits( "QDesignerAction" ) ) {
+ QDesignerAction *ac = (QDesignerAction*)o;
toolBar->insertAction( ac->widget(), ac );
ac->widget()->installEventFilter( toolBar );
if ( index == -1 )
@@ -1641,10 +1641,10 @@ void AddActionToToolBarCommand::execute()
void AddActionToToolBarCommand::unexecute()
{
- if ( action->inherits( "TQDesignerAction" ) ) {
- TQString s = ( (TQDesignerAction*)action )->widget()->name();
+ if ( action->inherits( "QDesignerAction" ) ) {
+ TQString s = ( (QDesignerAction*)action )->widget()->name();
s.prepend( "qt_dead_widget_" );
- ( (TQDesignerAction*)action )->widget()->setName( s );
+ ( (QDesignerAction*)action )->widget()->setName( s );
}
toolBar->removeAction( action );
@@ -1661,7 +1661,7 @@ void AddActionToToolBarCommand::unexecute()
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- if ( o->inherits( "TQDesignerAction" ) ) {
+ if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( toolBar );
toolBar->removeAction( (TQAction*)o );
}
@@ -1673,7 +1673,7 @@ void AddActionToToolBarCommand::unexecute()
// ------------------------------------------------------------
AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, FormWindow *fw,
- TQAction *a, TQDesignerPopupMenu *p, int idx )
+ TQAction *a, QDesignerPopupMenu *p, int idx )
: Command( n, fw ), action( a ), popup( p ), index( idx )
{
}
@@ -1695,7 +1695,7 @@ void AddActionToPopupCommand::execute()
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- TQDesignerAction *ac = (TQDesignerAction*)o;
+ QDesignerAction *ac = (QDesignerAction*)o;
popup->insertAction( index + (i++), ac );
}
}
@@ -1703,7 +1703,7 @@ void AddActionToPopupCommand::execute()
popup->reInsert();
TQObject::connect( action, TQT_SIGNAL( destroyed() ), popup, TQT_SLOT( actionRemoved() ) );
} else {
- if ( !action->inherits( "TQDesignerAction" ) || ( (TQDesignerAction*)action )->supportsMenu() ) {
+ if ( !action->inherits( "QDesignerAction" ) || ( (QDesignerAction*)action )->supportsMenu() ) {
action->addTo( popup );
popup->insertAction( index, action );
popup->reInsert();
@@ -1728,7 +1728,7 @@ void AddActionToPopupCommand::unexecute()
++it;
if ( !o->inherits( TQACTION_OBJECT_NAME_STRING ) )
continue;
- if ( o->inherits( "TQDesignerAction" ) ) {
+ if ( o->inherits( "QDesignerAction" ) ) {
o->removeEventFilter( popup );
popup->removeAction( (TQAction*)o );
}
@@ -1748,15 +1748,15 @@ void AddMenuCommand::execute()
{
if ( !popup ) {
TQString n = "PopupMenu";
- popup = new TQDesignerPopupMenu( mainWindow );
+ popup = new QDesignerPopupMenu( mainWindow );
formWindow()->unify( TQT_TQOBJECT(popup), n, true );
popup->setName( n );
}
if ( !mainWindow->child( 0, TQMENUBAR_OBJECT_NAME_STRING ) ) {
- menuBar = new TQDesignerMenuBar( (TQWidget*)mainWindow );
+ menuBar = new QDesignerMenuBar( (TQWidget*)mainWindow );
menuBar->setName( "menubar" );
} else {
- menuBar = (TQDesignerMenuBar*)mainWindow->menuBar();
+ menuBar = (QDesignerMenuBar*)mainWindow->menuBar();
}
if ( id == -1 )
id = mainWindow->menuBar()->insertItem( name, popup );
@@ -1775,7 +1775,7 @@ void AddMenuCommand::unexecute()
// ------------------------------------------------------------
-RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
+RenameMenuCommand::RenameMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
int i, const TQString &on, const TQString &nn )
: Command( n, fw ), menuBar( mb ), id( i ), oldName( on ), newName( nn )
{
@@ -1795,8 +1795,8 @@ void RenameMenuCommand::unexecute()
// ------------------------------------------------------------
-MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, TQDesignerMenuBar *mb,
- TQDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt )
+MoveMenuCommand::MoveMenuCommand( const TQString &n, FormWindow *fw, QDesignerMenuBar *mb,
+ QDesignerPopupMenu *p, int fidx, int tidx, const TQString &txt )
: Command( n, fw ), menuBar( mb ), popup( p ), fromIdx( fidx ), toIdx( tidx ), text( txt )
{
}
@@ -1825,7 +1825,7 @@ AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainW
void AddToolBarCommand::execute()
{
if ( !toolBar ) {
- toolBar = new TQDesignerToolBar( mainWindow );
+ toolBar = new QDesignerToolBar( mainWindow );
TQString n = "Toolbar";
formWindow()->unify( TQT_TQOBJECT(toolBar), n, true );
toolBar->setName( n );