API Documentation
Loading...
Searching...
No Matches
CameraView.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: Widgets
28File: CameraView
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/UUID.h>
35#include <NDEVR/Angle.h>
36#include <NDEVR/Pointer.h>
37#include <NDEVR/Buffer.h>
38#include <QPointer>
39#include <QFrame>
40namespace NDEVR
41{
42 class File;
43 class ContextMenuCallback;
44 class Camera;
45 /**--------------------------------------------------------------------------------------------------
46 \brief A simple frame for displaying Viewport data to a user. Data is rendered by a given Rendering
47 engine based on the nature of the Camera stream.
48 **/
49 class DESIGN_WIDGETS_API CameraView : public QFrame
50 {
51 Q_OBJECT
52 public:
54 {
55 e_no_swap
56 , e_swap_normal
57 , e_swap_resize
58 };
60 {
61 e_recording
62 , e_paused
63 , e_stopped
64 };
65 CameraView(QWidget* parent = nullptr)
66 : QFrame(parent)
67 {}
68 virtual ~CameraView() {}
69 //void enterEvent(QEvent*) override;
70 //void leaveEvent(QEvent*) override;
71 virtual void updateView() = 0;
72 virtual void setTouchTheme(bool touch_theme) = 0;
73 virtual void setSwapMode(SwapMode mode) = 0;
74 virtual UUID id() const = 0;
75 virtual ConstPointer<Camera> camera() const = 0;
77 bool event(QEvent* event) override;
79 virtual void addWidget(const QPointer<QWidget>&) {};
80 virtual void removeWidget(const QPointer<QWidget>&) {};
82 virtual void setCameraZoom(fltp08) {};
84 virtual void resetToolRibbon() {};
85 virtual void showToolRibbon(bool) {};
86 virtual QSize sizeHint() const override;
87 virtual QWidget* cameraToolbar() { return nullptr; };
88 virtual void addModels(const Buffer<UUID>&) {};
89 virtual void clearModels() {};
90 virtual RecordingState recordingState() const { return RecordingState::e_stopped; }
92 virtual void requestShowInfoDisplay(bool) {};
93 signals:
94 void viewportSelectionSignal(UUID camera, Buffer<UUID> selection);
96 void requestCameraCopy(UUID signal, bool);
97 void requestSwapSignal(UUID signal);
101 void onScreenshotSaved(const File& file);
102 void onVideoSaved(const File& file);
104 void requestMoveable(bool moveable);
105 };
106}
#define DESIGN_WIDGETS_API
Definition DLLInfo.h:56
The primary angle storage class for this API. Stores an angle in an optimized format.
Definition StringStream.h:540
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
A simple frame for displaying Viewport data to a user. Data is rendered by a given Rendering engine b...
Definition CameraView.h:50
virtual void resetToolRibbon()
Definition CameraView.h:84
virtual void addWidget(const QPointer< QWidget > &)
Definition CameraView.h:79
void requestRedrawAllSignal()
void requestSwapSignal(UUID signal)
virtual void showToolRibbon(bool)
Definition CameraView.h:85
virtual void setCameraRotation(Angle< fltp08 >)
Definition CameraView.h:81
virtual void updateView()=0
virtual Angle< fltp08 > cameraRotation()
Definition CameraView.h:83
virtual ~CameraView()
Definition CameraView.h:68
bool event(QEvent *event) override
void viewportSelectionSignal(UUID camera, Buffer< UUID > selection)
virtual QSize sizeHint() const override
virtual ConstPointer< Camera > camera() const =0
virtual void removeWidget(const QPointer< QWidget > &)
Definition CameraView.h:80
SwapMode
Definition CameraView.h:54
virtual void requestShowInfoDisplay(bool)
Definition CameraView.h:92
virtual UUID id() const =0
RecordingState
Definition CameraView.h:60
virtual void clearModels()
Definition CameraView.h:89
void recordingStateChangedSignal(RecordingState state)
void requestSelectedSignal()
virtual QWidget * cameraToolbar()
Definition CameraView.h:87
void requestCameraCopy(UUID signal, bool)
virtual void addModels(const Buffer< UUID > &)
Definition CameraView.h:88
virtual RecordingState recordingState() const
Definition CameraView.h:90
virtual void setIconSizeMultiplier(fltp04)
Definition CameraView.h:78
virtual void setTouchTheme(bool touch_theme)=0
virtual void setCameraZoom(fltp08)
Definition CameraView.h:82
virtual void setSwapMode(SwapMode mode)=0
void requestMoveable(bool moveable)
virtual DynamicPointer< Camera > camera()=0
void onVideoSaved(const File &file)
void onScreenshotSaved(const File &file)
CameraView(QWidget *parent=nullptr)
Definition CameraView.h:65
virtual void addContextCustomMenu(const UUID &, ContextMenuCallback *)
Definition CameraView.h:91
Provides a constant, unmodifiable pointer that has shared ownership of a dynamically allocated object...
Definition GraphicsPipeline.h:42
Allows for customization of what is shown when the user right-clicks or accesses the ContextMenu for ...
Definition ContextMenuManager.h:41
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:320
Logic for reading or writing to a file as well as navigating filesystems.
Definition File.h:48
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:60
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
Definition BaseValues.hpp:127
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:149