Classes | Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
QwtLegendLabel Class Reference

A widget representing something on a QwtLegend. More...

#include <qwt_legend_label.h>

Inheritance diagram for QwtLegendLabel:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Slots

void setChecked (bool on)
 
- Public Slots inherited from QwtTextLabel
void clear ()
 Clear the text and all QwtText attributes. More...
 
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
 

Signals

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

Public Member Functions

const QwtLegendDatadata () const
 
QPixmap icon () const
 
bool isChecked () const
 Return true, if the item is checked. More...
 
QwtLegendData::Mode itemMode () const
 
 QwtLegendLabel (QWidget *parent=0)
 
void setData (const QwtLegendData &)
 
void setIcon (const QPixmap &)
 
void setItemMode (QwtLegendData::Mode)
 
void setSpacing (int spacing)
 Change the spacing between icon and text. More...
 
virtual void setText (const QwtText &) QWT_OVERRIDE
 
virtual QSize sizeHint () const QWT_OVERRIDE
 Return a size hint. More...
 
int spacing () const
 
virtual ~QwtLegendLabel ()
 Destructor. More...
 
- Public Member Functions inherited from QwtTextLabel
virtual void drawText (QPainter *, const QRectF &)
 Redraw the text. More...
 
virtual int heightForWidth (int) const QWT_OVERRIDE
 
int indent () const
 
int margin () const
 
virtual QSize minimumSizeHint () const QWT_OVERRIDE
 Return a minimum size hint. More...
 
QString plainText () const
 
 QwtTextLabel (const QwtText &, QWidget *parent=NULL)
 
 QwtTextLabel (QWidget *parent=NULL)
 
void setIndent (int)
 
void setMargin (int)
 
void setPlainText (const QString &)
 
const QwtTexttext () const
 Return the text. More...
 
QRect textRect () const
 
virtual ~QwtTextLabel ()
 Destructor. More...
 

Protected Member Functions

bool isDown () const
 Return true, if the item is down. More...
 
virtual void keyPressEvent (QKeyEvent *) QWT_OVERRIDE
 Handle key press events. More...
 
virtual void keyReleaseEvent (QKeyEvent *) QWT_OVERRIDE
 Handle key release events. More...
 
virtual void mousePressEvent (QMouseEvent *) QWT_OVERRIDE
 Handle mouse press events. More...
 
virtual void mouseReleaseEvent (QMouseEvent *) QWT_OVERRIDE
 Handle mouse release events. More...
 
virtual void paintEvent (QPaintEvent *) QWT_OVERRIDE
 Paint event. More...
 
void setDown (bool)
 Set the item being down. More...
 
- Protected Member Functions inherited from QwtTextLabel
virtual void drawContents (QPainter *)
 Redraw the text and focus indicator. More...
 

Private Attributes

PrivateDatam_data
 

Additional Inherited Members

- Properties inherited from QwtTextLabel
int indent
 Return label's text indent in pixels. More...
 
int margin
 Return label's text margin in pixels. More...
 
QString plainText
 

Detailed Description

A widget representing something on a QwtLegend.

Definition at line 22 of file qwt_legend_label.h.

Constructor & Destructor Documentation

◆ QwtLegendLabel()

QwtLegendLabel::QwtLegendLabel ( QWidget *  parent = 0)
explicit
Parameters
parentParent widget

Definition at line 92 of file qwt_legend_label.cpp.

◆ ~QwtLegendLabel()

QwtLegendLabel::~QwtLegendLabel ( )
virtual

Destructor.

Definition at line 101 of file qwt_legend_label.cpp.

Member Function Documentation

◆ checked

void QwtLegendLabel::checked ( bool  )
signal

Signal, when the legend item has been toggled.

◆ clicked

void QwtLegendLabel::clicked ( )
signal

Signal, when the legend item has been clicked.

◆ data()

const QwtLegendData & QwtLegendLabel::data ( ) const
Returns
Attributes of the label
See also
setData(), QwtPlotItem::legendData()

Definition at line 84 of file qwt_legend_label.cpp.

◆ icon()

QPixmap QwtLegendLabel::icon ( ) const
Returns
Pixmap representing a plot item
See also
setIcon()

