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

# QDesignerFormWindowCursorInterface Class Reference
[QtDesigner module]

The QDesignerFormWindowCursorInterface class provides an interface to the form window's text cursor. More...

    #include <QDesignerFormWindowCursorInterface>

- List of all members, including inherited members

### Public Types

- enum MoveMode { MoveAnchor, KeepAnchor }
- enum MoveOperation { NoMove, Start, End, Next, ..., Down }

### Public Functions

- virtual ~QDesignerFormWindowCursorInterface ()
- virtual QWidget * current () const = 0
- virtual QDesignerFormWindowInterface * formWindow () const = 0
- virtual bool hasSelection () const = 0
- bool isWidgetSelected ( QWidget * widget ) const
- virtual bool movePosition ( MoveOperation operation, MoveMode mode = MoveAnchor ) = 0
- virtual int position () const = 0
- virtual void resetWidgetProperty ( QWidget * widget, const QString & name ) = 0
- virtual QWidget * selectedWidget ( int index ) const = 0
- virtual int selectedWidgetCount () const = 0
- virtual void setPosition ( int position, MoveMode mode = MoveAnchor ) = 0
- virtual void setProperty ( const QString & name, const QVariant & value ) = 0
- virtual void setWidgetProperty ( QWidget * widget, const QString & name, const QVariant & value ) = 0
- virtual QWidget * widget ( int index ) const = 0
- virtual int widgetCount () const = 0

## Detailed Description

The QDesignerFormWindowCursorInterface class provides an interface to the form window's text cursor.

## Member Type Documentation

### enum QDesignerFormWindowCursorInterface::MoveMode

This enum describes the different modes that are used when the text cursor moves.

Constant | Value | Description
--- | --- | ---
`QDesignerFormWindowCursorInterface::MoveAnchor` | `0` | The anchor moves with the cursor to its new location.
`QDesignerFormWindowCursorInterface::KeepAnchor` | `1` | The anchor remains at the cursor's old location.

### enum QDesignerFormWindowCursorInterface::MoveOperation

This enum describes the types of text cursor operation that can occur in a form window.

Constant | Value | Description
--- | --- | ---
`QDesignerFormWindowCursorInterface::NoMove` | `0` | The cursor does not move.
`QDesignerFormWindowCursorInterface::Start` | `1` | Moves the cursor to the start of the focus chain.
`QDesignerFormWindowCursorInterface::End` | `2` | Moves the cursor to the end of the focus chain.
`QDesignerFormWindowCursorInterface::Next` | `3` | Moves the cursor to the next widget in the focus chain.
`QDesignerFormWindowCursorInterface::Prev` | `4` | Moves the cursor to the previous widget in the focus chain.
`QDesignerFormWindowCursorInterface::Left` | `5` | The cursor moves to the left.
`QDesignerFormWindowCursorInterface::Right` | `6` | The cursor moves to the right.
`QDesignerFormWindowCursorInterface::Up` | `7` | The cursor moves upwards.
`QDesignerFormWindowCursorInterface::Down` | `8` | The cursor moves downwards.

## Member Function Documentation

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

Destroys the cursor interface.

### QWidget * QDesignerFormWindowCursorInterface::current () const `[pure virtual]`

Returns the current widget in the form.

See also selectedWidget().

### QDesignerFormWindowInterface * QDesignerFormWindowCursorInterface::formWindow () const `[pure virtual]`

Returns the interface to the form window associated with this interface.

### bool QDesignerFormWindowCursorInterface::hasSelection () const `[pure virtual]`

Returns true if the form window contains a selection; otherwise returns false.

### bool QDesignerFormWindowCursorInterface::isWidgetSelected ( QWidget * widget ) const

Returns true if the specified widget is selected; otherwise returns false.

### bool QDesignerFormWindowCursorInterface::movePosition ( MoveOperation operation, MoveMode mode = MoveAnchor ) `[pure virtual]`

Performs the given operation on the cursor using the specified mode, and returns true if it completed successfully; otherwise returns false.

### int QDesignerFormWindowCursorInterface::position () const `[pure virtual]`

Returns the cursor position.

See also setPosition().

### void QDesignerFormWindowCursorInterface::resetWidgetProperty ( QWidget * widget, const QString & name ) `[pure virtual]`

Resets the property with the given name in the specified widget to its default value.

See also setProperty().

### QWidget * QDesignerFormWindowCursorInterface::selectedWidget ( int index ) const `[pure virtual]`

Returns the widget with the given index in the list of selected widgets.

See also widget().

### int QDesignerFormWindowCursorInterface::selectedWidgetCount () const `[pure virtual]`

Returns the number of selected widgets in the form window.

### void QDesignerFormWindowCursorInterface::setPosition ( int position, MoveMode mode = MoveAnchor ) `[pure virtual]`

Sets the position of the cursor to the given position using the mode to specify how it is moved there.

See also position().

### void QDesignerFormWindowCursorInterface::setProperty ( const QString & name, const QVariant & value ) `[pure virtual]`

Sets the property with the given name in the current widget to the specified value.

See also setWidgetProperty() and resetWidgetProperty().

### void QDesignerFormWindowCursorInterface::setWidgetProperty ( QWidget * widget, const QString & name, const QVariant & value ) `[pure virtual]`

Sets the property with the given name in the widget to the specified value.

See also resetWidgetProperty() and setProperty().

### QWidget * QDesignerFormWindowCursorInterface::widget ( int index ) const `[pure virtual]`

Returns the widget with the given index in the list of widgets on the form.

See also selectedWidget().

### int QDesignerFormWindowCursorInterface::widgetCount () const `[pure virtual]`

Returns the number of widgets in the form window.