kchart

#include <KDChartEnums.h>

Public Types

enum  TextLayoutPolicy {
  LayoutJustOverwrite , LayoutPolicyRotate , LayoutPolicyShiftVertically , LayoutPolicyShiftHorizontally ,
  LayoutPolicyShrinkFontSize
}
enum  NumberNotation { NumberNotationDecimal , NumberNotationScientific , NumberNotationScientificBig }
enum  AreaName {
  AreaUNKNOWN = 0x0000 , AreaData = 0x0001 , AreaAxes = 0x0002 , AreaDataAxes = 0x0003 ,
  AreaLegend = 0x0004 , AreaDataAxesLegend = 0x0005 , AreaHeaders = 0x0006 , AreaFooters = 0x0007 ,
  AreaDataAxesLegendHeadersFooters = 0x0008 , AreaInnermost = 0x0009 , AreaOutermost = 0x000a , AreaChartDataRegion = 0x000b ,
  AreasCustomBoxes = 0x000d , AreaAxisBASE = 0x1000 , AreaHdFtBASE = 0x2000 , AreaCustomBoxesBASE = 0x4000 ,
  AreaBASEMask = 0xF000
}
enum  PositionFlag {
  PosTopLeft =0 , PosTopCenter =1 , PosTopRight =2 , PosCenterLeft =3 ,
  PosCenter =4 , PosCenterRight =5 , PosBottomLeft =6 , PosBottomCenter =7 ,
  PosBottomRight =8
}

Static Public Member Functions

static TQString layoutPolicyToString (TextLayoutPolicy type)
static TQString numberNotationToString (NumberNotation notation)
static NumberNotation stringToNumberNotation (const TQString &notation)
static TextLayoutPolicy stringToLayoutPolicy (const TQString &string)
static TQPoint positionFlagToPoint (const TQRect &rect, PositionFlag pos)
static TQPoint positionFlagToPoint (const TQPointArray &points, PositionFlag pos)
static TQString positionFlagToString (PositionFlag type)
static PositionFlag stringToPositionFlag (const TQString &string)

Detailed Description

Project global class providing some enums needed both by KDChartParams and by KDChartCustomBox.

Definition at line 46 of file KDChartEnums.h.

Member Enumeration Documentation

◆ AreaName

Areas of the chart that may have their own backgrounds and/or may be surrounded by a simple or complex border.

  • AreaData surrounding the data area
  • AreaAxes surrounding the axes but leaving out the data area
  • AreaDataAxes surrounding the data+axes area
  • AreaLegend surrounding the legend area
  • AreaDataAxesLegend surrounding the data+axes+legend area
  • AreaHeaders surrounding the headers area
  • AreaFooters surrounding the footers area
  • AreaDataAxesLegendHeadersFooters surrounding the data+axes+legend+headers+footers area
  • AreaInnermost covering the complete drawing area but not covering the global left/top/right/bottom leading
  • AreaOutermost covering the complete drawing area including the global left/top/right/bottom leading
  • AreaChartDataRegion covering the area used to display one data entry (i.e. one point, bar, line, pie slice,...). The respective data coordinates are specified by additional parameters, this is used by KDChartCustomBox where you have the parameters dataRow, dataCol, data3rd.

In addition there is a special value specifying a list of regions:

  • AreasCustomBoxes specifies many small areas surrounding all the custom boxes that you might have added to the chart, this is useful in case you want to specify some default frame settings to be used for all custom boxes not having frame settings of their own.

Finally there are three special values that you may use to specify a single axis area (or a header/footer area, or a custom box area resp.). Just add the number of the axis (or header/footer, or custom box resp.) to the respective base value:

  • AreaAxisBASE value to be added to the axis number in case you want to specify a single axis area, e.g. for specifying the area of the left ordinate axis just type AreaAxisBASE + AxisPosLeft.
  • AreaHdFtBASE value to be added to the header/footer number in case you want to specify a single header (or footer, resp.) area, e.g. for specifying the area of the main header just type AreaHdFtBASE + HdFtPosHeader.
  • AreaCustomBoxBASE value to be added to the number of a custom box that you might have added to your chart, e.g. for specifying the area a custom box you have added to the chart (let us assume the index of that box is in boxIdx1) just type AreaCustBoxBASE + boxIdx1.
