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 class DESIGN_WIDGETS_API CameraView : public QFrame
46 {
47 Q_OBJECT
48 public:
50 {
51 e_no_swap
52 , e_swap_normal
53 , e_swap_resize
54 };
56 {
57 e_recording
58 , e_paused
59 , e_stopped
60 };
61 CameraView(QWidget* parent = nullptr)
62 : QFrame(parent)
63 {}
64 virtual ~CameraView() {}
65 //void enterEvent(QEvent*) override;
66 //void leaveEvent(QEvent*) override;
67 virtual void updateView() = 0;
68 virtual void setTouchTheme(bool touch_theme) = 0;
69 virtual void setSwapMode(SwapMode mode) = 0;
70 virtual UUID id() const = 0;
71 virtual ConstPointer<Camera> camera() const = 0;
73 bool event(QEvent* event) override;
75 virtual void addWidget(const QPointer<QWidget>&) {};
76 virtual void removeWidget(const QPointer<QWidget>&) {};
78 virtual void setCameraZoom(fltp08) {};
80 virtual void resetToolRibbon() {};
81 virtual void showToolRibbon(bool) {};
82 virtual QSize sizeHint() const override;
83 virtual QWidget* cameraToolbar() { return nullptr; };
84 virtual void addModels(const Buffer<UUID>&) {};
85 virtual void clearModels() {};
86 virtual RecordingState recordingState() const { return RecordingState::e_stopped; }
88 virtual void requestShowInfoDisplay(bool) {};
89 signals:
90 void viewportSelectionSignal(UUID camera, Buffer<UUID> selection);
92 void requestCameraCopy(UUID signal, bool);
93 void requestSwapSignal(UUID signal);
97 void onScreenshotSaved(const File& file);
98 void onVideoSaved(const File& file);
100 void requestMoveable(bool moveable);
101 };
102}
#define DESIGN_WIDGETS_API
Definition DLLInfo.h:74
Stores an angle in an optimized format.
Definition StringStream.h:352
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition CameraView.h:46
virtual void resetToolRibbon()
Definition CameraView.h:80
virtual void addWidget(const QPointer< QWidget > &)
Definition CameraView.h:75
void requestRedrawAllSignal()
void requestSwapSignal(UUID signal)
virtual void showToolRibbon(bool)
Definition CameraView.h:81
virtual void setCameraRotation(Angle< fltp08 >)
Definition CameraView.h:77
virtual void updateView()=0
virtual Angle< fltp08 > cameraRotation()
Definition CameraView.h:79
virtual ~CameraView()
Definition CameraView.h:64
void viewportSelectionSignal(UUID camera, Buffer< UUID > selection)
virtual ConstPointer< Camera > camera() const =0
virtual void removeWidget(const QPointer< QWidget > &)
Definition CameraView.h:76
SwapMode
Definition CameraView.h:50
virtual void requestShowInfoDisplay(bool)
Definition CameraView.h:88
virtual UUID id() const =0
RecordingState
Definition CameraView.h:56
virtual void clearModels()
Definition CameraView.h:85
void recordingStateChangedSignal(RecordingState state)
void requestSelectedSignal()
virtual QWidget * cameraToolbar()
Definition CameraView.h:83
void requestCameraCopy(UUID signal, bool)
virtual void addModels(const Buffer< UUID > &)
Definition CameraView.h:84
virtual RecordingState recordingState() const
Definition CameraView.h:86
virtual void setIconSizeMultiplier(fltp04)
Definition CameraView.h:74
virtual void setTouchTheme(bool touch_theme)=0
virtual void setCameraZoom(fltp08)
Definition CameraView.h:78
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:61
virtual void addContextCustomMenu(const UUID &, ContextMenuCallback *)
Definition CameraView.h:87
Definition GraphicsPipeline.h:42
Definition ContextMenuManager.h:33
Definition Pointer.hpp:303
Definition File.h:47
Definition UUID.h:66
Definition ACIColor.h:37
float fltp04
Defines an alias representing a 4 byte floating-point number.
Definition BaseValues.hpp:157
double fltp08
Defines an alias representing an 8 byte floating-point number.
Definition BaseValues.hpp:181