Definition at line 180 of file qwt_legend_label.cpp.

◆ isChecked()

bool QwtLegendLabel::isChecked ( ) const

Return true, if the item is checked.

Definition at line 235 of file qwt_legend_label.cpp.

◆ isDown()

bool QwtLegendLabel::isDown ( ) const
protected

Return true, if the item is down.

Definition at line 265 of file qwt_legend_label.cpp.

◆ itemMode()

QwtLegendData::Mode QwtLegendLabel::itemMode ( ) const
Returns
Item mode
See also
setItemMode()

Definition at line 150 of file qwt_legend_label.cpp.

◆ keyPressEvent()

void QwtLegendLabel::keyPressEvent ( QKeyEvent *  e)
protectedvirtual

Handle key press events.

Definition at line 374 of file qwt_legend_label.cpp.

◆ keyReleaseEvent()

void QwtLegendLabel::keyReleaseEvent ( QKeyEvent *  e)
protectedvirtual

Handle key release events.

Definition at line 400 of file qwt_legend_label.cpp.

◆ mousePressEvent()

void QwtLegendLabel::mousePressEvent ( QMouseEvent *  e)
protectedvirtual

Handle mouse press events.

Definition at line 329 of file qwt_legend_label.cpp.

◆ mouseReleaseEvent()

void QwtLegendLabel::mouseReleaseEvent ( QMouseEvent *  e)
protectedvirtual

Handle mouse release events.

Definition at line 352 of file qwt_legend_label.cpp.

◆ paintEvent()

void QwtLegendLabel::paintEvent ( QPaintEvent *  e)
protectedvirtual

Paint event.

Reimplemented from QwtTextLabel.

Definition at line 286 of file qwt_legend_label.cpp.

◆ pressed

void QwtLegendLabel::pressed ( )
signal

Signal, when the legend item has been pressed.

◆ released

void QwtLegendLabel::released ( )
signal

Signal, when the legend item has been released.

◆ setChecked

void QwtLegendLabel::setChecked ( bool  on)
slot

Check/Uncheck a the item

Parameters
oncheck/uncheck
See also
setItemMode()

Definition at line 221 of file qwt_legend_label.cpp.

◆ setData()

void QwtLegendLabel::setData ( const QwtLegendData legendData)

Set the attributes of the legend label

Parameters
legendDataAttributes of the label
See also
data()

Definition at line 62 of file qwt_legend_label.cpp.

◆ setDown()

void QwtLegendLabel::setDown ( bool  down)
protected

Set the item being down.

Definition at line 241 of file qwt_legend_label.cpp.

◆ setIcon()

void QwtLegendLabel::setIcon ( const QPixmap &  icon)

Assign the icon

Parameters
iconPixmap representing a plot item
See also
icon(), QwtPlotItem::legendIcon()

Definition at line 162 of file qwt_legend_label.cpp.

◆ setItemMode()

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

Set the item mode The default is QwtLegendData::ReadOnly

Parameters
modeItem mode
See also
itemMode()

Definition at line 131 of file qwt_legend_label.cpp.

◆ setSpacing()

void QwtLegendLabel::setSpacing ( int  spacing)

Change the spacing between icon and text.

Parameters
spacingSpacing
See also
spacing(), QwtTextLabel::margin()

Definition at line 191 of file qwt_legend_label.cpp.

◆ setText()

void QwtLegendLabel::setText ( const QwtText text)
virtual

Set the text to the legend item

Parameters
textText label
See also
QwtTextLabel::text()

Reimplemented from QwtTextLabel.

Definition at line 113 of file qwt_legend_label.cpp.

◆ sizeHint()

QSize QwtLegendLabel::sizeHint ( ) const
virtual

Return a size hint.

Reimplemented from QwtTextLabel.

Definition at line 271 of file qwt_legend_label.cpp.

◆ spacing()

int QwtLegendLabel::spacing ( ) const
Returns
Spacing between icon and text
See also
setSpacing(), QwtTextLabel::margin()

Definition at line 210 of file qwt_legend_label.cpp.

Member Data Documentation

◆ m_data

PrivateData* QwtLegendLabel::m_data
private

Definition at line 74 of file qwt_legend_label.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:29