API Documentation
Loading...
Searching...
No Matches
DeploymentCharts.h
Go to the documentation of this file.
1#pragma once
2#include <NDEVR/NDEVRChart.h>
3#if NDEVR_DEPLOYMENT
4#include <NDEVR/Deployment.h>
5#include <NDEVR/SnapLocation.h>
6namespace NDEVR
7{
8 class Deployment;
9 /**--------------------------------------------------------------------------------------------------
10 \brief A chart that plots a Deployment object as a round 2D target based on a desired end-point
11 **/
12 class TopDownDeploymentChart : public NDEVRRadialChart
13 {
14 public:
15 TopDownDeploymentChart(QWidget* parent = nullptr);
16 void updateData(const Buffer<Deployment>& deployments, bool align_with_hole);
17 void updateData(const Buffer<Deployment>& deployments, const Matrix<fltp08>& transform);
18 protected:
19 void addDeployment(const Deployment& deployment, const TranslatedString& point_names, const Matrix<fltp08>& transform, QPen pen);
20 protected:
21 Buffer<UUID> m_deployment_ids;
22 };
23 /**--------------------------------------------------------------------------------------------------
24 \brief A chart that plots a Deployment object from the side as a square plot.
25 **/
26 class SideViewDeploymentChart : public NDEVRChart
27 {
28 Q_OBJECT
29 public:
30 explicit SideViewDeploymentChart(QWidget* parent = nullptr);
31 void updateData(const Buffer<Deployment>& deployments, SnapLocation snap_location);
32 void updateData(const Buffer<Deployment>& deployments, const Matrix<fltp08>& transform);
33 void setLockedAxes(bool locked_axes);
34 bool hasLockedAxes() const;
35 signals:
36 void onDeploymentClickedSignal(const UUID& deployment, uint04 segment_index);
37 void onDeploymentHoveredSignal(const UUID& deployment, uint04 segment_index, bool hovered);
38 private slots:
39 void clickedSlot(const PlotData& plot_data, Vertex<3, fltp08> vertex);
40 void hoveredSlot(const PlotData& plot_data, Vertex<3, fltp08> vertex, bool hovered);
41 protected:
42 void drawOriginAxis(fltp08 size);
43 void addDeployment(const Deployment& deployment, const String& point_names, const Matrix<fltp08>& transform, QPen pen);
44 protected:
45 QValueAxis* m_bot_axis;
46 QValueAxis* m_left_axis;
47 Buffer<UUID> m_deployment_ids;
48 bool m_is_updating_chart = false;
49 };
50}
51#endif
Definition ACIColor.h:37