BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
moveitemcommand.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/moveitemcommand.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_MOVEITEMCOMMAND_H
16 #define BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_MOVEITEMCOMMAND_H
17 
19 #include <memory>
20 
21 namespace ModelView {
22 
23 class SessionItem;
24 class TagRow;
25 
26 //! Command for unddo/redo framework to move item from one parent to another.
27 
28 class MVVM_MODEL_EXPORT MoveItemCommand : public AbstractItemCommand {
29 public:
30  MoveItemCommand(SessionItem* item, SessionItem* new_parent, TagRow tagrow);
31  ~MoveItemCommand() override;
32 
33 private:
34  void undo_command() override;
35  void execute_command() override;
36 
37  struct MoveItemCommandImpl;
38  std::unique_ptr<MoveItemCommandImpl> p_impl;
39 };
40 
41 } // namespace ModelView
42 
43 #endif // BORNAGAIN_MVVM_MODEL_MVVM_COMMANDS_MOVEITEMCOMMAND_H
Defines class CLASS?
Abstract command interface to manipulate SessionItem in model context.
Command for unddo/redo framework to move item from one parent to another.
std::unique_ptr< MoveItemCommandImpl > 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.