#include <viewstate.h>
Public Member Functions | |
| bool | matchesSurfaceType (const QString &key) const |
| bool | shouldRenderSurface (const QString &key) const |
| void | applyOverlayToSurfaces (QMap< QString, std::shared_ptr< BrainSurface > > &surfaces) const |
| void | load (const QSettings &settings, const QString &prefix, const QQuaternion &fallbackRotation=QQuaternion()) |
| void | save (QSettings &settings, const QString &prefix) const |
Static Public Member Functions | |
| static bool | isBrainSurfaceKey (const QString &key) |
| static SubView | defaultForIndex (int index) |
Public Attributes | |
| QString | surfaceType = "pial" |
| ShaderMode | brainShader = Standard |
| ShaderMode | bemShader = Standard |
| VisualizationMode | overlayMode = ModeSurface |
| ViewVisibilityProfile | visibility |
| float | zoom = 0.0f |
| QVector2D | pan |
| QQuaternion | perspectiveRotation |
| int | preset = 1 |
| bool | enabled = true |
Encapsulates all per-view state for a single viewport (single view or one pane in multi-view).
The class stores shader, surface type, overlay mode, visibility flags, zoom, pan, camera rotation, and view preset — everything that can differ between two viewports showing the same scene.
Definition at line 143 of file viewstate.h.
| void SubView::applyOverlayToSurfaces | ( | QMap< QString, std::shared_ptr< BrainSurface > > & | surfaces | ) | const |
Apply this view's overlayMode to every brain surface whose key matches surfaceType. Non-brain surfaces are never touched.
Definition at line 217 of file viewstate.cpp.
|
static |
Return default SubView configuration for viewport index.
The preset cycles through the 7 camera orientations (Top, Perspective, Front, Left, Bottom, Back, Right) and the shader cycles through Anatomical → Standard → Holographic.
Definition at line 293 of file viewstate.cpp.
|
static |
True when key identifies a brain-tissue surface (lh_/rh_) as opposed to BEM, sensor, digitizer, or source-space geometry.
Definition at line 169 of file viewstate.cpp.
| void SubView::load | ( | const QSettings & | settings, |
| const QString & | prefix, | ||
| const QQuaternion & | fallbackRotation = QQuaternion() ) |
Load this SubView's state from QSettings under the given prefix.
| [in] | settings | Settings store to read from. |
| [in] | prefix | Key prefix (e.g. "multi0_"). |
| [in] | fallbackRotation | Rotation to use if no saved quaternion exists. |
Definition at line 397 of file viewstate.cpp.
| bool SubView::matchesSurfaceType | ( | const QString & | key | ) | const |
True when the brain-surface key matches this view's surfaceType (e.g. "lh_pial" matches surfaceType "pial").
Definition at line 180 of file viewstate.cpp.
| void SubView::save | ( | QSettings & | settings, |
| const QString & | prefix ) const |
Save this SubView's state to QSettings under the given prefix.
| [out] | settings | Settings store to write to. |
| [in] | prefix | Key prefix (e.g. "multi0_"). |
Definition at line 435 of file viewstate.cpp.
| bool SubView::shouldRenderSurface | ( | const QString & | key | ) | const |
True when the surface identified by key should be rendered according to this view's visibility profile.
Definition at line 187 of file viewstate.cpp.
| ShaderMode SubView::bemShader = Standard |
Definition at line 148 of file viewstate.h.
| ShaderMode SubView::brainShader = Standard |
Definition at line 147 of file viewstate.h.
| bool SubView::enabled = true |
Definition at line 157 of file viewstate.h.
| VisualizationMode SubView::overlayMode = ModeSurface |
Definition at line 149 of file viewstate.h.
| QVector2D SubView::pan |
Definition at line 154 of file viewstate.h.
| QQuaternion SubView::perspectiveRotation |
Definition at line 155 of file viewstate.h.
| int SubView::preset = 1 |
Definition at line 156 of file viewstate.h.
| QString SubView::surfaceType = "pial" |
Definition at line 146 of file viewstate.h.
| ViewVisibilityProfile SubView::visibility |
Definition at line 150 of file viewstate.h.
| float SubView::zoom = 0.0f |
Definition at line 153 of file viewstate.h.