Extending Qt Creator Manual | VcsBaseEditorWidget

Extending Qt Creator Manual 4.3.0

# VcsBaseEditorWidget Class

(VcsBase::VcsBaseEditorWidget)

The VcsBaseEditorWidget class is the base class for editors showing version control system output of the type enumerated by EditorContentType. More...

Header: | #include <VcsBaseEditorWidget>
Inherits: | TextEditor::TextEditorWidget

- List of all members, including inherited members

## Public Types

typedef | DescribeFunc

## Properties

- annotateRevisionTextFormat : QString
- codec : QTextCodec *
- copyRevisionTextFormat : QString

- isFileLogAnnotateEnabled : bool
- source : QString
- workingDirectory : QString

- 2 properties inherited from TextEditor::TextEditorWidget

## Public Functions

QString | annotatePreviousRevisionTextFormat() const
QString | annotateRevisionTextFormat() const
QTextCodec * | codec() const
bool | configurationAdded() const
EditorContentType | contentType() const
QString | copyRevisionTextFormat() const
int | firstLineNumber() const
virtual void | init()
bool | isFileLogAnnotateEnabled() const
bool | isModified() const
void | setAnnotatePreviousRevisionTextFormat(const QString &)
void | setAnnotateRevisionTextFormat(const QString &)
void | setCodec(QTextCodec *)
void | setCommand(VcsCommand *command)
void | setConfigurationAdded()
void | setCopyRevisionTextFormat(const QString &)
void | setDescribeFunc(DescribeFunc describeFunc)
void | setFileLogAnnotateEnabled(bool e)
void | setFirstLineNumber(int firstLineNumber)
void | setForceReadOnly(bool b)
void | setParameters(const VcsBaseEditorParameters *parameters)
virtual void | setPlainText(const QString &text)
void | setSource(const QString &source)
void | setWorkingDirectory(const QString &wd)
QString | source() const
QString | workingDirectory() const

- 180 public functions inherited from TextEditor::TextEditorWidget

## Public Slots

void | reportCommandFinished(bool ok, int exitCode, const QVariant &data)

## Signals

void | annotateRevisionRequested(const QString &workingDirectory, const QString &file, const QString &change, int lineNumber)
void | describeRequested(const QString &source, const QString &change)
void | diffChunkApplied(const VcsBase::DiffChunk &dc)
void | diffChunkReverted(const VcsBase::DiffChunk &dc)

- 8 signals inherited from TextEditor::TextEditorWidget

## Protected Functions

| VcsBaseEditorWidget()
virtual void | addChangeActions(QMenu *menu, const QString &change)
virtual void | addDiffActions(QMenu *menu, const DiffChunk &chunk)
virtual QSet<QString> | annotationChanges() const = 0
virtual QStringList | annotationPreviousVersions(const QString &revision) const
virtual QString | changeUnderCursor(const QTextCursor &) const = 0
virtual BaseAnnotationHighlighter * | createAnnotationHighlighter(const QSet<QString> &changes) const = 0
virtual QString | decorateVersion(const QString &revision) const
virtual QString | fileNameForLine(int line) const
QString | fileNameFromDiffSpecification(const QTextBlock &inBlock, QString *header = 0) const
virtual QString | findDiffFile(const QString &f) const
virtual bool | isValidRevision(const QString &revision) const
virtual QString | revisionSubject(const QTextBlock &inBlock) const
void | setDiffFilePattern(const QRegExp &pattern)
void | setLogEntryPattern(const QRegExp &pattern)
virtual bool | supportChangeLinks() const

- 21 protected functions inherited from TextEditor::TextEditorWidget

### Additional Inherited Members

- 3 static public members inherited from TextEditor::TextEditorWidget
- 2 static protected members inherited from TextEditor::TextEditorWidget

## Detailed Description

The VcsBaseEditorWidget class is the base class for editors showing version control system output of the type enumerated by EditorContentType.

The source property should contain the file or directory the log refers to and will be emitted with describeRequested(). This is for VCS that need a current directory.

See also VcsBase::BaseVcsEditorFactory, VcsBase::VcsBaseEditorParameters, and VcsBase::EditorContentType.

## Member Type Documentation

### typedef VcsBaseEditorWidget::DescribeFunc

## Property Documentation

### annotateRevisionTextFormat : QString

Access functions:

QString | annotateRevisionTextFormat() const
void | setAnnotateRevisionTextFormat(const QString &)

### codec : QTextCodec *

