ExampleIOPlugin.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. //##########################################################################
  2. //# #
  3. //# CLOUDCOMPARE PLUGIN: ExampleIOPlugin #
  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 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: CloudCompare project #
  15. //# #
  16. //##########################################################################
  17. #pragma once
  18. #include "ccIOPluginInterface.h"
  19. /** Replace 'ExampleIOPlugin' by your own plugin class name throughout and then
  20. check 'ExampleIOPlugin.cpp' for more directions.
  21. Each plugin requires an info.json file to provide information about itself -
  22. the name, authors, maintainers, icon, etc..
  23. The one method you are required to implement is getFilters(). This method
  24. registers your file I/O methods with CloudCompare.
  25. **/
  26. //! Example I/O Plugin
  27. class ExampleIOPlugin : public QObject, public ccIOPluginInterface
  28. {
  29. Q_OBJECT
  30. Q_INTERFACES( ccPluginInterface ccIOPluginInterface )
  31. Q_PLUGIN_METADATA( IID "cccorp.cloudcompare.plugin.ExampleIO" FILE "../info.json" )
  32. public:
  33. explicit ExampleIOPlugin( QObject *parent = nullptr );
  34. ~ExampleIOPlugin() override = default;
  35. void registerCommands( ccCommandLineInterface *cmd ) override;
  36. // Inherited from ccIOPluginInterface
  37. ccIOPluginInterface::FilterList getFilters() override;
  38. };