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

QAbstractItemDelegate painting one FIFF channel's signal trace inside RtFiffRawView. More...

#include <rtfiffrawviewdelegate.h>

Public Types

typedef QSharedPointer< RtFiffRawViewDelegateSPtr
typedef QSharedPointer< const RtFiffRawViewDelegateConstSPtr

Public Member Functions

 RtFiffRawViewDelegate (RtFiffRawView *parent=0)
void initPainterPaths (const QAbstractTableModel *model)
virtual void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
virtual QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const
void markerMoved (QPoint position, int activeRow)
void setSignalColor (const QColor &signalColor)
QColor getSignalColor ()
void setUpperItemIndex (int iUpperItemIndex)

Detailed Description

QAbstractItemDelegate painting one FIFF channel's signal trace inside RtFiffRawView.

Transforms each visible row of the RtFiffRawViewModel into a polyline drawn inside the cell rectangle, applying the active y-scaling, SSP / compensation operators, trigger overlays and bad-channel greying.

Definition at line 81 of file rtfiffrawviewdelegate.h.

Inheritance diagram for DISPLIB::RtFiffRawViewDelegate:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for RtFiffRawViewDelegate.

Definition at line 87 of file rtfiffrawviewdelegate.h.

◆ SPtr

Shared pointer type for RtFiffRawViewDelegate.

Definition at line 86 of file rtfiffrawviewdelegate.h.

Constructor & Destructor Documentation

◆ RtFiffRawViewDelegate()

RtFiffRawViewDelegate::RtFiffRawViewDelegate ( RtFiffRawView * parent = 0)

Creates a new abstract item delegate with the given parent.

Parameters
[in]parentParent of the delegate.

Definition at line 49 of file rtfiffrawviewdelegate.cpp.

Member Function Documentation

◆ getSignalColor()

QColor RtFiffRawViewDelegate::getSignalColor ( )

Returns the signal color.

Returns
The current signal color.

Definition at line 392 of file rtfiffrawviewdelegate.cpp.

◆ initPainterPaths()

void RtFiffRawViewDelegate::initPainterPaths ( const QAbstractTableModel * model)

Initializes painter path variables to fit number of channels in the model/view.

Parameters
[in]modelmodel.

Definition at line 62 of file rtfiffrawviewdelegate.cpp.

◆ markerMoved()

void RtFiffRawViewDelegate::markerMoved ( QPoint position,
int activeRow )

markerMoved is called whenever user moves the mouse inside of the table view viewport

Parameters
[in]positionThe current mouse position.
[in]activeRowThe current row which the mouse is moved over.

Definition at line 375 of file rtfiffrawviewdelegate.cpp.

◆ paint()

void RtFiffRawViewDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
virtual

Use the painter and style option to render the item specified by the item index.

(sizeHint() must be implemented also)

Parameters
[in]painterLow-level painting on widgets and other paint devices.
[in]optionDescribes the parameters used to draw an item in a view widget.
[in]indexUsed to locate data in a data model.

Definition at line 188 of file rtfiffrawviewdelegate.cpp.

◆ setSignalColor()

void RtFiffRawViewDelegate::setSignalColor ( const QColor & signalColor)

Set the signal color.

Parameters
[in]signalColorThe new signal color.

Definition at line 384 of file rtfiffrawviewdelegate.cpp.

◆ setUpperItemIndex()

void RtFiffRawViewDelegate::setUpperItemIndex ( int iUpperItemIndex)

Set the new upper item index color. This is used to only plot the background for the upper, visible item in the QTableView. This is a rather ugly hack in order to cope with QOpenGLWidget's/QtableView's problem when setting a background color.

Parameters
[in]iUpperItemThe new upper item index color.

Definition at line 399 of file rtfiffrawviewdelegate.cpp.

◆ sizeHint()

QSize RtFiffRawViewDelegate::sizeHint ( const QStyleOptionViewItem & option,
const QModelIndex & index ) const
virtual

Item size

Parameters
[in]optionDescribes the parameters used to draw an item in a view widget.
[in]indexUsed to locate data in a data model.

Definition at line 353 of file rtfiffrawviewdelegate.cpp.


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