![]() |
OpenWalnut
1.5.0dev
|
GUI event handler class used for the 2D EEG view. More...
#include <WEEGViewHandler.h>
Inheritance diagram for WEEGViewHandler:
Collaboration diagram for WEEGViewHandler:Public Member Functions | |
| WEEGViewHandler (WPropInt labelsWidth, WPropDouble timePos, WPropDouble timeRange, WPropInt graphWidth, WPropDouble yPos, WPropDouble ySpacing, WPropDouble ySensitivity, WPropDouble colorSensitivity, std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > event, osg::ref_ptr< WGEGroupNode > eventParentNode, std::shared_ptr< WEEG2 > eeg, std::size_t segmentID, WPropBool snapToDipole, WPropBool proofOfConcept, std::shared_ptr< WDataSetDipoles > dipoles) | |
| Constructor. More... | |
| virtual bool | handle (const osgGA::GUIEventAdapter &ea, osgGA::GUIActionAdapter &) |
| Handle events. More... | |
Private Member Functions | |
| bool | markEvent (float x) |
| Update the event position according to the clicked position. More... | |
Private Attributes | |
| WPropInt | m_labelsWidth |
| the width of the label display in pixel as property More... | |
| WPropDouble | m_timePos |
| the time position in seconds where to start the graph at the left edge as property More... | |
| WPropDouble | m_timeRange |
| the width of the graph in seconds as property More... | |
| WPropInt | m_graphWidth |
| the width of the graph in pixel as property More... | |
| WPropDouble | m_yPos |
| the y position in pixel at the lower edge as property More... | |
| WPropDouble | m_ySpacing |
| the distance between two curves of the graph in pixel as property More... | |
| WPropDouble | m_ySensitivity |
| the sensitivity of the graph in microvolt per pixel as property More... | |
| WPropDouble | m_colorSensitivity |
| The sensitivity of the color map as property. More... | |
| std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > | m_event |
| event marking a special time position as WFlag More... | |
| osg::ref_ptr< WGEGroupNode > | m_eventParentNode |
| parent node, where an marked event position is inserted and removed from More... | |
| std::shared_ptr< WEEG2 > | m_eeg |
| pointer to the loaded EEG dataset More... | |
| std::size_t | m_segmentID |
| number of the segment More... | |
| WPropBool | m_snapToDipole |
| Property determining whether the selected time position should be snapped to an active dipole. More... | |
| WPropBool | m_proofOfConcept |
| Property determining whether we only show the proof of concept or the real dipoles. More... | |
| std::shared_ptr< WDataSetDipoles > | m_dipoles |
| Pointer to the loaded dipoles dataset. More... | |
| float | m_oldX |
| previous mouse x position More... | |
| float | m_oldY |
| previous mouse y position More... | |
GUI event handler class used for the 2D EEG view.
Definition at line 47 of file WEEGViewHandler.h.
| WEEGViewHandler::WEEGViewHandler | ( | WPropInt | labelsWidth, |
| WPropDouble | timePos, | ||
| WPropDouble | timeRange, | ||
| WPropInt | graphWidth, | ||
| WPropDouble | yPos, | ||
| WPropDouble | ySpacing, | ||
| WPropDouble | ySensitivity, | ||
| WPropDouble | colorSensitivity, | ||
| std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > | event, | ||
| osg::ref_ptr< WGEGroupNode > | eventParentNode, | ||
| std::shared_ptr< WEEG2 > | eeg, | ||
| std::size_t | segmentID, | ||
| WPropBool | snapToDipole, | ||
| WPropBool | proofOfConcept, | ||
| std::shared_ptr< WDataSetDipoles > | dipoles | ||
| ) |
Constructor.
| labelsWidth | the width of the label display in pixel as property |
| timePos | the time position in seconds where to start the graph at the left edge as property |
| timeRange | the width of the graph in seconds as property |
| graphWidth | the width of the graph in pixel as property |
| yPos | the y position in pixel at the lower edge as property |
| ySpacing | the distance between two curves of the graph in pixel as property |
| ySensitivity | the sensitivity of the graph in microvolt per pixel as property |
| colorSensitivity | The sensitivity of the color map as property. The color map ranges from -colorSensitivity to +colorSensitivity in microvolt. |
| event | event marking a special time position as WFlag |
| eventParentNode | parent node, where an marked event position is inserted and removed from |
| eeg | pointer to the loaded EEG dataset |
| segmentID | number of the segment |
| snapToDipole | Property determining whether the selected time position should be snapped to an active dipole |
| proofOfConcept | Property determining whether we only show the proof of concept or the real dipoles |
| dipoles | pointer to the loaded dipoles dataset |
Definition at line 44 of file WEEGViewHandler.cpp.
|
virtual |
Handle events.
| ea | event class for storing keyboard, mouse and window events |
Definition at line 80 of file WEEGViewHandler.cpp.
References m_colorSensitivity, m_graphWidth, m_labelsWidth, m_oldX, m_oldY, m_timePos, m_timeRange, m_yPos, m_ySensitivity, m_ySpacing, and markEvent().
Here is the call graph for this function:
|
private |
Update the event position according to the clicked position.
| x | the x coordinate of the mouse pointer in pixel |
Definition at line 228 of file WEEGViewHandler.cpp.
References m_dipoles, m_eeg, m_event, m_eventParentNode, m_graphWidth, m_labelsWidth, m_proofOfConcept, m_segmentID, m_snapToDipole, m_timePos, m_timeRange, and m_yPos.
Referenced by handle().
Here is the caller graph for this function:
|
private |
The sensitivity of the color map as property.
The color map ranges from -m_colorSensitivity to +m_colorSensitivity in microvolt.
Definition at line 146 of file WEEGViewHandler.h.
Referenced by handle().
|
private |
Pointer to the loaded dipoles dataset.
Definition at line 181 of file WEEGViewHandler.h.
Referenced by markEvent().
|
private |
pointer to the loaded EEG dataset
Definition at line 161 of file WEEGViewHandler.h.
Referenced by markEvent().
event marking a special time position as WFlag
Definition at line 151 of file WEEGViewHandler.h.
Referenced by markEvent().
|
private |
parent node, where an marked event position is inserted and removed from
Definition at line 156 of file WEEGViewHandler.h.
Referenced by markEvent().
|
private |
the width of the graph in pixel as property
Definition at line 125 of file WEEGViewHandler.h.
Referenced by handle(), and markEvent().
|
private |
the width of the label display in pixel as property
Definition at line 109 of file WEEGViewHandler.h.
Referenced by handle(), and markEvent().
|
private |
|
private |
|
private |
Property determining whether we only show the proof of concept or the real dipoles.
Definition at line 176 of file WEEGViewHandler.h.
Referenced by markEvent().
|
private |
|
private |
Property determining whether the selected time position should be snapped to an active dipole.
Definition at line 171 of file WEEGViewHandler.h.
Referenced by markEvent().
|
private |
the time position in seconds where to start the graph at the left edge as property
Definition at line 115 of file WEEGViewHandler.h.
Referenced by handle(), and markEvent().
|
private |
the width of the graph in seconds as property
Definition at line 120 of file WEEGViewHandler.h.
Referenced by handle(), and markEvent().
|
private |
the y position in pixel at the lower edge as property
Definition at line 130 of file WEEGViewHandler.h.
Referenced by handle(), and markEvent().
|
private |
the sensitivity of the graph in microvolt per pixel as property
Definition at line 140 of file WEEGViewHandler.h.
Referenced by handle().
|
private |
the distance between two curves of the graph in pixel as property
Definition at line 135 of file WEEGViewHandler.h.
Referenced by handle().