Aquila  2.0 prealpha
Cognitive Robotics Architecture
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
QCPLayerable Class Referenceabstract

Base class for all objects that can be placed on layers. More...

#include <plot2d.h>

Inheritance diagram for QCPLayerable:
QCPAbstractItem QCPAbstractPlottable QCPAxis QCPGrid QCPLegend QCPItemBracket QCPItemCurve QCPItemEllipse QCPItemLine QCPItemPixmap QCPItemRect QCPItemStraightLine QCPItemText QCPItemTracer QCPBars QCPCurve QCPGraph QCPStatisticalBox

Public Member Functions

 QCPLayerable (QCustomPlot *parentPlot)
 ~QCPLayerable ()
bool visible () const
QCustomPlotparentPlot () const
QCPLayerlayer () const
bool antialiased () const
void setVisible (bool on)
bool setLayer (QCPLayer *layer)
bool setLayer (const QString &layerName)
void setAntialiased (bool enabled)

Protected Member Functions

bool moveToLayer (QCPLayer *layer, bool prepend)
void applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const
virtual void applyDefaultAntialiasingHint (QCPPainter *painter) const =0
virtual QRect clipRect () const
virtual void draw (QCPPainter *painter)=0

Protected Attributes

bool mVisible
bool mAntialiased


class QCustomPlot

Detailed Description

Base class for all objects that can be placed on layers.

This is the abstract base class most visible objects derive from, e.g. plottables, axes, grid etc.

Every layerable is on a layer (QCPLayer) which allows controlling the rendering order by stacking the layers accordingly.

For details about the layering mechanism, see the QCPLayer documentation.

Constructor & Destructor Documentation

QCPLayerable::QCPLayerable ( QCustomPlot parentPlot)

Creates a new QCPLayerable instance.

Since QCPLayerable is an abstract base class, it can't be instantiated directly. Use one of the derived classes.

QCPLayerable::~QCPLayerable ( )

Member Function Documentation

bool QCPLayerable::antialiased ( ) const
void QCPLayerable::applyAntialiasingHint ( QCPPainter painter,
bool  localAntialiased,
QCP::AntialiasedElement  overrideElement 
) const
void QCPLayerable::applyDefaultAntialiasingHint ( QCPPainter painter) const
protectedpure virtual
QRect QCPLayerable::clipRect ( ) const

Reimplemented in QCPAbstractItem, and QCPAbstractPlottable.

void QCPLayerable::draw ( QCPPainter painter)
protectedpure virtual
QCPLayer* QCPLayerable::layer ( ) const
bool QCPLayerable::moveToLayer ( QCPLayer layer,
bool  prepend 
QCustomPlot* QCPLayerable::parentPlot ( ) const
void QCPLayerable::setAntialiased ( bool  enabled)

Sets whether this object will be drawn antialiased or not.

Note that antialiasing settings may be overridden by QCustomPlot::setAntialiasedElements and QCustomPlot::setNotAntialiasedElements.

bool QCPLayerable::setLayer ( QCPLayer layer)

Sets the layer of this layerable object. The object will be placed on top of the other objects already on layer.

Returns true on success, i.e. if layer is a valid layer.

bool QCPLayerable::setLayer ( const QString &  layerName)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Sets the layer of this layerable object by name

Returns true on success, i.e. if layerName is a valid layer name.

void QCPLayerable::setVisible ( bool  on)

Sets the visibility of this layerable object. If an object is not visible, it will not be drawn on the QCustomPlot surface, and user interaction with it (e.g. click/selection) is not possible.

bool QCPLayerable::visible ( ) const

Friends And Related Function Documentation

friend class QCustomPlot

Member Data Documentation

bool QCPLayerable::mAntialiased
QCPLayer* QCPLayerable::mLayer
QCustomPlot* QCPLayerable::mParentPlot
bool QCPLayerable::mVisible

The documentation for this class was generated from the following files: