Warning, file /include/QtWidgets/qgraphicsgridlayout.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004 #ifndef QGRAPHICSGRIDLAYOUT_H
0005 #define QGRAPHICSGRIDLAYOUT_H
0006
0007 #include <QtWidgets/qtwidgetsglobal.h>
0008 #include <QtWidgets/qgraphicsitem.h>
0009 #include <QtWidgets/qgraphicslayout.h>
0010
0011 QT_REQUIRE_CONFIG(graphicsview);
0012
0013 QT_BEGIN_NAMESPACE
0014
0015 class QGraphicsGridLayoutPrivate;
0016
0017 class Q_WIDGETS_EXPORT QGraphicsGridLayout : public QGraphicsLayout
0018 {
0019 public:
0020 QGraphicsGridLayout(QGraphicsLayoutItem *parent = nullptr);
0021 virtual ~QGraphicsGridLayout();
0022
0023 void addItem(QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan,
0024 Qt::Alignment alignment = Qt::Alignment());
0025 inline void addItem(QGraphicsLayoutItem *item, int row, int column, Qt::Alignment alignment = Qt::Alignment());
0026
0027 void setHorizontalSpacing(qreal spacing);
0028 qreal horizontalSpacing() const;
0029 void setVerticalSpacing(qreal spacing);
0030 qreal verticalSpacing() const;
0031 void setSpacing(qreal spacing);
0032
0033 void setRowSpacing(int row, qreal spacing);
0034 qreal rowSpacing(int row) const;
0035 void setColumnSpacing(int column, qreal spacing);
0036 qreal columnSpacing(int column) const;
0037
0038 void setRowStretchFactor(int row, int stretch);
0039 int rowStretchFactor(int row) const;
0040 void setColumnStretchFactor(int column, int stretch);
0041 int columnStretchFactor(int column) const;
0042
0043 void setRowMinimumHeight(int row, qreal height);
0044 qreal rowMinimumHeight(int row) const;
0045 void setRowPreferredHeight(int row, qreal height);
0046 qreal rowPreferredHeight(int row) const;
0047 void setRowMaximumHeight(int row, qreal height);
0048 qreal rowMaximumHeight(int row) const;
0049 void setRowFixedHeight(int row, qreal height);
0050
0051 void setColumnMinimumWidth(int column, qreal width);
0052 qreal columnMinimumWidth(int column) const;
0053 void setColumnPreferredWidth(int column, qreal width);
0054 qreal columnPreferredWidth(int column) const;
0055 void setColumnMaximumWidth(int column, qreal width);
0056 qreal columnMaximumWidth(int column) const;
0057 void setColumnFixedWidth(int column, qreal width);
0058
0059 void setRowAlignment(int row, Qt::Alignment alignment);
0060 Qt::Alignment rowAlignment(int row) const;
0061 void setColumnAlignment(int column, Qt::Alignment alignment);
0062 Qt::Alignment columnAlignment(int column) const;
0063
0064 void setAlignment(QGraphicsLayoutItem *item, Qt::Alignment alignment);
0065 Qt::Alignment alignment(QGraphicsLayoutItem *item) const;
0066
0067 int rowCount() const;
0068 int columnCount() const;
0069
0070 QGraphicsLayoutItem *itemAt(int row, int column) const;
0071
0072
0073 int count() const override;
0074 QGraphicsLayoutItem *itemAt(int index) const override;
0075 void removeAt(int index) override;
0076 void removeItem(QGraphicsLayoutItem *item);
0077
0078 void invalidate() override;
0079
0080
0081 void setGeometry(const QRectF &rect) override;
0082 QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint = QSizeF()) const override;
0083
0084
0085
0086
0087
0088 private:
0089 Q_DISABLE_COPY(QGraphicsGridLayout)
0090 Q_DECLARE_PRIVATE(QGraphicsGridLayout)
0091 };
0092
0093 inline void QGraphicsGridLayout::addItem(QGraphicsLayoutItem *aitem, int arow, int acolumn, Qt::Alignment aalignment)
0094 { addItem(aitem, arow, acolumn, 1, 1, aalignment); }
0095
0096 QT_END_NAMESPACE
0097
0098 #endif