qsplitter.sip 3.4 KB

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