| 1 |
#pragma once |
| 2 |
|
| 3 |
//########################################################################## |
| 4 |
//# # |
| 5 |
//# CLOUDCOMPARE PLUGIN: qCloudLayers # |
| 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: WigginsTech 2022 # |
| 17 |
//# # |
| 18 |
//########################################################################## |
| 19 |
|
| 20 |
// local |
| 21 |
#include <ui_ccCloudLayersDlg.h> |
| 22 |
#include "ccAsprsModel.h" |
| 23 |
#include "ccCloudLayersHelper.h" |
| 24 |
|
| 25 |
//CC |
| 26 |
#include <ccOverlayDialog.h> |
| 27 |
|
| 28 |
class ccPointCloud; |
| 29 |
class ccMouseCircle; |
| 30 |
|
| 31 |
class ccCloudLayersDlg : public ccOverlayDialog, public Ui::ccCloudLayersDlg |
| 32 |
{ |
| 33 |
Q_OBJECT |
| 34 |
|
| 35 |
public: |
| 36 |
//! Default constructor |
| 37 |
explicit ccCloudLayersDlg(ccMainAppInterface* app, QWidget* parent = nullptr); |
| 38 |
|
| 39 |
//! Destructor |
| 40 |
virtual ~ccCloudLayersDlg(); |
| 41 |
|
| 42 |
//! inherited from ccOverlayDialog |
| 43 |
bool start() override; |
| 44 |
void stop(bool accepted) override; |
| 45 |
|
| 46 |
void setPointCloud(ccPointCloud* cloud); |
| 47 |
|
| 48 |
private: |
| 49 |
void resetUI(); |
| 50 |
void initTableView(); |
| 51 |
|
| 52 |
void saveSettings(); |
| 53 |
void loadSettings(); |
| 54 |
|
| 55 |
bool eventFilter(QObject* obj, QEvent* event) override; |
| 56 |
void reject() override; |
| 57 |
|
| 58 |
private Q_SLOTS: |
| 59 |
|
| 60 |
//! add new asprs item |
| 61 |
void addClicked(); |
| 62 |
|
| 63 |
//! delete select(ed) asprs item(s) |
| 64 |
void deleteClicked(); |
| 65 |
|
| 66 |
//! draw mouse circle |
| 67 |
void startClicked(); |
| 68 |
|
| 69 |
//! stop drawing mouse cirlce |
| 70 |
void pauseClicked(); |
| 71 |
|
| 72 |
//! apply changes and close dialog |
| 73 |
void applyClicked(); |
| 74 |
|
| 75 |
//! restore changes and close dialog |
| 76 |
void closeClicked(); |
| 77 |
|
| 78 |
void scalarFieldIndexChanged(int index); |
| 79 |
void inputClassIndexChanged(int index); |
| 80 |
void outputClassIndexChanged(int index); |
| 81 |
|
| 82 |
//! asprs model signals |
| 83 |
void codeChanged(ccAsprsModel::AsprsItem &item, int oldCode); |
| 84 |
void colorChanged(ccAsprsModel::AsprsItem &item); |
| 85 |
|
| 86 |
//! show color picker dialog |
| 87 |
void tableViewDoubleClicked(const QModelIndex &index); |
| 88 |
|
| 89 |
//! update input and output comboboxes |
| 90 |
void updateInputOutput(); |
| 91 |
void swapInputOutput(); |
| 92 |
|
| 93 |
void mouseMoved(int x, int y, Qt::MouseButtons buttons); |
| 94 |
|
| 95 |
private: |
| 96 |
ccMainAppInterface* m_app; |
| 97 |
ccAsprsModel m_asprsModel; |
| 98 |
ccCloudLayersHelper* m_helper; |
| 99 |
ccMouseCircle* m_mouseCircle; |
| 100 |
QList<QString> m_presets; |
| 101 |
}; |
| 102 |
|