diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index bc676b91ab..290deaa5ba 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -17,6 +17,23 @@
past entries belonging to author(s): Viktor Szakats.
*/
+2010-04-06 17:40 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
+ * contrib/hbqt/THbQtUI.prg
+ + Added more hbqt.ch defined constants.
+
+ * contrib/hbide/resources/searchreplace.ui
+ * contrib/hbide/resources/searchreplace.uic
+
+ * contrib/hbide/hbide.prg
+ * contrib/hbide/ideactions.prg
+ * contrib/hbide/idedocks.prg
+ * contrib/hbide/idefindreplace.prg
+ + Enabled again other way of "Search/Replace" invokable by Ctrl+Sh+F.
+ This opens the dialog at the bottom of editing area. This is exactly
+ the same as it is implemented in Qt Creator also.
+
+ ! Fixed to always show up the right-dock widgets when invoked.
+
2010-04-06 15:02 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* tests/mt/mttest09.prg
! Fixed to use native core function instead of XPP wrapper.
diff --git a/harbour/contrib/hbide/hbide.prg b/harbour/contrib/hbide/hbide.prg
index 134c232c26..b4ead6b5a4 100644
--- a/harbour/contrib/hbide/hbide.prg
+++ b/harbour/contrib/hbide/hbide.prg
@@ -588,7 +588,7 @@ hbide_dbg( "HbIde:create( cProjIni )", "#Params=" )
::oPM:destroy()
::oEM:destroy()
::oDK:destroy()
- * ::oSearchReplace:destroy()
+ ::oSearchReplace:destroy()
::oDlg:destroy()
::oAC:destroy()
@@ -823,7 +823,7 @@ METHOD HbIde:execEditorAction( cKey )
EXIT
CASE "FindEx"
IF !Empty( ::qCurEdit )
- * ::oSearchReplace:beginFind()
+ ::oSearchReplace:beginFind()
ENDIF
EXIT
CASE "SetMark"
diff --git a/harbour/contrib/hbide/ideactions.prg b/harbour/contrib/hbide/ideactions.prg
index 59003a5544..46b5fa6bbd 100644
--- a/harbour/contrib/hbide/ideactions.prg
+++ b/harbour/contrib/hbide/ideactions.prg
@@ -463,7 +463,7 @@ METHOD IdeActions:buildMainMenu()
oSubMenu:addItem( { ::getAction( "SelectAll" ), {|| oIde:execAction( "SelectAll" ) } } )
hbide_menuAddSep( oSubMenu )
oSubMenu:addItem( { ::getAction( "Find" ), {|| oIde:execAction( "Find" ) } } )
- * oSubMenu:addItem( { ::getAction( "FindEx" ), {|| oIde:execAction( "FindEx" ) } } )
+ oSubMenu:addItem( { ::getAction( "FindEx" ), {|| oIde:execAction( "FindEx" ) } } )
oSubMenu:addItem( { ::getAction( "Goto" ), {|| oIde:execAction( "Goto" ) } } )
hbide_menuAddSep( oSubMenu )
//
diff --git a/harbour/contrib/hbide/idedocks.prg b/harbour/contrib/hbide/idedocks.prg
index f6cfd053df..63fff9b19a 100644
--- a/harbour/contrib/hbide/idedocks.prg
+++ b/harbour/contrib/hbide/idedocks.prg
@@ -81,6 +81,8 @@
#define dockDocWriter_visibilityChanged 307
#define docSkeletons_visibilityChanged 308
#define dockSkltnsTree_visibilityChanged 309
+#define dockHelpDock_visibilityChanged 310
+#define oFuncDock_visibilityChanged 311
/*----------------------------------------------------------------------*/
@@ -159,13 +161,14 @@ METHOD IdeDocks:destroy()
::disconnect( ::oDocWriteDock:oWidget , "visibilityChanged(bool)" )
::disconnect( ::oFindDock:oWidget , "visibilityChanged(bool)" )
::disconnect( ::oFunctionsDock:oWidget , "visibilityChanged(bool)" )
- #if 0 /* Not Implemented */
+ ::disconnect( ::oSkeltnDock:oWidget , "visibilityChanged(bool)" )
::disconnect( ::oHelpDock:oWidget , "visibilityChanged(bool)" )
+ ::disconnect( ::oFuncDock:oWidget , "visibilityChanged(bool)" )
+
+ #if 0 /* Not Implemented */
::disconnect( ::oDockPT:oWidget , "visibilityChanged(bool)" )
::disconnect( ::oDockED:oWidget , "visibilityChanged(bool)" )
::disconnect( ::oDockB2:oWidget , "visibilityChanged(bool)" )
- ::disconnect( ::oFuncDock:oWidget , "visibilityChanged(bool)" )
- ::disconnect( ::oSkeltnDock:oWidget , "visibilityChanged(bool)" )
#endif
FOR EACH qTBtn IN ::aPanels
@@ -228,8 +231,10 @@ METHOD IdeDocks:buildDialog()
::buildStackedWidget()
::qLayout:addWidget_1( ::oStackedWidget:oWidget, 0, 0, 1, 1 )
-// ::buildSearchReplaceWidget() ////////////////////////////////////
-// ::qLayout:addWidget_1( ::oSearchReplace:oUI, 1, 0, 1, 1 )
+ #if 1
+ ::buildSearchReplaceWidget()
+ ::qLayout:addWidget_1( ::oSearchReplace:oUI, 1, 0, 1, 1 )
+ #endif
/* View Panels */
::buildViewWidget( "Stats" ) /* At stayrtup displaying various statistics */
@@ -309,6 +314,7 @@ METHOD IdeDocks:getADockWidget( nArea, cObjectName, cWindowTitle, nFlags )
/*----------------------------------------------------------------------*/
+
METHOD IdeDocks:execEvent( nMode, p )
DO CASE
@@ -316,32 +322,40 @@ METHOD IdeDocks:execEvent( nMode, p )
CASE nMode == 2 /* HelpWidget:contextMenuRequested(qPoint) */
hbide_popupBrwContextMenu( ::qHelpBrw, p )
+ /* Left Panel Docks */
CASE nMode == dockSkltnsTree_visibilityChanged
IF p; ::oSK:showTree(); ENDIF
- CASE nMode == docSkeletons_visibilityChanged
- IF p; ::oSK:show(); ENDIF
-
- CASE nMode == dockDocWriter_visibilityChanged
- IF p; ::oDW:show(); ENDIF
-
- CASE nMode == docFunctions_visibilityChanged
- IF p; ::oFN:show(); ENDIF
+ /* Right Panel Docks */
+ CASE nMode == dockHelpDock_visibilityChanged
+ IF p; ::oHelpDock:oWidget:raise(); ENDIF
CASE nMode == dockDocViewer_visibilityChanged
- IF p; ::oHL:show(); ENDIF
+ IF p; ::oHL:show(); ::oDocViewDock:oWidget:raise(); ENDIF
+
+ CASE nMode == dockDocWriter_visibilityChanged
+ IF p; ::oDW:show(); ::oDocWriteDock:oWidget:raise(); ENDIF
+
+ CASE nMode == oFuncDock_visibilityChanged
+ IF p; ::oFuncDock:oWidget:raise(); ENDIF
+
+ CASE nMode == docFunctions_visibilityChanged
+ IF p; ::oFN:show(); ::oFunctionsDock:oWidget:raise(); ENDIF
CASE nMode == dockProperties_visibilityChanged
- IF p; ::oPM:fetchProperties(); ENDIF
+ IF p; ::oPM:fetchProperties(); ::oPropertiesDock:oWidget:raise(); ENDIF
CASE nMode == docEnvironments_visibilityChanged
- IF p; ::oEV:show(); ENDIF
+ IF p; ::oEV:show(); ::oEnvironDock:oWidget:raise(); ENDIF
- CASE nMode == dockFindInFiles_visibilityChanged
- IF p; ::oFF:show(); ENDIF
+ CASE nMode == docSkeletons_visibilityChanged
+ IF p; ::oSK:show(); ::oSkeltnDock:oWidget:raise(); ENDIF
CASE nMode == dockThemes_visibilityChanged
- IF p; ::oTH:show(); ENDIF
+ IF p; ::oTH:show(); ::oThemesDock:oWidget:raise(); ENDIF
+
+ CASE nMode == dockFindInFiles_visibilityChanged
+ IF p; ::oFF:show(); ::oFindDock:oWidget:raise(); ENDIF
ENDCASE
@@ -744,6 +758,8 @@ METHOD IdeDocks:buildFuncList()
::oIde:oFuncDock := ::getADockWidget( Qt_RightDockWidgetArea, "dockFuncList", "Functions List", QDockWidget_DockWidgetFloatable )
::oDlg:oWidget:addDockWidget_1( Qt_RightDockWidgetArea, ::oFuncDock:oWidget, Qt_Vertical )
+ ::connect( ::oFuncDock:oWidget, "visibilityChanged(bool)", {|p| ::execEvent( oFuncDock_visibilityChanged, p ) } )
+
::oIde:oFuncList := XbpListBox():new( ::oFuncDock ):create( , , { 0,0 }, { 100,400 }, , .t. )
::oFuncList:oWidget:setEditTriggers( QAbstractItemView_NoEditTriggers )
@@ -780,6 +796,8 @@ METHOD IdeDocks:buildHelpWidget()
::oHelpDock:connect( ::qHelpBrw, "customContextMenuRequested(QPoint)", {|p| ::execEvent( 2, p ) } )
+ ::connect( ::oHelpDock:oWidget, "visibilityChanged(bool)", {|p| ::execEvent( dockHelpDock_visibilityChanged, p ) } )
+
RETURN Self
/*----------------------------------------------------------------------*/
diff --git a/harbour/contrib/hbide/idefindreplace.prg b/harbour/contrib/hbide/idefindreplace.prg
index 044c328113..03fed88777 100644
--- a/harbour/contrib/hbide/idefindreplace.prg
+++ b/harbour/contrib/hbide/idefindreplace.prg
@@ -105,16 +105,7 @@ METHOD IdeSearchReplace:create( oIde )
::oIde := oIde
-
- #if 0
- ::oUI := HbQtUI():new( ::oIde:resPath + "searchreplace.uic", ::oIde:oDlg:oWidget ):build()
- ::oXbp := XbpWindow():new()
- ::oXbp:oWidget := ::oUI:oWidget
- ::oDlg:addChild( ::oXbp )
- ::oXbp:qtObject := ::oUI
- #else
- ::oUI := HbQtUI():new( ::oIde:resPath + "searchreplace.uic" ):build()
- #endif
+ ::oUI := HbQtUI():new( hbide_uic( "searchreplace" ) ):build()
::oUI:setFocusPolicy( Qt_StrongFocus )
@@ -158,10 +149,11 @@ hbide_dbg("=====================================================================
METHOD IdeSearchReplace:destroy()
- ::disconnect( ::qFindLineEdit, "textChanged(QString)" )
- ::disconnect( ::qFindLineEdit, "returnPressed()" )
-
IF hb_isObject( ::oUI )
+
+ ::disconnect( ::qFindLineEdit, "textChanged(QString)" )
+ ::disconnect( ::qFindLineEdit, "returnPressed()" )
+
::oUI:destroy()
ENDIF
@@ -205,11 +197,11 @@ METHOD IdeSearchReplace:find( cText, lBackward )
IF ! lFound
::qCurEdit:setTextCursor( qCursor )
- ::qCurEdit:centerCursor()
::oUI:q_checkReplace:setChecked( .f. )
::oUI:q_checkReplace:setEnabled( .f. )
ELSE
::oUI:q_checkReplace:setEnabled( .t. )
+ ::qCurEdit:centerCursor()
ENDIF
ENDIF
RETURN lFound
@@ -224,10 +216,10 @@ METHOD IdeSearchReplace:beginFind()
::oUI:q_radioTop:setChecked( .t. )
::oUI:show()
-
+ ::oUI:oWidget:activateWindow()
::cFind := ""
- ::oUI:q_comboFind:setFocus_1()
+ ::oUI:q_comboFind:setFocus( Qt_MouseFocusReason )
::qFindLineEdit:setFocus_1()
::qFindLineEdit:selectAll()
diff --git a/harbour/contrib/hbide/resources/searchreplace.ui b/harbour/contrib/hbide/resources/searchreplace.ui
index f767b982db..e53b7c5a66 100644
--- a/harbour/contrib/hbide/resources/searchreplace.ui
+++ b/harbour/contrib/hbide/resources/searchreplace.ui
@@ -10,6 +10,9 @@
75
+
+ Qt::StrongFocus
+
Form
@@ -86,6 +89,9 @@
16777215
+
+ Qt::StrongFocus
+
true
diff --git a/harbour/contrib/hbide/resources/searchreplace.uic b/harbour/contrib/hbide/resources/searchreplace.uic
index 99d94d6ca3..f56c0d16b5 100644
--- a/harbour/contrib/hbide/resources/searchreplace.uic
+++ b/harbour/contrib/hbide/resources/searchreplace.uic
@@ -1,7 +1,7 @@
/********************************************************************************
** Form generated from reading ui file 'searchreplace.ui'
**
-** Created: Wed Feb 24 16:25:25 2010
+** Created: Tue Apr 6 08:00:29 2010
** by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
@@ -62,6 +62,7 @@ public:
if (FormSearchReplace1->objectName().isEmpty())
FormSearchReplace1->setObjectName(QString::fromUtf8("FormSearchReplace1"));
FormSearchReplace1->resize(817, 75);
+ FormSearchReplace1->setFocusPolicy(Qt::StrongFocus);
verticalLayout = new QVBoxLayout(FormSearchReplace1);
verticalLayout->setSpacing(5);
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
@@ -85,6 +86,7 @@ public:
comboFind->setObjectName(QString::fromUtf8("comboFind"));
comboFind->setMinimumSize(QSize(250, 0));
comboFind->setMaximumSize(QSize(250, 16777215));
+ comboFind->setFocusPolicy(Qt::StrongFocus);
comboFind->setEditable(true);
horizontalLayout->addWidget(comboFind);
diff --git a/harbour/contrib/hbqt/THbQtUI.prg b/harbour/contrib/hbqt/THbQtUI.prg
index e05dbb6cb5..e3c7c0a961 100644
--- a/harbour/contrib/hbqt/THbQtUI.prg
+++ b/harbour/contrib/hbqt/THbQtUI.prg
@@ -922,7 +922,13 @@ STATIC FUNCTION hbq_getConstants()
"Qt_ScrollBarAlwaysOn" => Qt_ScrollBarAlwaysOn , ;
;
"Qt_Horizontal" => Qt_Horizontal , ;
- "Qt_Vertical" => Qt_Vertical ;
+ "Qt_Vertical" => Qt_Vertical , ;
+ ;
+ "Qt_TabFocus" => Qt_TabFocus , ;
+ "Qt_ClickFocus" => Qt_ClickFocus , ;
+ "Qt_StrongFocus" => Qt_StrongFocus , ;
+ "Qt_WheelFocus" => Qt_WheelFocus , ;
+ "Qt_NoFocus" => Qt_NoFocus ;
}
ENDIF