v2.0.0
Loading...
Searching...
No Matches
averagesceneitem.h
Go to the documentation of this file.
1//=============================================================================================================
22
23#ifndef AVERAGESCENEITEM_H
24#define AVERAGESCENEITEM_H
25
26//=============================================================================================================
27// INCLUDES
28//=============================================================================================================
29
30#include "../../disp_global.h"
31#include "../scalingview.h"
32
33//=============================================================================================================
34// QT INCLUDES
35//=============================================================================================================
36
37#include <QGraphicsObject>
38
39//=============================================================================================================
40// EIGEN INCLUDES
41//=============================================================================================================
42
43//=============================================================================================================
44// DEFINE NAMESPACE DISPLIB
45//=============================================================================================================
46
47namespace DISPLIB
48{
49
50//=============================================================================================================
51// DISPLIB FORWARD DECLARATIONS
52//=============================================================================================================
53
54//=============================================================================================================
55// DEFINE TYPEDEFS
56//=============================================================================================================
57
58typedef QPair<const double*,qint32> RowVectorPair;
59
60//=============================================================================================================
68class DISPSHARED_EXPORT AverageSceneItem : public QGraphicsObject
69{
70 Q_OBJECT
71
72public:
73 //=========================================================================================================
77 AverageSceneItem(const QString& channelName,
78 int channelNumber,
79 const QPointF& channelPosition,
80 int channelKind,
81 int channelUnit,
82 const QColor& color = Qt::yellow);
83
84 //=========================================================================================================
88 QRectF boundingRect() const;
89 void mousePressEvent(QGraphicsSceneMouseEvent *event);
90 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
91 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
92
93 //=========================================================================================================
99 void setDefaultColor(const QColor& viewColor);
100
109
110 bool m_bIsBad;
111
113 QList<QPair<QString, RowVectorPair> > m_lAverageData;
114
115 QPair<int,int> m_firstLastSample;
116
117 QMap<qint32,float> m_scaleMap;
118 QMap<QString, bool> m_qMapAverageActivation;
119 QMap<QString, QColor> m_qMapAverageColor;
120
122
124
125protected:
126 //=========================================================================================================
132 void paintAveragePath(QPainter *painter);
133
134 //=========================================================================================================
140 void paintStimLine(QPainter *painter);
141
142signals:
143 //=========================================================================================================
148};
149} // NAMESPACE DISPLIB
150
151#endif // AVERAGESCENEITEM_H
Per-modality vertical-scale spinbox panel (one spin per channel type).
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
2-D display widgets and visualisation helpers (charts, topography, colour maps).
QPair< const double *, qint32 > RowVectorPair
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
void mousePressEvent(QGraphicsSceneMouseEvent *event)
void paintStimLine(QPainter *painter)
QList< QPair< QString, RowVectorPair > > m_lAverageData
QMap< qint32, float > m_scaleMap
void paintAveragePath(QPainter *painter)
QPair< int, int > m_firstLastSample
AverageSceneItem(const QString &channelName, int channelNumber, const QPointF &channelPosition, int channelKind, int channelUnit, const QColor &color=Qt::yellow)
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
QMap< QString, bool > m_qMapAverageActivation
void setDefaultColor(const QColor &viewColor)
QMap< QString, QColor > m_qMapAverageColor