KRSqueezedTextLabel::KRSqueezedTextLabel(const QString &text , QWidget *parent, const char *name) : QLabel(parent, name) { setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); fullText = text; squeezeTextToLabel(); }
KSqueezedTextLabel::KSqueezedTextLabel(const QString &text , QWidget *parent) : QLabel (parent), d(new KSqueezedTextLabelPrivate) { setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed)); d->fullText = text; d->elideMode = Qt::ElideMiddle; squeezeTextToLabel(); }
void KRSqueezedTextLabel::setText(const QString &text) { fullText = text; squeezeTextToLabel(); }
void KRSqueezedTextLabel::resizeEvent(QResizeEvent *) { squeezeTextToLabel(); }
void SqueezedLabel::setText(const QString &text) { d->fullText = text; squeezeTextToLabel(); }
void SqueezedLabel::setTextElideMode(Qt::TextElideMode mode) { d->elideMode = mode; squeezeTextToLabel(); }