2022-12-13 15:13:13 +01:00
|
|
|
// Copyright (C) 2022 The Qt Company Ltd.
|
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <utils/qtcprocess.h>
|
|
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
|
|
namespace Axivion::Internal {
|
|
|
|
|
|
|
|
|
|
class AxivionQuery
|
|
|
|
|
{
|
|
|
|
|
public:
|
2023-01-13 14:38:39 +01:00
|
|
|
enum QueryType {NoQuery, DashboardInfo, ProjectInfo, IssuesForFileList, RuleInfo};
|
2022-12-13 15:13:13 +01:00
|
|
|
explicit AxivionQuery(QueryType type, const QStringList ¶meters = {});
|
|
|
|
|
|
|
|
|
|
QString toString() const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
QueryType m_type = NoQuery;
|
|
|
|
|
QStringList m_parameters;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class AxivionQueryRunner : public QObject
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
public:
|
|
|
|
|
explicit AxivionQueryRunner(const AxivionQuery &query, QObject *parent = nullptr);
|
|
|
|
|
void start();
|
|
|
|
|
|
|
|
|
|
signals:
|
|
|
|
|
void finished();
|
|
|
|
|
void resultRetrieved(const QByteArray &json);
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
Utils::QtcProcess m_process;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // Axivion::Internal
|