Files
utun2/tools/chatgui/src/settingsdialog.h
T
Evgeny 5e0100bfbe refactor: separate NAT detection from topology into standalone nat_detection module
- Extract NAT detection logic (~250 lines) from topo_group.c into new nat_detection.c
- NAT_DETECTION struct owns ping_pending, next_ping_req_id, allow_nat_check_local (removed from TOPO_GROUP)
- route_ping.* signatures changed: TOPO_GROUP* -> NAT_DETECTION* (+ TOPO_GROUP* where needed)
- topo_group.c now only dispatches BGP subcommands to nat_detection_* handlers
- UTUN_INSTANCE gets struct NAT_DETECTION* nat_det field (init/destroy in topo_groups_init/destroy)
- External callers (etcp_connections, etcp, control_server) call nat_detection_* directly
- nat_detection_cancel_for_conn / nat_detection_send_nat_info / nat_detection_link_ready / nat_detection_request_check_all
- route_ping_destroy_pending properly implemented (was dead code)
- TOPO_SUBCMD_PING_REQ/RESP moved from route_ping.h to topo_group.h (all BGP subcommands in one place)
- Tests updated: test_nat_detection, test_route_ping - both PASSED
- Build: auto(CORE_SOURCES+libutun) and cmake(chatgui/libutun)
2026-07-17 19:49:54 +03:00

40 lines
1010 B
C++

// settingsdialog.h — Settings dialog with category list
#pragma once
#include <QDialog>
#include <QListWidget>
#include <QStackedWidget>
#include <QPushButton>
#include <QLineEdit>
#include <QString>
class NetworkSettingsPage;
class DatabaseSettingsPage;
class StatusPage;
class NodesPage;
class DbManager;
class SettingsDialog : public QDialog {
Q_OBJECT
public:
explicit SettingsDialog(const QString& configPath, DbManager* db, QWidget* parent = nullptr);
private slots:
void onCategoryChanged(int row);
void onSave();
private:
void loadProfileFromConfig(const QString& path);
QString m_configPath;
QListWidget* m_categoryList;
QStackedWidget* m_pages;
QPushButton* m_saveBtn;
QLineEdit* m_nicknameEdit;
QString m_oldNickname;
NetworkSettingsPage* m_networkPage;
DatabaseSettingsPage* m_databasePage;
StatusPage* m_statusPage;
NodesPage* m_nodesPage;
};