Permalink
Browse files

COMP: Remove ModuleTemplate and use LoadableExtensionTemplate instead

See #2260 / http://na-mic.org/Bug/view.php?id=2260

git-svn-id: http://svn.slicer.org/Slicer4/trunk@20529 3bd1e089-480b-0410-8dfb-8563597acbee
  • Loading branch information...
1 parent f54194d commit 422883692ff1eaec6a4cf38e7881082d552c630b @jcfr jcfr committed Jun 30, 2012
Showing with 13 additions and 655 deletions.
  1. +1 −1 Extensions/Testing/LoadableExtensionTemplate/Logic/vtkSlicerLoadableExtensionTemplateLogic.cxx
  2. +1 −1 ...g/SuperBuildLoadableExtensionTemplate/Logic/vtkSlicerSuperBuildLoadableExtensionTemplateLogic.cxx
  3. +0 −3 Modules/Loadable/CMakeLists.txt
  4. +2 −2 Modules/Loadable/Cameras/Logic/vtkSlicerCamerasModuleLogic.cxx
  5. +2 −2 Modules/Loadable/Data/Logic/vtkSlicerDataModuleLogic.cxx
  6. +1 −1 Modules/Loadable/Data/qSlicerDataModule.cxx
  7. +2 −4 Modules/Loadable/Data/qSlicerDataModuleWidget.cxx
  8. +0 −60 Modules/Loadable/ModuleTemplate/CMakeLists.txt
  9. +0 −6 Modules/Loadable/ModuleTemplate/Documentation/ModuleTemplate.dox
  10. +0 −26 Modules/Loadable/ModuleTemplate/Logic/CMakeLists.txt
  11. +0 −81 Modules/Loadable/ModuleTemplate/Logic/vtkSlicerModuleTemplateLogic.cxx
  12. +0 −65 Modules/Loadable/ModuleTemplate/Logic/vtkSlicerModuleTemplateLogic.h
  13. BIN Modules/Loadable/ModuleTemplate/Resources/Icons/ModuleTemplate.png
  14. +0 −59 Modules/Loadable/ModuleTemplate/Resources/UI/qSlicerModuleTemplateModule.ui
  15. +0 −5 Modules/Loadable/ModuleTemplate/Resources/qSlicerModuleTemplateModule.qrc
  16. +0 −1 Modules/Loadable/ModuleTemplate/Testing/CMakeLists.txt
  17. +0 −22 Modules/Loadable/ModuleTemplate/Testing/Cxx/CMakeLists.txt
  18. +0 −118 Modules/Loadable/ModuleTemplate/qSlicerModuleTemplateModule.cxx
  19. +0 −78 Modules/Loadable/ModuleTemplate/qSlicerModuleTemplateModule.h
  20. +0 −62 Modules/Loadable/ModuleTemplate/qSlicerModuleTemplateModuleWidget.cxx
  21. +0 −54 Modules/Loadable/ModuleTemplate/qSlicerModuleTemplateModuleWidget.h
  22. +0 −1 Utilities/Doxygen/Doxyfile.txt.in
  23. +4 −3 Utilities/Scripts/ModuleWizard.py
