open_iA 2024.9
Loading...
Searching...
No Matches
iABarGraphPlot Class Reference

Plots the given data points as single bars, horizontally separated by the given margin. More...

#include <iAPlotTypes.h>

Inheritance diagram for iABarGraphPlot:
[legend]
Collaboration diagram for iABarGraphPlot:
[legend]

Public Member Functions

 iABarGraphPlot (std::shared_ptr< iAPlotData > data, QColor const &color, int margin=0)
 
void draw (QPainter &painter, size_t startIdx, size_t endIdx, iAMapper const &xMapper, iAMapper const &yMapper) const override
 Draws the plot.
 
void drawLegendItem (QPainter &painter, QRect const &rect) override
 Draws a legend item for the plot.
 
void setLookupTable (std::shared_ptr< iALookupTable > lut)
 
- Public Member Functions inherited from iAPlot
 iAPlot (std::shared_ptr< iAPlotData > data, QColor const &color)
 
virtual ~iAPlot ()
 
QColor const color () const
 Get plot color.
 
virtual std::shared_ptr< iAPlotDatadata ()
 Retrieves the data used for drawing.
 
virtual void setColor (QColor const &color)
 Set plot color.
 
virtual void setVisible (bool visible)
 Sets whether the plot should be currently drawn or not.
 
virtual bool visible () const
 Whether the plot is currently being drawn.
 

Additional Inherited Members

- Protected Attributes inherited from iAPlot
std::shared_ptr< iAPlotDatam_data
 
bool m_visible
 

Detailed Description

Plots the given data points as single bars, horizontally separated by the given margin.

Well-suited for discrete or binned data.

Constructor & Destructor Documentation

◆ iABarGraphPlot()

iABarGraphPlot::iABarGraphPlot ( std::shared_ptr< iAPlotData > data,
QColor const & color,
int margin = 0 )

Member Function Documentation

◆ draw()

void iABarGraphPlot::draw ( QPainter & painter,
size_t startBin,
size_t endBin,
iAMapper const & xMapper,
iAMapper const & yMapper ) const
overridevirtual

Draws the plot.

Implements iAPlot.

◆ drawLegendItem()

void iABarGraphPlot::drawLegendItem ( QPainter & painter,
QRect const & rect )
overridevirtual

Draws a legend item for the plot.

Reimplemented from iAPlot.

◆ setLookupTable()

void iABarGraphPlot::setLookupTable ( std::shared_ptr< iALookupTable > lut)

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