LunaSysMgr
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
PixButton Class Reference

#include <pixbutton.h>

Inheritance diagram for PixButton:
[legend]
Collaboration diagram for PixButton:
[legend]

Signals

void signalFirstContact ()
 
void signalContact ()
 
void signalRelease ()
 
void signalLastRelease ()
 
void signalCancel ()
 
void signalActivated ()
 
- Signals inherited from ThingPaintable
void signalGeometryChanged (const QRectF &, const QRectF &)
 
void signalGeometryChanged ()
 
void signalUiStateChanged ()
 
void signalPositionChanged ()
 
- Signals inherited from Thing
void signalThingGeometryChanged (const QRectF &)
 

Public Member Functions

 PixButton (const QRectF &buttonGeometry)
 
virtual ~PixButton ()
 
virtual bool resize (const QSize &s)
 
virtual bool resize (quint32 newWidth, quint32 newHeight)
 
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option=0, QWidget *widget=0)
 
virtual void paintOffscreen (QPainter *painter)
 
virtual bool valid ()
 
virtual void setLabel (const QString &v)
 
virtual void setLabel (const QString &v, quint32 fontSizePx)
 
virtual void setLabelVerticalAdjust (qint32 adjustPx)
 
- Public Member Functions inherited from ThingPaintable
 ThingPaintable (const QRectF &geom)
 
virtual ~ThingPaintable ()
 
virtual QString readUiState () const
 
virtual void writeUiState (const QString &s)
 
virtual void resetUiState ()
 
virtual QRectF geometry () const
 
virtual QRectF positionRelativeGeometry () const
 
virtual QRectF untranslateFromPosition (const QRectF &rect) const
 
virtual QRectF boundingRect () const
 
virtual void paint (QPainter *painter, const QRectF &sourceRect)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, qint32 renderOpt)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, const QPointF &painterTranslate)
 
virtual void paint (QPainter *painter, const QRectF &sourceRect, const QPointF &painterTranslate, qint32 renderOpt)
 
virtual void paintOffscreen (QPainter *painter, const QRect &sourceRect, const QPoint &targetOrigin)
 
virtual void paintOffscreen (QPainter *painter, const QRect &sourceRect, const QRect &targetRect)
 
- Public Member Functions inherited from Thing
 Thing ()
 
virtual ~Thing ()
 
virtual QUuid uid () const
 
virtual bool offer (Thing *p_offer, Thing *p_offeringThing)
 
virtual bool take (Thing *p_takerThing)
 
virtual bool taking (Thing *p_victimThing, Thing *p_takerThing)
 
virtual void taken (Thing *p_takenThing, Thing *p_takerThing)
 
virtual uint hashValue () const
 
virtual void touchTrackedPointStarted (int id, const QPointF &scenePosition, const QPointF &lastScenePosition, const QPointF &initialPosition)
 
virtual void touchTrackedPointMoved (int id, const QPointF &scenePosition, const QPointF &lastScenePosition, const QPointF &initialPosition)
 
virtual void touchTrackedPointReleased (int id, const QPointF &scenePosition, const QPointF &lastScenePosition, const QPointF &initialPosition)
 
virtual void redirectTouchPrepare (Thing *p_sourceThing, const TouchRegister &touchRegister, int contextHint=0)
 
virtual void redirectedTouchTrackedPointMoved (Thing *p_sourceThing, int id, const QPointF &scenePosition, const QPointF &lastScenePosition, const QPointF &initialPosition, const RedirectContext &redirContext)
 
virtual void redirectedTouchTrackedPointReleased (Thing *p_sourceThing, int id, const QPointF &scenePosition, const QPointF &lastScenePosition, const QPointF &initialPosition, const RedirectContext &redirContext)
 

Protected Member Functions

virtual void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
virtual void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 
virtual bool touchStartEvent (QTouchEvent *event)
 
virtual bool touchUpdateEvent (QTouchEvent *event)
 
virtual bool touchEndEvent (QTouchEvent *event)
 
virtual bool sceneEvent (QEvent *event)
 
virtual bool tapAndHoldGesture (QTapAndHoldGesture *tapHoldEvent)
 
virtual bool tapGesture (QTapGesture *tapEvent)
 
virtual bool customGesture (QGesture *customGesture)
 
virtual bool panGesture (QPanGesture *panEvent)
 
virtual bool swipeGesture (QSwipeGesture *swipeEvent)
 
virtual bool flickGesture (FlickGesture *flickEvent)
 
virtual bool pinchGesture (QPinchGesture *pinchEvent)
 
virtual void recalculateLabelBoundsForCurrentGeom ()
 
virtual void redoLabelTextLayout ()
 
virtual void recalculateLabelPosition ()
 
- Protected Member Functions inherited from ThingPaintable
 ThingPaintable (const QUuid &specificUid, const QRectF &geom)
 
virtual void recomputeBoundingRect ()
 
virtual void recomputeBoundingRect (const QRectF &virtualGeom)
 
- Protected Member Functions inherited from Thing
 Thing (const QUuid &specificUid)
 

