mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
181a3365a2
- Added support for downloading apps using the ipatool-go library. - Updated AppDownloadBaseDialog to handle download progress and success notifications. - Simplified startDownloadProcess method to accept bundleId directly. - Introduced updateProgressBar slot for updating UI during downloads. - Modified AppsWidget to utilize asynchronous search and download processes. - Updated CMakeLists.txt to include new library and dependencies. - Add gallerywidget.cpp and gallerywidget.h to be implemented later
40 lines
1.1 KiB
C++
40 lines
1.1 KiB
C++
#include "devicemenuwidget.h"
|
|
#include "deviceinfowidget.h"
|
|
#include "fileexplorerwidget.h"
|
|
#include "iDescriptor.h"
|
|
#include <QDebug>
|
|
#include <QTabWidget>
|
|
#include <QVBoxLayout>
|
|
|
|
DeviceMenuWidget::DeviceMenuWidget(iDescriptorDevice *device, QWidget *parent)
|
|
: QWidget{parent}, device(device)
|
|
{
|
|
|
|
QWidget *centralWidget = new QWidget(this);
|
|
tabWidget = new QTabWidget(this);
|
|
tabWidget->tabBar()->hide();
|
|
QVBoxLayout *mainLayout = new QVBoxLayout(centralWidget);
|
|
mainLayout->addWidget(tabWidget);
|
|
|
|
tabWidget->addTab(new DeviceInfoWidget(device, this), "");
|
|
|
|
// FIXME:race condition with lockdownd_client_new_with_handshake
|
|
// FileExplorerWidget *explorer = new FileExplorerWidget(device, this);
|
|
// explorer->setMinimumHeight(300);
|
|
|
|
// tabWidget->addTab(explorer, "");
|
|
|
|
setLayout(mainLayout);
|
|
}
|
|
|
|
void DeviceMenuWidget::switchToTab(const QString &tabName)
|
|
{
|
|
if (tabName == "Info") {
|
|
tabWidget->setCurrentIndex(0);
|
|
} else if (tabName == "Files") {
|
|
tabWidget->setCurrentIndex(1);
|
|
} else {
|
|
qDebug() << "Tab not found:" << tabName;
|
|
}
|
|
}
|