-
Notifications
You must be signed in to change notification settings - Fork 33
/
DEVELOPERS
61 lines (39 loc) · 1.85 KB
/
DEVELOPERS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
pgAdmin Development
===================
The pgAdmin developers mailing list is [email protected]
For further information about pgAdmin's developement, please see the website:
http://www.pgadmin.org/development/
Developer notes
===============
Class naming conventions
------------------------
foo represents an object of type Foo
fooFactory creates foos
fooCollection is a collection of foos
fooCollectionFactory creates a fooCollection
fooObject is an object that resides under/in foo
fooObjCollection is a collection of fooObjects
fooObjFactory creates fooObjects
Coding style
------------
This project uses the 'astyle' tool to give the code a uniform formatting.
Use './enforce-style.sh' or 'make style' to apply the necessary changes.
To add actions to the main window (frmMain)
--------------------------------------------
- create the frmXXX class that will render the new function.
- create an actionFactory (or contextActionFactory, if the action will display
in context menus too) derived factory for each action to be performed, and
register it in frmMain::CreateMenus(). Never touch menu.h, or anything for
that. Easy examples are frmGrantWizard or frmEditGrid.
- Implement CheckEnable() for each factory, checking the current object if
the action applies.
- Implement StartDialog(), which brings up the dialog.
Following this, you should be able to add new actions on objects by just adding
the source and registering the new menu in frmMain.cpp. If you think you need
to modify more files, you're probably wrong.
To add objects to the object tree
---------------------------------
- Implement the class with proper hierarchy. pgCast and dlgCast are simple
examples.
- instantiate a collection in the pgXXX object where it should be located
under.