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 class NDEVR_API CameraPane : public QWidget, public ViewportManager
53 {
54 Q_OBJECT
55 public:
56 CameraPane(QTWindowManager* window_manager, QTModelManager* manager, QWidget* parent = nullptr);
57 void setTouchTheme(bool touch_theme);
58 ViewportLayoutTheme cameraTheme() const { return m_current_layout.theme; }
59 void setSelectedCamera(UUID camera);
60 bool removeView(QPointer<DockWidget<CameraView>> view) override;
61 bool addView(QPointer<DockWidget<CameraView>> view) override;
62 void addWidget(const QPointer<QWidget>& widget);
63 void layoutViews(ViewportLayout camera_theme, DesignObjectLookup* manager, Buffer<QPointer<DockWidget<CameraView>>>& removed_views) override;
64 void removeWidget(const QPointer<QWidget>& widget);
65 bool removeCamera(const UUID& camera);
66 void onViewsSwapped(DockWidget<CameraView>* camera_a, DockWidget<CameraView>* camera_b) override;
67 bool removeCamera(const DynamicPointer<Camera>& camera);
68 void createListeners(UUID id);
69 void updateCamerasClosable() const;
70 QSize sizeHint() const override;
71 void makeCurrentConfigDefault();
72 bool sharedToolbar() const;
73 CustomDockButton* addCameraButton();
74 void setRibbonArea(RibbonArea ribbon_area);
75 signals:
76 void cameraThemeChanged(ViewportLayoutTheme theme);
77 void activeCameraChangedSignal();
78 protected slots:
79 void onClearAllSlot();
80 void onCameraDelete(UUID camera);
81 protected:
82 CustomDockButton* m_add_camera_button = nullptr;
83 QTModelManager* m_model_manager;
84 QTWindowManager* m_window_manager;
85 Buffer<QPointer<QWidget>> m_extra_widgets;
86 ContainerWidget* m_camera_area;
87 Dictionary<UUID, QTResourceListener*> m_hover_listeners;
88 Dictionary<UUID, QTResourceListener*> m_click_listeners;
89 Toolbar* m_toolbar;
90 RibbonArea m_ribbon_area = RibbonArea::e_left;
91 bool m_cameras_moveable;
92 bool m_touch_theme;
93 };
94}
95#endif
#define NDEVR_API
Definition DLLInfo.h:67
Definition ACIColor.h:37
RibbonArea
Definition RibbonArea.h:68
ViewportLayoutTheme
The potential layouts of multiple viewports within the NDEVR engine.
Definition ViewLocation.h:77