mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
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:
@@ -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
|
||||
};
|
||||
Reference in New Issue
Block a user