1// qsplitter.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 QSplitter : QFrame
24{
25%TypeHeaderCode
26#include <qsplitter.h>
27%End
28
29public:
30    explicit QSplitter(QWidget *parent /TransferThis/ = 0);
31    QSplitter(Qt::Orientation orientation, QWidget *parent /TransferThis/ = 0);
32    virtual ~QSplitter();
33    void addWidget(QWidget *widget /Transfer/);
34    void insertWidget(int index, QWidget *widget /Transfer/);
35    void setOrientation(Qt::Orientation);
36    Qt::Orientation orientation() const;
37    void setChildrenCollapsible(bool);
38    bool childrenCollapsible() const;
39    void setCollapsible(int index, bool);
40    bool isCollapsible(int index) const;
41    void setOpaqueResize(bool opaque = true);
42    bool opaqueResize() const;
43    void refresh();
44    virtual QSize sizeHint() const;
45    virtual QSize minimumSizeHint() const;
46    QList<int> sizes() const;
47    void setSizes(const QList<int> &list);
48    QByteArray saveState() const;
49    bool restoreState(const QByteArray &state);
50    int handleWidth() const;
51    void setHandleWidth(int);
52    int indexOf(QWidget *w) const;
53    QWidget *widget(int index) const;
54    int count() const /__len__/;
55    void getRange(int index, int *, int *) const;
56    QSplitterHandle *handle(int index) const /Transfer/;
57    void setStretchFactor(int index, int stretch);
58%If (Qt_5_9_0 -)
59    QWidget *replaceWidget(int index, QWidget *widget /Transfer/) /TransferBack/;
60%End
61
62signals:
63    void splitterMoved(int pos, int index);
64
65protected:
66    virtual QSplitterHandle *createHandle() /Transfer/;
67    virtual void childEvent(QChildEvent *);
68    virtual bool event(QEvent *);
69    virtual void resizeEvent(QResizeEvent *);
70    virtual void changeEvent(QEvent *);
71    void moveSplitter(int pos, int index);
72    void setRubberBand(int position);
73    int closestLegalPosition(int, int);
74};
75
76class QSplitterHandle : QWidget
77{
78%TypeHeaderCode
79#include <qsplitter.h>
80%End
81
82public:
83    QSplitterHandle(Qt::Orientation o, QSplitter *parent /TransferThis/);
84    virtual ~QSplitterHandle();
85    void setOrientation(Qt::Orientation o);
86    Qt::Orientation orientation() const;
87    bool opaqueResize() const;
88    QSplitter *splitter() const;
89    virtual QSize sizeHint() const;
90
91protected:
92    virtual void paintEvent(QPaintEvent *);
93    virtual void mouseMoveEvent(QMouseEvent *);
94    virtual void mousePressEvent(QMouseEvent *);
95    virtual void mouseReleaseEvent(QMouseEvent *);
96    virtual bool event(QEvent *);
97    void moveSplitter(int p);
98    int closestLegalPosition(int p);
99    virtual void resizeEvent(QResizeEvent *);
100};
101