QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ComponentInformationTranslation Class Reference

#include <ComponentInformationTranslation.h>

Inheritance diagram for ComponentInformationTranslation:
Collaboration diagram for ComponentInformationTranslation:

Signals

void downloadComplete (QString translatedJsonTempFile, QString errorMsg)

Public Member Functions

 ComponentInformationTranslation (QObject *parent, QGCCachedFileDownload *cachedFileDownload)
bool downloadAndTranslate (const QString &summaryJsonFile, const QString &toTranslateJsonFile, int maxCacheAgeSec, const QString &componentName)
QString translateJsonUsingTS (const QString &toTranslateJsonFile, const QString &tsFile)

Detailed Description

Definition at line 9 of file ComponentInformationTranslation.h.

Constructor & Destructor Documentation

◆ ComponentInformationTranslation()

ComponentInformationTranslation::ComponentInformationTranslation ( QObject * parent,
QGCCachedFileDownload * cachedFileDownload )

Member Function Documentation

◆ downloadAndTranslate()

bool ComponentInformationTranslation::downloadAndTranslate ( const QString & summaryJsonFile,
const QString & toTranslateJsonFile,
int maxCacheAgeSec,
const QString & componentName )

Download translation file according to the currently set locale and translate the json file. emits downloadComplete() when done (with a temporary file that should be deleted)

Parameters
summaryJsonFilejson file with url's to translation files (.ts)
toTranslateJsonFilejson file to be translated
maxCacheAgeSecMaximum age of cached item in seconds
Returns
true: Asynchronous download has started, false: Download initialization failed

Definition at line 22 of file ComponentInformationTranslation.cc.

References QGCCachedFileDownload::finished().

◆ downloadComplete

void ComponentInformationTranslation::downloadComplete ( QString translatedJsonTempFile,
QString errorMsg )
signal

◆ translateJsonUsingTS()

QString ComponentInformationTranslation::translateJsonUsingTS ( const QString & toTranslateJsonFile,
const QString & tsFile )

The documentation for this class was generated from the following files: