Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Mapping.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_MAPPING_H_
21 #define OMNI_UI_MAPPING_H_
22 
23 #include <memory>
27 #include <omni/TypeIdMemory.h>
28 #include "DockWidget.h"
29 
30 namespace omni {
31  class Session;
32 
33  namespace ui {
34  namespace Ui {
35  class Mapping;
36  }
37 
38  /**@brief Widget for selecting a mapping mode and the parameters
39  **/
40  class Mapping :
41  public DockWidget,
42  public mixin::SharedDataModel<Session>,
43  private mixin::ParameterWidget<> {
44  Q_OBJECT
46 
47  public:
48  Mapping(QWidget * = nullptr);
49  ~Mapping();
50 
51  signals:
52  void dataModelChanged();
53 
54  public slots:
55  void selectMappingType(QString const&);
56 
57  private:
58  /// Update widgets from current mapping
59  void dataToFrontend();
60 
61  /// Assign widget values to current mapping
62  bool frontendToData();
63 
64  void showParameterWidget();
65 
66  std::unique_ptr<Ui::Mapping> ui_;
67 
68  /// Memory for storing/restoring settings of previously selected mapping
69  // types
71  };
72  }
73 }
74 
75 #endif /* OMNI_UI_MAPPING_H_ */
void showParameterWidget()
Definition: Mapping.cpp:90
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
Mapping(QWidget *=nullptr)
Definition: Mapping.cpp:29
mapping::Interface Mapping
Definition: Interface.h:177
bool frontendToData()
Assign widget values to current mapping.
Definition: Mapping.cpp:74
void dataToFrontend()
Update widgets from current mapping.
Definition: Mapping.cpp:48
Setup and remove a parameter widget for a certain plugin interface.
Definition: ParameterWidget.h:34
~Mapping()
Definition: Mapping.cpp:45
Widget for selecting a mapping mode and the parameters.
Definition: Mapping.h:40
Holds a specific data model with frontend update mechanism.
Definition: DataModel.h:87
void selectMappingType(QString const &)
Definition: Mapping.cpp:78
DockWidget is scroll area with an embedded widget.
Definition: DockWidget.h:27
TypeIdMemory< mapping::Interface > mappingMemory_
Memory for storing/restoring settings of previously selected mapping.
Definition: Mapping.h:70
std::unique_ptr< Ui::Mapping > ui_
Definition: Mapping.h:66