QWT API (English) 7.0.1
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | List of all members
QwtLegendLabel Class Reference

A widget representing an item on a QwtLegend. More...

#include <qwt_legend_label.h>

Inheritance diagram for QwtLegendLabel:
QwtTextLabel

Classes

class  PrivateData
 

Public Slots

void setChecked (bool on)
 Check/Uncheck the item.
 
- Public Slots inherited from QwtTextLabel
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
 Change the label's text, keeping all other QwtText attributes.
 
void clear ()
 Clear the text and all QwtText attributes.
 

Signals

void clicked ()
 Signal emitted when the legend item has been clicked .
 
void pressed ()
 Signal emitted when the legend item has been pressed .
 
void released ()
 Signal emitted when the legend item has been released .
 
void checked (bool)
 Signal emitted when the legend item has been toggled.
 

Public Member Functions

 QwtLegendLabel (QWidget *parent=0)
 Constructor for QwtLegendLabel.
 
virtual ~QwtLegendLabel ()
 Destructor .
 
void setData (const QwtLegendData &)
 Set the attributes of the legend label.
 
const QwtLegendDatadata () const
 Return the attributes of the label.
 
void setItemMode (QwtLegendData::Mode)
 Set the item mode.
 
QwtLegendData::Mode itemMode () const
 Return the item mode.
 
void setSpacing (int spacing)
 Change the spacing between icon and text.
 
int spacing () const
 Return the spacing between icon and text.
 
virtual void setText (const QwtText &) override
 Set the text to the legend item.
 
void setIcon (const QPixmap &)
 Assign the icon.
 
QPixmap icon () const
 Return the pixmap representing a plot item.
 
virtual QSize sizeHint () const override
 Return a size hint.
 
bool isChecked () const
 Return true if the item is checked.
 
- Public Member Functions inherited from QwtTextLabel
 QwtTextLabel (QWidget *parent=nullptr)
 Constructs an empty label.
 
 QwtTextLabel (const QwtText &, QWidget *parent=nullptr)
 Constructs a label that displays the text.
 
virtual ~QwtTextLabel ()
 Destructor .
 
void setPlainText (const QString &)
 Interface for the designer plugin - does the same as setText()
 
QString plainText () const
 Interface for the designer plugin.
 
const QwtTexttext () const
 Return the text.
 
int indent () const
 Return label's text indent in pixels.
 
void setIndent (int)
 Set label's text indent in pixels.
 
int margin () const
 Return label's margin in pixels.
 
void setMargin (int)
 Set label's margin in pixels.
 
virtual QSize minimumSizeHint () const override
 Return a minimum size hint.
 
virtual int heightForWidth (int) const override
 Return the preferred height for a given width.
 
QRect textRect () const
 Calculate geometry for the text in widget coordinates.
 
virtual void drawText (QPainter *, const QRectF &)
 Redraw the text.
 

Protected Member Functions

void setDown (bool)
 Set whether the button is down (English only)
 
bool isDown () const
 Return whether the button is down (English only)
 
virtual void paintEvent (QPaintEvent *) override
 Handle paint events (English only)
 
virtual void mousePressEvent (QMouseEvent *) override
 Handle mouse press events (English only)
 
virtual void mouseReleaseEvent (QMouseEvent *) override
 Handle mouse release events (English only)
 
virtual void keyPressEvent (QKeyEvent *) override
 Handle key press events (English only)
 
virtual void keyReleaseEvent (QKeyEvent *) override
 Handle key release events (English only)
 
- Protected Member Functions inherited from QwtTextLabel
virtual void drawContents (QPainter *)
 Draw the contents.
 

Additional Inherited Members

- Properties inherited from QwtTextLabel
int indent
 
int margin
 
QString plainText
 

Detailed Description

A widget representing an item on a QwtLegend.

Constructor & Destructor Documentation

◆ QwtLegendLabel()

QwtLegendLabel::QwtLegendLabel ( QWidget *  parent = 0)
explicit

Constructor for QwtLegendLabel.

◆ ~QwtLegendLabel()

QwtLegendLabel::~QwtLegendLabel ( )
virtual

Destructor .

Member Function Documentation

◆ checked

void QwtLegendLabel::checked ( bool  )
signal

Signal emitted when the legend item has been toggled.

◆ clicked

void QwtLegendLabel::clicked ( )
signal

Signal emitted when the legend item has been clicked .

◆ data()

const QwtLegendData & QwtLegendLabel::data ( ) const

Return the attributes of the label.

◆ icon()

QPixmap QwtLegendLabel::icon ( ) const

Return the pixmap representing a plot item.

◆ isChecked()

bool QwtLegendLabel::isChecked ( ) const

Return true if the item is checked.

◆ isDown()

bool QwtLegendLabel::isDown ( ) const
protected

Return whether the button is down (English only)

Return true, if the item is down.

◆ itemMode()

QwtLegendData::Mode QwtLegendLabel::itemMode ( ) const

Return the item mode.

◆ keyPressEvent()

void QwtLegendLabel::keyPressEvent ( QKeyEvent *  e)
overrideprotectedvirtual

Handle key press events (English only)

Handle key press events.

◆ keyReleaseEvent()

void QwtLegendLabel::keyReleaseEvent ( QKeyEvent *  e)
overrideprotectedvirtual

Handle key release events (English only)

Handle key release events.

◆ mousePressEvent()

void QwtLegendLabel::mousePressEvent ( QMouseEvent *  e)
overrideprotectedvirtual

Handle mouse press events (English only)

Handle mouse press events.

◆ mouseReleaseEvent()

void QwtLegendLabel::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotectedvirtual

Handle mouse release events (English only)

Handle mouse release events.

◆ paintEvent()

void QwtLegendLabel::paintEvent ( QPaintEvent *  e)
overrideprotectedvirtual

Handle paint events (English only)

Paint event.

Reimplemented from QwtTextLabel.

◆ pressed

void QwtLegendLabel::pressed ( )
signal

Signal emitted when the legend item has been pressed .

◆ released

void QwtLegendLabel::released ( )
signal

Signal emitted when the legend item has been released .

◆ setChecked

void QwtLegendLabel::setChecked ( bool  on)
slot

Check/Uncheck the item.

◆ setData()

void QwtLegendLabel::setData ( const QwtLegendData legendData)

Set the attributes of the legend label.

◆ setDown()

void QwtLegendLabel::setDown ( bool  down)
protected

Set whether the button is down (English only)

Set the item being down.

◆ setIcon()

void QwtLegendLabel::setIcon ( const QPixmap &  icon)

Assign the icon.

◆ setItemMode()

void QwtLegendLabel::setItemMode ( QwtLegendData::Mode  mode)

Set the item mode.

◆ setSpacing()

void QwtLegendLabel::setSpacing ( int  spacing)

Change the spacing between icon and text.

◆ setText()

void QwtLegendLabel::setText ( const QwtText text)
overridevirtual

Set the text to the legend item.

Reimplemented from QwtTextLabel.

◆ sizeHint()

QSize QwtLegendLabel::sizeHint ( ) const
overridevirtual

Return a size hint.

Reimplemented from QwtTextLabel.

◆ spacing()

int QwtLegendLabel::spacing ( ) const

Return the spacing between icon and text.


The documentation for this class was generated from the following files: