2010-09-10 07:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/hbqt/qtgui/g/QPrinter.cpp
    * Regenerated.
  * contrib/hbqt/qtgui/qth/QPrinter.qth
    ! Fixed: constructor, now it accepts QPrinterInfo also as a parameter.

  * contrib/hbide/ideedit.prg
    + Implemented: Alt+PageDown/PageUp keys to navigate to next/previous function.
      A request received at FWH forums.
This commit is contained in:
Pritpal Bedi
2010-09-10 14:10:35 +00:00
parent 3bef20a149
commit 236d06e5f2
4 changed files with 90 additions and 17 deletions

View File

@@ -16,6 +16,16 @@
The license applies to all entries newer than 2009-04-28.
*/
2010-09-10 07:05 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/qtgui/g/QPrinter.cpp
* Regenerated.
* contrib/hbqt/qtgui/qth/QPrinter.qth
! Fixed: constructor, now it accepts QPrinterInfo also as a parameter.
* contrib/hbide/ideedit.prg
+ Implemented: Alt+PageDown/PageUp keys to navigate to next/previous function.
A request received at FWH forums.
2010-09-10 11:34 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
* contrib/hbide/hbide.hbp
- contrib/hbide/hbide.prg
@@ -36,7 +46,7 @@
* harbour/vm/classes.c
* pacified compiler warning
2010-19-12 09:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
2010-09-09 09:19 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbqreportsmanager.prg
! Few more steps gained on printing front.

View File

@@ -219,6 +219,9 @@ CLASS IdeEdit INHERIT IdeObject
METHOD blockConvert( cMode )
METHOD dispStatusInfo()
METHOD toggleCurrentLineHighlightMode()
METHOD currentFunctionIndex()
METHOD toPreviousFunction()
METHOD toNextFunction()
METHOD home()
METHOD end()
@@ -640,6 +643,16 @@ METHOD IdeEdit:execKeyEvent( nMode, nEvent, p, p1 )
::hidePrototype()
ENDIF
EXIT
CASE Qt_Key_PageUp
IF lAlt
::toPreviousFunction()
ENDIF
EXIT
CASE Qt_Key_PageDown
IF lAlt
::toNextFunction()
ENDIF
EXIT
ENDSWITCH
EXIT
@@ -1339,25 +1352,61 @@ METHOD IdeEdit:convertDQuotes()
/*----------------------------------------------------------------------*/
METHOD IdeEdit:currentFunctionIndex()
LOCAL n := -1, nCurLine
IF !empty( ::aTags )
nCurLine := ::getLineNo()
IF len( ::aTags ) == 1
n := 1
ELSEIF ( n := ascan( ::aTags, {|e_| e_[ 3 ] >= nCurLine } ) ) == 0
n := len( ::aTags )
ELSEIF n > 0
n--
ENDIF
ENDIF
RETURN n
/*----------------------------------------------------------------------*/
METHOD IdeEdit:toNextFunction()
LOCAL n
IF ( n := ::currentFunctionIndex() ) >= 0
IF n < len( ::aTags )
IF ::find( ::aTags[ n+1, 8 ], QTextDocument_FindCaseSensitively )
::qEdit:centerCursor()
ENDIF
ENDIF
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeEdit:toPreviousFunction()
LOCAL n
IF ( n := ::currentFunctionIndex() ) > 1
IF ::find( ::aTags[ n-1, 8 ], QTextDocument_FindCaseSensitively )
::qEdit:centerCursor()
ENDIF
ENDIF
RETURN Self
/*----------------------------------------------------------------------*/
METHOD IdeEdit:markCurrentFunction()
LOCAL n, nCurLine
LOCAL n
IF ::nPrevLineNo1 != ::getLineNo()
::nPrevLineNo1 := ::getLineNo()
IF !empty( ::aTags )
nCurLine := ::getLineNo()
IF len( ::aTags ) == 1
n := 1
ELSEIF ( n := ascan( ::aTags, {|e_| e_[ 3 ] >= nCurLine } ) ) == 0
n := len( ::aTags )
ELSEIF n > 0
n--
ENDIF
IF n > 0
::oIde:oFuncList:setItemColorFG( ::aTags[ n,7 ], { 255,0,0 } )
::oIde:oFuncList:setVisible( ::aTags[ n,7 ] )
ENDIF
IF ( n := ::currentFunctionIndex() ) > 0
::oIde:oFuncList:setItemColorFG( ::aTags[ n,7 ], { 255,0,0 } )
::oIde:oFuncList:setVisible( ::aTags[ n,7 ] )
ENDIF
ENDIF
RETURN Self

View File

@@ -149,7 +149,14 @@ HB_FUNC( QT_QPRINTER )
{
QPrinter * pObj = NULL;
pObj = new QPrinter() ;
if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) )
{
pObj = new QPrinter( *hbqt_par_QPrinterInfo( 1 ), ( QPrinter::PrinterMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QPrinter::ScreenResolution ) ) ;
}
else
{
pObj = new QPrinter() ;
}
hb_retptrGC( hbqt_gcAllocate_QPrinter( ( void * ) pObj, true ) );
}

View File

@@ -72,7 +72,14 @@ New =
*/
HB_FUNC( QT_QPRINTER )
{
hb_retptr( ( QPrinter* ) new QPrinter() );
if( hb_pcount() >= 1 && HB_ISPOINTER( 1 ) )
{
hb_retptr( new QPrinter( *hbqt_par_QPrinterInfo( 1 ), ( QPrinter::PrinterMode ) ( HB_ISNUM( 2 ) ? hb_parni( 2 ) : QPrinter::ScreenResolution ) ) );
}
else
{
hb_retptr( new QPrinter() );
}
}
</CODE>