QwtLegendItem represents a curve on a legend. It displays an curve identifier with an explaining text. The identifier might be a combination of curve symbol and line. In readonly mode it behaves like a label, otherwise like an unstylish push button.
Definition at line 35 of file qwt_legend_item.h.
Public Types | |
enum | IdentifierMode { NoIdentifier = 0, ShowLine = 1, ShowSymbol = 2, ShowText = 4 } |
Public Slots | |
void | setChecked (bool on) |
Signals | |
void | clicked () |
void | pressed () |
void | released () |
void | checked (bool) |
Public Member Functions | |
QwtLegendItem (QWidget *parent=0) | |
QwtLegendItem (const QwtSymbol &, const QPen &, const QString &, QWidget *parent=0) | |
void | setItemMode (QwtLegend::LegendItemMode) |
QwtLegend::LegendItemMode | itemMode () const |
virtual void | setTitle (const QString &) |
virtual QString | title () const |
void | setIdentifierMode (int) |
int | identifierMode () const |
void | setSymbol (const QwtSymbol &) |
const QwtSymbol & | symbol () const |
void | setCurvePen (const QPen &) |
const QPen & | curvePen () const |
virtual void | drawIdentifier (QPainter *, const QRect &) const |
virtual void | drawItem (QPainter *p, const QRect &) const |
virtual QSize | sizeHint () const |
bool | isChecked () const |
Protected Member Functions | |
void | setDown (bool) |
bool | isDown () const |
virtual QwtText * | titleText () const |
virtual void | paintEvent (QPaintEvent *) |
virtual void | mousePressEvent (QMouseEvent *) |
virtual void | mouseReleaseEvent (QMouseEvent *) |
virtual void | keyPressEvent (QKeyEvent *) |
virtual void | keyReleaseEvent (QKeyEvent *) |
|
Identifier mode. Default is ShowLine | ShowText Definition at line 47 of file qwt_legend_item.h. |
|
Definition at line 71 of file qwt_legend_item.cpp. |
|
Definition at line 86 of file qwt_legend_item.cpp. References curvePen(), and symbol(). |
|
Definition at line 238 of file qwt_legend_item.cpp. Referenced by QwtPlotPrintFilter::apply(), QwtLegendItem(), and QwtPlotPrintFilter::reset(). |
|
Paint the identifier to a given rect.
Definition at line 248 of file qwt_legend_item.cpp. References QwtSymbol::draw(), QwtPainter::drawLine(), QwtPainter::metricsMap(), QwtSymbol::setBrush(), QwtSymbol::setPen(), and QwtSymbol::setSize(). Referenced by drawItem(). |
|
Draw the legend item to a given rect.
Definition at line 304 of file qwt_legend_item.cpp. References QwtText::draw(), drawIdentifier(), QwtPainter::metricsMap(), and titleText(). Referenced by QwtPlot::printLegendItem(). |
|
Or'd values of IdentifierMode. Definition at line 189 of file qwt_legend_item.cpp. |
|
Set curve pen.
Definition at line 225 of file qwt_legend_item.cpp. Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Set identifier mode. Default is ShowLine | ShowText.
Definition at line 176 of file qwt_legend_item.cpp. |
|
Set curve symbol.
Definition at line 200 of file qwt_legend_item.cpp. References symbol(). Referenced by QwtPlotPrintFilter::apply(), and QwtPlotPrintFilter::reset(). |
|
Set the title of the label
Definition at line 145 of file qwt_legend_item.cpp. References title(). |
|
Definition at line 213 of file qwt_legend_item.cpp. Referenced by QwtPlotPrintFilter::apply(), QwtLegendItem(), QwtPlotPrintFilter::reset(), and setSymbol(). |
|
Definition at line 154 of file qwt_legend_item.cpp. Referenced by setTitle(). |
|
Definition at line 163 of file qwt_legend_item.cpp. References QwtText::makeText(). Referenced by drawItem(). |