API Documentation
Loading...
Searching...
No Matches
CameraLocationCombo.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/QTDesignObject.h>
34#if NDEVR_VIEWPORT
35#include <NDEVR/DesignObjectWidgetInterface.h>
36#include <NDEVR/QTTools.h>
37#include <NDEVR/Camera.h>
38#include <NDEVR/Pointer.h>
39#include <NDEVR/TimeSpan.h>
40#include <QAction>
41#include <QActionGroup>
42#include <QMenu>
43namespace NDEVR
44{
45 class Button;
46 class QTModelManager;
47 /**--------------------------------------------------------------------------------------------------
48 \brief Sets up a button to be a combobox with the various snap locations of a camera. See SnapLocation
49 **/
50 class NDEVR_API CameraLocationCombo : public QTResourceListener, public DesignObjectWidgetInterface
51 {
52 Q_OBJECT
53 public:
54 CameraLocationCombo(QTModelManager* manager, Button* combo, bool include_combo);
55 CameraLocationCombo(QTModelManager* manager, DynamicPointer<Camera> camera, Button* combo, bool include_combo);
56 void removeTarget(const DynamicPointer<QTDesignObject>& object) override;
57 void addTarget(const DynamicPointer<QTDesignObject>& object) override;
58 void setupMenu();
59 void setup(bool include_combo);
60 void setManager(QTModelManager* manager);
61 void setCamera(const DynamicPointer<Camera>& camera);
62 void onZoom(SnapLocation location);
63 void valueChanged();
64 virtual void onTargetUpdated(UUID) override;
65 signals:
66 void requestSettingsSignal();
67 protected:
68 DynamicPointer<Camera> m_camera;
69 Button* m_combo = nullptr;
70 QTModelManager* m_manager = nullptr;
71 TimeSpan m_animation_time;
72 QMenu* m_menu = nullptr;
73 QAction* m_perspective = nullptr;
74 QAction* m_orthographic = nullptr;
75 QAction* m_top = nullptr;
76 QAction* m_bottom = nullptr;
77 QAction* m_front = nullptr;
78 QAction* m_back = nullptr;
79 QAction* m_left = nullptr;
80 QAction* m_right = nullptr;
81 QAction* m_settings = nullptr;
82 QActionGroup* m_view_mode_group = nullptr;
83 QActionGroup* m_view_location_group = nullptr;
84 bool m_is_relative_combo = false;
85 bool m_has_pending = false;
86 bool m_include_combo = true;
87 };
88}
89#endif
#define NDEVR_API
Definition DLLInfo.h:50
Definition ACIColor.h:37