diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f80efda9d9..74d5820061 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-26 22:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbide/hbqreportsmanager.prg + * contrib/hbide/idedocwriter.prg + * contrib/hbide/ideenviron.prg + * contrib/hbide/idefindreplace.prg + * contrib/hbide/idefunctions.prg + * contrib/hbide/ideharbourhelp.prg + * contrib/hbide/ideprojmanager.prg + * contrib/hbide/ideshortcuts.prg + * contrib/hbide/idethemes.prg + ! 2nd round of Slots/Events reforms. + Still some margin of regression is possible. Please report. + + * contrib/hbqt/qtgui/THbQtUI.prg + - :signal() and :event() methods. + 2010-08-26 21:58 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbide/idedocks.prg % An important arti-fix. diff --git a/harbour/contrib/hbide/hbqreportsmanager.prg b/harbour/contrib/hbide/hbqreportsmanager.prg index 87963e40ff..0bcde9ddc6 100644 --- a/harbour/contrib/hbide/hbqreportsmanager.prg +++ b/harbour/contrib/hbide/hbqreportsmanager.prg @@ -621,7 +621,7 @@ METHOD HbqReportsManager:buildReportStream() aadd( txt_, "[GENERAL]" ) aadd( txt_, "" ) - aadd( txt_, "Symposis" + "=" + "HBReportDesigner" ) + aadd( txt_, "Symposis" + "=" + "HBReportsManager" ) aadd( txt_, "Version" + "=" + hb_ntos( ::version ) ) aadd( txt_, "Title" + "=" + ::title ) aadd( txt_, "Author" + "=" + ::author ) @@ -1029,20 +1029,20 @@ METHOD HbqReportsManager:buildToolbar() ::qToolbar:orientation := Qt_Horizontal ::qToolbar:create( "ReportManager_Top_Toolbar" ) - ::qToolbar:addToolButton( "New" , "New Report" , app_image( "new" ), {|| ::execEvent( "buttonNew_clicked" ) } ) - ::qToolbar:addToolButton( "Open" , "Open Report" , app_image( "open3" ), {|| ::execEvent( "buttonOpen_clicked" ) } ) - ::qToolbar:addToolButton( "Save" , "Save Report" , app_image( "save3" ), {|| ::execEvent( "buttonSave_clicked" ) } ) - ::qToolbar:addToolButton( "Close" , "Close Report" , app_image( "close3" ), {|| ::execEvent( "buttonClose_clicked" ) } ) - ::qToolbar:addToolButton( "Print" , "Print Report" , app_image( "print" ), {|| ::execEvent( "buttonPrint_clicked" ) } ) + ::qToolbar:addToolButton( "New" , "New Report" , app_image( "new" ), {|| ::execEvent( "buttonNew_clicked" ) } ) + ::qToolbar:addToolButton( "Open" , "Open Report" , app_image( "open3" ), {|| ::execEvent( "buttonOpen_clicked" ) } ) + ::qToolbar:addToolButton( "Save" , "Save Report" , app_image( "save3" ), {|| ::execEvent( "buttonSave_clicked" ) } ) + ::qToolbar:addToolButton( "Close" , "Close Report" , app_image( "close3" ), {|| ::execEvent( "buttonClose_clicked" ) } ) + ::qToolbar:addToolButton( "Print" , "Print Report" , app_image( "print" ), {|| ::execEvent( "buttonPrint_clicked" ) } ) ::qToolbar:addSeparator() - ::qToolbar:addToolButton( "ToBack" , "Push to back" , app_image( "toback" ), {|| ::execEvent( "buttonToBack_clicked" ) }, .f., .f. ) - ::qToolbar:addToolButton( "ToFront", "Bring to front", app_image( "tofront" ), {|| ::execEvent( "buttonToFront_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "ToBack" , "Push to back" , app_image( "toback" ), {|| ::execEvent( "buttonToBack_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "ToFront" , "Bring to front" , app_image( "tofront" ), {|| ::execEvent( "buttonToFront_clicked" ) }, .f., .f. ) ::qToolbar:addSeparator() - ::qToolbar:addToolButton( "RotateL", "Rotate anti-clock wise", app_image( "unload_1" ), {|| ::execEvent( "buttonRotateL_clicked" ) }, .f., .f. ) - ::qToolbar:addToolButton( "RotateR", "Rotate clock wise" , app_image( "load_1" ), {|| ::execEvent( "buttonRotateR_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "RotateL" , "Rotate anti-clock wise", app_image( "unload_1" ), {|| ::execEvent( "buttonRotateL_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "RotateR" , "Rotate clock wise" , app_image( "load_1" ), {|| ::execEvent( "buttonRotateR_clicked" ) }, .f., .f. ) ::qToolbar:addSeparator() - ::qToolbar:addToolButton( "Portrait" , "Portrait orientation" , app_image( "r-portrait" ), {|| ::execEvent( "buttonPortrait_clicked" ) }, .f., .f. ) - ::qToolbar:addToolButton( "Landscape", "Landscape orientation", app_image( "r-landscape" ), {|| ::execEvent( "buttonLandscape_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "Portrait" , "Portrait orientation" , app_image( "r-portrait" ), {|| ::execEvent( "buttonPortrait_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "Landscape", "Landscape orientation" , app_image( "r-landscape" ), {|| ::execEvent( "buttonLandscape_clicked" ) }, .f., .f. ) ::qToolbar:addSeparator() RETURN Self @@ -1139,22 +1139,17 @@ STATIC FUNCTION rmgr_a2arrayStr( aArray ) FOR EACH x IN aArray SWITCH valtype( x ) CASE "C" - s += '"' + x + '"' - EXIT + s += '"' + x + '"' ; EXIT CASE "N" - s += hb_ntos( x ) - EXIT + s += hb_ntos( x ) ; EXIT CASE "D" - s += "stod(" + dtos( x ) + ")" - EXIT + s += "stod(" + dtos( x ) + ")" ; EXIT CASE "L" - s += iif( x, ".t.", ".f." ) - EXIT + s += iif( x, ".t.", ".f." ) ; EXIT CASE "A" - s += rmgr_a2arrayStr( x ) - EXIT + s += rmgr_a2arrayStr( x ) ; EXIT OTHERWISE - s += "NIL" + s += "NIL" ; EXIT ENDSWITCH s += "," NEXT diff --git a/harbour/contrib/hbide/idedocwriter.prg b/harbour/contrib/hbide/idedocwriter.prg index c92b614502..ad668643eb 100644 --- a/harbour/contrib/hbide/idedocwriter.prg +++ b/harbour/contrib/hbide/idedocwriter.prg @@ -253,21 +253,18 @@ METHOD IdeDocWriter:setImages() METHOD IdeDocWriter:installSignals() - ::oUI:signal( "buttonArgs" , "toggled(bool)", {|p| ::execEvent( buttonArgs_clicked , p ) } ) - ::oUI:signal( "buttonDesc" , "toggled(bool)", {|p| ::execEvent( buttonDesc_clicked , p ) } ) - ::oUI:signal( "buttonExamples" , "toggled(bool)", {|p| ::execEvent( buttonExample_clicked , p ) } ) - ::oUI:signal( "buttonTests" , "toggled(bool)", {|p| ::execEvent( buttonTests_clicked , p ) } ) - - ::oUI:signal( "buttonCloseArgs" , "clicked()" , {| | ::execEvent( buttonCloseArgs_clicked ) } ) - ::oUI:signal( "buttonCloseDesc" , "clicked()" , {| | ::execEvent( buttonCloseDesc_clicked ) } ) - ::oUI:signal( "buttonCloseExamples" , "clicked()" , {| | ::execEvent( buttonCloseExample_clicked ) } ) - ::oUI:signal( "buttonCloseTests" , "clicked()" , {| | ::execEvent( buttonCloseTests_clicked ) } ) - - ::oUI:signal( "buttonClear" , "clicked()" , {| | ::execEvent( buttonClear_clicked ) } ) - ::oUI:signal( "buttonSaveInFunc" , "clicked()" , {| | ::execEvent( buttonSaveInFunc_clicked ) } ) - ::oUI:signal( "buttonSave" , "clicked()" , {| | ::execEvent( buttonSave_clicked ) } ) - - ::oUI:signal( "buttonLoadFromCurFunc", "clicked()" , {|| ::execEvent( buttonLoadFromCurFunc_clicked ) } ) + ::oUI:q_buttonArgs :connect( "toggled(bool)", {|p| ::execEvent( buttonArgs_clicked , p ) } ) + ::oUI:q_buttonDesc :connect( "toggled(bool)", {|p| ::execEvent( buttonDesc_clicked , p ) } ) + ::oUI:q_buttonExamples :connect( "toggled(bool)", {|p| ::execEvent( buttonExample_clicked , p ) } ) + ::oUI:q_buttonTests :connect( "toggled(bool)", {|p| ::execEvent( buttonTests_clicked , p ) } ) + ::oUI:q_buttonCloseArgs :connect( "clicked()" , {| | ::execEvent( buttonCloseArgs_clicked ) } ) + ::oUI:q_buttonCloseDesc :connect( "clicked()" , {| | ::execEvent( buttonCloseDesc_clicked ) } ) + ::oUI:q_buttonCloseExamples :connect( "clicked()" , {| | ::execEvent( buttonCloseExample_clicked ) } ) + ::oUI:q_buttonCloseTests :connect( "clicked()" , {| | ::execEvent( buttonCloseTests_clicked ) } ) + ::oUI:q_buttonClear :connect( "clicked()" , {| | ::execEvent( buttonClear_clicked ) } ) + ::oUI:q_buttonSaveInFunc :connect( "clicked()" , {| | ::execEvent( buttonSaveInFunc_clicked ) } ) + ::oUI:q_buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } ) + ::oUI:q_buttonLoadFromCurFunc:connect( "clicked()" , {|| ::execEvent( buttonLoadFromCurFunc_clicked ) } ) RETURN Self diff --git a/harbour/contrib/hbide/ideenviron.prg b/harbour/contrib/hbide/ideenviron.prg index b3828e2b42..a5306ef4d5 100644 --- a/harbour/contrib/hbide/ideenviron.prg +++ b/harbour/contrib/hbide/ideenviron.prg @@ -218,9 +218,9 @@ METHOD IdeEnvironments:show() ::oEnvironDock:oWidget:setWidget( ::oUI ) - ::oUI:signal( "buttonCn" , "clicked()", {|| ::oEnvironDock:hide() } ) - ::oUI:signal( "buttonSave" , "clicked()", {|| ::saveEnv() } ) - ::oUI:signal( "buttonSaveExit", "clicked()", {|| ::saveEnv(), ::oEnvironDock:hide() } ) + ::oUI:q_buttonCn :connect( "clicked()", {|| ::oEnvironDock:hide() } ) + ::oUI:q_buttonSave :connect( "clicked()", {|| ::saveEnv() } ) + ::oUI:q_buttonSaveExit:connect( "clicked()", {|| ::saveEnv(), ::oEnvironDock:hide() } ) ::oUI:q_editCompilers:setFont( ::oFont:oWidget ) ENDIF diff --git a/harbour/contrib/hbide/idefindreplace.prg b/harbour/contrib/hbide/idefindreplace.prg index af02953c30..01ddbec073 100644 --- a/harbour/contrib/hbide/idefindreplace.prg +++ b/harbour/contrib/hbide/idefindreplace.prg @@ -154,23 +154,23 @@ METHOD IdeUpDown:create( oIde ) ::oUI:q_buttonPrev:setIcon( hbide_image( "go-prev" ) ) ::oUI:q_buttonPrev:setToolTip( "Find Previous" ) - ::oUI:signal( "buttonPrev", "clicked()", {|| ::execEvent( "buttonPrev_clicked" ) } ) + ::oUI:q_buttonPrev:connect( "clicked()", {|| ::execEvent( "buttonPrev_clicked" ) } ) // ::oUI:q_buttonNext:setIcon( hbide_image( "go-next" ) ) ::oUI:q_buttonNext:setToolTip( "Find Next" ) - ::oUI:signal( "buttonNext", "clicked()", {|| ::execEvent( "buttonNext_clicked" ) } ) + ::oUI:q_buttonNext:connect( "clicked()", {|| ::execEvent( "buttonNext_clicked" ) } ) // ::oUI:q_buttonFirst:setIcon( hbide_image( "go-first" ) ) ::oUI:q_buttonFirst:setToolTip( "Find First" ) - ::oUI:signal( "buttonFirst", "clicked()", {|| ::execEvent( "buttonFirst_clicked" ) } ) + ::oUI:q_buttonFirst:connect( "clicked()", {|| ::execEvent( "buttonFirst_clicked" ) } ) // ::oUI:q_buttonLast:setIcon( hbide_image( "go-last" ) ) ::oUI:q_buttonLast:setToolTip( "Find Last" ) - ::oUI:signal( "buttonLast", "clicked()", {|| ::execEvent( "buttonLast_clicked" ) } ) + ::oUI:q_buttonLast:connect( "clicked()", {|| ::execEvent( "buttonLast_clicked" ) } ) // ::oUI:q_buttonAll:setIcon( hbide_image( "hilight-all" ) ) ::oUI:q_buttonAll:setToolTip( "Highlight All" ) - ::oUI:signal( "buttonAll", "clicked()", {|| ::execEvent( "buttonAll_clicked" ) } ) + ::oUI:q_buttonAll:connect( "clicked()", {|| ::execEvent( "buttonAll_clicked" ) } ) RETURN Self @@ -263,18 +263,18 @@ METHOD IdeSearchReplace:create( oIde ) ::oUI:q_buttonClose:setIcon( hbide_image( "closetab" ) ) ::oUI:q_buttonClose:setToolTip( "Close" ) - ::oUI:signal( "buttonClose", "clicked()", {|| ::oUI:hide() } ) + ::oUI:q_buttonClose:connect( "clicked()", {|| ::oUI:hide() } ) ::oUI:q_buttonNext:setIcon( hbide_image( "next" ) ) ::oUI:q_buttonNext:setToolTip( "Find Next" ) - ::oUI:signal( "buttonNext", "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } ) + ::oUI:q_buttonNext:connect( "clicked()", {|| ::find( ::cFind ), ::oIde:manageFocusInEditor() } ) ::oUI:q_buttonPrev:setIcon( hbide_image( "previous" ) ) ::oUI:q_buttonPrev:setToolTip( "Find Previous" ) - ::oUI:signal( "buttonPrev", "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } ) + ::oUI:q_buttonPrev:connect( "clicked()", {|| ::find( ::cFind, .t. ), ::oIde:manageFocusInEditor() } ) ::oUI:q_checkReplace:setChecked( 0 ) - ::oUI:signal( "checkReplace", "stateChanged(int)", {|i| ; + ::oUI:q_checkReplace:connect( "stateChanged(int)", {|i| ; ::oUI:q_comboReplace:setEnabled( i == 2 ), ; ::oUI:q_buttonReplace:setEnabled( i == 2 ), ; iif( i == 2, ::oUI:q_frameReplace:show(), ::oUI:q_frameReplace:hide() ) } ) @@ -478,17 +478,12 @@ METHOD IdeFindReplace:create( oIde ) ::oUI:q_radioFromCursor:setChecked( .t. ) ::oUI:q_radioDown:setChecked( .t. ) - ::oUI:signal( "buttonFind" , "clicked()", {|| ::onClickFind() } ) - ::oUI:signal( "buttonReplace", "clicked()", {|| ::onClickReplace() } ) - ::oUI:signal( "buttonClose" , "clicked()", ; - {|| ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ), ::oUI:hide() } ) - - ::oUI:signal( "comboFindWhat", "editTextChanged(QString)", {|| ::oUI:q_radioEntire:setChecked( .t. ) } ) - - ::oUI:signal( "comboFindWhat", "currentIndexChanged(QString)", ; - {|p| ::oIde:oSBar:getItem( SB_PNL_SEARCH ):caption := "FIND: " + p } ) - - ::oUI:signal( "checkListOnly", "stateChanged(int)", {|p| ; + ::oUI:q_buttonFind :connect( "clicked()", {|| ::onClickFind() } ) + ::oUI:q_buttonReplace:connect( "clicked()", {|| ::onClickReplace() } ) + ::oUI:q_buttonClose :connect( "clicked()", {|| ::oIde:oINI:cFindDialogGeometry := hbide_posAndSize( ::oUI:oWidget ), ::oUI:hide() } ) + ::oUI:q_comboFindWhat:connect( "editTextChanged(QString)", {|| ::oUI:q_radioEntire:setChecked( .t. ) } ) + ::oUI:q_comboFindWhat:connect( "currentIndexChanged(QString)", {|p| ::oIde:oSBar:getItem( SB_PNL_SEARCH ):caption := "FIND: " + p } ) + ::oUI:q_checkListOnly:connect( "stateChanged(int)", {|p| ; ::oUI:q_comboReplaceWith:setEnabled( p == 0 ), ; iif( p == 1, ::oUI:q_buttonReplace:setEnabled( .f. ), NIL ) } ) @@ -845,17 +840,17 @@ METHOD IdeFindInFiles:buildUI() /* Attach all signals */ // - ::oUI:signal( "buttonClose" , "clicked()" , {| | ::execEvent( "buttonClose" ) } ) - ::oUI:signal( "buttonFolder" , "clicked()" , {| | ::execEvent( "buttonFolder" ) } ) - ::oUI:signal( "buttonFind" , "clicked()" , {| | ::execEvent( "buttonFind" ) } ) - ::oUI:signal( "buttonRepl" , "clicked()" , {| | ::execEvent( "buttonRepl" ) } ) - ::oUI:signal( "buttonStop" , "clicked()" , {| | ::execEvent( "buttonStop" ) } ) - ::oUI:signal( "checkAll" , "stateChanged(int)" , {|p| ::execEvent( "checkAll", p ) } ) - ::oUI:signal( "comboExpr" , "currentIndexChanged(QString)", {|p| ::execEvent( "comboFind", p ) } ) - ::oUI:signal( "checkListOnly", "stateChanged(int)" , {|p| ::execEvent( "checkListOnly", p ) } ) - ::oUI:signal( "checkFolders" , "stateChanged(int)" , {|p| ::execEvent( "checkFolders", p ) } ) - ::oUI:signal( "editResults" , "copyAvailable(bool)" , {|l| ::execEvent( "editResults", l ) } ) - ::oUI:signal( "editResults" , "customContextMenuRequested(QPoint)", {|p| ::execEvent( "editResults-contextMenu", p ) } ) + ::oUI:q_buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose" ) } ) + ::oUI:q_buttonFolder :connect( "clicked()" , {| | ::execEvent( "buttonFolder" ) } ) + ::oUI:q_buttonFind :connect( "clicked()" , {| | ::execEvent( "buttonFind" ) } ) + ::oUI:q_buttonRepl :connect( "clicked()" , {| | ::execEvent( "buttonRepl" ) } ) + ::oUI:q_buttonStop :connect( "clicked()" , {| | ::execEvent( "buttonStop" ) } ) + ::oUI:q_checkAll :connect( "stateChanged(int)" , {|p| ::execEvent( "checkAll", p ) } ) + ::oUI:q_comboExpr :connect( "currentIndexChanged(QString)", {|p| ::execEvent( "comboFind", p ) } ) + ::oUI:q_checkListOnly:connect( "stateChanged(int)" , {|p| ::execEvent( "checkListOnly", p ) } ) + ::oUI:q_checkFolders :connect( "stateChanged(int)" , {|p| ::execEvent( "checkFolders", p ) } ) + ::oUI:q_editResults :connect( "copyAvailable(bool)" , {|l| ::execEvent( "editResults", l ) } ) + ::oUI:q_editResults :connect( "customContextMenuRequested(QPoint)", {|p| ::execEvent( "editResults-contextMenu", p ) } ) ::qEditFind := QLineEdit():from( ::oUI:q_comboExpr:lineEdit() ) ::qEditFind:connect( "returnPressed()", {|| ::execEvent( "buttonFind" ) } ) diff --git a/harbour/contrib/hbide/idefunctions.prg b/harbour/contrib/hbide/idefunctions.prg index eeeaeef635..572803ed37 100644 --- a/harbour/contrib/hbide/idefunctions.prg +++ b/harbour/contrib/hbide/idefunctions.prg @@ -135,16 +135,14 @@ METHOD IdeFunctions:create( oIde ) ::buildHeader() - ::oUI:signal( "editFunction" , "textChanged(QString)" , {|p| ::execEvent( "editFunc_textChanged", p ) } ) - ::oUI:signal( "editFunction" , "returnPressed()" , {| | ::execEvent( "editFunc_returnPressed" ) } ) - // - ::oUI:signal( "buttonMark" , "clicked()" , {| | ::execEvent( "buttonMark_clicked" ) } ) - ::oUI:signal( "buttonLoad" , "clicked()" , {| | ::execEvent( "buttonLoad_clicked" ) } ) - ::oUI:signal( "buttonTag" , "clicked()" , {| | ::execEvent( "buttonTag_clicked" ) } ) - ::oUI:signal( "buttonClose" , "clicked()" , {| | ::execEvent( "buttonClose_clicked" ) } ) - // - ::oUI:signal( "tableFuncList", "itemSelectionChanged()" , {| | ::execEvent( "tableFuncList_itemSelectionChanged" ) } ) - ::oUI:signal( "tableFuncList", "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( "tableFuncList_itemDoubleClicked", p ) } ) + ::oUI:q_editFunction :connect( "textChanged(QString)" , {|p| ::execEvent( "editFunc_textChanged", p ) } ) + ::oUI:q_editFunction :connect( "returnPressed()" , {| | ::execEvent( "editFunc_returnPressed" ) } ) + ::oUI:q_buttonMark :connect( "clicked()" , {| | ::execEvent( "buttonMark_clicked" ) } ) + ::oUI:q_buttonLoad :connect( "clicked()" , {| | ::execEvent( "buttonLoad_clicked" ) } ) + ::oUI:q_buttonTag :connect( "clicked()" , {| | ::execEvent( "buttonTag_clicked" ) } ) + ::oUI:q_buttonClose :connect( "clicked()" , {| | ::execEvent( "buttonClose_clicked" ) } ) + ::oUI:q_tableFuncList:connect( "itemSelectionChanged()" , {| | ::execEvent( "tableFuncList_itemSelectionChanged" ) } ) + ::oUI:q_tableFuncList:connect( "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( "tableFuncList_itemDoubleClicked", p ) } ) RETURN Self diff --git a/harbour/contrib/hbide/ideharbourhelp.prg b/harbour/contrib/hbide/ideharbourhelp.prg index f8504daea2..0e334d6d71 100644 --- a/harbour/contrib/hbide/ideharbourhelp.prg +++ b/harbour/contrib/hbide/ideharbourhelp.prg @@ -385,25 +385,6 @@ METHOD IdeHarbourHelp:setParameters() METHOD IdeHarbourHelp:installSignals() - #if 0 - ::oUI:signal( "buttonInstall" , "clicked()" , {| | ::execEvent( "buttonInstall_clicked" ) } ) - ::oUI:signal( "buttonHome" , "clicked()" , {| | ::execEvent( "buttonHome_clicked" ) } ) - ::oUI:signal( "buttonBackward", "clicked()" , {| | ::execEvent( "buttonBackward_clicked" ) } ) - ::oUI:signal( "buttonForward" , "clicked()" , {| | ::execEvent( "buttonForward_clicked" ) } ) - ::oUI:signal( "buttonUp" , "clicked()" , {| | ::execEvent( "buttonUp_clicked" ) } ) - ::oUI:signal( "buttonRefresh" , "clicked()" , {| | ::execEvent( "buttonRefresh_clicked" ) } ) - ::oUI:signal( "buttonPrint" , "clicked()" , {| | ::execEvent( "buttonPrint_clicked" ) } ) - ::oUI:signal( "buttonPdf" , "clicked()" , {| | ::execEvent( "buttonPdf_clicked" ) } ) - - ::oUI:signal( "browserView" , "anchorClicked(QUrl)" , {|p| ::execEvent( "browserView_anchorClicked" , p ) } ) - ::oUI:signal( "tabWidgetContents", "currentChanged(int)" , {|p| ::execEvent( "tabWidgetContents_currentChanged", p ) } ) - - ::oUI:signal( "editInstall" , "textChanged(QString)" , {|p| ::execEvent( "editInstall_textChanged" , p ) } ) - ::oUI:signal( "editIndex" , "textChanged(QString)" , {|p| ::execEvent( "editIndex_textChanged" , p ) } ) - ::oUI:signal( "editIndex" , "returnPressed()" , {| | ::execEvent( "editIndex_returnPressed" ) } ) - ::oUI:signal( "listIndex" , "itemDoubleClicked(QLWItem)", {|p| ::execEvent( "listIndex_ItemDoubleClicked" , p ) } ) - #endif - ::oUI:q_buttonInstall :connect( "clicked()" , {| | ::execEvent( "buttonInstall_clicked" ) } ) ::oUI:q_buttonHome :connect( "clicked()" , {| | ::execEvent( "buttonHome_clicked" ) } ) ::oUI:q_buttonBackward :connect( "clicked()" , {| | ::execEvent( "buttonBackward_clicked" ) } ) diff --git a/harbour/contrib/hbide/ideprojmanager.prg b/harbour/contrib/hbide/ideprojmanager.prg index a850863c84..ea85488689 100644 --- a/harbour/contrib/hbide/ideprojmanager.prg +++ b/harbour/contrib/hbide/ideprojmanager.prg @@ -753,23 +753,19 @@ METHOD IdeProjManager:buildInterface() ::oUI:q_buttonSortZA :setIcon( hbide_image( "sortdescend" ) ) ::oUI:q_buttonSortOrg:setIcon( hbide_image( "invertcase" ) ) - ::oUI:signal( "buttonCn" , "clicked()", {|| ::lSaveOK := .f., ::oPropertiesDock:hide() } ) - ::oUI:signal( "buttonSave" , "clicked()", {|| ::lSaveOK := .t., ::save( .F. ) } ) - ::oUI:signal( "buttonSaveExit" , "clicked()", {|| ::lSaveOK := .t., ::save( .T. ) } ) - // - ::oUI:signal( "buttonSelect" , "clicked()", {|| ::addSources() } ) - ::oUI:signal( "buttonSort" , "clicked()", {|| ::sortSources( "az" ) } ) - ::oUI:signal( "buttonSortZA" , "clicked()", {|| ::sortSources( "za" ) } ) - ::oUI:signal( "buttonSortOrg" , "clicked()", {|| ::sortSources( "org" ) } ) - // - ::oUI:signal( "tabWidget" , "currentChanged(int)", {|p| ::updateHbp( p ) } ) - - ::oUI:signal( "buttonChoosePrjLoc", "clicked()", {|| ::PromptForPath( 'editPrjLoctn' , 'Choose Project Location...' ) } ) - ::oUI:signal( "buttonChooseWd" , "clicked()", {|| ::PromptForPath( 'editWrkFolder', 'Choose Working Folder...' ) } ) - ::oUI:signal( "buttonChooseDest" , "clicked()", {|| ::PromptForPath( 'editDstFolder', 'Choose Destination Folder...' ) } ) - ::oUI:signal( "buttonBackup" , "clicked()", {|| ::PromptForPath( 'editBackup' , 'Choose Backup Folder...' ) } ) - - ::oUI:signal( "editPrjLoctn" , "textChanged(QString)", {|cPath| ::setProjectLocation( cPath ) } ) + ::oUI:q_buttonCn :connect( "clicked()", {|| ::lSaveOK := .f., ::oPropertiesDock:hide() } ) + ::oUI:q_buttonSave :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .F. ) } ) + ::oUI:q_buttonSaveExit :connect( "clicked()", {|| ::lSaveOK := .t., ::save( .T. ) } ) + ::oUI:q_buttonSelect :connect( "clicked()", {|| ::addSources() } ) + ::oUI:q_buttonSort :connect( "clicked()", {|| ::sortSources( "az" ) } ) + ::oUI:q_buttonSortZA :connect( "clicked()", {|| ::sortSources( "za" ) } ) + ::oUI:q_buttonSortOrg :connect( "clicked()", {|| ::sortSources( "org" ) } ) + ::oUI:q_tabWidget :connect( "currentChanged(int)", {|p| ::updateHbp( p ) } ) + ::oUI:q_buttonChoosePrjLoc:connect( "clicked()", {|| ::PromptForPath( 'editPrjLoctn' , 'Choose Project Location...' ) } ) + ::oUI:q_buttonChooseWd :connect( "clicked()", {|| ::PromptForPath( 'editWrkFolder', 'Choose Working Folder...' ) } ) + ::oUI:q_buttonChooseDest :connect( "clicked()", {|| ::PromptForPath( 'editDstFolder', 'Choose Destination Folder...' ) } ) + ::oUI:q_buttonBackup :connect( "clicked()", {|| ::PromptForPath( 'editBackup' , 'Choose Backup Folder...' ) } ) + ::oUI:q_editPrjLoctn :connect( "textChanged(QString)", {|cPath| ::setProjectLocation( cPath ) } ) /* Set monospaced fonts */ ::oUI:q_editFlags :setFont( ::oFont:oWidget ) @@ -1067,8 +1063,8 @@ METHOD IdeProjManager:selectCurrentProject() ENDIF NEXT - oDlg:signal( "btnCancel", "clicked()", {|| oDlg:oWidget:done( 1 ) } ) - oDlg:signal( "btnOk" , "clicked()", {|| ::setCurrentProject( oDlg:qObj[ "cbProjects" ]:currentText() ), ; + oDlg:q_btnCancel:connect( "clicked()", {|| oDlg:oWidget:done( 1 ) } ) + oDlg:q_btnOk :connect( "clicked()", {|| ::setCurrentProject( oDlg:qObj[ "cbProjects" ]:currentText() ), ; oDlg:done( 1 ) } ) oDlg:exec() oDlg:destroy() diff --git a/harbour/contrib/hbide/ideshortcuts.prg b/harbour/contrib/hbide/ideshortcuts.prg index f0279a76b0..6b4d521fef 100644 --- a/harbour/contrib/hbide/ideshortcuts.prg +++ b/harbour/contrib/hbide/ideshortcuts.prg @@ -584,20 +584,18 @@ METHOD IdeShortcuts:buildUI() METHOD IdeShortcuts:buildSignals() - ::oUI:signal( "buttonNew" , "clicked()" , {| | ::execEvent( buttonNew_clicked ) } ) - ::oUI:signal( "buttonSet" , "clicked()" , {| | ::execEvent( buttonSet_clicked ) } ) - ::oUI:signal( "buttonTest" , "clicked()" , {| | ::execEvent( buttonTest_clicked ) } ) - ::oUI:signal( "buttonLoad" , "clicked()" , {| | ::execEvent( buttonLoad_clicked ) } ) - ::oUI:signal( "buttonSave" , "clicked()" , {| | ::execEvent( buttonSave_clicked ) } ) - ::oUI:signal( "buttonSaveAs", "clicked()" , {| | ::execEvent( buttonSaveAs_clicked ) } ) - ::oUI:signal( "buttonAssign", "clicked()" , {| | ::execEvent( buttonAssign_clicked ) } ) - ::oUI:signal( "buttonDelete", "clicked()" , {| | ::execEvent( buttonDelete_clicked ) } ) - - ::oUI:signal( "listMethods" , "itemDoubleClicked(QLWItem)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } ) - ::oUI:signal( "listMethods" , "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } ) - - ::oUI:signal( "tableMacros" , "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } ) - ::oUI:signal( "tableMacros" , "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } ) + ::oUI:q_buttonNew :connect( "clicked()" , {| | ::execEvent( buttonNew_clicked ) } ) + ::oUI:q_buttonSet :connect( "clicked()" , {| | ::execEvent( buttonSet_clicked ) } ) + ::oUI:q_buttonTest :connect( "clicked()" , {| | ::execEvent( buttonTest_clicked ) } ) + ::oUI:q_buttonLoad :connect( "clicked()" , {| | ::execEvent( buttonLoad_clicked ) } ) + ::oUI:q_buttonSave :connect( "clicked()" , {| | ::execEvent( buttonSave_clicked ) } ) + ::oUI:q_buttonSaveAs:connect( "clicked()" , {| | ::execEvent( buttonSaveAs_clicked ) } ) + ::oUI:q_buttonAssign:connect( "clicked()" , {| | ::execEvent( buttonAssign_clicked ) } ) + ::oUI:q_buttonDelete:connect( "clicked()" , {| | ::execEvent( buttonDelete_clicked ) } ) + ::oUI:q_listMethods :connect( "itemDoubleClicked(QLWItem)" , {|p| ::execEvent( listMethods_itemDoubleClicked, p ) } ) + ::oUI:q_listMethods :connect( "currentRowChanged(int)" , {|p| ::execEvent( listMethods_currentRowChanged, p ) } ) + ::oUI:q_tableMacros :connect( "itemSelectionChanged()" , {| | ::execEvent( tableMacros_itemSelectionChanged ) } ) + ::oUI:q_tableMacros :connect( "itemDoubleClicked(QTblWItem)", {|p| ::execEvent( tableMacros_itemDoubleClicked, p ) } ) RETURN Self diff --git a/harbour/contrib/hbide/idethemes.prg b/harbour/contrib/hbide/idethemes.prg index 6384be5e5f..6b459c9fe7 100644 --- a/harbour/contrib/hbide/idethemes.prg +++ b/harbour/contrib/hbide/idethemes.prg @@ -520,22 +520,19 @@ METHOD IdeThemes:show() ::oThemesDock:oWidget:setWidget( ::oUI ) - ::oUI:signal( "listThemes" , "currentRowChanged(int)" , {|i| ::execEvent( "listThemes_currentRowChanged", i ) } ) - ::oUI:signal( "listItems" , "currentRowChanged(int)" , {|i| ::execEvent( "listItems_currentRowChanged", i ) } ) - - ::oUI:signal( "buttonColor" , "clicked()" , {| | ::updateColor() } ) - ::oUI:signal( "buttonSave" , "clicked()" , {| | ::save( .f. ) } ) - ::oUI:signal( "buttonSaveAs" , "clicked()" , {| | ::save( .t. ) } ) - ::oUI:signal( "buttonCopy" , "clicked()" , {| | ::copy( .t. ) } ) - ::oUI:signal( "buttonApply" , "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToCurrentTab" ) } ) - ::oUI:signal( "buttonApplyAll", "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToAllTabs" ) } ) - ::oUI:signal( "buttonDefault" , "clicked()" , {| | ::execEvent( "applyMenu_triggered_setAsDefault" ) } ) - - ::oUI:signal( "checkItalic" , "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ITALIC, i ) } ) - ::oUI:signal( "checkBold" , "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_BOLD , i ) } ) - ::oUI:signal( "checkUnderline", "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ULINE , i ) } ) - - ::oUI:signal( "buttonClose" , "clicked()" , {| | ::oThemesDock:hide() } ) + ::oUI:q_listThemes :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listThemes_currentRowChanged", i ) } ) + ::oUI:q_listItems :connect( "currentRowChanged(int)" , {|i| ::execEvent( "listItems_currentRowChanged", i ) } ) + ::oUI:q_buttonColor :connect( "clicked()" , {| | ::updateColor() } ) + ::oUI:q_buttonSave :connect( "clicked()" , {| | ::save( .f. ) } ) + ::oUI:q_buttonSaveAs :connect( "clicked()" , {| | ::save( .t. ) } ) + ::oUI:q_buttonCopy :connect( "clicked()" , {| | ::copy( .t. ) } ) + ::oUI:q_buttonApply :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToCurrentTab" ) } ) + ::oUI:q_buttonApplyAll:connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_applyToAllTabs" ) } ) + ::oUI:q_buttonDefault :connect( "clicked()" , {| | ::execEvent( "applyMenu_triggered_setAsDefault" ) } ) + ::oUI:q_checkItalic :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ITALIC, i ) } ) + ::oUI:q_checkBold :connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_BOLD , i ) } ) + ::oUI:q_checkUnderline:connect( "stateChanged(int)" , {|i| ::updateAttribute( THM_ATR_ULINE , i ) } ) + ::oUI:q_buttonClose :connect( "clicked()" , {| | ::oThemesDock:hide() } ) /* Fill Themes Dialog Values */ ::oUI:setWindowTitle( GetKeyValue( ::aControls, "dialogTitle" ) ) diff --git a/harbour/contrib/hbqt/qtgui/THbQtUI.prg b/harbour/contrib/hbqt/qtgui/THbQtUI.prg index cf6663c10e..baf8e82937 100644 --- a/harbour/contrib/hbqt/qtgui/THbQtUI.prg +++ b/harbour/contrib/hbqt/qtgui/THbQtUI.prg @@ -88,9 +88,6 @@ CLASS HbQtUI DATA widgets INIT {} DATA aCommands INIT {} - DATA aSignals INIT {} - DATA aEvents INIT {} - DATA org DATA ui_ INIT {=>} @@ -98,8 +95,6 @@ CLASS HbQtUI METHOD create( cFile, qParent ) METHOD destroy() - METHOD event( cWidget, nEvent, bBlock ) - METHOD signal( cWidget, cSignal, bBlock ) METHOD loadWidgets() METHOD loadContents( cUiFull ) METHOD loadUI( cUiFull, qParent ) @@ -161,14 +156,7 @@ METHOD HbQtUI:destroy() ::oWidget:hide() - FOR EACH a_ IN ::aSignals - i := Qt_Slots_disConnect( ::pSlots, a_[ 1 ], a_[ 2 ] ) - a_:= NIL - NEXT ::pSlots := NIL - FOR EACH a_ IN ::aEvents - Qt_Events_disConnect( ::pEvents, a_[ 1 ], a_[ 2 ] ) - NEXT ::pEvents := NIL FOR EACH a_ IN ::widgets DESCEND @@ -187,35 +175,6 @@ METHOD HbQtUI:destroy() /*----------------------------------------------------------------------*/ -METHOD HbQtUI:event( cWidget, nEvent, bBlock ) - - IF hb_hHasKey( ::qObj, cWidget ) - IF Qt_Events_Connect( ::pEvents, ::qObj[ cWidget ], nEvent, bBlock ) - aadd( ::aEvents, { ::qObj[ cWidget ], nEvent } ) - ENDIF - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - -METHOD HbQtUI:signal( cWidget, cSignal, bBlock ) - - IF hb_hHasKey( ::qObj, cWidget ) - IF empty( ::pSlots ) - ::pSlots := QT_SLOTS_NEW() - ENDIF - IF Qt_Slots_Connect( ::pSlots, ::qObj[ cWidget ], cSignal, bBlock ) - aadd( ::aSignals, { ::qObj[ cWidget ], cSignal } ) - ELSE - HB_TRACE( HB_TR_DEBUG, "Failed:", cSignal ) - ENDIF - ENDIF - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD HbQtUI:loadWidgets() LOCAL a_, pPtr, bBlock, x, cBlock