/* SPDX-FileCopyrightText: 2015 Martin Klapetek SPDX-FileCopyrightText: 2024 ivan tkachenko SPDX-License-Identifier: LGPL-2.0-or-later */ #pragma once #include #include #include #include class HolidayRegionsConfig : public QObject { Q_OBJECT QML_ELEMENT Q_PROPERTY(QStringList selectedRegions READ selectedRegions NOTIFY selectedRegionsChanged) public: explicit HolidayRegionsConfig(QObject *parent = nullptr); QStringList selectedRegions() const; Q_INVOKABLE void saveConfig(); Q_INVOKABLE void addRegion(const QString ®ion); Q_INVOKABLE void removeRegion(const QString ®ion); Q_SIGNALS: void selectedRegionsChanged(); private: QStringList m_regions; KConfigGroup m_configGroup; };