C++ indenter: Add support for other brace styles.

This commit is contained in:
Christian Kamm
2010-07-05 09:59:42 +02:00
parent 76ebb46479
commit 3100fc0b7e
2 changed files with 22 additions and 0 deletions

View File

@@ -182,12 +182,20 @@ public:
void setIndentSize(int size);
enum CompoundStyle {
QtStyle, // don't indent braces, add indent for contained statements
WhitesmithsStyle, // add indent for braces, don't for the contained statements
GnuStyle // add indent for braces and again for contained statements
};
void setCompoundStyle(CompoundStyle style);
protected:
virtual void onEnter(int newState, int *indentDepth, int *savedIndentDepth) const;
virtual void adjustIndent(const QList<CPlusPlus::Token> &tokens, int lexerState, int *indentDepth) const;
private:
int m_indentSize;
CompoundStyle m_style;
};
} // namespace CppTools