The QwtLegend widget is a tabular arrangement of legend items. Legend items might be any type of widget, but in general they will be a QwtLegendButton.
Public Types | |
enum | LegendDisplayPolicy { None = 0, Fixed = 1, Auto = 2 } |
Public Member Functions | |
QwtLegend (QWidget *parent=0, const char *name=0) | |
void | setReadOnly (bool readOnly) |
bool | isReadOnly () const |
void | setDisplayPolicy (LegendDisplayPolicy policy, int mode=-1) |
LegendDisplayPolicy | displayPolicy () const |
int | identifierMode () const |
QWidget * | contentsWidget () |
const QWidget * | contentsWidget () const |
void | insertItem (QWidget *, long key) |
QWidget * | findItem (long key) |
const QWidget * | findItem (long key) const |
QWidget * | takeItem (long key) |
virtual QWidgetIntDictIt | itemIterator () const |
long | key (const QWidget *) const |
void | clear () |
bool | isEmpty () const |
uint | itemCount () const |
virtual bool | eventFilter (QObject *, QEvent *) |
virtual QSize | sizeHint () const |
virtual int | heightForWidth (int w) const |
Protected Member Functions | |
virtual void | viewportResizeEvent (QResizeEvent *) |
virtual void | layoutContents () |
|
Display policy.
Default is LegendDisplayPolicy::Auto.
|
|
|
|
Remove all items.
|
|
The contents widget is the only child of the viewport() and the parent widget of all legend items. |
|
The contents widget is the only child of the viewport() and the parent widget of all legend items. |
|
Return the legend display policy. Default is LegendDisplayPolicy::Auto. |
|
Find the item for a given key.
|
|
Find the item for a given key.
|
|
|
|
Return the IdentifierMode to be used in combination with LegendDisplayPolicy::Fixed. Default is ShowLine | ShowSymbol | ShowText. |
|
Insert a new item for a specific key.
|
|
Return TRUE, if there are no legend items.
|
|
Return the number of legend items.
|
|
Return an item iterator.
|
|
Return the key of an legend item.
|
|
Adjust contents widget and item layout to the size of the viewport(). |
|
Set the legend display policy to:
|
|
Return a size hint.
|
|
Find the item for a given key and remove it from the item list.
|