Skip to content

outputs_widget.cpp

file src/app/widgets/outputs_widget.cpp ยท Applications

Table and status lights of the Outputs panel.

Source src/app/widgets/outputs_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::state_color Returns the colour of an output state in the current theme: green open, amber opening, red failed, grey closed.

Summary

File-local enumerations

Name Description
Column Columns of the outputs table, in display order.

File-local functions

Name Description
dot_icon() Draws the status light of an output.

File-local variables

Name Description
kRefreshIntervalMs Period of the table refresh, in milliseconds: twice a second, independent of the simulation step.

File-local enumerations

Column

enum Column

Columns of the outputs table, in display order.

Enumerator Value Description
Description 0 The transport's description, naming the output.
Status The transport state with a coloured light.
Clients Connected clients, as io::Transport::client_count reports them.
Lines Lines handed to the open transport, sentences or state messages as the encoding decides; io::OutputChannel::lines_sent.
Bytes Bytes written, summed over every consumer.
LastError Message of the most recent failure; empty when none occurred.
ColumnCount Number of columns, not a column.

Declared in src/app/widgets/outputs_widget.cpp:23

File-local functions

dot_icon()

QIcon dot_icon(const QColor& color)

Draws the status light of an output.

Parameters

Name Type Description
color const QColor& Fill colour; the outline is a darker shade of it.

Returns QIcon: A 12 by 12 pixel icon with a disc of radius 4 on a transparent background.

Declared in src/app/widgets/outputs_widget.cpp:45

File-local variables

kRefreshIntervalMs

int kRefreshIntervalMs{500}

Period of the table refresh, in milliseconds: twice a second, independent of the simulation step.

Declared in src/app/widgets/outputs_widget.cpp:20