1// qgraphicsanchorlayout.sip generated by MetaSIP
2//
3// This file is part of the QtWidgets Python extension module.
4//
5// Copyright (c) 2021 Riverbank Computing Limited <info@riverbankcomputing.com>
6//
7// This file is part of PyQt5.
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
22
23class QGraphicsAnchor : QObject
24{
25%TypeHeaderCode
26#include <qgraphicsanchorlayout.h>
27%End
28
29public:
30    virtual ~QGraphicsAnchor();
31    void setSpacing(qreal spacing);
32    void unsetSpacing();
33    qreal spacing() const;
34    void setSizePolicy(QSizePolicy::Policy policy);
35    QSizePolicy::Policy sizePolicy() const;
36
37private:
38    QGraphicsAnchor(QGraphicsAnchorLayout *parent);
39};
40
41class QGraphicsAnchorLayout : QGraphicsLayout
42{
43%TypeHeaderCode
44#include <qgraphicsanchorlayout.h>
45%End
46
47public:
48    QGraphicsAnchorLayout(QGraphicsLayoutItem *parent /TransferThis/ = 0);
49    virtual ~QGraphicsAnchorLayout();
50    QGraphicsAnchor *addAnchor(QGraphicsLayoutItem *firstItem /Transfer/, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem /Transfer/, Qt::AnchorPoint secondEdge);
51    QGraphicsAnchor *anchor(QGraphicsLayoutItem *firstItem, Qt::AnchorPoint firstEdge, QGraphicsLayoutItem *secondItem, Qt::AnchorPoint secondEdge);
52    void addCornerAnchors(QGraphicsLayoutItem *firstItem /Transfer/, Qt::Corner firstCorner, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Corner secondCorner);
53    void addAnchors(QGraphicsLayoutItem *firstItem /Transfer/, QGraphicsLayoutItem *secondItem /Transfer/, Qt::Orientations orientations = Qt::Horizontal | Qt::Vertical);
54    void setHorizontalSpacing(qreal spacing);
55    void setVerticalSpacing(qreal spacing);
56    void setSpacing(qreal spacing);
57    qreal horizontalSpacing() const;
58    qreal verticalSpacing() const;
59    virtual void removeAt(int index);
60    virtual void setGeometry(const QRectF &rect);
61    virtual int count() const;
62    virtual QGraphicsLayoutItem *itemAt(int index) const;
63    virtual void invalidate();
64
65protected:
66    virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const;
67};
68