diff options
author | Jarek Kobus <jkobus@trolltech.com> | 2011-08-16 10:45:23 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@nokia.com> | 2011-09-23 10:23:15 +0200 |
commit | 224491182666840def3a551a840c8fa840bfe5c2 (patch) | |
tree | 0c75ae3cc76819f373c1642ffd598e57568dac54 /src/plugins/texteditor/tabsettings.h | |
parent | 3955df7855c9d27d8d470f509578bd9004b72ea1 (diff) |
Implement Code Style schemes
Task-number: QTCREATORBUG-5092
Change-Id: I218cef02f7c242e4dfae59b1b8021ea618e60d07
Reviewed-on: http://codereview.qt-project.org/5160
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
Diffstat (limited to 'src/plugins/texteditor/tabsettings.h')
-rw-r--r-- | src/plugins/texteditor/tabsettings.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/src/plugins/texteditor/tabsettings.h b/src/plugins/texteditor/tabsettings.h index 885f4b2330..2eded67970 100644 --- a/src/plugins/texteditor/tabsettings.h +++ b/src/plugins/texteditor/tabsettings.h @@ -49,11 +49,11 @@ namespace TextEditor { class TEXTEDITOR_EXPORT TabSettings { public: - // This enum must match the indexes of tabKeyBehavior widget - enum TabKeyBehavior { - TabNeverIndents = 0, - TabAlwaysIndents = 1, - TabLeadingWhitespaceIndents = 2 + + enum TabPolicy { + SpacesOnlyTabPolicy = 0, + TabsOnlyTabPolicy = 1, + MixedTabPolicy = 2 }; // This enum must match the indexes of continuationAlignBehavior widget @@ -63,13 +63,6 @@ public: ContinuationAlignWithIndent = 2 }; - // This enum must match the indexes of smartBackspaceBehavior widget - enum SmartBackspaceBehavior { - BackspaceNeverIndents = 0, - BackspaceFollowsPreviousIndents = 1, - BackspaceUnindents = 2 - }; - TabSettings(); void toSettings(const QString &category, QSettings *s) const; @@ -97,17 +90,12 @@ public: int trailingWhitespaces(const QString &text) const; bool isIndentationClean(const QTextBlock &block) const; - bool tabShouldIndent(const QTextDocument *document, QTextCursor cursor, int *suggestedPosition = 0) const; bool guessSpacesForTabs(const QTextBlock &block) const; - bool m_spacesForTabs; - bool m_autoSpacesForTabs; - bool m_autoIndent; + TabPolicy m_tabPolicy; int m_tabSize; int m_indentSize; - TabKeyBehavior m_tabKeyBehavior; ContinuationAlignBehavior m_continuationAlignBehavior; - SmartBackspaceBehavior m_smartBackspaceBehavior; bool equals(const TabSettings &ts) const; }; |