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

Controls how a plottable's data selection is drawn. Więcej...

#include <qcustomplot.h>

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

Metody publiczne

 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)
 
virtual void drawDecoration (QCPPainter *painter, QCPDataSelection selection)
 

Metody chronione

virtual bool registerWithPlottable (QCPAbstractPlottable *plottable)
 

Atrybuty chronione

QPen mPen
 
QBrush mBrush
 
QCPScatterStyle mScatterStyle
 
QCPScatterStyle::ScatterProperties mUsedScatterProperties
 
QCPAbstractPlottablemPlottable
 

Przyjaciele

class QCPAbstractPlottable
 

Opis szczegółowy

Controls how a plottable's data selection is drawn.

Each QCPAbstractPlottable instance has one QCPSelectionDecorator (accessible via QCPAbstractPlottable::selectionDecorator) and uses it when drawing selected segments of its data.

The selection decorator controls both pen (setPen) and brush (setBrush), as well as the scatter style (setScatterStyle) if the plottable draws scatters. Since a QCPScatterStyle is itself composed of different properties such as color shape and size, the decorator allows specifying exactly which of those properties shall be used for the selected data point, via setUsedScatterProperties.

A QCPSelectionDecorator subclass instance can be passed to a plottable via QCPAbstractPlottable::setSelectionDecorator, allowing greater customizability of the appearance of selected segments.

Use copyFrom to easily transfer the settings of one decorator to another one. This is especially useful since plottables take ownership of the passed selection decorator, and thus the same decorator instance can not be passed to multiple plottables.

Selection decorators can also themselves perform drawing operations by reimplementing drawDecoration, which is called by the plottable's draw method. The base class QCPSelectionDecorator does not make use of this however. For example, QCPSelectionDecoratorBracket draws brackets around selected data segments.

Definicja w linii 3248 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPSelectionDecorator()

QCPSelectionDecorator::QCPSelectionDecorator ( )

Creates a new QCPSelectionDecorator instance with default values

Definicja w linii 10342 pliku qcustomplot.cpp.

◆ ~QCPSelectionDecorator()

QCPSelectionDecorator::~QCPSelectionDecorator ( )
virtual

Definicja w linii 10351 pliku qcustomplot.cpp.

Dokumentacja funkcji składowych

◆ applyBrush()

void QCPSelectionDecorator::applyBrush ( QCPPainter painter) const

Sets the brush of painter to the brush of this selection decorator.

Zobacz również
applyPen, getFinalScatterStyle

Definicja w linii 10411 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ applyPen()

void QCPSelectionDecorator::applyPen ( QCPPainter painter) const

Sets the pen of painter to the pen of this selection decorator.

Zobacz również
applyBrush, getFinalScatterStyle

Definicja w linii 10401 pliku qcustomplot.cpp.

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

◆ brush()

QBrush QCPSelectionDecorator::brush ( ) const
inline

Definicja w linii 3257 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ copyFrom()

void QCPSelectionDecorator::copyFrom ( const QCPSelectionDecorator other)
virtual

Copies all properties (e.g. color, fill, scatter style) of the other selection decorator to this selection decorator.

Definicja w linii 10442 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ drawDecoration()

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

This method is called by all plottables' draw methods to allow custom selection decorations to be drawn. Use the passed painter to perform the drawing operations. selection carries the data selection for which the decoration shall be drawn.

The default base class implementation of QCPSelectionDecorator has no special decoration, so this method does nothing.

Reimplementowana w QCPSelectionDecoratorBracket.

Definicja w linii 10457 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ getFinalScatterStyle()

QCPScatterStyle QCPSelectionDecorator::getFinalScatterStyle ( const QCPScatterStyle unselectedStyle) const

Returns the scatter style that the parent plottable shall use for selected scatter points. The plottable's original (unselected) scatter style must be passed as unselectedStyle. Depending on the setting of setUsedScatterProperties, the returned scatter style is a mixture of this selecion decorator's scatter style (setScatterStyle), and unselectedStyle.

Zobacz również
applyPen, applyBrush, setScatterStyle

Definicja w linii 10424 pliku qcustomplot.cpp.

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

◆ pen()

QPen QCPSelectionDecorator::pen ( ) const
inline

Definicja w linii 3256 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ registerWithPlottable()

bool QCPSelectionDecorator::registerWithPlottable ( QCPAbstractPlottable plottable)
protectedvirtual

Definicja w linii 10472 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ scatterStyle()

QCPScatterStyle QCPSelectionDecorator::scatterStyle ( ) const
inline

Definicja w linii 3258 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ setBrush()

void QCPSelectionDecorator::setBrush ( const QBrush &  brush)

Sets the brush that will be used by the parent plottable to draw selected data segments.

Definicja w linii 10366 pliku qcustomplot.cpp.

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

◆ setPen()

void QCPSelectionDecorator::setPen ( const QPen &  pen)

Sets the pen that will be used by the parent plottable to draw selected data segments.

Definicja w linii 10358 pliku qcustomplot.cpp.

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

◆ setScatterStyle()

void QCPSelectionDecorator::setScatterStyle ( const QCPScatterStyle scatterStyle,
QCPScatterStyle::ScatterProperties  usedProperties = QCPScatterStyle::spPen 
)

Sets the scatter style that will be used by the parent plottable to draw scatters in selected data segments.

usedProperties specifies which parts of the passed scatterStyle will be used by the plottable. The used properties can also be changed via setUsedScatterProperties.

Definicja w linii 10378 pliku qcustomplot.cpp.

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

◆ setUsedScatterProperties()

void QCPSelectionDecorator::setUsedScatterProperties ( const QCPScatterStyle::ScatterProperties &  properties)

Use this method to define which properties of the scatter style (set via setScatterStyle) will be used for selected data segments. All properties of the scatter style that are not specified in properties will remain as specified in the plottable's original scatter style.

Zobacz również
QCPScatterStyle::ScatterProperty

Definicja w linii 10391 pliku qcustomplot.cpp.

Oto graf wywoływań tej funkcji:

◆ usedScatterProperties()

QCPScatterStyle::ScatterProperties QCPSelectionDecorator::usedScatterProperties ( ) const
inline

Definicja w linii 3259 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

Dokumentacja przyjaciół i funkcji związanych

◆ QCPAbstractPlottable

friend class QCPAbstractPlottable
friend

Definicja w linii 3290 pliku qcustomplot.h.

Dokumentacja atrybutów składowych

◆ mBrush

QBrush QCPSelectionDecorator::mBrush
protected

Definicja w linii 3279 pliku qcustomplot.h.

◆ mPen

QPen QCPSelectionDecorator::mPen
protected

Definicja w linii 3278 pliku qcustomplot.h.

◆ mPlottable

QCPAbstractPlottable* QCPSelectionDecorator::mPlottable
protected

Definicja w linii 3283 pliku qcustomplot.h.

◆ mScatterStyle

QCPScatterStyle QCPSelectionDecorator::mScatterStyle
protected

Definicja w linii 3280 pliku qcustomplot.h.

◆ mUsedScatterProperties

QCPScatterStyle::ScatterProperties QCPSelectionDecorator::mUsedScatterProperties
protected

Definicja w linii 3281 pliku qcustomplot.h.


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