• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeplasma-addons API Reference
  • KDE Home
  • Contact Us
 

liblancelot

  • Lancelot
  • Widget
Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Lancelot::Widget Class Reference

#include <Widget.h>

Inheritance diagram for Lancelot::Widget:
Inheritance graph
[legend]

Signals

void clicked ()
 
void mouseHoverEnter ()
 
void mouseHoverLeave ()
 
void pressed ()
 
void released ()
 

Public Member Functions

 Widget (QGraphicsItem *parent=0)
 
virtual ~Widget ()
 
Group * group () const
 
QString groupName () const
 
bool isDown () const
 
bool isHovered () const
 
virtual void setGroup (Group *group=NULL)
 
virtual void setGroupByName (const QString &groupName)
 

Protected Member Functions

L_Override void hideEvent (QHideEvent *event)
 
L_Override void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 
L_Override void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 
L_Override void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
L_Override void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
L_Override void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
void paintBackground (QPainter *painter)
 
void paintBackground (QPainter *painter, const QString &element)
 
void setDown (bool value)
 
void setHovered (bool value)
 
void setPaintBackwardsWhenRTL (bool value)
 
L_Override QSizeF sizeHint (Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const
 

Properties

bool down
 
QString group
 

Detailed Description

Base class for Widgets that want to use Lancelot framework.

Author
Ivan Cukic

Definition at line 37 of file Widget.h.

Constructor & Destructor Documentation

Lancelot::Widget::Widget ( QGraphicsItem *  parent = 0)

Creates a new Lancelot::Widget.

Parameters
parentparent item

Definition at line 46 of file Widget.cpp.

Lancelot::Widget::~Widget ( )
virtual

Destroys Lancelot::Widget.

Definition at line 54 of file Widget.cpp.

Member Function Documentation

void Lancelot::Widget::clicked ( )
signal

Emitted when the button is clicked.

You should use the activated() signal instead if you want to support other activation methods beside clicking.

Parameters
checkedtrue if the button is checked
Group* Lancelot::Widget::group ( ) const

Returns this widget's group.

QString Lancelot::Widget::groupName ( ) const
Returns
this widget's group's name.

Definition at line 126 of file Widget.cpp.

void Lancelot::Widget::hideEvent ( QHideEvent *  event)
protected

Definition at line 256 of file Widget.cpp.

void Lancelot::Widget::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 59 of file Widget.cpp.

void Lancelot::Widget::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Definition at line 71 of file Widget.cpp.

bool Lancelot::Widget::isDown ( ) const
Returns
whether the button is down

Definition at line 251 of file Widget.cpp.

bool Lancelot::Widget::isHovered ( ) const

Returns whether the mouse cursor is hovering the widget.

Definition at line 121 of file Widget.cpp.

void Lancelot::Widget::mouseHoverEnter ( )
signal

This signal is emitted when the mouse cursor enters the widget.

void Lancelot::Widget::mouseHoverLeave ( )
signal

This signal is emitted when the mouse cursor leaves the widget.

void Lancelot::Widget::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 98 of file Widget.cpp.

void Lancelot::Widget::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

Definition at line 110 of file Widget.cpp.

void Lancelot::Widget::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget = 0 
)
protected

Definition at line 150 of file Widget.cpp.

void Lancelot::Widget::paintBackground ( QPainter *  painter)
protected

Paints the widget background using the widget's SVG.

Element name is calculated according to widget's state

Parameters
painterpainter to paint on

Definition at line 158 of file Widget.cpp.

void Lancelot::Widget::paintBackground ( QPainter *  painter,
const QString &  element 
)
protected

Paints the widget background using the specified element from widget's SVG.

Parameters
painterpainter to paint on
elementelement to paint

Definition at line 174 of file Widget.cpp.

void Lancelot::Widget::pressed ( )
signal

This signal is emitted when the button is pressed down.

void Lancelot::Widget::released ( )
signal

This signal is emitted when the button is released.

void Lancelot::Widget::setDown ( bool  value)
protected

Sets whether the widget is down (pressed).

This function exists only as a hack if you need a way to artificially force this value.

Definition at line 92 of file Widget.cpp.

void Lancelot::Widget::setGroup ( Group *  group = NULL)
virtual

Sets this widget's group.

Parameters
groupnew group

Reimplemented in Lancelot::Panel, Lancelot::ExtenderButton, and Lancelot::PassagewayView.

Definition at line 139 of file Widget.cpp.

void Lancelot::Widget::setGroupByName ( const QString &  groupName)
virtual

Sets this widget's group by group name.

Parameters
groupNamename of the group

Definition at line 134 of file Widget.cpp.

void Lancelot::Widget::setHovered ( bool  value)
protected

Sets whether the widget is hovered.

This function exists only as a hack if you need a way to artificially force this value.

Definition at line 83 of file Widget.cpp.

void Lancelot::Widget::setPaintBackwardsWhenRTL ( bool  value)
protected

Definition at line 263 of file Widget.cpp.

QSizeF Lancelot::Widget::sizeHint ( Qt::SizeHint  which,
const QSizeF &  constraint = QSizeF() 
) const
protected

Definition at line 217 of file Widget.cpp.

Property Documentation

bool Lancelot::Widget::down
readwrite

Definition at line 41 of file Widget.h.

Group * Lancelot::Widget::group
readwrite

Definition at line 40 of file Widget.h.


The documentation for this class was generated from the following files:
  • Widget.h
  • Widget.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Mon Oct 13 2014 22:55:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

liblancelot

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

kdeplasma-addons API Reference

Skip menu "kdeplasma-addons API Reference"
  •     GroupingDesktop
  •   liblancelot

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal