BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
IntensityDataPropertyWidget.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/coregui/Views/IntensityDataWidgets/IntensityDataPropertyWidget.cpp
6 //! @brief Implements class IntensityDataPropertyWidget
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 
20 #include <QAction>
21 #include <QVBoxLayout>
22 
24  : SessionItemWidget(parent)
25  , m_togglePanelAction(new QAction(this))
26  , m_componentEditor(new ComponentEditor)
27 {
28  setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
29  setWindowTitle(QLatin1String("Intensity Data Properties"));
30  setObjectName(QLatin1String("Intensity Data Properties"));
31 
32  auto mainLayout = new QVBoxLayout;
33  mainLayout->setMargin(0);
34  mainLayout->setSpacing(0);
35  mainLayout->addWidget(m_componentEditor);
36  setLayout(mainLayout);
37 
38  m_togglePanelAction->setText("Properties");
39  m_togglePanelAction->setIcon(QIcon(":/images/dock-right.svg"));
40  m_togglePanelAction->setToolTip("Toggle property panel");
41  connect(m_togglePanelAction, &QAction::triggered, this,
43 }
44 
46 {
48 }
49 
51 {
53 }
54 
56 {
57  return QList<QAction*>() << m_togglePanelAction;
58 }
59 
61 {
62  setVisible(!isVisible());
63 }
64 
66 {
68 }
69 
71 {
72  m_componentEditor->setItem(nullptr);
73 }
74 
76 {
77  // Reimplemented to suppress menu from main window
78 }
Defines ComponentEditor class.
Defines class IntensityDataItem.
Defines class IntensityDataPropertyWidget.
Defines class JobModel.
DefinesStyleUtils namespace.
Component editor for SessionItem.
void setItem(SessionItem *item)
void contextMenuEvent(QContextMenuEvent *)
The SessionItemWidget class is a base for all widgets representing the content of SessionItem.
SessionItem * currentItem()
int PropertyPanelWidth()
Returns typical width of the vertical property panel.
Definition: StyleUtils.cpp:121