Skip to content

vessel_page.cpp

file src/app/dialogs/vessel_page.cpp ยท Applications

Implementation of VesselPage, the Vessel tab of the settings dialog.

Source src/app/dialogs/vessel_page.cpp

Builds the engine table and the AIS static data form and moves values between them and the seed of an io::Profile.

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.

Summary

File-local functions

Name Description
make_double() Creates a floating-point spin box configured for this page.
make_int() Creates an integer spin box configured for this page, with keyboard tracking off like make_double.

File-local functions

make_double()

QDoubleSpinBox* make_double(
    QWidget* parent,
    double minimum,
    double maximum,
    double step,
    int decimals,
    const QString& suffix = {})

Creates a floating-point spin box configured for this page.

Keyboard tracking is off, so the value changes when the operator finishes typing rather than on every keystroke.

Parameters

Name Type Description
parent QWidget* The owner of the new spin box; must not be null, or the spin box leaks.
minimum double The smallest value the spin box accepts.
maximum double The largest value the spin box accepts.
step double The change applied by the arrow buttons and keys.
decimals int The number of decimals shown; values are rounded to it.
suffix const QString& Unit text shown after the value, such as " m"; empty for none.

Returns QDoubleSpinBox*: The new spin box, owned by parent.

Declared in src/app/dialogs/vessel_page.cpp:38

make_int()

QSpinBox* make_int(QWidget* parent, int minimum, int maximum)

Creates an integer spin box configured for this page, with keyboard tracking off like make_double.

Parameters

Name Type Description
parent QWidget* The owner of the new spin box; must not be null, or the spin box leaks.
minimum int The smallest value the spin box accepts.
maximum int The largest value the spin box accepts.

Returns QSpinBox*: The new spin box, owned by parent.

Declared in src/app/dialogs/vessel_page.cpp:56