pysideclassinfo.h 801 B

123456789101112131415161718192021222324252627282930313233
  1. // Copyright (C) 2016 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 PYSIDE_CLASSINFO_H
  4. #define PYSIDE_CLASSINFO_H
  5. #include <pysidemacros.h>
  6. #include <sbkpython.h>
  7. #include <QtCore/qbytearray.h>
  8. #include <QtCore/qlist.h>
  9. namespace PySide::ClassInfo {
  10. struct ClassInfo
  11. {
  12. QByteArray key;
  13. QByteArray value;
  14. };
  15. using ClassInfoList = QList<ClassInfo>;
  16. PYSIDE_API bool checkType(PyObject* pyObj);
  17. PYSIDE_API ClassInfoList getClassInfoList(PyObject *decorator);
  18. PYSIDE_API bool setClassInfo(PyTypeObject *type, const QByteArray &key,
  19. const QByteArray &value);
  20. PYSIDE_API bool setClassInfo(PyTypeObject *type, const ClassInfoList &list);
  21. } // namespace PySide::ClassInfo
  22. #endif