2017-12-20 21:25:33 +01:00
|
|
|
#pragma once
|
2017-12-10 11:56:00 +01:00
|
|
|
|
2017-12-13 23:59:14 +01:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
|
|
#include <QNetworkReply>
|
2017-12-10 19:08:08 +01:00
|
|
|
#include <QVector>
|
|
|
|
|
|
2017-12-20 21:44:41 +01:00
|
|
|
#include "zeiterfassungcorelib_global.h"
|
2017-12-10 12:11:58 +01:00
|
|
|
#include "zeiterfassungreply.h"
|
2017-12-17 16:26:16 +01:00
|
|
|
|
|
|
|
|
class ZeiterfassungApi;
|
2017-12-10 12:11:58 +01:00
|
|
|
|
2017-12-20 21:44:41 +01:00
|
|
|
class ZEITERFASSUNGCORELIBSHARED_EXPORT GetProjectsReply : public ZeiterfassungReply
|
2017-12-10 11:56:00 +01:00
|
|
|
{
|
2017-12-10 12:11:58 +01:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
2017-12-10 11:56:00 +01:00
|
|
|
public:
|
2017-12-13 23:59:14 +01:00
|
|
|
GetProjectsReply(std::unique_ptr<QNetworkReply> &&reply, ZeiterfassungApi *zeiterfassung);
|
2017-12-10 18:59:36 +01:00
|
|
|
|
2017-12-17 16:26:16 +01:00
|
|
|
struct Project
|
|
|
|
|
{
|
|
|
|
|
QString label;
|
|
|
|
|
QString value;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const QVector<Project> &projects() const;
|
2017-12-10 18:59:36 +01:00
|
|
|
|
|
|
|
|
private Q_SLOTS:
|
|
|
|
|
void requestFinished();
|
|
|
|
|
|
|
|
|
|
private:
|
2017-12-13 23:59:14 +01:00
|
|
|
std::unique_ptr<QNetworkReply> m_reply;
|
2017-12-17 16:26:16 +01:00
|
|
|
QVector<Project> m_projects;
|
2017-12-10 11:56:00 +01:00
|
|
|
};
|