// 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/ImagePropertyGroup.h>

// clang-format on

namespace Union
{
namespace Quick
{

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

public:
    explicit ImagePropertyGroupQuick(QuickStyle *style);

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

    void refreshColors();

    /*!
     * \qmlproperty std::filesystem::path ImagePropertyGroupQuick::source
     *
     * Exposes ImagePropertyGroup::source to QML.
     */
    Q_PROPERTY(QJSValue source READ source NOTIFY sourceChanged)
    QJSValue source() const;
    Q_SIGNAL void sourceChanged();

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

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

    /*!
     * \qmlproperty qreal ImagePropertyGroupQuick::xOffset
     *
     * Exposes ImagePropertyGroup::xOffset to QML.
     */
    Q_PROPERTY(QJSValue xOffset READ xOffset NOTIFY xOffsetChanged)
    QJSValue xOffset() const;
    Q_SIGNAL void xOffsetChanged();

    /*!
     * \qmlproperty qreal ImagePropertyGroupQuick::yOffset
     *
     * Exposes ImagePropertyGroup::yOffset to QML.
     */
    Q_PROPERTY(QJSValue yOffset READ yOffset NOTIFY yOffsetChanged)
    QJSValue yOffset() const;
    Q_SIGNAL void yOffsetChanged();

    /*!
     * \qmlproperty Union::Properties::ImageFlags ImagePropertyGroupQuick::flags
     *
     * Exposes ImagePropertyGroup::flags to QML.
     */
    Q_PROPERTY(QJSValue flags READ flags NOTIFY flagsChanged)
    QJSValue flags() const;
    Q_SIGNAL void flagsChanged();

    /*!
     * \qmlproperty Union::Color ImagePropertyGroupQuick::maskColor
     *
     * Exposes ImagePropertyGroup::maskColor to QML.
     */
    Q_PROPERTY(QJSValue maskColor READ maskColor NOTIFY maskColorChanged)
    QJSValue maskColor() const;
    Q_SIGNAL void maskColorChanged();

private:
    QuickStyle *m_style = nullptr;

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

}
}