Static Protected Member Functions

static QFont staticLabelFontForButtons ()
 

Protected Attributes

bool m_trackingTouch
 
qint32 m_trackingTouchId
 
qint32 m_touchCount
 
QString m_label
 
QFont m_textFont
 
QColor m_selectedColor
 
QColor m_unselectedColor
 
QTextLayout m_textLayoutObject
 
qint32 m_labelVerticalAdjust
 
QPointF m_labelPosICS
 
QPoint m_labelPosPntCS
 
QRect m_labelMaxGeom
 
QRect m_labelGeom
 
- Protected Attributes inherited from ThingPaintable
QRectF m_geom
 
QRectF m_boundingRect
 
QString m_uiState
 
- Protected Attributes inherited from Thing
QPointer< Thingm_qp_takerOwner
 

Additional Inherited Members

- Public Slots inherited from Thing
virtual void slotEnableIconAutoRepaint ()
 
virtual void slotDisableIconAutoRepaint ()
 
- Static Public Member Functions inherited from ThingPaintable
static bool isItemThingPaintable (QGraphicsItem *p_qgitem)
 
static ThingPaintablethingpaintable_cast (QGraphicsItem *p_qgitem)
 
- Static Public Attributes inherited from ThingPaintable
static int MagicTypePropertyKey = 1111
 
static int MagicTypePropertyValue = 2222
 
- Properties inherited from ThingPaintable
QString uistate
 
QPointF animatePosition
 

Constructor & Destructor Documentation

PixButton::PixButton ( const QRectF &  buttonGeometry)
PixButton::~PixButton ( )
virtual

Member Function Documentation

bool PixButton::customGesture ( QGesture customGesture)
protectedvirtual
virtual bool PixButton::flickGesture ( FlickGesture flickEvent)
inlineprotectedvirtual
void PixButton::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual
void PixButton::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual
void PixButton::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protectedvirtual
void PixButton::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option = 0,
QWidget *  widget = 0 
)
virtual

Implements ThingPaintable.

Reimplemented in PixButton2State, and PixButtonSimple.

void PixButton::paintOffscreen ( QPainter *  painter)
virtual

Implements ThingPaintable.

Reimplemented in PixButton2State.

virtual bool PixButton::panGesture ( QPanGesture *  panEvent)
inlineprotectedvirtual
virtual bool PixButton::pinchGesture ( QPinchGesture *  pinchEvent)
inlineprotectedvirtual
void PixButton::recalculateLabelBoundsForCurrentGeom ( )
protectedvirtual
void PixButton::recalculateLabelPosition ( )
protectedvirtual
void PixButton::redoLabelTextLayout ( )
protectedvirtual
bool PixButton::resize ( const QSize &  s)
virtual

Reimplemented from ThingPaintable.

bool PixButton::resize ( quint32  newWidth,
quint32  newHeight 
)
virtual

Reimplemented from ThingPaintable.

bool PixButton::sceneEvent ( QEvent event)
protectedvirtual
void PixButton::setLabel ( const QString &  v)
virtual
void PixButton::setLabel ( const QString &  v,
quint32  fontSizePx 
)
virtual
void PixButton::setLabelVerticalAdjust ( qint32  adjustPx)
virtual
void PixButton::signalActivated ( )
signal
void PixButton::signalCancel ( )
signal
void PixButton::signalContact ( )
signal
void PixButton::signalFirstContact ( )
signal
void PixButton::signalLastRelease ( )
signal
void PixButton::signalRelease ( )
signal
QFont PixButton::staticLabelFontForButtons ( )
staticprotected
virtual bool PixButton::swipeGesture ( QSwipeGesture *  swipeEvent)
inlineprotectedvirtual
bool PixButton::tapAndHoldGesture ( QTapAndHoldGesture *  tapHoldEvent)
protectedvirtual

Reimplemented in PixButton2State.

bool PixButton::tapGesture ( QTapGesture *  tapEvent)
protectedvirtual

Reimplemented in PixButton2State.

bool PixButton::touchEndEvent ( QTouchEvent *  event)
protectedvirtual
bool PixButton::touchStartEvent ( QTouchEvent *  event)
protectedvirtual
bool PixButton::touchUpdateEvent ( QTouchEvent *  event)
protectedvirtual
bool PixButton::valid ( )
virtual

Reimplemented in PixButton2State, and PixButtonSimple.

Member Data Documentation

QString PixButton::m_label
protected
QRect PixButton::m_labelGeom
protected
QRect PixButton::m_labelMaxGeom
protected
QPointF PixButton::m_labelPosICS
protected
QPoint PixButton::m_labelPosPntCS
protected
qint32 PixButton::m_labelVerticalAdjust
protected
QColor PixButton::m_selectedColor
protected
QFont PixButton::m_textFont
protected
QTextLayout PixButton::m_textLayoutObject
protected
qint32 PixButton::m_touchCount
protected
bool PixButton::m_trackingTouch
protected
qint32 PixButton::m_trackingTouchId
protected
QColor PixButton::m_unselectedColor
protected

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