BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
BornAgain developer reference

C++ developer reference of the BornAgain GUI. BornAgain is an open-source software to simulate and fit neutron and x-ray reflectometry and grazing-incidence small-angle scattering.

See also

License

GNU General Public License v3 or higher

Copyright Forschungszentrum Jülich GmbH 2015-

Authors

Scientific Computing Group at MLZ Garching.

See file AUTHORS.

Citation

See file CITATION.

Classes for representing the UI data

For representing the UI data there are classes which provide

  • storing the value
  • serializing the value
  • accessing the value
  • additional properties like label, tooltip, unit, limits
  • creating a UI element for this value

The most important classes regarding data representation are

Class Description
DoubleProperty Class for representing a double value, its attributes and its accessors.
UIntProperty Class for representing a uint value, its attributes and its accessors.
VectorProperty Holds a 3D vector of type R3 as well as additional info like label, tooltip.
SelectionProperty Class for representing a selection, its attributes and its accessors.
AxisProperty Holds values which can be used to describe a FixedBinAxis.

as well as their direct associates

Class Description
DoubleDescriptor Describes properties of a double value which are necessary to allow GUI representation, editing the value, undo/redo, unit conversion.
UIntDescriptor Describes properties of a uint value which are necessary to allow GUI representation, editing the value, undo/redo, unit conversion.
VectorDescriptor Describes properties of a 3D vector, consisting of three double values.
SelectionDescriptor Describes a selection (various possibilities and the current one).

Migration to eliminate SessionModel/SessionItem

The descriptions in the following issues contain detailed explanations and best-practices how to eliminate SessionModel and SessionItem dependency:

Refactor signaling of value changes (less generic, more explicit)

Refactor dynamic hierarchy in SessionItems (less generic, more explicit)

Refactor serialization of SessionItem (less generic, more explicit)

Also mentioned should be the explanations in merge request 695. In this merge request the UI-code was greatly simplified by using descriptors and related functions like GUI::Util::createSpinBox().