1
---------------------------------------------------------
2
Kexi Naming Conventions
4
These rules apply to Kexi Team developers
5
There are also guidelines for future naming decissions.
8
Copyright (C) 2003 Kexi Team
9
Kexi home page: http://www.kexi-project.org/
10
---------------------------------------------------
13
To simplify class names and make these names shorter, we use namespaces.
22
any plugins such as table/query/form designers, import plugins, one subdirectory per plugin
25
general-purpose widgets
28
any modules that can be considered as external (not necessarily optional)
31
3. Creating documentation
33
- Doxygen (www.doxygen.org) is used for generating Kexi developer documentation.
34
- default target directory of these docs in html format is: doc/html for all sources
35
- one step (..) up from mentioned dirs are places for .doxygen project files used
37
- Single-line comments are created begginning with: //!
38
- Multi-line comments are created begginning with /*! or /**
39
- Style of comments (/*! of /**) for given file should be preserved
41
Example 3.1: Comments for non-void functions, adding information about parameters:
43
/*! Displays value of \a x.
44
\return true if displaying is successfull */
48
-\return special Doxygen's tag is used to describe that we return
49
something in the method (\returns will not work for Doxygen!).
50
-Clause should be started from capital letter and terminated with a dot.
51
-"\a" special tag should be used before inserting argument names (names are
52
equal to these from the method's definition) - the names will be therefore
53
highlighted by Doxygen.
55
-For more sophisticated methods (with more arguments), you can as well
59
\param x horizontal position
60
\param y vertical position
61
\param col color of the box
64
-Methods/functions should be documented in header files (.h), not in implementation
65
files. This allows easier inspection for users of the source code.
66
-Comments from implementation files can be turned into
67
additional documentation, if really needed (when we use "/*!")
68
and this also will be included to generated docs if Doxygen project has enabled appropriate
69
option for doing this.
70
-Classes should be also documented -comments put just as the lines
71
before "class keyword.
73
-to add reference to similar or related function, use \sa tag, e.g.:
78
-to mark a code fragment that someting is TO DO, you can use \todo tag, e.g.:
80
/*! \todo (js) it is so hard to implement!
83
-example above shows that adding e.g. own nick inside the brackets what can help
84
to recognise who marked given fragment.
87
4.1 We use 2-spaces indentation. Do not use tabs.
89
QString objectName(); //wrong
90
QString objectName(); //ok
92
Rule: don't use many spaces or tabs between words.
94
4.2 To avoid many indentation levels, we can use:
100
if (!something_else && .....)
110
if(something_else && .....) {
116
This is good, because made qt and kde sources readable.
118
4.3 Indentation within classes declaration
120
namespace MyNamespace {