mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
feat: recognize recovery devices & add heic support
- Added RecoveryDeviceSidebarItem class for managing recovery devices in the sidebar. - Unified device selection structure with DeviceSelection to handle normal, recovery, and pending devices. - Updated DeviceSidebarWidget to support adding and removing recovery devices. - Refactored sidebar navigation and selection handling to accommodate new device types. refactor: Enhance Disk Usage Widget UI - Improved styling and layout of disk usage bars for better visual representation. - Removed unnecessary paint event override and adjusted layout settings. - Added object names for easier styling and debugging. fix: Update File Explorer Widget for AFC2 Support - Integrated a stacked widget to switch between normal and AFC2 explorers. - Simplified sidebar setup and item handling for better maintainability. - Connected sidebar item clicks to switch between AFC explorers. feat: Implement InfoLabel for Copying Text - Created InfoLabel class to display text that can be copied to the clipboard. - Added hover effects and temporary text change on copy action. chore: Clean up Unused Code and Comments - Removed commented-out code and unnecessary forward declarations across multiple files. - Streamlined includes and improved code readability. fix: Improve Recovery Device Info Widget - Updated RecoveryDeviceInfoWidget to display device information more clearly. - Added error handling for recovery mode exit operations with user feedback. feat: Add Responsive QLabel for Image Display - Introduced ResponsiveQLabel to handle responsive image scaling in the UI. - Replaced static image display with responsive label in JailbrokenWidget for better adaptability.
This commit is contained in:
+10
-14
@@ -1,5 +1,6 @@
|
||||
#include "jailbrokenwidget.h"
|
||||
#include "appcontext.h"
|
||||
#include "responsiveqlabel.h"
|
||||
#include "sshterminalwidget.h"
|
||||
|
||||
#ifdef __linux__
|
||||
@@ -12,8 +13,6 @@
|
||||
#include "iDescriptor.h"
|
||||
#include <QButtonGroup>
|
||||
#include <QDebug>
|
||||
#include <QGraphicsPixmapItem>
|
||||
#include <QGraphicsView>
|
||||
#include <QGroupBox>
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -29,18 +28,15 @@ JailbrokenWidget::JailbrokenWidget(QWidget *parent) : QWidget{parent}
|
||||
mainLayout->setContentsMargins(2, 2, 2, 2);
|
||||
mainLayout->setSpacing(2);
|
||||
|
||||
QGraphicsScene *scene = new QGraphicsScene(this);
|
||||
QGraphicsPixmapItem *pixmapItem =
|
||||
new QGraphicsPixmapItem(QPixmap(":/resources/iphone.png"));
|
||||
scene->addItem(pixmapItem);
|
||||
// Create responsive image label
|
||||
ResponsiveQLabel *deviceImageLabel = new ResponsiveQLabel(this);
|
||||
deviceImageLabel->setPixmap(QPixmap(":/resources/iphone.png"));
|
||||
deviceImageLabel->setMinimumWidth(200);
|
||||
deviceImageLabel->setSizePolicy(QSizePolicy::Ignored,
|
||||
QSizePolicy::Expanding);
|
||||
deviceImageLabel->setStyleSheet("background: transparent; border: none;");
|
||||
|
||||
QGraphicsView *graphicsView = new ResponsiveGraphicsView(scene, this);
|
||||
graphicsView->setRenderHint(QPainter::Antialiasing);
|
||||
graphicsView->setMinimumWidth(200);
|
||||
graphicsView->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Expanding);
|
||||
graphicsView->setStyleSheet("background:transparent; border: none;");
|
||||
|
||||
mainLayout->addWidget(graphicsView, 1);
|
||||
mainLayout->addWidget(deviceImageLabel, 1);
|
||||
|
||||
// Connect to AppContext for device events
|
||||
connect(AppContext::sharedInstance(), &AppContext::deviceAdded, this,
|
||||
@@ -48,7 +44,7 @@ JailbrokenWidget::JailbrokenWidget(QWidget *parent) : QWidget{parent}
|
||||
connect(AppContext::sharedInstance(), &AppContext::deviceRemoved, this,
|
||||
&JailbrokenWidget::onWiredDeviceRemoved);
|
||||
|
||||
#ifdef __linux____
|
||||
#ifdef __linux__
|
||||
m_wirelessProvider = new AvahiService(this);
|
||||
connect(m_wirelessProvider, &AvahiService::deviceAdded, this,
|
||||
&JailbrokenWidget::onWirelessDeviceAdded);
|
||||
|
||||
Reference in New Issue
Block a user