2010-07-08 10:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
* contrib/hbide/hbide.prg
* contrib/hbide/idedocks.prg
! More fix to previous. Now the visibility of source behavior is Ok.
* contrib/hbide/ideeditor.prg
! Changed: numeric to character events notation.
* contrib/hbide/idesaveload.prg
! Minor.
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
The license applies to all entries newer than 2009-04-28.
|
||||
*/
|
||||
|
||||
2010-07-08 10:21 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
|
||||
* contrib/hbide/hbide.prg
|
||||
* contrib/hbide/idedocks.prg
|
||||
! More fix to previous. Now the visibility of source behavior is Ok.
|
||||
|
||||
* contrib/hbide/ideeditor.prg
|
||||
! Changed: numeric to character events notation.
|
||||
|
||||
* contrib/hbide/idesaveload.prg
|
||||
! Minor.
|
||||
|
||||
2010-07-08 17:39 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* INSTALL
|
||||
* contrib/hbqt/hbqts.hbp
|
||||
|
||||
@@ -510,15 +510,9 @@ METHOD HbIde:create( aParams )
|
||||
::oDK:animateComponents( val( ::oINI:cIdeAnimated ) )
|
||||
::oSetup:setSystemStyle( ::oINI:cIdeTheme )
|
||||
|
||||
::oDK:setViewInitials( "Main" )
|
||||
FOR EACH cV IN ::oINI:aViews
|
||||
::oDK:setView( cV )
|
||||
IF ::qTabWidget:count() == 1
|
||||
::oEM:setSourceVisibleByIndex( 0 )
|
||||
ELSE
|
||||
::qTabWidget:setCurrentIndex( 0 )
|
||||
::qTabWidget:setCurrentIndex( ::qTabWidget:count() - 1 )
|
||||
::qTabWidget:setCurrentIndex( 0 )
|
||||
ENDIF
|
||||
::oDK:setViewInitials( cV )
|
||||
NEXT
|
||||
|
||||
/* Refresh Stylesheet for all components at once */
|
||||
|
||||
@@ -134,6 +134,7 @@ CLASS IdeDocks INHERIT IdeObject
|
||||
METHOD buildUpDownWidget()
|
||||
METHOD buildSystemTray()
|
||||
METHOD showDlgBySystemTrayIconCommand()
|
||||
METHOD setViewInitials( cView )
|
||||
|
||||
ENDCLASS
|
||||
|
||||
@@ -565,6 +566,24 @@ METHOD IdeDocks:getADockWidget( nAreas, cObjectName, cWindowTitle, nFlags, cEven
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeDocks:setViewInitials( cView )
|
||||
|
||||
::setView( cView )
|
||||
|
||||
HB_TRACE( HB_TR_ALWAYS, cView, ::qTabWidget:count() )
|
||||
|
||||
IF ::qTabWidget:count() == 1
|
||||
::oEM:setSourceVisibleByIndex( 0 )
|
||||
ELSE
|
||||
::qTabWidget:setCurrentIndex( 0 )
|
||||
::qTabWidget:setCurrentIndex( ::qTabWidget:count() - 1 )
|
||||
::qTabWidget:setCurrentIndex( 0 )
|
||||
ENDIF
|
||||
|
||||
RETURN Self
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeDocks:setView( cView )
|
||||
LOCAL n, nIndex
|
||||
|
||||
|
||||
@@ -73,13 +73,6 @@
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
#define blockCountChanged 21
|
||||
#define contentsChange 22
|
||||
#define timerTimeout 23
|
||||
|
||||
#define qcompleter_activated 101
|
||||
#define qTab_contextMenu 111
|
||||
|
||||
#define EDT_LINNO_WIDTH 50
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
@@ -95,7 +88,7 @@ CLASS IdeEditsManager INHERIT IdeObject
|
||||
METHOD destroy()
|
||||
METHOD removeSourceInTree( cSourceFile )
|
||||
METHOD addSourceInTree( cSourceFile, cView )
|
||||
METHOD execEvent( nMode, p )
|
||||
METHOD execEvent( cEvent, p )
|
||||
METHOD buildEditor( cSourceFile, nPos, nHPos, nVPos, cTheme, cView, aBookMarks )
|
||||
METHOD getTabBySource( cSource )
|
||||
METHOD getTabCurrent()
|
||||
@@ -235,7 +228,7 @@ METHOD IdeEditsManager:create( oIde )
|
||||
::oIde:qProtoList := QStringList():new()
|
||||
::oIde:qCompModel := QStringListModel():new()
|
||||
::oIde:qCompleter := QCompleter():new()
|
||||
::connect( ::qCompleter, "activated(QString)", {|p| ::execEvent( qcompleter_activated, p ) } )
|
||||
::connect( ::qCompleter, "activated(QString)", {|p| ::execEvent( "qcompleter_activated", p ) } )
|
||||
::updateCompleter()
|
||||
|
||||
RETURN Self
|
||||
@@ -327,11 +320,11 @@ array2table(
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditsManager:execEvent( nMode, p )
|
||||
METHOD IdeEditsManager:execEvent( cEvent, p )
|
||||
LOCAL oEdit
|
||||
|
||||
DO CASE
|
||||
CASE nMode == qcompleter_activated
|
||||
CASE cEvent == "qcompleter_activated"
|
||||
IF !empty( oEdit := ::getEditObjectCurrent() )
|
||||
oEdit:completeCode( p )
|
||||
ENDIF
|
||||
@@ -1130,7 +1123,7 @@ CLASS IdeEditor INHERIT IdeObject
|
||||
METHOD split( nOrient, oEditP )
|
||||
METHOD relay( oEdit )
|
||||
METHOD destroy()
|
||||
METHOD execEvent( nMode, p )
|
||||
METHOD execEvent( cEvent, p )
|
||||
METHOD setDocumentProperties()
|
||||
METHOD activateTab( mp1, mp2, oXbp )
|
||||
METHOD buildTabPage( cSource )
|
||||
@@ -1239,6 +1232,8 @@ METHOD IdeEditor:create( oIde, cSourceFile, nPos, nHPos, nVPos, cTheme, cView, a
|
||||
::connect( ::oEdit:qEdit, "updateRequest(QRect,int)", {|| ::scrollThumbnail() } )
|
||||
|
||||
::qDocument := QTextDocument():configure( ::qEdit:document() )
|
||||
::connect( ::qDocument, "documentLayoutChanged()", {|| ::execEvent( "qDocument_documentLayoutChanged" ) } )
|
||||
|
||||
::qDocLayout := QPlainTextDocumentLayout():new( ::qDocument )
|
||||
::qDocument:setDocumentLayout( ::qDocLayout )
|
||||
|
||||
@@ -1442,7 +1437,7 @@ METHOD IdeEditor:setDocumentProperties()
|
||||
IF ::cType $ "PRG,C,CPP,H,CH"
|
||||
::qTimerSave := QTimer():New()
|
||||
::qTimerSave:setInterval( max( 30000, ::oINI:nTmpBkpPrd * 1000 ) )
|
||||
::connect( ::qTimerSave, "timeout()", {|| ::execEvent( qTimeSave_timeout ) } )
|
||||
::connect( ::qTimerSave, "timeout()", {|| ::execEvent( "qTimeSave_timeout" ) } )
|
||||
::qTimerSave:start()
|
||||
ENDIF
|
||||
|
||||
@@ -1465,21 +1460,36 @@ METHOD IdeEditor:setDocumentProperties()
|
||||
|
||||
/*----------------------------------------------------------------------*/
|
||||
|
||||
METHOD IdeEditor:execEvent( nMode, p )
|
||||
METHOD IdeEditor:execEvent( cEvent, p )
|
||||
LOCAL cFileTemp, aPops := {}
|
||||
//LOCAL qRFrame, qFFormat
|
||||
|
||||
p := p
|
||||
|
||||
SWITCH nMode
|
||||
CASE qTimeSave_timeout
|
||||
SWITCH cEvent
|
||||
CASE "qDocument_documentLayoutChanged"
|
||||
#if 0
|
||||
HB_TRACE( HB_TR_ALWAYS, "qDocument_documentLayoutChanged" )
|
||||
|
||||
qRFrame := QTextFrame():from( ::qDocument:rootFrame() )
|
||||
// qFFormat := 0
|
||||
qFFormat := QTextFrameFormat():from( qRFrame )
|
||||
// qFFormat:setMargin( 0 )
|
||||
// qFFormat:setPadding( 0 )
|
||||
qRFrame:setFrameFormat( qFFormat )
|
||||
hbide_justACall( qRFrame, qFFormat )
|
||||
#endif
|
||||
EXIT
|
||||
|
||||
CASE "qTimeSave_timeout"
|
||||
IF ::qDocument:isModified()
|
||||
cFileTemp := hbide_pathToOSPath( ::cPath + ::cFile + ::cExt + ".tmp" )
|
||||
hb_memowrit( cFileTemp, ::qEdit:toPlainText() )
|
||||
ENDIF
|
||||
EXIT
|
||||
|
||||
CASE qTab_contextMenu
|
||||
HB_TRACE( HB_TR_ALWAYS, "IdeEditor:execEvent( nMode, p )" )
|
||||
CASE "qTab_contextMenu"
|
||||
HB_TRACE( HB_TR_ALWAYS, "IdeEditor:execEvent( cMode, p )" )
|
||||
aadd( aPops, { "Close", {|| MsgBox( "closing" ) } } )
|
||||
hbide_ExecPopup( aPops, p, ::oTab:oWidget )
|
||||
|
||||
@@ -1524,8 +1534,6 @@ METHOD IdeEditor:buildTabPage( cSource )
|
||||
::oTab:create()
|
||||
|
||||
::qTabWidget:setTabTooltip( ::qTabWidget:indexOf( ::oTab:oWidget ), cSource )
|
||||
//::connect( ::oTab:oWidget, "customContextMenuRequested(QPoint)", {|p| ::execEvent( qTab_contextMenu, p ) } )
|
||||
//::oTab:hbContextMenu := {|| ::execEvent( qTab_contextMenu, p ) }
|
||||
::oTab:tabActivate := {|mp1,mp2,oXbp| ::activateTab( mp1, mp2, oXbp ) }
|
||||
|
||||
RETURN Self
|
||||
|
||||
@@ -1366,7 +1366,7 @@ METHOD IdeSetup:execEvent( cEvent, p, p1 )
|
||||
EXIT
|
||||
CASE "buttonThmAdd_clicked"
|
||||
IF !empty( cTheme := hbide_fetchAString( ::oDlg:oWidget, cTheme, "Name the Theme", "New Theme" ) )
|
||||
aadd( ::oINI:aAppThemes, cTheme + "," + "," + "," + "," )
|
||||
aadd( ::oINI:aAppThemes, cTheme + "," + ::fetchThemeColorsString() )
|
||||
qItem := QListWidgetItem():new()
|
||||
qItem:setText( cTheme )
|
||||
::oUI:q_listThemes:addItem_1( qItem )
|
||||
|
||||
Reference in New Issue
Block a user