BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ExternalProperty.h
Go to the documentation of this file.
1
// ************************************************************************************************
2
//
3
// BornAgain: simulate and fit reflection and scattering
4
//
5
//! @file GUI/coregui/Views/MaterialEditor/ExternalProperty.h
6
//! @brief Defines class ExternalProperty
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_VIEWS_MATERIALEDITOR_EXTERNALPROPERTY_H
16
#define BORNAGAIN_GUI_COREGUI_VIEWS_MATERIALEDITOR_EXTERNALPROPERTY_H
17
18
#include <QColor>
19
#include <QMetaType>
20
#include <QPixmap>
21
#include <QString>
22
#include <QVariant>
23
24
//! The ExternalProperty class defines custom QVariant property to carry the text, color and
25
//! an identifier.
26
27
class
ExternalProperty
{
28
public
:
29
explicit
ExternalProperty
();
30
31
QString
text
()
const
;
32
void
setText
(
const
QString&
name
);
33
34
QColor
color
()
const
;
35
void
setColor
(
const
QColor&
color
);
36
37
QString
identifier
()
const
;
38
void
setIdentifier
(
const
QString&
identifier
);
39
40
QPixmap
pixmap
()
const
;
41
42
bool
isValid
()
const
;
43
44
QVariant
variant
()
const
;
45
46
bool
operator==
(
const
ExternalProperty
& other)
const
;
47
bool
operator!=
(
const
ExternalProperty
& other)
const
;
48
bool
operator<
(
const
ExternalProperty
& other)
const
;
49
50
private
:
51
QString
m_text
;
52
QColor
m_color
;
53
QString
m_identifier
;
54
};
55
56
Q_DECLARE_METATYPE(
ExternalProperty
)
57
58
#endif
// BORNAGAIN_GUI_COREGUI_VIEWS_MATERIALEDITOR_EXTERNALPROPERTY_H
ExternalProperty
The ExternalProperty class defines custom QVariant property to carry the text, color and an identifie...
Definition:
ExternalProperty.h:27
ExternalProperty::m_color
QColor m_color
Definition:
ExternalProperty.h:52
ExternalProperty::identifier
QString identifier() const
Definition:
ExternalProperty.cpp:41
ExternalProperty::ExternalProperty
ExternalProperty()
ExternalProperty::variant
QVariant variant() const
Definition:
ExternalProperty.cpp:68
ExternalProperty::setColor
void setColor(const QColor &color)
Definition:
ExternalProperty.cpp:36
ExternalProperty::operator<
bool operator<(const ExternalProperty &other) const
Definition:
ExternalProperty.cpp:92
ExternalProperty::operator==
bool operator==(const ExternalProperty &other) const
Definition:
ExternalProperty.cpp:75
ExternalProperty::text
QString text() const
Definition:
ExternalProperty.cpp:21
ExternalProperty::operator!=
bool operator!=(const ExternalProperty &other) const
Definition:
ExternalProperty.cpp:87
ExternalProperty::pixmap
QPixmap pixmap() const
Definition:
ExternalProperty.cpp:51
ExternalProperty::setText
void setText(const QString &name)
Definition:
ExternalProperty.cpp:26
ExternalProperty::m_text
QString m_text
Definition:
ExternalProperty.h:51
ExternalProperty::isValid
bool isValid() const
Returns true if property is in valid state (i.e. have at least one member defined).
Definition:
ExternalProperty.cpp:60
ExternalProperty::setIdentifier
void setIdentifier(const QString &identifier)
Definition:
ExternalProperty.cpp:46
ExternalProperty::m_identifier
QString m_identifier
Definition:
ExternalProperty.h:53
ExternalProperty::color
QColor color() const
Definition:
ExternalProperty.cpp:31
RealSpace::Particles::name
QString const & name(EShape k)
Definition:
particles.cpp:21
GUI
coregui
Views
MaterialEditor
ExternalProperty.h
Generated by
1.9.1