Gra zręcznościowa „Straszna Epidemia"  V1.2
Projekt Wizualizacja Danych Sensorycznych Kewin Gałuszka rok akademicki 2019/2020
Dokumentacja klasy QCPLineEnding

Handles the different ending decorations for line-like items. Więcej...

#include <qcustomplot.h>

Typy publiczne

enum  EndingStyle {
  esNone, esFlatArrow, esSpikeArrow, esLineArrow,
  esDisc, esSquare, esDiamond, esBar,
  esHalfBar, esSkewedBar
}
 

Metody publiczne

 QCPLineEnding ()
 
 QCPLineEnding (EndingStyle style, double width=8, double length=10, bool inverted=false)
 
EndingStyle style () const
 
double width () const
 
double length () const
 
bool inverted () const
 
void setStyle (EndingStyle style)
 
void setWidth (double width)
 
void setLength (double length)
 
void setInverted (bool inverted)
 
double boundingDistance () const
 
double realLength () const
 
void draw (QCPPainter *painter, const QCPVector2D &pos, const QCPVector2D &dir) const
 
void draw (QCPPainter *painter, const QCPVector2D &pos, double angle) const
 

Atrybuty chronione

EndingStyle mStyle
 
double mWidth
 
double mLength
 
bool mInverted
 

Opis szczegółowy

Handles the different ending decorations for line-like items.

The various ending styles currently supported

For every ending a line-like item has, an instance of this class exists. For example, QCPItemLine has two endings which can be set with QCPItemLine::setHead and QCPItemLine::setTail.

The styles themselves are defined via the enum QCPLineEnding::EndingStyle. Most decorations can be modified regarding width and length, see setWidth and setLength. The direction of the ending decoration (e.g. direction an arrow is pointing) is controlled by the line-like item. For example, when both endings of a QCPItemLine are set to be arrows, they will point to opposite directions, e.g. "outward". This can be changed by setInverted, which would make the respective arrow point inward.

Note that due to the overloaded QCPLineEnding constructor, you may directly specify a QCPLineEnding::EndingStyle where actually a QCPLineEnding is expected, e.g.

Definicja w linii 1474 pliku qcustomplot.h.

Dokumentacja składowych wyliczanych

◆ EndingStyle

Defines the type of ending decoration for line-like items, e.g. an arrow.

The width and length of these decorations can be controlled with the functions setWidth and setLength. Some decorations like esDisc, esSquare, esDiamond and esBar only support a width, the length property is ignored.

Zobacz również
QCPItemLine::setHead, QCPItemLine::setTail, QCPItemCurve::setHead, QCPItemCurve::setTail, QCPAxis::setLowerEnding, QCPAxis::setUpperEnding
Wartości wyliczeń
esNone 

No ending decoration.

esFlatArrow 

A filled arrow head with a straight/flat back (a triangle)

esSpikeArrow 

A filled arrow head with an indented back.

esLineArrow 

A non-filled arrow head with open back.

esDisc 

A filled circle.

esSquare 

A filled square.

esDiamond 

A filled diamond (45 degrees rotated square)

esBar 

A bar perpendicular to the line.

esHalfBar 

A bar perpendicular to the line, pointing out to only one side (to which side can be changed with setInverted)

esSkewedBar 

A bar that is skewed (skew controllable via setLength)

Definicja w linii 1489 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPLineEnding() [1/2]

QCPLineEnding::QCPLineEnding ( )

Creates a QCPLineEnding instance with default values (style esNone).

Definicja w linii 5164 pliku qcustomplot.cpp.

◆ QCPLineEnding() [2/2]

QCPLineEnding::QCPLineEnding ( QCPLineEnding::EndingStyle  style,
double  width = 8,
double  length = 10,
bool  inverted = false 
)

Creates a QCPLineEnding instance with the specified values.

Definicja w linii 5175 pliku qcustomplot.cpp.

Dokumentacja funkcji składowych

◆ boundingDistance()

double QCPLineEnding::boundingDistance ( ) const

Definicja w linii 5235 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ draw() [1/2]

void QCPLineEnding::draw ( QCPPainter painter,
const QCPVector2D pos,
const QCPVector2D dir 
) const

Definicja w linii 5300 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:
Oto graf wywoływań tej funkcji:

◆ draw() [2/2]

void QCPLineEnding::draw ( QCPPainter painter,
const QCPVector2D pos,
double  angle 
) const

Definicja w linii 5426 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ inverted()

bool QCPLineEnding::inverted ( ) const
inline

Definicja w linii 1509 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ length()

double QCPLineEnding::length ( ) const
inline

Definicja w linii 1508 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ realLength()

double QCPLineEnding::realLength ( ) const

Starting from the origin of this line ending (which is style specific), returns the length covered by the line ending symbol, in backward direction.

For example, the esSpikeArrow has a shorter real length than a esFlatArrow, even if both have the same setLength value, because the spike arrow has an inward curved back, which reduces the length along its center axis (the drawing origin for arrows is at the tip).

This function is used for precise, style specific placement of line endings, for example in QCPAxes.

Definicja w linii 5270 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ setInverted()

void QCPLineEnding::setInverted ( bool  inverted)

Sets whether the ending decoration shall be inverted. For example, an arrow decoration will point inward when inverted is set to true.

Note that also the width direction is inverted. For symmetrical ending styles like arrows or discs, this doesn't make a difference. However, asymmetric styles like esHalfBar are affected by it, which can be used to control to which side the half bar points to.

Definicja w linii 5221 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setLength()

void QCPLineEnding::setLength ( double  length)

Sets the length of the ending decoration, if the style supports it. On arrows, for example, the length defines the size in pointing direction.

Zobacz również
setWidth

Definicja w linii 5208 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setStyle()

void QCPLineEnding::setStyle ( QCPLineEnding::EndingStyle  style)

Sets the style of the ending decoration.

Definicja w linii 5186 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setWidth()

void QCPLineEnding::setWidth ( double  width)

Sets the width of the ending decoration, if the style supports it. On arrows, for example, the width defines the size perpendicular to the arrow's pointing direction.

Zobacz również
setLength

Definicja w linii 5197 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ style()

EndingStyle QCPLineEnding::style ( ) const
inline

Definicja w linii 1506 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ width()

double QCPLineEnding::width ( ) const
inline

Definicja w linii 1507 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

Dokumentacja atrybutów składowych

◆ mInverted

bool QCPLineEnding::mInverted
protected

Definicja w linii 1527 pliku qcustomplot.h.

◆ mLength

double QCPLineEnding::mLength
protected

Definicja w linii 1526 pliku qcustomplot.h.

◆ mStyle

EndingStyle QCPLineEnding::mStyle
protected

Definicja w linii 1525 pliku qcustomplot.h.

◆ mWidth

double QCPLineEnding::mWidth
protected

Definicja w linii 1526 pliku qcustomplot.h.


Dokumentacja dla tej klasy została wygenerowana z plików: