MNE-CPP 0.1.9
A Framework for Electrophysiology
Loading...
Searching...
No Matches
butterflyview.h
Go to the documentation of this file.
1//=============================================================================================================
36#ifndef BUTTERFLYVIEW_H
37#define BUTTERFLYVIEW_H
38
39//=============================================================================================================
40// INCLUDES
41//=============================================================================================================
42
43#include "../disp_global.h"
44
45//=============================================================================================================
46// QT INCLUDES
47//=============================================================================================================
48
49#include <QMap>
50#include <QWidget>
51#include <QtGlobal>
52#if !defined(NO_QOPENGLWIDGET)
53#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
54#include <QOpenGLWidget>
55#else
56#include <QtOpenGLWidgets/QOpenGLWidget>
57#endif
58#endif
59
60//=============================================================================================================
61// EIGEN INCLUDES
62//=============================================================================================================
63
64//=============================================================================================================
65// FORWARD DECLARATIONS
66//=============================================================================================================
67
68//=============================================================================================================
69// DEFINE NAMESPACE DISPLIB
70//=============================================================================================================
71
72namespace DISPLIB
73{
74
75//=============================================================================================================
76// DISPLIB FORWARD DECLARATIONS
77//=============================================================================================================
78
79class EvokedSetModel;
80class ChannelInfoModel;
81
87#if !defined(NO_QOPENGLWIDGET)
88class DISPSHARED_EXPORT ButterflyView : public QOpenGLWidget
89#else
90class DISPSHARED_EXPORT ButterflyView : public QWidget
91#endif
92{
93 Q_OBJECT
94
95public:
96 typedef QSharedPointer<ButterflyView> SPtr;
97 typedef QSharedPointer<const ButterflyView> ConstSPtr;
99 //=========================================================================================================
103 explicit ButterflyView(const QString& sSettingsPath = "",
104 QWidget *parent = 0,
105 Qt::WindowFlags f = Qt::Widget);
106
107 //=========================================================================================================
112
113 //=========================================================================================================
118 void updateOpenGLViewport();
119
120 //=========================================================================================================
126 void setEvokedSetModel(QSharedPointer<EvokedSetModel> model);
127
128 //=========================================================================================================
134 QSharedPointer<EvokedSetModel> getEvokedSetModel();
135
136 //=========================================================================================================
140 void dataUpdate();
141
142 //=========================================================================================================
148 QMap<QString, bool> getModalityMap();
149
150 //=========================================================================================================
156 void setModalityMap(const QMap<QString, bool>& modalityMap);
157
158 //=========================================================================================================
164 void setScaleMap(const QMap<qint32, float> &scaleMap);
165
166 //=========================================================================================================
172 void setSelectedChannels(const QList<int> &selectedChannels);
173
174 //=========================================================================================================
178 void updateView();
179
180 //=========================================================================================================
186 void setBackgroundColor(const QColor& backgroundColor);
187
188 //=========================================================================================================
194 const QColor& getBackgroundColor();
195
196 //=========================================================================================================
202 void takeScreenshot(const QString& fileName);
203
204 //=========================================================================================================
210 QSharedPointer<QMap<QString, QColor> > getAverageColor() const;
211
212 //=========================================================================================================
218 QSharedPointer<QMap<QString, bool> > getAverageActivation() const;
219
220 //=========================================================================================================
226 void setAverageColor(const QSharedPointer<QMap<QString, QColor> > qMapAverageColor);
227
228 //=========================================================================================================
234 void setSingleAverageColor(const QColor& avgColor);
235
236 //=========================================================================================================
242 void setAverageActivation(const QSharedPointer<QMap<QString, bool> > qMapAverageActivation);
243
244 //=========================================================================================================
250 void setChannelInfoModel(QSharedPointer<ChannelInfoModel> &pChannelInfoModel);
251
252 //=========================================================================================================
258 void showSelectedChannelsOnly(const QStringList& selectedChannels);
259
260 //=========================================================================================================
266 void showSelectedChannels(const QList<int> selectedChannelsIndexes);
267
268 //=========================================================================================================
272 void showAllChannels();
273
274 //=========================================================================================================
278 void saveSettings();
279
280 //=========================================================================================================
284 void loadSettings();
285
286 //=========================================================================================================
290 void clearView();
291
292protected:
293 //=========================================================================================================
300 #if !defined(NO_QOPENGLWIDGET)
301 virtual void paintGL();
302 #else
303 virtual void paintEvent(QPaintEvent *event);
304 #endif
305
306 //=========================================================================================================
312 void createPlotPath(qint32 row, QPainter& painter) const;
313
327 QMap<QString, bool> m_modalityMap;
328 QMap<qint32,float> m_scaleMap;
330 QSharedPointer<EvokedSetModel> m_pEvokedSetModel;
331 QSharedPointer<ChannelInfoModel> m_pChannelInfoModel;
333 QSharedPointer<QMap<QString, bool> > m_qMapAverageActivation;
334 QSharedPointer<QMap<QString, QColor> > m_qMapAverageColor;
335};
336
337//=============================================================================================================
338// INLINE DEFINITIONS
339//=============================================================================================================
340} // NAMESPACE
341
342#endif // BUTTERFLYVIEW_H
#define DISPSHARED_EXPORT
Definition disp_global.h:55
The ButterflyView class provides a butterfly view.
QSharedPointer< QMap< QString, bool > > m_qMapAverageActivation
QSharedPointer< EvokedSetModel > m_pEvokedSetModel
QList< int > m_lSelectedChannels
QSharedPointer< ButterflyView > SPtr
QSharedPointer< ChannelInfoModel > m_pChannelInfoModel
QSharedPointer< QMap< QString, QColor > > m_qMapAverageColor
QMap< qint32, float > m_scaleMap
QSharedPointer< const ButterflyView > ConstSPtr
QMap< QString, bool > m_modalityMap