IndicatorButton Class Reference

Indicator button class. More...

#include <indicatorbutton.h>

List of all members.

Public Slots

const QPoint & eventPosition ()
 Relative position of the event inside the widget.
void setDirection (qreal direction, bool draw)
 Sets direction information for the distance indicator button.

Signals

void autoCenteringTriggered (bool enabled)
 Automatic centering setting changed by user.

Public Member Functions

 IndicatorButton (QWidget *parent=0)
 Constructor.
 ~IndicatorButton ()
 Desctructor.

Protected Member Functions

void mousePressEvent (QMouseEvent *event)
 Event handler for mouse press events.
void mouseReleaseEvent (QMouseEvent *event)
 Event handler for mouse release events.
void paintEvent (QPaintEvent *event)
 Event handler for paint events.

Private Attributes

bool m_drawTriangle
 Should the direction triange be drawn.
qreal m_direction
 Direction to the GPS position (in degrees).
QColor * m_normalColor
 Normal background color.
QLinearGradient * m_selectedGradient
 Selected background.
QPixmap m_indicatorLeds [2]
 Placeholder for images.
QPoint m_dragPosition
 Location from where the widget is grabbed.
QPoint m_eventPosition
 Position of mousePressEvent.

Detailed Description

Indicator button class.

Author:
Katri Kaikkonen - katri.kaikkonen (at) ixonos.com
Kaj Wallin - kaj.wallin (at) ixonos.com
Sami Rämö - sami.ramo (at) ixonos.com

Constructor & Destructor Documentation

IndicatorButton::IndicatorButton ( QWidget *  parent = 0  ) 

Constructor.

Parameters:
parent Parent widget

Member Function Documentation

void IndicatorButton::autoCenteringTriggered ( bool  enabled  )  [signal]

Automatic centering setting changed by user.

Parameters:
enabled True if automatic centering is enabled, otherwise false
void IndicatorButton::mousePressEvent ( QMouseEvent *  event  )  [protected]

Event handler for mouse press events.

Parameters:
event Mouse event
void IndicatorButton::mouseReleaseEvent ( QMouseEvent *  event  )  [protected]

Event handler for mouse release events.

Parameters:
event Mouse event
void IndicatorButton::paintEvent ( QPaintEvent *  event  )  [protected]

Event handler for paint events.

Paints the button and its icon

Parameters:
event Paint event
void IndicatorButton::setDirection ( qreal  direction,
bool  draw 
) [slot]

Sets direction information for the distance indicator button.

Paints the button and its icon

Parameters:
direction Direction to the GPS position (in degrees)
draw True if direction triangle should be drawn

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

Generated on Fri Sep 3 12:05:41 2010 for Situare client for Maemo by  doxygen 1.6.1