2010-01-16 23:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)

* contrib/hbide/hbide.prg
  * contrib/hbide/ideeditor.prg
  * contrib/hbide/idemisc.prg
    ! Updated to respect latest changes.
This commit is contained in:
Pritpal Bedi
2010-01-17 07:18:48 +00:00
parent 665579dcda
commit 2d95edc21f
4 changed files with 32 additions and 20 deletions

View File

@@ -17,6 +17,12 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-16 23:14 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbide/hbide.prg
* contrib/hbide/ideeditor.prg
* contrib/hbide/idemisc.prg
! Updated to respect latest changes.
2010-01-16 22:29 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/hbqt/generator/hbqtgen.prg
* contrib/hbqt/generator/qt45.qtp

View File

@@ -94,10 +94,6 @@ PROCEDURE Main( cProjIni )
SET CENTURY ON
SET EPOCH TO 1970
//HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DESTRUTOR ) // Exits cleanly
HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DELETE ) // Exits cleanly
//HBQT_SET_RELEASE_METHOD( HBQT_RELEASE_WITH_DELETE_LATER ) // Exits cleanly
s_resPath := hb_DirBase() + "resources" + hb_OsPathSeparator()
s_pathSep := hb_OsPathSeparator()

View File

@@ -793,8 +793,8 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme )
//
::oTab:oWidget:setLayout( ::qLayout )
::oEdit := IdeEdit():new( Self, 0 ):create()
::qEdit := ::oEdit:qEdit
::oEdit := IdeEdit():new( Self, 0 ):create()
::qEdit := ::oEdit:qEdit
::qCqEdit := ::oEdit:qEdit
::qCoEdit := ::oEdit
@@ -869,6 +869,8 @@ METHOD IdeEditor:split( nOrient, oEditP )
METHOD IdeEditor:destroy()
LOCAL n, oEdit
::disconnect( ::qDocument, "blockCountChanged(int)" )
::disconnect( ::qDocument, "contentsChange(int,int,int)" )
::qCqEdit := NIL
::qEdit := NIL
@@ -883,15 +885,19 @@ METHOD IdeEditor:destroy()
::qDocument:pPtr := 0
::qDocument := nil
ENDIF
IF !Empty( ::qLayout )
::qLayout:pPtr := 0
::qLayout := nil
ENDIF
IF !Empty( ::qHiliter )
::qHiliter:pPtr := 0
::qHiliter := nil
ENDIF
::oEdit := NIL
IF !Empty( ::qLayout )
::qLayout:pPtr := 0
::qLayout := nil
ENDIF
IF ( n := ascan( ::aTabs, {|e_| e_[ TAB_OEDITOR ] == Self } ) ) > 0
hb_adel( ::oIde:aTabs, n, .T. )
ENDIF
@@ -918,7 +924,6 @@ METHOD IdeEditor:setDocumentProperties()
qCursor := QTextCursor():configure( ::qEdit:textCursor() )
IF !( ::lLoaded ) /* First Time */
hbide_dbg( "......................" )
::qEdit:setPlainText( hb_memoRead( ::sourceFile ) )
qCursor:setPosition( ::nPos )
::qEdit:setTextCursor( qCursor )
@@ -1133,10 +1138,12 @@ METHOD IdeEdit:create( oEditor, nMode )
::qHLayout:addWidget( ::qLineNos )
::qHLayout:addWidget( ::qEdit )
#if 0
::qActionTab := QAction():new( ::qEdit )
::qActionTab:setText( "Editor Tab" )
::qActionTab:setShortcut( QKeySequence():new( "Ctrl+F2" ) )
::connect( ::qActionTab, "triggered(bool)", {|| ::exeEvent( 71, Self ) } )
#endif
::connectEditSlots( Self )
@@ -1151,15 +1158,15 @@ METHOD IdeEdit:destroy()
::qHLayout:removeWidget( ::qEdit )
::qHLayout:removeWidget( ::qLineNos )
::qHLayout:pPtr := 0
::qHLayout := NIL
::qLineNos:pPtr := 0
//::qLineNos:pPtr := 0
::qLineNos := NIL
::qEdit:pPtr := 0
//::qEdit:pPtr := 0
::qEdit := NIL
::qHLayout:pPtr := 0
::qHLayout := NIL
RETURN Self
/*----------------------------------------------------------------------*/
@@ -1326,19 +1333,24 @@ METHOD IdeEdit:highlightCurrentLine( oEdit )
/*----------------------------------------------------------------------*/
METHOD IdeEdit:setNewMark()
LOCAL qBlockFmt, qTextBlock, qDoc, lModified
LOCAL qBlockFmt, qTextBlock, qDoc, lModified, qUData
IF empty( ::qCursorMark )
qDoc := QTextDocument():configure( ::qEdit:document() )
lModified := qDoc:isModified()
::qCursorMark := QTextCursor():configure( ::qEdit:textCursor() )
qTextBlock := QTextBlock():configure( ::qCursorMark:block() )
qBlockFmt := QTextBlockFormat():new()
qBlockFmt:setBackground( ::qBrushMark )
::qCursorMark:setBlockFormat( qBlockFmt )
qTextBlock:setUserState( 77 )
qUData := HBQTextBlockUserData():new()
qUData:setData( 99 )
qTextBlock:setUserData( qUData )
qDoc:setModified( lModified )
ELSE
::qCursorMark:setBlockFormat( QTextBlockFormat():new() )
@@ -1359,3 +1371,4 @@ METHOD IdeEdit:gotoLastMark()
RETURN Self
/*----------------------------------------------------------------------*/

View File

@@ -164,9 +164,6 @@ FUNCTION hbide_createTarget( cFile, txt_ )
/*----------------------------------------------------------------------*/
FUNCTION hbide_posAndSize( qWidget )
LOCAL qRect := QRect():configure( qWidget:geometry() )
hbide_dbg( qRect:x(), qRect:y(), qRect:width(), qRect:height() )
RETURN hb_ntos( qWidget:x() ) + "," + hb_ntos( qWidget:y() ) + "," + ;
hb_ntos( qWidget:width() ) + "," + hb_ntos( qWidget:height() ) + ","