//*****************************************************************************
// Copyright (c) 2024 Autodesk, Inc.
// All rights reserved.
//
// SPDX-License-Identifier: Apache-2.0
//
//*****************************************************************************

// IMPORTANT: This file (not the template) is auto-generated by qt2mu.py script.
//            The prefered way to do a fix is to handrolled it or modify the
//            qt2mu.py script. If it is not possible, manual editing is ok but
//            it could be lost in future generations.

#ifndef __MuQt6__QTextDocumentType__h__
#define __MuQt6__QTextDocumentType__h__
#include <iostream>
#include <Mu/Class.h>
#include <Mu/MuProcess.h>
#include <QtCore/QtCore>
#include <QtGui/QtGui>
#include <QtWidgets/QtWidgets>
#include <QtNetwork/QtNetwork>
#include <QtWebEngineWidgets/QtWebEngineWidgets>
#include <QtQml/QtQml>
#include <QtQuick/QtQuick>
#include <QtQuickWidgets/QtQuickWidgets>
#include <QtSvg/QtSvg>
#include <QSvgWidget>
#include <MuQt6/Bridge.h>

namespace Mu
{
    class MuQt_QTextDocument;

    class QTextDocumentType : public Class
    {
    public:
        typedef MuQt_QTextDocument MuQtType;
        typedef QTextDocument QtType;

        //
        //  Constructors
        //

        QTextDocumentType(Context* context, const char* name,
                          Class* superClass = 0, Class* superClass2 = 0);

        virtual ~QTextDocumentType();

        static bool isInheritable() { return true; }

        static inline ClassInstance* cachedInstance(const MuQtType*);

        //
        //  Class API
        //

        virtual void load();

        MemberFunction* _func[6];
    };

    // Inheritable object

    class MuQt_QTextDocument : public QTextDocument
    {
    public:
        virtual ~MuQt_QTextDocument();
        MuQt_QTextDocument(Pointer muobj, const CallEnvironment*,
                           QObject* parent);
        MuQt_QTextDocument(Pointer muobj, const CallEnvironment*,
                           const QString& text, QObject* parent);
        virtual void clear();

    protected:
        virtual QVariant loadResource(int type, const QUrl& name);

    public:
        virtual bool event(QEvent* e);
        virtual bool eventFilter(QObject* watched, QEvent* event);

    protected:
        virtual void customEvent(QEvent* event);
        virtual void timerEvent(QTimerEvent* event);

    public:
        QVariant loadResource_pub(int type, const QUrl& name)
        {
            return loadResource(type, name);
        }

        QVariant loadResource_pub_parent(int type, const QUrl& name)
        {
            return QTextDocument::loadResource(type, name);
        }

        void customEvent_pub(QEvent* event) { customEvent(event); }

        void customEvent_pub_parent(QEvent* event)
        {
            QTextDocument::customEvent(event);
        }

        void timerEvent_pub(QTimerEvent* event) { timerEvent(event); }

        void timerEvent_pub_parent(QTimerEvent* event)
        {
            QTextDocument::timerEvent(event);
        }

    public:
        const QTextDocumentType* _baseType;
        ClassInstance* _obj;
        const CallEnvironment* _env;
    };

    inline ClassInstance*
    QTextDocumentType::cachedInstance(const QTextDocumentType::MuQtType* obj)
    {
        return obj->_obj;
    }

} // namespace Mu

#endif // __MuQt__QTextDocumentType__h__
