NDEVR
API Documentation
LayerWidget.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: LayerWidget
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/QTModelManager.h>
35#include <NDEVR/QTDesignObject.h>
36#include <QAbstractItemModel>
37#include <QIcon>
38#include <QWidget>
39namespace Ui
40{
41 class LayerWidgetUI;
42}
43namespace NDEVR
44{
45 class LayerTable;
46
50 class NDEVR_API LayerWidget : public QWidget
51 {
52 Q_OBJECT
53 public:
59 LayerWidget(QTModelManager* manager, QWidget *parent = nullptr);
64 LayerWidget(QWidget* parent = nullptr);
74 void setCurrentLayer(UUID layer);
84 protected slots:
90 void objectsSelectedSlot(Buffer<UUID> objects, bool selected);
104 signals:
109 protected:
117 void init();
123 bool event(QEvent* ev) override;
124 protected:
129 Ui::LayerWidgetUI* ui;
130 };
131}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Definition Pointer.hpp:356
A table showing a list of Layers.
Definition LayerTable.h:9
QTModelManager * m_manager
The model manager providing layer data.
void currentLayerDeletedSlot()
Slot called when the current layer is deleted from the scene.
Dictionary< UUID, UUID > m_layer_material_lookup
Maps layer UUIDs to their material UUIDs.
void setModelManager(QTModelManager *manager)
Sets the model manager used to populate layer data.
void layerSelectedSlot(UUID layer)
Slot called when a layer is selected in the layer table.
void clearCurrentLayer()
Clears the current layer selection so no layer is active.
void updateWidget()
Refreshes the widget display to reflect the current layer state.
LayerWidget(QTModelManager *manager, QWidget *parent=nullptr)
Constructs a LayerWidget with the given model manager.
LayerWidget(QWidget *parent=nullptr)
Constructs a LayerWidget without a model manager.
void objectsSelectedSlot(Buffer< UUID > objects, bool selected)
Slot called when objects are selected or deselected in the scene.
void currentLayerUpdatedSlot()
Slot called when the current layer's properties are updated.
bool event(QEvent *ev) override
Handles events, including language change events for retranslation.
LayerTable * m_layer_table
The layer table widget for layer selection.
Ui::LayerWidgetUI * ui
The auto-generated UI form for the widget.
DynamicPointer< QTDesignObject > m_current_layer
The currently active layer design object.
void init()
Initializes the widget layout and connects signals.
void currentLayerChangedSignal()
Emitted when the current active layer changes.
DynamicPointer< QTDesignObject > currentLayer() const
Returns the currently active layer design object.
void setCurrentLayer(UUID layer)
Sets the currently active layer by UUID.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.