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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user