@ -124,104 +124,104 @@ static TQIconSet createIconSet( const TQString &name )
void MainWindow : : setupEditActions ( )
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 - > setStatusTip ( i18n ( " Undoes the last action " ) ) ;
actionEditUndo - > setWhatsThis ( whatsThisFrom ( " Edit|Undo " ) ) ;
actionEditUndo - > setWhatsThis ( whatsThisFrom ( " Edit|Undo " ) ) ;
connect ( actionEditUndo , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editUndo ( ) ) ) ;
connect ( actionEditUndo , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editUndo ( ) ) ) ;
actionEditUndo - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Redoes the last undone operation " ) ) ;
actionEditRedo - > setWhatsThis ( whatsThisFrom ( " Edit|Redo " ) ) ;
actionEditRedo - > setWhatsThis ( whatsThisFrom ( " Edit|Redo " ) ) ;
connect ( actionEditRedo , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editRedo ( ) ) ) ;
connect ( actionEditRedo , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editRedo ( ) ) ) ;
actionEditRedo - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Cuts the selected widgets and puts them on the clipboard " ) ) ;
actionEditCut - > setWhatsThis ( whatsThisFrom ( " Edit|Cut " ) ) ;
actionEditCut - > setWhatsThis ( whatsThisFrom ( " Edit|Cut " ) ) ;
connect ( actionEditCut , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editCut ( ) ) ) ;
connect ( actionEditCut , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editCut ( ) ) ) ;
actionEditCut - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Copies the selected widgets to the clipboard " ) ) ;
actionEditCopy - > setWhatsThis ( whatsThisFrom ( " Edit|Copy " ) ) ;
actionEditCopy - > setWhatsThis ( whatsThisFrom ( " Edit|Copy " ) ) ;
connect ( actionEditCopy , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editCopy ( ) ) ) ;
connect ( actionEditCopy , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editCopy ( ) ) ) ;
actionEditCopy - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Pastes the clipboard's contents " ) ) ;
actionEditPaste - > setWhatsThis ( whatsThisFrom ( " Edit|Paste " ) ) ;
actionEditPaste - > setWhatsThis ( whatsThisFrom ( " Edit|Paste " ) ) ;
connect ( actionEditPaste , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editPaste ( ) ) ) ;
connect ( actionEditPaste , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editPaste ( ) ) ) ;
actionEditPaste - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Deletes the selected widgets " ) ) ;
actionEditDelete - > setWhatsThis ( whatsThisFrom ( " Edit|Delete " ) ) ;
actionEditDelete - > setWhatsThis ( whatsThisFrom ( " Edit|Delete " ) ) ;
connect ( actionEditDelete , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editDelete ( ) ) ) ;
connect ( actionEditDelete , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editDelete ( ) ) ) ;
actionEditDelete - > setEnabled ( FALSE ) ;
actionEditDelete - > setEnabled ( FALSE ) ;
# ifdef TQ_WS_MAC
# ifdef TQ_WS_MAC
TQAction * macDelete = new DesignerAction ( i18n ( " Delete " ) , TQPixmap ( ) , i18n ( " &Delete " ) , Key_Backspace , TQT_TQOBJECT ( this ) , 0 ) ;
TQAction * macDelete = new DesignerAction ( i18n ( " Delete " ) , TQPixmap ( ) , i18n ( " &Delete " ) , Key_Backspace , this , 0 ) ;
connect ( macDelete , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editDelete ( ) ) ) ;
connect ( macDelete , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editDelete ( ) ) ) ;
# endif
# 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 - > setStatusTip ( i18n ( " Selects all widgets " ) ) ;
actionEditSelectAll - > setWhatsThis ( whatsThisFrom ( " Edit|Select All " ) ) ;
actionEditSelectAll - > setWhatsThis ( whatsThisFrom ( " Edit|Select All " ) ) ;
connect ( actionEditSelectAll , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editSelectAll ( ) ) ) ;
connect ( actionEditSelectAll , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editSelectAll ( ) ) ) ;
actionEditSelectAll - > setEnabled ( TRUE ) ;
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 - > setStatusTip ( i18n ( " Raises the selected widgets " ) ) ;
actionEditRaise - > setWhatsThis ( i18n ( " Raises the selected widgets " ) ) ;
actionEditRaise - > setWhatsThis ( i18n ( " Raises the selected widgets " ) ) ;
connect ( actionEditRaise , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editRaise ( ) ) ) ;
connect ( actionEditRaise , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editRaise ( ) ) ) ;
actionEditRaise - > setEnabled ( FALSE ) ;
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 - > setStatusTip ( i18n ( " Lowers the selected widgets " ) ) ;
actionEditLower - > setWhatsThis ( i18n ( " Lowers the selected widgets " ) ) ;
actionEditLower - > setWhatsThis ( i18n ( " Lowers the selected widgets " ) ) ;
connect ( actionEditLower , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLower ( ) ) ) ;
connect ( actionEditLower , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLower ( ) ) ) ;
actionEditLower - > setEnabled ( FALSE ) ;
actionEditLower - > setEnabled ( FALSE ) ;
actionEditAccels = new DesignerAction ( i18n ( " Check Accelerators " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Checks if the accelerators used in the form are unique " ) ) ;
actionEditAccels - > setWhatsThis ( whatsThisFrom ( " Edit|Check Accelerator " ) ) ;
actionEditAccels - > setWhatsThis ( whatsThisFrom ( " Edit|Check Accelerator " ) ) ;
connect ( actionEditAccels , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editAccels ( ) ) ) ;
connect ( actionEditAccels , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editAccels ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditAccels , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditAccels , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditFunctions = new DesignerAction ( i18n ( " Slots " ) , createIconSet ( " designer_editslots.png " ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog for editing slots " ) ) ;
actionEditFunctions - > setWhatsThis ( whatsThisFrom ( " Edit|Slots " ) ) ;
actionEditFunctions - > setWhatsThis ( whatsThisFrom ( " Edit|Slots " ) ) ;
connect ( actionEditFunctions , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editFunctions ( ) ) ) ;
connect ( actionEditFunctions , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editFunctions ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFunctions , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFunctions , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditConnections = new DesignerAction ( i18n ( " Connections " ) , createIconSet ( " designer_connecttool.png " ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog for editing connections " ) ) ;
actionEditConnections - > setWhatsThis ( whatsThisFrom ( " Edit|Connections " ) ) ;
actionEditConnections - > setWhatsThis ( whatsThisFrom ( " Edit|Connections " ) ) ;
connect ( actionEditConnections , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editConnections ( ) ) ) ;
connect ( actionEditConnections , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editConnections ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditConnections , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditConnections , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditSource = new DesignerAction ( i18n ( " Source " ) , TQIconSet ( ) ,
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 - > setStatusTip ( i18n ( " Opens an editor to edit the form's source code " ) ) ;
actionEditSource - > setWhatsThis ( whatsThisFrom ( " Edit|Source " ) ) ;
actionEditSource - > setWhatsThis ( whatsThisFrom ( " Edit|Source " ) ) ;
connect ( actionEditSource , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editSource ( ) ) ) ;
connect ( actionEditSource , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editSource ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditSource , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditSource , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditFormSettings = new DesignerAction ( i18n ( " Form Settings " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog to change the form's settings " ) ) ;
actionEditFormSettings - > setWhatsThis ( whatsThisFrom ( " Edit|Form Settings " ) ) ;
actionEditFormSettings - > setWhatsThis ( whatsThisFrom ( " Edit|Form Settings " ) ) ;
connect ( actionEditFormSettings , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editFormSettings ( ) ) ) ;
connect ( actionEditFormSettings , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editFormSettings ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFormSettings , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFormSettings , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditPreferences = new DesignerAction ( i18n ( " Preferences " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog to change preferences " ) ) ;
actionEditPreferences - > setWhatsThis ( whatsThisFrom ( " Edit|Preferences " ) ) ;
actionEditPreferences - > setWhatsThis ( whatsThisFrom ( " Edit|Preferences " ) ) ;
connect ( actionEditPreferences , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editPreferences ( ) ) ) ;
connect ( actionEditPreferences , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editPreferences ( ) ) ) ;
/* TQToolBar *tb = new TQToolBar( this, "Edit" );
/* TQToolBar *tb = new TQToolBar( this, "Edit" );
tb - > setCloseMode ( TQDockWindow : : Undocked ) ;
tb - > setCloseMode ( TQDockWindow : : Undocked ) ;
@ -240,7 +240,7 @@ void MainWindow::setupEditActions()
# endif
# endif
TQPopupMenu * menu = new TQPopupMenu ( this , " Edit " ) ;
TQPopupMenu * menu = new TQPopupMenu ( this , " Edit " ) ;
connect ( menu , TQT_SIGNAL ( aboutToShow ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( updateEditorUndoRedo ( ) ) ) ;
connect ( menu , TQT_SIGNAL ( aboutToShow ( ) ) , this , TQT_SLOT ( updateEditorUndoRedo ( ) ) ) ;
menubar - > insertItem ( i18n ( " &Edit " ) , menu ) ;
menubar - > insertItem ( i18n ( " &Edit " ) , menu ) ;
actionEditUndo - > addTo ( menu ) ;
actionEditUndo - > addTo ( menu ) ;
actionEditRedo - > addTo ( menu ) ;
actionEditRedo - > addTo ( menu ) ;
@ -269,26 +269,26 @@ void MainWindow::setupEditActions()
void MainWindow : : setupSearchActions ( )
void MainWindow : : setupSearchActions ( )
{
{
actionSearchFind = new DesignerAction ( i18n ( " Find " ) , createIconSet ( " designer_searchfind.png " ) ,
actionSearchFind = new DesignerAction ( i18n ( " Find " ) , createIconSet ( " designer_searchfind.png " ) ,
i18n ( " &Find... " ) , CTRL + Key_F , TQT_TQOBJECT ( this ) , 0 ) ;
i18n ( " &Find... " ) , CTRL + Key_F , this , 0 ) ;
connect ( actionSearchFind , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( searchFind ( ) ) ) ;
connect ( actionSearchFind , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( searchFind ( ) ) ) ;
actionSearchFind - > setEnabled ( FALSE ) ;
actionSearchFind - > setEnabled ( FALSE ) ;
actionSearchFind - > setWhatsThis ( whatsThisFrom ( " Search|Find " ) ) ;
actionSearchFind - > setWhatsThis ( whatsThisFrom ( " Search|Find " ) ) ;
actionSearchIncremetal = new DesignerAction ( i18n ( " Find Incremental " ) , TQIconSet ( ) ,
actionSearchIncremetal = new DesignerAction ( i18n ( " Find Incremental " ) , TQIconSet ( ) ,
i18n ( " Find &Incremental " ) , ALT + Key_I , TQT_TQOBJECT ( this ) , 0 ) ;
i18n ( " Find &Incremental " ) , ALT + Key_I , this , 0 ) ;
connect ( actionSearchIncremetal , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( searchIncremetalFindMenu ( ) ) ) ;
connect ( actionSearchIncremetal , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( searchIncremetalFindMenu ( ) ) ) ;
actionSearchIncremetal - > setEnabled ( FALSE ) ;
actionSearchIncremetal - > setEnabled ( FALSE ) ;
actionSearchIncremetal - > setWhatsThis ( whatsThisFrom ( " Search|Find Incremental " ) ) ;
actionSearchIncremetal - > setWhatsThis ( whatsThisFrom ( " Search|Find Incremental " ) ) ;
actionSearchReplace = new DesignerAction ( i18n ( " Replace " ) , TQIconSet ( ) ,
actionSearchReplace = new DesignerAction ( i18n ( " Replace " ) , TQIconSet ( ) ,
i18n ( " &Replace... " ) , CTRL + Key_R , TQT_TQOBJECT ( this ) , 0 ) ;
i18n ( " &Replace... " ) , CTRL + Key_R , this , 0 ) ;
connect ( actionSearchReplace , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( searchReplace ( ) ) ) ;
connect ( actionSearchReplace , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( searchReplace ( ) ) ) ;
actionSearchReplace - > setEnabled ( FALSE ) ;
actionSearchReplace - > setEnabled ( FALSE ) ;
actionSearchReplace - > setWhatsThis ( whatsThisFrom ( " Search|Replace " ) ) ;
actionSearchReplace - > setWhatsThis ( whatsThisFrom ( " Search|Replace " ) ) ;
actionSearchGotoLine = new DesignerAction ( i18n ( " Goto Line " ) , TQIconSet ( ) ,
actionSearchGotoLine = new DesignerAction ( i18n ( " Goto Line " ) , TQIconSet ( ) ,
i18n ( " &Goto Line... " ) , ALT + Key_G , TQT_TQOBJECT ( this ) , 0 ) ;
i18n ( " &Goto Line... " ) , ALT + Key_G , this , 0 ) ;
connect ( actionSearchGotoLine , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( searchGotoLine ( ) ) ) ;
connect ( actionSearchGotoLine , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( searchGotoLine ( ) ) ) ;
actionSearchGotoLine - > setEnabled ( FALSE ) ;
actionSearchGotoLine - > setEnabled ( FALSE ) ;
actionSearchGotoLine - > setWhatsThis ( whatsThisFrom ( " Search|Goto line " ) ) ;
actionSearchGotoLine - > setWhatsThis ( whatsThisFrom ( " Search|Goto line " ) ) ;
@ -320,56 +320,56 @@ void MainWindow::setupLayoutActions()
if ( ! actionGroupTools ) {
if ( ! actionGroupTools ) {
actionGroupTools = new TQActionGroup ( this ) ;
actionGroupTools = new TQActionGroup ( this ) ;
actionGroupTools - > setExclusive ( TRUE ) ;
actionGroupTools - > setExclusive ( TRUE ) ;
connect ( actionGroupTools , TQT_SIGNAL ( selected ( TQAction * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( toolSelected ( TQAction * ) ) ) ;
connect ( actionGroupTools , TQT_SIGNAL ( selected ( TQAction * ) ) , this , TQT_SLOT ( toolSelected ( TQAction * ) ) ) ;
}
}
actionEditAdjustSize = new DesignerAction ( i18n ( " Adjust Size " ) , createIconSet ( " designer_adjustsize.png " ) ,
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 - > setStatusTip ( i18n ( " Adjusts the size of the selected widget " ) ) ;
actionEditAdjustSize - > setWhatsThis ( whatsThisFrom ( " Layout|Adjust Size " ) ) ;
actionEditAdjustSize - > setWhatsThis ( whatsThisFrom ( " Layout|Adjust Size " ) ) ;
connect ( actionEditAdjustSize , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editAdjustSize ( ) ) ) ;
connect ( actionEditAdjustSize , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editAdjustSize ( ) ) ) ;
actionEditAdjustSize - > setEnabled ( FALSE ) ;
actionEditAdjustSize - > setEnabled ( FALSE ) ;
actionEditHLayout = new DesignerAction ( i18n ( " Lay Out Horizontally " ) , createIconSet ( " designer_edithlayout.png " ) ,
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 - > setStatusTip ( i18n ( " Lays out the selected widgets horizontally " ) ) ;
actionEditHLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Horizontally " ) ) ;
actionEditHLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Horizontally " ) ) ;
connect ( actionEditHLayout , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLayoutHorizontal ( ) ) ) ;
connect ( actionEditHLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLayoutHorizontal ( ) ) ) ;
actionEditHLayout - > setEnabled ( FALSE ) ;
actionEditHLayout - > setEnabled ( FALSE ) ;
actionEditVLayout = new DesignerAction ( i18n ( " Lay Out Vertically " ) , createIconSet ( " designer_editvlayout.png " ) ,
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 - > setStatusTip ( i18n ( " Lays out the selected widgets vertically " ) ) ;
actionEditVLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Vertically " ) ) ;
actionEditVLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Vertically " ) ) ;
connect ( actionEditVLayout , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLayoutVertical ( ) ) ) ;
connect ( actionEditVLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLayoutVertical ( ) ) ) ;
actionEditVLayout - > setEnabled ( FALSE ) ;
actionEditVLayout - > setEnabled ( FALSE ) ;
actionEditGridLayout = new DesignerAction ( i18n ( " Lay Out in a Grid " ) , createIconSet ( " designer_editgrid.png " ) ,
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 - > setStatusTip ( i18n ( " Lays out the selected widgets in a grid " ) ) ;
actionEditGridLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out in a Grid " ) ) ;
actionEditGridLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out in a Grid " ) ) ;
connect ( actionEditGridLayout , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLayoutGrid ( ) ) ) ;
connect ( actionEditGridLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLayoutGrid ( ) ) ) ;
actionEditGridLayout - > setEnabled ( FALSE ) ;
actionEditGridLayout - > setEnabled ( FALSE ) ;
actionEditSplitHorizontal = new DesignerAction ( i18n ( " Lay Out Horizontally (in Splitter) " ) , createIconSet ( " designer_editvlayoutsplit.png " ) ,
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 - > setStatusTip ( i18n ( " Lays out the selected widgets horizontally in a splitter " ) ) ;
actionEditSplitHorizontal - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Horizontally (in Splitter) " ) ) ;
actionEditSplitHorizontal - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Horizontally (in Splitter) " ) ) ;
connect ( actionEditSplitHorizontal , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLayoutHorizontalSplit ( ) ) ) ;
connect ( actionEditSplitHorizontal , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLayoutHorizontalSplit ( ) ) ) ;
actionEditSplitHorizontal - > setEnabled ( FALSE ) ;
actionEditSplitHorizontal - > setEnabled ( FALSE ) ;
actionEditSplitVertical = new DesignerAction ( i18n ( " Lay Out Vertically (in Splitter) " ) , createIconSet ( " designer_edithlayoutsplit.png " ) ,
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 - > setStatusTip ( i18n ( " Lays out the selected widgets vertically in a splitter " ) ) ;
actionEditSplitVertical - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Vertically (in Splitter) " ) ) ;
actionEditSplitVertical - > setWhatsThis ( whatsThisFrom ( " Layout|Lay Out Vertically (in Splitter) " ) ) ;
connect ( actionEditSplitVertical , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editLayoutVerticalSplit ( ) ) ) ;
connect ( actionEditSplitVertical , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editLayoutVerticalSplit ( ) ) ) ;
actionEditSplitVertical - > setEnabled ( FALSE ) ;
actionEditSplitVertical - > setEnabled ( FALSE ) ;
actionEditBreakLayout = new DesignerAction ( i18n ( " Break Layout " ) , createIconSet ( " designer_editbreaklayout.png " ) ,
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 - > setStatusTip ( i18n ( " Breaks the selected layout " ) ) ;
actionEditBreakLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Break Layout " ) ) ;
actionEditBreakLayout - > setWhatsThis ( whatsThisFrom ( " Layout|Break Layout " ) ) ;
connect ( actionEditBreakLayout , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editBreakLayout ( ) ) ) ;
connect ( actionEditBreakLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editBreakLayout ( ) ) ) ;
actionEditBreakLayout - > setEnabled ( FALSE ) ;
actionEditBreakLayout - > setEnabled ( FALSE ) ;
int id = WidgetDatabase : : idFromClassName ( " Spacer " ) ;
int id = WidgetDatabase : : idFromClassName ( " Spacer " ) ;
@ -487,7 +487,7 @@ void MainWindow::setupToolActions()
actionToolsCustomWidget = new DesignerAction ( i18n ( " Custom Widgets " ) ,
actionToolsCustomWidget = new DesignerAction ( i18n ( " Custom Widgets " ) ,
createIconSet ( " designer_customwidget.png " ) ,
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 "
actionToolsCustomWidget - > setStatusTip ( i18n ( " Opens a dialog to add and change "
" custom widgets " ) ) ;
" custom widgets " ) ) ;
actionToolsCustomWidget - > setWhatsThis ( whatsThisFrom ( " Tools|Custom|Edit Custom "
actionToolsCustomWidget - > setWhatsThis ( whatsThisFrom ( " Tools|Custom|Edit Custom "
@ -602,10 +602,10 @@ void MainWindow::setupToolActions()
customWidgetToolBar2 = tb2 ;
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 "
a - > setStatusTip ( i18n ( " Opens a dialog to configure the common "
" widgets page of the toolbox " ) ) ;
" widgets page of the toolbox " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( toolsConfigure ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( toolsConfigure ( ) ) ) ;
mmenu - > insertSeparator ( ) ;
mmenu - > insertSeparator ( ) ;
a - > addTo ( mmenu ) ;
a - > addTo ( mmenu ) ;
resetTool ( ) ;
resetTool ( ) ;
@ -625,7 +625,7 @@ void MainWindow::setupFileActions()
DesignerAction * a = 0 ;
DesignerAction * a = 0 ;
if ( ! singleProject ) {
if ( ! singleProject ) {
DesignerAction * a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
DesignerAction * a = new DesignerAction ( this , 0 ) ;
a - > setText ( i18n ( " New " ) ) ;
a - > setText ( i18n ( " New " ) ) ;
a - > setToolTip ( i18n ( " New dialog or file " ) ) ;
a - > setToolTip ( i18n ( " New dialog or file " ) ) ;
a - > setMenuText ( i18n ( " &New... " ) ) ;
a - > setMenuText ( i18n ( " &New... " ) ) ;
@ -633,7 +633,7 @@ void MainWindow::setupFileActions()
a - > setAccel ( CTRL + Key_N ) ;
a - > setAccel ( CTRL + Key_N ) ;
a - > setStatusTip ( i18n ( " Creates a new project, form or source file. " ) ) ;
a - > setStatusTip ( i18n ( " Creates a new project, form or source file. " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|New " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|New " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileNew ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileNew ( ) ) ) ;
a - > addTo ( tb ) ;
a - > addTo ( tb ) ;
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
actionNewFile = a ;
actionNewFile = a ;
@ -653,15 +653,15 @@ void MainWindow::setupFileActions()
newForm - > setIconSet ( createIconSet ( " designer_form.png " ) ) ;
newForm - > setIconSet ( createIconSet ( " designer_form.png " ) ) ;
newForm - > setAccel ( CTRL + Key_N ) ;
newForm - > setAccel ( CTRL + Key_N ) ;
newForm - > setStatusTip ( i18n ( " Creates a new dialog. " ) ) ;
newForm - > setStatusTip ( i18n ( " Creates a new dialog. " ) ) ;
connect ( newForm , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileNewDialog ( ) ) ) ;
connect ( newForm , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileNewDialog ( ) ) ) ;
DesignerAction * newFile = new DesignerAction ( TQT_TQOBJECT( a) , 0 ) ;
DesignerAction * newFile = new DesignerAction ( a, 0 ) ;
newFile - > setText ( i18n ( " New File " ) ) ;
newFile - > setText ( i18n ( " New File " ) ) ;
newFile - > setMenuText ( i18n ( " &File... " ) ) ;
newFile - > setMenuText ( i18n ( " &File... " ) ) ;
newFile - > setIconSet ( createIconSet ( " designer_filenew.png " ) ) ;
newFile - > setIconSet ( createIconSet ( " designer_filenew.png " ) ) ;
newFile - > setAccel ( ALT + Key_N ) ;
newFile - > setAccel ( ALT + Key_N ) ;
newFile - > setStatusTip ( i18n ( " Creates a new file. " ) ) ;
newFile - > setStatusTip ( i18n ( " Creates a new file. " ) ) ;
connect ( newFile , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileNewFile ( ) ) ) ;
connect ( newFile , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileNewFile ( ) ) ) ;
actionNewFile = newFile ;
actionNewFile = newFile ;
a - > addTo ( tb ) ;
a - > addTo ( tb ) ;
@ -670,14 +670,14 @@ void MainWindow::setupFileActions()
fileMenu - > insertSeparator ( ) ;
fileMenu - > insertSeparator ( ) ;
}
}
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
a - > setText ( i18n ( " Open " ) ) ;
a - > setText ( i18n ( " Open " ) ) ;
a - > setMenuText ( i18n ( " &Open... " ) ) ;
a - > setMenuText ( i18n ( " &Open... " ) ) ;
a - > setIconSet ( createIconSet ( " designer_fileopen.png " ) ) ;
a - > setIconSet ( createIconSet ( " designer_fileopen.png " ) ) ;
a - > setAccel ( CTRL + Key_O ) ;
a - > setAccel ( CTRL + Key_O ) ;
a - > setStatusTip ( i18n ( " Opens an existing project, form or source file " ) ) ;
a - > setStatusTip ( i18n ( " Opens an existing project, form or source file " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Open " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Open " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileOpen ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileOpen ( ) ) ) ;
if ( ! singleProject ) {
if ( ! singleProject ) {
a - > addTo ( tb ) ;
a - > addTo ( tb ) ;
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
@ -685,20 +685,20 @@ void MainWindow::setupFileActions()
}
}
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
actionFileClose = a ;
actionFileClose = a ;
a - > setText ( i18n ( " Close " ) ) ;
a - > setText ( i18n ( " Close " ) ) ;
a - > setMenuText ( i18n ( " &Close " ) ) ;
a - > setMenuText ( i18n ( " &Close " ) ) ;
a - > setStatusTip ( i18n ( " Closes the current project or document " ) ) ;
a - > setStatusTip ( i18n ( " Closes the current project or document " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Close " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Close " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileClose ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileClose ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
if ( ! singleProject ) {
if ( ! singleProject ) {
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
fileMenu - > insertSeparator ( ) ;
fileMenu - > insertSeparator ( ) ;
}
}
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
actionFileSave = a ;
actionFileSave = a ;
a - > setText ( i18n ( " Save " ) ) ;
a - > setText ( i18n ( " Save " ) ) ;
a - > setMenuText ( i18n ( " &Save " ) ) ;
a - > setMenuText ( i18n ( " &Save " ) ) ;
@ -706,41 +706,41 @@ void MainWindow::setupFileActions()
a - > setAccel ( CTRL + Key_S ) ;
a - > setAccel ( CTRL + Key_S ) ;
a - > setStatusTip ( i18n ( " Saves the current project or document " ) ) ;
a - > setStatusTip ( i18n ( " Saves the current project or document " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileSave ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSave ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
a - > addTo ( tb ) ;
a - > addTo ( tb ) ;
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
actionFileSaveAs = a ;
actionFileSaveAs = a ;
a - > setText ( i18n ( " Save As " ) ) ;
a - > setText ( i18n ( " Save As " ) ) ;
a - > setMenuText ( i18n ( " Save &As... " ) ) ;
a - > setMenuText ( i18n ( " Save &As... " ) ) ;
a - > setStatusTip ( i18n ( " Saves the current form with a new filename " ) ) ;
a - > setStatusTip ( i18n ( " Saves the current form with a new filename " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save As " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save As " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileSaveAs ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSaveAs ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindow ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindow ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
if ( ! singleProject )
if ( ! singleProject )
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
actionFileSaveAll = a ;
actionFileSaveAll = a ;
a - > setText ( i18n ( " Save All " ) ) ;
a - > setText ( i18n ( " Save All " ) ) ;
a - > setMenuText ( i18n ( " Sa&ve All " ) ) ;
a - > setMenuText ( i18n ( " Sa&ve All " ) ) ;
a - > setStatusTip ( i18n ( " Saves all open documents " ) ) ;
a - > setStatusTip ( i18n ( " Saves all open documents " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save All " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Save All " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileSaveAll ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSaveAll ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
if ( ! singleProject ) {
if ( ! singleProject ) {
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
fileMenu - > insertSeparator ( ) ;
fileMenu - > insertSeparator ( ) ;
}
}
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
a - > setText ( i18n ( " Create Template " ) ) ;
a - > setText ( i18n ( " Create Template " ) ) ;
a - > setMenuText ( i18n ( " Create &Template... " ) ) ;
a - > setMenuText ( i18n ( " Create &Template... " ) ) ;
a - > setStatusTip ( i18n ( " Creates a new template " ) ) ;
a - > setStatusTip ( i18n ( " Creates a new template " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Create Template " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " File|Create Template " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileCreateTemplate ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileCreateTemplate ( ) ) ) ;
if ( ! singleProject )
if ( ! singleProject )
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
@ -767,7 +767,7 @@ void MainWindow::setupFileActions()
if ( ! singleProject )
if ( ! singleProject )
fileMenu - > insertSeparator ( ) ;
fileMenu - > insertSeparator ( ) ;
a = new DesignerAction ( TQT_TQOBJECT ( this ) , 0 ) ;
a = new DesignerAction ( this , 0 ) ;
actionFileExit = a ;
actionFileExit = a ;
if ( ! singleProjectMode ( ) ) {
if ( ! singleProjectMode ( ) ) {
a - > setText ( i18n ( " Exit " ) ) ;
a - > setText ( i18n ( " Exit " ) ) ;
@ -778,7 +778,7 @@ void MainWindow::setupFileActions()
a - > setText ( i18n ( " Close " ) ) ;
a - > setText ( i18n ( " Close " ) ) ;
a - > setMenuText ( i18n ( " &Close " ) ) ;
a - > setMenuText ( i18n ( " &Close " ) ) ;
}
}
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( fileQuit ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileQuit ( ) ) ) ;
a - > addTo ( fileMenu ) ;
a - > addTo ( fileMenu ) ;
}
}
@ -792,8 +792,8 @@ void MainWindow::setupProjectActions()
ag - > setMenuText ( i18n ( " Active Project " ) ) ;
ag - > setMenuText ( i18n ( " Active Project " ) ) ;
ag - > setExclusive ( TRUE ) ;
ag - > setExclusive ( TRUE ) ;
ag - > setUsesDropDown ( TRUE ) ;
ag - > setUsesDropDown ( TRUE ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( projectSelected ( TQAction * ) ) ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , this , TQT_SLOT ( projectSelected ( TQAction * ) ) ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , TQT_TQOBJECT ( this ) , TQT_SIGNAL ( projectChanged ( ) ) ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , this , TQT_SIGNAL ( projectChanged ( ) ) ) ;
DesignerAction * a = new DesignerAction ( i18n ( " <No Project> " ) , i18n ( " <No Project> " ) , 0 , ag , 0 , TRUE ) ;
DesignerAction * a = new DesignerAction ( i18n ( " <No Project> " ) , i18n ( " <No Project> " ) , 0 , ag , 0 , TRUE ) ;
eProject = new Project ( " " , i18n ( " <No Project> " ) , projectSettingsPluginManager , TRUE ) ;
eProject = new Project ( " " , i18n ( " <No Project> " ) , projectSettingsPluginManager , TRUE ) ;
projects . insert ( a , eProject ) ;
projects . insert ( a , eProject ) ;
@ -805,31 +805,31 @@ void MainWindow::setupProjectActions()
if ( ! singleProject )
if ( ! singleProject )
projectMenu - > insertSeparator ( ) ;
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 ;
actionProjectAddFile = a ;
a - > setStatusTip ( i18n ( " Adds a file to the current project " ) ) ;
a - > setStatusTip ( i18n ( " Adds a file to the current project " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " Project|Add File " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " Project|Add File " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( projectInsertFile ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( projectInsertFile ( ) ) ) ;
a - > setEnabled ( FALSE ) ;
a - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
if ( ! singleProject )
if ( ! singleProject )
a - > addTo ( projectMenu ) ;
a - > addTo ( projectMenu ) ;
actionEditPixmapCollection = new DesignerAction ( i18n ( " Image Collection... " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog for editing the current project's image collection " ) ) ;
actionEditPixmapCollection - > setWhatsThis ( whatsThisFrom ( " Project|Image Collection " ) ) ;
actionEditPixmapCollection - > setWhatsThis ( whatsThisFrom ( " Project|Image Collection " ) ) ;
connect ( actionEditPixmapCollection , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editPixmapCollection ( ) ) ) ;
connect ( actionEditPixmapCollection , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editPixmapCollection ( ) ) ) ;
actionEditPixmapCollection - > setEnabled ( FALSE ) ;
actionEditPixmapCollection - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditPixmapCollection , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditPixmapCollection , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditPixmapCollection - > addTo ( projectMenu ) ;
actionEditPixmapCollection - > addTo ( projectMenu ) ;
# ifndef TQT_NO_SQL
# ifndef TQT_NO_SQL
actionEditDatabaseConnections = new DesignerAction ( i18n ( " Database Connections... " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog for editing the current project's database connections " ) ) ;
actionEditDatabaseConnections - > setWhatsThis ( whatsThisFrom ( " Project|Database Connections " ) ) ;
actionEditDatabaseConnections - > setWhatsThis ( whatsThisFrom ( " Project|Database Connections " ) ) ;
connect ( actionEditDatabaseConnections , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editDatabaseConnections ( ) ) ) ;
connect ( actionEditDatabaseConnections , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editDatabaseConnections ( ) ) ) ;
//actionEditDatabaseConnections->setEnabled( FALSE );
//actionEditDatabaseConnections->setEnabled( FALSE );
//connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
//connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
if ( ! singleProject )
if ( ! singleProject )
@ -837,10 +837,10 @@ void MainWindow::setupProjectActions()
# endif
# endif
actionEditProjectSettings = new DesignerAction ( i18n ( " Project Settings... " ) , TQPixmap ( ) ,
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 - > setStatusTip ( i18n ( " Opens a dialog to change the project's settings " ) ) ;
actionEditProjectSettings - > setWhatsThis ( whatsThisFrom ( " Project|Project Settings " ) ) ;
actionEditProjectSettings - > setWhatsThis ( whatsThisFrom ( " Project|Project Settings " ) ) ;
connect ( actionEditProjectSettings , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( editProjectSettings ( ) ) ) ;
connect ( actionEditProjectSettings , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editProjectSettings ( ) ) ) ;
actionEditProjectSettings - > setEnabled ( FALSE ) ;
actionEditProjectSettings - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditProjectSettings , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditProjectSettings , TQT_SLOT ( setEnabled ( bool ) ) ) ;
actionEditProjectSettings - > addTo ( projectMenu ) ;
actionEditProjectSettings - > addTo ( projectMenu ) ;
@ -854,19 +854,19 @@ void MainWindow::setupPreviewActions()
layoutMenu = menu ;
layoutMenu = menu ;
menubar - > insertItem ( i18n ( " &Preview " ) , menu , toolsMenuId + 2 ) ;
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 ;
actionPreview = a ;
a - > setAccel ( CTRL + Key_T ) ;
a - > setAccel ( CTRL + Key_T ) ;
a - > setStatusTip ( i18n ( " Opens a preview " ) ) ;
a - > setStatusTip ( i18n ( " Opens a preview " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " Preview|Preview Form " ) ) ;
a - > setWhatsThis ( whatsThisFrom ( " Preview|Preview Form " ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( previewForm ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( previewForm ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , a , TQT_SLOT ( setEnabled ( bool ) ) ) ;
a - > addTo ( menu ) ;
a - > addTo ( menu ) ;
menu - > insertSeparator ( ) ;
menu - > insertSeparator ( ) ;
TQSignalMapper * mapper = new TQSignalMapper ( TQT_TQOBJECT ( this ) ) ;
TQSignalMapper * mapper = new TQSignalMapper ( this ) ;
connect ( mapper , TQT_SIGNAL ( mapped ( const TQString & ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( previewForm ( const TQString & ) ) ) ;
connect ( mapper , TQT_SIGNAL ( mapped ( const TQString & ) ) , this , TQT_SLOT ( previewForm ( const TQString & ) ) ) ;
TQStringList styles = TQStyleFactory : : keys ( ) ;
TQStringList styles = TQStyleFactory : : keys ( ) ;
for ( TQStringList : : Iterator it = styles . begin ( ) ; it ! = styles . end ( ) ; + + it ) {
for ( TQStringList : : Iterator it = styles . begin ( ) ; it ! = styles . end ( ) ; + + it ) {
TQString info ;
TQString info ;
@ -884,7 +884,7 @@ void MainWindow::setupPreviewActions()
info = i18n ( " The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux. " ) ;
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 ( ) ,
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 - > setStatusTip ( i18n ( " Opens a preview in %1 style " ) . arg ( * it ) ) ;
a - > setWhatsThis ( i18n ( " <b>Open a preview in %1 style.</b> "
a - > setWhatsThis ( i18n ( " <b>Open a preview in %1 style.</b> "
" <p>Use the preview to test the design and "
" <p>Use the preview to test the design and "
@ -902,31 +902,31 @@ void MainWindow::setupWindowActions()
if ( ! windowActionsSetup ) {
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 - > setStatusTip ( i18n ( " Tiles the windows so that they are all visible " ) ) ;
actionWindowTile - > setWhatsThis ( whatsThisFrom ( " Window|Tile " ) ) ;
actionWindowTile - > setWhatsThis ( whatsThisFrom ( " Window|Tile " ) ) ;
connect ( actionWindowTile , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( tile ( ) ) ) ;
connect ( actionWindowTile , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( tile ( ) ) ) ;
actionWindowCascade = new DesignerAction ( i18n ( " Cascade " ) , i18n ( " &Cascade " ) , 0 , TQT_TQOBJECT ( this ) ) ;
actionWindowCascade = new DesignerAction ( i18n ( " Cascade " ) , i18n ( " &Cascade " ) , 0 , this ) ;
actionWindowCascade - > setStatusTip ( i18n ( " Cascades the windows so that all their title bars are visible " ) ) ;
actionWindowCascade - > setStatusTip ( i18n ( " Cascades the windows so that all their title bars are visible " ) ) ;
actionWindowCascade - > setWhatsThis ( whatsThisFrom ( " Window|Cascade " ) ) ;
actionWindowCascade - > setWhatsThis ( whatsThisFrom ( " Window|Cascade " ) ) ;
connect ( actionWindowCascade , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( cascade ( ) ) ) ;
connect ( actionWindowCascade , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_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 - > setStatusTip ( i18n ( " Closes the active window " ) ) ;
actionWindowClose - > setWhatsThis ( whatsThisFrom ( " Window|Close " ) ) ;
actionWindowClose - > setWhatsThis ( whatsThisFrom ( " Window|Close " ) ) ;
connect ( actionWindowClose , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( closeActiveWindow ( ) ) ) ;
connect ( actionWindowClose , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_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 - > setStatusTip ( i18n ( " Closes all form windows " ) ) ;
actionWindowCloseAll - > setWhatsThis ( whatsThisFrom ( " Window|Close All " ) ) ;
actionWindowCloseAll - > setWhatsThis ( whatsThisFrom ( " Window|Close All " ) ) ;
connect ( actionWindowCloseAll , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( closeAllWindows ( ) ) ) ;
connect ( actionWindowCloseAll , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_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 - > setStatusTip ( i18n ( " Activates the next window " ) ) ;
actionWindowNext - > setWhatsThis ( whatsThisFrom ( " Window|Next " ) ) ;
actionWindowNext - > setWhatsThis ( whatsThisFrom ( " Window|Next " ) ) ;
connect ( actionWindowNext , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( activateNextWindow ( ) ) ) ;
connect ( actionWindowNext , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_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 - > setStatusTip ( i18n ( " Activates the previous window " ) ) ;
actionWindowPrevious - > setWhatsThis ( whatsThisFrom ( " Window|Previous " ) ) ;
actionWindowPrevious - > setWhatsThis ( whatsThisFrom ( " Window|Previous " ) ) ;
connect ( actionWindowPrevious , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( activatePreviousWindow ( ) ) ) ;
connect ( actionWindowPrevious , TQT_SIGNAL ( activated ( ) ) , qworkspace , TQT_SLOT ( activatePreviousWindow ( ) ) ) ;
@ -971,7 +971,7 @@ void MainWindow::setupWindowActions()
else
else
itemText + = w - > caption ( ) ;
itemText + = w - > caption ( ) ;
int id = windowMenu - > insertItem ( itemText , TQT_TQOBJECT ( this ) , TQT_SLOT ( windowsMenuActivated ( int ) ) ) ;
int id = windowMenu - > insertItem ( itemText , this , TQT_SLOT ( windowsMenuActivated ( int ) ) ) ;
windowMenu - > setItemParameter ( id , i ) ;
windowMenu - > setItemParameter ( id , i ) ;
windowMenu - > setItemChecked ( id , qworkspace - > activeWindow ( ) = = windows . at ( i ) ) ;
windowMenu - > setItemChecked ( id , qworkspace - > activeWindow ( ) = = windows . at ( i ) ) ;
}
}
@ -979,31 +979,31 @@ void MainWindow::setupWindowActions()
void MainWindow : : setupHelpActions ( )
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 - > setStatusTip ( i18n ( " Opens the online help " ) ) ;
actionHelpContents - > setWhatsThis ( whatsThisFrom ( " Help|Contents " ) ) ;
actionHelpContents - > setWhatsThis ( whatsThisFrom ( " Help|Contents " ) ) ;
connect ( actionHelpContents , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( helpContents ( ) ) ) ;
connect ( actionHelpContents , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 - > setStatusTip ( i18n ( " Opens the TQt Designer manual " ) ) ;
actionHelpManual - > setWhatsThis ( whatsThisFrom ( " Help|Manual " ) ) ;
actionHelpManual - > setWhatsThis ( whatsThisFrom ( " Help|Manual " ) ) ;
connect ( actionHelpManual , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( helpManual ( ) ) ) ;
connect ( actionHelpManual , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 - > setStatusTip ( i18n ( " Displays information about TQt Designer " ) ) ;
actionHelpAbout - > setWhatsThis ( whatsThisFrom ( " Help|About " ) ) ;
actionHelpAbout - > setWhatsThis ( whatsThisFrom ( " Help|About " ) ) ;
connect ( actionHelpAbout , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( helpAbout ( ) ) ) ;
connect ( actionHelpAbout , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 - > setStatusTip ( i18n ( " Displays information about the TQt Toolkit " ) ) ;
actionHelpAboutTQt - > setWhatsThis ( whatsThisFrom ( " Help|About TQt " ) ) ;
actionHelpAboutTQt - > setWhatsThis ( whatsThisFrom ( " Help|About TQt " ) ) ;
connect ( actionHelpAboutTQt , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( helpAboutTQt ( ) ) ) ;
connect ( actionHelpAboutTQt , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( helpAboutTQt ( ) ) ) ;
actionHelpWhatsThis = new DesignerAction ( i18n ( " What's This? " ) , TQIconSet ( whatsthis_image , whatsthis_image ) ,
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 - > setStatusTip ( i18n ( " \" What's This? \" context sensitive help " ) ) ;
actionHelpWhatsThis - > setWhatsThis ( whatsThisFrom ( " Help|What's This? " ) ) ;
actionHelpWhatsThis - > setWhatsThis ( whatsThisFrom ( " Help|What's This? " ) ) ;
connect ( actionHelpWhatsThis , TQT_SIGNAL ( activated ( ) ) , TQT_TQOBJECT ( this ) , TQT_SLOT ( whatsThis ( ) ) ) ;
connect ( actionHelpWhatsThis , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( whatsThis ( ) ) ) ;
/* TQToolBar *tb = new TQToolBar( this, "Help" );
/* TQToolBar *tb = new TQToolBar( this, "Help" );
tb - > setCloseMode ( TQDockWindow : : Undocked ) ;
tb - > setCloseMode ( TQDockWindow : : Undocked ) ;
@ -1044,13 +1044,13 @@ void MainWindow::fileNewDialog()
currentProject - > setModified ( TRUE ) ;
currentProject - > setModified ( TRUE ) ;
workspace ( ) - > update ( ) ;
workspace ( ) - > update ( ) ;
fw - > setProject ( currentProject ) ;
fw - > setProject ( currentProject ) ;
MetaDataBase : : addEntry ( TQT_TQOBJECT( fw) ) ;
MetaDataBase : : addEntry ( fw ) ;
TQWidget * w = WidgetFactory : : create ( WidgetDatabase : : idFromClassName ( " TQDialog " ) , fw , n . latin1 ( ) ) ;
TQWidget * w = WidgetFactory : : create ( WidgetDatabase : : idFromClassName ( " TQDialog " ) , fw , n . latin1 ( ) ) ;
fw - > setMainContainer ( w ) ;
fw - > setMainContainer ( w ) ;
fw - > setCaption ( n ) ;
fw - > setCaption ( n ) ;
fw - > resize ( 600 , 480 ) ;
fw - > resize ( 600 , 480 ) ;
insertFormWindow ( fw ) ;
insertFormWindow ( fw ) ;
fw - > killAccels ( TQT_TQOBJECT( fw) ) ;
fw - > killAccels ( fw ) ;
fw - > project ( ) - > setModified ( TRUE ) ;
fw - > project ( ) - > setModified ( TRUE ) ;
fw - > setFocus ( ) ;
fw - > setFocus ( ) ;
fw - > setSavePixmapInProject ( TRUE ) ;
fw - > setSavePixmapInProject ( TRUE ) ;
@ -1542,7 +1542,7 @@ void MainWindow::editPaste()
if ( l . count ( ) = = 1 ) {
if ( l . count ( ) = = 1 ) {
w = l . first ( ) ;
w = l . first ( ) ;
if ( WidgetFactory : : layoutType ( w ) ! = WidgetFactory : : NoLayout | |
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 ( ) ) )
w = formWindow ( ) - > mainContainer ( ) ;
w = formWindow ( ) - > mainContainer ( ) ;
}
}
@ -1761,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor()
}
}
if ( ! editor )
if ( ! editor )
editor = createSourceEditor ( TQT_TQOBJECT( formWindow( ) ) , formWindow ( ) - > project ( ) , lang ) ;
editor = createSourceEditor ( formWindow( ) , formWindow ( ) - > project ( ) , lang ) ;
return editor ;
return editor ;
}
}