2009-12-23 09:07 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbide/hbide.prg
  * contrib/hbide/resources/mainwindow.ui
  * contrib/hbxbp/xbpbrowse.prg
  * contrib/hbxbp/xbpdialog.prg
    + Added an experimental protocol scheduled to be 
      polished in next few days.
This commit is contained in:
Pritpal Bedi
2009-12-23 17:11:04 +00:00
parent 10dd9d329c
commit 619d4eb0e8
5 changed files with 159 additions and 13 deletions

View File

@@ -17,6 +17,14 @@
past entries belonging to author(s): Viktor Szakats.
*/
2009-12-23 09:07 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/resources/mainwindow.ui
* contrib/hbxbp/xbpbrowse.prg
* contrib/hbxbp/xbpdialog.prg
+ Added an experimental protocol scheduled to be
polished in next few days.
2009-12-23 13:31 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* package/winuni/mpkg_win_uni_extra_copy.bat
+ Added automatized (but not generic) logic to assemble 'unified' package.

View File

@@ -257,6 +257,9 @@ CLASS HbIde
METHOD readProcessInfo()
METHOD goto()
METHOD testBuildDialog()
ENDCLASS
/*----------------------------------------------------------------------*/
@@ -1582,6 +1585,7 @@ METHOD HbIde:executeAction( cKey )
::lDockRVisible := !( ::lDockRVisible )
CASE cKey == "Compile"
::testBuildDialog()
CASE cKey == "CompilePPO"
@@ -2166,3 +2170,35 @@ METHOD HbIde:goto()
RETURN nLine
/*----------------------------------------------------------------------*/
METHOD HbIde:testBuildDialog()
LOCAL oUI, oDlg
LOCAL mp1, mp2, oXbp, nEvent
oUI := XbpQtUiLoader():new()
oUI:file := s_resPath + "mainWindow.ui"
oUI:create()
oDlg := XbpDialog():new()
oDlg:hbCreateFromQtPtr( ::oDlg, , , , , , oUI:oWidget:pPtr )
//oDlg:drawingArea := oUI:qObj[ "drawingArea" ]
oDlg:show()
DO WHILE .t.
nEvent := AppEvent( @mp1, @mp2, @oXbp )
IF nEvent == xbeP_Keyboard
DO CASE
CASE mp1 == xbeK_ESC
EXIT
ENDCASE
ENDIF
oXbp:handleEvent( nEvent, mp1, mp2 )
ENDDO
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>mainWindow</class>
<widget class="QMainWindow" name="mainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>MainWindow</string>
</property>
<widget class="QWidget" name="drawingArea"/>
<widget class="QMenuBar" name="menuBar">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>18</height>
</rect>
</property>
</widget>
<widget class="QStatusBar" name="statusBar"/>
<widget class="QToolBar" name="toolBar">
<property name="windowTitle">
<string>toolBar</string>
</property>
<attribute name="toolBarArea">
<enum>TopToolBarArea</enum>
</attribute>
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
</widget>
<widget class="QDockWidget" name="dockPrjTree">
<property name="allowedAreas">
<set>Qt::LeftDockWidgetArea</set>
</property>
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="QWidget" name="dockPrjContents"/>
</widget>
<widget class="QDockWidget" name="dockEdits">
<property name="allowedAreas">
<set>Qt::LeftDockWidgetArea</set>
</property>
<attribute name="dockWidgetArea">
<number>1</number>
</attribute>
<widget class="QWidget" name="dockEditsContents"/>
</widget>
<widget class="QDockWidget" name="dockOutput">
<property name="allowedAreas">
<set>Qt::BottomDockWidgetArea</set>
</property>
<attribute name="dockWidgetArea">
<number>8</number>
</attribute>
<widget class="QWidget" name="dockOutputContents"/>
</widget>
<widget class="QDockWidget" name="dockFuncList">
<property name="allowedAreas">
<set>Qt::RightDockWidgetArea</set>
</property>
<attribute name="dockWidgetArea">
<number>2</number>
</attribute>
<widget class="QWidget" name="dockFuncListContents"/>
</widget>
</widget>
<resources/>
<connections/>
</ui>

View File

@@ -750,15 +750,6 @@ METHOD XbpBrowse:destroy()
/*----------------------------------------------------------------------*/
FUNCTION ShowMem( lYes )
IF lYes
HBXBP_DEBUG( " ." )
ENDIF
HBXBP_DEBUG( " Mem Used "+IF( lYes, "1001", " " ), memory( 1001 ) )
RETURN nil
/*----------------------------------------------------------------------*/
METHOD XbpBrowse:exeBlock( nEvent, p1, p2, p3 )
LOCAL oWheelEvent, oMouseEvent, i, nRow, nRowPos, nCol, nColPos, oPoint

View File

@@ -173,12 +173,45 @@ METHOD XbpDialog:hbCreateFromQtPtr( oParent, oOwner, aPos, aSize, aPresParams, l
::xbpWindow:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
IF hb_isPointer( pQtObject )
::oWidget := QMainWindow()
::oWidget:pPtr := pQtObject
IF !hb_isPointer( pQtObject )
RETURN Self
ENDIF
::cargo := hb_threadId() /* To Be Removed */
::oWidget := QMainWindow()
::oWidget:pPtr := pQtObject
IF !empty( ::title )
::oWidget:setWindowTitle( ::title )
ENDIF
IF hb_isChar( ::icon )
::oWidget:setWindowIcon( ::icon )
ENDIF
#if 0
::drawingArea := XbpDrawingArea():new( self, , {0,0}, ::aSize, , .t. ):create()
::oWidget:setCentralWidget( ::drawingArea:oWidget )
SetAppWindow( Self )
#endif
/* Thread specific event buffer */
hbxbp_InitializeEventBuffer()
/* Install Event Loop per Dialog Basis */
::oEventLoop := QEventLoop():new( ::pWidget )
hbxbp_SetEventLoop( ::oEventLoop )
/* Instal Event Filter */
::oWidget:installEventFilter( QT_GetEventFilter() )
::connectWindowEvents()
//
::connectEvent( ::pWidget, QEvent_Close , {|o,e| ::exeBlock( QEvent_Close , e, o ) } )
::connectEvent( ::pWidget, QEvent_WindowActivate , {|o,e| ::exeBlock( QEvent_WindowActivate , e, o ) } )
::connectEvent( ::pWidget, QEvent_WindowDeactivate, {|o,e| ::exeBlock( QEvent_WindowDeactivate, e, o ) } )
RETURN Self
/*----------------------------------------------------------------------*/