| 1 |
//########################################################################## |
| 2 |
//# # |
| 3 |
//# CLOUDCOMPARE PLUGIN: qCork # |
| 4 |
//# # |
| 5 |
//# This program is free software; you can redistribute it and/or modify # |
| 6 |
//# it under the terms of the GNU General Public License as published by # |
| 7 |
//# the Free Software Foundation; version 2 or later of the License. # |
| 8 |
//# # |
| 9 |
//# This program is distributed in the hope that it will be useful, # |
| 10 |
//# but WITHOUT ANY WARRANTY; without even the implied warranty of # |
| 11 |
//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # |
| 12 |
//# GNU General Public License for more details. # |
| 13 |
//# # |
| 14 |
//# COPYRIGHT: Daniel Girardeau-Montaut # |
| 15 |
//# # |
| 16 |
//########################################################################## |
| 17 |
|
| 18 |
#ifndef Q_CORK_PLUGIN_HEADER |
| 19 |
#define Q_CORK_PLUGIN_HEADER |
| 20 |
|
| 21 |
//Qt |
| 22 |
#include <QObject> |
| 23 |
|
| 24 |
#include "ccStdPluginInterface.h" |
| 25 |
|
| 26 |
class QAction; |
| 27 |
|
| 28 |
//! Mes Boolean Operations (CSG) plugin |
| 29 |
/** This plugin is based on Cork: https://github.com/gilbo/cork |
| 30 |
Required implementation is CC's dedicated fork: https://github.com/cloudcompare/cork |
| 31 |
**/ |
| 32 |
class qCork : public QObject, public ccStdPluginInterface |
| 33 |
{ |
| 34 |
Q_OBJECT |
| 35 |
Q_INTERFACES( ccPluginInterface ccStdPluginInterface ) |
| 36 |
|
| 37 |
Q_PLUGIN_METADATA( IID "cccorp.cloudcompare.plugin.qCork" FILE "../info.json" ) |
| 38 |
|
| 39 |
public: |
| 40 |
|
| 41 |
//! Default constructor |
| 42 |
explicit qCork(QObject* parent = nullptr); |
| 43 |
|
| 44 |
//inherited from ccStdPluginInterface |
| 45 |
virtual void onNewSelection(const ccHObject::Container& selectedEntities); |
| 46 |
virtual QList<QAction *> getActions() override; |
| 47 |
|
| 48 |
protected: |
| 49 |
|
| 50 |
//! Starts main action |
| 51 |
void doAction(); |
| 52 |
|
| 53 |
protected: |
| 54 |
|
| 55 |
//! Associated action |
| 56 |
QAction* m_action; |
| 57 |
}; |
| 58 |
|
| 59 |
#endif //Q_CORK_PLUGIN_HEADER |