KUserFeedback

localeinfosource.cpp
1/*
2 SPDX-FileCopyrightText: 2017 Volker Krause <vkrause@kde.org>
3
4 SPDX-License-Identifier: MIT
5*/
6
7#include "localeinfosource.h"
8
9#include <QLocale>
10#include <QVariant>
11
12using namespace KUserFeedback;
13
14LocaleInfoSource::LocaleInfoSource()
15 : AbstractDataSource(QStringLiteral("locale"))
16{
17}
18
20{
21 return tr("The current region and language settings.");
22}
23
25{
26 QLocale l;
27 QVariantMap m;
28 m.insert(QStringLiteral("region"), QLocale::countryToString(l.country()));
29 m.insert(QStringLiteral("language"), QLocale::languageToString(l.language()));
30 return m;
31}
32
34{
35 return tr("Locale information");
36}
Base class for data sources for telemetry data.
QVariant data() override
Returns the data gathered by this source.
QString description() const override
Returns a human-readable, translated description of what this source provides.
QString name() const override
Returns a short name of this data source.
Classes for integrating telemetry collection, survey targeting, and contribution encouragenemt and co...
Country country() const const
QString countryToString(Country country)
Language language() const const
QString languageToString(Language language)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:57:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.