Plasma
toolbutton.cpp
Go to the documentation of this file.
349 if (button->isEnabled() && (animationState || !button->autoRaise() || d->underMouse || (buttonOpt.state & QStyle::State_On) || button->isChecked() || button->isDown())) {
369 buttonOpt.palette.setColor(QPalette::ButtonText, KColorUtils::mix(Plasma::Theme::defaultTheme()->color(Plasma::Theme::ButtonTextColor), Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor), 1-d->opacity));
372 buttonOpt.palette.setColor(QPalette::ButtonText, Plasma::Theme::defaultTheme()->color(Plasma::Theme::ButtonTextColor));
376 buttonOpt.palette.setColor(QPalette::ButtonText, Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor));
QString image() 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 setText(const QString &text)
Sets the display text for this ToolButton.
Definition: toolbutton.cpp:221
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition: toolbutton.cpp:439
QToolButton * nativeWidget() const
void resizeEvent(QGraphicsSceneResizeEvent *event)
Definition: toolbutton.cpp:306
void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Definition: toolbutton.cpp:385
void setAction(QAction *action)
Associate an action with this IconWidget this makes the button follow the state of the action...
Definition: toolbutton.cpp:201
bool autoRaise() const
QAction * action() const
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition: toolbutton.cpp:329
the text color to be used by items resting on the background
Definition: theme.h:63
QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
Definition: toolbutton.cpp:450
QScriptValue animation(const QString &anim)
Definition: animationscriptengine.cpp:55
void setStyleSheet(const QString &stylesheet)
Sets the stylesheet used to control the visual display of this ToolButton.
Definition: toolbutton.cpp:291
void released()
void setAutoRaise(bool raise)
Sets if the toolbutton has an autoraise behaviour.
Definition: toolbutton.cpp:211
Definition: theme.h:67
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Definition: toolbutton.cpp:406
void setImage(const QString &path)
Sets the path to an image to display.
Definition: toolbutton.cpp:232
void pressed()
void clicked()
QString styleSheet()
QString text() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:34 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.