QwtLegend(3) | Qwt User's Guide | QwtLegend(3) |
NAME¶
QwtLegend -
SYNOPSIS¶
#include <qwt_legend.h>
Public Types¶
enum LegendDisplayPolicy { NoIdentifier = 0,
FixedIdentifier = 1, AutoIdentifier = 2 }
enum LegendItemMode { ReadOnlyItem, ClickableItem,
CheckableItem }
Public Member Functions¶
QwtLegend (QWidget *parent=NULL)
virtual ~QwtLegend ()
void clear ()
QWidget * contentsWidget ()
const QWidget * contentsWidget () const
LegendDisplayPolicy displayPolicy () const
virtual bool eventFilter (QObject *, QEvent *)
QWidget * find (const QwtLegendItemManager *) const
QwtLegendItemManager * find (const QWidget *) const
virtual int heightForWidth (int w) const
QScrollBar * horizontalScrollBar () const
int identifierMode () const
void insert (const QwtLegendItemManager *, QWidget *)
bool isEmpty () const
uint itemCount () const
LegendItemMode itemMode () const
virtual QList< QWidget * > legendItems () const
void remove (const QwtLegendItemManager *)
void setDisplayPolicy (LegendDisplayPolicy policy, int mode)
void setItemMode (LegendItemMode)
virtual QSize sizeHint () const
QScrollBar * verticalScrollBar () const
Protected Member Functions¶
virtual void layoutContents ()
virtual void resizeEvent (QResizeEvent *)
Detailed Description¶
The legend widget.
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 QwtLegendItem.
See also:
Member Enumeration Documentation¶
enum QwtLegend::LegendDisplayPolicy¶
Display policy. .IP "•" 2 NoIdentifier
The client code is responsible how to display of each legend item. The Qwt
library will not interfere.
- FixedIdentifier
All legend items are displayed with the QwtLegendItem::IdentifierMode to be passed in 'mode'. - AutoIdentifier
Each legend item is displayed with a mode that is a bitwise or of
- •
- QwtLegendItem::ShowLine (if its curve is drawn with a line) and
- •
- QwtLegendItem::ShowSymbol (if its curve is drawn with symbols) and
- •
- QwtLegendItem::ShowText (if the has a title).
Default is AutoIdentifier.
See also:
enum QwtLegend::LegendItemMode¶
Interaction mode for the legend items. .IP "•" 2
ReadOnlyItem
The legend item is not interactive, like a label
- ClickableItem
The legend item is clickable, like a push button - CheckableItem
The legend item is checkable, like a checkable button
Default is ReadOnlyItem.
See also:
Constructor & Destructor Documentation¶
QwtLegend::QwtLegend (QWidget *parent = NULL) [explicit]¶
Constructor
Parameters:
Member Function Documentation¶
QWidget * QwtLegend::contentsWidget ()¶
The contents widget is the only child of the viewport() and the parent widget of all legend items.
const QWidget * QwtLegend::contentsWidget () const¶
The contents widget is the only child of the viewport() and the parent widget of all legend items.
QwtLegend::LegendDisplayPolicy QwtLegend::displayPolicy () const¶
Returns:
See also:
bool QwtLegend::eventFilter (QObject *o, QEvent *e) [virtual]¶
Filter layout related events of QwtLegend::contentsWidget().
Parameters:
e Event
QWidget * QwtLegend::find (const QwtLegendItemManager *plotItem) const¶
Find the widget that represents a plot item
Parameters:
Returns:
QwtLegendItemManager * QwtLegend::find (const QWidget *legendItem) const¶
Find the widget that represents a plot item
Parameters:
Returns:
int QwtLegend::heightForWidth (intwidth) const [virtual]¶
Returns:
Parameters:
QScrollBar * QwtLegend::horizontalScrollBar () const¶
Returns:
See also:
int QwtLegend::identifierMode () const¶
Returns:
Default is ShowLine | ShowSymbol | ShowText.
void QwtLegend::insert (const QwtLegendItemManager *plotItem, QWidget *legendItem)¶
Insert a new item for a plot item
Parameters:
legendItem New legend item
Note:
QwtLegend::LegendItemMode QwtLegend::itemMode () const¶
See also:
void QwtLegend::layoutContents () [protected], [virtual]¶
Adjust contents widget and item layout to the size of the viewport().
void QwtLegend::remove (const QwtLegendItemManager *plotItem)¶
Find the corresponding item for a plotItem and remove it from the item list.
Parameters:
void QwtLegend::resizeEvent (QResizeEvent *e) [protected], [virtual]¶
Resize event
Parameters:
void QwtLegend::setDisplayPolicy (LegendDisplayPolicypolicy, intmode)¶
Set the legend display policy to:
Parameters:
mode Identifier mode (or'd ShowLine, ShowSymbol, ShowText)
See also:
void QwtLegend::setItemMode (LegendItemModemode)¶
See also:
QScrollBar * QwtLegend::verticalScrollBar () const¶
Returns:
See also:
Author¶
Generated automatically by Doxygen for Qwt User's Guide from the source code.
Tue Nov 20 2012 | Version 5.2.3 |