Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BlendSettings.h
Go to the documentation of this file.
1 /* Copyright (c) 2014-2016 "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_BLENDSETTINGS_H_
21 #define OMNI_BLENDSETTINGS_H_
22 
24 
25 namespace omni {
26  /// Common blend mask settings for the all tunings in a session
27  class BlendSettings {
28  public:
29  /// Blend Mask display colorColorMode
30  enum class ColorMode
31  {
32  COLORED, // Displays blend mask with color of tuning
33  WHITE // Displays white blend mask
34  };
35 
36  /// Return colorColorMode of blend mask colorColorMode
37  ColorMode colorMode() const;
38 
39  /// Set blend mask colorColorMode
40  void setColorMode(ColorMode);
41 
42  /// Return input opacity of blend mask
43  float inputOpacity() const;
44 
45  /// Opacity of input when in blend mask colorColorMode
46  void setInputOpacity(float _input);
47 
48  /// Show blend mask in warp colorColorMode
49  bool showInWarpMode() const;
50 
51  /// Set flag if blend mask is visible in warp colorColorMode
52  void setShowInWarpMode(bool);
53 
54  /// Deserialize from stream
55  void fromStream(QDataStream&);
56 
57  /// Serialize to stream
58  void toStream(QDataStream&) const;
59 
60  /// Test for equality.
61  friend bool operator==(BlendSettings const&,
62  BlendSettings const&);
63 
64  private:
66  bool showInWarpMode_ = false;
67  float inputOpacity_ = 0.0;
68  };
69 }
70 
72 
73 #endif /* OMNI_BLENDSETTINGS_H_ */
ColorMode colorMode_
Definition: BlendSettings.h:65
bool showInWarpMode_
Definition: BlendSettings.h:66
void setInputOpacity(float _input)
Opacity of input when in blend mask colorColorMode.
Definition: BlendSettings.cpp:41
#define OMNI_DECL_STREAM_OPERATORS(CLASS)
Definition: Interface.h:53
float inputOpacity_
Definition: BlendSettings.h:67
void fromStream(QDataStream &)
Deserialize from stream.
Definition: BlendSettings.cpp:57
bool showInWarpMode() const
Show blend mask in warp colorColorMode.
Definition: BlendSettings.cpp:47
void toStream(QDataStream &) const
Serialize to stream.
Definition: BlendSettings.cpp:67
friend bool operator==(BlendSettings const &, BlendSettings const &)
Test for equality.
Definition: BlendSettings.cpp:75
Common blend mask settings for the all tunings in a session.
Definition: BlendSettings.h:27
ColorMode colorMode() const
Return colorColorMode of blend mask colorColorMode.
Definition: BlendSettings.cpp:26
void setShowInWarpMode(bool)
Set flag if blend mask is visible in warp colorColorMode.
Definition: BlendSettings.cpp:52
ColorMode
Blend Mask display colorColorMode.
Definition: BlendSettings.h:30
float inputOpacity() const
Return input opacity of blend mask.
Definition: BlendSettings.cpp:36
void setColorMode(ColorMode)
Set blend mask colorColorMode.
Definition: BlendSettings.cpp:31