# eric6.E5Gui.E5OverrideCursor

Module implementing a context manager class for an override cursor and a QProcess class controlling an override cursor.

### Global Attributes

None

### Classes

E5OverrideCursor | Class implementing a context manager class for an override cursor.
E5OverrideCursorProcess | Class implementing a QProcess subclass controlling an override cursor.
E5OverridenCursor | Class implementing a context manager class for an overriden cursor.

### Functions

None

## E5OverrideCursor

Class implementing a context manager class for an override cursor.

### Derived from

contextlib.AbstractContextManager

### Class Attributes

None

### Class Methods

None

### Methods

E5OverrideCursor | Constructor
__enter__ | Special method called when entering the runtime ccontext.
__exit__ | Special method called when exiting the runtime ccontext.

### Static Methods

None

#### E5OverrideCursor (Constructor)

E5OverrideCursor(cursorShape=Qt.WaitCursor)

Constructor

cursorShape (Qt.CursorShape)
  shape of the override cursor

#### E5OverrideCursor.__enter__

__enter__()

Special method called when entering the runtime ccontext.

Returns:
  reference to the context manager object

Return Type:
  E5OverrideCursor

#### E5OverrideCursor.__exit__

__exit__(exc_type, exc_value, traceback)

Special method called when exiting the runtime ccontext.

exc_type
  type of an exception raised in the runtime context
exc_value
  value of an exception raised in the runtime context
traceback
  traceback of an exception raised in the runtime context

Returns:
  always returns None to not suppress any exception

Return Type:
  None

Up

## E5OverrideCursorProcess

Class implementing a QProcess subclass controlling an override cursor.

### Derived from

QProcess

### Class Attributes

None

### Class Methods

None

### Methods

E5OverrideCursorProcess | Constructor
__processFinished | Private slot resetting the cursor when the process finished.
__processStarted | Private slot setting the cursor after the process has started.

### Static Methods

None

#### E5OverrideCursorProcess (Constructor)

E5OverrideCursorProcess(parent=None, cursorShape=Qt.WaitCursor)

Constructor

parent (QObject)
  reference to the parent object
cursorShape (Qt.CursorShape)
  shape of the override cursor

#### E5OverrideCursorProcess.__processFinished

__processFinished()

Private slot resetting the cursor when the process finished.

#### E5OverrideCursorProcess.__processStarted

__processStarted()

Private slot setting the cursor after the process has started.

Up

## E5OverridenCursor

Class implementing a context manager class for an overriden cursor.

The cursor is reset upon entering the runtime context and restored upon exiting it.

### Derived from

contextlib.AbstractContextManager

### Class Attributes

None

### Class Methods

None

### Methods

E5OverridenCursor | Constructor
__enter__ | Special method called when entering the runtime ccontext.
__exit__ | Special method called when exiting the runtime ccontext.

### Static Methods

None

#### E5OverridenCursor (Constructor)

E5OverridenCursor()

Constructor

#### E5OverridenCursor.__enter__

__enter__()

Special method called when entering the runtime ccontext.

Returns:
  reference to the context manager object

Return Type:
  E5OverrideCursor

#### E5OverridenCursor.__exit__

__exit__(exc_type, exc_value, traceback)

Special method called when exiting the runtime ccontext.

exc_type
  type of an exception raised in the runtime context
exc_value
  value of an exception raised in the runtime context
traceback
  traceback of an exception raised in the runtime context

Returns:
  always returns None to not suppress any exception

Return Type:
  None

Up