• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

Plasma

Plasma::ToolButton

Plasma::ToolButton Class Reference

Provides a plasma-themed QToolButton. More...

#include <Plasma/Widgets/ToolButton>

Inheritance diagram for Plasma::ToolButton:

Inheritance graph
[legend]

List of all members.


Signals

void clicked ()

Public Member Functions

bool autoRaise () const
QString image () const
QToolButton * nativeWidget () const
void setAutoRaise (bool raise)
void setImage (const QString &path)
void setStyleSheet (const QString &stylesheet)
void setText (const QString &text)
QString styleSheet ()
QString text () const
 ToolButton (QGraphicsWidget *parent=0)
 ~ToolButton ()

Protected Member Functions

void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
void resizeEvent (QGraphicsSceneResizeEvent *event)

Properties

bool autoRaise
QString image
QToolButton nativeWidget
QGraphicsWidget parentWidget
QString stylesheet
QString text

Detailed Description

Provides a plasma-themed QToolButton.

Definition at line 39 of file toolbutton.h.


Constructor & Destructor Documentation

Plasma::ToolButton::ToolButton ( QGraphicsWidget *  parent = 0  )  [explicit]

Definition at line 140 of file toolbutton.cpp.

Plasma::ToolButton::~ToolButton (  ) 

Definition at line 159 of file toolbutton.cpp.


Member Function Documentation

bool Plasma::ToolButton::autoRaise (  )  const

Returns:
true if the toolbutton has an autoraise behaviour

void Plasma::ToolButton::clicked (  )  [signal]

void Plasma::ToolButton::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event  )  [protected]

Definition at line 309 of file toolbutton.cpp.

void Plasma::ToolButton::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event  )  [protected]

Definition at line 329 of file toolbutton.cpp.

QString Plasma::ToolButton::image (  )  const

Returns:
the image path being displayed currently, or an empty string if none.

QToolButton* Plasma::ToolButton::nativeWidget (  )  const

Returns:
the native widget wrapped by this ToolButton

void Plasma::ToolButton::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
) [protected]

Definition at line 255 of file toolbutton.cpp.

void Plasma::ToolButton::resizeEvent ( QGraphicsSceneResizeEvent *  event  )  [protected]

Definition at line 232 of file toolbutton.cpp.

void Plasma::ToolButton::setAutoRaise ( bool  raise  ) 

Sets if the toolbutton has an autoraise behaviour.

  • raise

Definition at line 164 of file toolbutton.cpp.

void Plasma::ToolButton::setImage ( const QString &  path  ) 

Sets the path to an image to display.

  • path the path to the image; if a relative path, then a themed image will be loaded.

Definition at line 184 of file toolbutton.cpp.

void Plasma::ToolButton::setStyleSheet ( const QString &  stylesheet  ) 

Sets the stylesheet used to control the visual display of this ToolButton.

  • stylesheet a CSS string

Definition at line 217 of file toolbutton.cpp.

void Plasma::ToolButton::setText ( const QString &  text  ) 

Sets the display text for this ToolButton.

  • text the text to display; should be translated.

Definition at line 174 of file toolbutton.cpp.

QString Plasma::ToolButton::styleSheet (  ) 

Returns:
the stylesheet currently used with this widget

Definition at line 222 of file toolbutton.cpp.

QString Plasma::ToolButton::text (  )  const

Returns:
the display text


Property Documentation

bool Plasma::ToolButton::autoRaise [read, write]

Definition at line 45 of file toolbutton.h.

QString Plasma::ToolButton::image [read, write]

Definition at line 46 of file toolbutton.h.

QToolButton * Plasma::ToolButton::nativeWidget [read]

Definition at line 48 of file toolbutton.h.

QGraphicsWidget Plasma::ToolButton::parentWidget [read]

Definition at line 43 of file toolbutton.h.

QString Plasma::ToolButton::stylesheet [read, write]

Definition at line 47 of file toolbutton.h.

QString Plasma::ToolButton::text [read, write]

Definition at line 44 of file toolbutton.h.


The documentation for this class was generated from the following files:
  • toolbutton.h
  • toolbutton.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal