MNE-CPP  beta 1.0
Signals | Public Member Functions | Protected Member Functions | List of all members
XDISPLIB::SensorItem Class Reference

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

#include <sensoritem.h>

Inheritance diagram for XDISPLIB::SensorItem:

Signals

void itemChanged (SensorItem *item)
 

Public Member Functions

 SensorItem (const QString &dispChName, qint32 chNumber, const QPointF &coordinate, const QColor &channelColor, QGraphicsItem *parent=0)
 
void setColor (const QColor &channelColor)
 
QRectF boundingRect () const
 
QPainterPath shape () const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
 
const QString & getDisplayChName () const
 
qint32 getChNumber () const
 
void setPosition (QPointF newPosition)
 
QPointF getPosition ()
 
bool isHighlighted () const
 
void setHighlighted (bool highlight)
 
bool isChoosen () const
 
void setChoosen (bool choosen)
 

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 64 of file sensoritem.h.

Constructor & Destructor Documentation

SensorItem::SensorItem ( const QString &  dispChName,
qint32  chNumber,
const QPointF &  coordinate,
const QColor &  channelColor,
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]channelColorcoordinates of the item
[in]parentparent of item

Definition at line 66 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 84 of file sensoritem.cpp.

qint32 XDISPLIB::SensorItem::getChNumber ( ) const
inline

Returns the channel number.

Returns
the channel number

Definition at line 236 of file sensoritem.h.

const QString & XDISPLIB::SensorItem::getDisplayChName ( ) const
inline

Returns the channel display name.

Returns
the name to display

Definition at line 228 of file sensoritem.h.

QPointF XDISPLIB::SensorItem::getPosition ( )
inline

Returns the channel position.

Returns
position

Definition at line 252 of file sensoritem.h.

bool XDISPLIB::SensorItem::isChoosen ( ) const
inline

Returns the channel selection state

Returns
whether channel is selected

Definition at line 277 of file sensoritem.h.

bool XDISPLIB::SensorItem::isHighlighted ( ) const
inline

Returns the channel selection state

Returns
whether channel is selected

Definition at line 260 of file sensoritem.h.

void XDISPLIB::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 146 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 137 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 159 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 102 of file sensoritem.cpp.

void XDISPLIB::SensorItem::setChoosen ( bool  choosen)
inline

Set the selection state

Parameters
[in]choosenthe new choosen state

Definition at line 285 of file sensoritem.h.

void SensorItem::setColor ( const QColor &  channelColor)

Sets the color of the channel item.

Parameters
[in]channelColorcolor to set

Definition at line 129 of file sensoritem.cpp.

void XDISPLIB::SensorItem::setHighlighted ( bool  highlight)
inline

Set the selection state

Parameters
[in]highlightthe new selection state

Definition at line 268 of file sensoritem.h.

void XDISPLIB::SensorItem::setPosition ( QPointF  newPosition)
inline

Updates the channels position.

Parameters
[in]newPositionnew channel position

Definition at line 244 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 92 of file sensoritem.cpp.


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