Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Blend.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2015 "Omnidome" by cr8tr
2  * Dome Mapping Projection Software (http://omnido.me).
3  * Omnidome was created by Michael Winkelmann aka Wilston Oreo (@WilstonOreo)
4  *
5  * This file is part of Omnidome.
6  *
7  * Omnidome is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU Affero General Public License as
9  * published by the Free Software Foundation, either version 3 of the
10  * License, or (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU Affero General Public License for more details.
16  * You should have received a copy of the GNU Affero General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OMNI_UI_BLEND_H_
21 #define OMNI_UI_BLEND_H_
22 
23 #include <memory>
24 #include <vector>
26 #include <omni/proj/Tuning.h>
27 #include <omni/ui/RangedFloat.h>
28 #include "DockWidget.h"
29 
30 namespace omni {
31  class Session;
32  class BlendMask;
33 
34  namespace ui {
35  namespace Ui {
36  class Blend;
37  }
38 
39  /// Dockwidget for editing the blend mask
40  class Blend :
41  public DockWidget,
42  public mixin::SharedDataModel<Session>{
43  Q_OBJECT
45 
46  public:
47  Blend(QWidget * = nullptr);
48  ~Blend();
49 
50  signals:
51  void dataModelChanged();
52 
53  private:
54  /// Update sliders from given blend mask
55  void dataToFrontend();
56 
57  /// Assign slider values to blend mask
58  bool frontendToData();
59 
60  omni::BlendMask const* blendMask() const;
62 
63  std::unique_ptr<Ui::Blend> ui_;
64  };
65  }
66 }
67 
68 #endif /* OMNI_UI_BLEND_H_ */
A session consists of a canvas, a mapping, a list of tunings and one or several inputs.
Definition: Session.h:41
#define OMNI_UI_SHARED_DATAMODEL(MODEL)
Definition: DataModel.h:216
Dockwidget for editing the blend mask.
Definition: Blend.h:40
omni::BlendMask const * blendMask() const
Definition: Blend.cpp:158
bool frontendToData()
Assign slider values to blend mask.
Definition: Blend.cpp:121
~Blend()
Definition: Blend.cpp:97
void dataToFrontend()
Update sliders from given blend mask.
Definition: Blend.cpp:100
Holds a specific data model with frontend update mechanism.
Definition: DataModel.h:87
DockWidget is scroll area with an embedded widget.
Definition: DockWidget.h:27
Blend(QWidget *=nullptr)
Definition: Blend.cpp:31
A blend mask consists of an edge mask and stroke mask with a brush Edge mask and stroke mask are sto...
Definition: BlendMask.h:35
void dataModelChanged()
std::unique_ptr< Ui::Blend > ui_
Definition: Blend.h:63