Classes | Public Slots | Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
QwtTextLabel Class Reference

A Widget which displays a QwtText. More...

#include <qwt_text_label.h>

Inheritance diagram for QwtTextLabel:
Inheritance graph
[legend]

Classes

class  PrivateData
 

Public Slots

void clear ()
 Clear the text and all QwtText attributes. More...
 
void setText (const QString &, QwtText::TextFormat textFormat=QwtText::AutoText)
 
virtual void setText (const QwtText &)
 

Public Member Functions

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 &)
 
virtual QSize sizeHint () const QWT_OVERRIDE
 Return a size hint. More...
 
const QwtTexttext () const
 Return the text. More...
 
QRect textRect () const
 
virtual ~QwtTextLabel ()
 Destructor. More...
 

Protected Member Functions

virtual void drawContents (QPainter *)
 Redraw the text and focus indicator. More...
 
virtual void paintEvent (QPaintEvent *) QWT_OVERRIDE
 

Properties

int indent
 Return label's text indent in pixels. More...
 
int margin
 Return label's text margin in pixels. More...
 
QString plainText
 

Private Member Functions

int defaultIndent () const
 
void init ()
 

Private Attributes

PrivateDatam_data
 

Detailed Description

A Widget which displays a QwtText.

Definition at line 26 of file qwt_text_label.h.

Constructor & Destructor Documentation

◆ QwtTextLabel() [1/2]

QwtTextLabel::QwtTextLabel ( QWidget *  parent = NULL)
explicit

Constructs an empty label.

Parameters
parentParent widget

Definition at line 39 of file qwt_text_label.cpp.

◆ QwtTextLabel() [2/2]

QwtTextLabel::QwtTextLabel ( const QwtText text,
QWidget *  parent = NULL 
)
explicit

Constructs a label that displays the text, text

Parameters
parentParent widget
textText

Definition at line 50 of file qwt_text_label.cpp.

◆ ~QwtTextLabel()

QwtTextLabel::~QwtTextLabel ( )
virtual

Destructor.

Definition at line 58 of file qwt_text_label.cpp.

Member Function Documentation

◆ clear

void QwtTextLabel::clear ( )
slot

Clear the text and all QwtText attributes.

Definition at line 124 of file qwt_text_label.cpp.

◆ defaultIndent()

int QwtTextLabel::defaultIndent ( ) const
private

Definition at line 330 of file qwt_text_label.cpp.

◆ drawContents()

void QwtTextLabel::drawContents ( QPainter *  painter)
protectedvirtual

Redraw the text and focus indicator.

Definition at line 257 of file qwt_text_label.cpp.

◆ drawText()

void QwtTextLabel::drawText ( QPainter *  painter,
const QRectF &  textRect 
)
virtual

Redraw the text.

Definition at line 279 of file qwt_text_label.cpp.

◆ heightForWidth()

int QwtTextLabel::heightForWidth ( int  width) const
virtual
Parameters
widthWidth
Returns
Preferred height for this widget, given the width.

Definition at line 209 of file qwt_text_label.cpp.

◆ indent()

int QwtTextLabel::indent ( ) const

◆ init()

void QwtTextLabel::init ( )
private

Definition at line 63 of file qwt_text_label.cpp.

◆ margin()

int QwtTextLabel::margin ( ) const

◆ minimumSizeHint()

QSize QwtTextLabel::minimumSizeHint ( ) const
virtual

Return a minimum size hint.

Definition at line 178 of file qwt_text_label.cpp.

◆ paintEvent()

void QwtTextLabel::paintEvent ( QPaintEvent *  event)
protectedvirtual

Qt paint event

Parameters
eventPaint event

Reimplemented in QwtLegendLabel.

Definition at line 236 of file qwt_text_label.cpp.

◆ plainText()

QString QwtTextLabel::plainText ( ) const

◆ setIndent()

void QwtTextLabel::setIndent ( int  indent)

Set label's text indent in pixels

Parameters
indentIndentation in pixels

Definition at line 142 of file qwt_text_label.cpp.

◆ setMargin()

void QwtTextLabel::setMargin ( int  margin)

Set label's margin in pixels

Parameters
marginMargin in pixels

Definition at line 163 of file qwt_text_label.cpp.

◆ setPlainText()

void QwtTextLabel::setPlainText ( const QString &  text)

Interface for the designer plugin - does the same as setText()

See also
plainText()

Definition at line 73 of file qwt_text_label.cpp.

◆ setText [1/2]

void QwtTextLabel::setText ( const QString &  text,
QwtText::TextFormat  textFormat = QwtText::AutoText 
)
slot

Change the label's text, keeping all other QwtText attributes

Parameters
textNew text
textFormatFormat of text
See also
QwtText

Definition at line 96 of file qwt_text_label.cpp.

◆ setText [2/2]

void QwtTextLabel::setText ( const QwtText text)
virtualslot

Change the label's text

Parameters
textNew text

Reimplemented in QwtLegendLabel.

Definition at line 109 of file qwt_text_label.cpp.

◆ sizeHint()

QSize QwtTextLabel::sizeHint ( ) const
virtual

Return a size hint.

Reimplemented in QwtLegendLabel.

Definition at line 172 of file qwt_text_label.cpp.

◆ text()

const QwtText & QwtTextLabel::text ( ) const

Return the text.

Definition at line 118 of file qwt_text_label.cpp.

◆ textRect()

QRect QwtTextLabel::textRect ( ) const

Calculate geometry for the text in widget coordinates

Returns
Geometry for the text

Definition at line 288 of file qwt_text_label.cpp.

Member Data Documentation

◆ m_data

PrivateData* QwtTextLabel::m_data
private

Definition at line 74 of file qwt_text_label.h.

Property Documentation

◆ indent

int QwtTextLabel::indent
readwrite

Return label's text indent in pixels.

Definition at line 30 of file qwt_text_label.h.

◆ margin

int QwtTextLabel::margin
readwrite

Return label's text margin in pixels.

Definition at line 31 of file qwt_text_label.h.

◆ plainText

QString QwtTextLabel::plainText
readwrite

Interface for the designer plugin

Returns
Text as plain text
See also
setPlainText(), text()

Definition at line 32 of file qwt_text_label.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51