|  | Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions |

# QDesignerLayoutDecorationExtension Class Reference

The QDesignerLayoutDecorationExtension class provides extensions for layouts in Qt Designer. More...

    #include <QDesignerLayoutDecorationExtension>

Part of the QtDesigner module.

- List of all members, including inherited members

### Public Types

- enum InsertMode { InsertWidgetMode, InsertRowMode, InsertColumnMode }

### Public Functions

- virtual ~QDesignerLayoutDecorationExtension ()
- virtual void adjustIndicator ( const QPoint & position, int index ) = 0
- virtual QPair<int, int> currentCell () const = 0
- virtual int currentIndex () const = 0
- virtual InsertMode currentInsertMode () const = 0
- virtual int findItemAt ( const QPoint & position ) const = 0
- virtual int findItemAt ( int row, int column ) const = 0
- virtual int indexOf ( QWidget * widget ) const = 0
- virtual int indexOf ( QLayoutItem * item ) const = 0
- virtual void insertColumn ( int column ) = 0
- virtual void insertRow ( int row ) = 0
- virtual void insertWidget ( QWidget * widget, const QPair<int, int> & cell ) = 0
- virtual QRect itemInfo ( int index ) const = 0
- virtual void removeWidget ( QWidget * widget ) = 0
- virtual void simplify () = 0
- virtual QList<QWidget *> widgets ( QLayout * layout ) const = 0

## Detailed Description

The QDesignerLayoutDecorationExtension class provides extensions for layouts in Qt Designer.

## Member Type Documentation

### enum QDesignerLayoutDecorationExtension::InsertMode

This enum describes the modes that are used to insert items into a layout.

Constant | Value | Description
--- | --- | ---
`QDesignerLayoutDecorationExtension::InsertWidgetMode` | `0` | Widgets are inserted into empty cells in a layout.
`QDesignerLayoutDecorationExtension::InsertRowMode` | `1` | Whole rows are inserted into a vertical or grid layout.
`QDesignerLayoutDecorationExtension::InsertColumnMode` | `2` | Whole columns are inserted into a horizontal or grid layout.

## Member Function Documentation

### QDesignerLayoutDecorationExtension::~QDesignerLayoutDecorationExtension () `[virtual]`

Destroys the extension.

### void QDesignerLayoutDecorationExtension::adjustIndicator ( const QPoint & position, int index ) `[pure virtual]`

Adjusts the indicator for the specified widget so that it lies at the given position on the form.

### QPair<int, int> QDesignerLayoutDecorationExtension::currentCell () const `[pure virtual]`

Returns a pair containing the row and column of the current cell in the layout.

### int QDesignerLayoutDecorationExtension::currentIndex () const `[pure virtual]`

Returns the current index in the layout.

### InsertMode QDesignerLayoutDecorationExtension::currentInsertMode () const `[pure virtual]`

Returns the current insertion mode.

### int QDesignerLayoutDecorationExtension::findItemAt ( const QPoint & position ) const `[pure virtual]`

Returns the index of the item in the layout that covers the given position.

### int QDesignerLayoutDecorationExtension::findItemAt ( int row, int column ) const `[pure virtual]`

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Returns the item in the layout that occupies the specified row and column in the layout.

Currently, this only applies to grid layouts.

### int QDesignerLayoutDecorationExtension::indexOf ( QWidget * widget ) const `[pure virtual]`

Returns the index of the specified widget in the layout.

### int QDesignerLayoutDecorationExtension::indexOf ( QLayoutItem * item ) const `[pure virtual]`

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Returns the index of the specified layout item.

### void QDesignerLayoutDecorationExtension::insertColumn ( int column ) `[pure virtual]`

Inserts a new column into the form at the position specified by column.

### void QDesignerLayoutDecorationExtension::insertRow ( int row ) `[pure virtual]`

Inserts a new row into the form at the position specified by row.

### void QDesignerLayoutDecorationExtension::insertWidget ( QWidget * widget, const QPair<int, int> & cell ) `[pure virtual]`

Inserts the given widget into the specified cell in the layout.

See also removeWidget().

### QRect QDesignerLayoutDecorationExtension::itemInfo ( int index ) const `[pure virtual]`

Returns the rectangle covered by the item at the given index in the layout.

### void QDesignerLayoutDecorationExtension::removeWidget ( QWidget * widget ) `[pure virtual]`

Removes the specified widget from the layout.

See also insertWidget().

### void QDesignerLayoutDecorationExtension::simplify () `[pure virtual]`

Simplifies the layout by removing unnecessary empty rows and columns, and by changing the number of rows or columns spanned by widgets.

### QList<QWidget *> QDesignerLayoutDecorationExtension::widgets ( QLayout * layout ) const `[pure virtual]`

Returns the widgets that are managed by the given layout.

See also insertWidget() and removeWidget().