Eneboo - Documentación para desarrolladores
|
A legend label. Más...
#include <qwt_legend_item.h>
Clases | |
class | PrivateData |
Tipos públicos | |
enum | IdentifierMode { NoIdentifier = 0, ShowLine = 1, ShowSymbol = 2, ShowText = 4 } |
Identifier mode. Más... | |
Slots públicos | |
void | setChecked (bool on) |
Señales | |
void | clicked () |
Signal, when the legend item has been clicked. | |
void | pressed () |
Signal, when the legend item has been pressed. | |
void | released () |
Signal, when the legend item has been relased. | |
void | checked (bool) |
Signal, when the legend item has been toggled. | |
Métodos públicos | |
QwtLegendItem (QWidget *parent=0) | |
QwtLegendItem (const QwtSymbol &, const QPen &, const QwtText &, QWidget *parent=0) | |
virtual | ~QwtLegendItem () |
Destructor. | |
virtual void | setText (const QwtText &) |
void | setItemMode (QwtLegend::LegendItemMode) |
QwtLegend::LegendItemMode | itemMode () const |
void | setIdentifierMode (int) |
int | identifierMode () const |
void | setIdentfierWidth (int width) |
int | identifierWidth () const |
void | setSpacing (int spacing) |
int | spacing () 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 |
Return a size hint. | |
bool | isChecked () const |
Return true, if the item is checked. | |
Métodos protegidos | |
void | setDown (bool) |
Set the item being down. | |
bool | isDown () const |
Return true, if the item is down. | |
virtual void | paintEvent (QPaintEvent *) |
Paint event. | |
virtual void | mousePressEvent (QMouseEvent *) |
Handle mouse press events. | |
virtual void | mouseReleaseEvent (QMouseEvent *) |
Handle mouse release events. | |
virtual void | keyPressEvent (QKeyEvent *) |
Handle key press events. | |
virtual void | keyReleaseEvent (QKeyEvent *) |
Handle key release events. | |
virtual void | drawText (QPainter *, const QRect &) |
Redraw the text. |
A legend label.
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.
Identifier mode.
Default is ShowLine | ShowText
QwtLegendItem::QwtLegendItem | ( | QWidget * | parent = 0 | ) | [explicit] |
parent | Parent widget |
QwtLegendItem::QwtLegendItem | ( | const QwtSymbol & | symbol, |
const QPen & | curvePen, | ||
const QwtText & | text, | ||
QWidget * | parent = 0 |
||
) | [explicit] |
symbol | Curve symbol |
curvePen | Curve pen |
text | Label text |
parent | Parent widget |
QwtLegendItem::~QwtLegendItem | ( | ) | [virtual] |
Destructor.
void QwtLegendItem::checked | ( | bool | ) | [signal] |
Signal, when the legend item has been toggled.
void QwtLegendItem::clicked | ( | ) | [signal] |
Signal, when the legend item has been clicked.
const QPen & QwtLegendItem::curvePen | ( | ) | const |
Paint the identifier to a given rect.
painter | Painter |
rect | Rect where to paint |
Draw the legend item to a given rect.
painter | Painter |
rect | Rect where to paint the button |
Redraw the text.
Reimplementado de QwtTextLabel.
int QwtLegendItem::identifierMode | ( | ) | const |
Or'd values of IdentifierMode.
int QwtLegendItem::identifierWidth | ( | ) | const |
Return the width of the identifier
bool QwtLegendItem::isChecked | ( | ) | const |
Return true, if the item is checked.
bool QwtLegendItem::isDown | ( | ) | const [protected] |
Return true, if the item is down.
QwtLegend::LegendItemMode QwtLegendItem::itemMode | ( | ) | const |
Return the item mode
void QwtLegendItem::keyPressEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Handle key press events.
Reimplementado de QWidget.
void QwtLegendItem::keyReleaseEvent | ( | QKeyEvent * | e | ) | [protected, virtual] |
Handle key release events.
Reimplementado de QWidget.
void QwtLegendItem::mousePressEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Handle mouse press events.
Reimplementado de QWidget.
void QwtLegendItem::mouseReleaseEvent | ( | QMouseEvent * | e | ) | [protected, virtual] |
Handle mouse release events.
Reimplementado de QWidget.
void QwtLegendItem::paintEvent | ( | QPaintEvent * | e | ) | [protected, virtual] |
Paint event.
Reimplementado de QwtTextLabel.
void QwtLegendItem::pressed | ( | ) | [signal] |
Signal, when the legend item has been pressed.
void QwtLegendItem::released | ( | ) | [signal] |
Signal, when the legend item has been relased.
void QwtLegendItem::setChecked | ( | bool | on | ) | [slot] |
void QwtLegendItem::setCurvePen | ( | const QPen & | pen | ) |
void QwtLegendItem::setIdentfierWidth | ( | int | width | ) |
Set the width for the identifier Default is 8 pixels
width | New width |
void QwtLegendItem::setIdentifierMode | ( | int | mode | ) |
Set identifier mode. Default is ShowLine | ShowText.
mode | Or'd values of IdentifierMode |
void QwtLegendItem::setItemMode | ( | QwtLegend::LegendItemMode | mode | ) |
Set the item mode The default is QwtLegend::ReadOnlyItem
mode | Item mode |
void QwtLegendItem::setSpacing | ( | int | spacing | ) |
Change the spacing
spacing | Spacing |
void QwtLegendItem::setSymbol | ( | const QwtSymbol & | symbol | ) |
void QwtLegendItem::setText | ( | const QwtText & | text | ) | [virtual] |
Set the text to the legend item
text | Text label |
Reimplementado de QwtTextLabel.
QSize QwtLegendItem::sizeHint | ( | ) | const [virtual] |
Return a size hint.
Reimplementado de QwtTextLabel.
int QwtLegendItem::spacing | ( | ) | const |
Return the spacing
const QwtSymbol & QwtLegendItem::symbol | ( | ) | const |