4.20. umbra.components.factory.scriptEditor.searchAndReplace — Umbra 1.0.9 documentation

# 4.20. umbra.components.factory.scriptEditor.searchAndReplace

searchAndReplace.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  Defines the `SearchAndReplace` class.

Others:

## 4.20.1. Module Attributes

`umbra.components.factory.scriptEditor.searchAndReplace.` `LOGGER`

`umbra.components.factory.scriptEditor.searchAndReplace.` `UI_FILE`

## 4.20.2. Classes

class `umbra.components.factory.scriptEditor.searchAndReplace.` `ValidationFilter`

  Bases: `PyQt4.QtCore.QObject`

  Defines a QObject subclass used as an event filter for the `SearchAndReplace` class.

  `eventFilter`(object, event)

    Reimplements the QObject.eventFilter method.

    Parameters: | object (QObject) – Object. event (QEvent) – Event.
    Returns: | Event filtered.
    Return type: | bool

class `umbra.components.factory.scriptEditor.searchAndReplace.` `SearchAndReplace`(parent, *args, **kwargs)

  Bases: `foundations.ui.common.QWidget`

  Defines the default search and replace dialog used by the ScriptEditor Component.

  Initializes the class.

  Parameters: | parent (QObject) – Object parent. *args (*) – Arguments. **kwargs (**) – Keywords arguments.

  `container`

    Property for self.__container attribute.

    Returns: | self.__container.
    Return type: | QObject

  `searchPatternsModel`

    Property for self.__searchPatternsModel attribute.

    Returns: | self.__searchPatternsModel.
    Return type: | PatternsModel

  `replaceWithPatternsModel`

    Property for self.__replaceWithPatternsModel attribute.

    Returns: | self.__replaceWithPatternsModel.
    Return type: | PatternsModel

  `maximumStoredPatterns`

    Property for self.__maximumStoredPatterns attribute.

    Returns: | self.__maximumStoredPatterns.
    Return type: | int

  `show`()

    Reimplements the `QWidget.show()` method.

  `insertPattern`(pattern, model, index=0)

    Inserts given pattern into given Model.

    Parameters: | pattern (unicode) – Pattern. model (PatternsModel) – Model. index (int) – Insertion indes.
    Returns: | Method success.
    Return type: | bool

  `search`()

    Searchs current editor Widget for search pattern.

    Returns: | Method success.
    Return type: | bool

  `replace`()

    Replaces current editor Widget current search pattern occurence with replacement pattern.

    Returns: | Method success.
    Return type: | bool

  `replaceAll`()

    Replaces current editor Widget search pattern occurrences with replacement pattern.

    Returns: | Method success.
    Return type: | bool