vtkQtChartLegendModel Class Reference

#include <vtkQtChartLegendModel.h>

List of all members.


Detailed Description

The vtkQtChartLegendModel class stores the data for a chart legend.

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.
void visibilityChanged (int index)
 Emitted when the visibility of an entry changes.

Public Member Functions

 vtkQtChartLegendModel (QObject *parent=0)
 Creates a chart legend model.
virtual ~vtkQtChartLegendModel ()
int addEntry (const QPixmap &icon, const QString &text, bool visible)
 Adds an entry to the chart legend.
int insertEntry (int index, const QPixmap &icon, const QString &text, bool visible)
 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.
void setVisible (int index, bool visible)
 Sets if the given entry is visible.
bool getVisible (int index) const
 Returns if the given entry is visible.

Constructor & Destructor Documentation

vtkQtChartLegendModel::vtkQtChartLegendModel ( QObject *  parent = 0  ) 

Creates a chart legend model.

Parameters:
parent The parent object.

virtual vtkQtChartLegendModel::~vtkQtChartLegendModel (  )  [virtual]


Member Function Documentation

int vtkQtChartLegendModel::addEntry ( const QPixmap &  icon,
const QString &  text,
bool  visible 
)

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.

int vtkQtChartLegendModel::insertEntry ( int  index,
const QPixmap &  icon,
const QString &  text,
bool  visible 
)

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::removeEntry ( int  index  ) 

Removes an entry from the chart legend.

Parameters:
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.

See also:
vtkQtChartLegendModel::finishModifyingData()

void vtkQtChartLegendModel::finishModifyingData (  ) 

Unblocks the model modification signals.

The entriesReset signal is emitted to synchronize the view.

See also:
vtkQtChartLegendModel::startModifyingData()

int vtkQtChartLegendModel::getNumberOfEntries (  )  const

Gets the number of entries in the legend.

Returns:
The number of entries in the legend.

int vtkQtChartLegendModel::getIndexForId ( unsigned int  id  )  const

Gets the index for the given id.

Parameters:
id The entry identifier.
Returns:
The index for the entry that matches the id or -1 if there is no matching entry.

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.

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.

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::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::setVisible ( int  index,
bool  visible 
)

Sets if the given entry is visible.

Parameters:
index The index of the entry.
visible The visibility of the entry.

bool vtkQtChartLegendModel::getVisible ( int  index  )  const

Returns if the given entry is visible.

void vtkQtChartLegendModel::entryInserted ( int  index  )  [signal]

Emitted when a new entry is added.

Parameters:
index Where the entry was added.

void vtkQtChartLegendModel::removingEntry ( int  index  )  [signal]

Emitted before an entry is removed.

Parameters:
index The index being removed.

void vtkQtChartLegendModel::entryRemoved ( int  index  )  [signal]

Emitted after an entry is removed.

Parameters:
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.

Parameters:
index The index of the entry that changed.

void vtkQtChartLegendModel::textChanged ( int  index  )  [signal]

Emitted when the text for an entry has changed.

Parameters:
index The index of the entry that changed.

void vtkQtChartLegendModel::visibilityChanged ( int  index  )  [signal]

Emitted when the visibility of an entry changes.


The documentation for this class was generated from the following file:

Generated on Wed Aug 24 11:59:44 2011 for VTK by  doxygen 1.5.6