BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
LayerRoughnessItems.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/LayerRoughnessItems.cpp
6 //! @brief Implements classes LayerRoughnessItems
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2018
11 //! @authors Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
16 
17 namespace {
18 const QString hurst_tooltip =
19  "Hurst parameter which describes how jagged the interface,\n "
20  "dimensionless [0.0, 1.0], where 0.0 gives more spikes, \n1.0 more smoothness.";
21 }
22 
24 
25 const QString LayerBasicRoughnessItem::P_SIGMA = QString::fromStdString("Sigma");
26 const QString LayerBasicRoughnessItem::P_HURST = QString::fromStdString("Hurst");
28  QString::fromStdString("CorrelationLength");
29 
31 {
32  setToolTip("A roughness of interface between two layers.");
33  addProperty(P_SIGMA, 1.0)->setToolTip("rms of the roughness in nanometers");
34  addProperty(P_HURST, 0.3)->setLimits(RealLimits::limited(0.0, 1.0)).setToolTip(hurst_tooltip);
37  ->setToolTip("Lateral correlation length of the roughness in nanometers");
38 }
Defines classes LayerRoughnessItems.
static const QString P_LATERAL_CORR_LENGTH
static const QString P_SIGMA
static const QString P_HURST
static RealLimits limited(double left_bound_value, double right_bound_value)
Creates an object bounded from the left and right.
Definition: RealLimits.cpp:125
SessionItem * addProperty(const QString &name, const QVariant &variant)
Add new property item and register new tag.
SessionItem & setDecimals(int n)
SessionItem & setToolTip(const QString &tooltip)
SessionItem * getItem(const QString &tag="", int row=0) const
Returns item in given row of given tag.
SessionItem & setLimits(const RealLimits &value)