|
Wavelength
Privacy-focused, cross-platform, and open-source communication application
|
A widget for configuring advanced network settings for the application. More...
#include <network_settings_widget.h>
Public Member Functions | |
| void | LoadSettings () const |
| Loads the current network settings from WavelengthConfig and updates the UI elements. | |
| NetworkSettingsWidget (QWidget *parent=nullptr) | |
| Constructs the NetworkSettingsWidget. Initializes the UI, loads current settings from WavelengthConfig. | |
| void | SaveSettings () const |
| Saves the currently configured settings from the UI back to WavelengthConfig. | |
| ~NetworkSettingsWidget () override=default | |
| Default destructor. | |
Private Member Functions | |
| void | SetupUi () |
| Creates and arranges all the UI elements (labels, inputs, layouts) for the widget. | |
Private Attributes | |
| WavelengthConfig * | config_ |
| Pointer to the WavelengthConfig singleton instance. | |
| QSpinBox * | connection_timeout_edit_ |
| Spin box for the connection timeout in milliseconds. | |
| QSpinBox * | keep_alive_interval_edit_ |
| Spin box for the keep-alive interval in milliseconds. | |
| QSpinBox * | max_reconnect_attempts_edit_ |
| Spin box for the maximum number of reconnection attempts. | |
| CyberLineEdit * | server_address_edit_ |
| Input field for the relay server address. | |
| QSpinBox * | server_port_edit_ |
| Spin box for the relay server port. | |
A widget for configuring advanced network settings for the application.
This widget provides UI elements (line edits, spin boxes) to allow the user to customize network parameters such as the relay server address and port, connection timeout, keep-alive interval, and maximum reconnection attempts. It interacts with the WavelengthConfig singleton to load and save these settings. Changes made via the UI are saved back to WavelengthConfig when SaveSettings() is called.
|
explicit |
Constructs the NetworkSettingsWidget. Initializes the UI, loads current settings from WavelengthConfig.
| parent | Optional parent widget. |
|
overridedefault |
Default destructor.
| void NetworkSettingsWidget::LoadSettings | ( | ) | const |
Loads the current network settings from WavelengthConfig and updates the UI elements.
| void NetworkSettingsWidget::SaveSettings | ( | ) | const |
Saves the currently configured settings from the UI back to WavelengthConfig.
|
private |
Creates and arranges all the UI elements (labels, inputs, layouts) for the widget.
|
private |
Pointer to the WavelengthConfig singleton instance.
|
private |
Spin box for the connection timeout in milliseconds.
|
private |
Spin box for the keep-alive interval in milliseconds.
|
private |
Spin box for the maximum number of reconnection attempts.
|
private |
Input field for the relay server address.
|
private |
Spin box for the relay server port.