Files
iDescriptor/src/virtuallocationwidget.h
T
uncor3 da559349e8 fix bugs & add new dialogs
- Introduced `CredDialog` to prompt users for access to secure backends (Windows Credential Manager or Secret Service).
- Integrated `CredDialog` into `AppsWidget` initialization flow, allowing users to skip signing in.
- Updated `SettingsManager` to manage user preferences for showing the keychain dialog.
- Enhanced `DevDiskManager` and related classes to utilize a new method for creating device disk image paths.
- Refactored `VirtualLocation` to support saving and displaying recent locations.
- Improved UI responsiveness and layout adjustments across various widgets.
- Cleaned up unused code and comments for better maintainability.
2025-11-10 01:01:20 +00:00

72 lines
2.2 KiB
C++

/*
* iDescriptor: A free and open-source idevice management tool.
*
* Copyright (C) 2025 Uncore <https://github.com/uncor3>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef VIRTUAL_LOCATION_H
#define VIRTUAL_LOCATION_H
#include "devdiskimagehelper.h"
#include "iDescriptor.h"
#include <QGroupBox>
#include <QLineEdit>
#include <QPushButton>
#include <QQuickWidget>
#include <QTimer>
#include <QVBoxLayout>
#include <QWidget>
class VirtualLocation : public QWidget
{
Q_OBJECT
public:
explicit VirtualLocation(iDescriptorDevice *device,
QWidget *parent = nullptr);
signals:
void locationChanged(double latitude, double longitude);
public slots:
void updateInputsFromMap(double latitude, double longitude);
private slots:
void onQuickWidgetStatusChanged(QQuickWidget::Status status);
void onInputChanged();
void onMapCenterChanged();
void onApplyClicked();
void updateMapFromInputs();
void onRecentLocationClicked(double latitude, double longitude);
private:
void loadRecentLocations(QVBoxLayout *layout);
void refreshRecentLocations();
void addLocationButtons(QLayout *layout,
QList<QVariantMap> recentLocations);
QQuickWidget *m_quickWidget;
QLineEdit *m_latitudeEdit;
QLineEdit *m_longitudeEdit;
QPushButton *m_applyButton;
QTimer m_updateTimer;
bool m_updatingFromInput = false;
iDescriptorDevice *m_device;
QVBoxLayout *m_rightLayout = nullptr;
QGroupBox *m_recentGroup = nullptr;
};
#endif // VIRTUAL_LOCATION_H