API Documentation
Loading...
Searching...
No Matches
CameraLocationWidget.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: CameraLocationCombo
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/QTModelManager.h>
34#if NDEVR_VIEWPORT
35#include <NDEVR/QTWindowManager.h>
36#include <NDEVR/QTDesignObject.h>
37#include <NDEVR/DesignObjectWidgetInterface.h>
38#include <NDEVR/CameraPane.h>
39#include <NDEVR/Button.h>
40#include <NDEVR/QTTools.h>
41#include <NDEVR/Camera.h>
42#include <NDEVR/Pointer.h>
43#include <QAction>
44#include <QRadioButton>
45#include <QActionGroup>
46#include <QMenu>
47#include <QHBoxLayout>
48namespace NDEVR
49{
50 /**--------------------------------------------------------------------------------------------------
51 \brief A widget that can be displayed for setting the location of a camera. See SnapLocation
52 **/
53 class NDEVR_API CameraLocationWidget : public QTResourceListener, public DesignObjectWidgetInterface
54 {
55 public:
56 CameraLocationWidget(QTModelManager* manager);
57 CameraLocationWidget(QTModelManager* manager, DynamicPointer<Camera> camera);
58 void removeTarget(const DynamicPointer<QTDesignObject>& object) override;
59 void addTarget(const DynamicPointer<QTDesignObject>& object) override;
60 void setupMenu();
61 void setupAutoCamera();
62 void onZoom(SnapLocation location);
63 void valueChanged();
64 virtual void onTargetUpdated(UUID) override;
65 void setCamera(const DynamicPointer<Camera>& camera);
66 QWidget* widget() const;
67 DynamicPointer<Camera> camera() const;
68 signals:
69 void requestSettingsSignal();
70 protected:
71 void setup();
72 protected:
73 DynamicPointer<Camera> m_active_camera;
74 QTModelManager* m_manager = nullptr;
75 TimeSpan m_animation_time;
76 QRadioButton* m_perspective = nullptr;
77 QRadioButton* m_orthographic = nullptr;
78 Button* m_top = nullptr;
79 Button* m_bottom = nullptr;
80 Button* m_front = nullptr;
81 Button* m_back = nullptr;
82 Button* m_left = nullptr;
83 Button* m_right = nullptr;
84 QAction* m_settings = nullptr;
85 QWidget* m_widget;
86 bool m_has_pending;
87 };
88}
89#endif
#define NDEVR_API
Definition DLLInfo.h:50
Definition ACIColor.h:37