KD Chart 2
[rev.2.7]
|
Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox. More...
#include <KDChartEnums.h>
Static Public Member Functions | |
static QString | granularitySequenceToString (GranularitySequence sequence) |
Converts the specified granularity sequence enum to a string representation. More... | |
static QString | layoutPolicyToString (TextLayoutPolicy type) |
Converts the specified text layout policy enum to a string representation. More... | |
static QString | measureCalculationModeToString (MeasureCalculationMode mode) |
Converts the specified measure calculation mode enum to a string representation. More... | |
static QString | measureOrientationToString (MeasureOrientation mode) |
Converts the specified measure orientation enum to a string representation. More... | |
static GranularitySequence | stringToGranularitySequence (const QString &string) |
Converts the specified string to a granularity sequence enum value. More... | |
static TextLayoutPolicy | stringToLayoutPolicy (const QString &string) |
Converts the specified string to a text layout policy enum value. More... | |
static MeasureCalculationMode | stringToMeasureCalculationMode (const QString &string) |
Converts the specified string to a measure calculation mode enum value. More... | |
static MeasureOrientation | stringToMeasureOrientation (const QString &string) |
Converts the specified string to a measure orientation enum value. More... | |
Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox.
Definition at line 40 of file KDChartEnums.h.
GranularitySequence specifies the values, that may be applied, to determine a step width within a given data range.
Value occurring in the GranularitySequence names only are showing their respective relation ship. For real data they will most times not be used directly, but be multiplied by positive (or negative, resp.) powers of ten.
A granularity sequence is a sequence of values from the following set: 1, 1.25, 2, 2.5, 5.
The reason for using one of the following three pre-defined granularity sequences (instead of just using the best matching step width) is to follow a simple rule: If scaling becomes finer (== smaller step width) no value, that has been on a grid line before, shall loose its line and be NOT on a grid line anymore!
This means: Smaller step width may not remove any grid lines, but it may add additional lines in between.
GranularitySequence_10_20
Step widths can be 1, or 2, but they never can be 2.5 nor 5, nor 1.25. GranularitySequence_10_50
Step widths can be 1, or 5, but they never can be 2, nor 2.5, nor 1.25. GranularitySequence_25_50
Step widths can be 2.5, or 5, but they never can be 1, nor 2, nor 1.25. GranularitySequence_125_25
Step widths can be 1.25 or 2.5 but they never can be 1, nor 2, nor 5. GranularitySequenceIrregular
Step widths can be all of these values: 1, or 1.25, or 2, or 2.5, or 5.Since you probably like having the value 1 as an allowed step width, the granularity sequence decision boils down to a boolean question:
Enumerator | |
---|---|
GranularitySequence_10_20 | |
GranularitySequence_10_50 | |
GranularitySequence_25_50 | |
GranularitySequence_125_25 | |
GranularitySequenceIrregular |
Definition at line 95 of file KDChartEnums.h.
Measure calculation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart's internal geometry calculation time.
KDChart::Measure values either are relative (calculated in relation to a given AbstractArea), or they are absolute (used as fixed values).
Values stored in relative measure always are interpreted as per-mille of a reference area's height (or width, resp.) depending on the orientation set for the KDChart::Measure.
MeasureCalculationModeAbsolute
Value set by setValue() is absolute, to be used unchanged. MeasureCalculationModeRelative
Value is relative, the reference area is specified by setReferenceArea(), and orientation specified by setOrientation(). MeasureCalculationModeAuto
Value is relative, KD Chart will automatically determine which reference area to use, and it will determine the orientation too. MeasureCalculationModeAutoArea
Value is relative, Orientation is specified by setOrientation(), and KD Chart will automatically determine which reference area to use. MeasureCalculationModeAutoOrientation
Value is relative, Area is specified by setReferenceArea(), and KD Chart will automatically determine which orientation to use.Enumerator | |
---|---|
MeasureCalculationModeAbsolute | |
MeasureCalculationModeRelative | |
MeasureCalculationModeAuto | |
MeasureCalculationModeAutoArea | |
MeasureCalculationModeAutoOrientation |
Definition at line 222 of file KDChartEnums.h.
Measure orientation mode: the way how the absolute value of a KDChart::Measure is determined during KD Chart's internal geometry calculation time.
KDChart::Measure values either are relative (calculated in relation to a given AbstractArea), or they are absolute (used as fixed values).
Values stored in relative measure take into account the width (and/or the height, resp.) of a so-called reference area, that is either specified by KDChart::Measure::setReferenceArea, or determined by KD Chart automatically, respectively.
MeasureOrientationAuto
Value is calculated, based upon the width (or on the height, resp.) of the reference area: KD Chart will automatically determie an appropriate way. MeasureOrientationHorizontal
Value is calculated, based upon the width of the reference area. MeasureOrientationVertical
Value is calculated, based upon the height of the reference area. MeasureOrientationMinimum
Value is calculated, based upon the width (or on the height, resp.) of the reference area - which ever is smaller. MeasureOrientationMaximum
Value is calculated, based upon the width (or on the height, resp.) of the reference area - which ever is smaller.Enumerator | |
---|---|
MeasureOrientationAuto | |
MeasureOrientationHorizontal | |
MeasureOrientationVertical | |
MeasureOrientationMinimum | |
MeasureOrientationMaximum |
Definition at line 290 of file KDChartEnums.h.
Numerical values of the static KDChart::Position instances, for using a Position::value() with a switch () statement.
Enumerator | |
---|---|
PositionUnknown | |
PositionCenter | |
PositionNorthWest | |
PositionNorth | |
PositionNorthEast | |
PositionEast | |
PositionSouthEast | |
PositionSouth | |
PositionSouthWest | |
PositionWest | |
PositionFloating |
Definition at line 192 of file KDChartEnums.h.
Text layout policy: what to do if text that is to be drawn would cover neighboring text or neighboring areas.
LayoutJustOverwrite
Just ignore the layout collision and write the text nevertheless. LayoutPolicyRotate
Try counter-clockwise rotation to make the text fit into the space. LayoutPolicyShiftVertically
Shift the text baseline upwards (or downwards, resp.) and draw a connector line between the text and its anchor. LayoutPolicyShiftHorizontally
Shift the text baseline to the left (or to the right, resp.) and draw a connector line between the text and its anchor. LayoutPolicyShrinkFontSize
Reduce the text font size.Enumerator | |
---|---|
LayoutJustOverwrite | |
LayoutPolicyRotate | |
LayoutPolicyShiftVertically | |
LayoutPolicyShiftHorizontally | |
LayoutPolicyShrinkFontSize |
Definition at line 161 of file KDChartEnums.h.
|
static |
Converts the specified granularity sequence enum to a string representation.
sequence | the granularity sequence enum to convert |
Definition at line 109 of file KDChartEnums.h.
Referenced by KDChart::operator<<().
|
static |
Converts the specified text layout policy enum to a string representation.
type | the text layout policy to convert |
|
static |
Converts the specified measure calculation mode enum to a string representation.
mode | the measure calculation mode to convert |
Definition at line 235 of file KDChartEnums.h.
|
static |
Converts the specified measure orientation enum to a string representation.
mode | the measure orientation to convert |
Definition at line 303 of file KDChartEnums.h.
|
static |
Converts the specified string to a granularity sequence enum value.
string | the string to convert |
Definition at line 133 of file KDChartEnums.h.
|
static |
Converts the specified string to a text layout policy enum value.
string | the string to convert |
|
static |
Converts the specified string to a measure calculation mode enum value.
string | the string to convert |
Definition at line 259 of file KDChartEnums.h.
|
static |
Converts the specified string to a measure orientation enum value.
string | the string to convert |
Definition at line 327 of file KDChartEnums.h.