//*****************************************************************************
// 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__QListViewType__h__
#define __MuQt6__QListViewType__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_QListView;

    class QListViewType : public Class
    {
    public:
        typedef MuQt_QListView MuQtType;
        typedef QListView QtType;

        //
        //  Constructors
        //

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

        virtual ~QListViewType();

        static bool isInheritable() { return true; }

        static inline ClassInstance* cachedInstance(const MuQtType*);

        //
        //  Class API
        //

        virtual void load();

        MemberFunction* _func[45];
    };

    // Inheritable object

    class MuQt_QListView : public QListView
    {
    public:
        virtual ~MuQt_QListView();
        MuQt_QListView(Pointer muobj, const CallEnvironment*, QWidget* parent);
        virtual QModelIndex indexAt(const QPoint& p) const;
        virtual void scrollTo(const QModelIndex& index,
                              QAbstractItemView::ScrollHint hint);
        virtual void setRootIndex(const QModelIndex& index);
        virtual QRect visualRect(const QModelIndex& index) const;

    protected:
        virtual void currentChanged(const QModelIndex& current,
                                    const QModelIndex& previous);
        virtual void dragLeaveEvent(QDragLeaveEvent* e);
        virtual void dragMoveEvent(QDragMoveEvent* e);
        virtual void dropEvent(QDropEvent* event);
        virtual bool event(QEvent* e);
        virtual int horizontalOffset() const;
        virtual bool isIndexHidden(const QModelIndex& index) const;
        virtual void mouseMoveEvent(QMouseEvent* e);
        virtual void mouseReleaseEvent(QMouseEvent* e);
        virtual void paintEvent(QPaintEvent* e);
        virtual void resizeEvent(QResizeEvent* e);
        virtual void rowsAboutToBeRemoved(const QModelIndex& parent, int start,
                                          int end);
        virtual void rowsInserted(const QModelIndex& parent, int start,
                                  int end);
        virtual void scrollContentsBy(int dx, int dy);
        virtual QModelIndexList selectedIndexes() const;
        virtual void selectionChanged(const QItemSelection& selected,
                                      const QItemSelection& deselected);
        virtual void setSelection(const QRect& rect,
                                  QItemSelectionModel::SelectionFlags command);
        virtual void startDrag(Qt::DropActions supportedActions);
        virtual void timerEvent(QTimerEvent* e);
        virtual void updateGeometries();
        virtual int verticalOffset() const;
        virtual QSize viewportSizeHint() const;
        virtual QRegion
        visualRegionForSelection(const QItemSelection& selection) const;
        virtual void wheelEvent(QWheelEvent* e);

    public:
        virtual void keyboardSearch(const QString& search);
        virtual void setModel(QAbstractItemModel* model);
        virtual void setSelectionModel(QItemSelectionModel* selectionModel);
        virtual int sizeHintForColumn(int column) const;
        virtual int sizeHintForRow(int row) const;
        virtual QVariant inputMethodQuery(Qt::InputMethodQuery query) const;

    protected:
        virtual bool edit(const QModelIndex& index,
                          QAbstractItemView::EditTrigger trigger,
                          QEvent* event);
        virtual QItemSelectionModel::SelectionFlags
        selectionCommand(const QModelIndex& index, const QEvent* event) const;
        virtual void dragEnterEvent(QDragEnterEvent* event);
        virtual bool eventFilter(QObject* object, QEvent* event);
        virtual void focusInEvent(QFocusEvent* event);
        virtual bool focusNextPrevChild(bool next);
        virtual void focusOutEvent(QFocusEvent* event);
        virtual void keyPressEvent(QKeyEvent* event);
        virtual void mouseDoubleClickEvent(QMouseEvent* event);
        virtual void mousePressEvent(QMouseEvent* event);
        virtual bool viewportEvent(QEvent* event);

    public:
        QRect rectForIndex_pub(const QModelIndex& index) const
        {
            return rectForIndex(index);
        }

        QRect rectForIndex_pub_parent(const QModelIndex& index) const
        {
            return QListView::rectForIndex(index);
        }

        void setPositionForIndex_pub(const QPoint& position,
                                     const QModelIndex& index)
        {
            setPositionForIndex(position, index);
        }

        void setPositionForIndex_pub_parent(const QPoint& position,
                                            const QModelIndex& index)
        {
            QListView::setPositionForIndex(position, index);
        }

        void currentChanged_pub(const QModelIndex& current,
                                const QModelIndex& previous)
        {
            currentChanged(current, previous);
        }

        void currentChanged_pub_parent(const QModelIndex& current,
                                       const QModelIndex& previous)
        {
            QListView::currentChanged(current, previous);
        }

        void dragLeaveEvent_pub(QDragLeaveEvent* e) { dragLeaveEvent(e); }

        void dragLeaveEvent_pub_parent(QDragLeaveEvent* e)
        {
            QListView::dragLeaveEvent(e);
        }

        void dragMoveEvent_pub(QDragMoveEvent* e) { dragMoveEvent(e); }

        void dragMoveEvent_pub_parent(QDragMoveEvent* e)
        {
            QListView::dragMoveEvent(e);
        }

        void dropEvent_pub(QDropEvent* event) { dropEvent(event); }

        void dropEvent_pub_parent(QDropEvent* event)
        {
            QListView::dropEvent(event);
        }

        bool event_pub(QEvent* e) { return event(e); }

        bool event_pub_parent(QEvent* e) { return QListView::event(e); }

        int horizontalOffset_pub() const { return horizontalOffset(); }

        int horizontalOffset_pub_parent() const
        {
            return QListView::horizontalOffset();
        }

        bool isIndexHidden_pub(const QModelIndex& index) const
        {
            return isIndexHidden(index);
        }

        bool isIndexHidden_pub_parent(const QModelIndex& index) const
        {
            return QListView::isIndexHidden(index);
        }

        void mouseMoveEvent_pub(QMouseEvent* e) { mouseMoveEvent(e); }

        void mouseMoveEvent_pub_parent(QMouseEvent* e)
        {
            QListView::mouseMoveEvent(e);
        }

        void mouseReleaseEvent_pub(QMouseEvent* e) { mouseReleaseEvent(e); }

        void mouseReleaseEvent_pub_parent(QMouseEvent* e)
        {
            QListView::mouseReleaseEvent(e);
        }

        void paintEvent_pub(QPaintEvent* e) { paintEvent(e); }

        void paintEvent_pub_parent(QPaintEvent* e) { QListView::paintEvent(e); }

        void resizeEvent_pub(QResizeEvent* e) { resizeEvent(e); }

        void resizeEvent_pub_parent(QResizeEvent* e)
        {
            QListView::resizeEvent(e);
        }

        void rowsAboutToBeRemoved_pub(const QModelIndex& parent, int start,
                                      int end)
        {
            rowsAboutToBeRemoved(parent, start, end);
        }

        void rowsAboutToBeRemoved_pub_parent(const QModelIndex& parent,
                                             int start, int end)
        {
            QListView::rowsAboutToBeRemoved(parent, start, end);
        }

        void rowsInserted_pub(const QModelIndex& parent, int start, int end)
        {
            rowsInserted(parent, start, end);
        }

        void rowsInserted_pub_parent(const QModelIndex& parent, int start,
                                     int end)
        {
            QListView::rowsInserted(parent, start, end);
        }

        void scrollContentsBy_pub(int dx, int dy) { scrollContentsBy(dx, dy); }

        void scrollContentsBy_pub_parent(int dx, int dy)
        {
            QListView::scrollContentsBy(dx, dy);
        }

        QModelIndexList selectedIndexes_pub() const
        {
            return selectedIndexes();
        }

        QModelIndexList selectedIndexes_pub_parent() const
        {
            return QListView::selectedIndexes();
        }

        void selectionChanged_pub(const QItemSelection& selected,
                                  const QItemSelection& deselected)
        {
            selectionChanged(selected, deselected);
        }

        void selectionChanged_pub_parent(const QItemSelection& selected,
                                         const QItemSelection& deselected)
        {
            QListView::selectionChanged(selected, deselected);
        }

        void setSelection_pub(const QRect& rect,
                              QItemSelectionModel::SelectionFlags command)
        {
            setSelection(rect, command);
        }

        void
        setSelection_pub_parent(const QRect& rect,
                                QItemSelectionModel::SelectionFlags command)
        {
            QListView::setSelection(rect, command);
        }

        void startDrag_pub(Qt::DropActions supportedActions)
        {
            startDrag(supportedActions);
        }

        void startDrag_pub_parent(Qt::DropActions supportedActions)
        {
            QListView::startDrag(supportedActions);
        }

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

        void timerEvent_pub_parent(QTimerEvent* e) { QListView::timerEvent(e); }

        void updateGeometries_pub() { updateGeometries(); }

        void updateGeometries_pub_parent() { QListView::updateGeometries(); }

        int verticalOffset_pub() const { return verticalOffset(); }

        int verticalOffset_pub_parent() const
        {
            return QListView::verticalOffset();
        }

        QSize viewportSizeHint_pub() const { return viewportSizeHint(); }

        QSize viewportSizeHint_pub_parent() const
        {
            return QListView::viewportSizeHint();
        }

        QRegion
        visualRegionForSelection_pub(const QItemSelection& selection) const
        {
            return visualRegionForSelection(selection);
        }

        QRegion visualRegionForSelection_pub_parent(
            const QItemSelection& selection) const
        {
            return QListView::visualRegionForSelection(selection);
        }

        void wheelEvent_pub(QWheelEvent* e) { wheelEvent(e); }

        void wheelEvent_pub_parent(QWheelEvent* e) { QListView::wheelEvent(e); }

        bool edit_pub(const QModelIndex& index,
                      QAbstractItemView::EditTrigger trigger, QEvent* event)
        {
            return edit(index, trigger, event);
        }

        bool edit_pub_parent(const QModelIndex& index,
                             QAbstractItemView::EditTrigger trigger,
                             QEvent* event)
        {
            return QListView::edit(index, trigger, event);
        }

        QItemSelectionModel::SelectionFlags
        selectionCommand_pub(const QModelIndex& index,
                             const QEvent* event) const
        {
            return selectionCommand(index, event);
        }

        QItemSelectionModel::SelectionFlags
        selectionCommand_pub_parent(const QModelIndex& index,
                                    const QEvent* event) const
        {
            return QListView::selectionCommand(index, event);
        }

        void dragEnterEvent_pub(QDragEnterEvent* event)
        {
            dragEnterEvent(event);
        }

        void dragEnterEvent_pub_parent(QDragEnterEvent* event)
        {
            QListView::dragEnterEvent(event);
        }

        bool eventFilter_pub(QObject* object, QEvent* event)
        {
            return eventFilter(object, event);
        }

        bool eventFilter_pub_parent(QObject* object, QEvent* event)
        {
            return QListView::eventFilter(object, event);
        }

        void focusInEvent_pub(QFocusEvent* event) { focusInEvent(event); }

        void focusInEvent_pub_parent(QFocusEvent* event)
        {
            QListView::focusInEvent(event);
        }

        bool focusNextPrevChild_pub(bool next)
        {
            return focusNextPrevChild(next);
        }

        bool focusNextPrevChild_pub_parent(bool next)
        {
            return QListView::focusNextPrevChild(next);
        }

        void focusOutEvent_pub(QFocusEvent* event) { focusOutEvent(event); }

        void focusOutEvent_pub_parent(QFocusEvent* event)
        {
            QListView::focusOutEvent(event);
        }

        void keyPressEvent_pub(QKeyEvent* event) { keyPressEvent(event); }

        void keyPressEvent_pub_parent(QKeyEvent* event)
        {
            QListView::keyPressEvent(event);
        }

        void mouseDoubleClickEvent_pub(QMouseEvent* event)
        {
            mouseDoubleClickEvent(event);
        }

        void mouseDoubleClickEvent_pub_parent(QMouseEvent* event)
        {
            QListView::mouseDoubleClickEvent(event);
        }

        void mousePressEvent_pub(QMouseEvent* event) { mousePressEvent(event); }

        void mousePressEvent_pub_parent(QMouseEvent* event)
        {
            QListView::mousePressEvent(event);
        }

        bool viewportEvent_pub(QEvent* event) { return viewportEvent(event); }

        bool viewportEvent_pub_parent(QEvent* event)
        {
            return QListView::viewportEvent(event);
        }

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

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

} // namespace Mu

#endif // __MuQt__QListViewType__h__
