NDEVR
API Documentation
GeoReferenceDialog.h
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_VIEWPORT && NDEVR_STATION_MODEL
4#include <NDEVR/FactoryOptions.h>
5#include <NDEVR/Camera.h>
6#include <NDEVR/Pointer.h>
7#include <NDEVR/UUID.h>
8#include <NDEVR/Buffer.h>
9#include <QWidget>
10namespace Ui
11{
12 class GeoReferenceUI;
13}
14namespace NDEVR
15{
16 class QTModelManager;
17 class Scene;
18 class CameraView;
19 struct PopupInfo;
20 class GeoReferenceTable;
24 class NDEVR_API GeoReferenceImportOptionsMenu : public QWidget
25 {
26 Q_OBJECT
27 public:
35 GeoReferenceImportOptionsMenu(QTModelManager* manager, const Buffer<UUID>& import_items, bool has_scale, QWidget* parent = nullptr);
39 virtual ~GeoReferenceImportOptionsMenu() {};
40 signals:
44 void doneSignal();
45 protected:
46 QTModelManager* m_manager;
47 Buffer<UUID> m_import_items;
48 bool m_has_scale;
49 };
54 class NDEVR_API GeoReferenceDialog : public QWidget
55 {
56 Q_OBJECT
57 public:
62 GeoReferenceDialog(QWidget* parent = nullptr);
67 void setModelManager(QTModelManager* manager);
73 void setDatasetA(const Buffer<UUID>& dataset, bool set_other_to_inverse = true);
79 void setDatasetB(const Buffer<UUID>& dataset, bool auto_set_reference = true);
85 Scene referenceScene(uint01 scene) const;
89 void clearAll();
94 void removeReference(const UUID& id);
100 void removeReference(uint01 reference_index, uint01 station_index);
104 void clearPairStations();
109 Matrix<fltp08> calculateMergeMatrix() const;
115 void applyMatrix(uint01 reference_index, const Matrix<fltp08>& mat);
121 void createReferenceStationScene(uint01 reference_index, const Vertex<3, fltp08>& location);
127 uint04 nextStationReferenceIndex(uint01 reference_index) const;
134 bool hasSiblingStationReferenceIndex(uint01 reference_index, uint01 station_index) const;
139 void setupForCombinedPreview(bool preview_combined);
145 bool hasReferenceStation(const UUID& id) const;
151 String getReferenceLabel(uint01 reference_index) const;
152 public:
159 static void ProcessGeoReferenceImport(FactoryOptions::GeoReferenceProperties behavior, QTModelManager* manager, const Buffer<UUID>& import_items);
166 static void UserPlaceImport(QTModelManager* manager, const Buffer<UUID>& import_items, bool perform_scale);
173 static void UserGeoReference(QTModelManager* manager, const Buffer<UUID>& import_items, PopupInfo info);
174 signals:
179 void finishedSignal(bool accepted);
180 protected slots:
184 void orientationModeChangedSlot();
189 void objectDeletedSlot(const UUID& id);
190 protected:
194 void deleteStations();
199 void deleteStations(uint01 reference_index);
203 void init();
204 protected:
205 QTModelManager* m_manager;
206 Buffer<Vector<2, UUID>> m_stations;
207 mutable Vector<2, UUID> m_station_scene;
208 Vector<2, CameraView*> m_camera_views;
209 Vector<2, DynamicPointer<Camera>> m_cameras;
210 Vector<2, Buffer<UUID>> m_models;
211 GeoReferenceTable* m_table;
212 Matrix<fltp08> m_merge_matrix;
213 bool m_is_preview_applied = false;
214 Ui::GeoReferenceUI* ui;
215 };
216}
217#endif
A wrapper around DesignObjectLookup that provides signal and slot functionality and adds rendering ca...
The root Model that is responsible for storing the underlying data for all Scene Models.
Definition Scene.h:52
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...
Class which is used to pass arguments and requests for creating a popup dialog or widget.
Definition PopupInfo.h:16