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

A selection decorator which draws brackets around each selected data segment. Więcej...

#include <qcustomplot.h>

Diagram dziedziczenia dla QCPSelectionDecoratorBracket
Diagram współpracy dla QCPSelectionDecoratorBracket:

Typy publiczne

enum  BracketStyle {
  bsSquareBracket, bsHalfEllipse, bsEllipse, bsPlus,
  bsUserStyle
}
 

Metody publiczne

 QCPSelectionDecoratorBracket ()
 
virtual ~QCPSelectionDecoratorBracket ()
 
QPen bracketPen () const
 
QBrush bracketBrush () const
 
int bracketWidth () const
 
int bracketHeight () const
 
BracketStyle bracketStyle () const
 
bool tangentToData () const
 
int tangentAverage () const
 
void setBracketPen (const QPen &pen)
 
void setBracketBrush (const QBrush &brush)
 
void setBracketWidth (int width)
 
void setBracketHeight (int height)
 
void setBracketStyle (BracketStyle style)
 
void setTangentToData (bool enabled)
 
void setTangentAverage (int pointCount)
 
virtual void drawBracket (QCPPainter *painter, int direction) const
 
virtual void drawDecoration (QCPPainter *painter, QCPDataSelection selection) Q_DECL_OVERRIDE
 
- Metody publiczne dziedziczone z QCPSelectionDecorator
 QCPSelectionDecorator ()
 
virtual ~QCPSelectionDecorator ()
 
QPen pen () const
 
QBrush brush () const
 
QCPScatterStyle scatterStyle () const
 
QCPScatterStyle::ScatterProperties usedScatterProperties () const
 
void setPen (const QPen &pen)
 
void setBrush (const QBrush &brush)
 
void setScatterStyle (const QCPScatterStyle &scatterStyle, QCPScatterStyle::ScatterProperties usedProperties=QCPScatterStyle::spPen)
 
void setUsedScatterProperties (const QCPScatterStyle::ScatterProperties &properties)
 
void applyPen (QCPPainter *painter) const
 
void applyBrush (QCPPainter *painter) const
 
QCPScatterStyle getFinalScatterStyle (const QCPScatterStyle &unselectedStyle) const
 
virtual void copyFrom (const QCPSelectionDecorator *other)
 

Metody chronione

double getTangentAngle (const QCPPlottableInterface1D *interface1d, int dataIndex, int direction) const
 
QPointF getPixelCoordinates (const QCPPlottableInterface1D *interface1d, int dataIndex) const
 
- Metody chronione dziedziczone z QCPSelectionDecorator
virtual bool registerWithPlottable (QCPAbstractPlottable *plottable)
 

Atrybuty chronione

QPen mBracketPen
 
QBrush mBracketBrush
 
int mBracketWidth
 
int mBracketHeight
 
BracketStyle mBracketStyle
 
bool mTangentToData
 
int mTangentAverage
 
- Atrybuty chronione dziedziczone z QCPSelectionDecorator
QPen mPen
 
QBrush mBrush
 
QCPScatterStyle mScatterStyle
 
QCPScatterStyle::ScatterProperties mUsedScatterProperties
 
QCPAbstractPlottablemPlottable
 

Opis szczegółowy

A selection decorator which draws brackets around each selected data segment.

Additionally to the regular highlighting of selected segments via color, fill and scatter style, this QCPSelectionDecorator subclass draws markers at the begin and end of each selected data segment of the plottable.

The shape of the markers can be controlled with setBracketStyle, setBracketWidth and setBracketHeight. The color/fill can be controlled with setBracketPen and setBracketBrush.

To introduce custom bracket styles, it is only necessary to sublcass QCPSelectionDecoratorBracket and reimplement drawBracket. The rest will be managed by the base class.

Definicja w linii 4524 pliku qcustomplot.h.

Dokumentacja składowych wyliczanych

◆ BracketStyle

Defines which shape is drawn at the boundaries of selected data ranges.

Some of the bracket styles further allow specifying a height and/or width, see setBracketHeight and setBracketWidth.

Wartości wyliczeń
bsSquareBracket 

A square bracket is drawn.

bsHalfEllipse 

A half ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.

bsEllipse 

An ellipse is drawn. The size of the ellipse is given by the bracket width/height properties.

bsPlus 

A plus is drawn.

bsUserStyle 

Start custom bracket styles at this index when subclassing and reimplementing drawBracket.

Definicja w linii 4535 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPSelectionDecoratorBracket()

QCPSelectionDecoratorBracket::QCPSelectionDecoratorBracket ( )

Creates a new QCPSelectionDecoratorBracket instance with default values.

Definicja w linii 16426 pliku qcustomplot.cpp.

◆ ~QCPSelectionDecoratorBracket()

QCPSelectionDecoratorBracket::~QCPSelectionDecoratorBracket ( )
virtual

Definicja w linii 16438 pliku qcustomplot.cpp.

Dokumentacja funkcji składowych

◆ bracketBrush()

QBrush QCPSelectionDecoratorBracket::bracketBrush ( ) const
inline

Definicja w linii 4548 pliku qcustomplot.h.

◆ bracketHeight()

int QCPSelectionDecoratorBracket::bracketHeight ( ) const
inline

Definicja w linii 4550 pliku qcustomplot.h.

◆ bracketPen()

QPen QCPSelectionDecoratorBracket::bracketPen ( ) const
inline

Definicja w linii 4547 pliku qcustomplot.h.

◆ bracketStyle()

BracketStyle QCPSelectionDecoratorBracket::bracketStyle ( ) const
inline

Definicja w linii 4551 pliku qcustomplot.h.

