BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ParticleDistributionView.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/SampleDesigner/ParticleDistributionView.cpp
6 //! @brief Implements class ParticleDistributionView
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 
19 
21 {
22  setName("ParticleDistribution");
26  ->setToolTip("Connect to the ParticleLayout");
28  ->setToolTip("Connect particle to this port. It will be a prototype \n"
29  "for parametric distribution.");
30 
31  m_label_vspace = StyleUtils::SizeOfLetterM().height() * 3.0;
32 }
33 
34 void ParticleDistributionView::addView(IView* childView, int /* row */)
35 {
36  connectInputPort(dynamic_cast<ConnectableView*>(childView), 0);
37 }
Defines class DesignerHelper.
Defines class ParticleDistributionView.
Defines class SessionItem.
DefinesStyleUtils namespace.
view of ISampleNode's with rectangular shape and node functionality
void connectInputPort(ConnectableView *other, int port_number)
connects input port with given index with output port of other view
virtual void setColor(const QColor &color)
virtual void setRectangle(QRectF rect)
virtual NodeEditorPort * addPort(const QString &name, NodeEditorPort::EPortDirection direction, NodeEditorPort::EPortType port_type)
adds port to view
virtual void setName(const QString &name)
static QRectF getDefaultBoundingRect(const QString &name)
returns default bounding rectangle for given IvView name
static QColor getDefaultParticleColor()
parent class for graphic representation of all ISampleNode's
Definition: IView.h:25
ParticleDistributionView(QGraphicsItem *parent=0)
void addView(IView *childView, int row=0)
QSize SizeOfLetterM(const QWidget *widget=nullptr)
Returns size of largest letter of default system font.
Definition: StyleUtils.cpp:110