@@ -15,7 +15,7 @@
==============================================================================*/
-// ModuleTemplate includes
+// LoadableExtensionTemplate Logic includes
#include "vtkSlicerLoadableExtensionTemplateLogic.h"
// MRML includes
@@ -15,7 +15,7 @@
==============================================================================*/
-// ModuleTemplate includes
+// SuperBuildLoadableExtensionTemplate Logic includes
#include "vtkSlicerSuperBuildLoadableExtensionTemplateLogic.h"
// MRML includes
@@ -28,9 +28,6 @@ if(Slicer_BUILD_CLI_SUPPORT)
CropVolume
)
endif()
-if(BUILD_TESTING)
- list(APPEND qtmodules ModuleTemplate)
-endif()
foreach(module ${qtmodules})
list(FIND Slicer_QTLOADABLEMODULES_DISABLED ${module} _module_disabled)
@@ -18,7 +18,7 @@
==============================================================================*/
-// ModuleTemplate includes
+// Cameras Logic includes
#include "vtkSlicerCamerasModuleLogic.h"
// MRML includes
@@ -31,7 +31,7 @@
#include <vtkNew.h>
// STD includes
-#include <cassert>
+#include <cassert>
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkSlicerCamerasModuleLogic);
@@ -19,7 +19,7 @@
==============================================================================*/
-// ModuleTemplate includes
+// Data Logic includes
#include "vtkSlicerDataModuleLogic.h"
// MRML includes
@@ -29,7 +29,7 @@
#include <vtkNew.h>
// STD includes
-#include <cassert>
+#include <cassert>
//----------------------------------------------------------------------------
vtkStandardNewMacro(vtkSlicerDataModuleLogic);
@@ -40,7 +40,7 @@
// SlicerLogic includes
#include <vtkSlicerApplicationLogic.h>
-// ModuleTemplate includes
+// Data Logic includes
#include "vtkSlicerDataModuleLogic.h"
// Logic includes
@@ -18,15 +18,13 @@
==============================================================================*/
-// Qt includes
-
// SlicerQt includes
#include "qSlicerDataModuleWidget.h"
#include "ui_qSlicerDataModule.h"
#include "qSlicerApplication.h"
#include "qSlicerIOManager.h"
-// ModuleTemplate includes
+// Data Logic includes
#include "vtkSlicerDataModuleLogic.h"
// SlicerLibs includes
@@ -67,7 +65,7 @@ qSlicerDataModuleWidgetPrivate::logic() const
{
Q_Q(const qSlicerDataModuleWidget);
return vtkSlicerDataModuleLogic::SafeDownCast(q->logic());
-}
+}
//-----------------------------------------------------------------------------
qSlicerDataModuleWidget::qSlicerDataModuleWidget(QWidget* parentWidget)
@@ -1,60 +0,0 @@
-
-#-----------------------------------------------------------------------------
-set(MODULE_NAME "ModuleTemplate") # Do not use 'project()'
-set(MODULE_TITLE "Module Template")
-
-string(TOUPPER ${MODULE_NAME} MODULE_NAME_UPPER)
-
-#-----------------------------------------------------------------------------
-add_subdirectory(Logic)
-
-#-----------------------------------------------------------------------------
-set(MODULE_EXPORT_DIRECTIVE "Q_SLICER_QTMODULES_${MODULE_NAME_UPPER}_EXPORT")
-
-# Additional includes - Current_{source,binary} and Slicer_{Libs,Base} already included
-set(MODULE_INCLUDE_DIRECTORIES
- ${CMAKE_CURRENT_SOURCE_DIR}/Logic
- ${CMAKE_CURRENT_BINARY_DIR}/Logic
- )
-
-set(MODULE_SRCS
- qSlicerModuleTemplateModule.cxx
- qSlicerModuleTemplateModule.h
- qSlicerModuleTemplateModuleWidget.cxx
- qSlicerModuleTemplateModuleWidget.h
- )
-
-set(MODULE_MOC_SRCS
- qSlicerModuleTemplateModule.h
- qSlicerModuleTemplateModuleWidget.h
- )
-
-set(MODULE_UI_SRCS
- Resources/UI/qSlicerModuleTemplateModule.ui
- )
-
-set(MODULE_TARGET_LIBRARIES
- vtkSlicerModuleTemplateModuleLogic
- )
-
-set(MODULE_RESOURCES
- Resources/qSlicerModuleTemplateModule.qrc
- )
-
-#-----------------------------------------------------------------------------
-slicerMacroBuildQtModule(
- NAME ${MODULE_NAME}
- TITLE ${MODULE_TITLE}
- EXPORT_DIRECTIVE ${MODULE_EXPORT_DIRECTIVE}
- INCLUDE_DIRECTORIES ${MODULE_INCLUDE_DIRECTORIES}
- SRCS ${MODULE_SRCS}
- MOC_SRCS ${MODULE_MOC_SRCS}
- UI_SRCS ${MODULE_UI_SRCS}
- TARGET_LIBRARIES ${MODULE_TARGET_LIBRARIES}
- RESOURCES ${MODULE_RESOURCES}
- )
-
-#-----------------------------------------------------------------------------
-if(BUILD_TESTING)
- add_subdirectory(Testing)
-endif()
@@ -1,6 +0,0 @@
-/**
-\defgroup Slicer_QtModules_ModuleTemplate ModuleTemplate
-\ingroup Slicer_QtModules
-This module allows to ...
-
-*/
@@ -1,26 +0,0 @@
-project(vtkSlicer${MODULE_NAME}ModuleLogic)
-
-set(KIT ${PROJECT_NAME})
-
-set(${KIT}_EXPORT_DIRECTIVE "VTK_SLICER_${MODULE_NAME_UPPER}_MODULE_LOGIC_EXPORT")
-
-set(${KIT}_INCLUDE_DIRECTORIES
- )
-
-set(${KIT}_SRCS
- vtkSlicerModuleTemplateLogic.cxx
- vtkSlicerModuleTemplateLogic.h
- )
-
-set(${KIT}_TARGET_LIBRARIES
- ${ITK_LIBRARIES}
- )
-
-#-----------------------------------------------------------------------------
-SlicerMacroBuildModuleLogic(
- NAME ${KIT}
- EXPORT_DIRECTIVE ${${KIT}_EXPORT_DIRECTIVE}
- INCLUDE_DIRECTORIES ${${KIT}_INCLUDE_DIRECTORIES}
- SRCS ${${KIT}_SRCS}
- TARGET_LIBRARIES ${${KIT}_TARGET_LIBRARIES}
- )
@@ -1,81 +0,0 @@
-/*==============================================================================
-
- Program: 3D Slicer
-
- Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
-
- See COPYRIGHT.txt
- or http://www.slicer.org/copyright/copyright.txt for details.
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-==============================================================================*/
-
-// ModuleTemplate includes
-#include "vtkSlicerModuleTemplateLogic.h"
-
-// MRML includes
-
-// VTK includes
-#include <vtkNew.h>
-
-// STD includes
-#include <cassert>
-
-//----------------------------------------------------------------------------
-vtkStandardNewMacro(vtkSlicerModuleTemplateLogic);
-
-//----------------------------------------------------------------------------
-vtkSlicerModuleTemplateLogic::vtkSlicerModuleTemplateLogic()
-{
-}
-
-//----------------------------------------------------------------------------
-vtkSlicerModuleTemplateLogic::~vtkSlicerModuleTemplateLogic()
-{
-}
-
-//----------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic::PrintSelf(ostream& os, vtkIndent indent)
-{
- this->Superclass::PrintSelf(os, indent);
-}
-
-//---------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic::SetMRMLSceneInternal(vtkMRMLScene * newScene)
-{
- vtkNew<vtkIntArray> events;
- events->InsertNextValue(vtkMRMLScene::NodeAddedEvent);
- events->InsertNextValue(vtkMRMLScene::NodeRemovedEvent);
- events->InsertNextValue(vtkMRMLScene::EndBatchProcessEvent);
- this->SetAndObserveMRMLSceneEventsInternal(newScene, events.GetPointer());
-}
-
-//-----------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic::RegisterNodes()
-{
- assert(this->GetMRMLScene() != 0);
-}
-
-//---------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic::UpdateFromMRMLScene()
-{
- assert(this->GetMRMLScene() != 0);
-}
-
-//---------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic
-::OnMRMLSceneNodeAdded(vtkMRMLNode* vtkNotUsed(node))
-{
-}
-
-//---------------------------------------------------------------------------
-void vtkSlicerModuleTemplateLogic
-::OnMRMLSceneNodeRemoved(vtkMRMLNode* vtkNotUsed(node))
-{
-}
-
@@ -1,65 +0,0 @@
-/*==============================================================================
-
- Program: 3D Slicer
-
- Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
-
- See COPYRIGHT.txt
- or http://www.slicer.org/copyright/copyright.txt for details.
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-==============================================================================*/
-
-// .NAME vtkSlicerModuleTemplateLogic - slicer logic class for volumes manipulation
-// .SECTION Description
-// This class manages the logic associated with reading, saving,
-// and changing propertied of the volumes
-
-
-#ifndef __vtkSlicerModuleTemplateLogic_h
-#define __vtkSlicerModuleTemplateLogic_h
-
-// Slicer includes
-#include "vtkSlicerModuleLogic.h"
-
-// MRML includes
-
-// STD includes
-#include <cstdlib>
-
-#include "vtkSlicerModuleTemplateModuleLogicExport.h"
-
-
-/// \ingroup Slicer_QtModules_ModuleTemplate
-class VTK_SLICER_MODULETEMPLATE_MODULE_LOGIC_EXPORT vtkSlicerModuleTemplateLogic :
- public vtkSlicerModuleLogic
-{
-public:
-
- static vtkSlicerModuleTemplateLogic *New();
- vtkTypeMacro(vtkSlicerModuleTemplateLogic,vtkSlicerModuleLogic);
- void PrintSelf(ostream& os, vtkIndent indent);
-
-protected:
- vtkSlicerModuleTemplateLogic();
- virtual ~vtkSlicerModuleTemplateLogic();
-
- virtual void SetMRMLSceneInternal(vtkMRMLScene * newScene);
- /// Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.
- virtual void RegisterNodes();
- virtual void UpdateFromMRMLScene();
- virtual void OnMRMLSceneNodeAdded(vtkMRMLNode* node);
- virtual void OnMRMLSceneNodeRemoved(vtkMRMLNode* node);
-private:
-
- vtkSlicerModuleTemplateLogic(const vtkSlicerModuleTemplateLogic&); // Not implemented
- void operator=(const vtkSlicerModuleTemplateLogic&); // Not implemented
-};
-
-#endif
-
Deleted file not rendered
Oops, something went wrong.

0 comments on commit 4228836

Please sign in to comment.