qgraphicsgridlayout.sip 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. // qgraphicsgridlayout.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtWidgets 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 QGraphicsGridLayout : public QGraphicsLayout
  22. {
  23. %TypeHeaderCode
  24. #include <qgraphicsgridlayout.h>
  25. %End
  26. public:
  27. QGraphicsGridLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
  28. virtual ~QGraphicsGridLayout();
  29. void addItem(QGraphicsLayoutItem *item /Transfer/, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment = Qt::Alignment());
  30. void addItem(QGraphicsLayoutItem *item /Transfer/, int row, int column, Qt::Alignment alignment = Qt::Alignment());
  31. void setHorizontalSpacing(qreal spacing);
  32. qreal horizontalSpacing() const;
  33. void setVerticalSpacing(qreal spacing);
  34. qreal verticalSpacing() const;
  35. void setSpacing(qreal spacing);
  36. void setRowSpacing(int row, qreal spacing);
  37. qreal rowSpacing(int row) const;
  38. void setColumnSpacing(int column, qreal spacing);
  39. qreal columnSpacing(int column) const;
  40. void setRowStretchFactor(int row, int stretch);
  41. int rowStretchFactor(int row) const;
  42. void setColumnStretchFactor(int column, int stretch);
  43. int columnStretchFactor(int column) const;
  44. void setRowMinimumHeight(int row, qreal height);
  45. qreal rowMinimumHeight(int row) const;
  46. void setRowPreferredHeight(int row, qreal height);
  47. qreal rowPreferredHeight(int row) const;
  48. void setRowMaximumHeight(int row, qreal height);
  49. qreal rowMaximumHeight(int row) const;
  50. void setRowFixedHeight(int row, qreal height);
  51. void setColumnMinimumWidth(int column, qreal width);
  52. qreal columnMinimumWidth(int column) const;
  53. void setColumnPreferredWidth(int column, qreal width);
  54. qreal columnPreferredWidth(int column) const;
  55. void setColumnMaximumWidth(int column, qreal width);
  56. qreal columnMaximumWidth(int column) const;
  57. void setColumnFixedWidth(int column, qreal width);
  58. void setRowAlignment(int row, Qt::Alignment alignment);
  59. Qt::Alignment rowAlignment(int row) const;
  60. void setColumnAlignment(int column, Qt::Alignment alignment);
  61. Qt::Alignment columnAlignment(int column) const;
  62. void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
  63. Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
  64. int rowCount() const;
  65. int columnCount() const;
  66. QGraphicsLayoutItem *itemAt(int row, int column) const;
  67. virtual int count() const;
  68. virtual QGraphicsLayoutItem *itemAt(int index) const;
  69. virtual void removeAt(int index);
  70. %MethodCode
  71. // The ownership of any existing item must be passed back to Python.
  72. QGraphicsLayoutItem *itm;
  73. if (a0 < sipCpp->count())
  74. itm = sipCpp->itemAt(a0);
  75. else
  76. itm = 0;
  77. Py_BEGIN_ALLOW_THREADS
  78. sipSelfWasArg ? sipCpp->QGraphicsGridLayout::removeAt(a0)
  79. : sipCpp->removeAt(a0);
  80. Py_END_ALLOW_THREADS
  81. if (itm)
  82. {
  83. PyObject *itmo = sipGetPyObject(itm, sipType_QGraphicsLayoutItem);
  84. if (itmo)
  85. sipTransferBack(itmo);
  86. }
  87. %End
  88. virtual void invalidate();
  89. virtual void setGeometry(const QRectF &rect);
  90. virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
  91. void removeItem(QGraphicsLayoutItem *item /TransferBack/);
  92. };