diff --git a/harbour/ChangeLog b/harbour/ChangeLog
index d6ef0863ef..9607778391 100644
--- a/harbour/ChangeLog
+++ b/harbour/ChangeLog
@@ -16,6 +16,30 @@
The license applies to all entries newer than 2009-04-28.
*/
+2012-09-22 02:27 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
+ * contrib/hbide/actions.prg
+ + Added: prompts of IdePARTS in "View" menu.
+ * contrib/hbide/docks.prg
+ - Deleted: some redundant code.
+ * contrib/hbide/main.prg
+ * contrib/hbide/parts.prg
+ + Added: new part "IdeREPORTS" as a non-dock widget. It is
+ parallel to "IdeDBU".
+ - Deleted: ReportsManager relevant docking widget code.
+
+ * contrib/hbide/hbide.qrc
+ - Deleted: resources which are part of XbpAddOns lib.
+
+ * contrib/hbide/xbpaddons/dbu.prg
+ + contrib/hbide/xbpaddons/misc.prg
+ * contrib/hbide/xbpaddons/reports.prg
+ * contrib/hbide/xbpaddons/xbp.qrc
+ * contrib/hbide/xbpaddons/xbpaddons.hbp
+ + Transferred: resources used for IdeREPORTS.
+
+ * contrib/hbxbp/toolbar.prg
+ % Optimized: XbpToolbar() class.
+
2012-09-22 11:28 UTC+0200 Viktor Szakats (harbour syenar.net)
+ contrib/hbide/xbpaddons/dbstruct.ui
+ contrib/hbide/xbpaddons/fetchdate.ui
@@ -43,7 +67,7 @@
+ contrib/hbide/xbpaddons/reports.prg
* contrib/hbide/xbpaddons/xbpaddons.hbp
% Moved: IdeReports functionality from HbIDE to XbpAddOns lib.
- TODO: move IdeReports specific resources to XbpAddOns.
+ DONE: move IdeReports specific resources to XbpAddOns.
2012-09-21 18:50 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com)
- contrib/hbide/dbstruct.ui
diff --git a/harbour/contrib/hbide/actions.prg b/harbour/contrib/hbide/actions.prg
index c8a930704a..7bee3dd9ab 100644
--- a/harbour/contrib/hbide/actions.prg
+++ b/harbour/contrib/hbide/actions.prg
@@ -361,8 +361,9 @@ METHOD IdeActions:loadActions()
aadd( aAct, { "Dictionary" , "Create .tag Dictionary" , "dictionary" , "" , "No", "Yes" } )
aadd( aAct, { "ConfigToolbars" , "Configure Toolbars" , "configtoolbars" , "" , "No", "Yes" } )
//
- aadd( aAct, { "DBU" , "ideDBU" , "browser" , "" , "No", "Yes" } )
- aadd( aAct, { "EDITOR" , "ideEDITOR" , "editor" , "" , "No", "Yes" } )
+ aadd( aAct, { "DBU" , "IdeDBU" , "browser" , "" , "No", "Yes" } )
+ aadd( aAct, { "EDITOR" , "IdeEDITOR" , "editor" , "" , "No", "Yes" } )
+ aadd( aAct, { "REPORTS" , "IdeREPORTS" , "designer" , "" , "No", "Yes" } )
RETURN aAct
@@ -524,6 +525,15 @@ METHOD IdeActions:buildMainMenu()
hbide_menuAddSep( oSubMenu )
+ oSubMenu2 := XbpMenu():new( oSubMenu, , .t. ):create()
+ oSubMenu:addItem( { oSubMenu2, "IdePARTS" } )
+
+ oSubMenu2:addItem( { ::getAction( "EDITOR" ), {|| ::oIde:execAction( "EDITOR" ) } } )
+ oSubMenu2:addItem( { ::getAction( "DBU" ), {|| ::oIde:execAction( "DBU" ) } } )
+ oSubMenu2:addItem( { ::getAction( "REPORTS" ), {|| ::oIde:execAction( "REPORTS" ) } } )
+
+ hbide_menuAddSep( oSubMenu )
+
oSubMenu2 := XbpMenu():new( oSubMenu, , .t. ):create()
oSubMenu:addItem( { oSubMenu2, "Toolbars" } )
@@ -543,31 +553,28 @@ METHOD IdeActions:buildMainMenu()
oSubMenu2 := XbpMenu():new( oSubMenu, , .t. ):create()
oSubMenu:addItem( { oSubMenu2, "Docking Widgets" } )
- oSubMenu2:oWidget:addAction( ::oDockPT:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oDockED:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oSkltnsTreeDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oDockPT:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oDockED:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oSkltnsTreeDock:oWidget:toggleViewAction() )
hbide_menuAddSep( oSubMenu2 )
- oSubMenu2:oWidget:addAction( ::oHelpDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oDocViewDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oDocWriteDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oFuncDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oFunctionsDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oPropertiesDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oEnvironDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oSkeltnDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oThemesDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oFindDock:oWidget:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oSourceThumbnailDock:oWidget:toggleViewAction() )
-// oSubMenu2:oWidget:addAction( ::oQScintillaDock:oWidget:toggleViewAction() )
-
- oSubMenu2:oWidget:addAction( ::oReportsManagerDock:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oCuiEdDock:toggleViewAction() )
- oSubMenu2:oWidget:addAction( ::oIde:oUISrcDock:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oHelpDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oDocViewDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oDocWriteDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oFuncDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oFunctionsDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oPropertiesDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oEnvironDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oSkeltnDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oThemesDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oFindDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oSourceThumbnailDock:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oCuiEdDock:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oIde:oUISrcDock:toggleViewAction() )
hbide_menuAddSep( oSubMenu2 )
- oSubMenu2:oWidget:addAction( ::oDockB2:oWidget:toggleViewAction() )
- * oSubMenu:oWidget:addAction( ::oDockB1:oWidget:toggleViewAction() )
- * oSubMenu:oWidget:addAction( ::oDockB:oWidget:toggleViewAction() )
+ oSubMenu2:oWidget:addAction( ::oDockB2:oWidget:toggleViewAction() )
+ * oSubMenu:oWidget:addAction( ::oDockB1:oWidget:toggleViewAction() )
+ * oSubMenu:oWidget:addAction( ::oDockB:oWidget:toggleViewAction() )
hbide_menuAddSep( oSubMenu )
@@ -1051,8 +1058,9 @@ METHOD IdeActions:buildToolbarParts()
::qPartsToolbar:setWindowTitle( "Ide Parts" )
::qPartsToolbar:setToolButtonStyle( Qt_ToolButtonIconOnly )
- ::qPartsToolbar:addAction( "IdeDBU" , ::getAction( "DBU" ), {|| ::oIde:execAction( "DBU" ) } )
- ::qPartsToolbar:addAction( "IdeEDITOR", ::getAction( "EDITOR" ), {|| ::oIde:execAction( "EDITOR" ) } )
+ ::qPartsToolbar:addAction( "IdeEDITOR" , ::getAction( "EDITOR" ), {|| ::oIde:execAction( "EDITOR" ) } )
+ ::qPartsToolbar:addAction( "IdeDBU" , ::getAction( "DBU" ), {|| ::oIde:execAction( "DBU" ) } )
+ ::qPartsToolbar:addAction( "IdeREPORTS", ::getAction( "REPORTS"), {|| ::oIde:execAction( "REPORTS" ) } )
::oDlg:oWidget:addToolBar( Qt_TopToolBarArea, ::qPartsToolbar:oWidget )
@@ -1113,8 +1121,6 @@ METHOD IdeActions:buildToolBarDocks()
aadd( aBtns, { ::oThemesDock , "syntaxhiliter" } )
aadd( aBtns, { ::oFindDock , "search" } )
aadd( aBtns, { ::oSourceThumbnailDock, "thumbnail" } )
-// aadd( aBtns, { ::oQScintillaDock , "browser" } )
- aadd( aBtns, { ::oReportsManagerDock , "designer" } )
aadd( aBtns, { ::oCuiEdDock , "cuied" } )
aadd( aBtns, { ::oUiSrcDock , "fileprg" } )
aadd( aBtns, {} )
diff --git a/harbour/contrib/hbide/docks.prg b/harbour/contrib/hbide/docks.prg
index de329facee..435338cdea 100644
--- a/harbour/contrib/hbide/docks.prg
+++ b/harbour/contrib/hbide/docks.prg
@@ -111,8 +111,6 @@
#define __docEnvironments_visibilityChanged__ 2036
#define __docSkeletons_visibilityChanged__ 2037
#define __dockSourceThumbnail_visibilityChanged__ 2038
-#define __dockQScintilla_visibilityChanged__ 2039
-#define __dockReportsManager_visibilityChanged__ 2040
#define __dockFormat_visibilityChanged__ 2041
#define __dockCuiEd_visibilityChanged__ 2042
#define __dockUISrc_visibilityChanged__ 2043
@@ -179,9 +177,7 @@ CLASS IdeDocks INHERIT IdeObject
METHOD getPanelIcon( cView )
METHOD animateComponents( nMode )
METHOD buildSourceThumbnail()
- METHOD buildQScintilla()
METHOD buildUpDownWidget()
- METHOD buildReportsDesignerWidget()
METHOD buildSystemTray()
METHOD showDlgBySystemTrayIconCommand()
METHOD setViewInitials()
@@ -237,8 +233,6 @@ METHOD IdeDocks:hideAllDocks()
::oHelpDock : hide()
::oFuncDock : hide()
::oSourceThumbnailDock : hide()
- ::oQScintillaDock : hide()
- ::oReportsManagerDock : hide()
::oFormatDock : hide()
::oCuiEdDock : hide()
::oUiSrcDock : hide()
@@ -280,8 +274,6 @@ METHOD IdeDocks:destroy()
::oFuncDock:oWidget : disconnect( "visibilityChanged(bool)" )
::oSourceThumbnailDock:oWidget: disconnect( "visibilityChanged(bool)" )
- ::oQScintillaDock:oWidget : disconnect( "visibilityChanged(bool)" )
- ::oReportsManagerDock:oWidget : disconnect( "visibilityChanged(bool)" )
::oFormatDock:oWidget : disconnect( "visibilityChanged(bool)" )
::oCuiEdDock:oWidget : disconnect( "visibilityChanged(bool)" )
::oUiSrcDock:oWidget : disconnect( "visibilityChanged(bool)" )
@@ -310,39 +302,6 @@ METHOD IdeDocks:destroy()
::qTimer := NIL
ENDIF
- ::oIde:oOutputResult := NIL
- ::oIde:oEnvironDock := NIL
- ::oIde:oPropertiesDock := NIL
- ::oIde:oThemesDock := NIL
- ::oIde:oDocViewDock := NIL
- ::oIde:oDocWriteDock := NIL
- ::oIde:oFindDock := NIL
- ::oIde:oFunctionsDock := NIL
- ::oIde:oSkeltnDock := NIL
- ::oIde:oHelpDock := NIL
- ::oIde:oFuncDock := NIL
-
- ::oIde:oSourceThumbnailDock := NIL
- ::oIde:oQScintillaDock := NIL
- ::oIde:oReportsManagerDock := NIL
- ::oIde:oFormatDock := NIL
- ::oIde:oCuiEdDock := NIL
- ::oIde:oUiSrcDock := NIL
-
- ::oIde:oDockPT := NIL
- ::oIde:oDockED := NIL
- ::oIde:oDockB2 := NIL
-
- ::oIde:oDockB1 := NIL
- ::oIde:oLinkResult := NIL
-
- ::oIde:oSys := NIL
- ::qAct1 := NIL
- ::qAct2 := NIL
-
- ::oIde:oDockB := NIL
- ::oIde:oCompileResult := NIL
-
FOR EACH qTmp IN ::aPanels
qTmp:disconnect( "clicked()" )
qTmp := NIL
@@ -370,16 +329,6 @@ METHOD IdeDocks:destroy()
::qMdiToolBarL:destroy()
::qMdiToolBarL := NIL
ENDIF
- ::nPass := NIL
- ::aPanels := NIL
- ::aMdiBtns := NIL
- ::aBtnLines := NIL
- ::aBtnDocks := NIL
- ::oBtnTabClose := NIL
- ::aViewsInfo := NIL
- ::qTBtnClose := NIL
- ::qTimer := NIL
- ::nPrevWindowState := NIL
RETURN Self
@@ -549,9 +498,7 @@ METHOD IdeDocks:buildDockWidgets()
::buildDocWriter()
::buildFunctionsDock()
::buildSourceThumbnail()
- ::buildQScintilla()
::buildUpDownWidget()
- ::buildReportsDesignerWidget()
::buildFormatWidget()
::buildCuiEdWidget()
::buildUiSrcDock()
@@ -618,23 +565,6 @@ METHOD IdeDocks:execEvent( nEvent, p, p1 )
p1:raise()
ENDIF
EXIT
- CASE __dockReportsManager_visibilityChanged__
- IF !empty( p1 )
- IF ! p .AND. ! p1:isVisible()
- p1:raise()
- ENDIF
- ENDIF
- EXIT
-#if 0 /* Deprecated */
- CASE __dockQScintilla_visibilityChanged__
- IF p; ::oBM:show() ; ENDIF
- IF !empty( p1 )
- IF ! p .AND. ! p1:isVisible()
- p1:raise()
- ENDIF
- ENDIF
- EXIT
-#endif
CASE __dockSourceThumbnail_visibilityChanged__
IF p; ::oEM:showThumbnail(); ENDIF
IF !empty( p1 )
@@ -1688,7 +1618,6 @@ METHOD IdeDocks:animateComponents( nMode )
::oThemesDock:oWidget : setStyleSheet( cStyle )
::oFindDock:oWidget : setStyleSheet( cStyle )
::oDockB2:oWidget : setStyleSheet( cStyle )
- ::oQScintillaDock:oWidget : setStyleSheet( cStyle )
::oSourceThumbnailDock:oWidget : setStyleSheet( cStyle )
::oProjTree:oWidget:setStyleSheet( GetStyleSheet( "QTreeWidgetHB", ::nAnimantionMode ) )
@@ -1803,28 +1732,6 @@ METHOD IdeDocks:buildSourceThumbnail()
/*----------------------------------------------------------------------*/
-METHOD IdeDocks:buildQScintilla()
- LOCAL nAreas := Qt_LeftDockWidgetArea + Qt_RightDockWidgetArea + Qt_TopDockWidgetArea + Qt_BottomDockWidgetArea
-
- ::oIde:oQScintillaDock := ::getADockWidget( nAreas, "dockQScintilla", "ideDBU", QDockWidget_DockWidgetFloatable )
- ::oDlg:oWidget:addDockWidget( Qt_RightDockWidgetArea, ::oQScintillaDock:oWidget, Qt_Horizontal )
- ::oQScintillaDock:oWidget:connect( "visibilityChanged(bool)" , {|p| ::execEvent( __dockQScintilla_visibilityChanged__, p, ::oQScintillaDock:oWidget ) } )
-
- RETURN Self
-
-/*----------------------------------------------------------------------*/
-
-METHOD IdeDocks:buildReportsDesignerWidget()
- LOCAL nAreas := Qt_LeftDockWidgetArea + Qt_RightDockWidgetArea + Qt_TopDockWidgetArea + Qt_BottomDockWidgetArea
-
- ::oIde:oReportsManagerDock := ::getADockWidget( nAreas, "dockReportDesigner", "HBReportsManager", QDockWidget_DockWidgetFloatable )
- ::oDlg:oWidget:addDockWidget( Qt_RightDockWidgetArea, ::oReportsManagerDock:oWidget, Qt_Horizontal )
- ::oReportsManagerDock:oWidget:connect( "visibilityChanged(bool)", {|p| ::execEvent( __dockReportsManager_visibilityChanged__, p, ::oReportsManagerDock:oWidget ) } )
-
- RETURN Self
-
-/*----------------------------------------------------------------------*/
-
METHOD IdeDocks:buildFormatWidget()
LOCAL nAreas := Qt_LeftDockWidgetArea + Qt_RightDockWidgetArea + Qt_TopDockWidgetArea + Qt_BottomDockWidgetArea
diff --git a/harbour/contrib/hbide/hbide.qrc b/harbour/contrib/hbide/hbide.qrc
index d21bed3cbe..7e04e95561 100644
--- a/harbour/contrib/hbide/hbide.qrc
+++ b/harbour/contrib/hbide/hbide.qrc
@@ -219,47 +219,6 @@
resources/zoomout.png
resources/zoomin3.png
resources/zoomout3.png
- resources/f_align_left.png
- resources/f_align_right.png
- resources/f_align_center.png
- resources/f_align_justify.png
- resources/f_align_top.png
- resources/f_align_middle.png
- resources/f_align_bottom.png
- resources/f_box_top.png
- resources/f_box_left.png
- resources/f_box_bottom.png
- resources/f_box_right.png
- resources/f_box_all.png
- resources/f_box_plain.png
- resources/f_box_shadow.png
- resources/f-generic.png
- resources/f-image.png
- resources/f_chart.png
- resources/f_gradient.png
- resources/f_barcode.png
- resources/f-bold-1.png
- resources/f-italic-1.png
- resources/f-underline-1.png
- resources/f-strike-1.png
- resources/toback.png
- resources/tofront.png
- resources/r-page.png
- resources/r-report.png
- resources/r-landscape.png
- resources/r-portrait.png
- resources/rp_arc.png
- resources/rp_chord.png
- resources/rp_diamond.png
- resources/rp_triangle.png
- resources/rp_rectangle.png
- resources/rp_roundrectangle.png
- resources/rp_linevert.png
- resources/rp_linehorz.png
- resources/rp_linediagright.png
- resources/rp_linediagleft.png
- resources/rp_ellipse.png
- resources/rp_shapes.png
resources/memo.png
resources/hideshow.png
resources/cuied.png
diff --git a/harbour/contrib/hbide/main.prg b/harbour/contrib/hbide/main.prg
index 654ca56ae3..238f9dc918 100644
--- a/harbour/contrib/hbide/main.prg
+++ b/harbour/contrib/hbide/main.prg
@@ -678,9 +678,8 @@ METHOD HbIde:create( aParams )
/* Reports Manager */
::oRM := HbpReports():new()
- ::oRM:qtObject := ::oReportsManagerDock:oWidget
- ::oRM:create( , , , , , .T. )
- ::oReportsManagerDock:oWidget:setWidget( ::oRM:oWidget )
+ ::oRM:qtObject := ::oParts:oStackReports
+ ::oRM:create( ::oDlg, , {0,0}, {640,400}, , .T. )
/* Code Formatter Manager */
::oFmt := IdeFormat():new():create( Self )
@@ -1011,11 +1010,14 @@ METHOD HbIde:execAction( cKey )
CASE "Help"
::oHelpDock:show()
EXIT
+ CASE "EDITOR"
+ ::oParts:setStack( 0 )
+ EXIT
CASE "DBU"
::oParts:setStack( 1 )
EXIT
- CASE "EDITOR"
- ::oParts:setStack( 0 )
+ CASE "REPORTS"
+ ::oParts:setStack( 2 )
EXIT
ENDSWITCH
diff --git a/harbour/contrib/hbide/parts.prg b/harbour/contrib/hbide/parts.prg
index d4c46fa1b1..1849a31945 100644
--- a/harbour/contrib/hbide/parts.prg
+++ b/harbour/contrib/hbide/parts.prg
@@ -79,11 +79,13 @@ CLASS IdeParts INHERIT IdeObject
DATA oLayoutDA
DATA oLayoutEditor
DATA oLayoutDbu
+ DATA oLayoutReports
DATA oStackWidget
DATA oStackEditor
DATA oStackDbu
+ DATA oStackReports
DATA oSettings
@@ -143,22 +145,26 @@ METHOD IdeParts:buildLayout( nLayout )
METHOD IdeParts:buildParts()
- ::oLayoutDA := ::buildLayout( 0 )
- ::oLayoutDbu := ::buildLayout( 0 )
- ::oLayoutEditor := ::buildLayout( 0 )
+ ::oLayoutDA := ::buildLayout( 0 )
+ ::oLayoutDbu := ::buildLayout( 0 )
+ ::oLayoutEditor := ::buildLayout( 0 )
+ ::oLayoutReports := ::buildLayout( 0 )
::oDa:setLayout( ::oLayoutDA )
::oStackWidget := QStackedWidget( ::oDa:oWidget )
//
- ::oStackEditor := QWidget( ::oStackWidget )
- ::oStackDbu := QWidget( ::oStackWidget )
+ ::oStackEditor := QWidget( ::oStackWidget )
+ ::oStackDbu := QWidget( ::oStackWidget )
+ ::oStackReports := QWidget( ::oStackWidget )
//
- ::oStackWidget:addWidget( ::oStackEditor )
- ::oStackWidget:addWidget( ::oStackDbu )
+ ::oStackWidget:addWidget( ::oStackEditor )
+ ::oStackWidget:addWidget( ::oStackDbu )
+ ::oStackWidget:addWidget( ::oStackReports )
- ::oStackEditor:setLayout( ::oLayoutEditor )
- ::oStackDbu :setLayout( ::oLayoutDbu )
+ ::oStackEditor :setLayout( ::oLayoutEditor )
+ ::oStackDbu :setLayout( ::oLayoutDbu )
+ ::oStackReports:setLayout( ::oLayoutReports )
::oLayoutDA:addWidget( ::oStackWidget, 0, 0, 1, 1 )
@@ -187,6 +193,11 @@ METHOD IdeParts:execStackIndexChanged( nIndex )
::oDK:hideAllDocks()
EXIT
+ CASE IDE_PART_REPORTSDESIGNER
+ ::oIde:oSBar:hide()
+ ::oDK:hideAllDocks()
+ EXIT
+
ENDSWITCH
::nCurStacksIndex := nIndex
@@ -208,6 +219,7 @@ METHOD IdeParts:addWidget( nPart, oWidget, nFromRow, nFromColumn, nRowSpan, nCol
EXIT
CASE IDE_PART_REPORTSDESIGNER
+ ::oLayoutReports:addWidget( oWidget, nFromRow, nFromColumn, nRowSpan, nColumnSpan )
EXIT
ENDSWITCH
diff --git a/harbour/contrib/hbide/xbpaddons/dbu.prg b/harbour/contrib/hbide/xbpaddons/dbu.prg
index 6f707757d8..abe6ca6b13 100644
--- a/harbour/contrib/hbide/xbpaddons/dbu.prg
+++ b/harbour/contrib/hbide/xbpaddons/dbu.prg
@@ -543,7 +543,7 @@ METHOD HbpDBU:addPanelsMenu( cPanel )
LOCAL qAct
IF HB_ISOBJECT( ::qPanelsMenu )
qAct := ::qPanelsMenu:addAction( cPanel )
- qAct:setIcon( QIcon( dbu_Image( "panel_7" ) ) )
+ qAct:setIcon( QIcon( Hbp_Image( "panel_7" ) ) )
qAct:connect( "triggered(bool)", {|| ::setPanel( cPanel ) } )
aadd( ::aPanelsAct, qAct )
ENDIF
@@ -1021,17 +1021,17 @@ METHOD HbpDBU:buildToolbar()
qTBar:addItem( ::sp0 )
::buildRddsCombo()
::buildConxnCombo()
- qTBar:addItem( { "Open" , "Open a Table" , QIcon( dbu_Image( "open3" ) ), {|| ::execEvent( __buttonOpen_clicked__ ) }, .F. } )
+ qTBar:addItem( { "Open" , "Open a Table" , QIcon( Hbp_Image( "open3" ) ), {|| ::execEvent( __buttonOpen_clicked__ ) }, .F. } )
qTBar:addItem( ::sp1 )
- qTBar:addItem( { "Toggle" , "Show/Hide Form View", QIcon( dbu_Image( "form" ) ), {|| ::execEvent( __buttonShowForm_clicked__ ) }, .T. } )
+ qTBar:addItem( { "Toggle" , "Show/Hide Form View", QIcon( Hbp_Image( "form" ) ), {|| ::execEvent( __buttonShowForm_clicked__ ) }, .T. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "Structure", "Table Structure" , QIcon( dbu_Image( "dbstruct" ) ), {|| ::execEvent( __buttonDbStruct_clicked__ ) }, .F. } )
+ qTBar:addItem( { "Structure", "Table Structure" , QIcon( Hbp_Image( "dbstruct" ) ), {|| ::execEvent( __buttonDbStruct_clicked__ ) }, .F. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
::buildIndexButton()
- qTBar:addItem( { "Search" , "Search in Table" , QIcon( dbu_Image( "find" ) ), {|| ::execEvent( __buttonFind_clicked__ ) }, .F. } )
- qTBar:addItem( { "Goto" , "Goto Record" , QIcon( dbu_Image( "gotoline3" ) ), {|| ::execEvent( __buttonGoto_clicked__ ) }, .F. } )
+ qTBar:addItem( { "Search" , "Search in Table" , QIcon( Hbp_Image( "find" ) ), {|| ::execEvent( __buttonFind_clicked__ ) }, .F. } )
+ qTBar:addItem( { "Goto" , "Goto Record" , QIcon( Hbp_Image( "gotoline3" ) ), {|| ::execEvent( __buttonGoto_clicked__ ) }, .F. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "Close" , "Close Current Table", QIcon( dbu_Image( "dc_delete" ) ), {|| ::execEvent( __buttonClose_clicked__ ) }, .F. } )
+ qTBar:addItem( { "Close" , "Close Current Table", QIcon( Hbp_Image( "dc_delete" ) ), {|| ::execEvent( __buttonClose_clicked__ ) }, .F. } )
qTBar:addItem( ::sp2 )
::buildTablesButton()
@@ -1051,31 +1051,31 @@ METHOD HbpDBU:buildLeftToolbar()
::qToolbarL := qTBar
- qTBar:addItem( { "view_tabbed" , "Toggle Tabbed View" , QIcon( dbu_Image( "view_tabbed" ) ), {|| ::execEvent( __buttonViewTabbed_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_tabbed" , "Toggle Tabbed View" , QIcon( Hbp_Image( "view_tabbed" ) ), {|| ::execEvent( __buttonViewTabbed_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "view_organized" , "View as Arranged" , QIcon( dbu_Image( "view_organized" ) ), {|| ::execEvent( __buttonViewOrganized_clicked__ ) }, .f. } )
- qTBar:addItem( { "save3" , "Save Layout" , QIcon( dbu_Image( "save3" ) ), {|| ::execEvent( __buttonSaveLayout_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_organized" , "View as Arranged" , QIcon( Hbp_Image( "view_organized" ) ), {|| ::execEvent( __buttonViewOrganized_clicked__ ) }, .f. } )
+ qTBar:addItem( { "save3" , "Save Layout" , QIcon( Hbp_Image( "save3" ) ), {|| ::execEvent( __buttonSaveLayout_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "view_cascaded" , "View as Cascaded" , QIcon( dbu_Image( "view_cascaded" ) ), {|| ::execEvent( __buttonViewCascaded_clicked__ ) }, .f. } )
- qTBar:addItem( { "view_tiled" , "View as Tiled" , QIcon( dbu_Image( "view_tiled" ) ), {|| ::execEvent( __buttonViewTiled_clicked__ ) }, .f. } )
- qTBar:addItem( { "fullscreen" , "View Maximized" , QIcon( dbu_Image( "fullscreen" ) ), {|| ::execEvent( __buttonViewMaximized_clicked__ ) }, .f. } )
- qTBar:addItem( { "view_vertstacked" , "View Vertically Tiled" , QIcon( dbu_Image( "view_vertstacked" ) ), {|| ::execEvent( __buttonViewStackedVert_clicked__ ) }, .f. } )
- qTBar:addItem( { "view_horzstacked" , "View Horizontally Tiled" , QIcon( dbu_Image( "view_horzstacked" ) ), {|| ::execEvent( __buttonViewStackedHorz_clicked__ ) }, .f. } )
- qTBar:addItem( { "view_zoomin" , "View Zoom In" , QIcon( dbu_Image( "view_zoomin" ) ), {|| ::execEvent( __buttonViewZoomedIn_clicked__ ) }, .f. } )
- qTBar:addItem( { "view_zoomout" , "View Zoom Out" , QIcon( dbu_Image( "view_zoomout" ) ), {|| ::execEvent( __buttonViewZoomedOut_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_cascaded" , "View as Cascaded" , QIcon( Hbp_Image( "view_cascaded" ) ), {|| ::execEvent( __buttonViewCascaded_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_tiled" , "View as Tiled" , QIcon( Hbp_Image( "view_tiled" ) ), {|| ::execEvent( __buttonViewTiled_clicked__ ) }, .f. } )
+ qTBar:addItem( { "fullscreen" , "View Maximized" , QIcon( Hbp_Image( "fullscreen" ) ), {|| ::execEvent( __buttonViewMaximized_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_vertstacked" , "View Vertically Tiled" , QIcon( Hbp_Image( "view_vertstacked" ) ), {|| ::execEvent( __buttonViewStackedVert_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_horzstacked" , "View Horizontally Tiled" , QIcon( Hbp_Image( "view_horzstacked" ) ), {|| ::execEvent( __buttonViewStackedHorz_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_zoomin" , "View Zoom In" , QIcon( Hbp_Image( "view_zoomin" ) ), {|| ::execEvent( __buttonViewZoomedIn_clicked__ ) }, .f. } )
+ qTBar:addItem( { "view_zoomout" , "View Zoom Out" , QIcon( Hbp_Image( "view_zoomout" ) ), {|| ::execEvent( __buttonViewZoomedOut_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "database_add" , "Append Record" , QIcon( dbu_Image( "database_add" ) ), {|| ::execEvent( __buttonAppendRecord_clicked__ ) }, .f. } )
- qTBar:addItem( { "database_remove" , "Delete Record" , QIcon( dbu_Image( "database_remove" ) ), {|| ::execEvent( __buttonDelRecord_clicked__ ) }, .f. } )
- qTBar:addItem( { "database_lock" , "Lock/Unlock Record" , QIcon( dbu_Image( "database_lock" ) ), {|| ::execEvent( __buttonLockRecord_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_add" , "Append Record" , QIcon( Hbp_Image( "database_add" ) ), {|| ::execEvent( __buttonAppendRecord_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_remove" , "Delete Record" , QIcon( Hbp_Image( "database_remove" ) ), {|| ::execEvent( __buttonDelRecord_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_lock" , "Lock/Unlock Record" , QIcon( Hbp_Image( "database_lock" ) ), {|| ::execEvent( __buttonLockRecord_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "database_up" , "Goto Top" , QIcon( dbu_Image( "database_up" ) ), {|| ::execEvent( __buttonGoTop_clicked__ ) }, .f. } )
- qTBar:addItem( { "database_down" , "Goto Bottom" , QIcon( dbu_Image( "database_down" ) ), {|| ::execEvent( __buttonGoBottom_clicked__ ) }, .f. } )
- qTBar:addItem( { "database_previous", "Scroll to First Column" , QIcon( dbu_Image( "database_previous" ) ), {|| ::execEvent( __buttonScrollToFirst_clicked__ ) }, .f. } )
- qTBar:addItem( { "database_next" , "Scroll to Last Column" , QIcon( dbu_Image( "database_next" ) ), {|| ::execEvent( __buttonScrollToLast_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_up" , "Goto Top" , QIcon( Hbp_Image( "database_up" ) ), {|| ::execEvent( __buttonGoTop_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_down" , "Goto Bottom" , QIcon( Hbp_Image( "database_down" ) ), {|| ::execEvent( __buttonGoBottom_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_previous", "Scroll to First Column" , QIcon( Hbp_Image( "database_previous" ) ), {|| ::execEvent( __buttonScrollToFirst_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_next" , "Scroll to Last Column" , QIcon( Hbp_Image( "database_next" ) ), {|| ::execEvent( __buttonScrollToLast_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "database_search" , "Search in Table" , QIcon( dbu_Image( "database_search" ) ), {|| ::execEvent( __buttonSearchInTable_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_search" , "Search in Table" , QIcon( Hbp_Image( "database_search" ) ), {|| ::execEvent( __buttonSearchInTable_clicked__ ) }, .f. } )
qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
- qTBar:addItem( { "database_process" , "Zap Table" , QIcon( dbu_Image( "database_process" ) ), {|| ::execEvent( __buttonZaptable_clicked__ ) }, .f. } )
+ qTBar:addItem( { "database_process" , "Zap Table" , QIcon( Hbp_Image( "database_process" ) ), {|| ::execEvent( __buttonZaptable_clicked__ ) }, .f. } )
RETURN NIL
@@ -1087,7 +1087,7 @@ METHOD HbpDBU:buildPanelsButton()
::qPanelsButton := QToolButton()
::qPanelsButton:setTooltip( "HbpDBU Panels" )
- ::qPanelsButton:setIcon( QIcon( dbu_Image( "panel_8" ) ) )
+ ::qPanelsButton:setIcon( QIcon( Hbp_Image( "panel_8" ) ) )
::qPanelsButton:setPopupMode( QToolButton_MenuButtonPopup )
::qPanelsButton:setMenu( ::qPanelsMenu )
@@ -1135,7 +1135,7 @@ METHOD HbpDBU:buildTablesButton()
::qTablesButton := QToolButton()
::qTablesButton:setTooltip( "Tables" )
- ::qTablesButton:setIcon( QIcon( dbu_Image( "table" ) ) )
+ ::qTablesButton:setIcon( QIcon( Hbp_Image( "table" ) ) )
::qTablesButton:setPopupMode( QToolButton_MenuButtonPopup )
::qTablesButton:setMenu( ::qTablesMenu )
@@ -1153,7 +1153,7 @@ METHOD HbpDBU:buildIndexButton()
::qIndexButton := QToolButton()
::qIndexButton:setTooltip( "Indexes" )
- ::qIndexButton:setIcon( QIcon( dbu_Image( "sort" ) ) )
+ ::qIndexButton:setIcon( QIcon( Hbp_Image( "sort" ) ) )
::qIndexButton:setPopupMode( QToolButton_MenuButtonPopup )
::qIndexButton:setMenu( ::qIndexMenu )
@@ -1916,7 +1916,7 @@ METHOD HbpBrowse:buildMdiWindow()
::qMdi:setWindowTitle( ::cTable )
::qMdi:setObjectName( hb_ntos( nID ) )
- ::qMdi:setWindowIcon( QIcon( dbu_Image( "dbf_p" + hb_ntos( ::nID ) ) ) )
+ ::qMdi:setWindowIcon( QIcon( Hbp_Image( "dbf_p" + hb_ntos( ::nID ) ) ) )
IF ! empty( ::aInfo[ TBL_GEOMETRY ] )
qRect := hb_aTokens( ::aInfo[ TBL_GEOMETRY ], " " )
@@ -2896,8 +2896,3 @@ STATIC FUNCTION hbide_fldType2Desc( cType )
/*----------------------------------------------------------------------*/
-FUNCTION dbu_Image( cName )
-
- RETURN ":/xbp/resources" + "/" + cName + ".png"
-
-/*----------------------------------------------------------------------*/
diff --git a/harbour/contrib/hbide/xbpaddons/misc.prg b/harbour/contrib/hbide/xbpaddons/misc.prg
new file mode 100644
index 0000000000..0e13b1eb3c
--- /dev/null
+++ b/harbour/contrib/hbide/xbpaddons/misc.prg
@@ -0,0 +1,76 @@
+/*
+ * $Id$
+ */
+
+/*
+ * Harbour Project source code:
+ *
+ * Copyright 2012 Pritpal Bedi
+ * www - http://harbour-project.org
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
+ *
+ * As a special exception, the Harbour Project gives permission for
+ * additional uses of the text contained in its release of Harbour.
+ *
+ * The exception is that, if you link the Harbour libraries with other
+ * files to produce an executable, this does not by itself cause the
+ * resulting executable to be covered by the GNU General Public License.
+ * Your use of that executable is in no way restricted on account of
+ * linking the Harbour library code into it.
+ *
+ * This exception does not however invalidate any other reasons why
+ * the executable file might be covered by the GNU General Public License.
+ *
+ * This exception applies only to the code released by the Harbour
+ * Project under the name Harbour. If you copy code from other
+ * Harbour Project or Free Software Foundation releases into a copy of
+ * Harbour, as the General Public License permits, the exception does
+ * not apply to the code that you add in this way. To avoid misleading
+ * anyone as to the status of such modified files, you must delete
+ * this exception notice from them.
+ *
+ * If you write modifications of your own for Harbour, it is your choice
+ * whether to permit this exception to apply to your modifications.
+ * If you do not wish that, delete this exception notice.
+ *
+ */
+/*----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+/*
+ * EkOnkar
+ * ( The LORD is ONE )
+ *
+ * Harbour-Parts
+ *
+ * Pritpal Bedi
+ * 22Sep2012
+ */
+/*----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+/*----------------------------------------------------------------------*/
+
+#include "common.ch"
+#include "xbp.ch"
+
+/*----------------------------------------------------------------------*/
+
+FUNCTION Hbp_Image( cName )
+
+ RETURN ":/xbp/resources" + "/" + cName + ".png"
+
+/*----------------------------------------------------------------------*/
diff --git a/harbour/contrib/hbide/xbpaddons/reports.prg b/harbour/contrib/hbide/xbpaddons/reports.prg
index 06c98e8fca..8f611bc9f1 100644
--- a/harbour/contrib/hbide/xbpaddons/reports.prg
+++ b/harbour/contrib/hbide/xbpaddons/reports.prg
@@ -68,6 +68,9 @@
#include "hbclass.ch"
#include "hbqtgui.ch"
#include "hbtrace.ch"
+#include "xbp.ch"
+
+/*----------------------------------------------------------------------*/
#define UNIT 0.1
@@ -356,6 +359,15 @@ METHOD HbpReports:create( oParent, oOwner, aPos, aSize, aPresParams, lVisible )
::qTabBar:setCurrentIndex( 2 )
+
+ IF ::visible
+ ::show()
+ ENDIF
+ IF HB_ISOBJECT( oParent )
+ ::oParent:AddChild( SELF )
+ ::postCreate()
+ ENDIF
+
RETURN Self
/*----------------------------------------------------------------------*/
@@ -961,7 +973,7 @@ METHOD HbpReports:addObject( cType, qPos, qGeo )
SWITCH cType
CASE "Image"
- oHqrObject:setPixmap( QPixmap( app_image( "hbide" ) ) )
+ oHqrObject:setPixmap( QPixmap( Hbp_image( "harbour" ) ) )
oHqrObject:setBorderWidth( 2 )
EXIT
CASE "Chart"
@@ -1067,7 +1079,7 @@ METHOD HbpReports:updateObjectsTree( cType, cParent, cName, cSubType )
DO CASE
CASE cType == "ReportName"
qItem := QTreeWidgetItem() ; qItem:setText( 0, cName )
- qItem:setIcon( 0, QIcon( app_image( "r-report" ) ) )
+ qItem:setIcon( 0, QIcon( Hbp_Image( "r-report" ) ) )
::qTreeObjects:addTopLevelItem( qItem )
::hObjTree[ cName ] := qItem
qItem:setExpanded( .t. )
@@ -1085,7 +1097,7 @@ METHOD HbpReports:updateObjectsTree( cType, cParent, cName, cSubType )
::hObjTree[ cName ] := qItem
IF cType == "Page"
- qItem:setIcon( 0, QIcon( app_image( "r-page" ) ) )
+ qItem:setIcon( 0, QIcon( Hbp_Image( "r-page" ) ) )
ELSEIF cType == "Object"
qItem:setIcon( 0, QIcon( ::getImageOfType( cSubType ) ) )
ELSEIF cType == "Field"
@@ -1248,7 +1260,7 @@ METHOD HbpReports:getImageOfType( cType )
CASE cType == "Triangle" ; cImage := "rp_triangle"
ENDCASE
- RETURN app_image( cImage )
+ RETURN Hbp_Image( cImage )
/*----------------------------------------------------------------------*/
@@ -1265,25 +1277,28 @@ METHOD HbpReports:getNextID( cType )
METHOD HbpReports:buildToolbar()
LOCAL qTBar
- qTBar := HbqToolbar():new()
+ qTBar := XbpToolbar():new()
qTBar:orientation := Qt_Horizontal
- qTBar:create( "ReportManager_Top_Toolbar" )
+ qTBar:imageWidth := 16
+ qTBar:imageHeight := 16
+ qTBar:create()
+ qTBar:buttonClick := {|oButton| iif( HB_ISBLOCK( oButton:key ), Eval( oButton:key ), NIL ) }
- qTBar:addToolButton( "New" , "New Report" , app_image( "new" ), {|| ::execEvent( __buttonNew_clicked__ ) } )
- qTBar:addToolButton( "Open" , "Open Report" , app_image( "open3" ), {|| ::execEvent( __buttonOpen_clicked__ ) } )
- qTBar:addToolButton( "Save" , "Save Report" , app_image( "save3" ), {|| ::execEvent( __buttonSave_clicked__ ) } )
- qTBar:addToolButton( "Close" , "Close Report" , app_image( "close3" ), {|| ::execEvent( __buttonClose_clicked__ ) } )
- qTBar:addToolButton( "Print" , "Print Report" , app_image( "print" ), {|| ::execEvent( __buttonPrint_clicked__ ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "ToBack" , "Push to back" , app_image( "toback" ), {|| ::execEvent( __buttonToBack_clicked__ ) }, .f., .f. )
- qTBar:addToolButton( "ToFront" , "Bring to front" , app_image( "tofront" ), {|| ::execEvent( __buttonToFront_clicked__ ) }, .f., .f. )
- qTBar:addSeparator()
- qTBar:addToolButton( "RotateL" , "Rotate anti-clock wise", app_image( "unload_1" ), {|| ::execEvent( __buttonRotateL_clicked__ ) }, .f., .f. )
- qTBar:addToolButton( "RotateR" , "Rotate clock wise" , app_image( "load_1" ), {|| ::execEvent( __buttonRotateR_clicked__ ) }, .f., .f. )
- qTBar:addSeparator()
- qTBar:addToolButton( "Portrait" , "Portrait orientation" , app_image( "r-portrait" ), {|| ::execEvent( __buttonPortrait_clicked__ ) }, .f., .f. )
- qTBar:addToolButton( "Landscape", "Landscape orientation" , app_image( "r-landscape" ), {|| ::execEvent( __buttonLandscape_clicked__ ) }, .f., .f. )
- qTBar:addSeparator()
+ qTBar:addItem( { "New" , "New Report" , QIcon( Hbp_Image( "new" ) ), {|| ::execEvent( __buttonNew_clicked__ ) } } )
+ qTBar:addItem( { "Open" , "Open Report" , QIcon( Hbp_Image( "open3" ) ), {|| ::execEvent( __buttonOpen_clicked__ ) } } )
+ qTBar:addItem( { "Save" , "Save Report" , QIcon( Hbp_Image( "save3" ) ), {|| ::execEvent( __buttonSave_clicked__ ) } } )
+ qTBar:addItem( { "Close" , "Close Report" , QIcon( Hbp_Image( "close3" ) ), {|| ::execEvent( __buttonClose_clicked__ ) } } )
+ qTBar:addItem( { "Print" , "Print Report" , QIcon( Hbp_Image( "print" ) ), {|| ::execEvent( __buttonPrint_clicked__ ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "ToBack" , "Push to back" , QIcon( Hbp_Image( "toback" ) ), {|| ::execEvent( __buttonToBack_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( { "ToFront" , "Bring to front" , QIcon( Hbp_Image( "tofront" ) ), {|| ::execEvent( __buttonToFront_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "RotateL" , "Rotate anti-clock wise", QIcon( Hbp_Image( "unload_1" ) ), {|| ::execEvent( __buttonRotateL_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( { "RotateR" , "Rotate clock wise" , QIcon( Hbp_Image( "load_1" ) ), {|| ::execEvent( __buttonRotateR_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "Portrait" , "Portrait orientation" , QIcon( Hbp_Image( "r-portrait" ) ), {|| ::execEvent( __buttonPortrait_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( { "Landscape", "Landscape orientation" , QIcon( Hbp_Image( "r-landscape" ) ), {|| ::execEvent( __buttonLandscape_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
::qToolbar := qTBar
@@ -1294,42 +1309,45 @@ METHOD HbpReports:buildToolbar()
METHOD HbpReports:buildToolbarAlign()
LOCAL qTBar
- qTBar := HbqToolbar():new()
+ qTBar := XbpToolbar():new()
qTBar:orientation := Qt_Horizontal
- qTBar:create( "ReportManager_Top_Toolbar_Align" )
+ qTBar:imageWidth := 16
+ qTBar:imageHeight := 16
+ qTBar:create()
+ qTBar:buttonClick := {|oButton| iif( HB_ISBLOCK( oButton:key ), Eval( oButton:key ), NIL ) }
- qTBar:addToolButton( "FontG" , "Font" , app_image( "f-generic" ), {|| ::execEvent( __buttonFontG_clicked__ ) }, .f., .f. )
- qTBar:addSeparator()
- qTBar:addToolButton( "FontB" , "Text Bold" , app_image( "f-bold-1" ), {|| ::execEvent( __buttonFontB_clicked__ ) } )
- qTBar:addToolButton( "FontI" , "Text Italic" , app_image( "f-italic-1" ), {|| ::execEvent( __buttonFontI_clicked__ ) } )
- qTBar:addToolButton( "FontU" , "Text Underlined" , app_image( "f-underline-1" ), {|| ::execEvent( __buttonFontU_clicked__ ) } )
- qTBar:addToolButton( "FontS" , "Text Strikethrough", app_image( "f-strike-1" ), {|| ::execEvent( __buttonFontS_clicked__ ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "JustL" , "Align left" , app_image( "f_align_left" ), {|| ::execEvent( __buttonJustL_clicked__ ) } )
- qTBar:addToolButton( "JustC" , "Align center" , app_image( "f_align_center" ), {|| ::execEvent( __buttonJustC_clicked__ ) } )
- qTBar:addToolButton( "JustR" , "Align right" , app_image( "f_align_right" ), {|| ::execEvent( __buttonJustR_clicked__ ) } )
- qTBar:addToolButton( "JustJ" , "Align justify" , app_image( "f_align_justify" ), {|| ::execEvent( __buttonJustJ_clicked__ ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "JustT" , "Align top" , app_image( "f_align_top" ), {|| ::execEvent( __buttonJustT_clicked__ ) } )
- qTBar:addToolButton( "JustM" , "Align middle" , app_image( "f_align_middle" ), {|| ::execEvent( __buttonJustM_clicked__ ) } )
- qTBar:addToolButton( "JustB" , "Align bottom" , app_image( "f_align_bottom" ), {|| ::execEvent( __buttonJustB_clicked__ ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "BoxT" , "Box-frame top" , app_image( "f_box_top" ), {|| ::execEvent( __buttonBoxT_clicked__ ) }, .t., .f. )
- qTBar:addToolButton( "BoxL" , "Box-frame left" , app_image( "f_box_left" ), {|| ::execEvent( __buttonBoxL_clicked__ ) }, .t., .f. )
- qTBar:addToolButton( "BoxB" , "Box-frame bottom" , app_image( "f_box_bottom" ), {|| ::execEvent( __buttonBoxB_clicked__ ) }, .t., .f. )
- qTBar:addToolButton( "BoxR" , "Box-frame right" , app_image( "f_box_right" ), {|| ::execEvent( __buttonBoxR_clicked__ ) }, .t., .f. )
- qTBar:addSeparator()
- qTBar:addToolButton( "BoxA" , "Box-frame all" , app_image( "f_box_all" ), {|| ::execEvent( __buttonBoxA_clicked__ ) } )
- qTBar:addToolButton( "BoxP" , "No box-frame" , app_image( "f_box_plain" ), {|| ::execEvent( __buttonBoxP_clicked__ ) } )
- qTBar:addToolButton( "BoxS" , "Box shadowed" , app_image( "f_box_shadow" ), {|| ::execEvent( __buttonBoxS_clicked__ ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "ZoomIn" , "Zoom In" , app_image( "zoomin3" ), {|| ::execEvent( __buttonZoom_clicked__, 1 ) } )
- qTBar:addToolButton( "ZoomOut", "Zoom Out" , app_image( "zoomout3" ), {|| ::execEvent( __buttonZoom_clicked__, 2 ) } )
- qTBar:addToolButton( "ZoomWYS", "Zoom WYSIWYG" , app_image( "zoomin" ), {|| ::execEvent( __buttonZoom_clicked__, 3 ) } )
- qTBar:addToolButton( "ZoomOrg", "Zoom Original" , app_image( "zoomout" ), {|| ::execEvent( __buttonZoom_clicked__, 4 ) } )
- qTBar:addSeparator()
- qTBar:addToolButton( "Grid" , "Show Grid" , app_image( "grid" ), {|| ::execEvent( __buttonGrid_clicked__ ) }, .t., .f. )
- qTBar:addSeparator()
+ qTBar:addItem( { "FontG" , "Font" , QIcon( Hbp_Image( "f-generic" ) ), {|| ::execEvent( __buttonFontG_clicked__ ) }, .f., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "FontB" , "Text Bold" , QIcon( Hbp_Image( "f-bold-1" ) ), {|| ::execEvent( __buttonFontB_clicked__ ) } } )
+ qTBar:addItem( { "FontI" , "Text Italic" , QIcon( Hbp_Image( "f-italic-1" ) ), {|| ::execEvent( __buttonFontI_clicked__ ) } } )
+ qTBar:addItem( { "FontU" , "Text Underlined" , QIcon( Hbp_Image( "f-underline-1" ) ), {|| ::execEvent( __buttonFontU_clicked__ ) } } )
+ qTBar:addItem( { "FontS" , "Text Strikethrough", QIcon( Hbp_Image( "f-strike-1" ) ), {|| ::execEvent( __buttonFontS_clicked__ ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "JustL" , "Align left" , QIcon( Hbp_Image( "f_align_left" ) ), {|| ::execEvent( __buttonJustL_clicked__ ) } } )
+ qTBar:addItem( { "JustC" , "Align center" , QIcon( Hbp_Image( "f_align_center" ) ), {|| ::execEvent( __buttonJustC_clicked__ ) } } )
+ qTBar:addItem( { "JustR" , "Align right" , QIcon( Hbp_Image( "f_align_right" ) ), {|| ::execEvent( __buttonJustR_clicked__ ) } } )
+ qTBar:addItem( { "JustJ" , "Align justify" , QIcon( Hbp_Image( "f_align_justify" ) ), {|| ::execEvent( __buttonJustJ_clicked__ ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "JustT" , "Align top" , QIcon( Hbp_Image( "f_align_top" ) ), {|| ::execEvent( __buttonJustT_clicked__ ) } } )
+ qTBar:addItem( { "JustM" , "Align middle" , QIcon( Hbp_Image( "f_align_middle" ) ), {|| ::execEvent( __buttonJustM_clicked__ ) } } )
+ qTBar:addItem( { "JustB" , "Align bottom" , QIcon( Hbp_Image( "f_align_bottom" ) ), {|| ::execEvent( __buttonJustB_clicked__ ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "BoxT" , "Box-frame top" , QIcon( Hbp_Image( "f_box_top" ) ), {|| ::execEvent( __buttonBoxT_clicked__ ) }, .t., .F. } )
+ qTBar:addItem( { "BoxL" , "Box-frame left" , QIcon( Hbp_Image( "f_box_left" ) ), {|| ::execEvent( __buttonBoxL_clicked__ ) }, .t., .f. } )
+ qTBar:addItem( { "BoxB" , "Box-frame bottom" , QIcon( Hbp_Image( "f_box_bottom" ) ), {|| ::execEvent( __buttonBoxB_clicked__ ) }, .t., .f. } )
+ qTBar:addItem( { "BoxR" , "Box-frame right" , QIcon( Hbp_Image( "f_box_right" ) ), {|| ::execEvent( __buttonBoxR_clicked__ ) }, .t., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "BoxA" , "Box-frame all" , QIcon( Hbp_Image( "f_box_all" ) ), {|| ::execEvent( __buttonBoxA_clicked__ ) } } )
+ qTBar:addItem( { "BoxP" , "No box-frame" , QIcon( Hbp_Image( "f_box_plain" ) ), {|| ::execEvent( __buttonBoxP_clicked__ ) } } )
+ qTBar:addItem( { "BoxS" , "Box shadowed" , QIcon( Hbp_Image( "f_box_shadow" ) ), {|| ::execEvent( __buttonBoxS_clicked__ ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "ZoomIn" , "Zoom In" , QIcon( Hbp_Image( "zoomin3" ) ), {|| ::execEvent( __buttonZoom_clicked__, 1 ) } } )
+ qTBar:addItem( { "ZoomOut", "Zoom Out" , QIcon( Hbp_Image( "zoomout3" ) ), {|| ::execEvent( __buttonZoom_clicked__, 2 ) } } )
+ qTBar:addItem( { "ZoomWYS", "Zoom WYSIWYG" , QIcon( Hbp_Image( "zoomin" ) ), {|| ::execEvent( __buttonZoom_clicked__, 3 ) } } )
+ qTBar:addItem( { "ZoomOrg", "Zoom Original" , QIcon( Hbp_Image( "zoomout" ) ), {|| ::execEvent( __buttonZoom_clicked__, 4 ) } } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "Grid" , "Show Grid" , QIcon( Hbp_Image( "grid" ) ), {|| ::execEvent( __buttonGrid_clicked__ ) }, .t., .f. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
::qToolbarAlign := qTBar
@@ -1340,56 +1358,53 @@ METHOD HbpReports:buildToolbarAlign()
METHOD HbpReports:buildToolbarLeft()
LOCAL qTBar
- qTBar := HbqToolbar():new()
+ qTBar := XbpToolbar():new()
qTBar:orientation := Qt_Vertical
- qTBar:create( "ReportManager_Left_Toolbar" )
-
- qTBar:addToolButton( "Image" , "Image" , app_image( "f-image" ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. )
- qTBar:addToolButton( "Chart" , "Chart" , app_image( "f_chart" ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. )
- qTBar:addToolButton( "Gradient", "Gradient", app_image( "f_gradient" ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. )
- qTBar:addToolButton( "Barcode" , "Barcode" , app_image( "f_barcode" ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. )
- qTBar:addToolButton( "Text" , "Text" , app_image( "text" ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. )
- qTBar:addSeparator()
- qTBar:addToolButton( "Shapes" , "Shapes" , app_image( "rp_shapes" ), {|| ::execEvent( __buttonShapes_clicked__ ) }, .t., .f. )
+ qTBar:imageWidth := 16
+ qTBar:imageHeight := 16
+ qTBar:create()
+ qTBar:buttonClick := {|oButton| iif( HB_ISBLOCK( oButton:key ), Eval( oButton:key ), NIL ) }
::qToolbarL := qTBar
+ qTBar:addItem( { "Image" , "Image" , QIcon( Hbp_Image( "f-image" ) ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. } )
+ qTBar:addItem( { "Chart" , "Chart" , QIcon( Hbp_Image( "f_chart" ) ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. } )
+ qTBar:addItem( { "Gradient", "Gradient", QIcon( Hbp_Image( "f_gradient" ) ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. } )
+ qTBar:addItem( { "Barcode" , "Barcode" , QIcon( Hbp_Image( "f_barcode" ) ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. } )
+ qTBar:addItem( { "Text" , "Text" , QIcon( Hbp_Image( "text" ) ), {|| ::execEvent( __buttonNew_clicked__ ) }, .t., .t. } )
+ qTBar:addItem( , , , , , XBPTOOLBAR_BUTTON_SEPARATOR )
+ qTBar:addItem( { "Shapes" , "Shapes" , QIcon( Hbp_Image( "rp_shapes" ) ), {|| ::execEvent( __buttonShapes_clicked__ ) }, .t., .f. } )
+
RETURN Self
/*----------------------------------------------------------------------*/
METHOD HbpReports:execMenuShapes()
- LOCAL qPos, qBtn
IF empty( ::qShapesMenu )
::qShapesMenu := QMenu()
- ::aShapesAct[ SHP_ACT_RECTANGLE ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_rectangle" ) ), "Rectangle" )
- ::aShapesAct[ SHP_ACT_ROUNDRECT ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_roundrectangle") ), "Rounded Rectangle" )
- ::aShapesAct[ SHP_ACT_ELLIPSE ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_ellipse" ) ), "Ellipse" )
- ::aShapesAct[ SHP_ACT_LINEHORZ ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_linehorz" ) ), "Horizontal Line" )
- ::aShapesAct[ SHP_ACT_LINEVERT ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_linevert" ) ), "Vertical Line" )
- ::aShapesAct[ SHP_ACT_LINEDIAGRIGHT ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_linediagright" ) ), "Diagonal Line Right" )
- ::aShapesAct[ SHP_ACT_LINEDIAGLEFT ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_linediagleft" ) ), "Diagonal Line Left" )
- ::aShapesAct[ SHP_ACT_ARC ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_arc" ) ), "Arc" )
- ::aShapesAct[ SHP_ACT_CHORD ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_chord" ) ), "Chord" )
- ::aShapesAct[ SHP_ACT_DIAMOND ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_diamond" ) ), "Diamond" )
- ::aShapesAct[ SHP_ACT_TRIANGLE ] := ::qShapesMenu:addAction( QIcon( app_image( "rp_triangle" ) ), "Triangle" )
+ ::aShapesAct[ SHP_ACT_RECTANGLE ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_rectangle" ) ), "Rectangle" )
+ ::aShapesAct[ SHP_ACT_ROUNDRECT ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_roundrectangle") ), "Rounded Rectangle" )
+ ::aShapesAct[ SHP_ACT_ELLIPSE ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_ellipse" ) ), "Ellipse" )
+ ::aShapesAct[ SHP_ACT_LINEHORZ ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_linehorz" ) ), "Horizontal Line" )
+ ::aShapesAct[ SHP_ACT_LINEVERT ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_linevert" ) ), "Vertical Line" )
+ ::aShapesAct[ SHP_ACT_LINEDIAGRIGHT ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_linediagright" ) ), "Diagonal Line Right" )
+ ::aShapesAct[ SHP_ACT_LINEDIAGLEFT ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_linediagleft" ) ), "Diagonal Line Left" )
+ ::aShapesAct[ SHP_ACT_ARC ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_arc" ) ), "Arc" )
+ ::aShapesAct[ SHP_ACT_CHORD ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_chord" ) ), "Chord" )
+ ::aShapesAct[ SHP_ACT_DIAMOND ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_diamond" ) ), "Diamond" )
+ ::aShapesAct[ SHP_ACT_TRIANGLE ] := ::qShapesMenu:addAction( QIcon( Hbp_Image( "rp_triangle" ) ), "Triangle" )
::qShapesMenu:connect( QEvent_MouseButtonPress , {|p| ::execEvent( __QEvent_MousePressMenu__ , p ) } )
::qShapesMenu:connect( QEvent_MouseMove , {|p| ::execEvent( __QEvent_MouseMoveMenu__ , p ) } )
::qShapesMenu:connect( QEvent_MouseButtonRelease, {|p| ::execEvent( __QEvent_MouseReleaseMenu__, p ) } )
ENDIF
- qBtn := ::qToolbarL:getItem( "Shapes" )
- //
- qPos := ::qToolbarL:mapToGlobal( qBtn:pos() )
- qPos:setX( qPos:x() + qBtn:width() / 2 )
- qPos:setY( qPos:y() + qBtn:height() / 2 )
+ ::qShapesMenu:exec( QCursor():pos() )
- ::qShapesMenu:exec( qPos )
+ ::qToolbarL:setItemChecked( "Shapes", .f. )
- qBtn:setChecked( .f. )
RETURN Self
/*----------------------------------------------------------------------*/
diff --git a/harbour/contrib/hbide/xbpaddons/resources/close3.png b/harbour/contrib/hbide/xbpaddons/resources/close3.png
new file mode 100644
index 0000000000..9bc6af9c81
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/close3.png differ
diff --git a/harbour/contrib/hbide/resources/f-bold-1.png b/harbour/contrib/hbide/xbpaddons/resources/f-bold-1.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-bold-1.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-bold-1.png
diff --git a/harbour/contrib/hbide/resources/f-generic.png b/harbour/contrib/hbide/xbpaddons/resources/f-generic.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-generic.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-generic.png
diff --git a/harbour/contrib/hbide/resources/f-image.png b/harbour/contrib/hbide/xbpaddons/resources/f-image.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-image.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-image.png
diff --git a/harbour/contrib/hbide/resources/f-italic-1.png b/harbour/contrib/hbide/xbpaddons/resources/f-italic-1.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-italic-1.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-italic-1.png
diff --git a/harbour/contrib/hbide/resources/f-strike-1.png b/harbour/contrib/hbide/xbpaddons/resources/f-strike-1.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-strike-1.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-strike-1.png
diff --git a/harbour/contrib/hbide/resources/f-underline-1.png b/harbour/contrib/hbide/xbpaddons/resources/f-underline-1.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f-underline-1.png
rename to harbour/contrib/hbide/xbpaddons/resources/f-underline-1.png
diff --git a/harbour/contrib/hbide/resources/f_align_bottom.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_bottom.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_bottom.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_bottom.png
diff --git a/harbour/contrib/hbide/resources/f_align_center.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_center.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_center.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_center.png
diff --git a/harbour/contrib/hbide/resources/f_align_justify.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_justify.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_justify.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_justify.png
diff --git a/harbour/contrib/hbide/resources/f_align_left.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_left.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_left.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_left.png
diff --git a/harbour/contrib/hbide/resources/f_align_middle.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_middle.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_middle.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_middle.png
diff --git a/harbour/contrib/hbide/resources/f_align_right.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_right.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_right.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_right.png
diff --git a/harbour/contrib/hbide/resources/f_align_top.png b/harbour/contrib/hbide/xbpaddons/resources/f_align_top.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_align_top.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_align_top.png
diff --git a/harbour/contrib/hbide/resources/f_barcode.png b/harbour/contrib/hbide/xbpaddons/resources/f_barcode.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_barcode.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_barcode.png
diff --git a/harbour/contrib/hbide/resources/f_box_all.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_all.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_all.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_all.png
diff --git a/harbour/contrib/hbide/resources/f_box_bottom.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_bottom.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_bottom.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_bottom.png
diff --git a/harbour/contrib/hbide/resources/f_box_left.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_left.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_left.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_left.png
diff --git a/harbour/contrib/hbide/resources/f_box_matrix.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_matrix.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_matrix.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_matrix.png
diff --git a/harbour/contrib/hbide/resources/f_box_plain.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_plain.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_plain.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_plain.png
diff --git a/harbour/contrib/hbide/resources/f_box_right.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_right.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_right.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_right.png
diff --git a/harbour/contrib/hbide/resources/f_box_shadow.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_shadow.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_shadow.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_shadow.png
diff --git a/harbour/contrib/hbide/resources/f_box_top.png b/harbour/contrib/hbide/xbpaddons/resources/f_box_top.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_box_top.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_box_top.png
diff --git a/harbour/contrib/hbide/resources/f_chart.png b/harbour/contrib/hbide/xbpaddons/resources/f_chart.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_chart.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_chart.png
diff --git a/harbour/contrib/hbide/resources/f_gradient.png b/harbour/contrib/hbide/xbpaddons/resources/f_gradient.png
similarity index 100%
rename from harbour/contrib/hbide/resources/f_gradient.png
rename to harbour/contrib/hbide/xbpaddons/resources/f_gradient.png
diff --git a/harbour/contrib/hbide/xbpaddons/resources/grid.png b/harbour/contrib/hbide/xbpaddons/resources/grid.png
new file mode 100644
index 0000000000..b2bc62a746
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/grid.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/harbour.png b/harbour/contrib/hbide/xbpaddons/resources/harbour.png
new file mode 100644
index 0000000000..4beb7656f5
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/harbour.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/load_1.png b/harbour/contrib/hbide/xbpaddons/resources/load_1.png
new file mode 100644
index 0000000000..30699acc5f
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/load_1.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/new.png b/harbour/contrib/hbide/xbpaddons/resources/new.png
new file mode 100644
index 0000000000..27bd47cb48
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/new.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/print.png b/harbour/contrib/hbide/xbpaddons/resources/print.png
new file mode 100644
index 0000000000..1326f5cca5
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/print.png differ
diff --git a/harbour/contrib/hbide/resources/r-landscape.png b/harbour/contrib/hbide/xbpaddons/resources/r-landscape.png
similarity index 100%
rename from harbour/contrib/hbide/resources/r-landscape.png
rename to harbour/contrib/hbide/xbpaddons/resources/r-landscape.png
diff --git a/harbour/contrib/hbide/resources/r-page.png b/harbour/contrib/hbide/xbpaddons/resources/r-page.png
similarity index 100%
rename from harbour/contrib/hbide/resources/r-page.png
rename to harbour/contrib/hbide/xbpaddons/resources/r-page.png
diff --git a/harbour/contrib/hbide/resources/r-portrait.png b/harbour/contrib/hbide/xbpaddons/resources/r-portrait.png
similarity index 100%
rename from harbour/contrib/hbide/resources/r-portrait.png
rename to harbour/contrib/hbide/xbpaddons/resources/r-portrait.png
diff --git a/harbour/contrib/hbide/resources/r-report.png b/harbour/contrib/hbide/xbpaddons/resources/r-report.png
similarity index 100%
rename from harbour/contrib/hbide/resources/r-report.png
rename to harbour/contrib/hbide/xbpaddons/resources/r-report.png
diff --git a/harbour/contrib/hbide/resources/rp_arc.png b/harbour/contrib/hbide/xbpaddons/resources/rp_arc.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_arc.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_arc.png
diff --git a/harbour/contrib/hbide/resources/rp_chord.png b/harbour/contrib/hbide/xbpaddons/resources/rp_chord.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_chord.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_chord.png
diff --git a/harbour/contrib/hbide/resources/rp_diamond.png b/harbour/contrib/hbide/xbpaddons/resources/rp_diamond.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_diamond.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_diamond.png
diff --git a/harbour/contrib/hbide/resources/rp_ellipse.png b/harbour/contrib/hbide/xbpaddons/resources/rp_ellipse.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_ellipse.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_ellipse.png
diff --git a/harbour/contrib/hbide/resources/rp_linediagleft.png b/harbour/contrib/hbide/xbpaddons/resources/rp_linediagleft.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_linediagleft.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_linediagleft.png
diff --git a/harbour/contrib/hbide/resources/rp_linediagright.png b/harbour/contrib/hbide/xbpaddons/resources/rp_linediagright.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_linediagright.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_linediagright.png
diff --git a/harbour/contrib/hbide/resources/rp_linehorz.png b/harbour/contrib/hbide/xbpaddons/resources/rp_linehorz.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_linehorz.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_linehorz.png
diff --git a/harbour/contrib/hbide/resources/rp_linevert.png b/harbour/contrib/hbide/xbpaddons/resources/rp_linevert.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_linevert.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_linevert.png
diff --git a/harbour/contrib/hbide/resources/rp_rectangle.png b/harbour/contrib/hbide/xbpaddons/resources/rp_rectangle.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_rectangle.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_rectangle.png
diff --git a/harbour/contrib/hbide/resources/rp_roundrectangle.png b/harbour/contrib/hbide/xbpaddons/resources/rp_roundrectangle.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_roundrectangle.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_roundrectangle.png
diff --git a/harbour/contrib/hbide/resources/rp_shapes.png b/harbour/contrib/hbide/xbpaddons/resources/rp_shapes.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_shapes.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_shapes.png
diff --git a/harbour/contrib/hbide/resources/rp_triangle.png b/harbour/contrib/hbide/xbpaddons/resources/rp_triangle.png
similarity index 100%
rename from harbour/contrib/hbide/resources/rp_triangle.png
rename to harbour/contrib/hbide/xbpaddons/resources/rp_triangle.png
diff --git a/harbour/contrib/hbide/xbpaddons/resources/text.png b/harbour/contrib/hbide/xbpaddons/resources/text.png
new file mode 100644
index 0000000000..d2bf490804
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/text.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/toback.png b/harbour/contrib/hbide/xbpaddons/resources/toback.png
new file mode 100644
index 0000000000..1b9808ea55
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/toback.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/tofront.png b/harbour/contrib/hbide/xbpaddons/resources/tofront.png
new file mode 100644
index 0000000000..23559d4a1c
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/tofront.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/unload_1.png b/harbour/contrib/hbide/xbpaddons/resources/unload_1.png
new file mode 100644
index 0000000000..bf92c5d33e
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/unload_1.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/zoomin.png b/harbour/contrib/hbide/xbpaddons/resources/zoomin.png
new file mode 100644
index 0000000000..e30b47fe6f
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/zoomin.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/zoomin3.png b/harbour/contrib/hbide/xbpaddons/resources/zoomin3.png
new file mode 100644
index 0000000000..e8287d0504
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/zoomin3.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/zoomout.png b/harbour/contrib/hbide/xbpaddons/resources/zoomout.png
new file mode 100644
index 0000000000..f8cb48b9e5
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/zoomout.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/resources/zoomout3.png b/harbour/contrib/hbide/xbpaddons/resources/zoomout3.png
new file mode 100644
index 0000000000..34b7f1425c
Binary files /dev/null and b/harbour/contrib/hbide/xbpaddons/resources/zoomout3.png differ
diff --git a/harbour/contrib/hbide/xbpaddons/xbp.qrc b/harbour/contrib/hbide/xbpaddons/xbp.qrc
index 023aaa3796..ddadfa27da 100644
--- a/harbour/contrib/hbide/xbpaddons/xbp.qrc
+++ b/harbour/contrib/hbide/xbpaddons/xbp.qrc
@@ -20,8 +20,18 @@
resources/database_previous.png
resources/database_next.png
resources/database_search.png
+ resources/new.png
resources/open3.png
resources/save3.png
+ resources/close3.png
+ resources/print.png
+ resources/load_1.png
+ resources/unload_1.png
+ resources/zoomin3.png
+ resources/zoomout3.png
+ resources/zoomout.png
+ resources/zoomin.png
+ resources/grid.png
resources/fullscreen.png
resources/formview.png
resources/dbstruct.png
@@ -44,5 +54,48 @@
resources/dbf_p10.png
resources/form.png
resources/table.png
+ resources/f_align_left.png
+ resources/f_align_right.png
+ resources/f_align_center.png
+ resources/f_align_justify.png
+ resources/f_align_top.png
+ resources/f_align_middle.png
+ resources/f_align_bottom.png
+ resources/f_box_top.png
+ resources/f_box_left.png
+ resources/f_box_bottom.png
+ resources/f_box_right.png
+ resources/f_box_all.png
+ resources/f_box_plain.png
+ resources/f_box_shadow.png
+ resources/f-generic.png
+ resources/f-image.png
+ resources/f_chart.png
+ resources/f_gradient.png
+ resources/f_barcode.png
+ resources/f-bold-1.png
+ resources/f-italic-1.png
+ resources/f-underline-1.png
+ resources/f-strike-1.png
+ resources/toback.png
+ resources/tofront.png
+ resources/r-page.png
+ resources/r-report.png
+ resources/r-landscape.png
+ resources/r-portrait.png
+ resources/rp_arc.png
+ resources/rp_chord.png
+ resources/rp_diamond.png
+ resources/rp_triangle.png
+ resources/rp_rectangle.png
+ resources/rp_roundrectangle.png
+ resources/rp_linevert.png
+ resources/rp_linehorz.png
+ resources/rp_linediagright.png
+ resources/rp_linediagleft.png
+ resources/rp_ellipse.png
+ resources/rp_shapes.png
+ resources/harbour.png
+ resources/text.png
diff --git a/harbour/contrib/hbide/xbpaddons/xbpaddons.hbp b/harbour/contrib/hbide/xbpaddons/xbpaddons.hbp
index d478e041ee..0a0a5c79fe 100644
--- a/harbour/contrib/hbide/xbpaddons/xbpaddons.hbp
+++ b/harbour/contrib/hbide/xbpaddons/xbpaddons.hbp
@@ -13,6 +13,7 @@ hbxbp.hbc
dbu.prg
reports.prg
+misc.prg
xbp.qrc
diff --git a/harbour/contrib/hbxbp/toolbar.prg b/harbour/contrib/hbxbp/toolbar.prg
index d8f93ca5bd..cd629200de 100644
--- a/harbour/contrib/hbxbp/toolbar.prg
+++ b/harbour/contrib/hbxbp/toolbar.prg
@@ -240,7 +240,7 @@ METHOD XbpToolbar:sendToolbarMessage()
/*----------------------------------------------------------------------*/
METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nStyle, xKey )
- LOCAL oBtn
+ LOCAL oBtn, oButton
LOCAL isAction := HB_ISOBJECT( cCaption ) .AND. __ObjGetClsName( cCaption ) == "QACTION"
LOCAL isToolButton := HB_ISARRAY( cCaption )
LOCAL isObject := HB_ISOBJECT( cCaption )
@@ -277,17 +277,20 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
oBtn:oAction := cCaption
ELSEIF isToolButton
- oBtn:oAction := QAction( ::oWidget )
+ oButton := QToolButton()
+ oBtn:oAction := QWidgetAction( ::oWidget )
+ oBtn:oAction:setDefaultWidget( oButton )
+ oBtn:cargo := oButton
- oBtn:oAction:setObjectName( cCaption[ 1 ] )
- oBtn:oAction:setTooltip( cCaption[ 2 ] )
- oBtn:oAction:setIcon( cCaption[ 3 ] )
- oBtn:oAction:setCheckable( cCaption[ 5 ] )
+ oButton:setObjectName( cCaption[ 1 ] )
+ oButton:setTooltip( cCaption[ 2 ] )
+ oButton:setIcon( cCaption[ 3 ] )
+ oButton:setCheckable( cCaption[ 5 ] )
IF cCaption[ 6 ]
- oBtn:oAction:connect( QEvent_MouseButtonPress , {|p| ::execSlot( "QEvent_MousePress" , p, cCaption[ 1 ] ) } )
- oBtn:oAction:connect( QEvent_MouseButtonRelease, {|p| ::execSlot( "QEvent_MouseRelease", p, cCaption[ 1 ] ) } )
- oBtn:oAction:connect( QEvent_MouseMove , {|p| ::execSlot( "QEvent_MouseMove" , p, cCaption[ 1 ] ) } )
- oBtn:oAction:connect( QEvent_Enter , {|p| ::execSlot( "QEvent_MouseEnter" , p, cCaption[ 1 ] ) } )
+ oButton:connect( QEvent_MouseButtonPress , {|p| ::execSlot( "QEvent_MousePress" , p, oButton ) } )
+ oButton:connect( QEvent_MouseButtonRelease, {|p| ::execSlot( "QEvent_MouseRelease", p, oButton ) } )
+ oButton:connect( QEvent_MouseMove , {|p| ::execSlot( "QEvent_MouseMove" , p, oButton ) } )
+ oButton:connect( QEvent_Enter , {|p| ::execSlot( "QEvent_MouseEnter" , p, oButton ) } )
ENDIF
ELSEIF isObject
@@ -308,7 +311,11 @@ METHOD XbpToolbar:addItem( cCaption, xImage, xDisabledImage, xHotImage, cDLL, nS
ENDIF
/* Attach codeblock to be triggered */
- oBtn:oAction:connect( "triggered(bool)", {|| ::execSlot( "triggered(bool)", oBtn ) } )
+ IF ! isToolButton
+ oBtn:oAction:connect( "triggered(bool)", {|| ::execSlot( "triggered(bool)", oBtn ) } )
+ ELSE
+ oButton:connect( "clicked()", {|| ::execSlot( "triggered(bool)", oBtn ) } )
+ ENDIF
/* Attach Action with Toolbar */
::oWidget:addAction( oBtn:oAction )
@@ -338,13 +345,13 @@ METHOD XbpToolbar:execSlot( cSlot, p, p1 )
CASE "QEvent_MouseMove"
qRC := QRect( ::qPos:x() - 5, ::qPos:y() - 5, 10, 10 ):normalized()
IF qRC:contains( qEvent:pos() )
- ::qByte := QByteArray( ::hItems[ p1 ]:objectName() )
+ ::qByte := QByteArray( p1:objectName() )
::qMime := QMimeData()
::qMime:setData( "application/x-toolbaricon", ::qByte )
- ::qMime:setHtml( ::hItems[ p1 ]:objectName() )
+ ::qMime:setHtml( p1:objectName() )
- ::qPix := QIcon( ::hItems[ p1 ]:icon ):pixmap( 16,16 )
+ ::qPix := p1:icon():pixmap( 16,16 )
::qDrag := QDrag( SetAppWindow():oWidget )
::qDrag:setMimeData( ::qMime )
@@ -355,8 +362,8 @@ METHOD XbpToolbar:execSlot( cSlot, p, p1 )
::qDrag := NIL
::qPos := NIL
- ::hItems[ p1 ]:setChecked( .f. )
- ::hItems[ p1 ]:setWindowState( 0 )
+ p1:setChecked( .f. )
+ p1:setWindowState( 0 )
ENDIF
EXIT
@@ -458,6 +465,10 @@ METHOD XbpToolbar:getItem( nItem_cKey )
IF a_[ 2 ]:key == nItem_cKey
RETURN a_[ 2 ]
ENDIF
+ ELSEIF HB_ISBLOCK( a_[ 2 ]:key )
+ IF HB_ISOBJECT( a_[ 2 ]:cargo ) .AND. a_[ 2 ]:cargo:text() == nItem_cKey
+ RETURN a_[ 2 ]
+ ENDIF
ENDIF
NEXT