Skip to content

main_window.cpp

file src/app/main_window.cpp ยท Applications

Implementation of MainWindow: building the actions, menus, toolbar, docks and status bar, wiring them to the io::SimulationRunner, and the slots behind every action.

Source src/app/main_window.cpp

The signal connections made in the constructor:

  • map::MapWidget: position_picked, destination_picked and destination_cleared edit the vessel and the destination; view_changed stores the zoom level.
  • DashboardWidget: override_changed, fix_changed, satellites_changed and engine_changed go to the delta source, and are ignored in track and replay mode.
  • theme::Theme::changed repaints the icons, the lights and the map.
  • io::SimulationRunner: ticked refreshes the dashboard, map, transport controls and status bar; sentence_emitted feeds the console; started and stopped update the run controls; paused_changed ticks Pause; recording_changed ticks Record log...; finished and output_error show a message in the status bar.

Status bar messages last three seconds for confirmations, five for the end of a track or log and the recording state, and ten for errors.

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::Parameter A value the operator can override or nudge while the simulation runs.