v2.0.0
Loading...
Searching...
No Matches
averagesceneitem.h
Go to the documentation of this file.
1//=============================================================================================================
35
36#ifndef AVERAGESCENEITEM_H
37#define AVERAGESCENEITEM_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "../../disp_global.h"
44#include "../scalingview.h"
45
46//=============================================================================================================
47// QT INCLUDES
48//=============================================================================================================
49
50#include <QGraphicsObject>
51
52//=============================================================================================================
53// EIGEN INCLUDES
54//=============================================================================================================
55
56//=============================================================================================================
57// DEFINE NAMESPACE DISPLIB
58//=============================================================================================================
59
60namespace DISPLIB
61{
62
63//=============================================================================================================
64// DISPLIB FORWARD DECLARATIONS
65//=============================================================================================================
66
67//=============================================================================================================
68// DEFINE TYPEDEFS
69//=============================================================================================================
70
71typedef QPair<const double*,qint32> RowVectorPair;
72
73//=============================================================================================================
79class DISPSHARED_EXPORT AverageSceneItem : public QGraphicsObject
80{
81 Q_OBJECT
82
83public:
84 //=========================================================================================================
88 AverageSceneItem(const QString& channelName,
89 int channelNumber,
90 const QPointF& channelPosition,
91 int channelKind,
92 int channelUnit,
93 const QColor& color = Qt::yellow);
94
95 //=========================================================================================================
99 QRectF boundingRect() const;
100 void mousePressEvent(QGraphicsSceneMouseEvent *event);
101 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
102 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
103
104 //=========================================================================================================
110 void setDefaultColor(const QColor& viewColor);
111
120
121 bool m_bIsBad;
122
124 QList<QPair<QString, RowVectorPair> > m_lAverageData;
125
126 QPair<int,int> m_firstLastSample;
127
128 QMap<qint32,float> m_scaleMap;
129 QMap<QString, bool> m_qMapAverageActivation;
130 QMap<QString, QColor> m_qMapAverageColor;
131
133
135
136protected:
137 //=========================================================================================================
143 void paintAveragePath(QPainter *painter);
144
145 //=========================================================================================================
151 void paintStimLine(QPainter *painter);
152
153signals:
154 //=========================================================================================================
159};
160} // NAMESPACE DISPLIB
161
162#endif // AVERAGESCENEITEM_H
Declaration of the ScalingView Class.
disp library export/import macros.
#define DISPSHARED_EXPORT
Definition disp_global.h:51
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