qaxobject.sip 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // This is the SIP interface definition for QAxObject.
  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 QAxBaseObject : QObject, QAxObjectInterface
  20. {
  21. %TypeHeaderCode
  22. #include <qaxobject.h>
  23. %End
  24. signals:
  25. void exception(int code, const QString &source, const QString &desc, const QString &help);
  26. void propertyChanged(const QString &name);
  27. void signal(const QString &name, int argc, void *argv);
  28. };
  29. class QAxObject : QAxBaseObject, QAxBase
  30. {
  31. %TypeHeaderCode
  32. #include <qaxobject.h>
  33. %End
  34. public:
  35. explicit QAxObject(QObject *parent /TransferThis/ = 0);
  36. explicit QAxObject(const QString &, QObject *parent /TransferThis/ = 0);
  37. //explicit QAxObject(IUnknown *, QObject *parent /TransferThis/ = 0);
  38. ~QAxObject();
  39. %ConvertToSubClassCode
  40. static struct class_graph {
  41. const char *name;
  42. sipTypeDef **type;
  43. int yes, no;
  44. } graph[] = {
  45. {sipName_QAxBaseObject, &sipType_QAxBaseObject, 2, 1},
  46. {sipName_QAxBaseWidget, &sipType_QAxBaseWidget, 3, -1},
  47. {sipName_QAxObject, &sipType_QAxObject, -1, -1},
  48. {sipName_QAxWidget, &sipType_QAxWidget, -1, -1},
  49. };
  50. int i = 0;
  51. sipType = NULL;
  52. do
  53. {
  54. struct class_graph *cg = &graph[i];
  55. if (cg->name != NULL && sipCpp->inherits(cg->name))
  56. {
  57. sipType = *cg->type;
  58. i = cg->yes;
  59. }
  60. else
  61. i = cg->no;
  62. }
  63. while (i >= 0);
  64. %End
  65. unsigned long classContext() const;
  66. void setClassContext(unsigned long classContext);
  67. QString control() const;
  68. bool setControl(const QString &c);
  69. void resetControl();
  70. void clear();
  71. bool doVerb(const QString &);
  72. protected:
  73. void connectNotify(const QMetaMethod &);
  74. };