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 QwtLegendButton.
See also:
Definition at line 158 of file qwt_legend.h.
enum LegendDisplayPolicy { None = 0, Fixed = 1, Auto = 2 }
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
virtual void viewportResizeEvent (QResizeEvent *)
virtual void layoutContents ()
Display policy.
Default is LegendDisplayPolicy::Auto.
See also:
Definition at line 187 of file qwt_legend.h.
Referenced by displayPolicy().
Parameters:
Definition at line 388 of file qwt_legend.cpp.
Remove all items.
Definition at line 565 of file qwt_legend.cpp.
Referenced by QwtPlot::clear(), QwtPlot::enableLegend(), and QwtPlot::removeCurves().
The contents widget is the only child of the viewport() and the parent widget of all legend items. Definition at line 481 of file qwt_legend.cpp.
The contents widget is the only child of the viewport() and the parent widget of all legend items. Definition at line 471 of file qwt_legend.cpp.
Referenced by QwtPlot::insertLegendItem(), QwtPlot::printLegend(), QwtPlot::setLegendPosition(), and QwtPlot::updateTabOrder().
Returns:
See also:
Definition at line 450 of file qwt_legend.cpp.
References LegendDisplayPolicy.
Referenced by QwtPlot::updateLegendItem().
Event filter.
Definition at line 662 of file qwt_legend.cpp.
References key(), layoutContents(), and takeItem().
Find the item for a given key.
Definition at line 537 of file qwt_legend.cpp.
Find the item for a given key.
Definition at line 531 of file qwt_legend.cpp.
Referenced by QwtPlot::enableLegend(), QwtPlot::legendEnabled(), QwtPlot::removeCurve(), and QwtPlot::updateLegendItem().
Returns:
Definition at line 608 of file qwt_legend.cpp.
Referenced by QwtPlotLayout::minimumSizeHint().
Returns:
Default is ShowLine | ShowSymbol | ShowText. Definition at line 462 of file qwt_legend.cpp.
Referenced by QwtPlot::updateLegendItem().
Insert a new item for a specific key.
Parameters:
Note:
In case of key < 0, nothing will be inserted.
Definition at line 493 of file qwt_legend.cpp.
References layoutContents().
Referenced by QwtPlot::insertLegendItem().
Return TRUE, if there are no legend items.
Definition at line 239 of file qwt_legend.h.
Referenced by QwtPlotLayout::activate(), QwtPlotLayout::minimumSizeHint(), QwtPlot::print(), and QwtPlot::printLegend().
A mode telling QwtPlot to insert read only items
See also:
Definition at line 424 of file qwt_legend.cpp.
Referenced by QwtPlot::insertLegendItem().
Return the number of legend items.
Definition at line 245 of file qwt_legend.h.
Referenced by QwtPlot::enableLegend(), and QwtPlot::updateLayout().
Return an item iterator.
Definition at line 591 of file qwt_legend.cpp.
Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset().
Return the key of an legend item.
Parameters:
Returns:
Definition at line 553 of file qwt_legend.cpp.
Referenced by eventFilter(), and QwtPlot::lgdClicked().
Adjust contents widget and item layout to the size of the viewport(). Definition at line 629 of file qwt_legend.cpp.
References QwtDynGridLayout::heightForWidth(), and QwtDynGridLayout::maxItemWidth().
Referenced by eventFilter(), and insertItem().
Set the legend display policy to:
Parameters:
See also:
Definition at line 437 of file qwt_legend.cpp.
Referenced by QwtPlot::setLegendDisplayPolicy().
A mode telling QwtPlot to insert read only items
See also:
Definition at line 415 of file qwt_legend.cpp.
Return a size hint.
Definition at line 597 of file qwt_legend.cpp.
Referenced by QwtPlotLayout::minimumSizeHint().
Find the item for a given key and remove it from the item list.
Definition at line 543 of file qwt_legend.cpp.
Resize the viewport() and post a QEvent::LayoutHint to QwtLegend::contentsWidget() to update the layout. Definition at line 692 of file qwt_legend.cpp.
Generated automatically by Doxygen for Qwt User's Guide from the source code.