Extending Qt Creator Manual | SnippetProvider

Extending Qt Creator Manual 4.4.0

# SnippetProvider Class

(TextEditor::SnippetProvider)

The SnippetProvider class acts as an interface for providing groups of snippets. More...

Header: | #include <SnippetProvider>

- List of all members, including inherited members

## Public Functions

void | decorateEditor(TextEditorWidget *editor) const
QString | displayName() const
EditorDecorator | editorDecorator() const
QString | groupId() const

## Static Public Members

void | registerGroup(const QString &groupId, const QString &displayName, EditorDecorator editorDecorator = EditorDecorator())

## Detailed Description

The SnippetProvider class acts as an interface for providing groups of snippets.

## Member Function Documentation

### void SnippetProvider::decorateEditor(TextEditorWidget *editor) const

Applies customizations such as highlighting or indentation to the snippet editor.

### QString SnippetProvider::displayName() const

Returns the name to be displayed in the user interface for snippets that belong to the group associated with this provider.

### EditorDecorator SnippetProvider::editorDecorator() const

EditorDecorator is a hook which allows you to apply customizations such as highlighting or indentation to the snippet editor.

### QString SnippetProvider::groupId() const

Returns the unique group id to which this provider is associated.

### `[static]` void SnippetProvider::registerGroup(const QString &groupId, const QString &displayName, EditorDecorator editorDecorator = EditorDecorator())

Registers a snippet group with groupId, displayName and editorDecorator.