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 //=========================================================================================================
84 AverageSceneItem(const QString& channelName,
85 int channelNumber,
86 const QPointF& channelPosition,
87 int channelKind,
88 int channelUnit,
89 const QColor& color = Qt::yellow);
90
91 //=========================================================================================================
97 QRectF boundingRect() const;
98 void mousePressEvent(QGraphicsSceneMouseEvent* event);
99 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
100 virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget);
101
102 //=========================================================================================================
108 void setDefaultColor(const QColor& viewColor);
109
118
119 bool m_bIsBad;
120
122 QList<QPair<QString, RowVectorPair>> m_lAverageData;
123
124 QPair<int, int> m_firstLastSample;
125
126 QMap<qint32, float> m_scaleMap;
127 QMap<QString, bool> m_qMapAverageActivation;
128 QMap<QString, QColor> m_qMapAverageColor;
129
131
133
134protected:
135 //=========================================================================================================
141 void paintAveragePath(QPainter* painter);
142
143 //=========================================================================================================
149 void paintStimLine(QPainter* painter);
150
151signals:
152 //=========================================================================================================
157};
158} // NAMESPACE DISPLIB
159
160#endif // AVERAGESCENEITEM_H
Export macros and build-info hooks for the DISPLIB shared library.
#define DISPSHARED_EXPORT
Definition disp_global.h:38
Per-modality vertical-scale spinbox panel (one spin per channel type).
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
void paintAveragePath(QPainter *painter)
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
QPair< int, int > m_firstLastSample
void setDefaultColor(const QColor &viewColor)
QMap< QString, QColor > m_qMapAverageColor
QMap< qint32, float > m_scaleMap