BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
pencontroller.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/view/mvvm/plotting/pencontroller.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_VIEW_MVVM_PLOTTING_PENCONTROLLER_H
16 #define BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_PENCONTROLLER_H
17 
19 #include "mvvm/view_export.h"
20 #include <memory>
21 
22 class QCPGraph;
23 
24 namespace ModelView {
25 
26 class PenItem;
27 
28 //! Establishes communication between QCPGraph and PenItem.
29 //! Provides update of QCPGraph's color, line style and width when PenItem is changed.
30 
31 class MVVM_VIEW_EXPORT PenController : public ItemListener<PenItem> {
32 public:
33  explicit PenController(QCPGraph* graph);
34  ~PenController() override;
35 
36 protected:
37  void subscribe() override;
38 
39 private:
40  struct PenControllerImpl;
41  std::unique_ptr<PenControllerImpl> p_impl;
42 };
43 
44 } // namespace ModelView
45 
46 #endif // BORNAGAIN_MVVM_VIEW_MVVM_PLOTTING_PENCONTROLLER_H
Base class to subscribe to signals generated by SessionItem of certin type.
Definition: itemlistener.h:26
Establishes communication between QCPGraph and PenItem.
Definition: pencontroller.h:31
std::unique_ptr< PenControllerImpl > p_impl
Definition: pencontroller.h:40
Defines class CLASS?
materialitems.h Collection of materials to populate MaterialModel.