MNE-CPP  beta 0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Signals | Public Member Functions | Protected Member Functions | List of all members
SensorItem Class Reference

The SensorItem class represents a channel item, plottet at the graphics scene. More...

#include <sensoritem.h>

Inheritance diagram for SensorItem:

Signals

void itemChanged (SensorItem *item)
 

Public Member Functions

 SensorItem (const QString &dispChName, qint32 chNumber, const QPointF &coordinate, const QSizeF &size, QGraphicsItem *parent=0)
 
QRectF boundingRect () const
 
QPainterPath shape () const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
const QString & getDisplayChName () const
 
qint32 getChNumber () const
 
bool isSelected () const
 
void setSelected (bool selected)
 

Protected Member Functions

void mousePressEvent (QGraphicsSceneMouseEvent *event)
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 

Detailed Description

The SensorItem class represents a channel item, plottet at the graphics scene.

DECLARE CLASS SensorItem

Definition at line 55 of file sensoritem.h.

Constructor & Destructor Documentation

SensorItem::SensorItem ( const QString &  dispChName,
qint32  chNumber,
const QPointF &  coordinate,
const QSizeF &  size,
QGraphicsItem *  parent = 0 
)

Constructs a SensorItem which is a child of parent.

Parameters
[in]dispChNamechannel name to display
[in]chNumberchannel number to store
[in]coordinatecoordinates of the item
[in]sizesize of the item
[in]parentparent of item

Definition at line 57 of file sensoritem.cpp.

Member Function Documentation

QRectF SensorItem::boundingRect ( ) const

The outer bounds of the item as a rectangle.

Returns
the outer bounds of the item as a rectangle.

Definition at line 74 of file sensoritem.cpp.

qint32 SensorItem::getChNumber ( ) const
inline

Returns the channel number.

Returns
the channel number

Definition at line 187 of file sensoritem.h.

const QString & SensorItem::getDisplayChName ( ) const
inline

Returns the channel display name.

Returns
the name to display

Definition at line 179 of file sensoritem.h.

bool SensorItem::isSelected ( ) const
inline

Returns the channel selection state

Returns
whether channel is selected

Definition at line 195 of file sensoritem.h.

void SensorItem::itemChanged ( SensorItem item)
signal

If item changed

Parameters
[in]itemthe sensor item itself
void SensorItem::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

Receive mouse move events for this item.

Parameters
[in]eventthe mouse event

Definition at line 118 of file sensoritem.cpp.

void SensorItem::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Receive mouse press events for this item.

Parameters
[in]eventthe mouse event

Definition at line 109 of file sensoritem.cpp.

void SensorItem::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

Receive mouse release events for this item.

Parameters
[in]eventthe mouse event

Definition at line 131 of file sensoritem.cpp.

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

Paints the contents of an item in local coordinates.

Parameters
[in]painterpainter used to paint
[in]optionstyle options for the item
[in]widgetpoints to the widget that is being painted on

Definition at line 92 of file sensoritem.cpp.

void SensorItem::setSelected ( bool  selected)
inline

Set the selection state

Parameters
[in]selectedsthe new selection state

Definition at line 203 of file sensoritem.h.

QPainterPath SensorItem::shape ( ) const

The shape of this item as a QPainterPath in local coordinates.

Returns
the shape of this item as a QPainterPath in local coordinates.

Definition at line 82 of file sensoritem.cpp.


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