14 #include "qalphacloud.h"
16 #include "qalphacloud_export.h"
24 class ConfigurationPrivate;
49 Q_PROPERTY(QUrl apiUrl READ apiUrl WRITE setApiUrl RESET resetApiUrl NOTIFY apiUrlChanged)
56 Q_PROPERTY(QString appId READ appId WRITE setAppId NOTIFY appIdChanged)
61 Q_PROPERTY(QString appSecret READ appSecret WRITE setAppSecret NOTIFY appSecretChanged)
70 Q_PROPERTY(
int requestTimeout READ requestTimeout WRITE setRequestTimeout RESET resetRequestTimeout NOTIFY requestTimeoutChanged)
77 Q_PROPERTY(
bool valid READ valid NOTIFY validChanged)
96 static Configuration *defaultConfiguration(QObject *parent =
nullptr);
107 static QString defaultConfigurationPath();
109 Q_REQUIRED_RESULT QUrl apiUrl()
const;
110 void setApiUrl(
const QUrl &apiUrl);
115 Q_SIGNAL
void apiUrlChanged(
const QUrl &apiUrl);
117 Q_REQUIRED_RESULT QString appId()
const;
118 void setAppId(
const QString &appId);
119 Q_SIGNAL
void appIdChanged(
const QString &appId);
121 Q_REQUIRED_RESULT QString appSecret()
const;
122 void setAppSecret(
const QString &appSecret);
123 Q_SIGNAL
void appSecretChanged(
const QString &appSecret);
125 Q_REQUIRED_RESULT
int requestTimeout()
const;
126 void setRequestTimeout(
int requestTimeout);
127 void resetRequestTimeout();
128 Q_SIGNAL
void requestTimeoutChanged(
int requestTimeout);
131 Q_SIGNAL
void validChanged(
bool valid);
140 bool loadFromFile(
const QString &path);
148 bool loadFromSettings(QSettings *settings);
158 std::unique_ptr<ConfigurationPrivate>
const d;
API configuration.
Definition: configuration.h:41
Utility namespace.
Definition: apirequest.cpp:24