KDChart::MarkerAttributes Class Reference

#include <KDChartMarkerAttributes.h>

List of all members.


Detailed Description

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

Definition at line 47 of file KDChartMarkerAttributes.h.


Public Types

enum  MarkerStyle {
  MarkerCircle = 0,
  MarkerSquare = 1,
  MarkerDiamond = 2,
  Marker1Pixel = 3,
  Marker4Pixels = 4,
  MarkerRing = 5,
  MarkerCross = 6,
  MarkerFastCross = 7
}
typedef QMap< uint, MarkerStyleMarkerStylesMap

Public Member Functions

bool isVisible () const
 MarkerAttributes (const MarkerAttributes &)
 MarkerAttributes ()
QColor markerColor () const
QSizeF markerSize () const
MarkerStyle markerStyle () const
MarkerStylesMap markerStylesMap () const
bool operator!= (const MarkerAttributes &) const
MarkerAttributesoperator= (const MarkerAttributes &)
bool operator== (const MarkerAttributes &) const
QPen pen () const
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:.
void setMarkerStyle (MarkerStyle style)
void setMarkerStylesMap (const MarkerStylesMap &map)
void setPen (const QPen &pen)
void setVisible (bool visible)
 ~MarkerAttributes ()

Member Typedef Documentation

typedef QMap<uint, MarkerStyle> KDChart::MarkerAttributes::MarkerStylesMap

Definition at line 68 of file KDChartMarkerAttributes.h.


Member Enumeration Documentation

enum KDChart::MarkerAttributes::MarkerStyle

Enumerator:
MarkerCircle 
MarkerSquare 
MarkerDiamond 
Marker1Pixel 
Marker4Pixels 
MarkerRing 
MarkerCross 
MarkerFastCross 

Definition at line 56 of file KDChartMarkerAttributes.h.

00056                          { MarkerCircle  = 0,
00057                            MarkerSquare  = 1,
00058                            MarkerDiamond = 2,
00059                            Marker1Pixel  = 3,
00060                            Marker4Pixels = 4,
00061                            MarkerRing    = 5,
00062                            MarkerCross   = 6,
00063                            MarkerFastCross = 7 };


Constructor & Destructor Documentation

MarkerAttributes::MarkerAttributes (  ) 

Definition at line 61 of file KDChartMarkerAttributes.cpp.

00062     : _d( new Private )
00063 {
00064 
00065 }

MarkerAttributes::MarkerAttributes ( const MarkerAttributes r  ) 

Definition at line 67 of file KDChartMarkerAttributes.cpp.

00068     : _d( new Private( *r._d ) )
00069 {
00070 
00071 }

MarkerAttributes::~MarkerAttributes (  ) 

Definition at line 80 of file KDChartMarkerAttributes.cpp.

00081 {
00082     delete _d; _d = 0;
00083 }


Member Function Documentation

bool MarkerAttributes::isVisible (  )  const

Definition at line 114 of file KDChartMarkerAttributes.cpp.

References d.

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

00115 {
00116     return d->visible;
00117 }

QColor MarkerAttributes::markerColor (  )  const

Definition at line 154 of file KDChartMarkerAttributes.cpp.

References d.

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

00155 {
00156     return d->markerColor;
00157 }

QSizeF MarkerAttributes::markerSize (  )  const

Definition at line 144 of file KDChartMarkerAttributes.cpp.

References d.

Referenced by operator==(), KDChart::LineWithMarkerLayoutItem::paint(), KDChart::MarkerLayoutItem::paintIntoRect(), KDChart::AbstractDiagram::paintMarker(), KDChart::LineWithMarkerLayoutItem::sizeHint(), and KDChart::MarkerLayoutItem::sizeHint().

00145 {
00146     return d->markerSize;
00147 }

MarkerAttributes::MarkerStyle MarkerAttributes::markerStyle (  )  const

Definition at line 134 of file KDChartMarkerAttributes.cpp.

References d.

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

00135 {
00136     return d->markerStyle;
00137 }

MarkerAttributes::MarkerStylesMap MarkerAttributes::markerStylesMap (  )  const

Definition at line 124 of file KDChartMarkerAttributes.cpp.

References d.

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

00125 {
00126     return d->markerStylesMap;
00127 }

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

Definition at line 98 of file KDChartMarkerAttributes.h.

References operator==().

00098 { return !operator==( other ); }

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

Definition at line 73 of file KDChartMarkerAttributes.cpp.

00074 {
00075     MarkerAttributes copy( r );
00076     copy.swap( *this );
00077     return *this;
00078 }

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

Definition at line 87 of file KDChartMarkerAttributes.cpp.

References isVisible(), markerColor(), markerSize(), markerStyle(), markerStylesMap(), and pen().

Referenced by operator!=().

00088 {
00089     /*
00090     qDebug() << "MarkerAttributes::operator== finds"
00091             << "b" << (isVisible() == r.isVisible())
00092             << "c" << (markerStylesMap() == r.markerStylesMap())
00093             << "d" << (markerStyle() == r.markerStyle()) << markerStyle() <<r.markerStyle()
00094             << "e" << (markerSize() == r.markerSize())
00095             << "f" << (markerColor() == r.markerColor())
00096             << "g" << (pen() == r.pen())
00097             << "h" << (markerColor() == r.markerColor()) << markerColor() << r.markerColor();
00098     */
00099     return ( isVisible() == r.isVisible() &&
00100             markerStylesMap() == r.markerStylesMap() &&
00101             markerStyle() == r.markerStyle() &&
00102             markerSize() == r.markerSize() &&
00103             markerColor() == r.markerColor() &&
00104             pen() == r.pen() );
00105 }

QPen MarkerAttributes::pen (  )  const

Definition at line 164 of file KDChartMarkerAttributes.cpp.

References d.

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

00165 {
00166     return d->markerPen;
00167 }

void MarkerAttributes::setMarkerColor ( const QColor &  color  ) 

Definition at line 149 of file KDChartMarkerAttributes.cpp.

References d.

00150 {
00151     d->markerColor = color;
00152 }

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

References d.

00140 {
00141     d->markerSize = size;
00142 }

void MarkerAttributes::setMarkerStyle ( MarkerStyle  style  ) 

Definition at line 129 of file KDChartMarkerAttributes.cpp.

References d.

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

00130 {
00131     d->markerStyle = style;
00132 }

void MarkerAttributes::setMarkerStylesMap ( const MarkerStylesMap map  ) 

Definition at line 119 of file KDChartMarkerAttributes.cpp.

References d.

00120 {
00121     d->markerStylesMap = map;
00122 }

void MarkerAttributes::setPen ( const QPen &  pen  ) 

Definition at line 159 of file KDChartMarkerAttributes.cpp.

References d.

00160 {
00161     d->markerPen = pen;
00162 }

void MarkerAttributes::setVisible ( bool  visible  ) 

Definition at line 109 of file KDChartMarkerAttributes.cpp.

References d.

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

00110 {
00111     d->visible = visible;
00112 }


The documentation for this class was generated from the following files:
Generated on Thu Mar 4 23:26:11 2010 for KD Chart 2 by  doxygen 1.5.4