2012-09-16 16:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)

* contrib/gtwvg/gtwvg.c
    + hb_gtInfo( HB_GTI_SETPOSANDSIZE ) returns the existing position 
       and size: { nX, nY, nWidth, nHeight } in pixels.

  * contrib/hbqt/hbmk2_qt.hb
    + someObject:setHtml( cHtmlCode ) now reads the html text correctly 
       off a .ui file. This makes possible to draft html pages in 
       Qt creator itself and assigned to an relevant object, like 
       QLabel, QTextEdit, QTextBrowser, etc.
This commit is contained in:
Pritpal Bedi
2012-09-16 23:56:28 +00:00
parent 1c1b03b932
commit 5f42ebdb32
3 changed files with 26 additions and 2 deletions

View File

@@ -16,6 +16,17 @@
The license applies to all entries newer than 2009-04-28.
*/
2012-09-16 16:47 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/gtwvg/gtwvg.c
+ hb_gtInfo( HB_GTI_SETPOSANDSIZE ) returns the existing position
and size: { nX, nY, nWidth, nHeight } in pixels.
* contrib/hbqt/hbmk2_qt.hb
+ someObject:setHtml( cHtmlCode ) now reads the html text correctly
off a .ui file. This makes possible to draft html pages in
Qt creator itself and assigned to an relevant object, like
QLabel, QTextEdit, QTextBrowser, etc.
2012-09-14 21:07 UTC+0200 Firstname Lastname (me domain.net)
* utils/hbmk2/hbmk2.prg
* hbmk_OutStdRaw() and hb_OutErrRaw() hbmk2 plugin

View File

@@ -3440,6 +3440,19 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
}
case HB_GTI_SETPOSANDSIZE:
{
if( pWVT->hWnd )
{
RECT rect = { 0,0,0,0 };
GetWindowRect( pWVT->hWnd, &rect );
pInfo->pResult = hb_itemNew( NULL );
hb_arrayNew( pInfo->pResult, 4 );
hb_arraySetNI( pInfo->pResult, 1, rect.left );
hb_arraySetNI( pInfo->pResult, 2, rect.top );
hb_arraySetNI( pInfo->pResult, 3, rect.right - rect.left );
hb_arraySetNI( pInfo->pResult, 4, rect.bottom - rect.top );
}
if( ( hb_itemType( pInfo->pNewVal ) & HB_IT_ARRAY ) && hb_arrayLen( pInfo->pNewVal ) == 2 &&
( hb_itemType( pInfo->pNewVal2 ) & HB_IT_ARRAY ) && hb_arrayLen( pInfo->pNewVal2 ) == 2 )
{

View File

@@ -670,7 +670,7 @@ STATIC FUNCTION hbqtui_gen_prg( cFile, cFuncName )
n := At( "->", cText )
cNam := AllTrim( SubStr( cText, 1, n - 1 ) )
cCmd := hbqtui_formatCommand( SubStr( cText, n + 2 ), .T., aWidgets )
AAdd( aCommands, { cNam, cCmd } )
AAdd( aCommands, { cNam, hbqtui_pullTranslate( cCmd ) } )
ELSEIF hbqtui_isValidCmdLine( s ) .AND. !( "->" $ s ) .AND. ( ( n := At( ".", s ) ) > 0 ) /* Assignment to objects on stack */
cNam := SubStr( s, 1, n - 1 )
@@ -1182,7 +1182,7 @@ STATIC FUNCTION hbqtui_setObjects( cCmd, aWidgets )
STATIC FUNCTION hbqtui_pullText( aLines, nFrom )
LOCAL cString := ""
LOCAL nLen := Len( aLines )
LOCAL aKeyword := { "setText(", "setPlainText(", "setStyleSheet(", "setWhatsThis(" }
LOCAL aKeyword := { "setText(", "setPlainText(", "setStyleSheet(", "setWhatsThis(", "setHtml(" }
IF AScan( aKeyword, {| tmp | tmp $ aLines[ nFrom ] } ) > 0
cString := aLines[ nFrom ]