An item (with hard coded values) can be send to the server. Added signals for fetching and posting items to be triggered from the UI.

This commit is contained in:
2026-01-29 08:54:47 +01:00
parent e29cd0aebf
commit bc96a805f8
4 changed files with 52 additions and 2 deletions

View File

@ -16,13 +16,17 @@ class ServerCommunicator : public QObject {
QUrl url() const;
void setUrl(const QUrl& url);
public slots:
void fetchItems();
void postItems(); /// NEXT add item(s) as argument;
signals:
void urlChanged();
void itemsFetched(const QByteArray jsonDoc);
void itemsFetchFailure(const QString errorString);
void postRequestSuccessful(const QString message);
void postRequestFailure(const QString errorString);
private:
QNetworkAccessManager m_netManager;