SpectraPac 2.0(r200)
Evaluates PAC Measurements
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends

QxtLabel Class Reference

The QxtLabel widget is a label which is able to show elided and rotated plain text. More...

#include <qxtlabel.h>

List of all members.

Public Slots

void setText (const QString &text)

Signals

void clicked ()
void textChanged (const QString &text)

Public Member Functions

 QxtLabel (QWidget *parent=0, Qt::WindowFlags flags=0)
 QxtLabel (const QString &text, QWidget *parent=0, Qt::WindowFlags flags=0)
virtual ~QxtLabel ()
QString text () const
Qt::Alignment alignment () const
void setAlignment (Qt::Alignment alignment)
Qt::TextElideMode elideMode () const
void setElideMode (Qt::TextElideMode mode)
Qxt::Rotation rotation () const
void setRotation (Qxt::Rotation rotation)
virtual QSize sizeHint () const
virtual QSize minimumSizeHint () const

Protected Member Functions

virtual void changeEvent (QEvent *event)
virtual void mousePressEvent (QMouseEvent *event)
virtual void mouseReleaseEvent (QMouseEvent *event)
virtual void paintEvent (QPaintEvent *event)

Properties

QString text
 the text of the label
Qt::Alignment alignment
 the alignment of the text
Qt::TextElideMode elideMode
 the elide mode of the text
Qxt::Rotation rotation
 the rotation of the label

Friends

class QxtLabelPrivate

Detailed Description

The QxtLabel widget is a label which is able to show elided and rotated plain text.

QxtLabel is a label which is able to show elided and rotated plain text. In addition, QxtLabel provides a signal for clicking.

Usage:

    QxtLabel* label = new QxtLabel(tr("Hello, World!"), this);
    label->setAlignment(Qt::AlignLeft | Qt::AlignVCenter);
    label->setElideMode(Qt::ElideRight);
    label->setRotation(Qxt::CounterClockwise);
    connect(label, SIGNAL(clicked()), this, SLOT(labelClicked()));
See also:
QLabel

Constructor & Destructor Documentation

QxtLabel::QxtLabel ( QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
) [explicit]

Constructs a new QxtLabel with parent and flags.

QxtLabel::QxtLabel ( const QString &  text,
QWidget *  parent = 0,
Qt::WindowFlags  flags = 0 
) [explicit]

Constructs a new QxtLabel with text, parent and flags.

QxtLabel::~QxtLabel ( ) [virtual]

Destructs the label.


Member Function Documentation

Qt::Alignment QxtLabel::alignment ( ) const
void QxtLabel::changeEvent ( QEvent *  event) [protected, virtual]
QxtLabel::clicked ( ) [signal]

This signal is emitted whenever the label has been clicked.

{Note:} A combination of mouse button press and release in shorter time than QApplication::doubleClickInterval is considered as a click.

See also:
QApplication::doubleClickInterval
Qt::TextElideMode QxtLabel::elideMode ( ) const
QSize QxtLabel::minimumSizeHint ( ) const [virtual]
void QxtLabel::mousePressEvent ( QMouseEvent *  event) [protected, virtual]
void QxtLabel::mouseReleaseEvent ( QMouseEvent *  event) [protected, virtual]
void QxtLabel::paintEvent ( QPaintEvent *  event) [protected, virtual]
Qxt::Rotation QxtLabel::rotation ( ) const
void QxtLabel::setAlignment ( Qt::Alignment  alignment)
void QxtLabel::setElideMode ( Qt::TextElideMode  mode)
void QxtLabel::setRotation ( Qxt::Rotation  rotation)
void QxtLabel::setText ( const QString &  text) [slot]
QSize QxtLabel::sizeHint ( ) const [virtual]
QString QxtLabel::text ( ) const
QxtLabel::textChanged ( const QString &  text) [signal]

This signal is emitted whenever the text has changed.


Friends And Related Function Documentation

friend class QxtLabelPrivate [friend]

Property Documentation

Qt::Alignment QxtLabel::alignment [read, write]

the alignment of the text

The text is aligned according to this property. The default value is Qt::AlignCenter.

See also:
text, Qt::Alignment
Qt::TextElideMode QxtLabel::elideMode [read, write]

the elide mode of the text

The text is elided according to this property. The default value is Qt::ElideMiddle.

See also:
text, Qt::TextElideMode
Qxt::Rotation QxtLabel::rotation [read, write]

the rotation of the label

The label is rotated according to this property. The default value is Qxt::NoRotation.

See also:
Qxt::Rotation
QString QxtLabel::text [read, write]

the text of the label


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines