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< RtFiffRawViewDelegate > SPtr
typedef QSharedPointer< const RtFiffRawViewDelegate > ConstSPtr

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 82 of file rtfiffrawviewdelegate.h.

Inheritance diagram for DISPLIB::RtFiffRawViewDelegate:
Inheritance graph

Member Typedef Documentation

◆ ConstSPtr

Const shared pointer type for RtFiffRawViewDelegate.

Definition at line 88 of file rtfiffrawviewdelegate.h.

◆ SPtr

Shared pointer type for RtFiffRawViewDelegate.

Definition at line 87 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 326 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 61 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 281 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 92 of file rtfiffrawviewdelegate.cpp.

◆ setSignalColor()

void RtFiffRawViewDelegate::setSignalColor ( const QColor & signalColor)

Set the signal color.

Parameters
[in]signalColorThe new signal color.

Definition at line 318 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]iUpperItemIndexThe new upper item index color.

Definition at line 333 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.
Returns
20 pixels wide by the row height for column 0, the option rectangle size otherwise.

Definition at line 259 of file rtfiffrawviewdelegate.cpp.


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