v2.0.0
Loading...
Searching...
No Matches
butterflyview.h
Go to the documentation of this file.
1//=============================================================================================================
35
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;
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;
98
99 //=========================================================================================================
103 explicit ButterflyView(const QString& sSettingsPath = "",
104 QWidget *parent = 0,
105 Qt::WindowFlags f = Qt::Widget);
106
107 //=========================================================================================================
112
113 //=========================================================================================================
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
320
322
324
326
327 QMap<QString, bool> m_modalityMap;
328 QMap<qint32,float> m_scaleMap;
329
330 QSharedPointer<EvokedSetModel> m_pEvokedSetModel;
331 QSharedPointer<ChannelInfoModel> m_pChannelInfoModel;
332
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
disp library export/import macros.
#define DISPSHARED_EXPORT
Definition disp_global.h:51
2-D display widgets and visualisation helpers (charts, topography, colour maps).
QSharedPointer< QMap< QString, bool > > m_qMapAverageActivation
QSharedPointer< EvokedSetModel > m_pEvokedSetModel
QList< int > m_lSelectedChannels
void createPlotPath(qint32 row, QPainter &painter) const
void setChannelInfoModel(QSharedPointer< ChannelInfoModel > &pChannelInfoModel)
QSharedPointer< QMap< QString, QColor > > getAverageColor() const
void setModalityMap(const QMap< QString, bool > &modalityMap)
QSharedPointer< ButterflyView > SPtr
void takeScreenshot(const QString &fileName)
QMap< QString, bool > getModalityMap()
const QColor & getBackgroundColor()
void setAverageColor(const QSharedPointer< QMap< QString, QColor > > qMapAverageColor)
void showSelectedChannels(const QList< int > selectedChannelsIndexes)
void setSelectedChannels(const QList< int > &selectedChannels)
QSharedPointer< ChannelInfoModel > m_pChannelInfoModel
QSharedPointer< QMap< QString, QColor > > m_qMapAverageColor
QSharedPointer< QMap< QString, bool > > getAverageActivation() const
void setEvokedSetModel(QSharedPointer< EvokedSetModel > model)
void setSingleAverageColor(const QColor &avgColor)
void setBackgroundColor(const QColor &backgroundColor)
void showSelectedChannelsOnly(const QStringList &selectedChannels)
void setScaleMap(const QMap< qint32, float > &scaleMap)
QMap< qint32, float > m_scaleMap
ButterflyView(const QString &sSettingsPath="", QWidget *parent=0, Qt::WindowFlags f=Qt::Widget)
QSharedPointer< const ButterflyView > ConstSPtr
QSharedPointer< EvokedSetModel > getEvokedSetModel()
QMap< QString, bool > m_modalityMap
void setAverageActivation(const QSharedPointer< QMap< QString, bool > > qMapAverageActivation)
Table model exposing per-channel metadata (name, type, unit, position) for QTableView display.
The EvokedSetModel class implements the data access model for evoked set data.