dials.hpp¶
file src/app/widgets/dials.hpp · Applications
The round instruments of the dashboard: a north-up compass rose and a wind dial relative to the bow, painted in code in the colours of the current theme.
Source src/app/widgets/dials.hpp
DialWidget holds the geometry and drawing helpers they share; CompassDial and WindDial are the two instruments DashboardWidget shows in its top row. The free functions fold and format wind angles for the readouts. Angles on the dials run clockwise from the top of the dial, in degrees.
Namespaces¶
| Namespace | Description |
|---|---|
nmeasim::app |
The Qt Widgets desktop application: the main window, its dock panels, the map, the instruments and the settings dialog, built on nmeasim::io. |
Types¶
| Type | Description |
|---|---|
DialWidget |
Common look of the round instruments: a square widget with a bezel, a ring of ticks and a caption, painted in the colours of the current theme. |
CompassDial |
North-up compass rose: the heading as a vessel-shaped pointer, the course over ground and the bearing to the destination as markers on the ring, and the three values as readouts. |
WindDial |
Wind instrument relative to the bow: port and starboard close-hauled sectors, the apparent wind as an arrow and the true wind as a hollow marker, with angles and speeds as readouts. |
Namespace members¶
Declared or defined in this file and documented on the page of their namespace.
| Member | Description |
|---|---|
nmeasim::app::signed_relative_angle |
Folds an angle relative to the bow into (-180, 180], negative to port. |
nmeasim::app::format_wind_angle |
Formats a wind angle relative to the bow as sailors say it: 104°P, 30°S, 0° ahead or 180° astern. |