Extending Qt Creator Manual | VcsBaseEditorWidget

Extending Qt Creator Manual 4.4.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

| ~VcsBaseEditorWidget() override
QString | annotatePreviousRevisionTextFormat() const
QString | annotateRevisionTextFormat() const
QTextCodec * | codec() const
EditorContentType | contentType() const
QString | copyRevisionTextFormat() const
VcsBaseEditorConfig * | editorConfig() 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 | setCopyRevisionTextFormat(const QString &)
void | setDescribeFunc(DescribeFunc describeFunc)
void | setEditorConfig(VcsBaseEditorConfig *config)
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

## Reimplemented Public Functions

virtual void | finalizeInitialization() override

- 184 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
void | contextMenuEvent(QContextMenuEvent *e) override
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
void | keyPressEvent(QKeyEvent *) override
void | mouseDoubleClickEvent(QMouseEvent *e) override
void | mouseMoveEvent(QMouseEvent *e) override
void | mouseReleaseEvent(QMouseEvent *e) override
virtual QString | revisionSubject(const QTextBlock &inBlock) const
void | setDiffFilePattern(const QRegExp &pattern)
void | setLogEntryPattern(const QRegExp &pattern)
virtual bool | supportChangeLinks() const

## Reimplemented Protected Functions

virtual QString | lineNumber(int blockNumber) const override
virtual int | lineNumberDigits() const override

- 45 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.

### VcsBaseEditorWidget::~VcsBaseEditorWidget()

Destroys the 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

### EditorContentType VcsBaseEditorWidget::contentType() const

### `[protected]` void VcsBaseEditorWidget::contextMenuEvent(QContextMenuEvent *e)

### `[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)

### VcsBaseEditorConfig *VcsBaseEditorWidget::editorConfig() const

See also setEditorConfig().

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

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

### `[override virtual]` void VcsBaseEditorWidget::finalizeInitialization()

### `[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

### `[protected]` void VcsBaseEditorWidget::keyPressEvent(QKeyEvent *)

### `[override virtual protected]` QString VcsBaseEditorWidget::lineNumber(int blockNumber) const

### `[override virtual protected]` int VcsBaseEditorWidget::lineNumberDigits() const

### `[protected]` void VcsBaseEditorWidget::mouseDoubleClickEvent(QMouseEvent *e)

### `[protected]` void VcsBaseEditorWidget::mouseMoveEvent(QMouseEvent *e)

### `[protected]` void VcsBaseEditorWidget::mouseReleaseEvent(QMouseEvent *e)

### `[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::setDescribeFunc(DescribeFunc describeFunc)

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

### void VcsBaseEditorWidget::setEditorConfig(VcsBaseEditorConfig *config)

See also editorConfig().

### 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