File indexing completed on 2024-04-28 16:42:53

0001 // SPDX-FileCopyrightText: 2021 Alexey Andreyev <aa13q@ya.ru>
0002 //
0003 // SPDX-License-Identifier: LicenseRef-KDE-Accepted-GPL
0004 
0005 #include "device-utils.h"
0006 
0007 DeviceUtils::DeviceUtils(QObject *parent)
0008     : QObject(parent)
0009 {
0010 }
0011 
0012 QStringList DeviceUtils::equipmentIdentifiers()
0013 {
0014     return _equipmentIdentifiers;
0015 }
0016 
0017 QStringList DeviceUtils::deviceUniList()
0018 {
0019     return _deviceUniList;
0020 }
0021 
0022 QString DeviceUtils::countryCode()
0023 {
0024     return _countryCode;
0025 }
0026 
0027 void DeviceUtils::setEquipmentIdentifiers(const QStringList &equipmentIdentifiers)
0028 {
0029     if (_equipmentIdentifiers != equipmentIdentifiers) {
0030         _equipmentIdentifiers = equipmentIdentifiers;
0031         Q_EMIT equipmentIdentifiersChanged(_equipmentIdentifiers);
0032     }
0033 }
0034 
0035 void DeviceUtils::setDeviceUniList(const QStringList &deviceUniList)
0036 {
0037     if (_deviceUniList != deviceUniList) {
0038         _deviceUniList = deviceUniList;
0039         Q_EMIT deviceUniListChanged(_deviceUniList);
0040     }
0041 }
0042 
0043 void DeviceUtils::setCountryCode(const QString &countryCode)
0044 {
0045     if (_countryCode != countryCode) {
0046         _countryCode = countryCode;
0047         Q_EMIT countryCodeChanged(_countryCode);
0048     }
0049 }