![]() |
.Simulation
|
Base class for all objects that can be placed on layers. More...
Public Member Functions | |
QCPLayerable (QCustomPlot *parentPlot) | |
Creates a new QCPLayerable instance. More... | |
bool | visible () const |
QCustomPlot * | parentPlot () const |
QCPLayer * | layer () const |
bool | antialiased () const |
void | setVisible (bool on) |
Sets the visibility of this layerable object. More... | |
bool | setLayer (QCPLayer *layer) |
Sets the layer of this layerable object. More... | |
bool | 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. More... | |
void | setAntialiased (bool enabled) |
Sets whether this object will be drawn antialiased or not. More... | |
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 |
QCustomPlot * | mParentPlot |
QCPLayer * | mLayer |
bool | mAntialiased |
Friends | |
class | QCustomPlot |
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.
QCPlot::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.
void QCPlot::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 QCPlot::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 QCPlot::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 QCPlot::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.