File indexing completed on 2024-05-12 16:25:36

0001 /*
0002    SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "libruqolacore_export.h"
0010 #include <QDebug>
0011 
0012 class LIBRUQOLACORE_EXPORT CustomSoundInfo
0013 {
0014 public:
0015     CustomSoundInfo();
0016     ~CustomSoundInfo() = default;
0017 
0018     [[nodiscard]] const QString &identifier() const;
0019     void setIdentifier(const QString &newIdentifier);
0020 
0021     [[nodiscard]] const QString &name() const;
0022     void setName(const QString &newName);
0023 
0024     void parseCustomSoundInfo(const QJsonObject &obj);
0025 
0026     [[nodiscard]] const QString &extension() const;
0027     void setExtension(const QString &newExtension);
0028 
0029     [[nodiscard]] bool isValid() const;
0030 
0031 private:
0032     QString mIdentifier;
0033     QString mName;
0034     QString mExtension;
0035 };
0036 
0037 Q_DECLARE_METATYPE(CustomSoundInfo)
0038 Q_DECLARE_TYPEINFO(CustomSoundInfo, Q_MOVABLE_TYPE);
0039 LIBRUQOLACORE_EXPORT QDebug operator<<(QDebug d, const CustomSoundInfo &t);