API Documentation
Loading...
Searching...
No Matches
CameraPane.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: CameraPane
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#if NDEVR_VIEWPORT
35#include <NDEVR/ViewportManager.h>
36#include <NDEVR/ContainerWidget.h>
37#include <NDEVR/QCustomDockWidget.h>
38#include <NDEVR/SnapLocation.h>
39#include <NDEVR/ViewportLayout.h>
40#include <NDEVR/Pointer.h>
41namespace NDEVR
42{
43 class VirtualCameraView;
44 class QTModelManager;
45 class QTWindowManager;
46 class CameraToolbar;
47 class Camera;
48 class CameraView;
49 class CustomDockButton;
50 class QTResourceListener;
51 class Toolbar;
52 /**--------------------------------------------------------------------------------------------------
53 \brief The default container for multiple Viewports in the NDEVR environment.
54 **/
55 class NDEVR_API CameraPane : public QWidget, public ViewportManager
56 {
57 Q_OBJECT
58 public:
59 CameraPane(QTWindowManager* window_manager, QTModelManager* manager, QWidget* parent = nullptr);
60 void setTouchTheme(bool touch_theme);
61 ViewportLayoutTheme cameraTheme() const { return m_current_layout.theme; }
62 void setSelectedCamera(UUID camera);
63 bool removeView(QPointer<DockWidget<CameraView>> view) override;
64 bool addView(QPointer<DockWidget<CameraView>> view) override;
65 void addWidget(const QPointer<QWidget>& widget);
66 void layoutViews(ViewportLayout camera_theme, DesignObjectLookup* manager, Buffer<QPointer<DockWidget<CameraView>>>& removed_views) override;
67 void removeWidget(const QPointer<QWidget>& widget);
68 bool removeCamera(const UUID& camera);
69 void onViewsSwapped(DockWidget<CameraView>* camera_a, DockWidget<CameraView>* camera_b) override;
70 bool removeCamera(const DynamicPointer<Camera>& camera);
71 void createListeners(UUID id);
72 void updateCamerasClosable() const;
73 QSize sizeHint() const override;
74 void makeCurrentConfigDefault();
75 bool sharedToolbar() const;
76 CustomDockButton* addCameraButton();
77 void setRibbonArea(RibbonArea ribbon_area);
78 signals:
79 void cameraThemeChanged(ViewportLayoutTheme theme);
80 void activeCameraChangedSignal();
81 protected slots:
82 void onClearAllSlot();
83 void onCameraDelete(UUID camera);
84 protected:
85 CustomDockButton* m_add_camera_button = nullptr;
86 QTModelManager* m_model_manager;
87 QTWindowManager* m_window_manager;
88 Buffer<QPointer<QWidget>> m_extra_widgets;
89 ContainerWidget* m_camera_area;
90 Dictionary<UUID, QTResourceListener*> m_hover_listeners;
91 Dictionary<UUID, QTResourceListener*> m_click_listeners;
92 Toolbar* m_toolbar;
93 RibbonArea m_ribbon_area = RibbonArea::e_left;
94 bool m_cameras_moveable;
95 bool m_touch_theme;
96 };
97}
98#endif
#define NDEVR_API
Definition DLLInfo.h:50
Definition ACIColor.h:37
RibbonArea
Requests a ribbon or tab area to be in a certain location and orientation relative to another widget.
Definition RibbonArea.h:71
ViewportLayoutTheme
The potential layouts of multiple viewports within the NDEVR engine.
Definition ViewLocation.h:77