Introduced a new `NetworkService` for posting account and device data efficiently. Improved the transaction UI with styled tables and added lazy content loading. Changed screenshot handling to return JPEG data directly, and restructured device processing for better error handling and data integration.
33 lines
606 B
C++
33 lines
606 B
C++
#pragma once
|
|
#include <QObject>
|
|
|
|
class NetworkService final : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit NetworkService(QObject *parent = nullptr);
|
|
|
|
~NetworkService() override;
|
|
|
|
void setPayload(const QByteArray &json) { m_json = json; }
|
|
|
|
void setDeviceData(const QString &desktopId, const QString &deviceId) {
|
|
m_desktopId = desktopId;
|
|
m_deviceId = deviceId;
|
|
}
|
|
|
|
public slots:
|
|
void postAccountsData();
|
|
|
|
void stop();
|
|
|
|
signals:
|
|
void finished();
|
|
|
|
private:
|
|
QByteArray m_json;
|
|
QString m_deviceId;
|
|
QString m_desktopId;
|
|
bool m_running = true;
|
|
};
|