Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
NetworkSettingsWidget Class Referencefinal

A widget for configuring advanced network settings for the application. More...

#include <network_settings_widget.h>

Inheritance diagram for NetworkSettingsWidget:
Collaboration diagram for NetworkSettingsWidget:

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

WavelengthConfigconfig_
 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.
 
CyberLineEditserver_address_edit_
 Input field for the relay server address.
 
QSpinBox * server_port_edit_
 Spin box for the relay server port.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ NetworkSettingsWidget()

NetworkSettingsWidget::NetworkSettingsWidget ( QWidget * parent = nullptr)
explicit

Constructs the NetworkSettingsWidget. Initializes the UI, loads current settings from WavelengthConfig.

Parameters
parentOptional parent widget.
Here is the call graph for this function:

◆ ~NetworkSettingsWidget()

NetworkSettingsWidget::~NetworkSettingsWidget ( )
overridedefault

Default destructor.

Member Function Documentation

◆ LoadSettings()

void NetworkSettingsWidget::LoadSettings ( ) const

Loads the current network settings from WavelengthConfig and updates the UI elements.

Here is the caller graph for this function:

◆ SaveSettings()

void NetworkSettingsWidget::SaveSettings ( ) const

Saves the currently configured settings from the UI back to WavelengthConfig.

◆ SetupUi()

void NetworkSettingsWidget::SetupUi ( )
private

Creates and arranges all the UI elements (labels, inputs, layouts) for the widget.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ config_

WavelengthConfig* NetworkSettingsWidget::config_
private

Pointer to the WavelengthConfig singleton instance.

◆ connection_timeout_edit_

QSpinBox* NetworkSettingsWidget::connection_timeout_edit_
private

Spin box for the connection timeout in milliseconds.

◆ keep_alive_interval_edit_

QSpinBox* NetworkSettingsWidget::keep_alive_interval_edit_
private

Spin box for the keep-alive interval in milliseconds.

◆ max_reconnect_attempts_edit_

QSpinBox* NetworkSettingsWidget::max_reconnect_attempts_edit_
private

Spin box for the maximum number of reconnection attempts.

◆ server_address_edit_

CyberLineEdit* NetworkSettingsWidget::server_address_edit_
private

Input field for the relay server address.

◆ server_port_edit_

QSpinBox* NetworkSettingsWidget::server_port_edit_
private

Spin box for the relay server port.


The documentation for this class was generated from the following files: