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.
This commit is contained in:
Pritpal Bedi
2010-04-07 00:51:15 +00:00
parent 20d027baaf
commit 9261be47fd
8 changed files with 81 additions and 40 deletions

View File

@@ -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.

View File

@@ -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"

View File

@@ -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 )
//

View File

@@ -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
/*----------------------------------------------------------------------*/

View File

@@ -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()

View File

@@ -10,6 +10,9 @@
<height>75</height>
</rect>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
@@ -86,6 +89,9 @@
<height>16777215</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::StrongFocus</enum>
</property>
<property name="editable">
<bool>true</bool>
</property>

View File

@@ -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);

View File

@@ -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