◆ bracketWidth()

int QCPSelectionDecoratorBracket::bracketWidth ( ) const
inline

Definicja w linii 4549 pliku qcustomplot.h.

◆ drawBracket()

void QCPSelectionDecoratorBracket::drawBracket ( QCPPainter painter,
int  direction 
) const
virtual

Draws the bracket shape with painter. The parameter direction is either -1 or 1 and indicates whether the bracket shall point to the left or the right (i.e. is a closing or opening bracket, respectively).

The passed painter already contains all transformations that are necessary to position and rotate the bracket appropriately. Painting operations can be performed as if drawing upright brackets on flat data with horizontal key axis, with (0, 0) being the center of the bracket.

If you wish to sublcass QCPSelectionDecoratorBracket in order to provide custom bracket shapes (see QCPSelectionDecoratorBracket::bsUserStyle), this is the method you should reimplement.

Definicja w linii 16530 pliku qcustomplot.cpp.

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

◆ drawDecoration()

void QCPSelectionDecoratorBracket::drawDecoration ( QCPPainter painter,
QCPDataSelection  selection 
)
virtual

Draws the bracket decoration on the data points at the begin and end of each selected data segment given in seletion.

It uses the method drawBracket to actually draw the shapes.

\seebaseclassmethod

Reimplementowana z QCPSelectionDecorator.

Definicja w linii 16573 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ getPixelCoordinates()

QPointF QCPSelectionDecoratorBracket::getPixelCoordinates ( const QCPPlottableInterface1D interface1d,
int  dataIndex 
) const
protected

Definicja w linii 16672 pliku qcustomplot.cpp.

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

◆ getTangentAngle()

double QCPSelectionDecoratorBracket::getTangentAngle ( const QCPPlottableInterface1D interface1d,
int  dataIndex,
int  direction 
) const
protected

Definicja w linii 16625 pliku qcustomplot.cpp.

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

◆ setBracketBrush()

void QCPSelectionDecoratorBracket::setBracketBrush ( const QBrush &  brush)

Sets the brush that will be used to draw the brackets at the beginning and end of each selected data segment.

Definicja w linii 16455 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setBracketHeight()

void QCPSelectionDecoratorBracket::setBracketHeight ( int  height)

Sets the height of the drawn bracket. The height dimension is always perpendicular to the key axis of the data, or the tangent direction of the current data slope, if setTangentToData is enabled.

Definicja w linii 16475 pliku qcustomplot.cpp.

◆ setBracketPen()

void QCPSelectionDecoratorBracket::setBracketPen ( const QPen &  pen)

Sets the pen that will be used to draw the brackets at the beginning and end of each selected data segment.

Definicja w linii 16446 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setBracketStyle()

void QCPSelectionDecoratorBracket::setBracketStyle ( QCPSelectionDecoratorBracket::BracketStyle  style)

Sets the shape that the bracket/marker will have.

Zobacz również
setBracketWidth, setBracketHeight

Definicja w linii 16485 pliku qcustomplot.cpp.

◆ setBracketWidth()

void QCPSelectionDecoratorBracket::setBracketWidth ( int  width)

Sets the width of the drawn bracket. The width dimension is always parallel to the key axis of the data, or the tangent direction of the current data slope, if setTangentToData is enabled.

Definicja w linii 16465 pliku qcustomplot.cpp.

◆ setTangentAverage()

void QCPSelectionDecoratorBracket::setTangentAverage ( int  pointCount)

Controls over how many data points the slope shall be averaged, when brackets shall be aligned with the data (if setTangentToData is true).

From the position of the bracket, pointCount points towards the selected data range will be taken into account. The smallest value of pointCount is 1, which is effectively equivalent to disabling setTangentToData.

Definicja w linii 16510 pliku qcustomplot.cpp.

◆ setTangentToData()

void QCPSelectionDecoratorBracket::setTangentToData ( bool  enabled)

Sets whether the brackets will be rotated such that they align with the slope of the data at the position that they appear in.

For noisy data, it might be more visually appealing to average the slope over multiple data points. This can be configured via setTangentAverage.

Definicja w linii 16497 pliku qcustomplot.cpp.

◆ tangentAverage()

int QCPSelectionDecoratorBracket::tangentAverage ( ) const
inline

Definicja w linii 4553 pliku qcustomplot.h.

◆ tangentToData()

bool QCPSelectionDecoratorBracket::tangentToData ( ) const
inline

Definicja w linii 4552 pliku qcustomplot.h.

Dokumentacja atrybutów składowych

◆ mBracketBrush

QBrush QCPSelectionDecoratorBracket::mBracketBrush
protected

Definicja w linii 4573 pliku qcustomplot.h.

◆ mBracketHeight

int QCPSelectionDecoratorBracket::mBracketHeight
protected

Definicja w linii 4575 pliku qcustomplot.h.

◆ mBracketPen

QPen QCPSelectionDecoratorBracket::mBracketPen
protected

Definicja w linii 4572 pliku qcustomplot.h.

◆ mBracketStyle

BracketStyle QCPSelectionDecoratorBracket::mBracketStyle
protected

Definicja w linii 4576 pliku qcustomplot.h.

◆ mBracketWidth

int QCPSelectionDecoratorBracket::mBracketWidth
protected

Definicja w linii 4574 pliku qcustomplot.h.

◆ mTangentAverage

int QCPSelectionDecoratorBracket::mTangentAverage
protected

Definicja w linii 4578 pliku qcustomplot.h.

◆ mTangentToData

bool QCPSelectionDecoratorBracket::mTangentToData
protected

Definicja w linii 4577 pliku qcustomplot.h.


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