BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
commandadapter.cpp
Go to the documentation of this file.
1 // ************************************************************************************************
2 //
3 // qt-mvvm: Model-view-view-model framework for large GUI applications
4 //
5 //! @file mvvm/model/mvvm/commands/commandadapter.cpp
6 //! @brief Implements class CLASS?
7 //!
8 //! @homepage http://www.bornagainproject.org
9 //! @license GNU General Public License v3 or higher (see COPYING)
10 //! @copyright Forschungszentrum Jülich GmbH 2020
11 //! @authors Gennady Pospelov et al, Scientific Computing Group at MLZ (see CITATION, AUTHORS)
12 //
13 // ************************************************************************************************
14 
17 
18 using namespace ModelView;
19 
20 CommandAdapter::CommandAdapter(std::shared_ptr<AbstractItemCommand> command)
21  : m_command(std::move(command))
22 {
23 }
24 
26 
28 {
29  m_command->undo();
30 }
31 
33 {
34  m_command->execute();
35  setObsolete(m_command->isObsolete());
36  setText(QString::fromStdString(m_command->description()));
37 }
Defines class CLASS?
std::shared_ptr< AbstractItemCommand > m_command
CommandAdapter(std::shared_ptr< AbstractItemCommand > command)
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.
Definition: filesystem.h:81