Basic JSON RESTful client fetching items from a local server at application start and adding them to the model.
This commit is contained in:
@ -10,6 +10,7 @@ class QString;
|
||||
|
||||
class TableModel;
|
||||
class GeneralSortFilterModel;
|
||||
class ServerCommunicator;
|
||||
|
||||
class GenericCore : public QObject {
|
||||
Q_OBJECT
|
||||
@ -32,6 +33,14 @@ class GenericCore : public QObject {
|
||||
void importCSVFile(const QString& filePath);
|
||||
bool exportCSVFile(const QString& filePath);
|
||||
|
||||
bool isSyncServerSetup() const;
|
||||
|
||||
public slots:
|
||||
void onItemsFetched(const QByteArray jsonDoc);
|
||||
void onItemsFetchFailure(const QString errorString);
|
||||
void onPostRequestSuccessful(const QString message);
|
||||
void onPostRequestFailure(const QString errorString);
|
||||
|
||||
signals:
|
||||
void displayStatusMessage(QString message);
|
||||
|
||||
@ -46,6 +55,10 @@ class GenericCore : public QObject {
|
||||
void initModelData();
|
||||
|
||||
QString getMaintenanceToolFilePath() const;
|
||||
|
||||
/// Network communication
|
||||
std::unique_ptr<ServerCommunicator> m_serverCommunicator;
|
||||
void setupServerConfiguration();
|
||||
};
|
||||
|
||||
#endif // GENERICCORE_H
|
||||
|
||||
Reference in New Issue
Block a user