visualdynamics.gui.icons¶
icons
¶
Type icons for the project tree.
Icons are drawn at runtime with QPainter rather than shipped as assets, so they stay sharp at any DPI and need no files. Each type gets a distinct shape as well as a distinct color — shape carries the meaning, so the icons are still tellable apart at 16 px and without relying on color vision.
Functions:
| Name | Description |
|---|---|
color_swatch |
A filled chip for a palette color, for drop-downs and menus. |
control_icon |
Toolbar glyphs: play, pause, add, and the element types. |
child_icon |
Icon for a sub-item, drawn in its parent object's color. |
quantity_of |
The quantity a simple dimension names, if it is one we draw. |
quantity_icon |
Icon for what a record measures, rather than for what holds it. |
record_icon |
The icon for one record: what that record measures. |
ratio_icon |
Two quantities as a fraction, the way the dimension reads: |
type_icon |
Icon for a visualdynamics type, by class name. Requires a running QApplication. |
object_icon |
The icon for an object, which is not always its class's. |
placeholder_icon |
The type's glyph in grey: expected by the project's type, not |
viridis |
The colour at |
Classes¶
Functions:¶
color_swatch
cached
¶
A filled chip for a palette color, for drop-downs and menus.
Source code in src/visualdynamics/gui/icons.py
control_icon
¶
Toolbar glyphs: play, pause, add, and the element types.
Source code in src/visualdynamics/gui/icons.py
child_icon
cached
¶
child_icon(
kind: str,
parent_type: str = "Geometry",
units_defined: bool = True,
empty: bool = False,
) -> QIcon
Icon for a sub-item, drawn in its parent object's color.
Carries the same undefined-units badge as a top-level icon, so a single channel with no units declared is visible without expanding anything.
Source code in src/visualdynamics/gui/icons.py
quantity_of
¶
The quantity a simple dimension names, if it is one we draw.
Compounds return None; record_icon splits those into their channel
factors itself, and the other callers — a channel table's unit, a
DOF-arrow quantity — only ever hold simple dimensions.
Source code in src/visualdynamics/gui/icons.py
quantity_icon
cached
¶
Icon for what a record measures, rather than for what holds it.
Source code in src/visualdynamics/gui/icons.py
record_icon
¶
record_icon(data: DataArray, index: int) -> QIcon
The icon for one record: what that record measures.
A density or a square resolves to its base quantity — a PSD record
is accelerations, squared per hertz — and a ratio or a cross term
draws both quantities as a fraction, response over reference: an
FRF record wears acceleration-over-force, a CPSD cross term the
same. Identical factors collapse to the single glyph, and a record
whose quantities we cannot draw — a coherence, an undeclared
channel — keeps its object's type icon. Undefined units keep their
badge either way, and a dimension_hint is enough to choose: a
source that said "force" without sizing it has still said what the
record is.
Source code in src/visualdynamics/gui/icons.py
ratio_icon
cached
¶
Two quantities as a fraction, the way the dimension reads: response upper-left, reference lower-right, a slash between.
Source code in src/visualdynamics/gui/icons.py
type_icon
cached
¶
Icon for a visualdynamics type, by class name. Requires a running QApplication.
Source code in src/visualdynamics/gui/icons.py
object_icon
¶
The icon for an object, which is not always its class's.
A PSD integrated onto proportional bands is still a Psd — same
units, same dimension, the same area under it — and deliberately so:
everything that reads a spectrum works on either without asking. But
the two do not look alike and must not read alike in the tree, so
the icon asks the object a question its class name cannot answer.
The same rule as record_icon: what a thing measures, not what
holds it.
Source code in src/visualdynamics/gui/icons.py
placeholder_icon
cached
¶
The type's glyph in grey: expected by the project's type, not yet in the project.