Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
network_settings_widget.h
Go to the documentation of this file.
1#ifndef ADVANCED_SETTINGS_WIDGET_H
2#define ADVANCED_SETTINGS_WIDGET_H
3
4#include <QWidget>
5
7class CyberLineEdit;
8class QSpinBox;
9
19class NetworkSettingsWidget final : public QWidget {
20 Q_OBJECT
21
22public:
28 explicit NetworkSettingsWidget(QWidget *parent = nullptr);
29
33 ~NetworkSettingsWidget() override = default;
34
38 void LoadSettings() const;
39
43 void SaveSettings() const;
44
45private:
49 void SetupUi();
50
63};
64
65#endif // ADVANCED_SETTINGS_WIDGET_H
A custom QLineEdit styled with a cyberpunk aesthetic.
Definition cyber_line_edit.h:13
void SaveSettings() const
Saves the currently configured settings from the UI back to WavelengthConfig.
Definition network_settings_widget.cpp:157
QSpinBox * connection_timeout_edit_
Spin box for the connection timeout in milliseconds.
Definition network_settings_widget.h:58
void SetupUi()
Creates and arranges all the UI elements (labels, inputs, layouts) for the widget.
Definition network_settings_widget.cpp:24
NetworkSettingsWidget(QWidget *parent=nullptr)
Constructs the NetworkSettingsWidget. Initializes the UI, loads current settings from WavelengthConfi...
Definition network_settings_widget.cpp:12
void LoadSettings() const
Loads the current network settings from WavelengthConfig and updates the UI elements.
Definition network_settings_widget.cpp:144
~NetworkSettingsWidget() override=default
Default destructor.
QSpinBox * keep_alive_interval_edit_
Spin box for the keep-alive interval in milliseconds.
Definition network_settings_widget.h:60
QSpinBox * server_port_edit_
Spin box for the relay server port.
Definition network_settings_widget.h:56
WavelengthConfig * config_
Pointer to the WavelengthConfig singleton instance.
Definition network_settings_widget.h:52
CyberLineEdit * server_address_edit_
Input field for the relay server address.
Definition network_settings_widget.h:54
QSpinBox * max_reconnect_attempts_edit_
Spin box for the maximum number of reconnection attempts.
Definition network_settings_widget.h:62
Manages application configuration settings using a singleton pattern.
Definition wavelength_config.h:36