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

Groups multiple QCPBars together so they appear side by side. Więcej...

#include <qcustomplot.h>

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

Typy publiczne

enum  SpacingType { stAbsolute, stAxisRectRatio, stPlotCoords }
 

Metody publiczne

 QCPBarsGroup (QCustomPlot *parentPlot)
 
virtual ~QCPBarsGroup ()
 
SpacingType spacingType () const
 
double spacing () const
 
void setSpacingType (SpacingType spacingType)
 
void setSpacing (double spacing)
 
QList< QCPBars * > bars () const
 
QCPBarsbars (int index) const
 
int size () const
 
bool isEmpty () const
 
void clear ()
 
bool contains (QCPBars *bars) const
 
void append (QCPBars *bars)
 
void insert (int i, QCPBars *bars)
 
void remove (QCPBars *bars)
 

Metody chronione

void registerBars (QCPBars *bars)
 
void unregisterBars (QCPBars *bars)
 
double keyPixelOffset (const QCPBars *bars, double keyCoord)
 
double getPixelSpacing (const QCPBars *bars, double keyCoord)
 

Atrybuty chronione

QCustomPlotmParentPlot
 
SpacingType mSpacingType
 
double mSpacing
 
QList< QCPBars * > mBars
 

Przyjaciele

class QCPBars
 

Opis szczegółowy

Groups multiple QCPBars together so they appear side by side.

When showing multiple QCPBars in one plot which have bars at identical keys, it may be desirable to have them appearing next to each other at each key. This is what adding the respective QCPBars plottables to a QCPBarsGroup achieves. (An alternative approach is to stack them on top of each other, see QCPBars::moveAbove.)

Usage

To add a QCPBars plottable to the group, create a new group and then add the respective bars intances:

Alternatively to appending to the group like shown above, you can also set the group on the QCPBars plottable via QCPBars::setBarsGroup.

The spacing between the bars can be configured via setSpacingType and setSpacing. The bars in this group appear in the plot in the order they were appended. To insert a bars plottable at a certain index position, or to reposition a bars plottable which is already in the group, use insert.

To remove specific bars from the group, use either remove or call QCPBars::setBarsGroup(0) on the respective bars plottable.

To clear the entire group, call clear, or simply delete the group.

Example

The image above is generated with the following code:

Definicja w linii 5386 pliku qcustomplot.h.

Dokumentacja składowych wyliczanych

◆ SpacingType

Defines the ways the spacing between bars in the group can be specified. Thus it defines what the number passed to setSpacing actually means.

Zobacz również
setSpacingType, setSpacing
Wartości wyliczeń
stAbsolute 

Bar spacing is in absolute pixels.

stAxisRectRatio 

Bar spacing is given by a fraction of the axis rect size.

stPlotCoords 

Bar spacing is in key coordinates and thus scales with the key axis range.

Definicja w linii 5400 pliku qcustomplot.h.

Dokumentacja konstruktora i destruktora

◆ QCPBarsGroup()

QCPBarsGroup::QCPBarsGroup ( QCustomPlot parentPlot)
explicit

Constructs a new bars group for the specified QCustomPlot instance.

Definicja w linii 23236 pliku qcustomplot.cpp.

◆ ~QCPBarsGroup()

QCPBarsGroup::~QCPBarsGroup ( )
virtual

Definicja w linii 23244 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

Dokumentacja funkcji składowych

◆ append()

void QCPBarsGroup::append ( QCPBars bars)

Adds the specified bars plottable to this group. Alternatively, you can also use QCPBars::setBarsGroup on the bars instance.

Zobacz również
insert, remove

Definicja w linii 23307 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ bars() [1/2]

QList< QCPBars * > QCPBarsGroup::bars ( ) const
inline

Returns all bars currently in this group.

Zobacz również
bars(int index)

Definicja w linii 5418 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ bars() [2/2]

QCPBars * QCPBarsGroup::bars ( int  index) const

Returns the QCPBars instance with the specified index in this group. If no such QCPBars exists, returns 0.

Zobacz również
bars(), size

Definicja w linii 23278 pliku qcustomplot.cpp.

◆ clear()

void QCPBarsGroup::clear ( )

Removes all QCPBars plottables from this group.

Zobacz również
isEmpty

Definicja w linii 23295 pliku qcustomplot.cpp.

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

◆ contains()

bool QCPBarsGroup::contains ( QCPBars bars) const
inline

Returns whether the specified bars plottable is part of this group.

Definicja w linii 5423 pliku qcustomplot.h.

◆ getPixelSpacing()

double QCPBarsGroup::getPixelSpacing ( const QCPBars bars,
double  keyCoord 
)
protected

Definicja w linii 23461 pliku qcustomplot.cpp.

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

◆ insert()

void QCPBarsGroup::insert ( int  i,
QCPBars bars 
)

Inserts the specified bars plottable into this group at the specified index position i. This gives you full control over the ordering of the bars.

bars may already be part of this group. In that case, bars is just moved to the new index position.

Zobacz również
append, remove

Definicja w linii 23330 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ isEmpty()

bool QCPBarsGroup::isEmpty ( ) const
inline

Returns whether this bars group is empty.

Zobacz również
size

Definicja w linii 5421 pliku qcustomplot.h.

◆ keyPixelOffset()

double QCPBarsGroup::keyPixelOffset ( const QCPBars bars,
double  keyCoord 
)
protected

Definicja w linii 23395 pliku qcustomplot.cpp.

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

◆ registerBars()

void QCPBarsGroup::registerBars ( QCPBars bars)
protected

Definicja w linii 23371 pliku qcustomplot.cpp.

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

◆ remove()

void QCPBarsGroup::remove ( QCPBars bars)

Removes the specified bars plottable from this group.

Zobacz również
contains, clear

Definicja w linii 23350 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setSpacing()

void QCPBarsGroup::setSpacing ( double  spacing)

Sets the spacing between adjacent bars. What the number passed as spacing actually means, is defined by the current SpacingType, which can be set with setSpacingType.

Zobacz również
setSpacingType

Definicja w linii 23267 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ setSpacingType()

void QCPBarsGroup::setSpacingType ( SpacingType  spacingType)

Sets how the spacing between adjacent bars is interpreted. See SpacingType.

The actual spacing can then be specified with setSpacing.

Zobacz również
setSpacing

Definicja w linii 23256 pliku qcustomplot.cpp.

Oto graf wywołań dla tej funkcji:

◆ size()

int QCPBarsGroup::size ( ) const
inline

Returns the number of QCPBars plottables that are part of this group.

Definicja w linii 5420 pliku qcustomplot.h.

◆ spacing()

double QCPBarsGroup::spacing ( ) const
inline

Definicja w linii 5411 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ spacingType()

SpacingType QCPBarsGroup::spacingType ( ) const
inline

Definicja w linii 5410 pliku qcustomplot.h.

Oto graf wywoływań tej funkcji:

◆ unregisterBars()

void QCPBarsGroup::unregisterBars ( QCPBars bars)
protected

Definicja w linii 23384 pliku qcustomplot.cpp.

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

Dokumentacja przyjaciół i funkcji związanych

◆ QCPBars

friend class QCPBars
friend

Definicja w linii 5446 pliku qcustomplot.h.

Dokumentacja atrybutów składowych

◆ mBars

QList<QCPBars*> QCPBarsGroup::mBars
protected

Definicja w linii 5433 pliku qcustomplot.h.

◆ mParentPlot

QCustomPlot* QCPBarsGroup::mParentPlot
protected

Definicja w linii 5430 pliku qcustomplot.h.

◆ mSpacing

double QCPBarsGroup::mSpacing
protected

Definicja w linii 5432 pliku qcustomplot.h.

◆ mSpacingType

SpacingType QCPBarsGroup::mSpacingType
protected

Definicja w linii 5431 pliku qcustomplot.h.


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