qqmlcontext.sip 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // qqmlcontext.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtQml 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 QQmlContext : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qqmlcontext.h>
  25. %End
  26. public:
  27. QQmlContext(QQmlEngine *engine, QObject *parent /TransferThis/ = 0);
  28. QQmlContext(QQmlContext *parentContext, QObject *parent /TransferThis/ = 0);
  29. virtual ~QQmlContext();
  30. bool isValid() const;
  31. QQmlEngine *engine() const;
  32. QQmlContext *parentContext() const;
  33. QObject *contextObject() const;
  34. void setContextObject(QObject *);
  35. QVariant contextProperty(const QString &) const;
  36. void setContextProperty(const QString &, QObject *);
  37. void setContextProperty(const QString &, const QVariant &);
  38. QString nameForObject(const QObject *) const;
  39. QUrl resolvedUrl(const QUrl &) const;
  40. void setBaseUrl(const QUrl &);
  41. QUrl baseUrl() const;
  42. struct PropertyPair
  43. {
  44. %TypeHeaderCode
  45. #include <qqmlcontext.h>
  46. %End
  47. QString name;
  48. QVariant value;
  49. };
  50. void setContextProperties(const QList<QQmlContext::PropertyPair> &properties);
  51. %If (Qt_6_2_0 -)
  52. QObject *objectForName(const QString &) const;
  53. %End
  54. %If (Qt_6_11_0 -)
  55. QList<QQmlContext *> childContexts() const;
  56. %End
  57. %If (Qt_6_11_0 -)
  58. QObject *findObjectRecursively(const QString &id) const;
  59. %End
  60. %If (Qt_6_11_0 -)
  61. QList<QObject *> findObjectsRecursively(const QString &id) const;
  62. %End
  63. };