1 /**************************************************************************** 2 ** 3 ** DQt - D bindings for the Qt Toolkit 4 ** 5 ** GNU Lesser General Public License Usage 6 ** This file may be used under the terms of the GNU Lesser 7 ** General Public License version 3 as published by the Free Software 8 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 9 ** packaging of this file. Please review the following information to 10 ** ensure the GNU Lesser General Public License version 3 requirements 11 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 12 ** 13 ****************************************************************************/ 14 module qt.widgets.gridlayout; 15 extern(C++): 16 17 import qt.config; 18 import qt.core.namespace; 19 import qt.core.rect; 20 import qt.core.size; 21 import qt.helpers; 22 import qt.widgets.layout; 23 import qt.widgets.layoutitem; 24 import qt.widgets.widget; 25 26 /+ #ifdef QT_INCLUDE_COMPAT 27 #endif +/ 28 29 30 31 extern(C++, class) struct QGridLayoutPrivate; 32 33 class /+ Q_WIDGETS_EXPORT +/ QGridLayout : QLayout 34 { 35 mixin(Q_OBJECT); 36 /+ Q_DECLARE_PRIVATE(QGridLayout) +/ 37 /+ QDOC_PROPERTY(int horizontalSpacing READ horizontalSpacing WRITE setHorizontalSpacing) 38 QDOC_PROPERTY(int verticalSpacing READ verticalSpacing WRITE setVerticalSpacing) +/ 39 40 public: 41 /+ explicit +/this(QWidget parent); 42 this(); 43 44 ~this(); 45 46 override QSize sizeHint() const; 47 override QSize minimumSize() const; 48 override QSize maximumSize() const; 49 50 final void setHorizontalSpacing(int spacing); 51 final int horizontalSpacing() const; 52 final void setVerticalSpacing(int spacing); 53 final int verticalSpacing() const; 54 // final void setSpacing(int spacing); 55 // final int spacing() const; 56 57 final void setRowStretch(int row, int stretch); 58 final void setColumnStretch(int column, int stretch); 59 final int rowStretch(int row) const; 60 final int columnStretch(int column) const; 61 62 final void setRowMinimumHeight(int row, int minSize); 63 final void setColumnMinimumWidth(int column, int minSize); 64 final int rowMinimumHeight(int row) const; 65 final int columnMinimumWidth(int column) const; 66 67 final int columnCount() const; 68 final int rowCount() const; 69 70 final QRect cellRect(int row, int column) const; 71 72 override bool hasHeightForWidth() const; 73 override int heightForWidth(int) const; 74 override int minimumHeightForWidth(int) const; 75 76 override /+ Qt:: +/qt.core.namespace.Orientations expandingDirections() const; 77 override void invalidate(); 78 79 // pragma(inline, true) final void addWidget(QWidget w) { QLayout.addWidget(w); } 80 final void addWidget(QWidget , int row, int column, /+ Qt:: +/qt.core.namespace.Alignment = globalInitVar!Alignment); 81 final void addWidget(QWidget , int row, int column, int rowSpan, int columnSpan, /+ Qt:: +/qt.core.namespace.Alignment = globalInitVar!Alignment); 82 final void addLayout(QLayout , int row, int column, /+ Qt:: +/qt.core.namespace.Alignment = globalInitVar!Alignment); 83 final void addLayout(QLayout , int row, int column, int rowSpan, int columnSpan, /+ Qt:: +/qt.core.namespace.Alignment = globalInitVar!Alignment); 84 85 final void setOriginCorner(/+ Qt:: +/qt.core.namespace.Corner); 86 final /+ Qt:: +/qt.core.namespace.Corner originCorner() const; 87 88 override QLayoutItem itemAt(int index) const; 89 final QLayoutItem itemAtPosition(int row, int column) const; 90 override QLayoutItem takeAt(int index); 91 override int count() const; 92 override void setGeometry(ref const(QRect)); 93 94 final void addItem(QLayoutItem item, int row, int column, int rowSpan = 1, int columnSpan = 1, /+ Qt:: +/qt.core.namespace.Alignment = globalInitVar!(qt.core.namespace.Alignment)); 95 96 final void setDefaultPositioning(int n, /+ Qt:: +/qt.core.namespace.Orientation orient); 97 final void getItemPosition(int idx, int* row, int* column, int* rowSpan, int* columnSpan) const; 98 99 protected: 100 override void addItem(QLayoutItem ); 101 102 private: 103 /+ Q_DISABLE_COPY(QGridLayout) +/ 104 105 } 106