ctkVTKWidgetsPlugins.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.commontk.org/LICENSE
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkVTKWidgetsPlugins_h
  15. #define __ctkVTKWidgetsPlugins_h
  16. // Qt includes
  17. #include <QDesignerCustomWidgetCollectionInterface>
  18. // CTK includes
  19. #include "ctkVisualizationVTKWidgetsPluginsExport.h"
  20. #include "ctkVTKRenderViewPlugin.h"
  21. #include "ctkVTKScalarBarWidgetPlugin.h"
  22. #ifdef CTK_USE_CHARTS
  23. #include "ctkVTKScalarsToColorsViewPlugin.h"
  24. #endif
  25. #include "ctkVTKSliceViewPlugin.h"
  26. #include "ctkVTKTextPropertyWidgetPlugin.h"
  27. /// \class Group the plugins in one library
  28. class CTK_VISUALIZATION_VTK_WIDGETS_PLUGINS_EXPORT ctkVTKWidgetsPlugins :
  29. public QObject,
  30. public QDesignerCustomWidgetCollectionInterface
  31. {
  32. Q_OBJECT
  33. Q_INTERFACES(QDesignerCustomWidgetCollectionInterface);
  34. public:
  35. QList<QDesignerCustomWidgetInterface*> customWidgets() const
  36. {
  37. QList<QDesignerCustomWidgetInterface *> plugins;
  38. plugins << new ctkVTKRenderViewPlugin;
  39. plugins << new ctkVTKScalarBarWidgetPlugin;
  40. #ifdef CTK_USE_CHARTS
  41. plugins << new ctkVTKScalarsToColorsViewPlugin;
  42. #endif
  43. plugins << new ctkVTKSliceViewPlugin;
  44. plugins << new ctkVTKTextPropertyWidgetPlugin;
  45. return plugins;
  46. }
  47. };
  48. #endif