NDEVR
API Documentation
CameraToolbar.h
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: CameraToolbar
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#if NDEVR_VIEWPORT
35#include <NDEVR/Camera.h>
36#include <NDEVR/Pointer.h>
37#include <QWidget>
38#include <QPointer>
39namespace Ui
40{
41 class CameraToolbarUI;
42}
43namespace NDEVR
44{
48 class QTModelManager;
51 class Button;
52 class Toolbar;
57 class NDEVR_API CameraToolbar : public QWidget
58 {
59 Q_OBJECT
60 public:
65 CameraToolbar(QWidget *parent = Q_NULLPTR);
74 void setManager(QTModelManager* manager);
79 void setCamera(const DynamicPointer<Camera>& camera);
84 void setTouchTheme(bool touch_theme);
89 void resizeEvent(QResizeEvent *resize_event) override;
95 void setSwapButton(bool show, const StringView& swap_button);
100 void addWidget(const QPointer<QWidget>& widget);
105 void addWidgetLeft(const QPointer<QWidget>& widget);
110 void removeWidget(const QPointer<QWidget>& widget);
116 public slots:
126 signals:
139 void linkSelected(bool selected);
140 private:
141 //QCustomDockWidget* m_lighting_editor;
142 QCustomDockWidget* m_mouse_editor;
143 QTResourceListener* m_selection_listener;
144 QTModelManager* m_model_manager;
145 DynamicPointer<Camera> m_camera;
146 Buffer<QPointer<QWidget>> m_left_widgets;
147 Ui::CameraToolbarUI* ui;
148 CameraLocationCombo* m_location_combo;
149 ColorChannelCombo* m_color_combo;
150 CameraActionCombo* m_action_combo;
151 bool m_has_location_widget;
152 bool m_touch_theme;
153 };
154}
155#endif
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A core widget that allows the user to click one of many button types.
Definition Button.h:68
Allows user to adjust the primary behavior of the mouse in the 3D view, such as enabling panning,...
Sets up a button to be a combobox with the various snap locations of a camera.
CameraToolbar(QWidget *parent=Q_NULLPTR)
Constructs a CameraToolbar.
void setTouchTheme(bool touch_theme)
Enables or disables touch-optimized theme for the toolbar.
void setCamera(const DynamicPointer< Camera > &camera)
Sets the camera this toolbar controls.
void linkSelected(bool selected)
Emitted when the link selection state changes.
void onColorComboChanged()
Slot invoked when the color channel combo selection changes.
~CameraToolbar()
Destructor.
void updateSelection(const SelectionInfo &info)
Slot invoked when the viewport selection changes.
void layerSelected()
Emitted when a layer is selected in the toolbar.
void swapRequestSignal()
Emitted when the user requests a camera swap.
void resizeEvent(QResizeEvent *resize_event) override
Handles resize events to adjust toolbar layout.
void removeWidget(const QPointer< QWidget > &widget)
Removes a widget from the toolbar.
void setIconSizeMultiplier(fltp04 size)
Sets a multiplier for the toolbar icon sizes.
void setSwapButton(bool show, const StringView &swap_button)
Shows or hides the swap button with the given icon.
void setManager(QTModelManager *manager)
Sets the model manager for this toolbar.
void addWidget(const QPointer< QWidget > &widget)
Adds a widget to the right side of the toolbar.
void addWidgetLeft(const QPointer< QWidget > &widget)
Adds a widget to the left side of the toolbar.
Allows the user to select a method to color a particular channel.
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
Provides a wrapper for a widget that can be docked inside a Container or floated as a top-level windo...
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
A ResourceListener which will always be executed on the main UI thread and can be tied to a Qt Object...
Definition QTTools.h:493
Responsible for turning a user interaction into a selection within a DesignObjectLookup.
Definition Selector.h:52
The core String View class for the NDEVR API.
Definition StringView.h:58
Class which displays progress and the current action being performed.
Definition Toolbar.h:15
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...