qrangemodel.sip 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. // qrangemodel.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtCore 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. %If (Qt_6_10_0 -)
  22. class QRangeModel : public QAbstractItemModel /ExportDerivedLocally/
  23. {
  24. %TypeHeaderCode
  25. #include <qrangemodel.h>
  26. #include "qpycore_qrangemodel.h"
  27. %End
  28. %TypeDerivedCode
  29. sipQRangeModel(const QVariantList &range, QObject *parent) : QRangeModel(range, parent) {}
  30. sipQRangeModel(QVariantList &range, QObject *parent) : QRangeModel(range, parent) {}
  31. sipQRangeModel(const QList<QVariantList> &range, QObject *parent) : QRangeModel(range, parent) {}
  32. sipQRangeModel(QList<QVariantList> &range, QObject *parent) : QRangeModel(range, parent) {}
  33. %End
  34. public:
  35. QRangeModel(QPyAbstractRange *range /Transfer/, QObject *parent /TransferThis/ = 0) /HoldGIL, NoDerived/;
  36. %MethodCode
  37. sipCpp = a0->create(a1);
  38. if (!sipCpp)
  39. sipError = sipErrorFail;
  40. %End
  41. virtual ~QRangeModel();
  42. QModelIndex index(int row, int column, const QModelIndex &parent = {}) const final;
  43. QModelIndex parent(const QModelIndex &child) const final;
  44. QModelIndex sibling(int row, int column, const QModelIndex &index) const final;
  45. int rowCount(const QModelIndex &parent = {}) const final;
  46. int columnCount(const QModelIndex &parent = {}) const final;
  47. virtual Qt::ItemFlags flags(const QModelIndex &index) const;
  48. virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
  49. virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &data, int role = Qt::EditRole);
  50. virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
  51. virtual bool setData(const QModelIndex &index, const QVariant &data, int role = Qt::EditRole);
  52. virtual QMap<int, QVariant> itemData(const QModelIndex &index) const;
  53. virtual bool setItemData(const QModelIndex &index, const QMap<int, QVariant> &data);
  54. virtual bool clearItemData(const QModelIndex &index);
  55. bool insertColumns(int column, int count, const QModelIndex &parent = {}) final;
  56. bool removeColumns(int column, int count, const QModelIndex &parent = {}) final;
  57. bool moveColumns(const QModelIndex &sourceParent, int sourceColumn, int count, const QModelIndex &destParent, int destColumn) final;
  58. bool insertRows(int row, int count, const QModelIndex &parent = {}) final;
  59. bool removeRows(int row, int count, const QModelIndex &parent = {}) final;
  60. bool moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destParent, int destRow) final;
  61. virtual QHash<int, QByteArray> roleNames() const;
  62. void setRoleNames(const QHash<int, QByteArray> &names);
  63. void resetRoleNames();
  64. virtual bool canFetchMore(const QModelIndex &parent) const;
  65. virtual void fetchMore(const QModelIndex &parent);
  66. bool hasChildren(const QModelIndex &parent = QModelIndex()) const final;
  67. virtual QModelIndex buddy(const QModelIndex &index) const;
  68. virtual bool canDropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) const;
  69. virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent);
  70. virtual QMimeData *mimeData(const QModelIndexList &indexes) const;
  71. virtual QStringList mimeTypes() const;
  72. virtual QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits, Qt::MatchFlags flags) const;
  73. virtual void multiData(const QModelIndex &index, QModelRoleDataSpan roleDataSpan) const;
  74. virtual void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
  75. virtual QSize span(const QModelIndex &index) const;
  76. virtual Qt::DropActions supportedDragActions() const;
  77. virtual Qt::DropActions supportedDropActions() const;
  78. signals:
  79. void roleNamesChanged();
  80. protected slots:
  81. virtual void resetInternalData();
  82. protected:
  83. virtual bool event(QEvent *);
  84. virtual bool eventFilter(QObject *, QEvent *);
  85. public:
  86. %If (Qt_6_11_0 -)
  87. enum class AutoConnectPolicy
  88. {
  89. None,
  90. Full,
  91. OnRead,
  92. };
  93. %End
  94. %If (Qt_6_11_0 -)
  95. QRangeModel::AutoConnectPolicy autoConnectPolicy() const;
  96. %End
  97. %If (Qt_6_11_0 -)
  98. void setAutoConnectPolicy(QRangeModel::AutoConnectPolicy policy);
  99. %End
  100. signals:
  101. %If (Qt_6_11_0 -)
  102. void autoConnectPolicyChanged(QRangeModel::AutoConnectPolicy policy);
  103. %End
  104. };
  105. %End