outputs_page.cpp¶
file src/app/dialogs/outputs_page.cpp ยท Applications
Implementation of OutputsPage, the Outputs tab of the settings dialog.
Source src/app/dialogs/outputs_page.cpp
Builds the list and the editor widgets, moves values between the widgets and the page's copy of io::Profile::outputs, and checks the outputs before the dialog accepts them.
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 type aliases
| Name | Description |
|---|---|
Type |
Short name for the output transport type, used throughout this file. |
File-local functions
| Name | Description |
|---|---|
type_label() |
Returns the translated name of an output type, as shown in the Add menu and the list. |
make_port() |
Creates a spin box for a TCP or UDP port number, limited to [0, 65535]. |
File-local variables
| Name | Description |
|---|---|
kTypes |
Every output type, in the order the Add menu offers them. |
kBaudRates |
Line speeds offered in the baud rate list, in bit/s: the common rates from 1200 to 115200, including 4800 for NMEA 0183 and 38400 for IEC 61162-2 (AIS). |
File-local type aliases¶
Type¶
using Type = io::OutputConfig::Type
Short name for the output transport type, used throughout this file.
Declared in src/app/dialogs/outputs_page.cpp:33
File-local functions¶
type_label()¶
QString type_label(Type type)
Returns the translated name of an output type, as shown in the Add menu and the list.
Parameters
| Name | Type | Description |
|---|---|---|
type |
Type |
The output type. |
Returns QString: The name, such as TCP server or Log (timestamped); empty for a value outside the enumeration.
Declared in src/app/dialogs/outputs_page.cpp:49
make_port()¶
QSpinBox* make_port(QWidget* parent)
Creates a spin box for a TCP or UDP port number, limited to [0, 65535].
Keyboard tracking is off, so typing a port does not emit a value for every digit.
Parameters
| Name | Type | Description |
|---|---|---|
parent |
QWidget* |
Qt parent that owns the spin box. |
Returns QSpinBox*: The new spin box, owned by parent.
Declared in src/app/dialogs/outputs_page.cpp:77
File-local variables¶
kTypes¶
std::array<Type, 8> kTypes{ Type::TcpServer, Type::TcpClient, Type::Udp, Type::WebSocketServer, Type::Serial, Type::File, Type::Stdout, Type::Log, }
Every output type, in the order the Add menu offers them.
Holds every enumerator of io::OutputConfig::Type; a new type must be added here to be offered.
Declared in src/app/dialogs/outputs_page.cpp:39
kBaudRates¶
std::array<int, 8> kBaudRates{1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200}
Line speeds offered in the baud rate list, in bit/s: the common rates from 1200 to 115200, including 4800 for NMEA 0183 and 38400 for IEC 61162-2 (AIS).
Other rates can be typed.
Declared in src/app/dialogs/outputs_page.cpp:86