BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
insertnewitemcommand.h
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/insertnewitemcommand.h
6 //! @brief Defines 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 
15 #ifndef BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_INSERTNEWITEMCOMMAND_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_INSERTNEWITEMCOMMAND_H
17 
20 
21 namespace ModelView {
22 
23 class SessionItem;
24 class TagRow;
25 
26 //! Command for unddo/redo to insert new item.
27 
28 class MVVM_MODEL_EXPORT InsertNewItemCommand : public AbstractItemCommand {
29 public:
30  InsertNewItemCommand(item_factory_func_t func, SessionItem* parent, const TagRow& tagrow);
32 
33 private:
34  void undo_command() override;
35  void execute_command() override;
36 
38  std::unique_ptr<InsertNewItemCommandImpl> p_impl;
39 };
40 
41 } // namespace ModelView
42 
43 #endif // BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_INSERTNEWITEMCOMMAND_H
Defines class CLASS?
Abstract command interface to manipulate SessionItem in model context.
Command for unddo/redo to insert new item.
std::unique_ptr< InsertNewItemCommandImpl > p_impl
The main object representing an editable/displayable/serializable entity.
Definition: sessionitem.h:38
Aggregate to hold (tag, row) information for SessionModel.
Definition: tagrow.h:25
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.
std::function< std::unique_ptr< SessionItem >()> item_factory_func_t
Definition for item factory funciton.