You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -204,26 +208,54 @@ Variable names begin with a lower case letter and are formed using mixed case.
204
208
currentExtent
205
209
206
210
211
+
1.5. Enumerated Types
212
+
=====================
213
+
214
+
Enumerated types should be named in CamelCase with a leading capital e.g.:
215
+
216
+
217
+
enum UnitType
218
+
{
219
+
Meters,
220
+
Feet,
221
+
Degrees,
222
+
UnknownUnit
223
+
} ;
207
224
208
-
1.5. Editing
225
+
226
+
Do not use generic type names that will conflict with other types. e.g. use "UnkownUnit" rather
227
+
than "Unknown"
228
+
229
+
230
+
1.6. Global Constants
231
+
=====================
232
+
233
+
Global constants should be written in upper case underscore separated e.g.:
234
+
235
+
236
+
const long GEOCRS_ID = 3344;
237
+
238
+
239
+
240
+
1.7. Editing
209
241
============
210
242
211
243
Any text editor/IDE can be used to edit QGIS code, providing the following requirements are met.
212
244
213
245
214
-
1.5.1. Tabs
246
+
1.7.1. Tabs
215
247
===========
216
248
217
249
Set your editor to emulate tabs with spaces. Tab spacing should be set to 2 spaces.
218
250
219
251
220
-
1.5.2. Indentation
252
+
1.7.2. Indentation
221
253
==================
222
254
223
255
Source code should be indented to improve readability. There is a .indent.pro file in the QGIS src directory that contains the switches to be used when indenting code using the GNU indent program. If you don't use GNU indent, you should emulate these settings.
224
256
225
257
226
-
1.5.3. Braces
258
+
1.7.3. Braces
227
259
=============
228
260
229
261
Braces should start on the line following the expression:
@@ -241,13 +273,13 @@ Braces should start on the line following the expression:
241
273
242
274
243
275
244
-
1.6. Coding Style
276
+
1.8. Coding Style
245
277
=================
246
278
247
279
Here are described some programming hints and tips that will hopefully reduce errors, development time, and maintenance.
248
280
249
281
250
-
1.6.1. Where-ever Possible Generalize Code
282
+
1.8.1. Where-ever Possible Generalize Code
251
283
==========================================
252
284
253
285
@@ -262,7 +294,7 @@ This will:
262
294
maintain for others
263
295
264
296
265
-
1.6.2. Prefer Having Constants First in Predicates
297
+
1.8.2. Prefer Having Constants First in Predicates
0 commit comments