Files
iDescriptor/src/virtuallocationwidget.h
T
uncor3 8d7b027992 implement settings, fix bugs and enhance ui
- Added new settings keys in SettingsManager for download path, auto-check updates, auto-raise window, switch to new device, unmount iFuse on exit, theme, and connection timeout.
- Implemented methods to get and set these new settings.
- Updated SettingsWidget to include UI elements for the new settings, including checkboxes and a combo box for theme selection.
- Refactored loadSettings and saveSettings methods to handle new settings.
- Removed deprecated settings UI elements to streamline the interface.
- Introduced VirtualLocation widget for managing virtual location settings with a map interface.
- Integrated QML for map visualization and input handling for latitude and longitude.
- Added functionality to apply virtual location settings to the connected device.
2025-10-17 06:56:02 +00:00

42 lines
979 B
C++

#ifndef VIRTUAL_LOCATION_H
#define VIRTUAL_LOCATION_H
#include "iDescriptor.h"
#include <QLineEdit>
#include <QPushButton>
#include <QQuickWidget>
#include <QTimer>
#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();
private:
QQuickWidget *m_quickWidget;
QLineEdit *m_latitudeEdit;
QLineEdit *m_longitudeEdit;
QPushButton *m_applyButton;
QTimer m_updateTimer;
bool m_updatingFromInput = false;
iDescriptorDevice *m_device;
};
#endif // VIRTUAL_LOCATION_H