KChart::MarkerAttributes

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 Typedef Documentation

◆ MarkerStylesMap

Definition at line 73 of file KChartMarkerAttributes.h.

Member Enumeration Documentation

◆ MarkerSizeMode

Enumerator
AbsoluteSize 

the marker size is directly specified in pixels

AbsoluteSizeScaled 

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

RelativeToDiagramWidthHeightMin 

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

Definition at line 61 of file KChartMarkerAttributes.h.

◆ MarkerStyle

enum KChart::MarkerAttributes::MarkerStyle

Definition at line 38 of file KChartMarkerAttributes.h.

Constructor & Destructor Documentation

◆ MarkerAttributes() [1/2]

MarkerAttributes::MarkerAttributes ( )

Definition at line 51 of file KChartMarkerAttributes.cpp.

◆ MarkerAttributes() [2/2]

MarkerAttributes::MarkerAttributes ( const MarkerAttributes & r)

Definition at line 57 of file KChartMarkerAttributes.cpp.

◆ ~MarkerAttributes()

MarkerAttributes::~MarkerAttributes ( )

Definition at line 70 of file KChartMarkerAttributes.cpp.

Member Function Documentation

◆ customMarkerPath()

QPainterPath MarkerAttributes::customMarkerPath ( ) const

Definition at line 178 of file KChartMarkerAttributes.cpp.

◆ isVisible()

bool MarkerAttributes::isVisible ( ) const

Definition at line 107 of file KChartMarkerAttributes.cpp.

◆ markerColor()

QColor MarkerAttributes::markerColor ( ) const

Definition at line 168 of file KChartMarkerAttributes.cpp.

◆ markerSize()

QSizeF MarkerAttributes::markerSize ( ) const

Definition at line 147 of file KChartMarkerAttributes.cpp.

◆ markerSizeMode()

MarkerAttributes::MarkerSizeMode MarkerAttributes::markerSizeMode ( ) const

Definition at line 157 of file KChartMarkerAttributes.cpp.

◆ markerStyle()

uint MarkerAttributes::markerStyle ( ) const

Definition at line 137 of file KChartMarkerAttributes.cpp.

◆ markerStylesMap()

MarkerAttributes::MarkerStylesMap MarkerAttributes::markerStylesMap ( ) const

Definition at line 127 of file KChartMarkerAttributes.cpp.

◆ operator!=()

bool KChart::MarkerAttributes::operator!= ( const MarkerAttributes & other) const
inline

Definition at line 132 of file KChartMarkerAttributes.h.

◆ operator=()

MarkerAttributes & MarkerAttributes::operator= ( const MarkerAttributes & r)

Definition at line 63 of file KChartMarkerAttributes.cpp.

◆ operator==()

bool MarkerAttributes::operator== ( const MarkerAttributes & r) const

Definition at line 77 of file KChartMarkerAttributes.cpp.

◆ pen()

QPen MarkerAttributes::pen ( ) const

Definition at line 188 of file KChartMarkerAttributes.cpp.

◆ setCustomMarkerPath()

void MarkerAttributes::setCustomMarkerPath ( const QPainterPath & path)

Definition at line 173 of file KChartMarkerAttributes.cpp.

◆ setMarkerColor()

void MarkerAttributes::setMarkerColor ( const QColor & color)

Definition at line 163 of file KChartMarkerAttributes.cpp.

◆ 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.

◆ setMarkerStylesMap()

void MarkerAttributes::setMarkerStylesMap ( const MarkerStylesMap & map)

Definition at line 122 of file KChartMarkerAttributes.cpp.

◆ setPen()

void MarkerAttributes::setPen ( const QPen & pen)

Definition at line 183 of file KChartMarkerAttributes.cpp.

◆ setThreeD()

void MarkerAttributes::setThreeD ( bool value)

Definition at line 112 of file KChartMarkerAttributes.cpp.

◆ setVisible()

void MarkerAttributes::setVisible ( bool visible)

Definition at line 102 of file KChartMarkerAttributes.cpp.

◆ threeD()

bool MarkerAttributes::threeD ( ) const

Definition at line 117 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-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:51:52 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.