@ -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 ( ) ) ) ;
connect ( actionEditUndo , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditRedo , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditCut , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditCopy , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditPaste , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditDelete , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditSelectAll , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditRaise , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditLower , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( actionEditAccels , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editAccels ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditAccels , TQT_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 ( actionEditFunctions , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editFunctions ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFunctions , TQT_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 ( actionEditConnections , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editConnections ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditConnections , TQT_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 ( actionEditSource , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editSource ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditSource , TQT_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 ( actionEditFormSettings , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editFormSettings ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , actionEditFormSettings , TQT_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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 , TQT_SIGNAL ( aboutToShow ( ) ) , this , TQT_SLOT ( updateEditorUndoRedo ( ) ) ) ;
menubar - > insertItem ( i18n ( " &Edit " ) , menu ) ;
actionEditUndo - > addTo ( menu ) ;
actionEditRedo - > addTo ( menu ) ;
@ -269,26 +269,26 @@ 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 ( ) ) ) ;
i18n ( " &Find... " ) , CTRL + Key_F , this , 0 ) ;
connect ( actionSearchFind , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
i18n ( " Find &Incremental " ) , ALT + Key_I , this , 0 ) ;
connect ( actionSearchIncremetal , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
i18n ( " &Replace... " ) , CTRL + Key_R , this , 0 ) ;
connect ( actionSearchReplace , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
i18n ( " &Goto Line... " ) , ALT + Key_G , this , 0 ) ;
connect ( actionSearchGotoLine , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( searchGotoLine ( ) ) ) ;
actionSearchGotoLine - > setEnabled ( FALSE ) ;
actionSearchGotoLine - > setWhatsThis ( whatsThisFrom ( " Search|Goto line " ) ) ;
@ -320,56 +320,56 @@ 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 * ) ) ) ;
connect ( actionGroupTools , TQT_SIGNAL ( selected ( TQAction * ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditAdjustSize , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditHLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditVLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditGridLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditSplitHorizontal , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditSplitVertical , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( ) ) ) ;
connect ( actionEditBreakLayout , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editBreakLayout ( ) ) ) ;
actionEditBreakLayout - > setEnabled ( FALSE ) ;
int id = WidgetDatabase : : idFromClassName ( " Spacer " ) ;
@ -487,7 +487,7 @@ 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 "
@ -602,10 +602,10 @@ void MainWindow::setupToolActions()
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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_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,7 +633,7 @@ 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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileNew ( ) ) ) ;
a - > addTo ( tb ) ;
a - > addTo ( fileMenu ) ;
actionNewFile = a ;
@ -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 , 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 - > 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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_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 ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileClose ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_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 ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSave ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_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 ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSaveAs ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindow ( bool ) ) , a , TQT_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 ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileSaveAll ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveWindowOrProject ( bool ) ) , a , TQT_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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileCreateTemplate ( ) ) ) ;
if ( ! singleProject )
a - > addTo ( fileMenu ) ;
@ -767,7 +767,7 @@ void MainWindow::setupFileActions()
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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( fileQuit ( ) ) ) ;
a - > addTo ( fileMenu ) ;
}
@ -792,8 +792,8 @@ void MainWindow::setupProjectActions()
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 ( ) ) ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , this , TQT_SLOT ( projectSelected ( TQAction * ) ) ) ;
connect ( ag , TQT_SIGNAL ( selected ( TQAction * ) ) , 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 ) ;
projects . insert ( a , eProject ) ;
@ -805,31 +805,31 @@ 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 ( ) ) ) ;
connect ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( projectInsertFile ( ) ) ) ;
a - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , a , TQT_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 ( ) ) ) ;
connect ( actionEditPixmapCollection , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editPixmapCollection ( ) ) ) ;
actionEditPixmapCollection - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditPixmapCollection , TQT_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 ( ) ) ) ;
connect ( actionEditDatabaseConnections , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editDatabaseConnections ( ) ) ) ;
//actionEditDatabaseConnections->setEnabled( FALSE );
//connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) );
if ( ! singleProject )
@ -837,10 +837,10 @@ void MainWindow::setupProjectActions()
# 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 ( ) ) ) ;
connect ( actionEditProjectSettings , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( editProjectSettings ( ) ) ) ;
actionEditProjectSettings - > setEnabled ( FALSE ) ;
connect ( this , TQT_SIGNAL ( hasNonDummyProject ( bool ) ) , actionEditProjectSettings , TQT_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 ( a , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( previewForm ( ) ) ) ;
connect ( this , TQT_SIGNAL ( hasActiveForm ( bool ) ) , a , TQT_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 , TQT_SIGNAL ( mapped ( const TQString & ) ) , this , TQT_SLOT ( previewForm ( const TQString & ) ) ) ;
TQStringList styles = TQStyleFactory : : keys ( ) ;
for ( TQStringList : : Iterator it = styles . begin ( ) ; it ! = styles . end ( ) ; + + it ) {
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. " ) ;
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 "
@ -902,31 +902,31 @@ void MainWindow::setupWindowActions()
if ( ! windowActionsSetup ) {
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 ) ) ;
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 ( ) ) ) ;
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 ( ) ) ) ;
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 ( ) ) ) ;
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 ( ) ) ) ;
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 ( ) ) ) ;
@ -971,7 +971,7 @@ void MainWindow::setupWindowActions()
else
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 - > setItemChecked ( id , qworkspace - > activeWindow ( ) = = windows . at ( i ) ) ;
}
@ -979,31 +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 , 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 - > 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 - > 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 - > 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 ) ,
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 , TQT_SIGNAL ( activated ( ) ) , this , TQT_SLOT ( whatsThis ( ) ) ) ;
/* TQToolBar *tb = new TQToolBar( this, "Help" );
tb - > setCloseMode ( TQDockWindow : : Undocked ) ;
@ -1044,13 +1044,13 @@ void MainWindow::fileNewDialog()
currentProject - > setModified ( TRUE ) ;
workspace ( ) - > update ( ) ;
fw - > setProject ( currentProject ) ;
MetaDataBase : : addEntry ( TQT_TQOBJECT( fw) ) ;
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 - > killAccels ( fw ) ;
fw - > project ( ) - > setModified ( TRUE ) ;
fw - > setFocus ( ) ;
fw - > setSavePixmapInProject ( TRUE ) ;
@ -1542,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 ( ) ;
}
@ -1761,7 +1761,7 @@ SourceEditor *MainWindow::openSourceEditor()
}
if ( ! editor )
editor = createSourceEditor ( TQT_TQOBJECT( formWindow( ) ) , formWindow ( ) - > project ( ) , lang ) ;
editor = createSourceEditor ( formWindow( ) , formWindow ( ) - > project ( ) , lang ) ;
return editor ;
}