Skip to content

status_led.cpp

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

Implementation of StatusLed: its size, blinking and painting.

Source src/app/widgets/status_led.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.

Summary

File-local functions

Name Description
caption_font() Derives the caption font from the widget font.

File-local variables

Name Description
kLedDiameter Diameter of the light, in pixels; its glow reaches one diameter from the centre.
kGap Space between the light and the caption, in pixels.
kMargin Space left of the light and right of the caption, in pixels.
kBlinkIntervalMs Duration of each lit and unlit phase while blinking, in milliseconds: one flash a second.

File-local functions

caption_font()

QFont caption_font(const QFont& base)

Derives the caption font from the widget font.

Parameters

Name Type Description
base const QFont& The widget font.

Returns QFont: base in bold at 85 % of its point size, with letters spaced at 108 %.

Declared in src/app/widgets/status_led.cpp:33

File-local variables

kLedDiameter

int kLedDiameter{9}

Diameter of the light, in pixels; its glow reaches one diameter from the centre.

A user-interface choice for a light that fits in the status bar.

Declared in src/app/widgets/status_led.cpp:21

kGap

int kGap{6}

Space between the light and the caption, in pixels.

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

kMargin

int kMargin{6}

Space left of the light and right of the caption, in pixels.

Declared in src/app/widgets/status_led.cpp:25

kBlinkIntervalMs

int kBlinkIntervalMs{500}

Duration of each lit and unlit phase while blinking, in milliseconds: one flash a second.

Declared in src/app/widgets/status_led.cpp:27