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

libplasma

Plasma::RadioButton

Plasma::RadioButton Class Reference

#include <radiobutton.h>

Inheritance diagram for Plasma::RadioButton:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class emulates a QRadioButton.

You will be able to add radio buttons as childrens of a QGraphicsItem, so only one radio button will be checked at a time. If you don't add them as siblings (adding all them as childrens of the same QGraphicsItem), then you can add them directly to a scene, where they will be siblings too. This way you can have groups of radio buttons.

Note:
Please before working with radio buttons, add them to a scene or as childrens of another QGraphicsItem.
Author:
Rafael Fernández López

Definition at line 52 of file radiobutton.h.


Public Slots

void dataUpdated (const QString &, const Plasma::DataEngine::Data &data)

Signals

void clicked ()

Public Member Functions

 RadioButton (QGraphicsItem *parent=0)
virtual ~RadioButton ()
QRectF boundingRect () const
void paintWidget (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
bool isChecked () const
const QString & text () const
void setChecked (bool checked)
void setText (const QString &text)

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
virtual void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event)

Properties

QString text
bool checked

Constructor & Destructor Documentation

Plasma::RadioButton::RadioButton ( QGraphicsItem *  parent = 0  ) 

End Private section ==========================.

Definition at line 65 of file radiobutton.cpp.

Plasma::RadioButton::~RadioButton (  )  [virtual]

Definition at line 73 of file radiobutton.cpp.


Member Function Documentation

QRectF Plasma::RadioButton::boundingRect (  )  const [virtual]

Set the font for this widget.

Parameters:
font the new font
TODO: implement once we decide how to handle the font system void setFont(const QFont& font); Reimplemented from QGraphicsItem
Returns:
the bounding rectangle for this Plasma::Widget

Reimplemented from Plasma::Widget.

Definition at line 78 of file radiobutton.cpp.

void Plasma::RadioButton::paintWidget ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
) [virtual]

Paints the widget.

Parameters:
painter the QPainter to use to paint.
option the style option used to give specific info on the item being dawn.
widget the parent QWidget (most likely the Corona)

Reimplemented from Plasma::Widget.

Definition at line 83 of file radiobutton.cpp.

bool Plasma::RadioButton::isChecked (  )  const

Definition at line 98 of file radiobutton.cpp.

const QString& Plasma::RadioButton::text (  )  const

void Plasma::RadioButton::setChecked ( bool  checked  ) 

Definition at line 108 of file radiobutton.cpp.

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

Definition at line 146 of file radiobutton.cpp.

void Plasma::RadioButton::dataUpdated ( const QString &  ,
const Plasma::DataEngine::Data &  data 
) [slot]

Definition at line 152 of file radiobutton.cpp.

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

void Plasma::RadioButton::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 165 of file radiobutton.cpp.

void Plasma::RadioButton::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 172 of file radiobutton.cpp.

void Plasma::RadioButton::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 185 of file radiobutton.cpp.

void Plasma::RadioButton::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 192 of file radiobutton.cpp.

void Plasma::RadioButton::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 199 of file radiobutton.cpp.

void Plasma::RadioButton::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event  )  [protected, virtual]

Reimplemented from QGraphicsItem.

Definition at line 207 of file radiobutton.cpp.


Property Documentation

const QString & Plasma::RadioButton::text [read, write]

Definition at line 55 of file radiobutton.h.

bool Plasma::RadioButton::checked [read, write]

Definition at line 56 of file radiobutton.h.


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

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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