Debian Codegraph @

plugins/core/Standard/qMPlane/src/ccMPlaneDlg.h

raw
1 #pragma once
2
3 //##########################################################################
4 //# #
5 //# CLOUDCOMPARE PLUGIN: qMPlane #
6 //# #
7 //# This program is free software; you can redistribute it and/or modify #
8 //# it under the terms of the GNU General Public License as published by #
9 //# the Free Software Foundation; version 2 of the License. #
10 //# #
11 //# This program is distributed in the hope that it will be useful, #
12 //# but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 //# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 //# GNU General Public License for more details. #
15 //# #
16 //# COPYRIGHT: AIT Austrian Institute of Technology GmbH #
17 //# #
18 //##########################################################################
19
20 //Qt
21 #include <qtablewidget.h>
22 #include <qradiobutton.h>
23 #include <qcheckbox.h>
24
25 //CC
26 #include <ccOverlayDialog.h>
27
28 //Local
29 #include <ui_mplaneDlg.h>
30
31 // REMOVE!!!
32 #include "ccMainAppInterface.h"
33 //class encapsulating the map-mode overlay dialog
34 class ccMPlaneDlg : public ccOverlayDialog, public Ui::MPlaneDialog
35 {
36 Q_OBJECT
37
38 public:
39 //! Default constructor
40 explicit ccMPlaneDlg(QWidget* parent = nullptr);
41
42 // Point Fitting
43 void initializeFittingPointTable();
44 void addFittingPoint(int rowIndex, const CCVector3& point);
45 void selectFittingPoint(unsigned int rowIndex);
46 void clearFittingPoints();
47
48 // Distance Measurement
49 void addMeasurementPoint(const QString& name, float distance);
50 void renameMeasurement(const QString& name, unsigned int rowIndex);
51 void enableMeasurementTab(bool enable);
52 void clearMeasurementPoints();
53 bool isSignedMeasurement() const;
54 bool isNormalVectorChecked() const;
55
56 private:
57 void createPlaneFittingTab();
58 void createMeasurementTab();
59 int getFittingPointContentWidth() const;
60 int getFittingPointTableWidth() const;
61 QPushButton* createDeleteButton();
62
63 protected slots:
64 void onMeasurementPointNameChanged(QTableWidgetItem *item);
65 void onCloseButtonPressed();
66 void onTabChanged(int tab);
67 void onRadioButtonClicked();
68 void onDeleteButtonClicked();
69 void onShowNormalCheckBox(bool checked);
70 void onSaveButtonClicked();
71
72 Q_SIGNALS:
73 void signalMeasureNameChanged(QTableWidgetItem *item);
74 void signalCloseButtonPressed();
75 void signalFittingPointClicked(int index);
76 void signalTabChanged(int tab);
77 void signalMeasurementModeChanged();
78 void signalFittingPointDelete(int index);
79 void signalShowNormalCheckBoxClicked(bool checked);
80 void signalSaveButtonClicked();
81
82 private:
83 QTabWidget *m_tabWidget = nullptr;
84
85 // Point Selection Tab
86 QWidget *m_tabPlaneFitting = nullptr;
87 QTableWidget *m_pointTableWidget = nullptr;
88 unsigned int m_pointTableMinWidth = 0;
89 unsigned int m_pointTableMinHeight = 0;
90
91 // Measurement Tab
92 QWidget *m_tabMeasurement = nullptr;
93 QTableWidget *m_measurementTableWidget = nullptr;
94 QRadioButton *m_radioButtonSignedMeasurement = nullptr;
95 QRadioButton *m_radioButtonUnsignedMeasurement = nullptr;
96 QCheckBox *m_checkBoxShowNormal = nullptr;
97 };