gSAFE  1.3.8
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
HPressButton Class Reference

#include <guilib.h>

Inherits QFrame.

Public Slots

int recalcSize ()
 
int setEnabled (bool enable)
 
int setHide ()
 
int setShow ()
 

Signals

void clicked (void)
 
void clickedCode (QString code)
 

Public Member Functions

 HPressButton (QWidget *parent, QString text, QString code="")
 
 ~HPressButton (void)
 
HPressButtonSizeSyncronizergetSizeSyncronizer (void)
 
void setColor (int red, int green, int blue)
 
void setEffect (int effectwidth)
 
void setMargin (int margin)
 
void setSizeSyncronizer (HPressButtonSizeSyncronizer *ss)
 
void setTextPointSize (int size)
 

Static Public Member Functions

static
HPressButtonSizeSyncronizer
createSizeSyncronizer (void)
 

Protected Member Functions

void keyPressEvent (QKeyEvent *e)
 
void keyReleaseEvent (QKeyEvent *e)
 
void mouseMoveEvent (QMouseEvent *e)
 
void mousePressEvent (QMouseEvent *e)
 
void mouseReleaseEvent (QMouseEvent *e)
 
void paintEvent (QPaintEvent *e)
 

Detailed Description

HPressButton is a large pusbutton optimised for touchscreens.

hdecordialog.png

You can define a code for every button, and when the button is pressed the clickedCode signal will pass the code.
Optionally, you can define a size syncronizer object, which can control the size of a group of HPressButton-s and equal the sizes.

Definition at line 1374 of file guilib.h.

Constructor & Destructor Documentation

HPressButton::HPressButton ( QWidget *  parent,
QString  text,
QString  code = "" 
)

Creates a HPressButton

Parameters
parentthe parent QWidget descendant
textThe text of the button.
codeThe code of the button. Passed by clickedCode signal.

Definition at line 4623 of file guilib.cpp.

HPressButton::~HPressButton ( void  )

Destructor

Definition at line 4649 of file guilib.cpp.

Member Function Documentation

void HPressButton::clicked ( void  )
signal

This signal is emitted if the button is pressed

void HPressButton::clickedCode ( QString  code)
signal

This signal is emitted if the button is pressed, and the button code is passed too.

HPressButtonSizeSyncronizer * HPressButton::createSizeSyncronizer ( void  )
static

Creates and returns a HPressButtonSizeSyncronizer object. Every HPressButton which have a same HPressButtonSizeSyncronizer will be equalzed size. You can set a HPressButtonSizeSyncronizer to a HPressButton with the setSizeSyncronizer() function

See Also
setSizeSyncronizer()
getSizeSyncronizer()

Definition at line 4890 of file guilib.cpp.

HPressButtonSizeSyncronizer* HPressButton::getSizeSyncronizer ( void  )
inline

Returns the currently set HPressButtonSizeSyncronizer object. Returns NULL if not set.

See Also
createSizeSyncronizer()
setSizeSyncronizer()

Definition at line 1424 of file guilib.h.

int HPressButton::recalcSize ( )
slot

Recalculate the sizes of the HPressButtons which have same HPressButtonSizeSyncronizer object

Definition at line 4694 of file guilib.cpp.

void HPressButton::setColor ( int  red,
int  green,
int  blue 
)

Sets the color of the button

Definition at line 4721 of file guilib.cpp.

void HPressButton::setEffect ( int  effectwidth)

Width of the pressing effect of the button

Definition at line 4675 of file guilib.cpp.

int HPressButton::setEnabled ( bool  enable)
slot

Set if the button is enabled or not. If the button is not enabled the text is red crossed and the button can't pressed. Note: If you like to hide the button use setHide()

Definition at line 4667 of file guilib.cpp.

int HPressButton::setHide ( void  )
slot

Hide the button

Definition at line 4654 of file guilib.cpp.

void HPressButton::setMargin ( int  margin)

Sets the margin of the button text

Definition at line 4681 of file guilib.cpp.

int HPressButton::setShow ( void  )
slot

Show/Unhide the button

Definition at line 4660 of file guilib.cpp.

void HPressButton::setSizeSyncronizer ( HPressButtonSizeSyncronizer ss)
inline

Sets the HPressButtonSizeSyncronizer object.

See Also
createSizeSyncronizer()
getSizeSyncronizer()

Definition at line 1427 of file guilib.h.

void HPressButton::setTextPointSize ( int  size)

Sets the size of the button text

Definition at line 4687 of file guilib.cpp.


The documentation for this class was generated from the following files: