qaxbase.sip 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. // This is the SIP interface definition for QAxBase.
  2. //
  3. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  4. //
  5. // This file is part of PyQt6.
  6. //
  7. // This file may be used under the terms of the GNU General Public License
  8. // version 3.0 as published by the Free Software Foundation and appearing in
  9. // the file LICENSE included in the packaging of this file. Please review the
  10. // following information to ensure the GNU General Public License version 3.0
  11. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  12. //
  13. // If you do not wish to use this file under the terms of the GPL version 3.0
  14. // then you may purchase a commercial license. For more information contact
  15. // info@riverbankcomputing.com.
  16. //
  17. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  18. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19. class QAxBase
  20. {
  21. %TypeHeaderCode
  22. #include <qaxbase.h>
  23. %End
  24. public:
  25. virtual ~QAxBase();
  26. QString control() const;
  27. //long queryInterface(const QUuid &, void **) const;
  28. // Note that the order of these overloads is significant.
  29. QVariant dynamicCall(const char *, QList<QVariant> & /GetWrapper/);
  30. %MethodCode
  31. Py_BEGIN_ALLOW_THREADS
  32. sipRes = new QVariant(sipCpp->dynamicCall(a0, *a1));
  33. Py_END_ALLOW_THREADS
  34. // Update the input list with the (possibly) new values.
  35. for (Py_ssize_t i = 0; i < PyList_Size(a1Wrapper); ++i)
  36. {
  37. QVariant *v = new QVariant(a1->at(i));
  38. PyObject *v_obj = sipConvertFromNewType(v, sipType_QVariant, NULL);
  39. if (!v_obj)
  40. {
  41. delete v;
  42. sipIsErr = 1;
  43. break;
  44. }
  45. if (PyList_SetItem(a1Wrapper, i, v_obj) < 0)
  46. {
  47. Py_DECREF(v_obj);
  48. sipIsErr = 1;
  49. break;
  50. }
  51. }
  52. %End
  53. QVariant dynamicCall(const char *,
  54. const QVariant &value1 = QVariant(),
  55. const QVariant &value2 = QVariant(),
  56. const QVariant &value3 = QVariant(),
  57. const QVariant &value4 = QVariant(),
  58. const QVariant &value5 = QVariant(),
  59. const QVariant &value6 = QVariant(),
  60. const QVariant &value7 = QVariant(),
  61. const QVariant &value8 = QVariant());
  62. // Note that the order of these overloads is significant.
  63. QAxObject *querySubObject(const char *, QList<QVariant> & /GetWrapper/);
  64. %MethodCode
  65. Py_BEGIN_ALLOW_THREADS
  66. sipRes = sipCpp->querySubObject(a0, *a1);
  67. Py_END_ALLOW_THREADS
  68. // Update the input list with the (possibly) new values.
  69. for (Py_ssize_t i = 0; i < PyList_Size(a1Wrapper); ++i)
  70. {
  71. QVariant *v = new QVariant(a1->at(i));
  72. PyObject *v_obj = sipConvertFromNewType(v, sipType_QVariant, NULL);
  73. if (!v_obj)
  74. {
  75. delete v;
  76. sipIsErr = 1;
  77. break;
  78. }
  79. if (PyList_SetItem(a1Wrapper, i, v_obj) < 0)
  80. {
  81. Py_DECREF(v_obj);
  82. sipIsErr = 1;
  83. break;
  84. }
  85. }
  86. %End
  87. QAxObject *querySubObject(const char *,
  88. const QVariant &value1 = QVariant(),
  89. const QVariant &value2 = QVariant(),
  90. const QVariant &value3 = QVariant(),
  91. const QVariant &value4 = QVariant(),
  92. const QVariant &value5 = QVariant(),
  93. const QVariant &value6 = QVariant(),
  94. const QVariant &value7 = QVariant(),
  95. const QVariant &value8 = QVariant());
  96. // SIP has a bug triggered by a template definition being the subject of
  97. // multiple typedefs. It only really matters when building everything as
  98. // one big module (the code that implements the type is duplicated in
  99. // other cases). Until it is fixed we just avoid the problematic typedef.
  100. //typedef QMap<QString, QVariant> PropertyBag;
  101. //PropertyBag propertyBag() const;
  102. //void setPropertyBag(const PropertyBag &);
  103. QVariantMap propertyBag() const;
  104. void setPropertyBag(const QVariantMap &);
  105. QString generateDocumentation();
  106. virtual bool propertyWritable(const char *) const;
  107. virtual void setPropertyWritable(const char *, bool);
  108. bool isNull() const;
  109. QStringList verbs() const;
  110. QVariant asVariant() const;
  111. void clear();
  112. bool setControl(const QString &);
  113. void disableMetaObject();
  114. void disableClassInfo();
  115. void disableEventSink();
  116. unsigned long classContext() const;
  117. void setClassContext(unsigned long classContext);
  118. protected:
  119. QAxBase();
  120. //virtual bool initialize(IUnknown** ptr);
  121. //bool initializeRemote(IUnknown** ptr);
  122. //bool initializeLicensed(IUnknown** ptr);
  123. //bool initializeActive(IUnknown** ptr);
  124. //bool initializeFromFile(IUnknown** ptr);
  125. };