The vtkQtChartLegendModel class stores the data for a chart legend.
More...
#include <vtkQtChartLegendModel.h>
List of all members.
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.
|
Detailed Description
The vtkQtChartLegendModel class stores the data for a chart legend.
Definition at line 41 of file vtkQtChartLegendModel.h.
Constructor & Destructor Documentation
vtkQtChartLegendModel::vtkQtChartLegendModel |
( |
QObject * |
parent = 0 ) |
|
Creates a chart legend model.
- Parameters:
-
virtual vtkQtChartLegendModel::~vtkQtChartLegendModel |
( |
) |
[virtual] |
Member Function Documentation
int vtkQtChartLegendModel::addEntry |
( |
const QPixmap & |
icon, |
|
|
const QString & |
text |
|
) |
| |
Adds an entry to the chart legend.
- Parameters:
-
icon | The series identifying image. |
text | The series label. |
- Returns:
- The id for the inserted entry or zero for failure.
void vtkQtChartLegendModel::entriesReset |
( |
) |
[signal] |
Emitted when the legend entries are reset.
void vtkQtChartLegendModel::entryInserted |
( |
int |
index ) |
[signal] |
Emitted when a new entry is added.
- Parameters:
-
index | Where the entry was added. |
void vtkQtChartLegendModel::entryRemoved |
( |
int |
index ) |
[signal] |
Emitted after an entry is removed.
- Parameters:
-
index | The index being removed. |
void vtkQtChartLegendModel::finishModifyingData |
( |
) |
|
QPixmap vtkQtChartLegendModel::getIcon |
( |
int |
index ) |
const |
Gets the icon for the given index.
- Parameters:
-
index | The index of the entry. |
- Returns:
- The icon for the given index or a null pixmap if the index is out of bounds.
int vtkQtChartLegendModel::getIndexForId |
( |
unsigned int |
id ) |
const |
Gets the index for the given id.
- Parameters:
-
- Returns:
- The index for the entry that matches the id or -1 if there is no matching entry.
int vtkQtChartLegendModel::getNumberOfEntries |
( |
) |
const |
Gets the number of entries in the legend.
- Returns:
- The number of entries in the legend.
QString vtkQtChartLegendModel::getText |
( |
int |
index ) |
const |
Gets the text for the given index.
- Parameters:
-
index | The index of the entry. |
- Returns:
- The text for the given index or a null string if the index is out of bounds.
void vtkQtChartLegendModel::iconChanged |
( |
int |
index ) |
[signal] |
Emitted when the icon for an entry has changed.
- Parameters:
-
index | The index of the entry that changed. |
int vtkQtChartLegendModel::insertEntry |
( |
int |
index, |
|
|
const QPixmap & |
icon, |
|
|
const QString & |
text |
|
) |
| |
Inserts an entry into the chart legend.
- Parameters:
-
index | Where to place the new entry. |
icon | The series identifying image. |
text | The series label. |
- Returns:
- The id for the inserted entry or zero for failure.
void vtkQtChartLegendModel::removeAllEntries |
( |
) |
|
Removes all the entries from the legend.
void vtkQtChartLegendModel::removeEntry |
( |
int |
index ) |
|
Removes an entry from the chart legend.
- Parameters:
-
index | The index of the entry to remove. |
void vtkQtChartLegendModel::removingEntry |
( |
int |
index ) |
[signal] |
Emitted before an entry is removed.
- Parameters:
-
index | The index being removed. |
void vtkQtChartLegendModel::setIcon |
( |
int |
index, |
|
|
const QPixmap & |
icon |
|
) |
| |
Sets the icon for the given index.
- Parameters:
-
index | The index of the entry. |
icon | The new series icon. |
void vtkQtChartLegendModel::setText |
( |
int |
index, |
|
|
const QString & |
text |
|
) |
| |
Sets the text for the given index.
- Parameters:
-
index | The index of the entry. |
text | The new series label. |
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.
- See also:
- vtkQtChartLegendModel::finishModifyingData()
void vtkQtChartLegendModel::textChanged |
( |
int |
index ) |
[signal] |
Emitted when the text for an entry has changed.
- Parameters:
-
index | The index of the entry that changed. |
The documentation for this class was generated from the following file: