|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.trolltech.qt.internal.QSignalEmitterInternal
com.trolltech.qt.QSignalEmitter
com.trolltech.qt.QtJambiObject
com.trolltech.qt.gui.QGraphicsLayout
com.trolltech.qt.gui.QGraphicsGridLayout
public class QGraphicsGridLayout
The QGraphicsGridLayout class provides a grid layout for managing widgets in Graphics View. The most common way to use QGraphicsGridLayout is to construct an object on the heap with no parent, add widgets and layouts by calling addItem()
, and finally assign the layout to a widget by calling QGraphicsWidget::setLayout()
. QGraphicsGridLayout automatically computes the dimensions of the grid as you add items.
QGraphicsScene scene = new QGraphicsScene(); QGraphicsWidget textEdit = scene.addWidget(new QTextEdit()); QGraphicsWidget pushButton = scene.addWidget(new QPushButton()); QGraphicsLinearLayout layout = new QGraphicsLinearLayout(); layout.addItem(textEdit); layout.addItem(pushButton); QGraphicsWidget form = new QGraphicsWidget(); form.setLayout(layout); scene.addItem(form);
QGraphicsLinearLayout
, and QGraphicsWidget
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter |
---|
QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9 |
Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal |
Field Summary |
---|
Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
currentSender |
Constructor Summary | |
---|---|
QGraphicsGridLayout()
Constructs a QGraphicsGridLayout instance. |
|
QGraphicsGridLayout(QGraphicsLayoutItemInterface parent)
Constructs a QGraphicsGridLayout instance. |
Method Summary | |
---|---|
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column)
Adds item to the grid on row and column. |
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column,
int rowSpan,
int columnSpan)
Adds item to the grid on row and column. |
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column,
int rowSpan,
int columnSpan,
Qt.Alignment alignment)
Adds item to the grid on row and column. |
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column,
int rowSpan,
int columnSpan,
Qt.AlignmentFlag[] alignment)
|
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column,
Qt.Alignment alignment)
Adds item to the grid on row and column. |
void |
addItem(QGraphicsLayoutItemInterface item,
int row,
int column,
Qt.AlignmentFlag[] alignment)
|
Qt.Alignment |
alignment(QGraphicsLayoutItemInterface item)
Returns the alignment for item. |
Qt.Alignment |
columnAlignment(int column)
Returns the alignment for column. |
int |
columnCount()
Returns the number of columns in the grid layout. |
double |
columnMaximumWidth(int column)
Returns the maximum width for column. |
double |
columnMinimumWidth(int column)
Returns the minimum width for column. |
double |
columnPreferredWidth(int column)
Returns the preferred width for column. |
double |
columnSpacing(int column)
Returns the column spacing for column. |
int |
columnStretchFactor(int column)
Returns the stretch factor for column. |
double |
horizontalSpacing()
Returns the default horizontal spacing for the grid layout. |
QGraphicsLayoutItemInterface |
itemAt(int row,
int column)
Returns a pointer to the layout item at (row, column). |
Qt.Alignment |
rowAlignment(int row)
Returns the alignment of row. |
int |
rowCount()
Returns the number of rows in the grid layout. |
double |
rowMaximumHeight(int row)
Returns the maximum height for row, row. |
double |
rowMinimumHeight(int row)
Returns the minimum height for row, row. |
double |
rowPreferredHeight(int row)
Returns the preferred height for row, row. |
double |
rowSpacing(int row)
Returns the row spacing for row. |
int |
rowStretchFactor(int row)
Returns the stretch factor for row. |
void |
setAlignment(QGraphicsLayoutItemInterface item,
Qt.Alignment alignment)
Sets the alignment for item to alignment. |
void |
setAlignment(QGraphicsLayoutItemInterface item,
Qt.AlignmentFlag[] alignment)
|
void |
setColumnAlignment(int column,
Qt.Alignment alignment)
Sets the alignment for column to alignment. |
void |
setColumnAlignment(int column,
Qt.AlignmentFlag[] alignment)
|
void |
setColumnFixedWidth(int column,
double width)
Sets the fixed width of column to width. |
void |
setColumnMaximumWidth(int column,
double width)
Sets the maximum width of column to width. |
void |
setColumnMinimumWidth(int column,
double width)
Sets the minimum width for column to width. |
void |
setColumnPreferredWidth(int column,
double width)
Sets the preferred width for column to width. |
void |
setColumnSpacing(int column,
double spacing)
Sets the spacing for column to spacing. |
void |
setColumnStretchFactor(int column,
int stretch)
Sets the stretch factor for column to stretch. |
void |
setHorizontalSpacing(double spacing)
Sets the default horizontal spacing for the grid layout to spacing. |
void |
setRowAlignment(int row,
Qt.Alignment alignment)
Sets the alignment of row to alignment. |
void |
setRowAlignment(int row,
Qt.AlignmentFlag[] alignment)
|
void |
setRowFixedHeight(int row,
double height)
Sets the fixed height for row, row, to height. |
void |
setRowMaximumHeight(int row,
double height)
Sets the maximum height for row, row, to height. |
void |
setRowMinimumHeight(int row,
double height)
Sets the minimum height for row, row, to height. |
void |
setRowPreferredHeight(int row,
double height)
Sets the preferred height for row, row, to height. |
void |
setRowSpacing(int row,
double spacing)
Sets the spacing for row to spacing. |
void |
setRowStretchFactor(int row,
int stretch)
Sets the stretch factor for row to stretch. |
void |
setSpacing(double spacing)
Sets the grid layout's default spacing, both vertical and horizontal, to spacing. |
void |
setVerticalSpacing(double spacing)
Sets the default vertical spacing for the grid layout to spacing. |
double |
verticalSpacing()
Returns the default vertical spacing for the grid layout. |
Methods inherited from class com.trolltech.qt.QtJambiObject |
---|
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr |
Methods inherited from class com.trolltech.qt.QSignalEmitter |
---|
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread |
Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal |
---|
__qt_signalInitialization |
Methods inherited from class java.lang.Object |
---|
clone, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.trolltech.qt.QtJambiInterface |
---|
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership |
Constructor Detail |
---|
public QGraphicsGridLayout()
QGraphicsLayout
's constructor.
public QGraphicsGridLayout(QGraphicsLayoutItemInterface parent)
QGraphicsLayout
's constructor.
Method Detail |
---|
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column, Qt.AlignmentFlag[] alignment)
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column)
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column, Qt.Alignment alignment)
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column, int rowSpan, int columnSpan, Qt.AlignmentFlag[] alignment)
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column, int rowSpan, int columnSpan)
public final void addItem(QGraphicsLayoutItemInterface item, int row, int column, int rowSpan, int columnSpan, Qt.Alignment alignment)
public final Qt.Alignment alignment(QGraphicsLayoutItemInterface item)
setAlignment()
.
public final Qt.Alignment columnAlignment(int column)
setColumnAlignment()
.
public final int columnCount()
public final double columnMaximumWidth(int column)
setColumnMaximumWidth()
.
public final double columnMinimumWidth(int column)
setColumnMinimumWidth()
.
public final double columnPreferredWidth(int column)
setColumnPreferredWidth()
.
public final double columnSpacing(int column)
setColumnSpacing()
.
public final int columnStretchFactor(int column)
setColumnStretchFactor()
.
public final double horizontalSpacing()
setHorizontalSpacing()
.
public final QGraphicsLayoutItemInterface itemAt(int row, int column)
public final Qt.Alignment rowAlignment(int row)
setRowAlignment()
.
public final int rowCount()
public final double rowMaximumHeight(int row)
setRowMaximumHeight()
.
public final double rowMinimumHeight(int row)
setRowMinimumHeight()
.
public final double rowPreferredHeight(int row)
setRowPreferredHeight()
.
public final double rowSpacing(int row)
setRowSpacing()
.
public final int rowStretchFactor(int row)
setRowStretchFactor()
.
public final void setAlignment(QGraphicsLayoutItemInterface item, Qt.AlignmentFlag[] alignment)
public final void setAlignment(QGraphicsLayoutItemInterface item, Qt.Alignment alignment)
alignment()
.
public final void setColumnAlignment(int column, Qt.AlignmentFlag[] alignment)
public final void setColumnAlignment(int column, Qt.Alignment alignment)
columnAlignment()
.
public final void setColumnFixedWidth(int column, double width)
public final void setColumnMaximumWidth(int column, double width)
columnMaximumWidth()
.
public final void setColumnMinimumWidth(int column, double width)
columnMinimumWidth()
.
public final void setColumnPreferredWidth(int column, double width)
columnPreferredWidth()
.
public final void setColumnSpacing(int column, double spacing)
columnSpacing()
.
public final void setColumnStretchFactor(int column, int stretch)
columnStretchFactor()
.
public final void setHorizontalSpacing(double spacing)
horizontalSpacing()
.
public final void setRowAlignment(int row, Qt.AlignmentFlag[] alignment)
public final void setRowAlignment(int row, Qt.Alignment alignment)
rowAlignment()
.
public final void setRowFixedHeight(int row, double height)
public final void setRowMaximumHeight(int row, double height)
rowMaximumHeight()
.
public final void setRowMinimumHeight(int row, double height)
rowMinimumHeight()
.
public final void setRowPreferredHeight(int row, double height)
rowPreferredHeight()
.
public final void setRowSpacing(int row, double spacing)
rowSpacing()
.
public final void setRowStretchFactor(int row, int stretch)
rowStretchFactor()
.
public final void setSpacing(double spacing)
rowSpacing()
, and columnSpacing()
.
public final void setVerticalSpacing(double spacing)
verticalSpacing()
.
public final double verticalSpacing()
setVerticalSpacing()
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |