14#include "GUIColorPropertyObserver.h"
22#include "GUICommonEnums.h"
89 const eC_Value& vWidth,
90 const eC_Value& vHeight,
91 eC_UInt iAxisColor, eC_UInt TextLabelColor, eC_UInt DrawLineColor, eC_UInt DrawPointColor, eC_UInt BarColor,
92 eC_Value AxisLineWidth, eC_Value DrawLineWidth, eC_Value vScaleLength, eC_Value vPointSize,
93 eC_UInt uiScalingXAxis, eC_UInt uiScalingYAxis,
94 eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY,
95 eC_Value vZoomFactorY, eC_UInt uiZoomFactorX,
117 const eC_Value& vWidth,
118 const eC_Value& vHeight,
143 const eC_Value& vWidth,
144 const eC_Value& vHeight,
145 eC_Int iScalingXAxis, eC_Int iScalingYAxis,
146 eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY,
154 virtual eC_Bool
DoDragEnd(
const eC_Value& vAbsX,
const eC_Value& vAbsY);
156 virtual eC_Bool
DoDrag(
const eC_Value& vDeltaX,
const eC_Value& vDeltaY,
const eC_Value& vAbsX,
const eC_Value& vAbsY);
158 virtual eC_Bool
DoButtonDown(
const eC_Value& vAbsX,
const eC_Value& vAbsY);
160 virtual eC_Bool
DoClick(
const eC_Value& vAbsX,
const eC_Value& vAbsY);
168#ifndef GUILIANI_NO_DATAPOOL
184 void AddData(eC_Value vDataValue, eC_UInt uiDimension = 0);
404 void SetBarColor(
const eC_UInt& uiIndex,
const eC_UInt& uiBarColor);
564 void SetRangeX(
const eC_Int& iMinNumber,
const eC_Int& iMaxNumber);
570 void GetRangeX(eC_Int& iMinNumber, eC_Int& iMaxNumber)
const;
576 void SetRangeY(
const eC_Value& vMinValue,
const eC_Value& vMaxValue);
582 void GetRangeY(eC_Value& vMinValue, eC_Value& vMaxValue)
const;
617 void Init(eC_UInt iAxisColor, eC_UInt TextLabelColor, eC_UInt DrawLineColor, eC_UInt DrawPointColor, eC_UInt BarColor,
618 eC_Value AxisLineWidth, eC_Value DrawLineWidth, eC_Value vScaleLength, eC_Value vPointSize,
619 eC_UInt uiScalingXAxis, eC_UInt uiScalingYAxis,
620 eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY,
621 eC_Value vZoomFactorY, eC_UInt uiZoomFactorX);
633 void AddDrawLineColor(
const eC_UInt& uiDrawLineColor);
642 void AddDrawPointColor(
const eC_UInt& uiDrawPointColor);
651 void AddBarColor(
const eC_UInt& uiBarColor);
656 void DrawAllCharts();
662 void DrawLineChart(
const eC_UInt& uiChartIndex);
668 void DrawStackedLineChart(
const eC_UInt& uiChartIndex);
674 void DrawPointChart(
const eC_UInt& uiChartIndex);
680 void DrawStackedPointChart(
const eC_UInt& uiChartIndex);
686 void DrawBarChart(
const eC_UInt& uiChartIndex);
692 void DrawStackedBarChart(
const eC_UInt& uiChartIndex);
701 eC_UInt GetChartColor(
const eC_UInt& uiChartIndex,
const eC_TArray<eC_UInt>& kColors);
708 void Zoom(
const eC_Value& vZoomFactorX,
const eC_Value& vZoomFactorY);
720 eC_Value CalculateYLabelStepSizeInData();
726 eC_Value CalculateYLabelStepSizeInPixel();
738 eC_Value TranslateRelXPosToDataPos(
const eC_Value& vXPos);
745 eC_Value TranslateRelYPosToDataPos(
const eC_Value& vYPos);
752 eC_Value TranslateDataPosToAbsXPos(
const eC_Value& vXPos);
759 eC_Value TranslateDataPosToAbsYPos(
const eC_Value& vYPos);
771 const eC_Value& vXPos,
772 const eC_Value& vYPos,
773 const eC_String& kLabel,
774 const eC_UInt& uiPreviousColor);
785 const eC_Value& vXPos,
786 const eC_Value& vYPos,
787 const eC_String& kLabel,
788 const eC_UInt& uiPreviousColor);
793 void DrawSelectionLabel();
801 void FormatString(eC_String &vStringToFormat);
806 void RecalculateChartArea();
811 void RecalculateChartOffsets();
821 eC_Bool DetectDataEntry(
822 const eC_Value& vXAbsPos,
823 const eC_Value& vYAbsPos,
824 eC_UInt& uiChartIndex,
825 eC_UInt& uiValueIndex);
835 const eC_UInt& uiChartIndex,
836 const eC_UInt& uiValueIndex,
837 const eC_Value& vPointSize,
847 void GetStackedPointRect(
848 const eC_UInt& uiChartIndex,
849 const eC_UInt& uiValueIndex,
850 const eC_Value& vPointSize,
860 const eC_UInt& uiChartIndex,
861 const eC_UInt& uiValueIndex,
870 void GetStackedLineRect(
871 const eC_UInt& uiChartIndex,
872 const eC_UInt& uiValueIndex,
882 const eC_UInt& uiChartIndex,
883 const eC_UInt& uiValueIndex,
892 void GetStackedBarRect(
893 const eC_UInt& uiChartIndex,
894 const eC_UInt& uiValueIndex,
900 void CalculateOffsets();
902 eC_UInt GetStartValue();
904 eC_UInt GetEndValue(
const eC_UInt& uiMaxValue);
906 void UpdateFocussedData();
909#ifdef GUILIANI_STREAM_GUI
918#ifdef GUILIANI_WRITE_GUI
923#ifndef GUILIANI_STREAM_GUI
933 void UpdateDataArea();
937 static const eC_UInt INDEX_AXISCOLOR;
938 static const eC_UInt INDEX_TEXTCOLOR;
939 static const eC_UInt INDEX_SELECTIONCOLOR;
940 static const eC_UInt INDEX_HELPERHORCOLOR;
941 static const eC_UInt INDEX_HELPERVERCOLOR;
942 static const eC_UInt INDEX_POINTCOLOR;
943 static const eC_UInt INDEX_LINECOLOR;
944 static const eC_UInt INDEX_BARCOLOR;
946 eC_UInt m_uiNumberPointColors;
947 eC_UInt m_uiNumberLineColors;
948 eC_UInt m_uiNumberBarColors;
957 eC_Bool m_bRestrictNavigation;
966 eC_Bool m_bIsDataAreaDirty;
972 eC_TArray<eC_TArray<Data_t> > m_kAllData;
980 eC_Bool m_bDraggingMode;
986 eC_Bool m_bEnableSelection;
989 eC_UInt m_uiScalingXAxis;
990 eC_UInt m_uiScalingYAxis;
992 eC_Int m_iPointsOfData;
995 eC_Int m_iPointsAvailible;
998 eC_Value m_vZoomFactorX;
999 eC_Value m_vZoomFactorY;
1004 eC_Int m_iStartingNumber;
1007 eC_Value m_vAxisLineWidth;
1010 eC_Value m_vDrawLineWidth;
1013 eC_Value m_vScaleLineLength;
1016 eC_Value m_vBorderSize;
1019 eC_Value m_vChartOffsetX;
1022 eC_Value m_vChartOffsetY;
1025 eC_Value m_vPointSize;
1028 eC_Value m_vPointSelectionTolerance;
1031 eC_Value m_vBarWidth;
1034 eC_Value m_vXUnitWidthInPx;
1037 eC_UInt m_uiSelectedChartIndex;
1040 eC_UInt m_uiSelectedDataIndex;
1043 eC_Bool m_bShowSelection;
1046 eC_Value m_vMinYStepSize;
Helper Macros in Guiliani
FontResource_t
List of font resource ids.
Definition: GUIFontResource.h:54
Helper Macros in Guiliani
ImageResource_t
Enumeration of image resource ids.
Definition: GUIImageResource.h:126
ObjectHandle_t
List of object resource ids.
Definition: GUIObjectHandleResource.h:55
Helper Macros in Guiliani
GlobalProperty_t
List of property resource ids.
Definition: GUIPropertyResource.h:67
A single entry in the DataPool. The DataPoolEntry class represents a single entry (unique id + a valu...
Definition: GUIDataPool.h:108
This control can be used to visualize multiple data-sources in line- or bar-charts.
Definition: GUIChart.h:28
virtual void SetWidth(const eC_Value &vX)
void SetFont(const FontResource_t &eFontId)
eC_UInt GetVerticalHelperLineColor() const
CGUIChart(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, eC_UInt iAxisColor, eC_UInt TextLabelColor, eC_UInt DrawLineColor, eC_UInt DrawPointColor, eC_UInt BarColor, eC_Value AxisLineWidth, eC_Value DrawLineWidth, eC_Value vScaleLength, eC_Value vPointSize, eC_UInt uiScalingXAxis, eC_UInt uiScalingYAxis, eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY, eC_Value vZoomFactorY, eC_UInt uiZoomFactorX, const ObjectHandle_t &eID=NO_HANDLE)
void SetZoomFactorX(const eC_Value &vZoomFactorX)
eC_Value GetDrawLineWidth() const
eC_Int GetStartLabelValue() const
void SetZoomFactorY(const eC_Value &vZoomFactorY)
void SetTextLabelColor(const eC_UInt &uiTextLabelColor)
virtual eC_Bool DoDrag(const eC_Value &vDeltaX, const eC_Value &vDeltaY, const eC_Value &vAbsX, const eC_Value &vAbsY)
void SetAxisColor(const eC_UInt &uiAxisColor)
void SetScalingXAxis(const eC_UInt &uiScalingXAxis)
void SetAxisColor(const GlobalProperty_t &eAxisColor)
virtual eC_Bool IsHighlightable() const
Definition: GUIChart.h:166
eC_UInt GetSelectionColor() const
void SetRepresentationYAxis(const AxisRepresentation_t &eYAxis)
eC_UInt GetAxisColor() const
DataRepresentation_t
enum how to disply values
Definition: GUIChart.h:32
@ RING
ring-chart (stacked datasets)
Definition: GUIChart.h:38
@ LINES
points and lines
Definition: GUIChart.h:35
@ PIE
pie-chart (only one dataset)
Definition: GUIChart.h:37
@ BARS
Bars Raising out of x-axis.
Definition: GUIChart.h:36
@ POINTS
only points
Definition: GUIChart.h:33
@ STACKED_BARS
stacked bars on top of each other
Definition: GUIChart.h:40
@ STACKED_LINES
stacked lines on top of each other
Definition: GUIChart.h:39
void SetHorizontalHelperLineColor(const eC_UInt &uiColor)
void SetTextLabelColor(const GlobalProperty_t &eTextLabelColor)
void SetImages(const ImageResource_t &eImageBG)
void SetRepresentationXAxis(const AxisRepresentation_t &eXAxis)
void SetHorizontalHelperLineColor(const GlobalProperty_t &eColor)
virtual eC_Bool DoClick(const eC_Value &vAbsX, const eC_Value &vAbsY)
void SetVerticalHelperLineColor(const eC_UInt &uiColor)
void SetAxisLineWidth(const eC_Value &vAxisLineWidth)
void SetLineColor(const eC_UInt &uiIndex, const GlobalProperty_t &eLineColor)
void SetMinValueY(const eC_Value &vMinNumber)
virtual eC_Bool DoDragEnd(const eC_Value &vAbsX, const eC_Value &vAbsY)
void KeepLastXElemenets(const eC_UInt &uiDataAmountToKepp)
void SetScaleLength(const eC_Value &vScaleLength)
void SetRangeY(const eC_Value &vMinValue, const eC_Value &vMaxValue)
void SetSelectionColor(const GlobalProperty_t &eSelectionColor)
AxisRepresentation_t GetRepresentationYAxis() const
CGUIChart(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, eC_Int iScalingXAxis, eC_Int iScalingYAxis, eC_Value vMaxShownNumberY, eC_Value vMinShownNumberY, const ObjectHandle_t &eID=NO_HANDLE)
virtual eC_Bool SetValue(CDataPoolEntry &rkValue)
virtual void ReadFromStream()
eC_Bool GetShowBarData() const
void SetSelectionColor(const eC_UInt &uiSelectionColor)
CGUIChart(CGUICompositeObject *const pkParent, const eC_Value &vX, const eC_Value &vY, const eC_Value &vWidth, const eC_Value &vHeight, const ObjectHandle_t &eID=NO_HANDLE)
AxisRepresentation_t GetRepresentationXAxis() const
virtual void SetHeight(const eC_Value &vY)
void GetRangeX(eC_Int &iMinNumber, eC_Int &iMaxNumber) const
void GetRangeY(eC_Value &vMinValue, eC_Value &vMaxValue) const
void SetBarColor(const eC_UInt &uiIndex, const eC_UInt &uiBarColor)
void SetRangeX(const eC_Int &iMinNumber, const eC_Int &iMaxNumber)
void SetScalingYAxis(const eC_UInt &uiScalingYAxis)
eC_Value GetAxisLineWidth() const
CGUICommonEnums::AxisAlignment_t GetHelperLineRepresentation() const
void SetPointColor(const eC_UInt &uiIndex, const GlobalProperty_t &ePointColor)
void SetShowBarData(const eC_Bool &bShowBarData)
void SetDataRepresentation(const DataRepresentation_t &eDataRepresentation)
eC_UInt GetPointColor(const eC_UInt &uiIndex) const
void SetBarColor(const eC_UInt &uiIndex, const GlobalProperty_t &eBarColor)
eC_UInt GetHorizontalHelperLineColor() const
CGUIRect GetFocusArea() const
eC_Value GetPointSize() const
void JumpToDataPoint(const eC_Int &iMinShownData)
eC_UInt GetScalingYAxis() const
void SetPointColor(const eC_UInt &uiIndex, const eC_UInt &uiPointColor)
void SetStartLabelValue(const eC_Int &iStartValue)
eC_UInt GetLineColor(const eC_UInt &uiIndex) const
eC_Value GetZoomFactorX() const
DataRepresentation_t GetDataRepresentation() const
virtual void WriteToStream(const eC_Bool bWriteClassID=false)
void SetVerticalHelperLineColor(const GlobalProperty_t &eColor)
AxisRepresentation_t
enum how the axis are displayed
Definition: GUIChart.h:45
@ LINE_AND_SCALING
Dots of data connected with 1 line.
Definition: GUIChart.h:48
@ LINE_SCALING_AND_TEXT
Bars Raising out of x-axis.
Definition: GUIChart.h:49
@ NONE
do not show axis
Definition: GUIChart.h:46
@ LINE
show only line of axis
Definition: GUIChart.h:47
eC_Value GetScaleLength() const
virtual eC_Bool DoButtonDown(const eC_Value &vAbsX, const eC_Value &vAbsY)
void SetLineColor(const eC_UInt &uiIndex, const eC_UInt &uiLineColor)
eC_UInt GetTextLabelColor() const
void SetDrawLineWidth(const eC_Value &vDrawLineWidth)
eC_UInt GetScalingXAxis() const
void SetMaxValueY(const eC_Value &vMaxNumber)
void SetHelperLineRepresentation(const CGUICommonEnums::AxisAlignment_t &eRepresentation)
void SetPointSize(const eC_Value &vPointSize)
eC_UInt GetBarColor(const eC_UInt &uiIndex) const
eC_Value GetZoomFactorY() const
void AddData(eC_Value vDataValue, eC_UInt uiDimension=0)
This observer provides the base-interface for controls when using color-properties.
Definition: GUIColorPropertyObserver.h:23
AxisAlignment_t
Axis-alignment for freedom of control.
Definition: GUICommonEnums.h:23
This is the Guiliani base class for all composite objects.
Definition: GUICompositeObject.h:70
This is the Guiliani base class all controls are derived from.
Definition: GUIObject.h:79
Helper class to supply a platform independent rectangle implementation.
Definition: GUIRect.h:63
Definition: GUIChart.h:55
eC_Value vOffset
offset values for stacked charts
Definition: GUIChart.h:57
eC_Value vData
data-value
Definition: GUIChart.h:56
eC_Int iNumberForLabel
current index
Definition: GUIChart.h:58