NDEVR
API Documentation
GNSSStakeoutWidget.h
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_NAVIGATION_MARKER_MODEL
4#include <NDEVR/ContextMenuManager.h>
5#include <NDEVR/NavigationMarkerModel.h>
6#include <NDEVR/PointMeasureModel.h>
7#include <QWidget>
8namespace Ui
9{
10 class GNSSStakeoutWidgetUI;
11}
12namespace NDEVR
13{
15 enum StakeoutFollowMode
16 {
17 e_top_north_over_arrow
18 , e_top_north_over_target_and_arrow
19 , e_top_heading_over_arrow
20 , e_top_heading_over_target_and_arrow
21 , e_iso_heading_over_arrow
22 , e_iso_heading_over_target_and_arrow
23 };
24 class StationModel;
27 class GPS_INTERFACE_API GNSSStakeoutWidget : public QWidget, public ContextMenuCallback
28 {
29 Q_OBJECT
30 public:
34 GNSSStakeoutWidget(QTModelManager* manager, QWidget* parent = nullptr);
37 void navigateToTarget(const UUID& target);
40 void navigateToTarget(const Vertex<3, fltp08>& location);
43 void setGNSSSensor(UUID sensor);
49 void addContextMenuItems(QTModelManager* manager, QMenu& menu, const Buffer<UUID>& ids, const SelectionInfo& cursor_location) final override;
56 void contextMenu(QTModelManager* manager, QAction* action, const Buffer<UUID>& ids, const SelectionInfo& cursor_location, PopupInfo origin) final override;
60 void ensureModelsAdded(bool ensure_navigation, bool ensure_target);
63 void setNavigationModel(const NavigationMarkerModel& model);
64 protected:
67 void _navigateToTarget(const Vertex<3, fltp08>& location);
69 void init();
73 StationModel createStationAtLocation(const Vertex<3, fltp08>& location) const;
75 void updateUIFromModel();
76 protected slots:
78 void onTargetUpdatedSlot();
80 void onGNSSUpdatedSlot();
81 signals:
83 void requestVisibleSignal();
84 protected:
85 NavigationMarkerModel m_navigation_model;
86 PointMeasureModel m_target_point;
87 Ui::GNSSStakeoutWidgetUI* ui;
88 QTModelManager* m_manager;
89 UUID m_target_id = Constant<UUID>::Invalid;
90 Time m_last_sound_time = Time(0);
91 QAction* m_stakeout_point = nullptr;
92 bool m_has_set_target = false;
93 bool m_ignore_elevation = true;
94 };
95}
96#endif
Allows for customization of what is shown when the user right-clicks or accesses the ContextMenu for ...
The primary namespace for the NDEVR SDK.