16 std::string host_name;
20 typedef std::shared_ptr<EcGuiNet> Ptr;
22 explicit EcGuiNet(QWidget *parent =
nullptr);
28 void copy_files_network(
const QStringList &files_list);
29 void open_firmware_config();
30 void start_firmware_update();
31 void stop_firmware_update();
32 void set_repl_config(
const QString& repl_bin);
33 void set_protocol_enabled(
bool enable);
34 void set_net_enabled(
bool enable);
38 void ec_master_processFinished(
int, QProcess::ExitStatus);
39 void server_processFinished(
int, QProcess::ExitStatus);
40 void OnMouseClicked(QTreeWidgetItem* item,
int column);
41 void OnPasswordEntered();
42 void OnPasswordChanged();
43 void OnProtocolChanged();
44 void stopping_network(
bool force_stop=
false);
45 void connect_to_network();
48 bool eventFilter( QObject* o, QEvent* e );
52 QTreeWidget * _net_tree_wid;
53 QTreeWidgetItem* _net_item;
58 QProcess *_ec_master_process,*_server_process;
59 QStringList _ssh_command;
60 QString _ec_master_stdout,_server_stdout;
61 QString _ec_master_file_path,_server_file_path,_gui_file_path;
62 QFile *_ec_master_file=
nullptr,*_server_file=
nullptr;
63 QTextStream *_ec_master_stream,*_server_stream;
64 QString _server_username,_server_hostname,_server_port,_server_protocol,_server_pwd;
65 QString _real_server_username;
66 QString _master_terminal_pid=
"",_server_terminal_pid=
"",_gui_terminal_pid=
"";
68 QAction *_connect_action;
70 QComboBox * _protocol_combobox;
71 bool _open_config_file=
false;
73 bool create_ssh_cmd(QProcess *process,QString& stdout);
74 QString find_running_process(QProcess * process,QString bin_name,QString& stdout);
75 QString find_process(QProcess * process,QString bin_name,QString& stdout);
76 void start_process(QProcess *process,QString bin_file_path,QString option);
77 void kill_process(QProcess *process,QString bin_name,QString& stdout);
79 void kill_view_process(QString &terminal_pid);
80 void view_process(
const QString &file_path,QString &terminal_pid);
81 bool start_master_process(
const QString &bin_file_name,
82 const QString &option,
84 void ec_master_readyStdO();
85 void view_master_process();
86 void server_readyStdO();
87 void view_server_process();
88 void set_ec_network();
89 void view_gui_process();
90 bool copy_config_file();
91 void save_config_file();
92 void close_net_setup();