See also
KDChartParams::setSimpleFrame, KDChartParams::setFrame
KDChartParams::insertCustomBox, KDChartCustomBox

Definition at line 214 of file KDChartEnums.h.

◆ NumberNotation

Number notation specifies the general way, how a number is to be shown.

  • NumberNotationDecimal Traditional way of writing a decimal number.
  • NumberNotationScientific Exponential notation, with exactly one non-zero digit to the left of the decimal.
  • NumberNotationScientificBig Same as NumberNotationScientific, but using 'E' instead of 'e'.
See also
KDChartAxisParams::setAxisLabelsNotation

Definition at line 108 of file KDChartEnums.h.

◆ PositionFlag

The general position flag to specify a point of an area, for example this could be the anchor point which an annotation box should be aligned to.

The following picture shows the different positions:

Note
The position and alignment of content to be printed at (or inside of, resp.) an area or a point – like for printing data value texts next to their graphical representations (which might be a bar, line, pie slice,...) – is specified by two parameters: a PositionFlag and a uint holding a combination of TQt::AlignmentFlags. Remember that TQt::AlignmentFlags are used to specify with which edge something is to be aligned to its anchor, e.g. AlignLeft means align with the left edge.

The position of content and the way it is aligned to this position is shown in the following drawing, note that annotation #2 and annotation #3 share the same PositionFlag but have different alignment flags set:

See also
KDChartParams::setPrintDataValues

Definition at line 259 of file KDChartEnums.h.

◆ TextLayoutPolicy

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.
See also
KDChartParams::setPrintDataValues

Definition at line 67 of file KDChartEnums.h.

Member Function Documentation

◆ layoutPolicyToString()

TQString KDChartEnums::layoutPolicyToString ( TextLayoutPolicy type)
inlinestatic

Converts the specified text layout policy enum to a string representation.

Parameters
typethe text layout policy to convert
Returns
the string representation of the text layout policy enum

Definition at line 80 of file KDChartEnums.h.

◆ numberNotationToString()

TQString KDChartEnums::numberNotationToString ( NumberNotation notation)
inlinestatic

Converts the specified number notation enum to a string representation.

Parameters
notationthe number notation to convert
Returns
the string representation of the number notation enum

Definition at line 119 of file KDChartEnums.h.

◆ positionFlagToPoint() [1/2]

TQPoint KDChartEnums::positionFlagToPoint ( const TQPointArray & points,
PositionFlag pos )
inlinestatic

Returns the point representing a position of a corresponding TQPointArray.

Note
The array points must have at least nine elements.

Definition at line 276 of file KDChartEnums.h.

◆ positionFlagToPoint() [2/2]

TQPoint KDChartEnums::positionFlagToPoint ( const TQRect & rect,
PositionFlag pos )
static

Returns the point representing a position of a rectangle.

Definition at line 54 of file KDChartEnums.cpp.

◆ positionFlagToString()

TQString KDChartEnums::positionFlagToString ( PositionFlag type)
static

Converts the specified content position enum to a string representation.

Parameters
typethe content position to convert
Returns
the string representation of the type enum

Definition at line 3 of file KDChartEnums.cpp.

◆ stringToLayoutPolicy()

TextLayoutPolicy KDChartEnums::stringToLayoutPolicy ( const TQString & string)
inlinestatic

Converts the specified string to a text layout policy enum value.

Parameters
stringthe string to convert
Returns
the text layout policy enum value

Definition at line 158 of file KDChartEnums.h.

◆ stringToNumberNotation()

NumberNotation KDChartEnums::stringToNumberNotation ( const TQString & notation)
inlinestatic

Converts the specified string to a number notation enum value.

Parameters
stringthe string to convert
Returns
the number notation enum value

Definition at line 140 of file KDChartEnums.h.

◆ stringToPositionFlag()

KDChartEnums::PositionFlag KDChartEnums::stringToPositionFlag ( const TQString & string)
static

Converts the specified string to a content position enum value.

Parameters
stringthe string to convert
Returns
the content position enum value

Definition at line 30 of file KDChartEnums.cpp.


The documentation for this class was generated from the following files: