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

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

namespace Union
{
namespace Quick
{

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

public:
    explicit TextPropertyGroupQuick(QuickStyle *style);

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

    void refreshColors();

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

    /*!
     * \qmlproperty QFont TextPropertyGroupQuick::font
     *
     * Exposes TextPropertyGroup::font to QML.
     */
    Q_PROPERTY(QJSValue font READ font NOTIFY fontChanged)
    QJSValue font() const;
    Q_SIGNAL void fontChanged();

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

    /*!
     * \qmlproperty Union::Properties::TextWrapMode TextPropertyGroupQuick::wrapMode
     *
     * Exposes TextPropertyGroup::wrapMode to QML.
     */
    Q_PROPERTY(QJSValue wrapMode READ wrapMode NOTIFY wrapModeChanged)
    QJSValue wrapMode() const;
    Q_SIGNAL void wrapModeChanged();

    /*!
     * \qmlproperty Union::Properties::TextElide TextPropertyGroupQuick::elide
     *
     * Exposes TextPropertyGroup::elide to QML.
     */
    Q_PROPERTY(QJSValue elide READ elide NOTIFY elideChanged)
    QJSValue elide() const;
    Q_SIGNAL void elideChanged();

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

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

}
}