Commit 975f7946 authored by Vitaly Fanaskov's avatar Vitaly Fanaskov Committed by Volker Krause

Add a method to get a short name of a telemetry mode

Reviewers: vkrause

Reviewed By: vkrause

Differential Revision:
parent 85e6cc1c
......@@ -118,6 +118,24 @@ int FeedbackConfigUiController::telemetryModeToIndex(Provider::TelemetryMode mod
return std::distance(d->telemetryModeMap.begin(), it);
QString FeedbackConfigUiController::telemetryModeName(int telemetryIndex) const
switch (telemetryIndexToMode(telemetryIndex)) {
case Provider::NoTelemetry:
return tr("No telemetry");
case Provider::BasicSystemInformation:
return tr("Basic system information");
case Provider::BasicUsageStatistics:
return tr("Basic usage statistics");
case Provider::DetailedSystemInformation:
return tr("Detailed system information");
case Provider::DetailedUsageStatistics:
return tr("Detailed usage statistics");
return {};
QString FeedbackConfigUiController::telemetryModeDescription(int telemetryIndex) const
const auto name = d->appName();
......@@ -64,6 +64,8 @@ public:
/*! Convert telemetry mode to slider index. */
Q_INVOKABLE int telemetryModeToIndex(KUserFeedback::Provider::TelemetryMode mode) const;
/*! Telemetry mode short name. */
Q_INVOKABLE QString telemetryModeName(int telemetryIndex) const;
/*! Telemetry mode explanation text. */
Q_INVOKABLE QString telemetryModeDescription(int telemetryIndex) const;
/*! Detailed information about the data sources of the given telemetry mode index. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment