pyside6_qtdesigner_python.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  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_QTDESIGNER_PYTHON_H
  4. #define SBK_QTDESIGNER_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. #include <QtDesigner/abstractdnditem.h>
  14. #include <QtDesigner/abstractformwindow.h>
  15. #include <QtDesigner/abstractformwindowcursor.h>
  16. #include <QtDesigner/abstractformwindowmanager.h>
  17. #include <QtDesigner/abstractwidgetbox.h>
  18. QT_BEGIN_NAMESPACE
  19. class QAbstractExtensionFactory;
  20. class QAbstractExtensionManager;
  21. class QAbstractFormBuilder;
  22. class QDesignerActionEditorInterface;
  23. class QDesignerContainerExtension;
  24. class QDesignerCustomWidgetCollectionInterface;
  25. class QDesignerCustomWidgetInterface;
  26. class QDesignerDynamicPropertySheetExtension;
  27. class QDesignerFormEditorInterface;
  28. class QDesignerFormWindowToolInterface;
  29. class QDesignerMemberSheetExtension;
  30. class QDesignerObjectInspectorInterface;
  31. class QDesignerPropertyEditorInterface;
  32. class QDesignerPropertySheetExtension;
  33. class QDesignerTaskMenuExtension;
  34. class QExtensionFactory;
  35. class QExtensionManager;
  36. class QFormBuilder;
  37. class QPyDesignerContainerExtension;
  38. class QPyDesignerCustomWidgetCollection;
  39. class QPyDesignerMemberSheetExtension;
  40. class QPyDesignerPropertySheetExtension;
  41. class QPyDesignerTaskMenuExtension;
  42. QT_END_NAMESPACE
  43. // Type indices
  44. enum [[deprecated]] : int {
  45. SBK_QABSTRACTEXTENSIONFACTORY_IDX = 0,
  46. SBK_QABSTRACTEXTENSIONMANAGER_IDX = 2,
  47. SBK_QABSTRACTFORMBUILDER_IDX = 4,
  48. SBK_QDESIGNERACTIONEDITORINTERFACE_IDX = 6,
  49. SBK_QDESIGNERCONTAINEREXTENSION_IDX = 8,
  50. SBK_QDESIGNERCUSTOMWIDGETCOLLECTIONINTERFACE_IDX = 10,
  51. SBK_QDESIGNERCUSTOMWIDGETINTERFACE_IDX = 12,
  52. SBK_QDESIGNERDNDITEMINTERFACE_DROPTYPE_IDX = 16,
  53. SBK_QDESIGNERDNDITEMINTERFACE_IDX = 14,
  54. SBK_QDESIGNERDYNAMICPROPERTYSHEETEXTENSION_IDX = 18,
  55. SBK_QDESIGNERFORMEDITORINTERFACE_IDX = 20,
  56. SBK_QDESIGNERFORMWINDOWCURSORINTERFACE_MOVEOPERATION_IDX = 26,
  57. SBK_QDESIGNERFORMWINDOWCURSORINTERFACE_MOVEMODE_IDX = 24,
  58. SBK_QDESIGNERFORMWINDOWCURSORINTERFACE_IDX = 22,
  59. SBK_QDESIGNERFORMWINDOWINTERFACE_FEATUREFLAG_IDX = 30,
  60. SBK_QFLAGS_QDESIGNERFORMWINDOWINTERFACE_FEATUREFLAG_IDX = 66,
  61. SBK_QDESIGNERFORMWINDOWINTERFACE_RESOURCEFILESAVEMODE_IDX = 32,
  62. SBK_QDESIGNERFORMWINDOWINTERFACE_IDX = 28,
  63. SBK_QDESIGNERFORMWINDOWMANAGERINTERFACE_ACTION_IDX = 36,
  64. SBK_QDESIGNERFORMWINDOWMANAGERINTERFACE_ACTIONGROUP_IDX = 38,
  65. SBK_QDESIGNERFORMWINDOWMANAGERINTERFACE_IDX = 34,
  66. SBK_QDESIGNERFORMWINDOWTOOLINTERFACE_IDX = 40,
  67. SBK_QDESIGNERMEMBERSHEETEXTENSION_IDX = 42,
  68. SBK_QDESIGNEROBJECTINSPECTORINTERFACE_IDX = 44,
  69. SBK_QDESIGNERPROPERTYEDITORINTERFACE_IDX = 46,
  70. SBK_QDESIGNERPROPERTYSHEETEXTENSION_IDX = 48,
  71. SBK_QDESIGNERTASKMENUEXTENSION_IDX = 50,
  72. SBK_QDESIGNERWIDGETBOXINTERFACE_IDX = 52,
  73. SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_TYPE_IDX = 56,
  74. SBK_QDESIGNERWIDGETBOXINTERFACE_CATEGORY_IDX = 54,
  75. SBK_QDESIGNERWIDGETBOXINTERFACE_WIDGET_TYPE_IDX = 60,
  76. SBK_QDESIGNERWIDGETBOXINTERFACE_WIDGET_IDX = 58,
  77. SBK_QEXTENSIONFACTORY_IDX = 62,
  78. SBK_QEXTENSIONMANAGER_IDX = 64,
  79. SBK_QFORMBUILDER_IDX = 68,
  80. SBK_QPYDESIGNERCONTAINEREXTENSION_IDX = 70,
  81. SBK_QPYDESIGNERCUSTOMWIDGETCOLLECTION_IDX = 72,
  82. SBK_QPYDESIGNERMEMBERSHEETEXTENSION_IDX = 74,
  83. SBK_QPYDESIGNERPROPERTYSHEETEXTENSION_IDX = 76,
  84. SBK_QPYDESIGNERTASKMENUEXTENSION_IDX = 78,
  85. SBK_QTDESIGNER_IDX_COUNT = 80,
  86. };
  87. // Type indices
  88. enum : int {
  89. SBK_QAbstractExtensionFactory_IDX = 0,
  90. SBK_QAbstractExtensionManager_IDX = 1,
  91. SBK_QAbstractFormBuilder_IDX = 2,
  92. SBK_QDesignerActionEditorInterface_IDX = 3,
  93. SBK_QDesignerContainerExtension_IDX = 4,
  94. SBK_QDesignerCustomWidgetCollectionInterface_IDX = 5,
  95. SBK_QDesignerCustomWidgetInterface_IDX = 6,
  96. SBK_QDesignerDnDItemInterface_DropType_IDX = 8,
  97. SBK_QDesignerDnDItemInterface_IDX = 7,
  98. SBK_QDesignerDynamicPropertySheetExtension_IDX = 9,
  99. SBK_QDesignerFormEditorInterface_IDX = 10,
  100. SBK_QDesignerFormWindowCursorInterface_MoveOperation_IDX = 13,
  101. SBK_QDesignerFormWindowCursorInterface_MoveMode_IDX = 12,
  102. SBK_QDesignerFormWindowCursorInterface_IDX = 11,
  103. SBK_QDesignerFormWindowInterface_FeatureFlag_IDX = 15,
  104. SBK_QFlags_QDesignerFormWindowInterface_FeatureFlag_IDX = 33,
  105. SBK_QDesignerFormWindowInterface_ResourceFileSaveMode_IDX = 16,
  106. SBK_QDesignerFormWindowInterface_IDX = 14,
  107. SBK_QDesignerFormWindowManagerInterface_Action_IDX = 18,
  108. SBK_QDesignerFormWindowManagerInterface_ActionGroup_IDX = 19,
  109. SBK_QDesignerFormWindowManagerInterface_IDX = 17,
  110. SBK_QDesignerFormWindowToolInterface_IDX = 20,
  111. SBK_QDesignerMemberSheetExtension_IDX = 21,
  112. SBK_QDesignerObjectInspectorInterface_IDX = 22,
  113. SBK_QDesignerPropertyEditorInterface_IDX = 23,
  114. SBK_QDesignerPropertySheetExtension_IDX = 24,
  115. SBK_QDesignerTaskMenuExtension_IDX = 25,
  116. SBK_QDesignerWidgetBoxInterface_IDX = 26,
  117. SBK_QDesignerWidgetBoxInterface_Category_Type_IDX = 28,
  118. SBK_QDesignerWidgetBoxInterface_Category_IDX = 27,
  119. SBK_QDesignerWidgetBoxInterface_Widget_Type_IDX = 30,
  120. SBK_QDesignerWidgetBoxInterface_Widget_IDX = 29,
  121. SBK_QExtensionFactory_IDX = 31,
  122. SBK_QExtensionManager_IDX = 32,
  123. SBK_QFormBuilder_IDX = 34,
  124. SBK_QPyDesignerContainerExtension_IDX = 35,
  125. SBK_QPyDesignerCustomWidgetCollection_IDX = 36,
  126. SBK_QPyDesignerMemberSheetExtension_IDX = 37,
  127. SBK_QPyDesignerPropertySheetExtension_IDX = 38,
  128. SBK_QPyDesignerTaskMenuExtension_IDX = 39,
  129. SBK_QtDesigner_IDX_COUNT = 40,
  130. };
  131. // This variable stores all Python types exported by this module.
  132. extern Shiboken::Module::TypeInitStruct *SbkPySide6_QtDesignerTypeStructs;
  133. // This variable stores all Python types exported by this module in a backwards compatible way with identical indexing.
  134. [[deprecated]] extern PyTypeObject **SbkPySide6_QtDesignerTypes;
  135. // This variable stores the Python module object exported by this module.
  136. extern PyObject *SbkPySide6_QtDesignerModuleObject;
  137. // This variable stores all type converters exported by this module.
  138. extern SbkConverter **SbkPySide6_QtDesignerTypeConverters;
  139. // Converter indices
  140. enum [[deprecated]] : int {
  141. SBK_QTDESIGNER_QLIST_INT_IDX = 0, // QList<int>
  142. SBK_QTDESIGNER_QLIST_QACTIONPTR_IDX = 1, // QList<QAction*>
  143. SBK_QTDESIGNER_QLIST_QBYTEARRAY_IDX = 2, // QList<QByteArray>
  144. SBK_QTDESIGNER_QLIST_QDESIGNERCUSTOMWIDGETINTERFACEPTR_IDX = 3, // QList<QDesignerCustomWidgetInterface*>
  145. SBK_QTDESIGNER_QLIST_QDESIGNERDNDITEMINTERFACEPTR_IDX = 4, // QList<QDesignerDnDItemInterface*>
  146. SBK_QTDESIGNER_QLIST_QWIDGETPTR_IDX = 5, // QList<QWidget*>
  147. SBK_QTDESIGNER_QLIST_QOBJECTPTR_IDX = 6, // QList<QObject*>
  148. SBK_QTDESIGNER_QLIST_QVARIANT_IDX = 7, // QList<QVariant>
  149. SBK_QTDESIGNER_QLIST_QSTRING_IDX = 8, // QList<QString>
  150. SBK_QTDESIGNER_QMAP_QSTRING_QVARIANT_IDX = 9, // QMap<QString,QVariant>
  151. SBK_QTDESIGNER_CONVERTERS_IDX_COUNT = 10,
  152. };
  153. // Converter indices
  154. enum : int {
  155. SBK_QtDesigner_QList_int_IDX = 0, // QList<int>
  156. SBK_QtDesigner_QList_QActionPTR_IDX = 1, // QList<QAction*>
  157. SBK_QtDesigner_QList_QByteArray_IDX = 2, // QList<QByteArray>
  158. SBK_QtDesigner_QList_QDesignerCustomWidgetInterfacePTR_IDX = 3, // QList<QDesignerCustomWidgetInterface*>
  159. SBK_QtDesigner_QList_QDesignerDnDItemInterfacePTR_IDX = 4, // QList<QDesignerDnDItemInterface*>
  160. SBK_QtDesigner_QList_QWidgetPTR_IDX = 5, // QList<QWidget*>
  161. SBK_QtDesigner_QList_QObjectPTR_IDX = 6, // QList<QObject*>
  162. SBK_QtDesigner_QList_QVariant_IDX = 7, // QList<QVariant>
  163. SBK_QtDesigner_QList_QString_IDX = 8, // QList<QString>
  164. SBK_QtDesigner_QMap_QString_QVariant_IDX = 9, // QMap<QString,QVariant>
  165. SBK_QtDesigner_CONVERTERS_IDX_COUNT = 10,
  166. };
  167. // Macros for type check
  168. QT_WARNING_PUSH
  169. QT_WARNING_DISABLE_DEPRECATED
  170. namespace Shiboken
  171. {
  172. // PyType functions, to get the PyObjectType for a type T
  173. template<> inline PyTypeObject *SbkType< ::QAbstractExtensionFactory >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QAbstractExtensionFactory_IDX]); }
  174. template<> inline PyTypeObject *SbkType< ::QAbstractExtensionManager >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QAbstractExtensionManager_IDX]); }
  175. template<> inline PyTypeObject *SbkType< ::QAbstractFormBuilder >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QAbstractFormBuilder_IDX]); }
  176. template<> inline PyTypeObject *SbkType< ::QDesignerActionEditorInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerActionEditorInterface_IDX]); }
  177. template<> inline PyTypeObject *SbkType< ::QDesignerContainerExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerContainerExtension_IDX]); }
  178. template<> inline PyTypeObject *SbkType< ::QDesignerCustomWidgetCollectionInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerCustomWidgetCollectionInterface_IDX]); }
  179. template<> inline PyTypeObject *SbkType< ::QDesignerCustomWidgetInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerCustomWidgetInterface_IDX]); }
  180. template<> inline PyTypeObject *SbkType< ::QDesignerDnDItemInterface::DropType >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerDnDItemInterface_DropType_IDX]); }
  181. template<> inline PyTypeObject *SbkType< ::QDesignerDnDItemInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerDnDItemInterface_IDX]); }
  182. template<> inline PyTypeObject *SbkType< ::QDesignerDynamicPropertySheetExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerDynamicPropertySheetExtension_IDX]); }
  183. template<> inline PyTypeObject *SbkType< ::QDesignerFormEditorInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormEditorInterface_IDX]); }
  184. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowCursorInterface::MoveOperation >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowCursorInterface_MoveOperation_IDX]); }
  185. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowCursorInterface::MoveMode >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowCursorInterface_MoveMode_IDX]); }
  186. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowCursorInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowCursorInterface_IDX]); }
  187. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowInterface::FeatureFlag >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowInterface_FeatureFlag_IDX]); }
  188. template<> inline PyTypeObject *SbkType< ::QFlags<QDesignerFormWindowInterface::FeatureFlag> >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QFlags_QDesignerFormWindowInterface_FeatureFlag_IDX]); }
  189. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowInterface::ResourceFileSaveMode >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowInterface_ResourceFileSaveMode_IDX]); }
  190. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowInterface_IDX]); }
  191. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowManagerInterface::Action >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowManagerInterface_Action_IDX]); }
  192. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowManagerInterface::ActionGroup >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowManagerInterface_ActionGroup_IDX]); }
  193. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowManagerInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowManagerInterface_IDX]); }
  194. template<> inline PyTypeObject *SbkType< ::QDesignerFormWindowToolInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerFormWindowToolInterface_IDX]); }
  195. template<> inline PyTypeObject *SbkType< ::QDesignerMemberSheetExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerMemberSheetExtension_IDX]); }
  196. template<> inline PyTypeObject *SbkType< ::QDesignerObjectInspectorInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerObjectInspectorInterface_IDX]); }
  197. template<> inline PyTypeObject *SbkType< ::QDesignerPropertyEditorInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerPropertyEditorInterface_IDX]); }
  198. template<> inline PyTypeObject *SbkType< ::QDesignerPropertySheetExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerPropertySheetExtension_IDX]); }
  199. template<> inline PyTypeObject *SbkType< ::QDesignerTaskMenuExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerTaskMenuExtension_IDX]); }
  200. template<> inline PyTypeObject *SbkType< ::QDesignerWidgetBoxInterface >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerWidgetBoxInterface_IDX]); }
  201. template<> inline PyTypeObject *SbkType< ::QDesignerWidgetBoxInterface::Category::Type >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerWidgetBoxInterface_Category_Type_IDX]); }
  202. template<> inline PyTypeObject *SbkType< ::QDesignerWidgetBoxInterface::Category >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerWidgetBoxInterface_Category_IDX]); }
  203. template<> inline PyTypeObject *SbkType< ::QDesignerWidgetBoxInterface::Widget::Type >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerWidgetBoxInterface_Widget_Type_IDX]); }
  204. template<> inline PyTypeObject *SbkType< ::QDesignerWidgetBoxInterface::Widget >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QDesignerWidgetBoxInterface_Widget_IDX]); }
  205. template<> inline PyTypeObject *SbkType< ::QExtensionFactory >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QExtensionFactory_IDX]); }
  206. template<> inline PyTypeObject *SbkType< ::QExtensionManager >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QExtensionManager_IDX]); }
  207. template<> inline PyTypeObject *SbkType< ::QFormBuilder >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QFormBuilder_IDX]); }
  208. template<> inline PyTypeObject *SbkType< ::QPyDesignerContainerExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QPyDesignerContainerExtension_IDX]); }
  209. template<> inline PyTypeObject *SbkType< ::QPyDesignerCustomWidgetCollection >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QPyDesignerCustomWidgetCollection_IDX]); }
  210. template<> inline PyTypeObject *SbkType< ::QPyDesignerMemberSheetExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QPyDesignerMemberSheetExtension_IDX]); }
  211. template<> inline PyTypeObject *SbkType< ::QPyDesignerPropertySheetExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QPyDesignerPropertySheetExtension_IDX]); }
  212. template<> inline PyTypeObject *SbkType< ::QPyDesignerTaskMenuExtension >() { return Shiboken::Module::get(SbkPySide6_QtDesignerTypeStructs[SBK_QPyDesignerTaskMenuExtension_IDX]); }
  213. } // namespace Shiboken
  214. QT_WARNING_POP
  215. #endif // SBK_QTDESIGNER_PYTHON_H