pyside6_qtpdfwidgets_python.h 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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_QTPDFWIDGETS_PYTHON_H
  4. #define SBK_QTPDFWIDGETS_PYTHON_H
  5. #include <sbkpython.h>
  6. #include <sbkmodule.h>
  7. #include <sbkconverter.h>
  8. // Module Includes
  9. #include <pyside6_qtcore_python.h>
  10. #include <pyside6_qtgui_python.h>
  11. #include <pyside6_qtwidgets_python.h>
  12. #include <pyside6_qtpdf_python.h>
  13. // Bound library includes
  14. #include <QtPdfWidgets/qpdfview.h>
  15. QT_BEGIN_NAMESPACE
  16. class QPdfPageSelector;
  17. QT_END_NAMESPACE
  18. // Type indices
  19. enum [[deprecated]] : int {
  20. SBK_QPDFPAGESELECTOR_IDX = 0,
  21. SBK_QPDFVIEW_PAGEMODE_IDX = 4,
  22. SBK_QPDFVIEW_ZOOMMODE_IDX = 6,
  23. SBK_QPDFVIEW_IDX = 2,
  24. SBK_QTPDFWIDGETS_IDX_COUNT = 8,
  25. };
  26. // Type indices
  27. enum : int {
  28. SBK_QPdfPageSelector_IDX = 0,
  29. SBK_QPdfView_PageMode_IDX = 2,
  30. SBK_QPdfView_ZoomMode_IDX = 3,
  31. SBK_QPdfView_IDX = 1,
  32. SBK_QtPdfWidgets_IDX_COUNT = 4,
  33. };
  34. // This variable stores all Python types exported by this module.
  35. extern Shiboken::Module::TypeInitStruct *SbkPySide6_QtPdfWidgetsTypeStructs;
  36. // This variable stores all Python types exported by this module in a backwards compatible way with identical indexing.
  37. [[deprecated]] extern PyTypeObject **SbkPySide6_QtPdfWidgetsTypes;
  38. // This variable stores the Python module object exported by this module.
  39. extern PyObject *SbkPySide6_QtPdfWidgetsModuleObject;
  40. // This variable stores all type converters exported by this module.
  41. extern SbkConverter **SbkPySide6_QtPdfWidgetsTypeConverters;
  42. // Converter indices
  43. enum [[deprecated]] : int {
  44. SBK_QTPDFWIDGETS_QLIST_INT_IDX = 0, // QList<int>
  45. SBK_QTPDFWIDGETS_QLIST_QVARIANT_IDX = 1, // QList<QVariant>
  46. SBK_QTPDFWIDGETS_QLIST_QSTRING_IDX = 2, // QList<QString>
  47. SBK_QTPDFWIDGETS_QMAP_QSTRING_QVARIANT_IDX = 3, // QMap<QString,QVariant>
  48. SBK_QTPDFWIDGETS_CONVERTERS_IDX_COUNT = 4,
  49. };
  50. // Converter indices
  51. enum : int {
  52. SBK_QtPdfWidgets_QList_int_IDX = 0, // QList<int>
  53. SBK_QtPdfWidgets_QList_QVariant_IDX = 1, // QList<QVariant>
  54. SBK_QtPdfWidgets_QList_QString_IDX = 2, // QList<QString>
  55. SBK_QtPdfWidgets_QMap_QString_QVariant_IDX = 3, // QMap<QString,QVariant>
  56. SBK_QtPdfWidgets_CONVERTERS_IDX_COUNT = 4,
  57. };
  58. // Macros for type check
  59. QT_WARNING_PUSH
  60. QT_WARNING_DISABLE_DEPRECATED
  61. namespace Shiboken
  62. {
  63. // PyType functions, to get the PyObjectType for a type T
  64. template<> inline PyTypeObject *SbkType< ::QPdfPageSelector >() { return Shiboken::Module::get(SbkPySide6_QtPdfWidgetsTypeStructs[SBK_QPdfPageSelector_IDX]); }
  65. template<> inline PyTypeObject *SbkType< ::QPdfView::PageMode >() { return Shiboken::Module::get(SbkPySide6_QtPdfWidgetsTypeStructs[SBK_QPdfView_PageMode_IDX]); }
  66. template<> inline PyTypeObject *SbkType< ::QPdfView::ZoomMode >() { return Shiboken::Module::get(SbkPySide6_QtPdfWidgetsTypeStructs[SBK_QPdfView_ZoomMode_IDX]); }
  67. template<> inline PyTypeObject *SbkType< ::QPdfView >() { return Shiboken::Module::get(SbkPySide6_QtPdfWidgetsTypeStructs[SBK_QPdfView_IDX]); }
  68. } // namespace Shiboken
  69. QT_WARNING_POP
  70. #endif // SBK_QTPDFWIDGETS_PYTHON_H