implement ifuse for Linux

- Updated CMakeLists.txt to include platform-specific source files for macOS.
- Added new icon for disk unmount button.
- Modified resources.qrc to include the new icon.
- Implemented iFuse disk unmount button and manager classes for handling iFuse operations on Linux.
- Created iFuseWidget for managing iPhone disk mounting, including UI and process handling.
- Integrated iFuse functionality into the main application, allowing users to mount and unmount iPhone disks.
- Enhanced DeviceInfoWidget and other UI components for better user experience.
- Added support for displaying mounted iFuse paths in the status bar.
This commit is contained in:
uncor3
2025-09-30 04:45:15 +00:00
parent 6b9fdd9299
commit 8f095aab89
20 changed files with 693 additions and 47 deletions
+7 -4
View File
@@ -1,5 +1,6 @@
#include "diskusagewidget.h"
#include "iDescriptor.h"
#include <QApplication>
#include <QDebug>
#include <QFutureWatcher>
#include <QPainter>
@@ -26,24 +27,25 @@ void DiskUsageWidget::paintEvent(QPaintEvent *event)
Q_UNUSED(event);
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
QColor textColor = qApp->palette().text().color();
if (m_state == Loading) {
painter.setPen(Qt::black);
painter.setPen(textColor);
painter.drawText(rect(), Qt::AlignCenter, "Loading disk usage...");
return;
}
if (m_state == Error) {
painter.setPen(Qt::black);
painter.setPen(textColor);
painter.drawText(rect(), Qt::AlignCenter, "Error: " + m_errorMessage);
return;
}
// Title
painter.setPen(Qt::black);
QFont titleFont = font();
titleFont.setBold(true);
painter.setFont(titleFont);
painter.setPen(textColor);
QRectF titleRect(0, 5, width(), 20);
painter.drawText(titleRect, Qt::AlignHCenter | Qt::AlignTop, "Disk Usage");
painter.setFont(font()); // Reset font
@@ -91,7 +93,7 @@ void DiskUsageWidget::paintEvent(QPaintEvent *event)
drawSegment(m_freeSpace, freeColor);
// Legend
painter.setPen(Qt::black);
painter.setPen(textColor);
qreal legendY = barRect.bottom() + 15;
const int legendBoxSize = 10;
const int legendSpacing = 5;
@@ -102,6 +104,7 @@ void DiskUsageWidget::paintEvent(QPaintEvent *event)
QRectF(currentLegendX, legendY, legendBoxSize, legendBoxSize),
color);
currentLegendX += legendBoxSize + legendSpacing;
painter.setPen(textColor);
QFontMetrics fm(font());
QRect textRect = fm.boundingRect(text);