qgraphicsanchorlayout.sip 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // qgraphicsanchorlayout.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 QGraphicsAnchor : public QObject
  22. {
  23. %TypeHeaderCode
  24. #include <qgraphicsanchorlayout.h>
  25. %End
  26. public:
  27. virtual ~QGraphicsAnchor();
  28. void setSpacing(qreal spacing);
  29. void unsetSpacing();
  30. qreal spacing() const;
  31. void setSizePolicy(QSizePolicy::Policy policy);
  32. QSizePolicy::Policy sizePolicy() const;
  33. private:
  34. QGraphicsAnchor(QGraphicsAnchorLayout *parent);
  35. };
  36. class QGraphicsAnchorLayout : public QGraphicsLayout
  37. {
  38. %TypeHeaderCode
  39. #include <qgraphicsanchorlayout.h>
  40. %End
  41. public:
  42. QGraphicsAnchorLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
  43. virtual ~QGraphicsAnchorLayout();
  44. QGraphicsAnchor *addAnchor(QGraphicsLayoutItem *firstItem /Transfer/, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem /Transfer/, Qt::AnchorPoint secondEdge);
  45. QGraphicsAnchor *anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge);
  46. void addCornerAnchors(QGraphicsLayoutItem *firstItem /Transfer/, Qt::Corner firstCorner, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Corner secondCorner);
  47. void addAnchors(QGraphicsLayoutItem *firstItem /Transfer/, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Orientations orientations = Qt::Horizontal | Qt::Vertical);
  48. void setHorizontalSpacing(qreal spacing);
  49. void setVerticalSpacing(qreal spacing);
  50. void setSpacing(qreal spacing);
  51. qreal horizontalSpacing() const;
  52. qreal verticalSpacing() const;
  53. virtual void removeAt(int index);
  54. virtual void setGeometry(const QRectF &rect);
  55. virtual int count() const;
  56. virtual QGraphicsLayoutItem *itemAt(int index) const;
  57. virtual void invalidate();
  58. protected:
  59. virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
  60. };