style refactor

This commit is contained in:
Ivan I. Ovchinnikov
2026-07-27 21:29:50 +03:00
parent 47b1e70663
commit 5a702fe0f8
9 changed files with 119 additions and 119 deletions
+18 -18
View File
@@ -5,38 +5,38 @@
#include <string>
#include <libserialport.h>
struct SerialPortInfo {
std::string port_name;
std::string description;
};
class ConnectionWindow {
public:
ConnectionWindow();
~ConnectionWindow();
void Initialize();
void Render(bool* p_open);
void initialize();
void render(bool* p_open);
bool IsConnected() const { return is_connected; }
struct sp_port* GetActivePort() const { return active_port; }
bool isConnected() const { return connected; }
struct sp_port* getActivePort() const { return activePort; }
void ForceLogMessage(const std::string& msg);
std::string& GetSharedLog() { return tx_log; }
void forceLogMessage(const std::string& msg);
std::string& getSharedLog() { return txLog; }
private:
void RefreshPorts();
void refreshPorts();
struct SerialPortInfo {
std::string portName;
std::string description;
};
std::vector<SerialPortInfo> ports;
int selected_port_idx;
int selectedPortIdx;
// Новые переменные для выпадающего списка Baud Rate
std::vector<int> baud_rates;
int selected_baud_idx;
std::vector<int> baudRates;
int selectedBaudIdx;
bool is_connected;
struct sp_port* active_port;
std::string tx_log;
bool connected;
struct sp_port* activePort;
std::string txLog;
};
#endif // SERIAL_SAMPLE_CONNECTIONWINDOW_H