BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
propertyitem.cpp
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// qt-mvvm: Model-view-view-model framework for large GUI applications
4
//
5
//! @file mvvm/model/mvvm/model/propertyitem.cpp
6
//! @brief Implements class CLASS?
7
//!
8
//! @homepage http://www.bornagainproject.org
9
//! @license GNU General Public License v3 or higher (see COPYING)
10
//! @copyright Forschungszentrum Jülich GmbH 2020
11
//! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12
//
13
// ************************************************************************************************
14
15
#include "
mvvm/model/propertyitem.h
"
16
#include "
mvvm/model/customvariants.h
"
17
#include "
mvvm/model/mvvm_types.h
"
18
19
using namespace
ModelView
;
20
21
PropertyItem::PropertyItem
() :
SessionItem
(
Constants
::
PropertyType
) {}
22
23
PropertyItem
*
PropertyItem::setDisplayName
(
const
std::string&
name
)
24
{
25
SessionItem::setDisplayName
(
name
);
26
return
this
;
27
}
28
29
PropertyItem
*
PropertyItem::setLimits
(
const
RealLimits
& value)
30
{
31
this->
setData
(value,
ItemDataRole::LIMITS
);
32
return
this
;
33
}
ModelView::PropertyItem
Item to carry concrete editable entity (e.g.
Definition:
propertyitem.h:27
ModelView::PropertyItem::setDisplayName
PropertyItem * setDisplayName(const std::string &name) override
Sets display name (fluent interface).
Definition:
propertyitem.cpp:23
ModelView::PropertyItem::setLimits
PropertyItem * setLimits(const RealLimits &value)
Definition:
propertyitem.cpp:29
ModelView::PropertyItem::PropertyItem
PropertyItem()
Definition:
propertyitem.cpp:21
ModelView::RealLimits
Limits for double.
Definition:
reallimits.h:25
ModelView::SessionItem
The main object representing an editable/displayable/serializable entity.
Definition:
sessionitem.h:38
ModelView::SessionItem::setData
bool setData(const T &value, int role=ItemDataRole::DATA, bool direct=false)
Sets data for a given role.
Definition:
sessionitem.h:141
ModelView::SessionItem::setDisplayName
virtual SessionItem * setDisplayName(const std::string &name)
Sets display name (fluent interface).
Definition:
sessionitem.cpp:101
customvariants.h
Defines class CLASS?
mvvm_types.h
Defines class CLASS?
Constants
Definition:
mainwindow_constants.h:20
ModelView::Constants::PropertyType
const model_type PropertyType
Definition:
mvvm_types.h:59
ModelView::ItemDataRole::LIMITS
const int LIMITS
possibly limits on item's data
Definition:
mvvm_types.h:33
ModelView
materialitems.h Collection of materials to populate MaterialModel.
Definition:
importtablewidget.h:26
RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:21
propertyitem.h
Defines class CLASS?
mvvm
model
mvvm
model
propertyitem.cpp
Generated by
1.9.1