|
|
| QwtPlotLegendItem () |
| | Constructor.
|
| |
|
virtual | ~QwtPlotLegendItem () |
| | Destructor.
|
| |
| virtual int | rtti () const QWT_OVERRIDE |
| |
| void | setAlignmentInCanvas (Qt::Alignment) |
| | Set the alignmnet.
|
| |
| Qt::Alignment | alignmentInCanvas () const |
| |
| void | setOffsetInCanvas (Qt::Orientations, int numPixels) |
| | Set the distance between the legend and the canvas border.
|
| |
| int | offsetInCanvas (Qt::Orientation) const |
| |
| void | setMaxColumns (uint) |
| | Limit the number of columns.
|
| |
| uint | maxColumns () const |
| |
| void | setMargin (int) |
| | Set the margin around legend items.
|
| |
| int | margin () const |
| |
| void | setSpacing (int) |
| | Set the spacing between the legend items.
|
| |
| int | spacing () const |
| |
| void | setItemMargin (int) |
| | Set the margin around each item.
|
| |
| int | itemMargin () const |
| |
| void | setItemSpacing (int) |
| | Set the spacing inside of each item.
|
| |
| int | itemSpacing () const |
| |
| void | setFont (const QFont &) |
| | Change the font used for drawing the text label.
|
| |
| QFont | font () const |
| |
| void | setBorderRadius (double) |
| | Set the radius for the border.
|
| |
| double | borderRadius () const |
| |
| void | setBorderPen (const QPen &) |
| | Set the pen for drawing the border.
|
| |
| QPen | borderPen () const |
| |
| void | setBackgroundBrush (const QBrush &) |
| | Set the background brush.
|
| |
| QBrush | backgroundBrush () const |
| |
| void | setBackgroundMode (BackgroundMode) |
| | Set the background mode.
|
| |
| BackgroundMode | backgroundMode () const |
| |
| void | setTextPen (const QPen &) |
| | Set the pen for drawing text labels.
|
| |
| QPen | textPen () const |
| |
| virtual void | draw (QPainter *, const QwtScaleMap &xMap, const QwtScaleMap &yMap, const QRectF &canvasRect) const QWT_OVERRIDE |
| | Draw the legend.
|
| |
|
void | clearLegend () |
| | Remove all items from the legend.
|
| |
| virtual void | updateLegend (const QwtPlotItem *, const QList< QwtLegendData > &) QWT_OVERRIDE |
| | Update the legend items according to modifications of a plot item.
|
| |
| virtual QRect | geometry (const QRectF &canvasRect) const |
| | Calculate the geometry of the legend on the canvas.
|
| |
| virtual QSize | minimumSize (const QwtLegendData &) const |
| | Minimum size hint needed to display an entry.
|
| |
| virtual int | heightForWidth (const QwtLegendData &, int width) const |
| |
| QList< const QwtPlotItem * > | plotItems () const |
| |
| QList< QRect > | legendGeometries (const QwtPlotItem *) const |
| |
|
| QwtPlotItem () |
| | Constructor.
|
| |
| | QwtPlotItem (const QString &title) |
| | Constructor.
|
| |
| | QwtPlotItem (const QwtText &title) |
| | Constructor.
|
| |
|
virtual | ~QwtPlotItem () |
| | Destroy the QwtPlotItem.
|
| |
| void | attach (QwtPlot *plot) |
| | Attach the item to a plot.
|
| |
| void | detach () |
| | This method detaches a QwtPlotItem from any QwtPlot it has been associated with.
|
| |
|
QwtPlot * | plot () const |
| | Return attached plot.
|
| |
| void | setTitle (const QString &title) |
| | Set a new title.
|
| |
| void | setTitle (const QwtText &title) |
| | Set a new title.
|
| |
| const QwtText & | title () const |
| |
| void | setItemAttribute (ItemAttribute, bool on=true) |
| | Toggle an item attribute.
|
| |
| bool | testItemAttribute (ItemAttribute) const |
| | Test an item attribute.
|
| |
| void | setItemInterest (ItemInterest, bool on=true) |
| | Toggle an item interest.
|
| |
| bool | testItemInterest (ItemInterest) const |
| | Test an item interest.
|
| |
| void | setRenderHint (RenderHint, bool on=true) |
| | Toggle an render hint.
|
| |
| bool | testRenderHint (RenderHint) const |
| | Test a render hint.
|
| |
| void | setRenderThreadCount (uint numThreads) |
| | On multi core systems rendering of certain plot item ( f.e QwtPlotRasterItem ) can be done in parallel in several threads.
|
| |
| uint | renderThreadCount () const |
| |
| void | setLegendIconSize (const QSize &) |
| | Set the size of the legend icon.
|
| |
| QSize | legendIconSize () const |
| |
| double | z () const |
| | Plot items are painted in increasing z-order.
|
| |
| void | setZ (double z) |
| | Set the z value.
|
| |
|
void | show () |
| | Show the item.
|
| |
|
void | hide () |
| | Hide the item.
|
| |
| virtual void | setVisible (bool) |
| | Show/Hide the item.
|
| |
| bool | isVisible () const |
| |
| void | setAxes (QwtAxisId xAxis, QwtAxisId yAxis) |
| | Set X and Y axis.
|
| |
| void | setXAxis (QwtAxisId) |
| | Set the X axis.
|
| |
|
QwtAxisId | xAxis () const |
| | Return xAxis.
|
| |
| void | setYAxis (QwtAxisId) |
| | Set the Y axis.
|
| |
|
QwtAxisId | yAxis () const |
| | Return yAxis.
|
| |
| virtual void | itemChanged () |
| | Update the legend and call QwtPlot::autoRefresh() for the parent plot.
|
| |
| virtual void | legendChanged () |
| | Update the legend of the parent plot.
|
| |
| virtual QRectF | boundingRect () const |
| |
| 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.
|
| |
| virtual void | updateScaleDiv (const QwtScaleDiv &, const QwtScaleDiv &) |
| | Update the item to changes of the axes scale division.
|
| |
| QRectF | scaleRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the bounding scale rectangle of 2 maps.
|
| |
| QRectF | paintRect (const QwtScaleMap &, const QwtScaleMap &) const |
| | Calculate the bounding paint rectangle of 2 maps.
|
| |
| virtual QList< QwtLegendData > | legendData () const |
| | Return all information, that is needed to represent the item on the legend.
|
| |
| virtual QwtGraphic | legendIcon (int index, const QSizeF &) const |
| |
A class which draws a legend inside the plot canvas.
QwtPlotLegendItem can be used to draw a inside the plot canvas. It can be used together with a QwtLegend or instead of it to have more space for the plot canvas.
In opposite to QwtLegend the legend item is not interactive. To identify mouse clicks on a legend item an event filter needs to be installed catching mouse events ob the plot canvas. The geometries of the legend items are available using legendGeometries().
The legend item is aligned to plot canvas according to its alignment() flags. It might have a background for the complete legend ( usually semi transparent ) or for each legend item.
- Note
- An external QwtLegend with a transparent background on top the plot canvas might be another option with a similar effect.