xTuple ERP Programmer Reference

 

One of the advantages of working with xTuple ERP, and open source software in general, is that you can change it. Add to this the ability to write scripts and packages for xTuple ERP and you have a lot of flexibility on how to modify or extend the core application. However, wIth an application as large and complex as this, documentation of the internals is important. Even for C++ experts, there is just too much code to understand everything about the application without some help.

The following links take you to The xTuple ERP Programmer Reference for different versions of xTuple ERP:

Getting Started

When you click on one of the links above, you'll see an introductory page with four tabs across the top:

  • Main Page:
    Clicking on this tab will always take you back  to the introduction.
  • Classes:
    The Classes tab lets you look at the documentation based on either the name of the C++ class or other data structure, descriptions of the classes, the class inheritance hierarchy (which classes are derived from which others), or the names of class members.
  • Files:
    The Files tab lets you browse through the documentation based on the source code files in which classes are declared and which files include which other files.
  • Directories:
    The Directories tab lets you browse through the documentation based on the filesystem structure of the source code.

Probably the best way to start using this documentation is to pick a particular window that you want to change. Then look through the Class List on the Classes tab for the most likely internal name for that window (see the comments on http://www.xtuple.org/node/336 for another way to get this name). Once you have a good candidate, you'll likely see two lines with that same name, one just plain and the other starting "Ui:". For example, if you are looking for the window that lets you create or edit a currency exchange rate, search for "currency" on the Class List. You should find the following (and a few other lines):

  • Ui::currencyConversion - the user interface definition (window layout and widgets) for the exchange rate window
  • currencyConversion - the actions defined for the exchange rate window
  • Ui::currencyConversions - the window layout and widgets for the window listing all of the defined exchange rates
  • currencyConversions - the actions defined for the window listing all of the defined exchange rates

Click on currencyConversion. The resulting page shows a handful of member functions and slots. These are the functions and slots defined specifically for the currencyConversion window (class). Near the top of the page, however, you'll see a List of all members link. Clicking here will bring up a list of all members of the currencyConversion class, including those that it inherits from its parent classes, QDialog and Ui_currencyConversion (which in turn comes from Ui::currencyConversion).

Now you can find the internal names of the buttons on this window ("_close" and "_save"), the pair of dates (a DateCluster widget called "_dateCluster"), and other widgets. If you want to learn more about what a particular item on the list is for, click the name of the item. For example, clicking on _save will show you the documentation for the _save button. If you want to find out what you can do with the _save button (e.g., can you hide it?), click on the QPushButton link.

The programmer reference documentation is sparse at the moment. The addition of details is a work in progress. If you would like to help with this effort, please send email to devdocs@xtuple.com. You can attach diffs with changes to the email for us to review and hopefully merge into the core. See the Doxygen Manual for information on how to tag your contributions.

 

mead