v2.0.0
Loading...
Searching...
No Matches
DISPLIB::SelectionSceneItem Class Reference

Graphics item representing a selectable electrode or channel in a 2-D layout scene. More...

#include <selectionsceneitem.h>

Public Types

typedef QSharedPointer< SelectionSceneItem > SPtr
typedef QSharedPointer< const SelectionSceneItem > ConstSPtr

Public Member Functions

 SelectionSceneItem (QString channelName, int channelNumber, QPointF channelPosition, int channelKind, int channelUnit, QColor channelColor=Qt::blue, bool bIsBadChannel=false)
QRectF boundingRect () const
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)

Public Attributes

QString m_sChannelName
int m_iChannelNumber
int m_iChannelKind
int m_iChannelUnit
QPointF m_qpChannelPosition
QColor m_cChannelColor
bool m_bHighlightItem
bool m_bIsBadChannel

Detailed Description

Graphics item representing a selectable electrode or channel in a 2-D layout scene.

Definition at line 83 of file selectionsceneitem.h.

Inheritance diagram for DISPLIB::SelectionSceneItem:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for SelectionSceneItem.

Definition at line 87 of file selectionsceneitem.h.

◆ SPtr

Shared pointer type for SelectionSceneItem.

Definition at line 86 of file selectionsceneitem.h.

Constructor & Destructor Documentation

◆ SelectionSceneItem()

SelectionSceneItem::SelectionSceneItem ( QString channelName,
int channelNumber,
QPointF channelPosition,
int channelKind,
int channelUnit,
QColor channelColor = Qt::blue,
bool bIsBadChannel = false )

Constructs a SelectionSceneItem.

Parameters
[in]channelNameName of the channel shown by this item.
[in]channelNumberIndex of the channel in the measurement info.
[in]channelPosition2-D layout position (scaled by 10 when painted).
[in]channelKindFIFF channel kind (e.g. FIFFV_MEG_CH).
[in]channelUnitFIFF unit of the channel data.
[in]channelColorFill colour of the electrode marker (default Qt::blue).
[in]bIsBadChannelTrue to paint the channel as bad (red) (default false).

Definition at line 42 of file selectionsceneitem.cpp.

Member Function Documentation

◆ boundingRect()

QRectF SelectionSceneItem::boundingRect ( ) const

Returns the bounding rect of the electrode item. This rect describes the area which the item uses to plot in.

Returns
Fixed 50 x 50 rectangle with top-left corner at (-25, -30) in item coordinates.

Definition at line 64 of file selectionsceneitem.cpp.

◆ paint()

void SelectionSceneItem::paint ( QPainter * painter,
const QStyleOptionGraphicsItem * option,
QWidget * widget )

Reimplemented paint function.

Parameters
[in]painterPainter used to draw the electrode marker and label.
[in]optionStyle options (unused).
[in]widgetWidget being painted on (unused).

Definition at line 71 of file selectionsceneitem.cpp.

Member Data Documentation

◆ m_bHighlightItem

bool DISPLIB::SelectionSceneItem::m_bHighlightItem

Whether this item is to be highlighted.

Definition at line 133 of file selectionsceneitem.h.

◆ m_bIsBadChannel

bool DISPLIB::SelectionSceneItem::m_bIsBadChannel

Whether this item is a bad channel.

Definition at line 134 of file selectionsceneitem.h.

◆ m_cChannelColor

QColor DISPLIB::SelectionSceneItem::m_cChannelColor

The current channel color.

Definition at line 132 of file selectionsceneitem.h.

◆ m_iChannelKind

int DISPLIB::SelectionSceneItem::m_iChannelKind

The channel kind.

Definition at line 129 of file selectionsceneitem.h.

◆ m_iChannelNumber

int DISPLIB::SelectionSceneItem::m_iChannelNumber

The channel number.

Definition at line 128 of file selectionsceneitem.h.

◆ m_iChannelUnit

int DISPLIB::SelectionSceneItem::m_iChannelUnit

The channel unit.

Definition at line 130 of file selectionsceneitem.h.

◆ m_qpChannelPosition

QPointF DISPLIB::SelectionSceneItem::m_qpChannelPosition

The channel's 2D position in the scene.

Definition at line 131 of file selectionsceneitem.h.

◆ m_sChannelName

QString DISPLIB::SelectionSceneItem::m_sChannelName

The channel's name.

Definition at line 127 of file selectionsceneitem.h.


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