qextensionmanager.sip 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // qextensionmanager.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtDesigner Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. class QExtensionManager : public QObject, public QAbstractExtensionManager
  22. {
  23. %TypeHeaderCode
  24. #include <qextensionmanager.h>
  25. %End
  26. %ConvertToSubClassCode
  27. static struct class_graph {
  28. const char *name;
  29. sipTypeDef **type;
  30. int yes, no;
  31. } graph[] = {
  32. {sipName_QPyDesignerCustomWidgetPlugin, &sipType_QPyDesignerCustomWidgetPlugin, -1, 1},
  33. {sipName_QExtensionFactory, &sipType_QExtensionFactory, -1, 2},
  34. {sipName_QPyDesignerMemberSheetExtension, &sipType_QPyDesignerMemberSheetExtension, -1, 3},
  35. {sipName_QDesignerFormEditorInterface, &sipType_QDesignerFormEditorInterface, -1, 4},
  36. {sipName_QDesignerWidgetBoxInterface, &sipType_QDesignerWidgetBoxInterface, -1, 5},
  37. {sipName_QDesignerFormWindowInterface, &sipType_QDesignerFormWindowInterface, -1, 6},
  38. {sipName_QDesignerActionEditorInterface, &sipType_QDesignerActionEditorInterface, -1, 7},
  39. {sipName_QPyDesignerContainerExtension, &sipType_QPyDesignerContainerExtension, -1, 8},
  40. {sipName_QDesignerPropertyEditorInterface, &sipType_QDesignerPropertyEditorInterface, -1, 9},
  41. {sipName_QDesignerFormWindowManagerInterface, &sipType_QDesignerFormWindowManagerInterface, -1, 10},
  42. {sipName_QPyDesignerTaskMenuExtension, &sipType_QPyDesignerTaskMenuExtension, -1, 11},
  43. {sipName_QPyDesignerPropertySheetExtension, &sipType_QPyDesignerPropertySheetExtension, -1, 12},
  44. {sipName_QDesignerObjectInspectorInterface, &sipType_QDesignerObjectInspectorInterface, -1, 13},
  45. {sipName_QPyDesignerCustomWidgetCollectionPlugin, &sipType_QPyDesignerCustomWidgetCollectionPlugin, -1, 14},
  46. {sipName_QExtensionManager, &sipType_QExtensionManager, -1, -1},
  47. };
  48. int i = 0;
  49. sipType = NULL;
  50. do
  51. {
  52. struct class_graph *cg = &graph[i];
  53. if (cg->name != NULL && sipCpp->inherits(cg->name))
  54. {
  55. sipType = *cg->type;
  56. i = cg->yes;
  57. }
  58. else
  59. i = cg->no;
  60. }
  61. while (i >= 0);
  62. %End
  63. public:
  64. explicit QExtensionManager(QObject *parent /TransferThis/ = 0);
  65. virtual ~QExtensionManager();
  66. virtual void registerExtensions(QAbstractExtensionFactory *factory, const QString &iid = QString());
  67. virtual void unregisterExtensions(QAbstractExtensionFactory *factory, const QString &iid = QString());
  68. virtual QObject *extension(QObject *object, const QString &iid) const;
  69. };