4 See http://korganizer.kde.org/develop/hacking.html for an HTML version.
10 - Indent with 2 spaces.
11 - A line must not have more than 100 chars.
12 - Put Spaces between brackets and arguments of functions.
13 - For if, else, while and similar statements put the brackets on the same line
15 - Function and class definitions have their brackets on separate lines.
19 void MyClass::myFunction()
21 if ( blah == fasel ) {
22 blubbVariable = arglValue;
24 blubbVariable = oerxValue;
32 - General formatting rules apply.
33 - Access modifiers are indented.
34 - Put curly brackets of class definition on its own line.
35 - Double inclusion protection defines are all upper case letters and are
36 composed of the namespace (if available), the classname and a H suffix
37 separated by underscores.
38 - Inside a namespace there is no indentation.
64 - Each public function must have a Doxygen compatible comment in the header
65 - Use C-style comments without additional asterisks
67 - Comments should be grammatically correct, e.g. sentences start with uppercase
68 letters and end with a full stop.
74 This function makes tea.
76 @param cups number of cups.
79 Tea makeTea( int cups );
85 - Put classes in files, which have the same name as the class, but only
87 - Designer-generated files should have a name classname_base.ui and should
88 contain a class called ClassnameBase.
89 - Classes inheriting from designer-generated classes have the same name as the
90 generated class, but without the Base suffix.
92 Class and Variable Names
93 ------------------------
95 - For class, variable, function names seperate multiple words by upper-casing
96 the words precedeed by other words.
97 - Class names start with an upper-case letter.
98 - Function names start with a lower-case letter.
99 - Variable names start with a lower-case letter.
100 - Member variables of a class start with "m" followed by an upper-case letter.