Search for usage in LXR

KChart::MarkerAttributes Class Reference

#include <KChartMarkerAttributes.h>

Public Types

enum  MarkerSizeMode { AbsoluteSize = 0, AbsoluteSizeScaled = 1, RelativeToDiagramWidthHeightMin = 2 }
enum  MarkerStyle {
  NoMarker = 0, MarkerCircle = 1, MarkerSquare = 2, MarkerDiamond = 3,
  Marker1Pixel = 4, Marker4Pixels = 5, MarkerRing = 6, MarkerCross = 7,
  MarkerFastCross = 8, MarkerArrowDown = 9, MarkerArrowUp = 10, MarkerArrowRight = 11,
  MarkerArrowLeft = 12, MarkerBowTie = 13, MarkerHourGlass = 14, MarkerStar = 15,
  MarkerX = 16, MarkerAsterisk = 17, MarkerHorizontalBar = 18, MarkerVerticalBar = 19,
  PainterPathMarker = 255, StartCustomMarkers = 256
typedef QMap< uint, uint > MarkerStylesMap

Public Member Functions

 MarkerAttributes (const MarkerAttributes &)
QPainterPath customMarkerPath () const
bool isVisible () const
QColor markerColor () const
QSizeF markerSize () const
MarkerSizeMode markerSizeMode () const
uint markerStyle () const
MarkerStylesMap markerStylesMap () const
bool operator!= (const MarkerAttributes &) const
MarkerAttributesoperator= (const MarkerAttributes &)
bool operator== (const MarkerAttributes &) const
QPen pen () const
void setCustomMarkerPath (const QPainterPath &path)
void setMarkerColor (const QColor &color)
void setMarkerSize (const QSizeF &size)
void setMarkerSizeMode (MarkerSizeMode mode)
void setMarkerStyle (uint style)
void setMarkerStylesMap (const MarkerStylesMap &map)
void setPen (const QPen &pen)
void setThreeD (bool value)
void setVisible (bool visible)
bool threeD () const

Detailed Description

A set of attributes controlling the appearance of data set markers.

Definition at line 29 of file KChartMarkerAttributes.h.

Member Enumeration Documentation

◆ MarkerSizeMode


the marker size is directly specified in pixels


the marker size is specified in pixels, but scaled by the painter's zoom level


the marker size is relative to the diagram's min(width, height)

Definition at line 61 of file KChartMarkerAttributes.h.

Member Function Documentation

◆ setMarkerSize()

void MarkerAttributes::setMarkerSize ( const QSizeF size)

Normally you need to specify a valid QSizeF here, but for Legends you can use the invalid size QSizeF(), to enable automatic marker size calculation:

For Markers shown in a Legend this means the marker size will be equal to the font height used for the labels that are shown next to the markers.

Definition at line 142 of file KChartMarkerAttributes.cpp.

◆ setMarkerSizeMode()

void MarkerAttributes::setMarkerSizeMode ( MarkerSizeMode  mode)

With this method you can change the way the actual marker size is calculated.

By default, the marker size is absolute (equiv. to mode = AbsoluteSize) and specifies the size in pixels.

In any other case, the size specified will be relative to what is specified in mode, e.g. the diagram's width. A marker width or height of 1.0 is then 100% of the diagram's width.

Definition at line 152 of file KChartMarkerAttributes.cpp.

◆ setMarkerStyle()

void MarkerAttributes::setMarkerStyle ( uint  style)

Set the marker-style to use.

This could be either one of the predefined MarkerStyle or a custom one that has a value bigger or equal to StartCustomMarkers.

Such a custom marker does then allow to fetch a custom pixmap for each point (value pair) from the model using the Qt::DecorationRole .

Definition at line 132 of file KChartMarkerAttributes.cpp.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Feb 3 2023 04:10:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.