Access functions:

QTextCodec * | codec() const
void | setCodec(QTextCodec *)

### copyRevisionTextFormat : QString

Access functions:

QString | copyRevisionTextFormat() const
void | setCopyRevisionTextFormat(const QString &)

### isFileLogAnnotateEnabled : bool

Access functions:

bool | isFileLogAnnotateEnabled() const
void | setFileLogAnnotateEnabled(bool e)

### source : QString

Access functions:

QString | source() const
void | setSource(const QString &source)

### workingDirectory : QString

Access functions:

QString | workingDirectory() const
void | setWorkingDirectory(const QString &wd)

## Member Function Documentation

### `[protected]` VcsBaseEditorWidget::VcsBaseEditorWidget()

Default constructs an instance of VcsBaseEditorWidget.

### `[virtual protected]` void VcsBaseEditorWidget::addChangeActions(QMenu *menu, const QString &change)

### `[virtual protected]` void VcsBaseEditorWidget::addDiffActions(QMenu *menu, const DiffChunk &chunk)

### QString VcsBaseEditorWidget::annotatePreviousRevisionTextFormat() const

See also setAnnotatePreviousRevisionTextFormat().

### `[signal]` void VcsBaseEditorWidget::annotateRevisionRequested(const QString &workingDirectory, const QString &file, const QString &change, int lineNumber)

### `[pure virtual protected]` QSet<QString> VcsBaseEditorWidget::annotationChanges() const

### `[virtual protected]` QStringList VcsBaseEditorWidget::annotationPreviousVersions(const QString &revision) const

### `[pure virtual protected]` QString VcsBaseEditorWidget::changeUnderCursor(const QTextCursor &) const

### bool VcsBaseEditorWidget::configurationAdded() const

See also setConfigurationAdded().

### EditorContentType VcsBaseEditorWidget::contentType() const

### `[pure virtual protected]` BaseAnnotationHighlighter *VcsBaseEditorWidget::createAnnotationHighlighter(const QSet<QString> &changes) const

### `[virtual protected]` QString VcsBaseEditorWidget::decorateVersion(const QString &revision) const

### `[signal]` void VcsBaseEditorWidget::describeRequested(const QString &source, const QString &change)

### `[signal]` void VcsBaseEditorWidget::diffChunkApplied(const VcsBase::DiffChunk &dc)

### `[signal]` void VcsBaseEditorWidget::diffChunkReverted(const VcsBase::DiffChunk &dc)

### `[virtual protected]` QString VcsBaseEditorWidget::fileNameForLine(int line) const

### `[protected]` QString VcsBaseEditorWidget::fileNameFromDiffSpecification(const QTextBlock &inBlock, QString *header = 0) const

### `[virtual protected]` QString VcsBaseEditorWidget::findDiffFile(const QString &f) const

### int VcsBaseEditorWidget::firstLineNumber() const

See also setFirstLineNumber().

### `[virtual]` void VcsBaseEditorWidget::init()

### bool VcsBaseEditorWidget::isModified() const

### `[virtual protected]` bool VcsBaseEditorWidget::isValidRevision(const QString &revision) const

### `[slot]` void VcsBaseEditorWidget::reportCommandFinished(bool ok, int exitCode, const QVariant &data)

### `[virtual protected]` QString VcsBaseEditorWidget::revisionSubject(const QTextBlock &inBlock) const

### void VcsBaseEditorWidget::setAnnotatePreviousRevisionTextFormat(const QString &)

See also annotatePreviousRevisionTextFormat().

### void VcsBaseEditorWidget::setCommand(VcsCommand *command)

### void VcsBaseEditorWidget::setConfigurationAdded()

See also configurationAdded().

### void VcsBaseEditorWidget::setDescribeFunc(DescribeFunc describeFunc)

### `[protected]` void VcsBaseEditorWidget::setDiffFilePattern(const QRegExp &pattern)

### void VcsBaseEditorWidget::setFirstLineNumber(int firstLineNumber)

See also firstLineNumber().

### void VcsBaseEditorWidget::setForceReadOnly(bool b)

### `[protected]` void VcsBaseEditorWidget::setLogEntryPattern(const QRegExp &pattern)

### void VcsBaseEditorWidget::setParameters(const VcsBaseEditorParameters *parameters)

### `[virtual]` void VcsBaseEditorWidget::setPlainText(const QString &text)

### `[virtual protected]` bool VcsBaseEditorWidget::supportChangeLinks() const