Extending Qt Creator Manual | TabSettings

Extending Qt Creator Manual 4.3.0

# TabSettings Class

(TextEditor::TabSettings)

- List of all members, including inherited members

## Public Types

enum | ContinuationAlignBehavior { NoContinuationAlign, ContinuationAlignWithSpaces, ContinuationAlignWithIndent }
enum | TabPolicy { SpacesOnlyTabPolicy, TabsOnlyTabPolicy, MixedTabPolicy }

## Public Functions

| TabSettings() = default
| TabSettings(TabPolicy tabPolicy, int tabSize, int indentSize, ContinuationAlignBehavior continuationAlignBehavior)
int | columnAt(const QString &text, int position) const
int | columnCountForText(const QString &text, int startColumn = 0) const
bool | equals(const TabSettings &ts) const
void | fromMap(const QString &prefix, const QVariantMap &map)
void | fromSettings(const QString &category, const QSettings *s)
bool | guessSpacesForTabs(const QTextBlock &block) const
void | indentLine(QTextBlock block, int newIndent, int padding = 0) const
int | indentationColumn(const QString &text) const
QString | indentationString(int startColumn, int targetColumn, int padding, const QTextBlock &currentBlock = QTextBlock()) const
QString | indentationString(const QString &text) const
int | indentedColumn(int column, bool doIndent = true) const
bool | isIndentationClean(const QTextBlock &block, const int indent) const
int | lineIndentPosition(const QString &text) const
int | positionAtColumn(const QString &text, int column, int *offset = 0, bool allowOverstep = false) const
void | reindentLine(QTextBlock block, int delta) const
void | toMap(const QString &prefix, QVariantMap *map) const
void | toSettings(const QString &category, QSettings *s) const

## Static Public Members

bool | cursorIsAtBeginningOfLine(const QTextCursor &cursor)
int | firstNonSpace(const QString &text)
int | maximumPadding(const QString &text)
bool | onlySpace(const QString &text)
void | removeTrailingWhitespace(QTextCursor cursor, QTextBlock &block)
int | spacesLeftFromPosition(const QString &text, int position)
int | trailingWhitespaces(const QString &text)

## Member Type Documentation

### enum TabSettings::ContinuationAlignBehavior

### enum TabSettings::TabPolicy

## Member Function Documentation

### `[default]` TabSettings::TabSettings()

Default constructs an instance of TabSettings.

### TabSettings::TabSettings(TabPolicy tabPolicy, int tabSize, int indentSize, ContinuationAlignBehavior continuationAlignBehavior)

Default constructs an instance of TabSettings.

### int TabSettings::columnAt(const QString &text, int position) const

### int TabSettings::columnCountForText(const QString &text, int startColumn = 0) const

### `[static]` bool TabSettings::cursorIsAtBeginningOfLine(const QTextCursor &cursor)

### bool TabSettings::equals(const TabSettings &ts) const

### `[static]` int TabSettings::firstNonSpace(const QString &text)

### void TabSettings::fromMap(const QString &prefix, const QVariantMap &map)

### void TabSettings::fromSettings(const QString &category, const QSettings *s)

### bool TabSettings::guessSpacesForTabs(const QTextBlock &block) const

### void TabSettings::indentLine(QTextBlock block, int newIndent, int padding = 0) const

### int TabSettings::indentationColumn(const QString &text) const

### QString TabSettings::indentationString(int startColumn, int targetColumn, int padding, const QTextBlock &currentBlock = QTextBlock()) const

### QString TabSettings::indentationString(const QString &text) const

### int TabSettings::indentedColumn(int column, bool doIndent = true) const

### bool TabSettings::isIndentationClean(const QTextBlock &block, const int indent) const

### int TabSettings::lineIndentPosition(const QString &text) const

### `[static]` int TabSettings::maximumPadding(const QString &text)

### `[static]` bool TabSettings::onlySpace(const QString &text)

### int TabSettings::positionAtColumn(const QString &text, int column, int *offset = 0, bool allowOverstep = false) const

### void TabSettings::reindentLine(QTextBlock block, int delta) const

### `[static]` void TabSettings::removeTrailingWhitespace(QTextCursor cursor, QTextBlock &block)

### `[static]` int TabSettings::spacesLeftFromPosition(const QString &text, int position)

### void TabSettings::toMap(const QString &prefix, QVariantMap *map) const

### void TabSettings::toSettings(const QString &category, QSettings *s) const

### `[static]` int TabSettings::trailingWhitespaces(const QString &text)