diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake index 28366bf020..e3d3041ce1 100644 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake +++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/files.cmake @@ -1,98 +1,98 @@ SET(SRC_CPP_FILES QmitkDiffusionImagingAppApplication.cpp QmitkDiffusionImagingAppWorkbenchAdvisor.cpp ) SET(INTERNAL_CPP_FILES mitkPluginActivator.cpp QmitkDiffusionImagingAppIntroPart.cpp QmitkMasterView.cpp QmitkDiffusionImagingAppPerspective.cpp QmitkWelcomePerspective.cpp QmitkReconstructionPerspective.cpp QmitkTrackingPerspective.cpp QmitkFileImportPerspective.cpp QmitkQuantificationPerspective.cpp QmitkVolumeVisualizationPerspective.cpp QmitkDIAppConnectomicsPerspective.cpp QmitkDIAppDicomImportPerspective.cpp QmitkDIAppFiberTractographyPerspective.cpp QmitkDIAppIVIMPerspective.cpp QmitkDIAppPreprocessingReconstructionPerspective.cpp QmitkDIAppQuantificationPerspective.cpp QmitkDIAppScreenshotsMoviesPerspective.cpp QmitkDIAppTBSSPerspective.cpp QmitkDIAppVolumeVisualizationPerspective.cpp ) SET(UI_FILES src/internal/QmitkWelcomeScreenViewControls.ui src/internal/QmitkMasterViewControls.ui ) SET(MOC_H_FILES src/internal/QmitkDiffusionImagingAppIntroPart.h src/internal/mitkPluginActivator.h src/internal/QmitkReconstructionPerspective.h src/internal/QmitkTrackingPerspective.h src/internal/QmitkFileImportPerspective.h src/internal/QmitkQuantificationPerspective.h src/internal/QmitkVolumeVisualizationPerspective.h - src/internal/QmitkDiffusionImagingAppApplicationPlugin.h + #src/internal/QmitkDiffusionImagingAppApplicationPlugin.h src/internal/QmitkMasterView.h src/QmitkDiffusionImagingAppApplication.h src/internal/QmitkDiffusionImagingAppPerspective.h src/internal/QmitkWelcomePerspective.h src/internal/QmitkDIAppConnectomicsPerspective.h src/internal/QmitkDIAppDicomImportPerspective.h src/internal/QmitkDIAppFiberTractographyPerspective.h src/internal/QmitkDIAppIVIMPerspective.h src/internal/QmitkDIAppPreprocessingReconstructionPerspective.h src/internal/QmitkDIAppQuantificationPerspective.h src/internal/QmitkDIAppScreenshotsMoviesPerspective.h src/internal/QmitkDIAppTBSSPerspective.h src/internal/QmitkDIAppVolumeVisualizationPerspective.h ) SET(CACHED_RESOURCE_FILES # list of resource files which can be used by the plug-in # system without loading the plug-ins shared library, # for example the icon used in the menu and tabs for the # plug-in views in the workbench plugin.xml resources/icon_dicom.xpm resources/diffusionimaging.png resources/preprocessing.png resources/Measurement_48.png resources/volvis.png ) SET(QRC_FILES # uncomment the following line if you want to use Qt resources resources/welcome/QmitkWelcomeScreenView.qrc resources/org_mitk_gui_qt_diffusionimagingapp.qrc ) # SET(CPP_FILES) foreach(file ${SRC_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/${file}) endforeach(file ${SRC_CPP_FILES}) foreach(file ${INTERNAL_CPP_FILES}) SET(CPP_FILES ${CPP_FILES} src/internal/${file}) endforeach(file ${INTERNAL_CPP_FILES}) #----------- Qt Help Collection Project -------------# IF (BLUEBERRY_USE_QT_HELP) SET(_plugin_qhcp_input "${CMAKE_CURRENT_SOURCE_DIR}/documentation/MitkDiffusionImagingAppQtHelpCollectionProject.qhcp") SET(_plugin_qhcp_output "${PLUGIN_OUTPUT_DIR}/resources/MitkDiffusionImagingAppQtHelpCollection_${MBI_WC_REVISION_HASH}.qhc") ADD_CUSTOM_COMMAND(OUTPUT ${_plugin_qhcp_output} COMMAND ${QT_COLLECTIONGENERATOR_EXECUTABLE} ${_plugin_qhcp_input} -o ${_plugin_qhcp_output} DEPENDS ${_plugin_qhcp_input} ) SET(FILE_DEPENDENCIES ${_plugin_qhcp_output}) ENDIF() diff --git a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp index f722c0df2a..bdece26bfc 100644 --- a/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp +++ b/Modules/Bundles/org.mitk.gui.qt.diffusionimagingapp/src/internal/mitkPluginActivator.cpp @@ -1,157 +1,153 @@ /*========================================================================= Program: BlueBerry Platform Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "mitkPluginActivator.h" #include #include #include #include "src/QmitkDiffusionImagingAppApplication.h" #include "QmitkWelcomePerspective.h" #include "QmitkReconstructionPerspective.h" #include "QmitkTrackingPerspective.h" #include "QmitkFileImportPerspective.h" #include "QmitkQuantificationPerspective.h" #include "QmitkVolumeVisualizationPerspective.h" #include "src/internal/QmitkDiffusionImagingAppIntroPart.h" #include "src/internal/QmitkDiffusionImagingAppPerspective.h" #include "src/internal/QmitkMasterView.h" #include "src/internal/QmitkDIAppConnectomicsPerspective.h" #include "src/internal/QmitkDIAppDicomImportPerspective.h" #include "src/internal/QmitkDIAppFiberTractographyPerspective.h" #include "src/internal/QmitkDIAppIVIMPerspective.h" #include "src/internal/QmitkDIAppPreprocessingReconstructionPerspective.h" #include "src/internal/QmitkDIAppQuantificationPerspective.h" #include "src/internal/QmitkDIAppScreenshotsMoviesPerspective.h" #include "src/internal/QmitkDIAppTBSSPerspective.h" #include "src/internal/QmitkDIAppVolumeVisualizationPerspective.h" #include #include mitkPluginActivator* mitkPluginActivator::inst = 0; mitkPluginActivator::mitkPluginActivator() : pluginListener(0) { inst = this; } mitkPluginActivator::~mitkPluginActivator() { delete pluginListener; } mitkPluginActivator* mitkPluginActivator::GetDefault() { return inst; } void mitkPluginActivator::start(ctkPluginContext* context) { berry::AbstractUICTKPlugin::start(context); this->context = context; BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppApplication, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppIntroPart, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkMasterView, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppPerspective, context) -<<<<<<< HEAD - //BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkFileImportPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkReconstructionPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkQuantificationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkVolumeVisualizationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkTrackingPerspective, context) -======= BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppConnectomicsPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppDicomImportPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppFiberTractographyPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppIVIMPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppPreprocessingReconstructionPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppQuantificationPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppScreenshotsMoviesPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppTBSSPerspective, context) BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppVolumeVisualizationPerspective, context) ->>>>>>> bug-9122-diffusion-imaging-executable-and-OS // QString collectionFile = GetQtHelpCollectionFile(); // berry::QtAssistantUtil::SetHelpCollectionFile(collectionFile); // berry::QtAssistantUtil::SetDefaultHelpUrl("qthelp://org.mitk.gui.qt.diffusionimagingapp/bundle/index.html"); delete pluginListener; pluginListener = new berry::QCHPluginListener(context); context->connectPluginListener(pluginListener, SLOT(pluginChanged(ctkPluginEvent)), Qt::DirectConnection); // register all QCH files from all the currently installed plugins pluginListener->processPlugins(); } QString mitkPluginActivator::GetQtHelpCollectionFile() const { if (!helpCollectionFile.isEmpty()) { return helpCollectionFile; } QString collectionFilename; QString na("n/a"); // if (na != MITK_REVISION) // collectionFilename = "MitkDiffusionImagingAppQtHelpCollection_" MITK_REVISION ".qhc"; // else collectionFilename = "MitkDiffusionImagingAppQtHelpCollection.qhc"; QFileInfo collectionFileInfo = context->getDataFile(collectionFilename); QFileInfo pluginFileInfo = QFileInfo(QUrl(context->getPlugin()->getLocation()).toLocalFile()); if (!collectionFileInfo.exists() || pluginFileInfo.lastModified() > collectionFileInfo.lastModified()) { // extract the qhc file from the plug-in QByteArray content = context->getPlugin()->getResource(collectionFilename); if (content.isEmpty()) { BERRY_WARN << "Could not get plug-in resource: " << collectionFilename.toStdString(); } else { QFile file(collectionFileInfo.absoluteFilePath()); file.open(QIODevice::WriteOnly); file.write(content); file.close(); } } if (QFile::exists(collectionFileInfo.absoluteFilePath())) { helpCollectionFile = collectionFileInfo.absoluteFilePath(); } return helpCollectionFile; } Q_EXPORT_PLUGIN2(org_mitk_gui_qt_diffusionimagingapp, mitkPluginActivator)