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

libplasma

Plasma::CheckBox

Plasma::CheckBox Class Reference

#include <checkbox.h>

Inheritance diagram for Plasma::CheckBox:

Inheritance graph
[legend]

List of all members.


Detailed Description

This class provides a QCheckBox available as a Plasma::Widget, so it can be used within Plasma::Applet's.

Author:
Siraj Razick <siraj@kde.org>

Definition at line 41 of file checkbox.h.


Public Slots

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

Signals

void clicked ()

Public Member Functions

 CheckBox (QGraphicsItem *parent=0)
 CheckBox (const QString &text, QGraphicsItem *parent=0)
virtual ~CheckBox ()
bool isChecked () const
void setChecked (bool checked)
Qt::CheckState checkState () const
void setCheckState (Qt::CheckState state)
QString text () const
void setText (const QString &text)

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event)
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
void paintWidget (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)

Constructor & Destructor Documentation

Plasma::CheckBox::CheckBox ( QGraphicsItem *  parent = 0  )  [explicit]

Creates a new Plasma::CheckBox.

Parameters:
parent the QGraphicsItem this icon is parented to.

Definition at line 55 of file checkbox.cpp.

Plasma::CheckBox::CheckBox ( const QString &  text,
QGraphicsItem *  parent = 0 
) [explicit]

Creates a new Plasma::Icon with default text.

Parameters:
text the text to display next to the checkbox.
parent the QGraphicsItem this icon is parented to.

Definition at line 63 of file checkbox.cpp.

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

Destroys a Plasma::Icon.

Definition at line 93 of file checkbox.cpp.


Member Function Documentation

bool Plasma::CheckBox::isChecked (  )  const

Returns:
whether this checkbox is currently checked.

Definition at line 161 of file checkbox.cpp.

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

Sets the checked state of this Plasma::CheckBox.

Parameters:
checked whether the Plasma::CheckBox is checked or not.

Definition at line 156 of file checkbox.cpp.

Qt::CheckState Plasma::CheckBox::checkState (  )  const

Returns:
the checkstate of this Plasma::CheckBox.

Definition at line 151 of file checkbox.cpp.

void Plasma::CheckBox::setCheckState ( Qt::CheckState  state  ) 

Sets the checkstate of this Plasma::CheckBox.

See also:
<qt.h> for definition of Qt::CheckState
Parameters:
state the checkstate of this Plasma::CheckBox

Definition at line 166 of file checkbox.cpp.

QString Plasma::CheckBox::text (  )  const

Returns:
the text associated with this Plasma::CheckBox

Definition at line 146 of file checkbox.cpp.

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

Sets the text associated with this Plasma::CheckBox.

Parameters:
text the text to associate with this Plasma::CheckBox.

Definition at line 132 of file checkbox.cpp.

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

Definition at line 122 of file checkbox.cpp.

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

Indicates that this Plasma::CheckBox has been clicked, changing its state.

void Plasma::CheckBox::mousePressEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Reimplemented from QGraphicsItem.

Definition at line 177 of file checkbox.cpp.

void Plasma::CheckBox::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Reimplemented from QGraphicsItem.

Definition at line 184 of file checkbox.cpp.

void Plasma::CheckBox::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event  )  [protected]

Reimplemented from QGraphicsItem.

Definition at line 171 of file checkbox.cpp.

void Plasma::CheckBox::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event  )  [protected]

Reimplemented from QGraphicsItem.

Definition at line 204 of file checkbox.cpp.

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

Reimplemented from QGraphicsItem.

Definition at line 212 of file checkbox.cpp.

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

Reimplemented from QGraphicsItem.

Definition at line 220 of file checkbox.cpp.

void Plasma::CheckBox::paintWidget ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
) [protected, 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 98 of file checkbox.cpp.


The documentation for this class was generated from the following files:
  • checkbox.h
  • checkbox.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