//*****************************************************************************
// 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__QFileType__h__
#define __MuQt6__QFileType__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_QFile;

    class QFileType : public Class
    {
    public:
        typedef MuQt_QFile MuQtType;
        typedef QFile QtType;

        //
        //  Constructors
        //

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

        virtual ~QFileType();

        static bool isInheritable() { return true; }

        static inline ClassInstance* cachedInstance(const MuQtType*);

        //
        //  Class API
        //

        virtual void load();

        MemberFunction* _func[10];
    };

    // Inheritable object

    class MuQt_QFile : public QFile
    {
    public:
        virtual ~MuQt_QFile();
        MuQt_QFile(Pointer muobj, const CallEnvironment*);
        MuQt_QFile(Pointer muobj, const CallEnvironment*, const QString& name);
        MuQt_QFile(Pointer muobj, const CallEnvironment*, QObject* parent);
        MuQt_QFile(Pointer muobj, const CallEnvironment*, const QString& name,
                   QObject* parent);
        virtual QString fileName() const;
        virtual bool open(QIODeviceBase::OpenMode mode);
        virtual QFileDevice::Permissions permissions() const;
        virtual bool resize(qint64 sz);
        virtual qint64 size() const;
        virtual bool atEnd() const;
        virtual void close();
        virtual bool isSequential() const;
        virtual qint64 pos() const;
        virtual bool seek(qint64 pos);

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

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

} // namespace Mu

#endif // __MuQt__QFileType__h__
