KChart::RulerAttributes

Search for usage in LXR

KChart::RulerAttributes Class Reference

#include <KChartRulerAttributes.h>

Public Types

typedef QMap< qreal, QPenTickMarkerPensMap
 

Public Member Functions

 RulerAttributes (const RulerAttributes &)
 
bool hasTickMarkPenAt (qreal value) const
 
int labelMargin () const
 
int majorTickMarkLength () const
 
bool majorTickMarkLengthIsSet () const
 
QPen majorTickMarkPen () const
 
bool majorTickMarkPenIsSet () const
 
int minorTickMarkLength () const
 
bool minorTickMarkLengthIsSet () const
 
QPen minorTickMarkPen () const
 
bool minorTickMarkPenIsSet () const
 
bool operator!= (const RulerAttributes &other) const
 
RulerAttributesoperator= (const RulerAttributes &)
 
bool operator== (const RulerAttributes &) const
 
QPen rulerLinePen () const
 
void setLabelMargin (int margin)
 
void setMajorTickMarkLength (int length)
 
void setMajorTickMarkPen (const QPen &pen)
 
void setMinorTickMarkLength (int length)
 
void setMinorTickMarkPen (const QPen &pen)
 
void setRulerLinePen (const QPen &pen)
 
void setShowFirstTick (bool show)
 
void setShowMajorTickMarks (bool show)
 
void setShowMinorTickMarks (bool show)
 
void setShowRulerLine (bool show)
 
void setTickMarkColor (const QColor &color)
 
void setTickMarkPen (const QPen &pen)
 
void setTickMarkPen (qreal value, const QPen &pen)
 
bool showFirstTick () const
 
bool showMajorTickMarks () const
 
bool showMinorTickMarks () const
 
bool showRulerLine () const
 
QColor tickMarkColor () const
 
QPen tickMarkPen () const
 
QPen tickMarkPen (qreal value) const
 
TickMarkerPensMap tickMarkPens () const
 

Detailed Description

A set of attributes controlling the appearance of axis rulers.

Definition at line 25 of file KChartRulerAttributes.h.

Member Function Documentation

◆ rulerLinePen()

QPen RulerAttributes::rulerLinePen ( ) const
Returns
the ruler line pen

Definition at line 288 of file KChartRulerAttributes.cpp.

◆ setLabelMargin()

void RulerAttributes::setLabelMargin ( int  margin)

Set margin that should be used between the labels and the ticks.

By default the value is -1, which means that half of the label's font height/width should be used as margin.

Definition at line 188 of file KChartRulerAttributes.cpp.

◆ setMajorTickMarkLength()

void RulerAttributes::setMajorTickMarkLength ( int  length)

Sets the length of major tick marks.

Definition at line 198 of file KChartRulerAttributes.cpp.

◆ setMajorTickMarkPen()

void RulerAttributes::setMajorTickMarkPen ( const QPen pen)

Sets the pen used to draw major tick marks.

Definition at line 93 of file KChartRulerAttributes.cpp.

◆ setMinorTickMarkLength()

void RulerAttributes::setMinorTickMarkLength ( int  length)

Sets the length of minor tick marks.

Definition at line 214 of file KChartRulerAttributes.cpp.

◆ setMinorTickMarkPen()

void RulerAttributes::setMinorTickMarkPen ( const QPen pen)

Sets the pen used to draw minor tick marks.

Definition at line 109 of file KChartRulerAttributes.cpp.

◆ setRulerLinePen()

void RulerAttributes::setRulerLinePen ( const QPen pen)

Set the ruler line pen to pen.

Definition at line 283 of file KChartRulerAttributes.cpp.

◆ setShowFirstTick()

void RulerAttributes::setShowFirstTick ( bool  show)

Shows or hides the first tick.

This is usually where the axes cross. The tick itself may be obscured by the other axis, but the label will be visible.

Definition at line 230 of file KChartRulerAttributes.cpp.

◆ setShowMajorTickMarks()

void RulerAttributes::setShowMajorTickMarks ( bool  show)

Shows or hides major tick marks.

Definition at line 168 of file KChartRulerAttributes.cpp.

◆ setShowMinorTickMarks()

void RulerAttributes::setShowMinorTickMarks ( bool  show)

Shows or hides minor tick marks.

Definition at line 178 of file KChartRulerAttributes.cpp.

◆ setTickMarkColor()

void RulerAttributes::setTickMarkColor ( const QColor color)

Color setter method provided for convenience.

Definition at line 158 of file KChartRulerAttributes.cpp.

◆ setTickMarkPen() [1/2]

void RulerAttributes::setTickMarkPen ( const QPen pen)

Sets the pen used to draw the tick marks.

Definition at line 83 of file KChartRulerAttributes.cpp.

◆ setTickMarkPen() [2/2]

void RulerAttributes::setTickMarkPen ( qreal  value,
const QPen pen 
)

Sets the pen used to draw the tick mark at a specific value.

Note: This will not paint a tick mark at the specified value if it wasn't already drawn before.

Definition at line 125 of file KChartRulerAttributes.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 Sat Sep 23 2023 03:54:10 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.