API Documentation
Loading...
Searching...
No Matches
VirtualCameraView.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: VirtualCameraView
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
36#include "Base/Headers/UUID.h"
39
40#include <QWidget>
41class QPropertyAnimation;
42class QParallelAnimationGroup;
43namespace NDEVR
44{
45 class BackgroundandLightingEditor;
46 class QTModelManager;
47 class CameraToolbar;
48 class QTGraphicsWindow;
49 class QTGraphicsWidget;
50 class CameraEditor;
51 class CameraRulerMenu;
52 class Camera;
53 class CameraManager;
54 class QCustomDockWidget;
55 class Ruler;
56 class Button;
57 class File;
58 class String;
59 class QTResourceListener;
60 class ContextMenuCallback;
62 {
63 Q_OBJECT
64 public:
65 VirtualCameraView(QTGraphicsWidget* widget, const DynamicPointer<Camera>& camera, QTModelManager* model_manager, QWidget* parent = nullptr);
66 VirtualCameraView(QTGraphicsWidget* widget, QWidget* parent = nullptr);
68 void dragEnterEvent(QDragEnterEvent *event) override;
69 void dropEvent(QDropEvent *event) override;
70 void updateView() override;
71 void setSwapMode(SwapMode mode) override;
72 void setCamera(const DynamicPointer<Camera>& camera);
73 void setModelManager(QTModelManager* manager, bool auto_add_models);
74 void addModels(const Buffer<UUID>& ids) override;
75 void clearModels() override;
76 QTGraphicsWindow* graphicsWindow() const { return m_graphics_window; }
77 QWidget* cameraToolbar() override;
78 bool event(QEvent* e) override;
79 void setTouchTheme(bool touch_theme) override;
80 void showToolRibbon(bool visible) override;
81 void resetToolRibbon() override;
82 UUID id() const override;
83 virtual ConstPointer<Camera> camera() const override;
84 virtual DynamicPointer<Camera> camera() override;
85 virtual void addWidget(const QPointer<QWidget>& widget) override;
86 virtual void removeWidget(const QPointer<QWidget>& widget) override;
87 void setupRulers();
88 QImage screenshot();
89 void screenshotToClipboard(bool include_background);
90#if NDEVR_IMAGE_MODEL
91 void screenshotToObject(bool include_background);
92#endif
94 void toPDF(const File& pdf_file);
95 void addContextCustomMenu(const UUID& id, ContextMenuCallback* callback) override;
96 String getCursorID() const;
97 void requestShowInfoDisplay(bool should_show) override;
98 protected:
99 void init();
100 void updateCursor();
101 protected slots:
102 void showContextMenu(const QPoint &pos);
103 void requestCameraLink(bool selected);
104 void onMaterialDeleted(UUID material);
105 void objectRefresh(UUID id);
106
107 void editOverrideMaterial();
108 void removeOverrideMaterial();
109 protected:
113 CameraToolbar* m_camera_toolbar;
121 CameraRulerMenu* m_ruler_combo;
129 bool m_should_show_info = true;
130 };
131}
#define NDEVR_GRAPHICS_API
Definition DLLInfo.h:74
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:59
Definition Button.h:60
Definition CameraView.h:46
SwapMode
Definition CameraView.h:50
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition GraphicsPipeline.h:42
Definition ContextMenuManager.h:33
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:59
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:319
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
Definition QtGraphicsWindow.h:125
Definition QtGraphicsWindow.h:54
Definition QTModelManager.h:94
Definition QTTools.h:183
The core String class for the software.
Definition String.h:47
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:62
Definition VirtualCameraView.h:62
CameraRulerMenu * m_ruler_combo
Definition VirtualCameraView.h:121
QTResourceListener * m_cursor_listener
Definition VirtualCameraView.h:114
QTGraphicsWindow * graphicsWindow() const
Definition VirtualCameraView.h:76
Dictionary< UUID, ContextMenuCallback * > m_custom_context_callbacks
Definition VirtualCameraView.h:110
Ruler * m_top_ruler
Definition VirtualCameraView.h:119
bool m_show_toolbar
Definition VirtualCameraView.h:123
bool m_show_top_ruler_perspective
Definition VirtualCameraView.h:127
CameraToolbar * m_camera_toolbar
Definition VirtualCameraView.h:113
bool m_show_top_ruler_ortho
Definition VirtualCameraView.h:126
bool m_show_edge_ruler_ortho
Definition VirtualCameraView.h:124
bool m_show_edge_ruler_perspective
Definition VirtualCameraView.h:125
QTResourceListener * m_orientation_listener
Definition VirtualCameraView.h:117
QTResourceListener * m_orthograhic_listener
Definition VirtualCameraView.h:116
QTResourceListener * m_selection_info_listener
Definition VirtualCameraView.h:115
void screenshotToPrint(uint04 index=Constant< uint04 >::NaN)
QTGraphicsWindow * m_graphics_window
Definition VirtualCameraView.h:111
QTGraphicsWidget * m_graphics_widget
Definition VirtualCameraView.h:122
QTModelManager * m_model_manager
Definition VirtualCameraView.h:112
Button * m_ruler_button
Definition VirtualCameraView.h:120
bool m_touch_theme
Definition VirtualCameraView.h:128
Ruler * m_side_ruler
Definition VirtualCameraView.h:118
Definition ACIColor.h:37
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Definition BaseValues.hpp:115
Definition BaseValues.hpp:267