add CableInfoWidget

- Implement CableInfoWidget to display detailed information about connected cables.
- Create associated methods for initializing cable info, analyzing data, and updating the UI.
- Introduce get_cable_info function to retrieve cable details from the device.
- Replace ClickableWidget with iDescriptor-ui.h in DeviceSidebarWidget and ToolboxWidget.
- Update ToolboxWidget to include CableInfoWidget as a selectable tool.
- Remove unused ClickableWidget header file.
This commit is contained in:
uncor3
2025-10-01 15:07:44 +00:00
parent 8f095aab89
commit 94f85bd8fe
10 changed files with 652 additions and 173 deletions
+45
View File
@@ -1,6 +1,8 @@
#pragma once
#include <QGraphicsView>
#include <QMainWindow>
#include <QMouseEvent>
#include <QWidget>
#define COLOR_GREEN QColor(0, 180, 0) // Green
#define COLOR_ORANGE QColor(255, 140, 0) // Orange
@@ -26,6 +28,49 @@ protected:
}
};
class ClickableWidget : public QWidget
{
Q_OBJECT
public:
using QWidget::QWidget;
signals:
void clicked();
protected:
// On mouse release, if the click is inside the widget, emit the clicked
// signal
void mouseReleaseEvent(QMouseEvent *event) override
{
if (event->button() == Qt::LeftButton &&
rect().contains(event->pos())) {
emit clicked();
}
QWidget::mouseReleaseEvent(event);
}
};
#ifdef Q_OS_MAC
void setupMacOSWindow(QMainWindow *window);
#endif
enum class iDescriptorTool {
Airplayer,
RealtimeScreen,
EnterRecoveryMode,
MountDevImage,
VirtualLocation,
Restart,
Shutdown,
RecoveryMode,
QueryMobileGestalt,
DeveloperDiskImages,
WirelessFileImport,
MountIphone,
CableInfoWidget,
TouchIdTest,
FaceIdTest,
UnmountDevImage,
Unknown,
iFuse
};