BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
The ExternalProperty class defines custom QVariant property to carry the text, color and an identifier. More...
Public Member Functions | |
ExternalProperty () | |
QColor | color () const |
QString | identifier () const |
bool | isValid () const |
Returns true if property is in valid state (i.e. have at least one member defined). More... | |
bool | operator!= (const ExternalProperty &other) const |
bool | operator< (const ExternalProperty &other) const |
bool | operator== (const ExternalProperty &other) const |
QPixmap | pixmap () const |
void | setColor (const QColor &color) |
void | setIdentifier (const QString &identifier) |
void | setText (const QString &name) |
QString | text () const |
QVariant | variant () const |
Private Attributes | |
QColor | m_color |
QString | m_identifier |
QString | m_text |
The ExternalProperty class defines custom QVariant property to carry the text, color and an identifier.
Definition at line 27 of file ExternalProperty.h.
|
explicitdefault |
QColor ExternalProperty::color | ( | ) | const |
Definition at line 31 of file ExternalProperty.cpp.
References m_color.
Referenced by MaterialItem::color(), MaterialItemUtils::materialProperty(), pixmap(), MaterialItemUtils::selectColorProperty(), setColor(), ILayerView::updateColor(), and SessionXML::writeVariant().
QString ExternalProperty::identifier | ( | ) | const |
Definition at line 41 of file ExternalProperty.cpp.
References m_identifier.
Referenced by MaterialItemUtils::createDomainMaterial(), MaterialItemUtils::findMaterial(), setIdentifier(), MaterialEditor::setInitialMaterialProperty(), JobModelFunctions::setupJobItemSampleData(), and SessionXML::writeVariant().
bool ExternalProperty::isValid | ( | ) | const |
Returns true if property is in valid state (i.e. have at least one member defined).
Definition at line 60 of file ExternalProperty.cpp.
References m_color, m_identifier, and m_text.
bool ExternalProperty::operator!= | ( | const ExternalProperty & | other | ) | const |
Definition at line 87 of file ExternalProperty.cpp.
bool ExternalProperty::operator< | ( | const ExternalProperty & | other | ) | const |
Definition at line 92 of file ExternalProperty.cpp.
References m_identifier, and m_text.
bool ExternalProperty::operator== | ( | const ExternalProperty & | other | ) | const |
QPixmap ExternalProperty::pixmap | ( | ) | const |
Definition at line 51 of file ExternalProperty.cpp.
References color().
Referenced by ExternalPropertyEditor::ExternalPropertyEditor(), SessionItemUtils::DecorationRole(), and ExternalPropertyEditor::initEditor().
void ExternalProperty::setColor | ( | const QColor & | color | ) |
Definition at line 36 of file ExternalProperty.cpp.
References color(), and m_color.
Referenced by MaterialItemUtils::colorProperty(), and MaterialItemUtils::materialProperty().
void ExternalProperty::setIdentifier | ( | const QString & | identifier | ) |
Definition at line 46 of file ExternalProperty.cpp.
References identifier(), and m_identifier.
Referenced by MaterialItemUtils::materialProperty().
void ExternalProperty::setText | ( | const QString & | name | ) |
Definition at line 26 of file ExternalProperty.cpp.
References m_text, and RealSpace::Particles::name().
Referenced by MaterialItemUtils::colorProperty(), MaterialItemUtils::materialProperty(), and SessionXML::readProperty().
QString ExternalProperty::text | ( | ) | const |
Definition at line 21 of file ExternalProperty.cpp.
References m_text.
Referenced by ExternalPropertyEditor::ExternalPropertyEditor(), MaterialItemUtils::createDomainMaterial(), MaterialItemUtils::findMaterial(), ExternalPropertyEditor::initEditor(), ILayerView::updateLabel(), and SessionXML::writeVariant().
QVariant ExternalProperty::variant | ( | ) | const |
Definition at line 68 of file ExternalProperty.cpp.
Referenced by MaterialPropertyController::onMaterialDataChanged(), MaterialPropertyController::onMaterialModelLoad(), MaterialPropertyController::onMaterialRowsAboutToBeRemoved(), and GUIDomainSampleVisitor::visit().
|
private |
Definition at line 52 of file ExternalProperty.h.
Referenced by color(), isValid(), operator==(), and setColor().
|
private |
Definition at line 53 of file ExternalProperty.h.
Referenced by identifier(), isValid(), operator<(), operator==(), and setIdentifier().
|
private |
Definition at line 51 of file ExternalProperty.h.
Referenced by isValid(), operator<(), operator==(), setText(), and text().