NDEVR
API Documentation
DatasetView.h
1#pragma once
2#include "DLLInfo.h"
3#include "NDEVR/String.h"
4#include "NDEVR/QTModelManager.h"
5#include "NDEVR/QCustomDockWidget.h"
6#include "NDEVR/PopupManager.h"
7#include "NDEVR/CameraView.h"
8#include "NDEVR/ProgressWidget.h"
9#include "NDEVR/AutoModelFileDialog.h"
10#include "NDEVR/SceneTreeWidget.h"
11#include "NDEVR/MeasurementCommandsWidget.h"
12#include <NDEVR/DesignObjectDialog.h>
13namespace NDEVR
14{
15 class File;
16 class Button;
17 class QTImageEditor;
18 class ImageView;
20 class SceneTreeWidget;
21 class SelectionWidget;
32 class NDEVR_API DatasetView : public ContainerWidget, public PopupManager
33 {
34 Q_OBJECT
35 public:
40 DatasetView(QTModelManager* model_manager);
46 void downloadDataset(const StringView& dataset, bool force_download);
67 void setTreeButtonVisible(bool visible);
72 void setBackButtonVisible(bool visible);
77 void setSaveButtonVisible(bool visible);
82 void setMeasurementVisible(bool visible);
87 void makeReadOnly(bool read_only);
92 void onSelected(const UUID& id);
133 virtual ContainerWidgetBase* container() const override;
138 void showNon3DData(const File& f);
139 signals:
149 protected:
153 void init();
154 protected:
168 bool m_is_read_only = false;
169 bool m_hide_tree_button = false;
170 bool m_hide_back_button = false;
172 bool m_hide_export_button = false;
173 };
174
175
176}
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
The root class that manages a series of SectionContent that can share the same space or lay out in va...
ContainerWidget(QWidget *parent=nullptr)
Constructs a ContainerWidget with the given parent widget.
DockWidget< MeasurementCommandsWidget > * measurementDock()
Returns the measurement commands dock widget.
void setMeasurementVisible(bool visible)
Sets whether the measurement tools panel is visible.
void init()
Initializes the UI layout, creating dock widgets and buttons.
DockWidget< ImageView > * m_image_view
Dock widget for image viewing.
virtual ContainerWidgetBase * container() const override
Returns the base container widget for layout management.
DockWidget< DownloadDatasetWidget > * m_progress
Dock widget for download progress.
DockWidget< AutoModelFileDialog > * m_save_dialog
Dock widget for save/export dialog.
bool m_hide_measurement_button
Whether the measurement button is hidden.
DesignObjectDialogLookup * m_dialog_lookup
Lookup for design object property dialogs.
bool m_hide_back_button
Whether the back button is hidden.
DropArea dropArea() const
Returns the drop area configuration for this widget.
DockWidget< SceneTreeWidget > * m_scene_tree_dock
Dock widget for the scene tree.
void onSelected(const UUID &id)
Handles selection of a design object by its UUID.
DockWidget< DownloadDatasetWidget > * progressDock()
Returns the download progress dock widget.
Button * m_back_button
Button for back navigation.
Buffer< Model > loadFile(const File &f)
Loads a file into the scene and returns the resulting models.
void backButtonPressedSignal()
Emitted when the back button is pressed.
DockWidget< CameraView > * m_view
Dock widget for the 3D camera view.
void setSaveButtonVisible(bool visible)
Sets whether the save/export button is visible.
DockWidget< MeasurementCommandsWidget > * m_measurement_command_widget
Dock widget for measurement tools.
void setTreeButtonVisible(bool visible)
Sets whether the scene tree toggle button is visible.
bool m_hide_tree_button
Whether the tree toggle button is hidden.
File cacheLocation(StringView dataset) const
Returns the local cache file location for a given dataset.
void setBackButtonVisible(bool visible)
Sets whether the back navigation button is visible.
bool m_is_read_only
Whether the view is in read-only mode.
void downloadDataset(const StringView &dataset, bool force_download)
Downloads a dataset from the specified source.
void onDownloadedSignal(File f)
Emitted when a dataset has been downloaded successfully.
Button * m_measurement_button
Button to toggle measurement tools.
Button * m_tree_button
Button to toggle the scene tree panel.
bool m_hide_export_button
Whether the export/save button is hidden.
void makeReadOnly(bool read_only)
Sets the view to read-only mode, disabling editing operations.
DockWidget< QTImageEditor > * m_image_editor
Dock widget for the image editor.
void addCustomDockWidget(QCustomDockWidget *widget)
Adds a widget to be docked in the default location when a project has been loaded.
void showNon3DData(const File &f)
Displays non-3D data (e.g., images or documents) from the given file.
DockWidget< AutoModelFileDialog > * saveDialog()
Returns the save/export dialog dock widget.
QTModelManager * m_model_manager
The model manager providing scene data.
Button * m_save_button
Button to open the save/export dialog.
DockWidget< CameraView > * view()
Returns the 3D camera view dock widget.
void showMainScreen()
Shows the main screen layout with the 3D view and associated panels.
DatasetView(QTModelManager *model_manager)
Constructs a DatasetView with the given model manager.
DockWidget< SceneTreeWidget > * sceneTree()
Returns the scene tree dock widget.
Manages the creation and lookup of DesignObjectDialog instances for design objects.
A type-safe dock widget that wraps a specific widget type.
A popup that is shown when a remote project is being downloaded.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
A widget that shows a raster image or icon.
Definition ImageView.h:44
PopupManager()
Constructs a PopupManager.
Provides a wrapper for a widget that can be docked inside a Container or floated as a top-level windo...
QWidget * widget(uint04 index) const
Returns the widget at the given index.
A full-featured image editor widget with drawing tools, undo/redo, and image manipulation.
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
A container widget that wraps a SceneTree with an optional ribbon toolbar for buttons.
A widget that displays controls and information for the currently selected design objects.
The core String View class for the NDEVR API.
Definition StringView.h:58
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.
DropArea
relates where a widget should be dropped relative to another.
Definition RibbonArea.h:46