Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QGraphicsGridLayout

    java.lang.Object
      com.trolltech.qt.QSignalEmitter
          com.trolltech.qt.QtJambiObject
              com.trolltech.qt.gui.QGraphicsLayout
                  com.trolltech.qt.gui.QGraphicsGridLayout

All Implemented Interfaces:
  QGraphicsLayoutItemInterface, QtJambiInterface

    public class QGraphicsGridLayout

extends QGraphicsLayout

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);

See also:
  `QGraphicsLinearLayout`, and `QGraphicsWidget`.

Nested Class Summary

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

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)` Adds `item` to the grid on `row` and `column`.
`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)` Adds `item` to the grid on `row` and `column`.
`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`.
`static QGraphicsGridLayout` | `fromNativePointer(QNativePointer nativePointer)` This method returns the QGraphicsGridLayout instance pointed to by `nativePointer`.
`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)` Sets the alignment for `item` to `alignment`.
`void` | `setColumnAlignment(int column, Qt.Alignment alignment)` Sets the alignment for `column` to `alignment`.
`void` | `setColumnAlignment(int column, Qt.AlignmentFlag[] alignment)` Sets the alignment for `column` to `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)` Sets the alignment of `row` to `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.gui.QGraphicsLayout
`activate, contentsRect, count, effectiveSizeHint, geometry, getContentsMargins, invalidate, isActivated, isLayout, itemAt, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, parentLayoutItem, preferredHeight, preferredSize, preferredWidth, removeAt, setContentsMargins, setGeometry, setMaximumHeight, setMaximumSize, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumSize, setMinimumWidth, setParentLayoutItem, setPreferredHeight, setPreferredSize, setPreferredSize, setPreferredWidth, setSizePolicy, setSizePolicy, sizeHint, sizePolicy, updateGeometry, widgetEvent`

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 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

### QGraphicsGridLayout

    public QGraphicsGridLayout()

  Constructs a `QGraphicsGridLayout` instance. `parent` is passed to `QGraphicsLayout`'s constructor.

### QGraphicsGridLayout

    public QGraphicsGridLayout(QGraphicsLayoutItemInterface parent)

  Constructs a `QGraphicsGridLayout` instance. `parent` is passed to `QGraphicsLayout`'s constructor.

Method Detail

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column,
                              Qt.AlignmentFlag[] alignment)

  Adds `item` to the grid on `row` and `column`. You can specify an optional `alignment` for `item`.

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column)

  Adds `item` to the grid on `row` and `column`. You can specify an optional `alignment` for `item`.

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column,
                              Qt.Alignment alignment)

  Adds `item` to the grid on `row` and `column`. You can specify an optional `alignment` for `item`.

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column,
                              int rowSpan,
                              int columnSpan,
                              Qt.AlignmentFlag[] alignment)

  Adds `item` to the grid on `row` and `column`. You can specify a `rowSpan` and `columnSpan` and an optional `alignment`.

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column,
                              int rowSpan,
                              int columnSpan)

  Adds `item` to the grid on `row` and `column`. You can specify a `rowSpan` and `columnSpan` and an optional `alignment`.

### addItem

    public final void addItem(QGraphicsLayoutItemInterface item,
                              int row,
                              int column,
                              int rowSpan,
                              int columnSpan,
                              Qt.Alignment alignment)

  Adds `item` to the grid on `row` and `column`. You can specify a `rowSpan` and `columnSpan` and an optional `alignment`.

### alignment

    public final Qt.Alignment alignment(QGraphicsLayoutItemInterface item)

  Returns the alignment for `item`.

See also:
  `setAlignment()`.

### columnAlignment

    public final Qt.Alignment columnAlignment(int column)

  Returns the alignment for `column`.

See also:
  `setColumnAlignment()`.

### columnCount

    public final int columnCount()

  Returns the number of columns in the grid layout. This is always one more than the index of the last column that is occupied by a layout item (empty columns are counted except for those at the end).

### columnMaximumWidth

    public final double columnMaximumWidth(int column)

  Returns the maximum width for `column`.

See also:
  `setColumnMaximumWidth()`.

### columnMinimumWidth

    public final double columnMinimumWidth(int column)

  Returns the minimum width for `column`.

See also:
  `setColumnMinimumWidth()`.

### columnPreferredWidth

    public final double columnPreferredWidth(int column)

  Returns the preferred width for `column`.

See also:
  `setColumnPreferredWidth()`.

### columnSpacing

    public final double columnSpacing(int column)

  Returns the column spacing for `column`.

See also:
  `setColumnSpacing()`.

### columnStretchFactor

    public final int columnStretchFactor(int column)

  Returns the stretch factor for `column`.

See also:
  `setColumnStretchFactor()`.

### horizontalSpacing

    public final double horizontalSpacing()

  Returns the default horizontal spacing for the grid layout.

See also:
  `setHorizontalSpacing()`.

### itemAt

    public final QGraphicsLayoutItemInterface itemAt(int row,
                                                     int column)

  Returns a pointer to the layout item at (`row`, `column`).

### rowAlignment

    public final Qt.Alignment rowAlignment(int row)

  Returns the alignment of `row`.

See also:
  `setRowAlignment()`.

### rowCount

    public final int rowCount()

  Returns the number of rows in the grid layout. This is always one more than the index of the last row that is occupied by a layout item (empty rows are counted except for those at the end).

