BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
removeitemcommand.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/removeitemcommand.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_REMOVEITEMCOMMAND_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_REMOVEITEMCOMMAND_H
17 
19 
20 namespace ModelView {
21 
22 class SessionItem;
23 class TagRow;
24 
25 //! Command for unddo/redo framework to remove item from a model using child's tag and row.
26 
27 class MVVM_MODEL_EXPORT RemoveItemCommand : public AbstractItemCommand {
28 public:
29  RemoveItemCommand(SessionItem* parent, TagRow tagrow);
30  ~RemoveItemCommand() override;
31 
32 private:
33  void undo_command() override;
34  void execute_command() override;
35 
36  struct RemoveItemCommandImpl;
37  std::unique_ptr<RemoveItemCommandImpl> p_impl;
38 };
39 
40 } // namespace ModelView
41 
42 #endif // BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_REMOVEITEMCOMMAND_H
Defines class CLASS?
Abstract command interface to manipulate SessionItem in model context.
Command for unddo/redo framework to remove item from a model using child's tag and row.
std::unique_ptr< RemoveItemCommandImpl > 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
materialitems.h Collection of materials to populate MaterialModel.