Skip to content

dashboard_widget.cpp

file src/app/widgets/dashboard_widget.cpp · Applications

Layout, readouts and override wiring of the dashboard and its engine tiles.

Source src/app/widgets/dashboard_widget.cpp

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.

Namespace members

Declared or defined in this file and documented on the page of their namespace.

Member Description
nmeasim::app::format_position Formats a position as degrees and decimal minutes with hemisphere letters.
nmeasim::app::Parameter A value the operator can override or nudge while the simulation runs.

Summary

File-local functions

Name Description
format_coordinate() Formats one coordinate as degrees and decimal minutes with a hemisphere letter.
format_time() Formats a time point for the Time (UTC) tile.

File-local functions

format_coordinate()

QString format_coordinate(double degrees, int degree_digits, char positive, char negative)

Formats one coordinate as degrees and decimal minutes with a hemisphere letter.

Parameters

Name Type Description
degrees double Coordinate in degrees; the sign selects the letter.
degree_digits int Width of the zero-padded degrees: 2 for latitude, 3 for longitude.
positive char Letter for zero and positive values, N or E.
negative char Letter for negative values, S or W.

Returns QString: The coordinate, such as 37°59.028'N, with minutes rounded to three decimals and the rounding carried into the degrees, so the minutes never read 60.000. A value that rounds to zero takes the positive letter.

Declared in src/app/widgets/dashboard_widget.cpp:42

format_time()

QString format_time(std::chrono::system_clock::time_point time)

Formats a time point for the Time (UTC) tile.

Parameters

Name Type Description
time std::chrono::system_clock::time_point The time point, UTC; sub-millisecond parts are dropped.

Returns QString: The time as yyyy-MM-dd HH:mm:ss in UTC.

Declared in src/app/widgets/dashboard_widget.cpp:60