42 #ifndef QGRAPHICSGRIDLAYOUT_H 43 #define QGRAPHICSGRIDLAYOUT_H 45 #include <QtGui/qgraphicsitem.h> 46 #include <QtGui/qgraphicslayout.h> 54 #if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW 65 Qt::Alignment alignment = 0);
66 inline void addItem(
QGraphicsLayoutItem *item,
int row,
int column, Qt::Alignment alignment = 0);
68 void setHorizontalSpacing(
qreal spacing);
69 qreal horizontalSpacing()
const;
70 void setVerticalSpacing(
qreal spacing);
71 qreal verticalSpacing()
const;
72 void setSpacing(
qreal spacing);
74 void setRowSpacing(
int row,
qreal spacing);
75 qreal rowSpacing(
int row)
const;
76 void setColumnSpacing(
int column,
qreal spacing);
77 qreal columnSpacing(
int column)
const;
79 void setRowStretchFactor(
int row,
int stretch);
80 int rowStretchFactor(
int row)
const;
81 void setColumnStretchFactor(
int column,
int stretch);
82 int columnStretchFactor(
int column)
const;
84 void setRowMinimumHeight(
int row,
qreal height);
85 qreal rowMinimumHeight(
int row)
const;
86 void setRowPreferredHeight(
int row,
qreal height);
87 qreal rowPreferredHeight(
int row)
const;
88 void setRowMaximumHeight(
int row,
qreal height);
89 qreal rowMaximumHeight(
int row)
const;
90 void setRowFixedHeight(
int row,
qreal height);
92 void setColumnMinimumWidth(
int column,
qreal width);
93 qreal columnMinimumWidth(
int column)
const;
94 void setColumnPreferredWidth(
int column,
qreal width);
95 qreal columnPreferredWidth(
int column)
const;
96 void setColumnMaximumWidth(
int column,
qreal width);
97 qreal columnMaximumWidth(
int column)
const;
98 void setColumnFixedWidth(
int column,
qreal width);
100 void setRowAlignment(
int row, Qt::Alignment alignment);
101 Qt::Alignment rowAlignment(
int row)
const;
102 void setColumnAlignment(
int column, Qt::Alignment alignment);
103 Qt::Alignment columnAlignment(
int column)
const;
108 int rowCount()
const;
109 int columnCount()
const;
135 { addItem(aitem, arow, acolumn, 1, 1, aalignment); }
virtual void removeAt(int index)=0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to remove the item ...
virtual void setGeometry(const QRectF &rect)
This virtual function sets the geometry of the QGraphicsLayoutItem to rect, which is in parent coordi...
#define QT_END_NAMESPACE
This macro expands to.
The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
The QSizeF class defines the size of a two-dimensional object using floating point precision...
void addItem(QGraphicsLayoutItem *item, int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment=0)
Adds item to the grid on row and column.
virtual void invalidate()
Clears any cached geometry and size hint information in the layout, and posts a LayoutRequest event t...
virtual QSizeF sizeHint(Qt::SizeHint which, const QSizeF &constraint=QSizeF()) const =0
This pure virtual function returns the size hint for which of the QGraphicsLayoutItem, using the width or height of constraint to constrain the output.
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
The QGraphicsLayoutItem class can be inherited to allow your custom items to be managed by layouts...
virtual int count() const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return the numbe...
The QGraphicsLayout class provides the base class for all layouts in Graphics View.
#define Q_DECLARE_PRIVATE(Class)
virtual QGraphicsLayoutItem * itemAt(int i) const =0
This pure virtual function must be reimplemented in a subclass of QGraphicsLayout to return a pointer...