diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 3e0d3d1f10..739406414f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,34 @@ The license applies to all entries newer than 2009-04-28. */ +2010-08-24 18:55 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) + * contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp + + * contrib/hbide/resources/f-image.png + + contrib/hbide/resources/r-page.png + + contrib/hbide/resources/r-report.png + * contrib/hbide/hbide.qrc + + * contrib/hbide/idemisc.prg + * contrib/hbide/idereportsmanager.prg + + Implemented: ideReports Manager: + * "Objects" tree now showsup type of object icon. + + * Rotate selected object clock wise and anti-clock wise. + Currently it is 10 deg per click. Later an interface + to rotate precisely to be introduced. + + Rotated objects keep the exact aspect ratio. This is + testified on barcode which reads the correct string + after 90, 180, 270 and 360 deg rotation. + + * Atarted API to separate this component from direct calls + to hbIDE to gather various info from the application. + Right now these are the images which now call app_image() + instead of hbide_image(). app_image() function will + reside in application so that this class be linked with + application independently of hbIDE. + 2010-08-24 09:29 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/qtgui/doc/en/class_hbqgraphicsitem.txt * contrib/hbqt/qtgui/g/HBQGraphicsItem.cpp diff --git a/harbour/contrib/hbide/hbide.qrc b/harbour/contrib/hbide/hbide.qrc index fff5dd012a..2d73224a96 100644 --- a/harbour/contrib/hbide/hbide.qrc +++ b/harbour/contrib/hbide/hbide.qrc @@ -265,6 +265,8 @@ resources/f-strike-1.png resources/toback.png resources/tofront.png +resources/r-page.png +resources/r-report.png diff --git a/harbour/contrib/hbide/idemisc.prg b/harbour/contrib/hbide/idemisc.prg index fd4be24f07..49aaa1d0ec 100644 --- a/harbour/contrib/hbide/idemisc.prg +++ b/harbour/contrib/hbide/idemisc.prg @@ -2119,15 +2119,11 @@ FUNCTION hbide_buildToolbarButton( qToolbar, aBtn ) RETURN qBtn /*----------------------------------------------------------------------*/ +/* An interface component function which will be called by Reports Manager + whenever a request is made. Application will supply the required info + in this case it is hbIDE. */ -FUNCTION hbide_getNextID( cType ) - - STATIC hIDs := {=>} - - IF ! hb_hHasKey( hIDs, cType ) - hIDs[ cType ] := 0 - ENDIF - - RETURN ++hIDs[ cType ] +FUNCTION app_image( cName ) + RETURN hbide_image( cName ) /*----------------------------------------------------------------------*/ diff --git a/harbour/contrib/hbide/idereportsmanager.prg b/harbour/contrib/hbide/idereportsmanager.prg index b27c2dcb50..13602e4837 100644 --- a/harbour/contrib/hbide/idereportsmanager.prg +++ b/harbour/contrib/hbide/idereportsmanager.prg @@ -154,7 +154,9 @@ CLASS IdeReportsManager INHERIT IdeObject METHOD loadReport( cName ) METHOD saveReport() METHOD prepareReport() - METHOD updateObjectsTree( cType, cParent, cName ) + METHOD getNextID( cType ) + METHOD getImageOfType( cType ) + METHOD updateObjectsTree( cType, cParent, cName, cSubType ) ENDCLASS @@ -293,6 +295,8 @@ METHOD IdeReportsManager:buildDesignReport() ::qPageL01Lay:addWidget( ::qTreeObjects ) ::qTreeObjects:setHeaderHidden( .t. ) ::qTreeObjects:setObjectName( "ObjectsTree" ) + ::qTreeObjects:setIconSize( QSize():new( 12,12 ) ) + ::qTreeObjects:setIndentation( 12 ) ::connect( ::qTreeObjects, "itemClicked(QTWItem)", {|p,p1| ::execEvent( "treeObjects_clicked", p, p1 ) } ) ::qTabL1 := QTabWidget():new() @@ -354,38 +358,6 @@ METHOD IdeReportsManager:buildDesignReport() /*----------------------------------------------------------------------*/ -METHOD IdeReportsManager:updateObjectsTree( cType, cParent, cName ) - LOCAL qParent, qItem - - DO CASE - CASE cType == "ReportName" - qItem := QTreeWidgetItem():new() ; qItem:setText( 0, cName ) - ::qTreeObjects:addTopLevelItem( qItem ) - ::hObjTree[ cName ] := qItem - qItem:setExpanded( .t. ) - - CASE cType == "Page" .OR. cType == "Object" .OR. cType == "Field" - IF hb_hHasKey( ::hObjTree, cParent ) - qParent := ::hObjTree[ cParent ] - ENDIF - IF !empty( qParent ) - IF hb_hHasKey( ::hObjTree, cName ) - // - ENDIF - qItem := QTreeWidgetItem():new() ; qItem:setText( 0, cName ) - qParent:addChild( qItem ) - ::hObjTree[ cName ] := qItem - - qParent:setExpanded( .t. ) - ENDIF - - - ENDCASE - - RETURN Self - -/*----------------------------------------------------------------------*/ - METHOD IdeReportsManager:loadReport( cName ) LOCAL aSource, qItem, qItmC, aFld, a_, i, b_ @@ -484,8 +456,10 @@ METHOD IdeReportsManager:execEvent( cEvent, p, p1, p2 ) DO CASE CASE p == 21101 // Object selected IF hb_hHasKey( ::hObjTree, p1 ) - ::qCurGraphicsItem := ::hObjTree[ p1 ] - ::qTreeObjects:setCurrentItem( ::qCurGraphicsItem ) + ::qCurGraphicsItem := ::hItems[ p1 ] + ::qTreeObjects:setCurrentItem( ::hObjTree[ p1 ] ) + ELSE + ::qCurGraphicsItem := NIL ENDIF ENDCASE @@ -505,6 +479,16 @@ METHOD IdeReportsManager:execEvent( cEvent, p, p1, p2 ) ENDIF EXIT + CASE "buttonRotateL_clicked" + IF !empty( ::qCurGraphicsItem ) + ::qCurGraphicsItem:rotate( -10 ) + ENDIF + EXIT + CASE "buttonRotateR_clicked" + IF !empty( ::qCurGraphicsItem ) + ::qCurGraphicsItem:rotate( 10 ) + ENDIF + EXIT CASE "buttonToBack_clicked" EXIT CASE "buttonToFront_clicked" @@ -543,13 +527,13 @@ METHOD IdeReportsManager:execEvent( cEvent, p, p1, p2 ) METHOD IdeReportsManager:addObject( qPos, cType ) LOCAL oWidget, cName, nW, nH, qGrad, cCode, qStrList, i - cName := cType + "_" + hb_ntos( hbide_getNextID( cType ) ) + cName := cType + "_" + hb_ntos( ::getNextID( cType ) ) SWITCH cType CASE "Image" nW := 300 ; nH := 300 oWidget := HBQGraphicsItem():new( HBQT_GRAPHICSITEM_PICTURE ) - oWidget:setPixmap( QPixmap():new( hbide_image( "hbide" ) ) ) + oWidget:setPixmap( QPixmap():new( app_image( "hbide" ) ) ) oWidget:setBorderWidth( 2 ) EXIT CASE "Chart" @@ -570,7 +554,7 @@ METHOD IdeReportsManager:addObject( qPos, cType ) EXIT CASE "Barcode" nW := 300 ; nH := 200 - cCode := ::fetchBarString( "Harbour" ) + cCode := ::fetchBarString( "51550621" ) qStrList := QStringList():new() FOR i := 1 TO len( cCode ) IF substr( cCode, i, 1 ) == "1" @@ -602,7 +586,7 @@ METHOD IdeReportsManager:addObject( qPos, cType ) oWidget:setPos( qPos ) ENDIF ::hItems[ cName ] := oWidget - ::updateObjectsTree( "Object", "Page_1", cName ) + ::updateObjectsTree( "Object", "Page_1", cName, cType ) RETURN Self @@ -612,7 +596,7 @@ METHOD IdeReportsManager:addField( qPos, cAlias, cField ) LOCAL oWidget, nW := 300, nH := 50 LOCAL cName := cAlias + "..." + cField - cName := cName + "_" + hb_ntos( hbide_getNextID( cName ) ) + cName := cName + "_" + hb_ntos( ::getNextID( cName ) ) oWidget := HBQGraphicsItem():new( HBQT_GRAPHICSITEM_SIMPLETEXT ) oWidget:setText( cName ) @@ -629,7 +613,48 @@ METHOD IdeReportsManager:addField( qPos, cAlias, cField ) ENDIF ::hItems[ cName ] := oWidget - ::updateObjectsTree( "Field", "Page_1", cName ) + ::updateObjectsTree( "Field", "Page_1", cName, NIL ) + + RETURN Self + +/*----------------------------------------------------------------------*/ + +METHOD IdeReportsManager:updateObjectsTree( cType, cParent, cName, cSubType ) + LOCAL qParent, qItem + + DO CASE + CASE cType == "ReportName" + qItem := QTreeWidgetItem():new() ; qItem:setText( 0, cName ) + qItem:setIcon( 0, app_image( "r-report" ) ) + ::qTreeObjects:addTopLevelItem( qItem ) + ::hObjTree[ cName ] := qItem + qItem:setExpanded( .t. ) + + CASE cType == "Page" .OR. cType == "Object" .OR. cType == "Field" + IF hb_hHasKey( ::hObjTree, cParent ) + qParent := ::hObjTree[ cParent ] + ENDIF + IF !empty( qParent ) + IF hb_hHasKey( ::hObjTree, cName ) + // + ENDIF + qItem := QTreeWidgetItem():new() ; qItem:setText( 0, cName ) + qParent:addChild( qItem ) + ::hObjTree[ cName ] := qItem + + IF cType == "Page" + qItem:setIcon( 0, app_image( "r-page" ) ) + ELSEIF cType == "Object" + qItem:setIcon( 0, ::getImageOfType( cSubType ) ) + ELSEIF cType == "Field" + qItem:setIcon( 0, ::getImageOfType( "Field" ) ) + ENDIF + + qParent:setExpanded( .t. ) + ENDIF + + + ENDCASE RETURN Self @@ -674,14 +699,17 @@ METHOD IdeReportsManager:buildToolbar() ::qToolbar:orientation := Qt_Horizontal ::qToolbar:create( "ReportManager_Top_Toolbar" ) - ::qToolbar:addToolButton( "New" , "New Report" , hbide_image( "new" ), {|| ::execEvent( "buttonNew_clicked" ) } ) - ::qToolbar:addToolButton( "Open" , "Open Report" , hbide_image( "open3" ), {|| ::execEvent( "buttonOpen_clicked" ) } ) - ::qToolbar:addToolButton( "Save" , "Save Report" , hbide_image( "save3" ), {|| ::execEvent( "buttonSave_clicked" ) } ) - ::qToolbar:addToolButton( "Close", "Close Report", hbide_image( "close3" ), {|| ::execEvent( "buttonClose_clicked" ) } ) - ::qToolbar:addToolButton( "Print", "Print Report", hbide_image( "print" ), {|| ::execEvent( "buttonPrint_clicked" ) } ) + ::qToolbar:addToolButton( "New" , "New Report" , app_image( "new" ), {|| ::execEvent( "buttonNew_clicked" ) } ) + ::qToolbar:addToolButton( "Open" , "Open Report" , app_image( "open3" ), {|| ::execEvent( "buttonOpen_clicked" ) } ) + ::qToolbar:addToolButton( "Save" , "Save Report" , app_image( "save3" ), {|| ::execEvent( "buttonSave_clicked" ) } ) + ::qToolbar:addToolButton( "Close" , "Close Report" , app_image( "close3" ), {|| ::execEvent( "buttonClose_clicked" ) } ) + ::qToolbar:addToolButton( "Print" , "Print Report" , app_image( "print" ), {|| ::execEvent( "buttonPrint_clicked" ) } ) ::qToolbar:addSeparator() - ::qToolbar:addToolButton( "ToBack" , "Push to back" , hbide_image( "toback" ), {|| ::execEvent( "buttonToBack_clicked" ) }, .f., .f. ) - ::qToolbar:addToolButton( "ToFront", "Bring to front", hbide_image( "tofront"), {|| ::execEvent( "buttonToFront_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "ToBack" , "Push to back" , app_image( "toback" ), {|| ::execEvent( "buttonToBack_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "ToFront", "Bring to front", app_image( "tofront" ), {|| ::execEvent( "buttonToFront_clicked" ) }, .f., .f. ) + ::qToolbar:addSeparator() + ::qToolbar:addToolButton( "RotateL", "Rotate anti-clock wise", app_image( "unload_1" ), {|| ::execEvent( "buttonRotateL_clicked" ) }, .f., .f. ) + ::qToolbar:addToolButton( "RotateR", "Rotate clock wise" , app_image( "load_1" ), {|| ::execEvent( "buttonRotateR_clicked" ) }, .f., .f. ) ::qToolbar:addSeparator() RETURN Self @@ -694,37 +722,37 @@ METHOD IdeReportsManager:buildToolbarAlign() ::qToolbarAlign:orientation := Qt_Horizontal ::qToolbarAlign:create( "ReportManager_Top_Toolbar_Align" ) - ::qToolbarAlign:addToolButton( "FontG" , "Font" , hbide_image( "f-generic" ), {|| ::execEvent( "button_clicked" ) }, .f., .f. ) + ::qToolbarAlign:addToolButton( "FontG" , "Font" , app_image( "f-generic" ), {|| ::execEvent( "button_clicked" ) }, .f., .f. ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "FontB" , "Text Bold" , hbide_image( "f-bold-1" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "FontI" , "Text Italic" , hbide_image( "f-italic-1" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "FontU" , "Text Underlined" , hbide_image( "f-underline-1" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "FontS" , "Text Strikethrough", hbide_image( "f-strike-1" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "FontB" , "Text Bold" , app_image( "f-bold-1" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "FontI" , "Text Italic" , app_image( "f-italic-1" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "FontU" , "Text Underlined" , app_image( "f-underline-1" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "FontS" , "Text Strikethrough", app_image( "f-strike-1" ), {|| ::execEvent( "button_clicked" ) } ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "JustL" , "Align left" , hbide_image( "f_align_left" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "JustC" , "Align center" , hbide_image( "f_align_center" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "JustR" , "Align right" , hbide_image( "f_align_right" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "JustJ" , "Align justify" , hbide_image( "f_align_justify" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustL" , "Align left" , app_image( "f_align_left" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustC" , "Align center" , app_image( "f_align_center" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustR" , "Align right" , app_image( "f_align_right" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustJ" , "Align justify" , app_image( "f_align_justify" ), {|| ::execEvent( "button_clicked" ) } ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "JustT" , "Align top" , hbide_image( "f_align_top" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "JustM" , "Align middle" , hbide_image( "f_align_middle" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "JustB" , "Align bottom" , hbide_image( "f_align_bottom" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustT" , "Align top" , app_image( "f_align_top" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustM" , "Align middle" , app_image( "f_align_middle" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "JustB" , "Align bottom" , app_image( "f_align_bottom" ), {|| ::execEvent( "button_clicked" ) } ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "BoxT" , "Box-frame top" , hbide_image( "f_box_top" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) - ::qToolbarAlign:addToolButton( "BoxL" , "Box-frame left" , hbide_image( "f_box_left" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) - ::qToolbarAlign:addToolButton( "BoxB" , "Box-frame bottom" , hbide_image( "f_box_bottom" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) - ::qToolbarAlign:addToolButton( "BoxR" , "Box-frame right" , hbide_image( "f_box_right" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) + ::qToolbarAlign:addToolButton( "BoxT" , "Box-frame top" , app_image( "f_box_top" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) + ::qToolbarAlign:addToolButton( "BoxL" , "Box-frame left" , app_image( "f_box_left" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) + ::qToolbarAlign:addToolButton( "BoxB" , "Box-frame bottom" , app_image( "f_box_bottom" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) + ::qToolbarAlign:addToolButton( "BoxR" , "Box-frame right" , app_image( "f_box_right" ), {|| ::execEvent( "button_clicked" ) }, .t., .f. ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "BoxA" , "Box-frame all" , hbide_image( "f_box_all" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "BoxP" , "No box-frame" , hbide_image( "f_box_plain" ), {|| ::execEvent( "button_clicked" ) } ) - ::qToolbarAlign:addToolButton( "BoxS" , "Box shadowed" , hbide_image( "f_box_shadow" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "BoxA" , "Box-frame all" , app_image( "f_box_all" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "BoxP" , "No box-frame" , app_image( "f_box_plain" ), {|| ::execEvent( "button_clicked" ) } ) + ::qToolbarAlign:addToolButton( "BoxS" , "Box shadowed" , app_image( "f_box_shadow" ), {|| ::execEvent( "button_clicked" ) } ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "ZoomIn" , "Zoom In" , hbide_image( "zoomin3" ), {|| ::execEvent( "buttonZoom_clicked", 1 ) } ) - ::qToolbarAlign:addToolButton( "ZoomOut", "Zoom Out" , hbide_image( "zoomout3" ), {|| ::execEvent( "buttonZoom_clicked", 2 ) } ) - ::qToolbarAlign:addToolButton( "ZoomWYS", "Zoom WYSIWYG" , hbide_image( "zoomin" ), {|| ::execEvent( "buttonZoom_clicked", 3 ) } ) - ::qToolbarAlign:addToolButton( "ZoomOrg", "Zoom Original" , hbide_image( "zoomout" ), {|| ::execEvent( "buttonZoom_clicked", 4 ) } ) + ::qToolbarAlign:addToolButton( "ZoomIn" , "Zoom In" , app_image( "zoomin3" ), {|| ::execEvent( "buttonZoom_clicked", 1 ) } ) + ::qToolbarAlign:addToolButton( "ZoomOut", "Zoom Out" , app_image( "zoomout3" ), {|| ::execEvent( "buttonZoom_clicked", 2 ) } ) + ::qToolbarAlign:addToolButton( "ZoomWYS", "Zoom WYSIWYG" , app_image( "zoomin" ), {|| ::execEvent( "buttonZoom_clicked", 3 ) } ) + ::qToolbarAlign:addToolButton( "ZoomOrg", "Zoom Original" , app_image( "zoomout" ), {|| ::execEvent( "buttonZoom_clicked", 4 ) } ) ::qToolbarAlign:addSeparator() - ::qToolbarAlign:addToolButton( "Grid" , "Show Grid" , hbide_image( "grid" ), {|| ::execEvent( "buttonGrid_clicked", 4 ) }, .t., .f. ) + ::qToolbarAlign:addToolButton( "Grid" , "Show Grid" , app_image( "grid" ), {|| ::execEvent( "buttonGrid_clicked", 4 ) }, .t., .f. ) ::qToolbarAlign:addSeparator() ::qToolbarAlign:setItemChecked( "Grid", .t. ) @@ -739,11 +767,11 @@ METHOD IdeReportsManager:buildToolbarLeft() ::qToolbarL:orientation := Qt_Vertical ::qToolbarL:create( "ReportManager_Left_Toolbar" ) - ::qToolbarL:addToolButton( "Image" , "Image" , hbide_image( "f-image" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) - ::qToolbarL:addToolButton( "Chart" , "Chart" , hbide_image( "f_chart" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) - ::qToolbarL:addToolButton( "Gradient", "Gradient", hbide_image( "f_gradient" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) - ::qToolbarL:addToolButton( "Barcode" , "Barcode" , hbide_image( "f_barcode" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) - ::qToolbarL:addToolButton( "Text" , "Text" , hbide_image( "text" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) + ::qToolbarL:addToolButton( "Image" , "Image" , app_image( "f-image" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) + ::qToolbarL:addToolButton( "Chart" , "Chart" , app_image( "f_chart" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) + ::qToolbarL:addToolButton( "Gradient", "Gradient", app_image( "f_gradient" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) + ::qToolbarL:addToolButton( "Barcode" , "Barcode" , app_image( "f_barcode" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) + ::qToolbarL:addToolButton( "Text" , "Text" , app_image( "text" ), {|| ::execEvent( "buttonNew_clicked" ) }, .t., .t. ) RETURN Self @@ -774,6 +802,40 @@ METHOD IdeReportsManager:buildStatusBar() RETURN Self +/*----------------------------------------------------------------------*/ + +METHOD IdeReportsManager:getImageOfType( cType ) + LOCAL cImage + + DO CASE + CASE cType == "Image" + cImage := "f-image" + CASE cType == "Barcode" + cImage := "f_barcode" + CASE cType == "Chart" + cImage := "f_chart" + CASE cType == "Gradient" + cImage := "f_gradient" + CASE cType == "Text" + cImage := "text" + CASE cType == "Field" + cImage := "text" + ENDCASE + + RETURN app_image( cImage ) + +/*----------------------------------------------------------------------*/ + +METHOD IdeReportsManager:getNextID( cType ) + + STATIC hIDs := {=>} + + IF ! hb_hHasKey( hIDs, cType ) + hIDs[ cType ] := 0 + ENDIF + + RETURN ++hIDs[ cType ] + /*----------------------------------------------------------------------*/ /* */ /* NOTE: the code below is works of someone else I do not remmeber */ diff --git a/harbour/contrib/hbide/resources/f-image.png b/harbour/contrib/hbide/resources/f-image.png index bba8ccc5c0..bffa64daa9 100644 Binary files a/harbour/contrib/hbide/resources/f-image.png and b/harbour/contrib/hbide/resources/f-image.png differ diff --git a/harbour/contrib/hbide/resources/r-page.png b/harbour/contrib/hbide/resources/r-page.png new file mode 100644 index 0000000000..ed9b97a57a Binary files /dev/null and b/harbour/contrib/hbide/resources/r-page.png differ diff --git a/harbour/contrib/hbide/resources/r-report.png b/harbour/contrib/hbide/resources/r-report.png new file mode 100644 index 0000000000..e0909c7b39 Binary files /dev/null and b/harbour/contrib/hbide/resources/r-report.png differ diff --git a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp index 5025aaef9c..16b221febb 100644 --- a/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp +++ b/harbour/contrib/hbqt/qtgui/hbqt_hbqgraphicsitem.cpp @@ -110,7 +110,7 @@ HBQGraphicsItem::HBQGraphicsItem( int type, QGraphicsItem * parent ) : QGraphics m_barsIdentation = 1 / UNIT; m_showLabels = true; - m_toColorFactor = 2; + m_toColorFactor = 1.5; m_drawBorder = true; m_showGrid = true; @@ -1245,6 +1245,7 @@ void HBQGraphicsItem::drawBarcode39( QPainter * painter, const QStyleOptionGraph QRectF rect = adjustOption( painter, option ); QRectF rc = rect.adjusted( 5, 5, -10, -10 ); + QColor fl( Qt::white ); QColor clr( Qt::black ); int iBars = m_barValues.size(); qreal w = rc.width() / iBars; @@ -1255,6 +1256,10 @@ void HBQGraphicsItem::drawBarcode39( QPainter * painter, const QStyleOptionGraph { painter->fillRect( QRectF( rc.x() + x, rc.y(), w, rc.height() ), clr ); } + else + { + painter->fillRect( QRectF( rc.x() + x, rc.y(), w, rc.height() ), fl ); + } x += w; } }