KD Chart 2  [rev.2.7]
Public Types | Public Member Functions | List of all members
KDChart::MarkerAttributes Class Reference

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

#include <KDChartMarkerAttributes.h>

Public Types

enum  MarkerStyle {
  MarkerCircle = 0,
  MarkerSquare = 1,
  MarkerDiamond = 2,
  Marker1Pixel = 3,
  Marker4Pixels = 4,
  MarkerRing = 5,
  MarkerCross = 6,
  MarkerFastCross = 7,
  NoMarker = 8,
  PainterPathMarker = 9,
  StartCustomMarkers = 10
}
 
typedef QMap< uint, uint > MarkerStylesMap
 

Public Member Functions

QPainterPath customMarkerPath () const
 
bool isVisible () const
 
 MarkerAttributes ()
 
 MarkerAttributes (const MarkerAttributes &)
 
QColor markerColor () const
 
QSizeF markerSize () 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)
 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: More...
 
void setMarkerStyle (uint style)
 Set the marker-style to use. More...
 
void setMarkerStylesMap (const MarkerStylesMap &map)
 
void setPen (const QPen &pen)
 
void setThreeD (bool value)
 
void setVisible (bool visible)
 
bool threeD () const
 
 ~MarkerAttributes ()
 

Detailed Description

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

Definition at line 43 of file KDChartMarkerAttributes.h.

Member Typedef Documentation

Definition at line 67 of file KDChartMarkerAttributes.h.

Member Enumeration Documentation

Enumerator
MarkerCircle 
MarkerSquare 
MarkerDiamond 
Marker1Pixel 
Marker4Pixels 
MarkerRing 
MarkerCross 
MarkerFastCross 
NoMarker 
PainterPathMarker 
StartCustomMarkers 

Definition at line 52 of file KDChartMarkerAttributes.h.

Constructor & Destructor Documentation

MarkerAttributes::MarkerAttributes ( )

Definition at line 62 of file KDChartMarkerAttributes.cpp.

MarkerAttributes::MarkerAttributes ( const MarkerAttributes r)

Definition at line 68 of file KDChartMarkerAttributes.cpp.

MarkerAttributes::~MarkerAttributes ( )

Definition at line 81 of file KDChartMarkerAttributes.cpp.

Member Function Documentation

QPainterPath MarkerAttributes::customMarkerPath ( ) const

Definition at line 177 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), and KDChart::AbstractDiagram::paintMarker().

bool MarkerAttributes::isVisible ( ) const

Definition at line 117 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), and KDChart::AbstractDiagram::paintMarker().

QColor MarkerAttributes::markerColor ( ) const
QSizeF MarkerAttributes::markerSize ( ) const
uint MarkerAttributes::markerStyle ( ) const

Definition at line 147 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by operator<<(), operator==(), and KDChart::AbstractDiagram::paintMarker().

MarkerAttributes::MarkerStylesMap MarkerAttributes::markerStylesMap ( ) const

Definition at line 137 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by operator<<(), and operator==().

bool KDChart::MarkerAttributes::operator!= ( const MarkerAttributes other) const
MarkerAttributes & MarkerAttributes::operator= ( const MarkerAttributes r)

Definition at line 74 of file KDChartMarkerAttributes.cpp.

bool MarkerAttributes::operator== ( const MarkerAttributes r) const
QPen MarkerAttributes::pen ( ) const
void MarkerAttributes::setCustomMarkerPath ( const QPainterPath &  path)

Definition at line 172 of file KDChartMarkerAttributes.cpp.

References d.

void MarkerAttributes::setMarkerColor ( const QColor &  color)

Definition at line 162 of file KDChartMarkerAttributes.cpp.

References d.

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 152 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by updateToplevelLayout().

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 142 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().

void MarkerAttributes::setMarkerStylesMap ( const MarkerStylesMap map)

Definition at line 132 of file KDChartMarkerAttributes.cpp.

References d.

void MarkerAttributes::setPen ( const QPen &  pen)

Definition at line 182 of file KDChartMarkerAttributes.cpp.

References d, and pen().

void MarkerAttributes::setThreeD ( bool  value)

Definition at line 122 of file KDChartMarkerAttributes.cpp.

References d.

void MarkerAttributes::setVisible ( bool  visible)

Definition at line 112 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by KDChart::TernaryLineDiagram::TernaryLineDiagram().

bool MarkerAttributes::threeD ( ) const

Definition at line 127 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by KDChart::AbstractDiagram::paintMarker().


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

Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/

https://www.kdab.com/development-resources/qt-tools/kd-chart/