The vtkQtChartLegend class displays a chart legend.
More...
#include <vtkQtChartLegend.h>
List of all members.
Detailed Description
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.
Member Enumeration Documentation
- Enumerator:
LeftToRight |
Items are arranged left to right.
|
TopToBottom |
Items are arranged top to bottom.
|
Definition at line 60 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.
Constructor & Destructor Documentation
vtkQtChartLegend::vtkQtChartLegend |
( |
QWidget * |
parent = 0 ) |
|
Creates a chart legend instance.
- Parameters:
-
virtual vtkQtChartLegend::~vtkQtChartLegend |
( |
) |
[virtual] |
Member Function Documentation
void vtkQtChartLegend::drawLegend |
( |
QPainter & |
painter ) |
|
Draws the legend using the given painter.
- Parameters:
-
painter | The painter to use. |
virtual bool vtkQtChartLegend::event |
( |
QEvent * |
e ) |
[protected, virtual] |
Updates the layout when the font changes.
- Parameters:
-
e | Event specific information. |
- Returns:
- True if the event was handled.
void vtkQtChartLegend::finishEntryRemoval |
( |
int |
index ) |
[protected, slot] |
Finishes the entry removal process.
- Parameters:
-
index | The entry that was removed. |
ItemFlow vtkQtChartLegend::getFlow |
( |
) |
const [inline] |
Gets the legend item flow.
- Returns:
- The legend item flow.
Definition at line 101 of file vtkQtChartLegend.h.
Gets the legend location.
- Returns:
- The legend location.
Definition at line 85 of file vtkQtChartLegend.h.
Gets the legend model.
- Returns:
- A pointer to the legend model.
Definition at line 79 of file vtkQtChartLegend.h.
int vtkQtChartLegend::getOffset |
( |
) |
const |
Gets the panning offset.
- Returns:
- The current panning offset.
void vtkQtChartLegend::insertEntry |
( |
int |
index ) |
[protected, slot] |
Inserts a new entry in the legend.
- Parameters:
-
index | Where to insert the entry. |
void vtkQtChartLegend::locationChanged |
( |
) |
[signal] |
Emitted when the legend location is changed.
virtual void vtkQtChartLegend::mouseMoveEvent |
( |
QMouseEvent * |
e ) |
[protected, virtual] |
Used for panning the contents of the legend.
The conents are moved by changing the offset.
- Parameters:
-
e | Event specific information. |
virtual void vtkQtChartLegend::mousePressEvent |
( |
QMouseEvent * |
e ) |
[protected, virtual] |
Used for panning the contents of the legend.
The widget cursor is set for panning.
- Parameters:
-
e | Event specific information. |
virtual void vtkQtChartLegend::mouseReleaseEvent |
( |
QMouseEvent * |
e ) |
[protected, virtual] |
Used for panning the contents of the legend.
The widget cursor is reset after panning.
- Parameters:
-
e | Event specific information. |
virtual void vtkQtChartLegend::paintEvent |
( |
QPaintEvent * |
e ) |
[protected, virtual] |
Draws the chart title.
- Parameters:
-
e | Event specific information. |
void vtkQtChartLegend::reset |
( |
) |
[slot] |
virtual void vtkQtChartLegend::resizeEvent |
( |
QResizeEvent * |
e ) |
[protected, virtual] |
Updates the maximum offset when the size changes.
- Parameters:
-
e | Event specific information. |
void vtkQtChartLegend::setEntriesVisible |
( |
int |
first, |
|
|
int |
last, |
|
|
bool |
visible |
|
) |
| [slot] |
Sets the visibility for the given set of entries.
- Parameters:
-
first | The first index of the entry range. |
last | The last index of the entry range. |
visible | True if the entry should be visible. |
void vtkQtChartLegend::setEntryVisible |
( |
int |
index, |
|
|
bool |
visible |
|
) |
| [slot] |
Sets the visibility for the given entry.
- Parameters:
-
index | The legend index of the entry. |
visible | True if the entry should be visible. |
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:
-
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. |
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. |
virtual QSize vtkQtChartLegend::sizeHint |
( |
) |
const [inline, virtual] |
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::startEntryRemoval |
( |
int |
index ) |
[protected, slot] |
Starts the entry removal process.
- Parameters:
-
index | The entry being removed. |
void vtkQtChartLegend::updateEntryText |
( |
int |
index ) |
[protected, slot] |
Updates the text for the given entry.
- Parameters:
-
index | The index of the modified entry. |
The documentation for this class was generated from the following file: