Plasma
label.cpp
Go to the documentation of this file.
177 nativeWidget()->setTextInteractionFlags(Qt::LinksAccessibleByMouse | Qt::LinksAccessibleByKeyboard);
279 if (native->wordWrap() || native->text().isEmpty() || size().width() >= fm.width(native->text())) {
virtual void updateGeometry()
bool canConvert(Type t) const
Q_INVOKABLE QString imagePath(const QString &name) const
Retrieve the path for an SVG image in the current theme.
Definition: theme.cpp:794
void setStyleSheet(const QString &styleSheet)
QString image() const
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
bool end()
void setCursor(const QCursor &)
Label(QGraphicsWidget *parent=0)
Constructs a label with word wrap on by default.
Definition: label.cpp:94
void setCompositionMode(CompositionMode mode)
void fill(const QColor &color)
void setColorAt(qreal position, const QColor &color)
void dataUpdated(const QString &sourceName, const Plasma::DataEngine::Data &data)
Definition: label.cpp:223
void setAttribute(Qt::WidgetAttribute attribute, bool on)
void setAlignment(QFlags< Qt::AlignmentFlag >)
void setWordWrap(bool wrap)
Sets if the text of the label can wrap in multiple lines.
Definition: label.cpp:198
QString join(const QString &separator) const
void setScaledContents(bool scaled)
Scale or not the contents of the label to the label size.
Definition: label.cpp:162
void resizeEvent(QGraphicsSceneResizeEvent *event)
Definition: label.cpp:248
typedef Alignment
void setWindowIcon(const QIcon &icon)
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value)
QSizeF size() const
void drawRect(const QRectF &rectangle)
virtual void resizeEvent(QGraphicsSceneResizeEvent *event)
QString styleSheet()
virtual void changeEvent(QEvent *event)
QCursor cursor() const
void setPen(const QColor &color)
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: label.cpp:271
void drawPixmap(const QRectF &target, const QPixmap &pixmap, const QRectF &source)
bool isEmpty() const
bool sendEvent(QObject *receiver, QEvent *event)
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
void setBrush(const QBrush &brush)
void setStyleSheet(const QString &stylesheet)
Sets the stylesheet used to control the visual display of this Label.
Definition: label.cpp:208
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event)
Definition: label.cpp:237
void mouseMoveEvent(QGraphicsSceneMouseEvent *event)
Definition: label.cpp:264
text
bool hasScaledContents() const
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
Definition: label.cpp:339
void setFinalStop(const QPointF &stop)
bool contains(QChar ch, Qt::CaseSensitivity cs) const
font
int width(const QString &text, int len) const
bool isRelativePath(const QString &path)
QLabel * nativeWidget() const
void linkHovered(const QString &link)
void setTextInteractionFlags(QFlags< Qt::TextInteractionFlag > flags)
void mousePressEvent(QGraphicsSceneMouseEvent *event)
Definition: label.cpp:254
void setWindowFlags(QFlags< Qt::WindowType > type)
QPoint toPoint() const
QString text() const
bool textSelectable() const
void setAlignment(Qt::Alignment alignment)
Sets the alignment for the text.
Definition: label.cpp:188
QWidget * widget() const
void setStart(const QPointF &start)
QSizePolicy sizePolicy() const
void linkActivated(const QString &link)
bool wordWrap() const
QRectF contentsRect() const
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event)
Qt::Alignment alignment() const
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition: label.cpp:330
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QRect rect() const
QString toString() const
void setWordWrap(bool on)
qreal width() const
QPointF start() const
void setTextSelectable(bool enable)
Set if the text on the label can be selected with the mouse.
Definition: label.cpp:172
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
virtual bool event(QEvent *event)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:12 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.