// SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
// SPDX-FileCopyrightText: 2024 Arjen Hiemstra <ahiemstra@heimr.nl>
//
// This file is automatically generated from qml_group.h.j2.
// To regenerate, run `tools/propertygenerator/generate_properties.py`.

#pragma once

// clang-format off
#include <QJSValue>
#include <QObject>
#include <QProperty>
#include <qqmlregistration.h>


#include <properties/IconPropertyGroup.h>

#include "AlignmentPropertyGroupQuick.h"
// clang-format on

namespace Union
{
namespace Quick
{

class QuickStyle;
/*!
 * \qmltype IconPropertyGroupQuick
 * \inqmlmodule org.kde.union.impl
 * \ingroup qtquick-properties
 *
 * \brief A group object exposing the properties of IconPropertyGroup to QML.
 */
class IconPropertyGroupQuick : public QObject
{
    Q_OBJECT
    QML_ANONYMOUS

public:
    explicit IconPropertyGroupQuick(QuickStyle *style);

    void update(Union::Properties::IconPropertyGroup *newState);
    Q_SIGNAL void updated();

    void refreshColors();

    /*!
     * \qmlproperty AlignmentPropertyGroupQuick IconPropertyGroupQuick::alignment
     *
     * Exposes IconPropertyGroup::AlignmentPropertyGroup to QML.
     */
    Q_PROPERTY(Union::Quick::AlignmentPropertyGroupQuick *alignment READ alignment CONSTANT)
    AlignmentPropertyGroupQuick *alignment() const;

    /*!
     * \qmlproperty qreal IconPropertyGroupQuick::width
     *
     * Exposes IconPropertyGroup::width to QML.
     */
    Q_PROPERTY(QJSValue width READ width NOTIFY widthChanged)
    QJSValue width() const;
    Q_SIGNAL void widthChanged();

    /*!
     * \qmlproperty qreal IconPropertyGroupQuick::height
     *
     * Exposes IconPropertyGroup::height to QML.
     */
    Q_PROPERTY(QJSValue height READ height NOTIFY heightChanged)
    QJSValue height() const;
    Q_SIGNAL void heightChanged();

    /*!
     * \qmlproperty QString IconPropertyGroupQuick::name
     *
     * Exposes IconPropertyGroup::name to QML.
     */
    Q_PROPERTY(QJSValue name READ name NOTIFY nameChanged)
    QJSValue name() const;
    Q_SIGNAL void nameChanged();

    /*!
     * \qmlproperty QUrl IconPropertyGroupQuick::source
     *
     * Exposes IconPropertyGroup::source to QML.
     */
    Q_PROPERTY(QJSValue source READ source NOTIFY sourceChanged)
    QJSValue source() const;
    Q_SIGNAL void sourceChanged();

    /*!
     * \qmlproperty Union::Color IconPropertyGroupQuick::color
     *
     * Exposes IconPropertyGroup::color to QML.
     */
    Q_PROPERTY(QJSValue color READ color NOTIFY colorChanged)
    QJSValue color() const;
    Q_SIGNAL void colorChanged();

private:
    QuickStyle *m_style = nullptr;
    std::unique_ptr<AlignmentPropertyGroupQuick> m_alignment;

    Union::Properties::IconPropertyGroup *m_state = nullptr;
};

}
}