Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ColorCorrection.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 #ifndef OMNI_UI_COLORCORRECTION_H_
20 #define OMNI_UI_COLORCORRECTION_H_
21 
22 #include <omni/proj/Channel.h>
24 #include "DockWidget.h"
25 
26 namespace omni {
27  class Session;
28 
29  namespace ui {
30  namespace Ui {
31  class ColorCorrection;
32  }
33 
34  /// Dockwidget for editing color correction of a projector
36  public DockWidget,
37  public mixin::SharedDataModel<Session>{
38  Q_OBJECT
40  public:
42 
43  ColorCorrection(QWidget *_parent = nullptr);
45 
46  public slots:
47  /// Select color correction for all channels
48  void setAllChannels();
49 
50  /// Select color correction for red channel
51  void setRedChannel();
52 
53  /// Select color correction for green channel
54  void setGreenChannel();
55 
56  /// Select color correction for blue channel
57  void setBlueChannel();
58 
59  /// Select color correction for custom channel
60  void setChannel(Channel _channel);
61 
62  /// Select whether color correction is used
63  void setUsed(bool);
64 
65  signals:
66  void dataModelChanged();
67 
68  private:
69  /// Update sliders from current color correction
70  void dataToFrontend();
71 
72  /// Assign slider values to current color correction
73  bool frontendToData();
74 
75  std::unique_ptr<Ui::ColorCorrection> ui_;
76  };
77  }
78 }
79 
80 #endif /* OMNI_UI_COLORCORRECTION_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
void setBlueChannel()
Select color correction for blue channel.
Definition: ColorCorrection.cpp:61
void setChannel(Channel _channel)
Select color correction for custom channel.
Definition: ColorCorrection.cpp:85
Channel
Definition: Channel.h:24
std::unique_ptr< Ui::ColorCorrection > ui_
Definition: ColorCorrection.h:75
omni::proj::Channel Channel
Definition: ColorCorrection.h:41
void setAllChannels()
Select color correction for all channels.
Definition: ColorCorrection.cpp:49
void setUsed(bool)
Select whether color correction is used.
Definition: ColorCorrection.cpp:65
ColorCorrection(QWidget *_parent=nullptr)
Definition: ColorCorrection.cpp:28
~ColorCorrection()
Definition: ColorCorrection.cpp:47
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
void setGreenChannel()
Select color correction for green channel.
Definition: ColorCorrection.cpp:57
bool frontendToData()
Assign slider values to current color correction.
Definition: ColorCorrection.cpp:116
void dataToFrontend()
Update sliders from current color correction.
Definition: ColorCorrection.cpp:106
Dockwidget for editing color correction of a projector.
Definition: ColorCorrection.h:35
void setRedChannel()
Select color correction for red channel.
Definition: ColorCorrection.cpp:53