feat: Add recon state in GUI.

This commit is contained in:
sunwen
2024-05-29 14:29:58 +08:00
parent a0feff11e2
commit 23a747bde4
6 changed files with 89 additions and 23 deletions

View File

@@ -110,14 +110,16 @@ void ReconManager::checkReconConnection()
emit restartCreatReconRecord();
}
mIsConnected = response.good();
int state = 0;
if (mIsConnected)
{
cJSON* json = cJSON_Parse(response.message().data());
cJSON* stateProperty = cJSON_GetObjectItem(json, "State");
int state = stateProperty->valueint;
state = stateProperty->valueint;
cJSON_Delete(json);
qDebug()<<"Recon State:"<<state;
}
emit reconStateResponsed(mIsConnected, state);
}
void ReconManager::setPacsSettings(const QString& aClientAETitle, const QString& aServerAETitle, const QString& aServerIP, int aServerPort)

View File

@@ -39,6 +39,7 @@ signals:
void setMppsSettingsResponsed(bool aResult, const QVariant& aMessage);
void checkReconConnectionResponsed(bool aResult);
void getReconVersionResponsed(const QString& aResult);
void reconStateResponsed(bool aIsConnected, int aState);
private:
ReconClient* mReconClient;