### rowMaximumHeight

    public final double rowMaximumHeight(int row)

  Returns the maximum height for row, `row`.

See also:
  `setRowMaximumHeight()`.

### rowMinimumHeight

    public final double rowMinimumHeight(int row)

  Returns the minimum height for row, `row`.

See also:
  `setRowMinimumHeight()`.

### rowPreferredHeight

    public final double rowPreferredHeight(int row)

  Returns the preferred height for row, `row`.

See also:
  `setRowPreferredHeight()`.

### rowSpacing

    public final double rowSpacing(int row)

  Returns the row spacing for `row`.

See also:
  `setRowSpacing()`.

### rowStretchFactor

    public final int rowStretchFactor(int row)

  Returns the stretch factor for `row`.

See also:
  `setRowStretchFactor()`.

### setAlignment

    public final void setAlignment(QGraphicsLayoutItemInterface item,
                                   Qt.AlignmentFlag[] alignment)

  Sets the alignment for `item` to `alignment`.

See also:
  `alignment()`.

### setAlignment

    public final void setAlignment(QGraphicsLayoutItemInterface item,
                                   Qt.Alignment alignment)

  Sets the alignment for `item` to `alignment`.

See also:
  `alignment()`.

### setColumnAlignment

    public final void setColumnAlignment(int column,
                                         Qt.AlignmentFlag[] alignment)

  Sets the alignment for `column` to `alignment`.

See also:
  `columnAlignment()`.

### setColumnAlignment

    public final void setColumnAlignment(int column,
                                         Qt.Alignment alignment)

  Sets the alignment for `column` to `alignment`.

See also:
  `columnAlignment()`.

### setColumnFixedWidth

    public final void setColumnFixedWidth(int column,
                                          double width)

  Sets the fixed width of `column` to `width`.

### setColumnMaximumWidth

    public final void setColumnMaximumWidth(int column,
                                            double width)

  Sets the maximum width of `column` to `width`.

See also:
  `columnMaximumWidth()`.

### setColumnMinimumWidth

    public final void setColumnMinimumWidth(int column,
                                            double width)

  Sets the minimum width for `column` to `width`.

See also:
  `columnMinimumWidth()`.

### setColumnPreferredWidth

    public final void setColumnPreferredWidth(int column,
                                              double width)

  Sets the preferred width for `column` to `width`.

See also:
  `columnPreferredWidth()`.

### setColumnSpacing

    public final void setColumnSpacing(int column,
                                       double spacing)

  Sets the spacing for `column` to `spacing`.

See also:
  `columnSpacing()`.

### setColumnStretchFactor

    public final void setColumnStretchFactor(int column,
                                             int stretch)

  Sets the stretch factor for `column` to `stretch`.

See also:
  `columnStretchFactor()`.

### setHorizontalSpacing

    public final void setHorizontalSpacing(double spacing)

  Sets the default horizontal spacing for the grid layout to `spacing`.

See also:
  `horizontalSpacing()`.

### setRowAlignment

    public final void setRowAlignment(int row,
                                      Qt.AlignmentFlag[] alignment)

  Sets the alignment of `row` to `alignment`.

See also:
  `rowAlignment()`.

### setRowAlignment

    public final void setRowAlignment(int row,
                                      Qt.Alignment alignment)

  Sets the alignment of `row` to `alignment`.

See also:
  `rowAlignment()`.

### setRowFixedHeight

    public final void setRowFixedHeight(int row,
                                        double height)

  Sets the fixed height for row, `row`, to `height`.

### setRowMaximumHeight

    public final void setRowMaximumHeight(int row,
                                          double height)

  Sets the maximum height for row, `row`, to `height`.

See also:
  `rowMaximumHeight()`.

### setRowMinimumHeight

    public final void setRowMinimumHeight(int row,
                                          double height)

  Sets the minimum height for row, `row`, to `height`.

See also:
  `rowMinimumHeight()`.

### setRowPreferredHeight

    public final void setRowPreferredHeight(int row,
                                            double height)

  Sets the preferred height for row, `row`, to `height`.

See also:
  `rowPreferredHeight()`.

### setRowSpacing

    public final void setRowSpacing(int row,
                                    double spacing)

  Sets the spacing for `row` to `spacing`.

See also:
  `rowSpacing()`.

### setRowStretchFactor

    public final void setRowStretchFactor(int row,
                                          int stretch)

  Sets the stretch factor for `row` to `stretch`.

See also:
  `rowStretchFactor()`.

### setSpacing

    public final void setSpacing(double spacing)

  Sets the grid layout's default spacing, both vertical and horizontal, to `spacing`.

See also:
  `rowSpacing()`, and `columnSpacing()`.

### setVerticalSpacing

    public final void setVerticalSpacing(double spacing)

  Sets the default vertical spacing for the grid layout to `spacing`.

See also:
  `verticalSpacing()`.

### verticalSpacing

    public final double verticalSpacing()

  Returns the default vertical spacing for the grid layout.

See also:
  `setVerticalSpacing()`.

### fromNativePointer

    public static QGraphicsGridLayout fromNativePointer(QNativePointer nativePointer)

  This method returns the QGraphicsGridLayout instance pointed to by `nativePointer`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD