Extending Qt Creator Manual | AssistProposalItem

Extending Qt Creator Manual 4.5.0

# AssistProposalItem Class

(TextEditor::AssistProposalItem)

The AssistProposalItem class acts as an interface for representing an assist proposal item. More...

Header: | #include <AssistProposalItem>
Inherits: | TextEditor::AssistProposalItemInterface

- List of all members, including inherited members

## Public Functions

virtual void | applyContextualContent(TextDocumentManipulatorInterface &manipulator, int basePosition) const
virtual void | applyQuickFix(TextDocumentManipulatorInterface &manipulator, int basePosition) const
virtual void | applySnippet(TextDocumentManipulatorInterface &manipulator, int basePosition) const
const QVariant & | data() const
void | setData(const QVariant &var)
void | setDetail(const QString &detail)
void | setIcon(const QIcon &icon)
void | setText(const QString &text)

## Reimplemented Public Functions

virtual void | apply(TextDocumentManipulatorInterface &manipulator, int basePosition) const override
virtual QString | detail() const final
virtual quint64 | hash() const override
virtual QIcon | icon() const final
virtual bool | implicitlyApplies() const override
virtual bool | isSnippet() const final
virtual bool | isValid() const final
virtual bool | prematurelyApplies(const QChar &c) const override

- 12 public functions inherited from TextEditor::AssistProposalItemInterface

## Detailed Description

The AssistProposalItem class acts as an interface for representing an assist proposal item.

This is class is part of the CodeAssist API.

## Member Function Documentation

### `[override virtual]` void AssistProposalItem::apply(TextDocumentManipulatorInterface &manipulator, int basePosition) const

### `[virtual]` void AssistProposalItem::applyContextualContent(TextDocumentManipulatorInterface &manipulator, int basePosition) const

### `[virtual]` void AssistProposalItem::applyQuickFix(TextDocumentManipulatorInterface &manipulator, int basePosition) const

### `[virtual]` void AssistProposalItem::applySnippet(TextDocumentManipulatorInterface &manipulator, int basePosition) const

### const QVariant &AssistProposalItem::data() const

See also setData().

### `[final virtual]` QString AssistProposalItem::detail() const

See also setDetail().

### `[override virtual]` quint64 AssistProposalItem::hash() const

### `[final virtual]` QIcon AssistProposalItem::icon() const

See also setIcon().

### `[override virtual]` bool AssistProposalItem::implicitlyApplies() const

Reimplemented from AssistProposalItemInterface::implicitlyApplies().

Returns whether this item should implicitly apply in the case it is the only proposal item available.

### `[final virtual]` bool AssistProposalItem::isSnippet() const

### `[final virtual]` bool AssistProposalItem::isValid() const

### `[override virtual]` bool AssistProposalItem::prematurelyApplies(const QChar &c) const

Reimplemented from AssistProposalItemInterface::prematurelyApplies().

Returns whether the character c causes this item to be applied.

### void AssistProposalItem::setData(const QVariant &var)

See also data().

### void AssistProposalItem::setDetail(const QString &detail)

See also detail().

### void AssistProposalItem::setIcon(const QIcon &icon)

See also icon().

### void AssistProposalItem::setText(const QString &text)