The vtkQtChartLegend class displays a chart legend.
More...
#include <vtkQtChartLegend.h>
Inherits QWidget.
The vtkQtChartLegend class displays a chart legend.
A vtkQtChartLegendModel is used to describe the entries. Each entry can have an icon and a label. The icon is used to visually identify the series on the chart. For a line chart series, the image should be drawn in the same color and line style.
Definition at line 47 of file vtkQtChartLegend.h.
Enumerator |
---|
Left |
Place the legend on the left of the chart.
|
Top |
Place the legend on the top of the chart.
|
Right |
Place the legend on the right of the chart.
|
Bottom |
Place the legend on the bottom of the chart.
|
Definition at line 52 of file vtkQtChartLegend.h.
Enumerator |
---|
LeftToRight |
Items are arranged left to right.
|
TopToBottom |
Items are arranged top to bottom.
|
Definition at line 60 of file vtkQtChartLegend.h.
vtkQtChartLegend::vtkQtChartLegend |
( |
QWidget * |
parent = 0 ) | |
|
Creates a chart legend instance.
- Parameters
-
virtual vtkQtChartLegend::~vtkQtChartLegend |
( |
) | |
|
|
virtual |
Gets the legend model.
- Returns
- A pointer to the legend model.
Definition at line 79 of file vtkQtChartLegend.h.
Gets the legend location.
- Returns
- The legend location.
Definition at line 85 of file vtkQtChartLegend.h.
Sets the legend location.
The chart uses the location to place the legend in the appropriate place. The combination of location and flow determine how the legend looks.
- Parameters
-
location | The new legend location. |
ItemFlow vtkQtChartLegend::getFlow |
( |
) | |
const |
|
inline |
Gets the legend item flow.
- Returns
- The legend item flow.
Definition at line 101 of file vtkQtChartLegend.h.
void vtkQtChartLegend::setFlow |
( |
ItemFlow |
flow) | |
|
Sets the legend item flow.
The flow is used to determine the layout direction of the legend entries. Depending on the location, the same flow type can look different.
- Parameters
-
int vtkQtChartLegend::getOffset |
( |
) | |
const |
Gets the panning offset.
- Returns
- The current panning offset.
virtual QSize vtkQtChartLegend::sizeHint |
( |
) | |
const |
|
inlinevirtual |
Gets the preferred size of the chart legend.
- Returns
- The preferred size of the chart legend.
Definition at line 124 of file vtkQtChartLegend.h.
void vtkQtChartLegend::drawLegend |
( |
QPainter & |
painter) | |
|
Draws the legend using the given painter.
- Parameters
-
painter | The painter to use. |
void vtkQtChartLegend::locationChanged |
( |
) | |
|
|
signal |
Emitted when the legend location is changed.
void vtkQtChartLegend::reset |
( |
) | |
|
|
slot |
void vtkQtChartLegend::setOffset |
( |
int |
offset) | |
|
|
slot |
Sets the panning offset.
The offset is applied to the x or y axis depending on the legend's location.
- Parameters
-
offset | The new panning offset. |
void vtkQtChartLegend::insertEntry |
( |
int |
index) | |
|
|
protectedslot |
Inserts a new entry in the legend.
- Parameters
-
index | Where to insert the entry. |
void vtkQtChartLegend::startEntryRemoval |
( |
int |
index) | |
|
|
protectedslot |
Starts the entry removal process.
- Parameters
-
index | The entry being removed. |
void vtkQtChartLegend::finishEntryRemoval |
( |
int |
index) | |
|
|
protectedslot |
Finishes the entry removal process.
- Parameters
-
index | The entry that was removed. |
void vtkQtChartLegend::updateEntryText |
( |
int |
index) | |
|
|
protectedslot |
Updates the text for the given entry.
- Parameters
-
index | The index of the modified entry. |
void vtkQtChartLegend::updateEntryVisible |
( |
int |
index) | |
|
|
protectedslot |
Updates the visibility for the given entry.
- Parameters
-
index | The index of the modified entry. |
virtual bool vtkQtChartLegend::event |
( |
QEvent * |
e) | |
|
|
protectedvirtual |
Updates the layout when the font changes.
- Parameters
-
e | Event specific information. |
- Returns
- True if the event was handled.
virtual void vtkQtChartLegend::paintEvent |
( |
QPaintEvent * |
e) | |
|
|
protectedvirtual |
Draws the chart title.
- Parameters
-
e | Event specific information. |
virtual void vtkQtChartLegend::resizeEvent |
( |
QResizeEvent * |
e) | |
|
|
protectedvirtual |
Updates the maximum offset when the size changes.
- Parameters
-
e | Event specific information. |
virtual void vtkQtChartLegend::mousePressEvent |
( |
QMouseEvent * |
e) | |
|
|
protectedvirtual |
Used for panning the contents of the legend.
The widget cursor is set for panning.
- Parameters
-
e | Event specific information. |
virtual void vtkQtChartLegend::mouseMoveEvent |
( |
QMouseEvent * |
e) | |
|
|
protectedvirtual |
Used for panning the contents of the legend.
The conents are moved by changing the offset.
- Parameters
-
e | Event specific information. |
virtual void vtkQtChartLegend::mouseReleaseEvent |
( |
QMouseEvent * |
e) | |
|
|
protectedvirtual |
Used for panning the contents of the legend.
The widget cursor is reset after panning.
- Parameters
-
e | Event specific information. |
The documentation for this class was generated from the following file: