Omnidome
Fulldome Mapping Software Toolkit
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
SceneViewer.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 #include <memory>
21 #include <QWidget>
22 #include <omni/Session.h>
24 #include <omni/input/Interface.h>
25 
26 namespace omni {
27  namespace ui {
28  class SceneGLView;
29 
30  namespace Ui {
31  class SceneViewer;
32  }
33 
34  /// SceneViewer widget for positioning of elements and 3D view of scene
35  class SceneViewer :
36  public QWidget,
37  public mixin::SharedDataModel<Session>{
38  Q_OBJECT
40  public:
41  SceneViewer(QWidget * = nullptr);
42  ~SceneViewer();
43 
44  /// Return pointer to view
45  SceneGLView * view();
46 
47  /// Return pointer to view (const version)
48  SceneGLView const* view() const;
49 
50  public slots:
51  void triggerUpdate();
52 
53  /// Show large widget from current input
55 
56  /// Show large widget from given input
58 
59  /// Remove large input widget
61 
62  signals:
63  void dataModelChanged();
64 
65  private:
66  void dataToFrontend();
67  bool frontendToData();
68 
69  QWidget* inputControlWidget_ = nullptr;
70  std::unique_ptr<Ui::SceneViewer> ui_;
71  };
72  }
73 }
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 dataToFrontend()
Pure virtual method which determines how data model is represented in frontend.
Definition: SceneViewer.cpp:45
bool frontendToData()
Return true if data has changed by front end.
Definition: SceneViewer.cpp:57
Generic input interface.
Definition: Interface.h:53
QWidget * inputControlWidget_
Definition: SceneViewer.h:69
An OpenGL view for visualizing the scene of a session.
Definition: SceneGLView.h:32
std::unique_ptr< Ui::SceneViewer > ui_
Definition: SceneViewer.h:70
void removeInputControlWidget()
Remove large input widget.
Definition: SceneViewer.cpp:85
~SceneViewer()
Definition: SceneViewer.cpp:36
SceneGLView * view()
Return pointer to view.
Definition: SceneViewer.cpp:49
Holds a specific data model with frontend update mechanism.
Definition: DataModel.h:87
void triggerUpdate()
Definition: SceneViewer.cpp:38
void showInputControlWidget()
Show large widget from current input.
Definition: SceneViewer.cpp:62
SceneViewer(QWidget *=nullptr)
Definition: SceneViewer.cpp:26
SceneViewer widget for positioning of elements and 3D view of scene.
Definition: SceneViewer.h:35