#include <vtkQtChartLegendModel.h>
Definition at line 41 of file vtkQtChartLegendModel.h.
Signals | |
void | entryInserted (int index) |
Emitted when a new entry is added. | |
void | removingEntry (int index) |
Emitted before an entry is removed. | |
void | entryRemoved (int index) |
Emitted after an entry is removed. | |
void | entriesReset () |
Emitted when the legend entries are reset. | |
void | iconChanged (int index) |
Emitted when the icon for an entry has changed. | |
void | textChanged (int index) |
Emitted when the text for an entry has changed. | |
Public Member Functions | |
vtkQtChartLegendModel (QObject *parent=0) | |
Creates a chart legend model. | |
virtual | ~vtkQtChartLegendModel () |
int | addEntry (const QPixmap &icon, const QString &text) |
Adds an entry to the chart legend. | |
int | insertEntry (int index, const QPixmap &icon, const QString &text) |
Inserts an entry into the chart legend. | |
void | removeEntry (int index) |
Removes an entry from the chart legend. | |
void | removeAllEntries () |
Removes all the entries from the legend. | |
void | startModifyingData () |
Blocks the model modification signals. | |
void | finishModifyingData () |
Unblocks the model modification signals. | |
int | getNumberOfEntries () const |
Gets the number of entries in the legend. | |
int | getIndexForId (unsigned int id) const |
Gets the index for the given id. | |
QPixmap | getIcon (int index) const |
Gets the icon for the given index. | |
void | setIcon (int index, const QPixmap &icon) |
Sets the icon for the given index. | |
QString | getText (int index) const |
Gets the text for the given index. | |
void | setText (int index, const QString &text) |
Sets the text for the given index. |
vtkQtChartLegendModel::vtkQtChartLegendModel | ( | QObject * | parent = 0 |
) |
Creates a chart legend model.
parent | The parent object. |
virtual vtkQtChartLegendModel::~vtkQtChartLegendModel | ( | ) | [virtual] |
int vtkQtChartLegendModel::addEntry | ( | const QPixmap & | icon, | |
const QString & | text | |||
) |
Adds an entry to the chart legend.
icon | The series identifying image. | |
text | The series label. |
int vtkQtChartLegendModel::insertEntry | ( | int | index, | |
const QPixmap & | icon, | |||
const QString & | text | |||
) |
Inserts an entry into the chart legend.
index | Where to place the new entry. | |
icon | The series identifying image. | |
text | The series label. |
void vtkQtChartLegendModel::removeEntry | ( | int | index | ) |
Removes an entry from the chart legend.
index | The index of the entry to remove. |
void vtkQtChartLegendModel::removeAllEntries | ( | ) |
Removes all the entries from the legend.
void vtkQtChartLegendModel::startModifyingData | ( | ) |
Blocks the model modification signals.
This method should be called before making multiple changes to the model. It will prevent the view from updating before the changes are complete. Once all the changes are made, the finishModifyingData
method should be called to notify the view of the changes.
void vtkQtChartLegendModel::finishModifyingData | ( | ) |
Unblocks the model modification signals.
The entriesReset
signal is emitted to synchronize the view.
int vtkQtChartLegendModel::getNumberOfEntries | ( | ) | const |
Gets the number of entries in the legend.
int vtkQtChartLegendModel::getIndexForId | ( | unsigned int | id | ) | const |
Gets the index for the given id.
id | The entry identifier. |
QPixmap vtkQtChartLegendModel::getIcon | ( | int | index | ) | const |
Gets the icon for the given index.
index | The index of the entry. |
void vtkQtChartLegendModel::setIcon | ( | int | index, | |
const QPixmap & | icon | |||
) |
Sets the icon for the given index.
index | The index of the entry. | |
icon | The new series icon. |
QString vtkQtChartLegendModel::getText | ( | int | index | ) | const |
Gets the text for the given index.
index | The index of the entry. |
void vtkQtChartLegendModel::setText | ( | int | index, | |
const QString & | text | |||
) |
Sets the text for the given index.
index | The index of the entry. | |
text | The new series label. |
void vtkQtChartLegendModel::entryInserted | ( | int | index | ) | [signal] |
Emitted when a new entry is added.
index | Where the entry was added. |
void vtkQtChartLegendModel::removingEntry | ( | int | index | ) | [signal] |
Emitted before an entry is removed.
index | The index being removed. |
void vtkQtChartLegendModel::entryRemoved | ( | int | index | ) | [signal] |
Emitted after an entry is removed.
index | The index being removed. |
void vtkQtChartLegendModel::entriesReset | ( | ) | [signal] |
Emitted when the legend entries are reset.
void vtkQtChartLegendModel::iconChanged | ( | int | index | ) | [signal] |
Emitted when the icon for an entry has changed.
index | The index of the entry that changed. |
void vtkQtChartLegendModel::textChanged | ( | int | index | ) | [signal] |
Emitted when the text for an entry has changed.
index | The index of the entry that changed. |