BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleDistributionItem.h
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Models/ParticleDistributionItem.h
6 //! @brief Defines class ParticleDistributionItem
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 
15 #ifndef BORNAGAIN_GUI_COREGUI_MODELS_PARTICLEDISTRIBUTIONITEM_H
16 #define BORNAGAIN_GUI_COREGUI_MODELS_PARTICLEDISTRIBUTIONITEM_H
17 
20 #include <string>
21 #include <vector>
22 
23 class BA_CORE_API_ ParticleDistributionItem : public SessionGraphicsItem {
24 public:
25  static const QString P_DISTRIBUTED_PARAMETER;
26  static const QString P_LINKED_PARAMETER;
27  static const QString P_DISTRIBUTION;
28  static const QString NO_SELECTION;
29  static const QString T_PARTICLES;
31 
32  std::unique_ptr<ParticleDistribution> createParticleDistribution() const;
33 
34  void setDomainCacheNames(const QString& name, const QStringList& linked);
35 
36 private:
37  void updateMainParameterList();
38  void updateLinkedParameterList();
39  QStringList childParameterNames() const;
40  QString translateParameterNameToGUI(const QString& domainName);
41  const SessionItem* childParticle() const;
42 
43  std::string domainMainParameter() const;
44  std::vector<std::string> domainLinkedParameters() const;
45 
47  QStringList m_linked_names;
48 };
49 
50 #endif // BORNAGAIN_GUI_COREGUI_MODELS_PARTICLEDISTRIBUTIONITEM_H
Defines class ParticleDistribution.
Defines class SessionGraphicsItem.
static const QString NO_SELECTION
static const QString P_DISTRIBUTION
static const QString T_PARTICLES
static const QString P_DISTRIBUTED_PARAMETER
static const QString P_LINKED_PARAMETER
QString const & name(EShape k)
Definition: particles.cpp:21
std::unique_ptr< ParticleDistribution > createParticleDistribution(const SessionItem &item)