Plotter layout with viewports, channel matching and zoom. More...
#include <mne_layout.h>
Public Member Functions | |
| QMap< QString, QPointF > | channelPositions () const |
| int | matchPorts (const QString &channel) |
| int | matchPorts (const QStringList &channels) |
| const Eigen::MatrixXi & | matches () const |
| int | portAt (const QPointF &point) const |
| int | confine (const QRectF &area) |
| void | resetConfine () |
| bool | isVisible (const MNELayoutPort &port) const |
| QRectF | extent () const |
| QRectF | visibleArea () const |
Static Public Member Functions | |
| static std::optional< MNELayout > | read (const QString &path) |
Public Attributes | |
| QString | fileName |
| std::vector< MNELayoutPort > | ports |
Plotter layout with viewports, channel matching and zoom.
Definition at line 53 of file mne_layout.h.
| QMap< QString, QPointF > MNELayout::channelPositions | ( | ) | const |
Returns the lower-left corner of every channel's viewport, keyed by the name in the file.
Definition at line 135 of file mne_layout.cpp.
| int MNELayout::confine | ( | const QRectF & | area | ) |
Zooms to the ports inside area (MNE-C mne_lout_confine).
The visible area becomes the bounding box of those ports plus a 1 % margin; without any port inside it stays unchanged.
| [in] | area | The requested area; corners may be given in either order. |
Definition at line 193 of file mne_layout.cpp.
|
inline |
Returns the drawing area given on the first line of the file.
Definition at line 153 of file mne_layout.h.
| bool MNELayout::isVisible | ( | const MNELayoutPort & | port | ) | const |
Returns whether a port lies completely inside the visible area.
| [in] | port | A port of this layout. |
Definition at line 213 of file mne_layout.cpp.
|
inline |
Returns which port shows which channel after matchPorts(const QStringList&).
Definition at line 100 of file mne_layout.h.
| int MNELayout::matchPorts | ( | const QString & | channel | ) |
Marks the visible ports that show channel (MNE-C mne_lout_match_ports).
| [in] | channel | A channel name in any spelling. |
Definition at line 148 of file mne_layout.cpp.
| int MNELayout::matchPorts | ( | const QStringList & | channels | ) |
Matches many channels at once (MNE-C mne_lout_match_ports_many) and fills matches().
| [in] | channels | Channel names in any spelling. |
Definition at line 160 of file mne_layout.cpp.
| int MNELayout::portAt | ( | const QPointF & | point | ) | const |
Returns the port whose interior contains a point.
| [in] | point | A point in layout coordinates. |
Definition at line 183 of file mne_layout.cpp.
|
static |
Reads an MNE-C .lout file.
| [in] | path | The layout file. |
Definition at line 72 of file mne_layout.cpp.
|
inline |
Shows the whole layout again.
Definition at line 132 of file mne_layout.h.
|
inline |
Returns the area currently shown (the extent unless confine() zoomed in).
Definition at line 164 of file mne_layout.h.
| QString MNELIB::MNELayout::fileName |
File this layout was read from.
Definition at line 169 of file mne_layout.h.
| std::vector<MNELayoutPort> MNELIB::MNELayout::ports |
Viewports in file order.
Definition at line 170 of file mne_layout.h.