#ifndef SBK_KSHORTCUTSDIALOGWRAPPER_H
#define SBK_KSHORTCUTSDIALOGWRAPPER_H

// Workaround to access protected functions
#ifndef protected
#  define protected public
#endif

#include <kshortcutsdialog.h>

#include <sbkpython.h>

#include <array>
namespace Shiboken { struct AutoDecRef; class GilState; }

namespace PySide { class DynamicQMetaObject; }

class KShortcutsDialogWrapper : public KShortcutsDialog
{
public:
    KShortcutsDialogWrapper(::QFlags<KShortcutsEditor::ActionType> actionTypes = KShortcutsEditor::AllActions, ::KShortcutsEditor::LetterShortcuts allowLetterShortcuts = KShortcutsEditor::LetterShortcutsAllowed, ::QWidget * parent = nullptr);
    KShortcutsDialogWrapper(::QWidget * parent);
    KShortcutsDialogWrapper(const KShortcutsDialogWrapper &) = delete;
    KShortcutsDialogWrapper& operator=(const KShortcutsDialogWrapper &) = delete;
    KShortcutsDialogWrapper(KShortcutsDialogWrapper &&) = delete;
    KShortcutsDialogWrapper& operator=(KShortcutsDialogWrapper &&) = delete;
    ~KShortcutsDialogWrapper() override;

    void accept() override;
    static void sbk_o_accept([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    void actionEvent(::QActionEvent * event) override;
    void changeEvent(::QEvent * event) override;
    void childEvent(::QChildEvent * event) override;
    void closeEvent(::QCloseEvent * arg__1) override;
    void connectNotify(const ::QMetaMethod & signal) override;
    void contextMenuEvent(::QContextMenuEvent * arg__1) override;
    void customEvent(::QEvent * event) override;
    int devType() const override;
    void disconnectNotify(const ::QMetaMethod & signal) override;
    void done(int arg__1) override;
    static void sbk_o_done([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride, [[maybe_unused]] int arg__1);
    void dragEnterEvent(::QDragEnterEvent * event) override;
    void dragLeaveEvent(::QDragLeaveEvent * event) override;
    void dragMoveEvent(::QDragMoveEvent * event) override;
    void dropEvent(::QDropEvent * event) override;
    void enterEvent(::QEnterEvent * event) override;
    bool event(::QEvent * event) override;
    bool eventFilter(::QObject * arg__1, ::QEvent * arg__2) override;
    int exec() override;
    static int sbk_o_exec([[maybe_unused]] const char *ownerClassName, [[maybe_unused]] const char *funcName, [[maybe_unused]] Shiboken::GilState &gil, [[maybe_unused]] const Shiboken::AutoDecRef &pyOverride);
    void focusInEvent(::QFocusEvent * event) override;
    bool focusNextPrevChild(bool next) override;
    void focusOutEvent(::QFocusEvent * event) override;
    bool hasHeightForWidth() const override;
    int heightForWidth(int arg__1) const override;
    void hideEvent(::QHideEvent * event) override;
    void initPainter(::QPainter * painter) const override;
    void inputMethodEvent(::QInputMethodEvent * event) override;
    ::QVariant inputMethodQuery(::Qt::InputMethodQuery arg__1) const override;
    void keyPressEvent(::QKeyEvent * arg__1) override;
    void keyReleaseEvent(::QKeyEvent * event) override;
    void leaveEvent(::QEvent * event) override;
    int metric(::QPaintDevice::PaintDeviceMetric arg__1) const override;
    ::QSize minimumSizeHint() const override;
    void mouseDoubleClickEvent(::QMouseEvent * event) override;
    void mouseMoveEvent(::QMouseEvent * event) override;
    void mousePressEvent(::QMouseEvent * event) override;
    void mouseReleaseEvent(::QMouseEvent * event) override;
    void moveEvent(::QMoveEvent * event) override;
    bool nativeEvent(const ::QByteArray & eventType, void * message, ::qintptr * result) override;
    void open() override;
    ::QPaintEngine * paintEngine() const override;
    void paintEvent(::QPaintEvent * event) override;
    ::QPaintDevice * redirected(::QPoint * offset) const override;
    void reject() override;
    void resizeEvent(::QResizeEvent * arg__1) override;
    void setVisible(bool visible) override;
    ::QPainter * sharedPainter() const override;
    void showEvent(::QShowEvent * arg__1) override;
    ::QSize sizeHint() const override;
    void tabletEvent(::QTabletEvent * event) override;
    void timerEvent(::QTimerEvent * event) override;
    void wheelEvent(::QWheelEvent * event) override;

    const ::QMetaObject * metaObject() const override;
    int qt_metacall(QMetaObject::Call call, int id, void **args) override;
    void *qt_metacast(const char *_clname) override;
    static void pysideInitQtMetaTypes();

    void resetPyMethodCache();

private:
    mutable std::array<PyObject *, 52> m_PyMethodCache = {nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr};
};

#endif // SBK_KSHORTCUTSDIALOGWRAPPER_H
