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
 
int indent () const
 
int margin () const
 
virtual QSize minimumSizeHint () const
 Return a minimum size hint. More...
 
QString plainText () const
 
 QwtTextLabel (QWidget *parent=NULL)
 
 QwtTextLabel (const QwtText &, QWidget *parent=NULL)
 
void setIndent (int)
 
void setMargin (int)
 
void setPlainText (const QString &)
 
virtual QSize sizeHint () const
 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 *e)
 

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

PrivateDatad_data
 

Detailed Description

A Widget which displays a QwtText.

Definition at line 25 of file qwt_text_label.h.

Constructor & Destructor Documentation

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

Constructs an empty label.

Parameters
parentParent widget

Definition at line 37 of file qwt_text_label.cpp.

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

Constructs a label that displays the text, text

Parameters
parentParent widget
textText

Definition at line 48 of file qwt_text_label.cpp.

QwtTextLabel::~QwtTextLabel ( )
virtual

Destructor.

Definition at line 56 of file qwt_text_label.cpp.

Member Function Documentation

void QwtTextLabel::clear ( )
slot

Clear the text and all QwtText attributes.

Definition at line 122 of file qwt_text_label.cpp.

int QwtTextLabel::defaultIndent ( ) const
private

Definition at line 330 of file qwt_text_label.cpp.

void QwtTextLabel::drawContents ( QPainter *  painter)
protectedvirtual

Redraw the text and focus indicator.

Definition at line 257 of file qwt_text_label.cpp.

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

Redraw the text.

Definition at line 279 of file qwt_text_label.cpp.

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

Definition at line 208 of file qwt_text_label.cpp.

int QwtTextLabel::indent ( ) const
void QwtTextLabel::init ( )
private

Definition at line 61 of file qwt_text_label.cpp.

int QwtTextLabel::margin ( ) const
QSize QwtTextLabel::minimumSizeHint ( ) const
virtual

Return a minimum size hint.

Definition at line 176 of file qwt_text_label.cpp.

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.

QString QwtTextLabel::plainText ( ) const
void QwtTextLabel::setIndent ( int  indent)

Set label's text indent in pixels

Parameters
indentIndentation in pixels

Definition at line 140 of file qwt_text_label.cpp.

void QwtTextLabel::setMargin ( int  margin)

Set label's margin in pixels

Parameters
marginMargin in pixels

Definition at line 161 of file qwt_text_label.cpp.

void QwtTextLabel::setPlainText ( const QString &  text)

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

See also
plainText()

Definition at line 71 of file qwt_text_label.cpp.

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 94 of file qwt_text_label.cpp.

void QwtTextLabel::setText ( const QwtText text)
virtualslot

Change the label's text

Parameters
textNew text

Reimplemented in QwtLegendLabel.

Definition at line 107 of file qwt_text_label.cpp.

QSize QwtTextLabel::sizeHint ( ) const
virtual

Return a size hint.

Reimplemented in QwtLegendLabel.

Definition at line 170 of file qwt_text_label.cpp.

const QwtText & QwtTextLabel::text ( ) const

Return the text.

Definition at line 116 of file qwt_text_label.cpp.

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

PrivateData* QwtTextLabel::d_data
private

Definition at line 73 of file qwt_text_label.h.

Property Documentation

int QwtTextLabel::indent
readwrite

Return label's text indent in pixels.

Definition at line 29 of file qwt_text_label.h.

int QwtTextLabel::margin
readwrite

Return label's text margin in pixels.

Definition at line 30 of file qwt_text_label.h.

QString QwtTextLabel::plainText
readwrite

Interface for the designer plugin

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

Definition at line 31 of file qwt_text_label.h.


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


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:19