libopie API Documentation

OClickableLabel Class Reference

This class is a special QLabel which can behave as a QPushButton or QToggleButton. A Label behaving as button. More...

#include <oclickablelabel.h>

Inheritance diagram for OClickableLabel:

Inheritance graph
[legend]
Collaboration diagram for OClickableLabel:

Collaboration graph
[legend]
List of all members.

Public Slots

void setOn (bool on)

Signals

void clicked ()
 emitted when the labels gets clicked

void toggled (bool on)
 emitted when the labels gets toggled


Public Member Functions

 OClickableLabel (QWidget *parent=0, const char *name=0, WFlags fl=0)
 This constructs the clickable ButtonLabel.

void setToggleButton (bool t)
 This method makes the label behave as a toggle button.


Protected Member Functions

void mousePressEvent (QMouseEvent *e)
void mouseReleaseEvent (QMouseEvent *e)
void mouseMoveEvent (QMouseEvent *e)

Detailed Description

This class is a special QLabel which can behave as a QPushButton or QToggleButton. A Label behaving as button.

The reason to use a clickable is if you want to save space or you want to skip the border of a normal button

QLabel* lbl = new OClickableLabel( parent, "PushLabel" ); lbl->setPixmap( "config" ); QWhatsThis::add( lbl, tr("Click here to do something") );

Author:
Hakan Ardo, Maximillian Reiß ( harlekin@handhelds.org )
See also:
QLabel

QPushButton

QToggleButton

Version:
1.0

Definition at line 26 of file oclickablelabel.h.


Constructor & Destructor Documentation

OClickableLabel::OClickableLabel QWidget parent = 0,
const char *  name = 0,
WFlags  fl = 0
 

This constructs the clickable ButtonLabel.

Parameters:
parent The parent of this label
name A name of this label
See also:
QObject
Parameters:
fl The windowing flags

Definition at line 11 of file oclickablelabel.cpp.

References QFrame::setFrameShadow().


Member Function Documentation

void OClickableLabel::setToggleButton bool  t  ) 
 

This method makes the label behave as a toggle button.

Parameters:
t Whether or not to behave like a toggle button

Definition at line 28 of file oclickablelabel.cpp.

Referenced by OTimePicker::OTimePicker().

void OClickableLabel::setOn bool  on  )  [slot]
 

Parameters:
on if the Label is down or up

Definition at line 114 of file oclickablelabel.cpp.

void OClickableLabel::clicked  )  [signal]
 

emitted when the labels gets clicked

void OClickableLabel::toggled bool  on  )  [signal]
 

emitted when the labels gets toggled

Parameters:
on the new new state of the label


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for OPIE Version 1.1.
Documentation copyright © 1997-2003 the KDE developers. 2003 OPIE developers
Generated on Tue Feb 10 20:24:49 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001