AmdaProvider.h
44 lines
| 1.2 KiB
| text/x-c
|
CLexer
Alexandre Leroux
|
r348 | #ifndef SCIQLOP_AMDAPROVIDER_H | ||
#define SCIQLOP_AMDAPROVIDER_H | ||||
#include "AmdaGlobal.h" | ||||
#include <Data/IDataProvider.h> | ||||
#include <QLoggingCategory> | ||||
r693 | #include <map> | |||
Alexandre Leroux
|
r348 | |||
Q_DECLARE_LOGGING_CATEGORY(LOG_AmdaProvider) | ||||
r358 | class QNetworkReply; | |||
r693 | class QNetworkRequest; | |||
r358 | ||||
Alexandre Leroux
|
r348 | /** | ||
* @brief The AmdaProvider class is an example of how a data provider can generate data | ||||
*/ | ||||
class SCIQLOP_AMDA_EXPORT AmdaProvider : public IDataProvider { | ||||
r695 | Q_OBJECT | |||
Alexandre Leroux
|
r348 | public: | ||
explicit AmdaProvider(); | ||||
Alexandre Leroux
|
r656 | std::shared_ptr<IDataProvider> clone() const override; | ||
Alexandre Leroux
|
r348 | |||
r510 | void requestDataLoading(QUuid acqIdentifier, const DataProviderParameters ¶meters) override; | |||
Alexandre Leroux
|
r348 | |||
r510 | void requestDataAborting(QUuid acqIdentifier) override; | |||
r388 | ||||
r693 | private slots: | |||
r695 | void onReplyDownloadProgress(QUuid acqIdentifier, | |||
std::shared_ptr<QNetworkRequest> networkRequest, double progress); | ||||
r693 | ||||
Alexandre Leroux
|
r348 | private: | ||
r471 | void retrieveData(QUuid token, const SqpRange &dateTime, const QVariantHash &data); | |||
r693 | ||||
void updateRequestProgress(QUuid acqIdentifier, std::shared_ptr<QNetworkRequest> request, | ||||
double progress); | ||||
std::map<QUuid, std::map<std::shared_ptr<QNetworkRequest>, double> > | ||||
m_AcqIdToRequestProgressMap; | ||||
Alexandre Leroux
|
r348 | }; | ||
#endif // SCIQLOP_AMDAPROVIDER_H | ||||