mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
implement ssh connection
- Updated AppWidget to utilize QStackedWidget for better UI management, including loading and error states. - Removed unnecessary includes and improved the organization of private methods in AppWidget. - Enhanced DevDiskImagesWidget UI by adding a settings button and improving layout with shadows. - Refactored DeviceInfoWidget to use QGroupBox for better visual grouping of device information. - Replaced QProcess with libssh for SSH connections in JailbrokenWidget, improving reliability and performance. - Added a timer to check SSH data and handle input/output more effectively. - Improved SettingsManager to manage settings dialog display and lifecycle. - Refactored SettingsWidget to be a QDialog for better user experience and removed unnecessary buttons. - Adjusted layout margins across various widgets for a cleaner UI.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "settingsmanager.h"
|
||||
#include "settingswidget.h"
|
||||
#include <QDebug>
|
||||
#include <QSettings>
|
||||
|
||||
@@ -10,6 +11,23 @@ SettingsManager *SettingsManager::sharedInstance()
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void SettingsManager::showSettingsDialog()
|
||||
{
|
||||
if (m_dialog) {
|
||||
m_dialog->raise();
|
||||
m_dialog->activateWindow();
|
||||
return;
|
||||
}
|
||||
|
||||
m_dialog = new SettingsWidget();
|
||||
m_dialog->setWindowTitle("Settings - iDescriptor");
|
||||
m_dialog->setModal(true);
|
||||
m_dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
connect(m_dialog, &QObject::destroyed, [this]() { m_dialog = nullptr; });
|
||||
|
||||
m_dialog->show();
|
||||
}
|
||||
|
||||
SettingsManager::SettingsManager(QObject *parent) : QObject{parent}
|
||||
{
|
||||
m_settings = new QSettings(this);
|
||||
|
||||
Reference in New Issue
Block a user