2011-08-29 16:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbqt/gtqtc/gtqtc.cpp
* Minor.
* contrib/hbide/hbide.qrc
* contrib/hbide/ideactions.prg
* contrib/hbide/ideconsole.prg
* contrib/hbide/idedocks.prg
* contrib/hbide/idemain.prg
* contrib/hbide/ideobject.prg
* contrib/hbide/resources/cuied.png
+ Implemented: CUI Screen Designer in hbIDE.
Activate: <View><CUI Screen Designer> OR CUI Screen Designer icon.
NOTE: must exit the screen designer with <ESC> <CTRL+ENTER>
before clsoing hbIDE. It is necessary because when
CUI Designer is active, there are two loops in progress.
So, exiting CUI designer the way we exit an application
is necessary before exiting hbIDE itself.
This commit is contained in:
@@ -16,6 +16,25 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2011-08-29 16:04 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/gtqtc/gtqtc.cpp
|
||||
* Minor.
|
||||
|
||||
* contrib/hbide/hbide.qrc
|
||||
* contrib/hbide/ideactions.prg
|
||||
* contrib/hbide/ideconsole.prg
|
||||
* contrib/hbide/idedocks.prg
|
||||
* contrib/hbide/idemain.prg
|
||||
* contrib/hbide/ideobject.prg
|
||||
* contrib/hbide/resources/cuied.png
|
||||
+ Implemented: CUI Screen Designer in hbIDE.
|
||||
Activate: <View><CUI Screen Designer> OR CUI Screen Designer icon.
|
||||
NOTE: must exit the screen designer with <ESC> <CTRL+ENTER>
|
||||
before clsoing hbIDE. It is necessary because when
|
||||
CUI Designer is active, there are two loops in progress.
|
||||
So, exiting CUI designer the way we exit an application
|
||||
is necessary before exiting hbIDE itself.
|
||||
|
||||
2011-08-29 13:40 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbqt/qtgui/qth/QPrintDialog.qth
|
||||
! Fixed: constructor. It was very limiting before.
|
||||
|
||||
@@ -283,5 +283,6 @@
|
||||
<file>resources/rp_shapes.png</file>
|
||||
<file>resources/memo.png</file>
|
||||
<file>resources/hideshow.png</file>
|
||||
<file>resources/cuied.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -272,6 +272,7 @@ METHOD IdeActions:loadActions()
|
||||
aadd( aAct, { "CompilePPO" , "Compile Current Source to PPO", "ppo" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "LaunchProject" , "Launch Project" , "" , "^F10" , "No", "Yes" } )
|
||||
aadd( aAct, { "ConfigureTools" , "Configure Tools...*" , "" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "CuiEditor" , "CUI Screen Edirot" , "cuied" , "" , "No", "Yes" } )
|
||||
|
||||
aadd( aAct, { "ManageThemes" , "Manage Themes" , "" , "" , "No", "Yes" } )
|
||||
aadd( aAct, { "DefaultTheme" , "Set Default Theme" , "" , "" , "No", "Yes" } )
|
||||
@@ -553,8 +554,10 @@ METHOD IdeActions:buildMainMenu()
|
||||
* oSubMenu:oWidget:addAction( ::oDockB1:oWidget:toggleViewAction() )
|
||||
* oSubMenu:oWidget:addAction( ::oDockB:oWidget:toggleViewAction() )
|
||||
oSubMenu:oWidget:addSeparator()
|
||||
oSubMenu:oWidget:addAction( ::oDK:qMdiToolbarL:oWidget:toggleViewAction() )
|
||||
oSubMenu:oWidget:addAction( ::oDK:qMdiToolbar:oWidget:toggleViewAction() )
|
||||
oSubMenu:oWidget:addAction( ::oDK:qMdiToolbarL:oWidget:toggleViewAction() )
|
||||
oSubMenu:oWidget:addAction( ::oDK:qMdiToolbar:oWidget:toggleViewAction() )
|
||||
|
||||
oSubMenu:oWidget:addAction( ::oCuiEdDock:toggleViewAction() )
|
||||
|
||||
/*----------------------------------------------------------------------------*/
|
||||
/* Project */
|
||||
|
||||
5216
harbour/contrib/hbide/ideconsole.prg
Normal file
5216
harbour/contrib/hbide/ideconsole.prg
Normal file
File diff suppressed because it is too large
Load Diff
@@ -157,6 +157,7 @@ CLASS IdeDocks INHERIT IdeObject
|
||||
METHOD buildFormatWidget()
|
||||
METHOD hideAllDocks()
|
||||
METHOD setToolbarSize( nSize )
|
||||
METHOD buildCuiEdWidget()
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -198,6 +199,7 @@ METHOD IdeDocks:hideAllDocks()
|
||||
::oQScintillaDock : hide()
|
||||
::oReportsManagerDock : hide()
|
||||
::oFormatDock : hide()
|
||||
::oCuiEdDock : hide()
|
||||
|
||||
// Bottom
|
||||
::oDockB2 : hide()
|
||||
@@ -239,6 +241,7 @@ METHOD IdeDocks:destroy()
|
||||
::oQScintillaDock:oWidget : disconnect( "visibilityChanged(bool)" )
|
||||
::oReportsManagerDock:oWidget : disconnect( "visibilityChanged(bool)" )
|
||||
::oFormatDock:oWidget : disconnect( "visibilityChanged(bool)" )
|
||||
::oCuiEdDock:oWidget : disconnect( "visibilityChanged(bool)" )
|
||||
|
||||
#if 0 /* Not Implemented */
|
||||
::oDockPT:oWidget : disconnect( "visibilityChanged(bool)" )
|
||||
@@ -280,6 +283,7 @@ METHOD IdeDocks:destroy()
|
||||
::oIde:oQScintillaDock := NIL
|
||||
::oIde:oReportsManagerDock := NIL
|
||||
::oIde:oFormatDock := NIL
|
||||
::oIde:oCuiEdDock := NIL
|
||||
|
||||
::oIde:oDockPT := NIL
|
||||
::oIde:oDockED := NIL
|
||||
@@ -501,6 +505,7 @@ METHOD IdeDocks:buildDockWidgets()
|
||||
::buildUpDownWidget()
|
||||
::buildReportsDesignerWidget()
|
||||
::buildFormatWidget()
|
||||
::buildCuiEdWidget()
|
||||
|
||||
/* Bottom Docks */
|
||||
::oDlg:oWidget:tabifyDockWidget( ::oDockB:oWidget , ::oDockB1:oWidget )
|
||||
@@ -520,6 +525,7 @@ METHOD IdeDocks:buildDockWidgets()
|
||||
::oDlg:oWidget:tabifyDockWidget( ::oSourceThumbnailDock:oWidget, ::oQScintillaDock:oWidget )
|
||||
::oDlg:oWidget:tabifyDockWidget( ::oQScintillaDock:oWidget , ::oReportsManagerDock:oWidget )
|
||||
::oDlg:oWidget:tabifyDockWidget( ::oReportsManagerDock:oWidget , ::oFormatDock:oWidget )
|
||||
::oDlg:oWidget:tabifyDockWidget( ::oFormatDock:oWidget , ::oCuiEdDock:oWidget )
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -555,6 +561,13 @@ METHOD IdeDocks:execEvent( cEvent, p, p1 )
|
||||
LOCAL qEvent, qMime, qList, qUrl, i, n, oEdit, aMenu
|
||||
|
||||
SWITCH cEvent
|
||||
CASE "dockCuiEd_visibilityChanged"
|
||||
IF p; ::oCUI:show(); ENDIF
|
||||
IF ! p .AND. ! p1:isVisible()
|
||||
p1:raise()
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE "dockFormat_visibilityChanged"
|
||||
IF p; ::oFmt:show(); ENDIF
|
||||
IF ! p .AND. ! p1:isVisible()
|
||||
@@ -1355,6 +1368,7 @@ METHOD IdeDocks:buildToolBarPanels()
|
||||
aadd( aBtns, { ::oSourceThumbnailDock, "thumbnail" } )
|
||||
aadd( aBtns, { ::oQScintillaDock , "browser" } )
|
||||
aadd( aBtns, { ::oReportsManagerDock , "designer" } )
|
||||
aadd( aBtns, { ::oCuiEdDock , "cuied" } )
|
||||
aadd( aBtns, {} )
|
||||
aadd( aBtns, { ::oDockB2 , "builderror" } )
|
||||
|
||||
@@ -1963,3 +1977,15 @@ METHOD IdeDocks:buildFormatWidget()
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeDocks:buildCuiEdWidget()
|
||||
LOCAL nAreas := Qt_LeftDockWidgetArea + Qt_RightDockWidgetArea + Qt_TopDockWidgetArea + Qt_BottomDockWidgetArea
|
||||
|
||||
::oIde:oCuiEdDock := ::getADockWidget( nAreas, "dockCuiEd", "CUI Screen Designer", QDockWidget_DockWidgetFloatable )
|
||||
::oDlg:oWidget:addDockWidget( Qt_RightDockWidgetArea, ::oCuiEdDock:oWidget, Qt_Horizontal )
|
||||
::oCuiEdDock:oWidget:connect( "visibilityChanged(bool)", {|p| ::execEvent( "dockCuiEd_visibilityChanged", p, ::oCuiEdDock:oWidget ) } )
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -173,6 +173,7 @@ CLASS HbIde
|
||||
DATA oINI /* INI Manager */
|
||||
DATA oFmt /* Code Formatter Manager */
|
||||
DATA oCL /* ChangeLog Manager */
|
||||
DATA oCUI /* CUI Screen Designer Console */
|
||||
|
||||
DATA nRunMode INIT HBIDE_RUN_MODE_INI
|
||||
DATA nAnimantionMode INIT HBIDE_ANIMATION_NONE
|
||||
@@ -268,6 +269,7 @@ CLASS HbIde
|
||||
DATA oUpDn
|
||||
DATA oReportsManagerDock
|
||||
DATA oFormatDock
|
||||
DATA oCuiEdDock
|
||||
|
||||
DATA qAnimateAction
|
||||
DATA qStatusBarAction
|
||||
@@ -660,6 +662,9 @@ METHOD HbIde:create( aParams )
|
||||
/* Code Formatter Manager */
|
||||
::oFmt := IdeFormat():new():create( Self )
|
||||
|
||||
/* Console Editor */
|
||||
::oCUI := IdeConsole():new():create( Self )
|
||||
|
||||
/* Fill various elements of the IDE */
|
||||
::oPM:populate()
|
||||
::oSM:loadSources()
|
||||
@@ -773,6 +778,8 @@ METHOD HbIde:create( aParams )
|
||||
oXbp:handleEvent( nEvent, mp1, mp2 )
|
||||
ENDDO
|
||||
|
||||
hbide_setExitCuiEd( .t. )
|
||||
|
||||
DbCloseAll()
|
||||
::cProjIni := NIL
|
||||
hbide_setIde( NIL )
|
||||
@@ -1626,3 +1633,9 @@ METHOD HbIde:testPainter( qPainter )
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
FUNCTION hb_gtsys()
|
||||
REQUEST HB_GT_QTC
|
||||
RETURN NIL
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
@@ -102,6 +102,7 @@ CLASS IdeObject
|
||||
ACCESS oINI INLINE ::oIde:oINI
|
||||
ACCESS oFmt INLINE ::oIde:oFmt
|
||||
ACCESS oCL INLINE ::oIde:oCL
|
||||
ACCESS oCUI INLINE ::oIde:oCUI
|
||||
|
||||
ACCESS aMeta INLINE ::oIde:aMeta
|
||||
ACCESS aTags INLINE ::oIde:aTags
|
||||
@@ -202,6 +203,7 @@ CLASS IdeObject
|
||||
ACCESS oFormatDock INLINE ::oIde:oFormatDock
|
||||
ACCESS oSys INLINE ::oIde:oSys
|
||||
ACCESS oSysMenu INLINE ::oIde:oSysMenu
|
||||
ACCESS oCuiEdDock INLINE ::oIde:oCuiEdDock
|
||||
|
||||
ACCESS lProjTreeVisible INLINE ::oIde:lProjTreeVisible
|
||||
ACCESS lDockRVisible INLINE ::oIde:lDockRVisible
|
||||
|
||||
BIN
harbour/contrib/hbide/resources/cuied.png
Normal file
BIN
harbour/contrib/hbide/resources/cuied.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 551 B |
@@ -922,7 +922,7 @@ static HB_BOOL hb_gt_wvt_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo )
|
||||
break;
|
||||
|
||||
case HB_GTI_FONTWIDTH:
|
||||
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->fontWidth );
|
||||
pInfo->pResult = hb_itemPutNI( pInfo->pResult, pWVT->PTEXTSIZE.x() );
|
||||
iVal = hb_itemGetNI( pInfo->pNewVal );
|
||||
if( iVal > 0 )
|
||||
{
|
||||
@@ -1389,37 +1389,6 @@ DrawingArea::DrawingArea( QWidget *parent )
|
||||
_rCopying.setRect( -1, -1, -1, -1 );
|
||||
}
|
||||
|
||||
void DrawingArea::resetWindowSize( void )
|
||||
{
|
||||
PHB_GTWVT pWVT = HB_GTWVT_GET( pGT );
|
||||
|
||||
QPainter painter( this );
|
||||
|
||||
_iROWS = pWVT->ROWS;
|
||||
_iCOLS = pWVT->COLS;
|
||||
|
||||
_qFont = QFont();
|
||||
_qFont.setFamily( pWVT->fontFace );
|
||||
_qFont.setPixelSize( pWVT->fontHeight );
|
||||
_qFont.setFixedPitch( HB_TRUE );
|
||||
_qFont = QFont( _qFont, painter.device() );
|
||||
QFontMetrics fontMetrics( _qFont );
|
||||
_fontHeight = fontMetrics.height();
|
||||
_fontWidth = fontMetrics.averageCharWidth();
|
||||
_fontAscent = fontMetrics.ascent();
|
||||
_wndWidth = _fontWidth * _iCOLS;
|
||||
_wndHeight = _fontHeight * _iROWS;
|
||||
|
||||
pWVT->PTEXTSIZE.setX( _fontWidth );
|
||||
pWVT->PTEXTSIZE.setY( _fontHeight );
|
||||
|
||||
resizeImage( QSize( _wndWidth, _wndHeight ) );
|
||||
_image->fill( qRgb( 198,198,198 ) );
|
||||
setFont( _qFont );
|
||||
setFocus( Qt::OtherFocusReason );
|
||||
update();
|
||||
}
|
||||
|
||||
void DrawingArea::copyTextOnClipboard( void )
|
||||
{
|
||||
PHB_GTWVT pWVT = HB_GTWVT_GET( pGT );
|
||||
@@ -1528,12 +1497,12 @@ void DrawingArea::redrawBuffer( const QRect & rect )
|
||||
#if 1
|
||||
if( bAttr & HB_GT_ATTR_BOX )
|
||||
{
|
||||
drawBoxCharacter( &painter, usChar, bColor, iCol*_fontWidth, iRow*_fontHeight );
|
||||
drawBoxCharacter( &painter, usChar, bColor, iCol * _fontWidth, iRow * _fontHeight );
|
||||
}
|
||||
/* Hack to let it know if character is a Line character */
|
||||
else if( usChar >= 170 && usChar <= 223 )
|
||||
{
|
||||
drawBoxCharacter( &painter, usChar, bColor, iCol*_fontWidth, iRow*_fontHeight );
|
||||
drawBoxCharacter( &painter, usChar, bColor, iCol * _fontWidth, iRow * _fontHeight );
|
||||
bAttr = HB_GT_ATTR_BOX;
|
||||
}
|
||||
#endif
|
||||
@@ -1549,7 +1518,7 @@ void DrawingArea::redrawBuffer( const QRect & rect )
|
||||
{
|
||||
painter.setPen( QPen( _COLORS[ bOldColor & 0x0F ] ) );
|
||||
painter.setBackground( QBrush( _COLORS[ bOldColor >> 4 ] ) );
|
||||
painter.drawText( QPoint( startCol*_fontWidth, iTop ), QString( text ) );
|
||||
painter.drawText( QPoint( startCol * _fontWidth, iTop ), QString( text ) );
|
||||
}
|
||||
bOldColor = bColor;
|
||||
bOldAttr = bAttr;
|
||||
@@ -1566,7 +1535,7 @@ void DrawingArea::redrawBuffer( const QRect & rect )
|
||||
{
|
||||
painter.setPen( QPen( _COLORS[ bOldColor & 0x0F ] ) );
|
||||
painter.setBackground( QBrush( _COLORS[ bOldColor >> 4 ] ) );
|
||||
painter.drawText( QPoint( startCol*_fontWidth, iTop ), QString( text ) );
|
||||
painter.drawText( QPoint( startCol * _fontWidth, iTop ), QString( text ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1654,16 +1623,16 @@ void DrawingArea::displayCell( int iRow, int iCol )
|
||||
|
||||
painter.setPen( QPen( _COLORS[ bColor & 0x0F ] ) );
|
||||
painter.setBackground( QBrush( _COLORS[ bColor >> 4 ] ) );
|
||||
painter.drawText( QPoint( iCol*_fontWidth, ( iRow*_fontHeight ) + _fontAscent ), QString( usChar ) );
|
||||
painter.drawText( QPoint( iCol * _fontWidth, ( iRow * _fontHeight ) + _fontAscent ), QString( usChar ) );
|
||||
}
|
||||
/* We need immediate painting */
|
||||
repaint( QRect( iCol*_fontWidth, iRow*_fontHeight, _fontWidth, _fontHeight ) );
|
||||
repaint( QRect( iCol * _fontWidth, iRow * _fontHeight, _fontWidth, _fontHeight ) );
|
||||
}
|
||||
void DrawingArea::displayBlock( int iRow, int iCol )
|
||||
{
|
||||
QPainter painter( _image );
|
||||
#if 0
|
||||
painter.fillRect( QRect( iCol*_fontWidth, iRow*_fontHeight+(_fontHeight-_crtHeight),
|
||||
painter.fillRect( QRect( iCol*_fontWidth, iRow * _fontHeight + ( _fontHeight - _crtHeight ),
|
||||
_fontWidth, _crtHeight ), qRgb( 255,255,255 ) );
|
||||
#else
|
||||
painter.setCompositionMode( QPainter::RasterOp_SourceXorDestination );
|
||||
@@ -1671,7 +1640,7 @@ void DrawingArea::displayBlock( int iRow, int iCol )
|
||||
_fontWidth, _crtHeight ), QBrush( qRgb( 255,255,255 ) ) );
|
||||
#endif
|
||||
/* We need immediate painting */
|
||||
repaint( QRect( iCol*_fontWidth, iRow*_fontHeight, _fontWidth, _fontHeight ) );
|
||||
repaint( QRect( iCol * _fontWidth, iRow * _fontHeight, _fontWidth, _fontHeight ) );
|
||||
}
|
||||
void DrawingArea::timerEvent( QTimerEvent *event )
|
||||
{
|
||||
@@ -1697,6 +1666,40 @@ void DrawingArea::timerEvent( QTimerEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
void DrawingArea::resetWindowSize( void )
|
||||
{
|
||||
PHB_GTWVT pWVT = HB_GTWVT_GET( pGT );
|
||||
|
||||
QPainter painter( this );
|
||||
|
||||
_iROWS = pWVT->ROWS;
|
||||
_iCOLS = pWVT->COLS;
|
||||
|
||||
_qFont = QFont();
|
||||
_qFont.setFamily( pWVT->fontFace );
|
||||
_qFont.setPixelSize( pWVT->fontHeight );
|
||||
_qFont.setFixedPitch( HB_TRUE );
|
||||
_qFont = QFont( _qFont, painter.device() );
|
||||
QFontMetrics fontMetrics( _qFont );
|
||||
_fontHeight = fontMetrics.height();
|
||||
_fontWidth = fontMetrics.averageCharWidth();
|
||||
_fontAscent = fontMetrics.ascent();
|
||||
_wndWidth = _fontWidth * _iCOLS;
|
||||
_wndHeight = _fontHeight * _iROWS;
|
||||
|
||||
pWVT->PTEXTSIZE.setX( _fontWidth );
|
||||
pWVT->PTEXTSIZE.setY( _fontHeight );
|
||||
|
||||
pWVT->fontWidth = _fontWidth;
|
||||
pWVT->fontHeight = _fontHeight;
|
||||
|
||||
resizeImage( QSize( _wndWidth, _wndHeight ) );
|
||||
_image->fill( qRgb( 198,198,198 ) );
|
||||
setFont( _qFont );
|
||||
setFocus( Qt::OtherFocusReason );
|
||||
update();
|
||||
}
|
||||
|
||||
void DrawingArea::resizeImage( const QSize &newSize )
|
||||
{
|
||||
if( _image->size() == newSize )
|
||||
@@ -1767,6 +1770,10 @@ void DrawingArea::resizeEvent( QResizeEvent *event )
|
||||
|
||||
pWVT->PTEXTSIZE.setX( _fontWidth );
|
||||
pWVT->PTEXTSIZE.setY( _fontHeight );
|
||||
|
||||
pWVT->fontWidth = _fontWidth;
|
||||
pWVT->fontHeight = _fontHeight;
|
||||
|
||||
resizeImage( QSize( _wndWidth, _wndHeight ) );
|
||||
redrawBuffer( _image->rect() );
|
||||
hb_gt_wvt_FireEvent( pWVT, HB_GTE_RESIZED );
|
||||
|
||||
Reference in New Issue
Block a user