Public Member Functions | Private Attributes | List of all members
BackgroundColorItem Class Reference

#include <plot_background.h>

Inheritance diagram for BackgroundColorItem:
Inheritance graph
[legend]

Public Member Functions

 BackgroundColorItem (const PJ::PlotData &data, QString colormap_name)
 
virtual QRectF boundingRect () const override
 
QString colormapName () const
 
QString dataName () const
 
virtual void draw (QPainter *painter, const QwtScaleMap &, const QwtScaleMap &, const QRectF &canvasRect) const override
 Draw the item. More...
 
int rtti () const override
 
void setTimeOffset (double *time_offset)
 
virtual ~BackgroundColorItem () override=default
 
- Public Member Functions inherited from QwtPlotItem
void attach (QwtPlot *plot)
 Attach the item to a plot. More...
 
void detach ()
 This method detaches a QwtPlotItem from any QwtPlot it has been associated with. More...
 
virtual void getCanvasMarginHint (const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect, double &left, double &top, double &right, double &bottom) const
 Calculate a hint for the canvas margin. More...
 
void hide ()
 Hide the item. More...
 
bool isVisible () const
 
virtual void itemChanged ()
 
virtual void legendChanged ()
 
virtual QList< QwtLegendDatalegendData () const
 Return all information, that is needed to represent the item on the legend. More...
 
virtual QwtGraphic legendIcon (int index, const QSizeF &) const
 
QSize legendIconSize () const
 
QRectF paintRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding paint rectangle of 2 maps. More...
 
QwtPlotplot () const
 Return attached plot. More...
 
 QwtPlotItem ()
 
 QwtPlotItem (const QString &title)
 
 QwtPlotItem (const QwtText &title)
 
uint renderThreadCount () const
 
QRectF scaleRect (const QwtScaleMap &, const QwtScaleMap &) const
 Calculate the bounding scale rectangle of 2 maps. More...
 
void setAxes (QwtAxisId xAxis, QwtAxisId yAxis)
 
void setItemAttribute (ItemAttribute, bool on=true)
 
void setItemInterest (ItemInterest, bool on=true)
 
void setLegendIconSize (const QSize &)
 
void setRenderHint (RenderHint, bool on=true)
 
void setRenderThreadCount (uint numThreads)
 
void setTitle (const QString &title)
 
void setTitle (const QwtText &title)
 
virtual void setVisible (bool)
 
void setXAxis (QwtAxisId)
 
void setYAxis (QwtAxisId)
 
void setZ (double z)
 Set the z value. More...
 
void show ()
 Show the item. More...
 
bool testItemAttribute (ItemAttribute) const
 
bool testItemInterest (ItemInterest) const
 
bool testRenderHint (RenderHint) const
 
const QwtTexttitle () const
 
virtual void updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &)
 Update the item to changes of the legend info. More...
 
virtual void updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &)
 Update the item to changes of the axes scale division. More...
 
QwtAxisId xAxis () const
 Return xAxis. More...
 
QwtAxisId yAxis () const
 Return yAxis. More...
 
double z () const
 
virtual ~QwtPlotItem ()
 Destroy the QwtPlotItem. More...
 

Private Attributes

QString _colormap_name
 
const PJ::PlotData_data
 
QString _data_name
 
double * _time_offset = nullptr
 

Additional Inherited Members

- Public Types inherited from QwtPlotItem
enum  ItemAttribute { Legend = 0x01, AutoScale = 0x02, Margins = 0x04 }
 Plot Item Attributes. More...
 
enum  ItemInterest { ScaleInterest = 0x01, LegendInterest = 0x02 }
 Plot Item Interests. More...
 
enum  RenderHint { RenderAntialiased = 0x1 }
 Render hints. More...
 
enum  RttiValues {
  Rtti_PlotItem = 0, Rtti_PlotGrid, Rtti_PlotScale, Rtti_PlotLegend,
  Rtti_PlotMarker, Rtti_PlotCurve, Rtti_PlotSpectroCurve, Rtti_PlotIntervalCurve,
  Rtti_PlotHistogram, Rtti_PlotSpectrogram, Rtti_PlotGraphic, Rtti_PlotTradingCurve,
  Rtti_PlotBarChart, Rtti_PlotMultiBarChart, Rtti_PlotShape, Rtti_PlotTextLabel,
  Rtti_PlotZone, Rtti_PlotVectorField, Rtti_PlotUserItem = 1000
}
 Runtime type information. More...
 
- Protected Member Functions inherited from QwtPlotItem
QwtGraphic defaultIcon (const QBrush &, const QSizeF &) const
 Return a default icon from a brush. More...
 

Detailed Description

Definition at line 16 of file plot_background.h.

Constructor & Destructor Documentation

◆ BackgroundColorItem()

BackgroundColorItem::BackgroundColorItem ( const PJ::PlotData data,
QString  colormap_name 
)

Definition at line 11 of file plot_background.cpp.

◆ ~BackgroundColorItem()

virtual BackgroundColorItem::~BackgroundColorItem ( )
overridevirtualdefault

Member Function Documentation

◆ boundingRect()

QRectF BackgroundColorItem::boundingRect ( ) const
overridevirtual
Returns
An invalid bounding rect: QRectF(1.0, 1.0, -2.0, -2.0)
Note
A width or height < 0.0 is ignored by the autoscaler

Reimplemented from QwtPlotItem.

Definition at line 72 of file plot_background.cpp.

◆ colormapName()

QString BackgroundColorItem::colormapName ( ) const
inline

Definition at line 38 of file plot_background.h.

◆ dataName()

QString BackgroundColorItem::dataName ( ) const
inline

Definition at line 43 of file plot_background.h.

◆ draw()

void BackgroundColorItem::draw ( QPainter *  painter,
const QwtScaleMap xMap,
const QwtScaleMap yMap,
const QRectF &  canvasRect 
) const
overridevirtual

Draw the item.

Parameters
painterPainter
xMapMaps x-values into pixel coordinates.
yMapMaps y-values into pixel coordinates.
canvasRectContents rect of the canvas in painter coordinates

Implements QwtPlotItem.

Definition at line 18 of file plot_background.cpp.

◆ rtti()

int BackgroundColorItem::rtti ( ) const
inlineoverridevirtual

Return rtti for the specific class represented. QwtPlotItem is simply a virtual interface class, and base classes will implement this method with specific rtti values so a user can differentiate them.

The rtti value is useful for environments, where the runtime type information is disabled and it is not possible to do a dynamic_cast<...>.

Returns
rtti value
See also
RttiValues

Reimplemented from QwtPlotItem.

Definition at line 28 of file plot_background.h.

◆ setTimeOffset()

void BackgroundColorItem::setTimeOffset ( double *  time_offset)
inline

Definition at line 23 of file plot_background.h.

Member Data Documentation

◆ _colormap_name

QString BackgroundColorItem::_colormap_name
private

Definition at line 51 of file plot_background.h.

◆ _data

const PJ::PlotData& BackgroundColorItem::_data
private

Definition at line 49 of file plot_background.h.

◆ _data_name

QString BackgroundColorItem::_data_name
private

Definition at line 50 of file plot_background.h.

◆ _time_offset

double* BackgroundColorItem::_time_offset = nullptr
private

Definition at line 52 of file plot_background.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:50