Refactor network device management and SSH terminal integration

- Removed the old NetworkDeviceManager class and replaced it with a new NetworkDeviceProvider class to streamline network device handling.
- Updated various widgets (NetworkDevicesToConnectWidget, NetworkDevicesWidget, SSHTerminalTool) to utilize the new NetworkDeviceProvider for device management.
- Introduced a new SSHTerminalTool class to manage SSH connections, replacing the OpenSSHTerminalWidget.
- Enhanced device selection UI to support both wired and wireless devices, including manual IP connection options.
- Improved signal-slot connections for device addition and removal events.
- Cleaned up unnecessary includes and code related to the old SSH terminal widget.
- Added checks for device jailbreak status during SSH connection attempts.
This commit is contained in:
uncor3
2026-03-20 20:25:24 +03:00
parent 61b049d8dc
commit 1023777642
19 changed files with 617 additions and 602 deletions
+3 -26
View File
@@ -18,29 +18,6 @@
*/
#include "jailbrokenwidget.h"
#include "appcontext.h"
#include "opensshterminalwidget.h"
#include "responsiveqlabel.h"
#ifdef __linux__
#include "core/services/avahi/avahi_service.h"
#else
#include "core/services/dnssd/dnssd_service.h"
#endif
#include "iDescriptor-ui.h"
#include "iDescriptor.h"
#include <QApplication>
#include <QButtonGroup>
#include <QDebug>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QRadioButton>
#include <QScrollArea>
#include <QVBoxLayout>
#include <QWidget>
JailbrokenWidget::JailbrokenWidget(QWidget *parent) : QWidget{parent}
{
@@ -50,7 +27,7 @@ JailbrokenWidget::JailbrokenWidget(QWidget *parent) : QWidget{parent}
// Define all the tools you want to display
QList<JailbreakToolInfo> tools;
tools.append({"Open SSH Terminal", "Connect to your device via SSH",
tools.append({"SSH Terminal", "Connect to your device via SSH",
":/resources/icons/TablerDatabaseExport.png"});
tools.append({"More Tools Coming", "New features will be added soon",
":/resources/icons/TablerDatabaseExport.png",
@@ -119,7 +96,7 @@ JailbrokenWidget::createJailbreakTool(const JailbreakToolInfo &info)
layout->addWidget(descLabel);
// TODO: Connect the clicked signal to a slot
if (info.title == "Open SSH Terminal") {
if (info.title == "SSH Terminal") {
iconLabel->setIcon(QIcon(":/resources/icons/BxBxsTerminal.png"));
connect(b, &ClickableWidget::clicked, this, [this]() {
@@ -128,7 +105,7 @@ JailbrokenWidget::createJailbreakTool(const JailbreakToolInfo &info)
m_sshTerminalWidget->activateWindow();
return;
}
m_sshTerminalWidget = new OpenSSHTerminalWidget();
m_sshTerminalWidget = new SSHTerminalTool();
m_sshTerminalWidget->setAttribute(Qt::WA_DeleteOnClose);
m_sshTerminalWidget->show();
m_sshTerminalWidget->raise();