diff options
Diffstat (limited to 'kdevdesigner/designer/mainwindowactions.cpp')
-rw-r--r-- | kdevdesigner/designer/mainwindowactions.cpp | 579 |
1 files changed, 283 insertions, 296 deletions
diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp index 7917de8b..7e4f92e0 100644 --- a/kdevdesigner/designer/mainwindowactions.cpp +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name ) void MainWindow::setupEditActions() { - actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); + actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, this, 0 ); actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); - actionEditUndo->setEnabled( FALSE ); + connect( actionEditUndo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editUndo() ) ); + actionEditUndo->setEnabled( false ); - actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); + actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, this, 0 ); actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); - actionEditRedo->setEnabled( FALSE ); + connect( actionEditRedo, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRedo() ) ); + actionEditRedo->setEnabled( false ); - actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); + actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, this, 0 ); actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); - actionEditCut->setEnabled( FALSE ); + connect( actionEditCut, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCut() ) ); + actionEditCut->setEnabled( false ); - actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); + actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, this, 0 ); actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); - actionEditCopy->setEnabled( FALSE ); + connect( actionEditCopy, TQ_SIGNAL( activated() ), this, TQ_SLOT( editCopy() ) ); + actionEditCopy->setEnabled( false ); - actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); + actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, this, 0 ); actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); - actionEditPaste->setEnabled( FALSE ); + connect( actionEditPaste, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPaste() ) ); + actionEditPaste->setEnabled( false ); - actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, this, 0 ); actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); - actionEditDelete->setEnabled( FALSE ); + connect( actionEditDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); + actionEditDelete->setEnabled( false ); #ifdef TQ_WS_MAC - TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); - connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, this, 0 ); + connect( macDelete, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDelete() ) ); #endif - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, this, 0 ); actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); - actionEditSelectAll->setEnabled( TRUE ); + connect( actionEditSelectAll, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSelectAll() ) ); + actionEditSelectAll->setEnabled( true ); - actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, this, 0 ); actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); - actionEditRaise->setEnabled( FALSE ); + connect( actionEditRaise, TQ_SIGNAL( activated() ), this, TQ_SLOT( editRaise() ) ); + actionEditRaise->setEnabled( false ); - actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, this, 0 ); actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); - actionEditLower->setEnabled( FALSE ); + connect( actionEditLower, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLower() ) ); + actionEditLower->setEnabled( false ); actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), - i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); + i18n( "Chec&k Accelerators" ), ALT + Key_R, this, 0 ); actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditAccels, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAccels() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQ_SLOT( setEnabled(bool) ) ); actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), - i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "S&lots..." ), 0, this, 0 ); actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditFunctions, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFunctions() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQ_SLOT( setEnabled(bool) ) ); actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), - i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Co&nnections..." ), 0, this, 0 ); actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editConnections() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQ_SLOT( setEnabled(bool) ) ); actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), - i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); + i18n( "&Source..." ), CTRL + Key_E, this, 0 ); actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditSource, TQ_SIGNAL( activated() ), this, TQ_SLOT( editSource() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQ_SLOT( setEnabled(bool) ) ); actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), - i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Form Settings..." ), 0, this, 0 ); actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditFormSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editFormSettings() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), - i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Preferences..." ), 0, this, 0 ); actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); + connect( actionEditPreferences, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPreferences() ) ); /* TQToolBar *tb = new TQToolBar( this, "Edit" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -240,7 +240,7 @@ void MainWindow::setupEditActions() #endif TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); - connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); + connect( menu, TQ_SIGNAL( aboutToShow() ), this, TQ_SLOT( updateEditorUndoRedo() ) ); menubar->insertItem( i18n( "&Edit" ), menu ); actionEditUndo->addTo( menu ); actionEditRedo->addTo( menu ); @@ -269,27 +269,27 @@ void MainWindow::setupEditActions() void MainWindow::setupSearchActions() { actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), - i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); - connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); - actionSearchFind->setEnabled( FALSE ); + i18n( "&Find..." ), CTRL + Key_F, this, 0 ); + connect( actionSearchFind, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchFind() ) ); + actionSearchFind->setEnabled( false ); actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), - i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); - connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); - actionSearchIncremetal->setEnabled( FALSE ); + i18n( "Find &Incremental" ), ALT + Key_I, this, 0 ); + connect( actionSearchIncremetal, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchIncremetalFindMenu() ) ); + actionSearchIncremetal->setEnabled( false ); actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), - i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); - connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); - actionSearchReplace->setEnabled( FALSE ); + i18n( "&Replace..." ), CTRL + Key_R, this, 0 ); + connect( actionSearchReplace, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchReplace() ) ); + actionSearchReplace->setEnabled( false ); actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), - i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); - connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); - actionSearchGotoLine->setEnabled( FALSE ); + i18n( "&Goto Line..." ), ALT + Key_G, this, 0 ); + connect( actionSearchGotoLine, TQ_SIGNAL( activated() ), this, TQ_SLOT( searchGotoLine() ) ); + actionSearchGotoLine->setEnabled( false ); actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); /* TQToolBar *tb = new TQToolBar( this, "Search" ); @@ -300,11 +300,11 @@ void MainWindow::setupSearchActions() incrementalSearch = new TQLineEdit( 0 ); incrementalSearch->hide(); TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); - connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( searchIncremetalFind() ) ); - connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( searchIncremetalFindNext() ) ); - incrementalSearch->setEnabled( FALSE ); + connect( incrementalSearch, TQ_SIGNAL( textChanged( const TQString & ) ), + this, TQ_SLOT( searchIncremetalFind() ) ); + connect( incrementalSearch, TQ_SIGNAL( returnPressed() ), + this, TQ_SLOT( searchIncremetalFindNext() ) ); + incrementalSearch->setEnabled( false ); TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); menubar->insertItem( i18n( "&Search" ), menu ); @@ -319,62 +319,62 @@ void MainWindow::setupLayoutActions() { if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); + actionGroupTools->setExclusive( true ); + connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), this, TQ_SLOT( toolSelected(TQAction*) ) ); } actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), - i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); + i18n( "Adjust &Size" ), CTRL + Key_J, this, 0 ); actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); - actionEditAdjustSize->setEnabled( FALSE ); + connect( actionEditAdjustSize, TQ_SIGNAL( activated() ), this, TQ_SLOT( editAdjustSize() ) ); + actionEditAdjustSize->setEnabled( false ); actionEditHLayout = new DesignerAction( i18n( "Lay Out Horizontally" ), createIconSet("designer_edithlayout.png"), - i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Horizontally" ), CTRL + Key_H, this, 0 ); actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally" ) ); - connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); - actionEditHLayout->setEnabled( FALSE ); + connect( actionEditHLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontal() ) ); + actionEditHLayout->setEnabled( false ); actionEditVLayout = new DesignerAction( i18n( "Lay Out Vertically" ), createIconSet("designer_editvlayout.png"), - i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out &Vertically" ), CTRL + Key_L, this, 0 ); actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically" ) ); - connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); - actionEditVLayout->setEnabled( FALSE ); + connect( actionEditVLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVertical() ) ); + actionEditVLayout->setEnabled( false ); actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), - i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out in a &Grid" ), CTRL + Key_G, this, 0 ); actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); - actionEditGridLayout->setEnabled( FALSE ); + connect( actionEditGridLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutGrid() ) ); + actionEditGridLayout->setEnabled( false ); actionEditSplitHorizontal = new DesignerAction( i18n( "Lay Out Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), - i18n( "Lay Out Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Horizontally (in S&plitter)" ), 0, this, 0 ); actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay Out Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); - actionEditSplitHorizontal->setEnabled( FALSE ); + connect( actionEditSplitHorizontal, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutHorizontalSplit() ) ); + actionEditSplitHorizontal->setEnabled( false ); actionEditSplitVertical = new DesignerAction( i18n( "Lay Out Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), - i18n( "Lay Out Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "Lay Out Vertically (in Sp&litter)" ), 0, this, 0 ); actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay Out Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); - actionEditSplitVertical->setEnabled( FALSE ); + connect( actionEditSplitVertical, TQ_SIGNAL( activated() ), this, TQ_SLOT( editLayoutVerticalSplit() ) ); + actionEditSplitVertical->setEnabled( false ); actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), - i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); + i18n( "&Break Layout" ), CTRL + Key_B, this, 0 ); actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); - actionEditBreakLayout->setEnabled( FALSE ); + connect( actionEditBreakLayout, TQ_SIGNAL( activated() ), this, TQ_SLOT( editBreakLayout() ) ); + actionEditBreakLayout->setEnabled( false ); int id = WidgetDatabase::idFromClassName( "Spacer" ); actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); - actionInsertSpacer->setToggleAction( TRUE ); + actionInsertSpacer->setToggleAction( true ); actionInsertSpacer->setText( WidgetDatabase::className( id ) ); actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); @@ -423,15 +423,15 @@ void MainWindow::setupToolActions() { if ( !actionGroupTools ) { actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), - this, TQT_SLOT( toolSelected(TQAction*) ) ); + actionGroupTools->setExclusive( true ); + connect( actionGroupTools, TQ_SIGNAL( selected(TQAction*) ), + this, TQ_SLOT( toolSelected(TQAction*) ) ); } actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), i18n("&Pointer"), Key_F2, actionGroupTools, - TQString::number(POINTER_TOOL).latin1(), TRUE ); + TQString::number(POINTER_TOOL).latin1(), true ); actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); @@ -440,21 +440,21 @@ void MainWindow::setupToolActions() i18n("&Connect Signal/Slots"), singleProjectMode() ? 0 : Key_F3, actionGroupTools, - TQString::number(CONNECT_TOOL).latin1(), TRUE ); + TQString::number(CONNECT_TOOL).latin1(), true ); actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), i18n("Tab &Order"), Key_F4, actionGroupTools, - TQString::number(ORDER_TOOL).latin1(), TRUE ); + TQString::number(ORDER_TOOL).latin1(), true ); actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), i18n( "Set &Buddy" ), Key_F12, actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), - TRUE ); + true ); actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); @@ -463,7 +463,7 @@ void MainWindow::setupToolActions() toolsToolBar = tb; TQWhatsThis::add( tb, i18n( "<b>The Tools toolbar</b>%1" ).arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); + addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, false ); actionPointerTool->addTo( tb ); if ( !singleProjectMode() ) actionConnectTool->addTo( tb ); @@ -487,13 +487,13 @@ void MainWindow::setupToolActions() actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), createIconSet( "designer_customwidget.png" ), - i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); + i18n("Edit &Custom Widgets..."), 0, this, 0 ); actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " "custom widgets") ); actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" "Widgets" ) ); - connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), - this, TQT_SLOT( toolsCustomWidget() ) ); + connect( actionToolsCustomWidget, TQ_SIGNAL( activated() ), + this, TQ_SLOT( toolsCustomWidget() ) ); for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { TQString grp = WidgetDatabase::widgetGroup( j ); @@ -518,9 +518,9 @@ void MainWindow::setupToolActions() TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); mmenu->insertItem( grp, menu ); - TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); + TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, false, grp.latin1() ); tb2->setFrameStyle( TQFrame::NoFrame ); - tb2->setOrientation( Qt::Vertical ); + tb2->setOrientation( TQt::Vertical ); tb2->setBackgroundMode( PaletteBase ); toolBox->addItem( tb2, grp ); @@ -538,7 +538,7 @@ void MainWindow::setupToolActions() continue; // only widgets, i.e. not forms and temp stuff WidgetAction* a = new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); - a->setToggleAction( TRUE ); + a->setToggleAction( true ); TQString atext = WidgetDatabase::className( i ); if ( atext[0] == 'Q' ) atext = atext.mid(1); @@ -594,18 +594,18 @@ void MainWindow::setupToolActions() actionToolsCustomWidget->addTo( customWidgetMenu ); customWidgetMenu->insertSeparator(); TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, - toolBox, FALSE, "Custom Widgets" ); + toolBox, false, "Custom Widgets" ); tb2->setBackgroundMode(PaletteBase); - tb2->setOrientation( Qt::Vertical ); + tb2->setOrientation( TQt::Vertical ); tb2->setFrameStyle( TQFrame::NoFrame ); toolBox->addItem( tb2, "Custom Widgets" ); customWidgetToolBar2 = tb2; } - TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, this ); a->setStatusTip( i18n( "Opens a dialog to configure the common " "widgets page of the toolbox") ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( toolsConfigure() ) ); mmenu->insertSeparator(); a->addTo( mmenu ); resetTool(); @@ -625,7 +625,7 @@ void MainWindow::setupFileActions() DesignerAction *a = 0; if ( !singleProject ) { - DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + DesignerAction *a = new DesignerAction( this, 0 ); a->setText( i18n( "New" ) ); a->setToolTip( i18n( "New dialog or file" ) ); a->setMenuText( i18n( "&New..." ) ); @@ -633,14 +633,14 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_N ); a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNew() ) ); a->addTo( tb ); a->addTo( fileMenu ); actionNewFile = a; } else { - actionGroupNew = new TQActionGroup( this, 0, FALSE ); + actionGroupNew = new TQActionGroup( this, 0, false ); TQActionGroup* a = actionGroupNew; - ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); + ( (TQActionGroup*)a )->setUsesDropDown( true ); a->setText( i18n( "New" ) ); a->setMenuText( i18n( "&New..." ) ); a->setIconSet( createIconSet("designer_form.png") ); @@ -653,15 +653,15 @@ void MainWindow::setupFileActions() newForm->setIconSet( createIconSet("designer_form.png") ); newForm->setAccel( CTRL + Key_N ); newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); + connect( newForm, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewDialog() ) ); - DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); + DesignerAction *newFile = new DesignerAction( a, 0 ); newFile->setText( i18n( "New File" ) ); newFile->setMenuText( i18n( "&File..." ) ); newFile->setIconSet( createIconSet("designer_filenew.png") ); newFile->setAccel( ALT + Key_N ); newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); + connect( newFile, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileNewFile() ) ); actionNewFile = newFile; a->addTo( tb ); @@ -670,14 +670,14 @@ void MainWindow::setupFileActions() fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Open" ) ); a->setMenuText( i18n( "&Open..." ) ); a->setIconSet( createIconSet("designer_fileopen.png") ); a->setAccel( CTRL + Key_O ); a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileOpen() ) ); if ( !singleProject ) { a->addTo( tb ); a->addTo( fileMenu ); @@ -685,20 +685,20 @@ void MainWindow::setupFileActions() } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileClose = a; a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); a->setStatusTip( i18n( "Closes the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileClose() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSave = a; a->setText( i18n( "Save" ) ); a->setMenuText( i18n( "&Save" ) ); @@ -706,41 +706,41 @@ void MainWindow::setupFileActions() a->setAccel( CTRL + Key_S ); a->setStatusTip( i18n( "Saves the current project or document" ) ); a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSave() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( tb ); a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAs = a; a->setText( i18n( "Save As" ) ); a->setMenuText( i18n( "Save &As..." ) ); a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAs() ) ); + connect( this, TQ_SIGNAL( hasActiveWindow(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( fileMenu ); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileSaveAll = a; a->setText( i18n( "Save All" ) ); a->setMenuText( i18n( "Sa&ve All" ) ); a->setStatusTip( i18n( "Saves all open documents" ) ); a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileSaveAll() ) ); + connect( this, TQ_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) { a->addTo( fileMenu ); fileMenu->insertSeparator(); } - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); a->setText( i18n( "Create Template" ) ); a->setMenuText( i18n( "Create &Template..." ) ); a->setStatusTip( i18n( "Creates a new template" ) ); a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileCreateTemplate() ) ); if ( !singleProject ) a->addTo( fileMenu ); @@ -755,19 +755,19 @@ void MainWindow::setupFileActions() fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); } - connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyFilesMenu() ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); - connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); + connect( recentlyFilesMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupRecentlyFilesMenu() ) ); + connect( recentlyProjectsMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupRecentlyProjectsMenu() ) ); + connect( recentlyFilesMenu, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( recentlyFilesMenuActivated( int ) ) ); + connect( recentlyProjectsMenu, TQ_SIGNAL( activated( int ) ), + this, TQ_SLOT( recentlyProjectsMenuActivated( int ) ) ); if ( !singleProject ) fileMenu->insertSeparator(); - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( this, 0 ); actionFileExit = a; if ( !singleProjectMode() ) { a->setText( i18n( "Exit" ) ); @@ -778,7 +778,7 @@ void MainWindow::setupFileActions() a->setText( i18n( "Close" ) ); a->setMenuText( i18n( "&Close" ) ); } - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( fileQuit() ) ); a->addTo( fileMenu ); } @@ -790,14 +790,14 @@ void MainWindow::setupProjectActions() TQActionGroup *ag = new TQActionGroup( this, 0 ); ag->setText( i18n( "Active Project" ) ); ag->setMenuText( i18n( "Active Project" ) ); - ag->setExclusive( TRUE ); - ag->setUsesDropDown( TRUE ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); - DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, TRUE ); - eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, TRUE ); + ag->setExclusive( true ); + ag->setUsesDropDown( true ); + connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQ_SIGNAL( selected( TQAction * ) ), this, TQ_SIGNAL( projectChanged() ) ); + DesignerAction *a = new DesignerAction( i18n( "<No Project>" ), i18n( "<No Project>" ), 0, ag, 0, true ); + eProject = new Project( "", i18n( "<No Project>" ), projectSettingsPluginManager, true ); projects.insert( a, eProject ); - a->setOn( TRUE ); + a->setOn( true ); ag->addTo( projectMenu ); ag->addTo( projectToolBar ); actionGroupProjects = ag; @@ -805,44 +805,44 @@ void MainWindow::setupProjectActions() if ( !singleProject ) projectMenu->insertSeparator(); - a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, this, 0 ); actionProjectAddFile = a; a->setStatusTip( i18n("Adds a file to the current project") ); a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); - a->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( projectInsertFile() ) ); + a->setEnabled( false ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) a->addTo( projectMenu ); actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), - i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Image Collection..." ), 0, this, 0 ); actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); - actionEditPixmapCollection->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditPixmapCollection, TQ_SIGNAL( activated() ), this, TQ_SLOT( editPixmapCollection() ) ); + actionEditPixmapCollection->setEnabled( false ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQ_SLOT( setEnabled(bool) ) ); actionEditPixmapCollection->addTo( projectMenu ); #ifndef TQT_NO_SQL actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), - i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Database Connections..." ), 0, this, 0 ); actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); - //actionEditDatabaseConnections->setEnabled( FALSE ); - //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditDatabaseConnections, TQ_SIGNAL( activated() ), this, TQ_SLOT( editDatabaseConnections() ) ); + //actionEditDatabaseConnections->setEnabled( false ); + //connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQ_SLOT( setEnabled(bool) ) ); if ( !singleProject ) actionEditDatabaseConnections->addTo( projectMenu ); #endif actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), - i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "&Project Settings..." ), 0, this, 0 ); actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); - actionEditProjectSettings->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); + connect( actionEditProjectSettings, TQ_SIGNAL( activated() ), this, TQ_SLOT( editProjectSettings() ) ); + actionEditProjectSettings->setEnabled( false ); + connect( this, TQ_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQ_SLOT( setEnabled(bool) ) ); actionEditProjectSettings->addTo( projectMenu ); } @@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions() layoutMenu = menu; menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, this, 0 ); actionPreview = a; a->setAccel( CTRL + Key_T ); a->setStatusTip( i18n("Opens a preview") ); a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL( activated() ), this, TQ_SLOT( previewForm() ) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( menu ); menu->insertSeparator(); - TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); - connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); + TQSignalMapper *mapper = new TQSignalMapper( this ); + connect( mapper, TQ_SIGNAL(mapped(const TQString&)), this, TQ_SLOT(previewForm(const TQString&)) ); TQStringList styles = TQStyleFactory::keys(); for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { TQString info; @@ -884,59 +884,59 @@ void MainWindow::setupPreviewActions() info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), - i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); + i18n( "... in %1 Style" ).arg( *it ), 0, this, 0 ); a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); a->setWhatsThis( i18n("<b>Open a preview in %1 style.</b>" "<p>Use the preview to test the design and " "signal-slot connections of the current form. %2</p>").arg( *it ).arg( info ) ); mapper->setMapping( a, *it ); - connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + connect( a, TQ_SIGNAL(activated()), mapper, TQ_SLOT(map()) ); + connect( this, TQ_SIGNAL( hasActiveForm(bool) ), a, TQ_SLOT( setEnabled(bool) ) ); a->addTo( menu ); } } void MainWindow::setupWindowActions() { -/* static bool windowActionsSetup = FALSE; +/* static bool windowActionsSetup = false; if ( !windowActionsSetup ) { - windowActionsSetup = TRUE; + windowActionsSetup = true; */ - actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); + actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, this ); actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); - connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); - actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); + connect( actionWindowTile, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( tile() ) ); + actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, this ); actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); - connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); + connect( actionWindowCascade, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( cascade() ) ); - actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); + actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, this ); actionWindowClose->setStatusTip( i18n( "Closes the active window") ); actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); - connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); + connect( actionWindowClose, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeActiveWindow() ) ); - actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); + actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, this ); actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); - connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); + connect( actionWindowCloseAll, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( closeAllWindows() ) ); - actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); + actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, this ); actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); - connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); + connect( actionWindowNext, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activateNextWindow() ) ); - actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); + actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, this ); actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); - connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); + connect( actionWindowPrevious, TQ_SIGNAL( activated() ), qworkspace, TQ_SLOT( activatePreviousWindow() ) ); // } if ( !windowMenu ) { windowMenu = new TQPopupMenu( this, "Window" ); menubar->insertItem( i18n( "&Window" ), windowMenu ); - connect( windowMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupWindowActions() ) ); + connect( windowMenu, TQ_SIGNAL( aboutToShow() ), + this, TQ_SLOT( setupWindowActions() ) ); } else { windowMenu->clear(); } @@ -958,20 +958,20 @@ void MainWindow::setupWindowActions() int j = 0; for ( int i = 0; i < int( windows.count() ); ++i ) { TQWidget *w = windows.at( i ); - if ( !::tqqt_cast<FormWindow*>(w) && !::tqqt_cast<SourceEditor*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) && !::tqt_cast<SourceEditor*>(w) ) continue; - if ( ::tqqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) + if ( ::tqt_cast<FormWindow*>(w) && ( ( (FormWindow*)w )->isFake() ) ) continue; j++; TQString itemText; if ( j < 10 ) itemText = TQString("&%1 ").arg( j ); - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) itemText += w->name(); else itemText += w->caption(); - int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); + int id = windowMenu->insertItem( itemText, this, TQ_SLOT( windowsMenuActivated( int ) ) ); windowMenu->setItemParameter( id, i ); windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); } @@ -979,39 +979,31 @@ void MainWindow::setupWindowActions() void MainWindow::setupHelpActions() { - actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, this, 0 ); actionHelpContents->setStatusTip( i18n("Opens the online help") ); actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); + connect( actionHelpContents, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpContents() ) ); - actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); + actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, this, 0 ); actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); + connect( actionHelpManual, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpManual() ) ); - actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, this, 0 ); actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); + connect( actionHelpAbout, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAbout() ) ); - actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, this, 0 ); actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); - connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); - -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); - actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); - actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); - connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); -#endif + connect( actionHelpAboutTQt, TQ_SIGNAL( activated() ), this, TQ_SLOT( helpAboutTQt() ) ); actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), - i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); + i18n("What's This?"), SHIFT + Key_F1, this, 0 ); actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); + connect( actionHelpWhatsThis, TQ_SIGNAL( activated() ), this, TQ_SLOT( whatsThis() ) ); /* TQToolBar *tb = new TQToolBar( this, "Help" ); tb->setCloseMode( TQDockWindow::Undocked ); @@ -1027,11 +1019,6 @@ void MainWindow::setupHelpActions() menu->insertSeparator(); actionHelpAbout->addTo( menu ); actionHelpAboutTQt->addTo( menu ); -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister->addTo( menu ); -#endif - menu->insertSeparator(); actionHelpWhatsThis->addTo( menu ); } @@ -1051,23 +1038,23 @@ void MainWindow::fileNewDialog() while ( currentProject->findFormFile( n + ".ui" ) ) n = "Dialog" + TQString::number( ++forms ); FormWindow *fw = 0; - FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); + FormFile *ff = new FormFile( n + ".ui", false, currentProject ); fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - ff->setModified( TRUE ); - currentProject->setModified( TRUE ); + ff->setModified( true ); + currentProject->setModified( true ); workspace()->update(); fw->setProject( currentProject ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + MetaDataBase::addEntry( fw ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( "TQDialog" ), fw, n.latin1() ); fw->setMainContainer( w ); fw->setCaption( n ); fw->resize( 600, 480 ); insertFormWindow( fw ); - fw->killAccels( TQT_TQOBJECT(fw) ); - fw->project()->setModified( TRUE ); + fw->killAccels( fw ); + fw->project()->setModified( true ); fw->setFocus(); - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); + fw->setSavePixmapInProject( true ); + fw->setSavePixmapInline( false ); } void MainWindow::fileNewFile() @@ -1077,10 +1064,10 @@ void MainWindow::fileNewFile() return; if ( name.right( 3 ) != ".qs" ) name += ".qs"; - SourceFile *f = new SourceFile( name, FALSE, currentProject ); + SourceFile *f = new SourceFile( name, false, currentProject ); MainWindow::self->editSource( f ); - f->setModified( TRUE ); - currentProject->setModified( TRUE ); + f->setModified( true ); + currentProject->setModified( true ); workspace()->update(); } @@ -1098,9 +1085,9 @@ void MainWindow::fileClose() } else { TQWidget *w = qworkspace->activeWindow(); if ( w ) { - if ( ::tqqt_cast<FormWindow*>(w) ) + if ( ::tqt_cast<FormWindow*>(w) ) ( (FormWindow*)w )->formFile()->close(); - else if ( ::tqqt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) ( (SourceEditor*)w )->close(); } } @@ -1140,26 +1127,26 @@ void MainWindow::fileCloseProject() } 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() ); if ( !( (FormWindow*)w )->formFile()->close() ) return; } - } else if ( ::tqqt_cast<SourceEditor*>(w) ) { + } else if ( ::tqt_cast<SourceEditor*>(w) ) { if ( !( (SourceEditor*)w )->close() ) return; } } hierarchyView->clear(); windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); + qWorkspace()->blockSignals( false ); actionGroupProjects->removeChild( a ); projects.remove( a ); delete a; @@ -1170,23 +1157,23 @@ void MainWindow::fileCloseProject() } if ( !windows.isEmpty() ) { for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast<FormWindow*>(w) ) + if ( !::tqt_cast<FormWindow*>(w) ) continue; w->setFocus(); activeWindowChanged( w ); break; } } else { - emit hasActiveWindow( FALSE ); - emit hasActiveForm( FALSE ); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + emit hasActiveWindow( false ); + emit hasActiveForm( false ); + updateUndoRedo( false, false, TQString(), TQString() ); } } } void MainWindow::fileOpen() // as called by the menu { - fileOpen( "", "", "", FALSE ); + fileOpen( "", "", "", false ); } void MainWindow::projectInsertFile() @@ -1246,24 +1233,24 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co if ( !filename.isEmpty() ) { TQFileInfo fi( filename ); - if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { + if ( fi.extension( false ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { addRecentlyOpened( filename, recentlyProjects ); openProject( filename ); - } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { + } else if ( fi.extension( false ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { if ( !inProject ) setCurrentProject( eProject ); openFormWindow( filename ); addRecentlyOpened( filename, recentlyFiles ); - } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || - additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { + } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( false ) ) != -1 || + additionalSources.find( fi.extension( false ) ) != additionalSources.end() ) { SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); if ( !sf ) - sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); + sf = new SourceFile( project->makeRelative( filename ), false, project ); editSource( sf ); } else if ( extension.isEmpty() ) { TQString filter; for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { - if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { + if ( (*it2).contains( "." + fi.extension( false ), false ) ) { filter = *it2; break; } @@ -1287,7 +1274,7 @@ void MainWindow::fileOpen( const TQString &filter, const TQString &extension, co setCurrentProject( eProject ); addRecentlyOpened( filename, recentlyFiles ); for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - openFormWindow( *it, FALSE ); + openFormWindow( *it, false ); TQFile::remove( *it ); } statusBar()->clear(); @@ -1302,10 +1289,10 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile if ( filename.isEmpty() ) return 0; - bool makeNew = FALSE; + bool makeNew = false; if ( !TQFile::exists( filename ) ) { - makeNew = TRUE; + makeNew = true; } else { TQFile f( filename ); f.open( IO_ReadOnly ); @@ -1331,7 +1318,7 @@ FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFile TQApplication::setOverrideCursor( WaitCursor ); Resource resource( this ); if ( !ff ) - ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); + ff = new FormFile( currentProject->makeRelative( filename ), false, currentProject ); bool b = resource.load( ff ) && (FormWindow*)resource.widget(); if ( !validFileName && resource.widget() ) ( (FormWindow*)resource.widget() )->setFileName( TQString() ); @@ -1358,7 +1345,7 @@ bool MainWindow::fileSave() bool MainWindow::fileSaveForm() { for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { + if ( e->object() == formWindow() || e == qWorkspace()->activeWindow() ) { e->save(); } } @@ -1367,13 +1354,13 @@ bool MainWindow::fileSaveForm() TQWidget *w = qWorkspace()->activeWindow(); if ( w ) { - if ( ::tqqt_cast<SourceEditor*>(w) ) { + if ( ::tqt_cast<SourceEditor*>(w) ) { SourceEditor *se = (SourceEditor*)w; if ( se->formWindow() ) fw = se->formWindow(); else if ( se->sourceFile() ) { se->sourceFile()->save(); - return TRUE; + return true; } } } @@ -1381,16 +1368,16 @@ bool MainWindow::fileSaveForm() if ( !fw ) fw = formWindow(); if ( !fw || !fw->formFile()->save() ) - return FALSE; + return false; TQApplication::restoreOverrideCursor(); - return TRUE; + return true; } bool MainWindow::fileSaveProject() { currentProject->save(); statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */); - return TRUE; + return true; } bool MainWindow::fileSaveAs() @@ -1399,12 +1386,12 @@ bool MainWindow::fileSaveAs() TQWidget *w = qworkspace->activeWindow(); if ( !w ) - return TRUE; - if ( ::tqqt_cast<FormWindow*>(w) ) + return true; + if ( ::tqt_cast<FormWindow*>(w) ) return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::tqqt_cast<SourceEditor*>(w) ) + else if ( ::tqt_cast<SourceEditor*>(w) ) return ( (SourceEditor*)w )->saveAs(); - return FALSE; + return false; } void MainWindow::fileSaveAll() @@ -1415,7 +1402,7 @@ void MainWindow::fileSaveAll() void MainWindow::fileCreateTemplate() { - CreateTemplate dia( this, 0, TRUE ); + CreateTemplate dia( this, 0, true ); int i = 0; for ( i = 0; i < WidgetDatabase::count(); ++i ) { @@ -1425,7 +1412,7 @@ void MainWindow::fileCreateTemplate() } for ( i = 0; i < WidgetDatabase::count(); ++i ) { if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { + WidgetDatabase::className( i ) != "TQTabWidget" && WidgetDatabase::group( i ) != "Temp" ) { dia.listClass->insertItem( WidgetDatabase::className( i ) ); } } @@ -1437,14 +1424,14 @@ void MainWindow::fileCreateTemplate() } dia.editName->setText( i18n( "NewTemplate" ) ); - connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( createNewTemplate() ) ); + connect( dia.buttonCreate, TQ_SIGNAL( clicked() ), + this, TQ_SLOT( createNewTemplate() ) ); dia.exec(); } void MainWindow::createNewTemplate() { - CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(sender()))->parent(); + CreateTemplate *dia = (CreateTemplate*)sender()->parent(); TQString fn = dia->editName->text(); TQString cn = dia->listClass->currentText(); if ( fn.isEmpty() || cn.isEmpty() ) { @@ -1499,7 +1486,7 @@ void MainWindow::createNewTemplate() void MainWindow::editUndo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); return; } @@ -1510,7 +1497,7 @@ void MainWindow::editUndo() void MainWindow::editRedo() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); return; } @@ -1521,7 +1508,7 @@ void MainWindow::editRedo() void MainWindow::editCut() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); return; } @@ -1532,7 +1519,7 @@ void MainWindow::editCut() void MainWindow::editCopy() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); return; } @@ -1543,7 +1530,7 @@ void MainWindow::editCopy() void MainWindow::editPaste() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); return; } @@ -1555,7 +1542,7 @@ void MainWindow::editPaste() if ( l.count() == 1 ) { w = l.first(); if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ) && w != formWindow()->mainContainer() ) ) w = formWindow()->mainContainer(); } @@ -1563,7 +1550,7 @@ void MainWindow::editPaste() if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); hierarchyView->widgetInserted( 0 ); - formWindow()->commandHistory()->setModified( TRUE ); + formWindow()->commandHistory()->setModified( true ); } else { TQMessageBox::information( this, i18n( "Paste Error" ), i18n( "Cannot paste widgets. Designer could not find a container\n" @@ -1582,7 +1569,7 @@ void MainWindow::editDelete() void MainWindow::editSelectAll() { if ( qWorkspace()->activeWindow() && - ::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { + ::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) { ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); return; } @@ -1728,7 +1715,7 @@ void MainWindow::editFunctions() return; statusMessage( i18n( "Edit the current form's slots..." ) ); - EditFunctions dlg( this, formWindow(), TRUE ); + EditFunctions dlg( this, formWindow(), true ); dlg.exec(); statusBar()->clear(); } @@ -1774,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor() } if ( !editor ) -editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); +editor = createSourceEditor( formWindow(), formWindow()->project(), lang ); return editor; } @@ -1822,7 +1809,7 @@ SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project if ( editor->object() != object ) editor->setObject( object, project ); else if ( rereadSource ) - editor->refresh( FALSE ); + editor->refresh( false ); editor->show(); editor->setFocus(); @@ -1852,7 +1839,7 @@ void MainWindow::editProjectSettings() void MainWindow::editPixmapCollection() { - PixmapCollectionEditor dia( this, 0, TRUE ); + PixmapCollectionEditor dia( this, 0, true ); dia.setProject( currentProject ); dia.exec(); } @@ -1860,7 +1847,7 @@ void MainWindow::editPixmapCollection() void MainWindow::editDatabaseConnections() { #ifndef TQT_NO_SQL - DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); + DatabaseConnectionsEditor dia( currentProject, this, 0, true ); dia.exec(); #endif } @@ -1868,9 +1855,9 @@ void MainWindow::editDatabaseConnections() void MainWindow::editPreferences() { statusMessage( i18n( "Edit preferences..." ) ); - Preferences *dia = new Preferences( this, 0, TRUE ); + Preferences *dia = new Preferences( this, 0, true ); prefDia = dia; - connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( dia->helpButton, TQ_SIGNAL( clicked() ), MainWindow::self, TQ_SLOT( showDialogHelp() ) ); dia->buttonColor->setEditor( StyledButton::ColorEditor ); dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); dia->groupBoxGrid->setChecked( sGrid ); @@ -1885,9 +1872,9 @@ void MainWindow::editPreferences() if ( qworkspace->backgroundPixmap() ) dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); if ( backPix ) - dia->radioPixmap->setChecked( TRUE ); + dia->radioPixmap->setChecked( true ); else - dia->radioColor->setChecked( TRUE ); + dia->radioColor->setChecked( true ); dia->checkBoxSplash->setChecked( splashScreen ); dia->checkAutoEdit->setChecked( !databaseAutoEdit ); dia->checkBoxStartDialog->setChecked( shStartDialog ); @@ -1904,11 +1891,11 @@ void MainWindow::editPreferences() Tab t = *it; 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 ); } } @@ -1922,15 +1909,15 @@ void MainWindow::editPreferences() if (dia->textEditPluginPaths->isModified()) { pluginPaths = dia->textEditPluginPaths->text(); TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); - savePluginPaths = TRUE; + savePluginPaths = true; } if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); - backPix = TRUE; + backPix = true; } else { qworkspace->setBackgroundColor( dia->buttonColor->color() ); - backPix = FALSE; + backPix = false; } splashScreen = dia->checkBoxSplash->isChecked(); databaseAutoEdit = !dia->checkAutoEdit->isChecked(); @@ -1947,7 +1934,7 @@ void MainWindow::editPreferences() for ( it = preferenceTabs.begin(); it != preferenceTabs.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 ); } for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) @@ -1961,11 +1948,11 @@ void MainWindow::editPreferences() void MainWindow::searchFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !findDialog ) - findDialog = new FindDialog( this, 0, FALSE ); + findDialog = new FindDialog( this, 0, false ); findDialog->show(); findDialog->raise(); findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), @@ -1983,31 +1970,31 @@ void MainWindow::searchIncremetalFindMenu() void MainWindow::searchIncremetalFind() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, FALSE ); + false, false, true, false ); } void MainWindow::searchIncremetalFindNext() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, TRUE ); + false, false, true, true ); } void MainWindow::searchReplace() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !replaceDialog ) - replaceDialog = new ReplaceDialog( this, 0, FALSE ); + replaceDialog = new ReplaceDialog( this, 0, false ); replaceDialog->show(); replaceDialog->raise(); replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), @@ -2019,11 +2006,11 @@ void MainWindow::searchReplace() void MainWindow::searchGotoLine() { if ( !qWorkspace()->activeWindow() || - !::tqqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) + !::tqt_cast<SourceEditor*>(qWorkspace()->activeWindow()) ) return; if ( !gotoLineDialog ) - gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); + gotoLineDialog = new GotoLineDialog( this, 0, false ); gotoLineDialog->show(); gotoLineDialog->raise(); gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); |