Changes between Initial Version and Version 1 of Submitting/wxGUI


Ignore:
Timestamp:
Jun 11, 2014, 7:47:00 PM (10 years ago)
Author:
wenzeslaus
Comment:

slightly reformated content of source:grass/trunk/SUBMITTING_PYTHON?rev=60796 and source:grass/trunk/SUBMITTING_WXGUI?rev=60796 (no general things)

Legend:

Unmodified
Added
Removed
Modified
  • Submitting/wxGUI

    v1 v1  
     1[[TOC]]
     2
     3= Submitting wxGUI =
     4
     5GUI is divided into components. One component is usually placed in one
     6directory.
     7
     83. Remember that functionality such as generating plots should be primarily
     9provided by library or modules not GUI.
     10
     11
     124. Try to create create also g.gui.* module for the new GUI component. It helps
     13advanced users to access functionality and developers to test it. Moreover,
     14it helps to keep components separated and thus, it supports re-usability.
     15
     16== File structure ==
     17
     185. Add a header section to each file you submit and make sure you
     19include the copyright. The purpose section is meant to contain a
     20general over view of the code in the file to assist other
     21programmers that will need to make changes to your code. For this
     22purpose use Python docstring.
     23
     24The copyright protects your rights according to GNU General Public License (www.gnu.org).
     25
     26Please use the following docstring template:
     27
     28{{{
     29#!python
     30    """!
     31    @package dir.example
     32
     33    @brief Short example package description
     34
     35    Classes:
     36     - example::ExampleClass
     37
     38    (C) 2012 by the GRASS Development Team
     39
     40    This program is free software under the GNU General Public License
     41    (>=v2). Read the file COPYING that comes with GRASS for details.
     42
     43    @author First Author <first somewhere.com>
     44    @author Second Author <second somewhere.com>
     45    @author Some Other <third somewhere.com> (some particular change)
     46    """
     47}}}
     48
     49== Documentation and comments ==
     50
     51
     52== Writing the code ==
     53
     54Do not use print command unless you know what are you doing.
     55
     56Use wx.ID_ANY instead of `-1`.
     57
     58Use GError, GWarning and GMessage instead of wx.MessageBox()
     59
     60Do not use grass.run_command() or grass.read_command().
     61Use functions and classes which use threads such as RunCommand.
     62
     63When using AddGrowableCol/AddGrowableRow with sizers, put it after
     64adding widgets into the sizer, not just after creating of the sizer
     65(needed for wxPython >= 2.9).
     66
     67== Testing ==
     68
     69== See also ==
     70
     71=== Related submitting rules ==
     72
     73 * wiki:Submitting/General general GRASS and svn instructions
     74 * wiki:Submitting/Python Python library and scripts related instructions which applies to wxGUI too if not stated otherwise
     75 * wiki:Submitting/Docs user documentation of modules and GUI
     76
     77=== GRASS documentation ===
     78
     79 * GRASS Programming manual for API and existing classes: http://grass.osgeo.org/programming7/wxpythonlib.html
     80 * GRASS wiki has pages about how to develop wxGUI: http://grasswiki.osgeo.org
     81 * GRASS Trac wiki has pages about the state of wxGUI development: http://trac.osgeo.org/grass/wiki/wxGUIDevelopment
     82
     83=== External documentation ===
     84
     85 * wxPython Style Guide: http://wiki.wxpython.org/wxPython_Style_Guide