33#include <NDEVR/QTModelManager.h>
34#if NDEVR_VIEWPORT && NDEVR_MEASURE_MODELS
35#include <NDEVR/MouseController.h>
36#include <NDEVR/MeasurementManager.h>
37#include <NDEVR/FileFormat.h>
42 class MeasurementToolsUI;
55 class NDEVR_API MeasurementCommandsWidget :
public QWidget
64 MeasurementCommandsWidget(QTModelManager* manager, QWidget* parent =
nullptr);
68 ~MeasurementCommandsWidget();
73 void setupRibbonStep(RibbonGroup* group);
79 void setupRibbon(RibbonGroup* group,
bool setup_start_end);
85 void setDefaultExportFormat(
const FileFormat& format,
bool select_current_by_default =
true);
90 void setControl(MeasurementManager::MeasureMode mode);
95 void setControlEnabled(
bool enabled);
104 void hideEvent(QHideEvent* event)
override;
109 void showEvent(QShowEvent* event)
override;
114 MeasurementManager::MeasureMode mode()
const;
119 void setRootModel(
const Model& model);
125 bool canHandle(
const UUID&
id)
const;
130 UUID rootModelID()
const;
136 void refreshUI(
bool force);
142 StringView modeIcon(MeasurementManager::MeasureMode spec);
149 bool requestVisibleSignal(
bool visible);
154 void controlModeSet(MeasurementManager::MeasureMode mode);
159 void onPointCloudDistanceChange();
170 void setupRibbon(uint04 index, RibbonGroup* group);
172 Dictionary<MeasurementManager::MeasureMode, QPointer<QWidget>> m_custom_draw_widgets;
173 Buffer<DynamicPointer<MouseController>> m_mouse_controllers;
174 Buffer<Buffer<Button*>> m_mode_buttons;
175 Buffer<Buffer<Button*>> m_step_buttons;
176 Buffer<Buffer<Buffer<QAction*>>> m_step_actions;
177 Buffer<Button*> m_export_buttons;
178 Buffer<Button*> m_clear_buttons;
179 Buffer<Button*> m_new_buttons;
180 Buffer<uint04> m_key_draw_action_indices;
181 MeasurementManager m_geometry_controller;
182 QTModelManager* m_manager;
183 Ui::MeasurementToolsUI* ui;
184 QTResourceListener* m_enabled_listener;
187 MeasurementManager::MeasureMode m_last_mode;
188 FileFormat m_default_export_format;
192 bool m_export_current_by_default;
A ResourceListener which will always be executed on the main UI thread and can be tied to a Qt Object...
Represents the "Tab" of a widget.
The UI ribbon is a horizontal menu bar typically located at the top of the application interface or a...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...