set device type

This commit is contained in:
2026-05-26 15:38:52 +08:00
parent acade5c35b
commit 6de6664aa0
4 changed files with 87 additions and 2 deletions
+5
View File
@@ -33,6 +33,7 @@ class AppController : public QObject
Q_PROPERTY(int currentReceiveFileIndex READ currentReceiveFileIndex NOTIFY receiveProgressChanged)
Q_PROPERTY(int totalReceiveFiles READ totalReceiveFiles NOTIFY receivingChanged)
Q_PROPERTY(QString currentReceiveSenderAlias READ currentReceiveSenderAlias NOTIFY receivingChanged)
Q_PROPERTY(QString deviceType READ deviceType WRITE setDeviceType NOTIFY deviceTypeChanged)
public:
explicit AppController(QObject* parent = nullptr);
@@ -72,6 +73,9 @@ public:
int totalReceiveFiles() const;
QString currentReceiveSenderAlias() const;
QString deviceType() const;
void setDeviceType(const QString& type);
Q_INVOKABLE void startDiscovery();
Q_INVOKABLE void stopDiscovery();
Q_INVOKABLE void refreshDevices();
@@ -110,6 +114,7 @@ signals:
void receivePinChanged();
void receivingChanged();
void receiveProgressChanged();
void deviceTypeChanged();
private slots:
void onDeviceDiscovered(const LocalSend::Device& device);