BornAgain  1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
SessionItemWidget.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // BornAgain: simulate and fit reflection and scattering
4 //
5 //! @file GUI/View/Common/SessionItemWidget.cpp
6 //! @brief Declares class ItemComboWidget
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 
17 
19  : QWidget(parent)
20  , m_itemController(new SessionItemController(this))
21 {
24 }
25 
27 
29 {
31 
32  if (isVisible())
34 }
35 
37 {
38  return QList<QAction*>();
39 }
40 
42 {
43  return const_cast<SessionItem*>(static_cast<const SessionItemWidget*>(this)->currentItem());
44 }
45 
47 {
48  return m_itemController->currentItem();
49 }
50 
52 {
54 }
55 
57 {
59 }
Defines class SessionItemController.
Defines class ItemComboWidget.
Provides subscribe/unsubscribe mechanism for any QObject to track time of life of SessionItem....
void setUnsubscribeCallback(callback_t fun)
void setItem(SessionItem *item)
void setSubscribeCallback(callback_t fun)
void unsubscribe()
Fully unsubscribes the parent from listening item's signals. Controller stays active to track item de...
void subscribe()
Subscribe parent to item's signals.
The SessionItemWidget class is a base for all widgets representing the content of SessionItem....
virtual void subscribeToItem()
void showEvent(QShowEvent *) override
virtual QList< QAction * > actionList()
virtual void unsubscribeFromItem()
SessionItem * currentItem()
~SessionItemWidget() override
SessionItemWidget(QWidget *parent=nullptr)
virtual void setItem(SessionItem *item)
SessionItemController * m_itemController
void hideEvent(QHideEvent *) override
Base class for a GUI data item.
Definition: SessionItem.h:204