Lot of code for generating code. Working on unit tests.
This commit is contained in:
parent
da45929b12
commit
8f4845d4d2
42 changed files with 1089 additions and 267 deletions
23
pglablib/codebuilder/IndentationConfig.h
Normal file
23
pglablib/codebuilder/IndentationConfig.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef INDENTATIONCONFIG_H
|
||||
#define INDENTATIONCONFIG_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class IndentationConfig {
|
||||
public:
|
||||
IndentationConfig();
|
||||
IndentationConfig(int tab_size, int indentation_size, bool use_tabs);
|
||||
|
||||
/** Returns a string with the right amount of tabs and spaces for the
|
||||
* requested indentation level.
|
||||
*/
|
||||
QString getIndentString(int level) const;
|
||||
|
||||
private:
|
||||
int m_tabSize = 8; ///< the size of a tab
|
||||
int m_indentationSize = 4; ///< Number of positions per level to indent
|
||||
bool m_useTabs = true; ///< Use tabs as much as possible instead of spaces when indenting
|
||||
};
|
||||
|
||||
|
||||
#endif // INDENTATIONCONFIG_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue