pyside6_qtuitools_python.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // Copyright (C) 2022 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. #ifndef SBK_QTUITOOLS_PYTHON_H
  4. #define SBK_QTUITOOLS_PYTHON_H
  5. #include <sbkpython.h>
  6. #include <sbkmodule.h>
  7. #include <sbkconverter.h>
  8. // Module Includes
  9. #include <pyside6_qtwidgets_python.h>
  10. #include <pyside6_qtgui_python.h>
  11. #include <pyside6_qtcore_python.h>
  12. // Bound library includes
  13. QT_BEGIN_NAMESPACE
  14. class QUiLoader;
  15. QT_END_NAMESPACE
  16. // Type indices
  17. enum [[deprecated]] : int {
  18. SBK_QUILOADER_IDX = 0,
  19. SBK_QTUITOOLS_IDX_COUNT = 2,
  20. };
  21. // Type indices
  22. enum : int {
  23. SBK_QUiLoader_IDX = 0,
  24. SBK_QtUiTools_IDX_COUNT = 1,
  25. };
  26. // This variable stores all Python types exported by this module.
  27. extern Shiboken::Module::TypeInitStruct *SbkPySide6_QtUiToolsTypeStructs;
  28. // This variable stores all Python types exported by this module in a backwards compatible way with identical indexing.
  29. [[deprecated]] extern PyTypeObject **SbkPySide6_QtUiToolsTypes;
  30. // This variable stores the Python module object exported by this module.
  31. extern PyObject *SbkPySide6_QtUiToolsModuleObject;
  32. // This variable stores all type converters exported by this module.
  33. extern SbkConverter **SbkPySide6_QtUiToolsTypeConverters;
  34. // Converter indices
  35. enum [[deprecated]] : int {
  36. SBK_QTUITOOLS_QLIST_INT_IDX = 0, // QList<int>
  37. SBK_QTUITOOLS_QLIST_QVARIANT_IDX = 1, // QList<QVariant>
  38. SBK_QTUITOOLS_QLIST_QSTRING_IDX = 2, // QList<QString>
  39. SBK_QTUITOOLS_QMAP_QSTRING_QVARIANT_IDX = 3, // QMap<QString,QVariant>
  40. SBK_QTUITOOLS_CONVERTERS_IDX_COUNT = 4,
  41. };
  42. // Converter indices
  43. enum : int {
  44. SBK_QtUiTools_QList_int_IDX = 0, // QList<int>
  45. SBK_QtUiTools_QList_QVariant_IDX = 1, // QList<QVariant>
  46. SBK_QtUiTools_QList_QString_IDX = 2, // QList<QString>
  47. SBK_QtUiTools_QMap_QString_QVariant_IDX = 3, // QMap<QString,QVariant>
  48. SBK_QtUiTools_CONVERTERS_IDX_COUNT = 4,
  49. };
  50. // Macros for type check
  51. QT_WARNING_PUSH
  52. QT_WARNING_DISABLE_DEPRECATED
  53. namespace Shiboken
  54. {
  55. // PyType functions, to get the PyObjectType for a type T
  56. template<> inline PyTypeObject *SbkType< ::QUiLoader >() { return Shiboken::Module::get(SbkPySide6_QtUiToolsTypeStructs[SBK_QUiLoader_IDX]); }
  57. } // namespace Shiboken
  58. QT_WARNING_POP
  59. #endif // SBK_QTUITOOLS_PYTHON_H