diff --git a/Applications/Diffusion/CMakeLists.txt b/Applications/Diffusion/CMakeLists.txt index 3d7b42d903..a07c306ded 100644 --- a/Applications/Diffusion/CMakeLists.txt +++ b/Applications/Diffusion/CMakeLists.txt @@ -1,81 +1,80 @@ project(MitkDiffusion) set(DIFFUSIONAPP_NAME MitkDiffusion) set(_app_options) if(MITK_SHOW_CONSOLE_WINDOW) list(APPEND _app_options SHOW_CONSOLE) endif() # Create a cache entry for the provisioning file which is used to export # the file name in the MITKConfig.cmake file. This will keep external projects # which rely on this file happy. set(DIFFUSIONIMAGINGAPP_PROVISIONING_FILE "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DIFFUSIONAPP_NAME}.provisioning" CACHE INTERNAL "${DIFFUSIONAPP_NAME} provisioning file" FORCE) set(_plugins org.commontk.configadmin org.commontk.eventadmin org.blueberry.osgi org.blueberry.compat org.blueberry.core.runtime org.blueberry.core.expressions org.blueberry.solstice.common org.blueberry.core.commands org.blueberry.ui org.blueberry.ui.qt org.blueberry.ui.qt.log org.blueberry.ui.qt.help org.mitk.core.services org.mitk.gui.common org.mitk.planarfigure org.mitk.core.ext org.mitk.diffusionimaging org.mitk.gui.qt.application org.mitk.gui.qt.ext org.mitk.gui.qt.diffusionimagingapp org.mitk.gui.qt.common org.mitk.gui.qt.stdmultiwidgeteditor org.mitk.gui.qt.common.legacy org.mitk.gui.qt.datamanager org.mitk.gui.qt.measurementtoolbox org.mitk.gui.qt.segmentation org.mitk.gui.qt.volumevisualization org.mitk.gui.qt.diffusionimaging org.mitk.gui.qt.imagenavigator org.mitk.gui.qt.moviemaker org.mitk.gui.qt.basicimageprocessing org.mitk.gui.qt.registration org.mitk.gui.qt.properties - org.mitk.gui.qt.viewbrowser ) # Plug-ins listed below will not be # - added as a build-time dependency to the executable # - listed in the provisioning file for the executable # - installed if they are external plug-ins set(_exclude_plugins org.blueberry.test org.blueberry.uitest org.mitk.gui.qt.coreapplication org.mitk.gui.qt.extapplication ) FunctionCreateBlueBerryApplication( NAME ${DIFFUSIONAPP_NAME} DESCRIPTION "MITK Diffusion" PLUGINS ${_plugins} EXCLUDE_PLUGINS ${_exclude_plugins} ${_app_options} ) mitk_use_modules(TARGET ${DIFFUSIONAPP_NAME} MODULES qtsingleapplication) # Add meta dependencies (e.g. on auto-load modules from depending modules) if(ALL_META_DEPENDENCIES) add_dependencies(${DIFFUSIONAPP_NAME} ${ALL_META_DEPENDENCIES}) endif() # Add a build time dependency to legacy BlueBerry bundles. if(MITK_MODULES_ENABLED_PLUGINS) add_dependencies(${DIFFUSIONAPP_NAME} ${MITK_MODULES_ENABLED_PLUGINS}) endif() diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 6e8023607d..6abfe68531 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,58 +1,57 @@ # Plug-ins must be ordered according to their dependencies if (MITK_USE_Qt4) set(MITK_EXT_PLUGINS org.mitk.core.services:ON org.mitk.gui.common:ON org.mitk.planarfigure:ON org.mitk.core.ext:OFF org.mitk.core.jobs:OFF org.mitk.diffusionimaging:OFF org.mitk.simulation:OFF org.mitk.gui.qt.application:ON org.mitk.gui.qt.coreapplication:OFF org.mitk.gui.qt.ext:OFF org.mitk.gui.qt.extapplication:OFF org.mitk.gui.qt.common:ON org.mitk.gui.qt.stdmultiwidgeteditor:ON org.mitk.gui.qt.common.legacy:OFF org.mitk.gui.qt.cmdlinemodules:OFF org.mitk.gui.qt.diffusionimagingapp:OFF org.mitk.gui.qt.datamanager:ON org.mitk.gui.qt.datamanagerlight:OFF org.mitk.gui.qt.properties:ON org.mitk.gui.qt.basicimageprocessing:OFF org.mitk.gui.qt.dicom:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.dtiatlasapp:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.materialeditor:OFF org.mitk.gui.qt.measurementtoolbox:OFF org.mitk.gui.qt.moviemaker:OFF org.mitk.gui.qt.pointsetinteraction:OFF org.mitk.gui.qt.python:OFF org.mitk.gui.qt.registration:OFF org.mitk.gui.qt.remeshing:OFF org.mitk.gui.qt.segmentation:OFF org.mitk.gui.qt.simulation:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.ugvisualization:OFF org.mitk.gui.qt.ultrasound:OFF org.mitk.gui.qt.volumevisualization:OFF org.mitk.gui.qt.eventrecorder:OFF org.mitk.gui.qt.xnat:OFF - org.mitk.gui.qt.viewbrowser:ON ) else() set(MITK_EXT_PLUGINS # empty so far ) endif() diff --git a/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp b/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp index eac1ff4ca1..9396e649c3 100644 --- a/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp +++ b/Plugins/org.mitk.gui.qt.ext/src/QmitkExtWorkbenchWindowAdvisor.cpp @@ -1,1269 +1,1269 @@ /*=================================================================== The Medical Imaging Interaction Toolkit (MITK) Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See LICENSE.txt or http://www.mitk.org for details. ===================================================================*/ #include "QmitkExtWorkbenchWindowAdvisor.h" #include "QmitkExtActionBarAdvisor.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // UGLYYY #include "internal/QmitkExtWorkbenchWindowAdvisorHack.h" #include "internal/QmitkCommonExtPlugin.h" #include "mitkUndoController.h" #include "mitkVerboseLimitedLinearUndo.h" #include #include #include #include QmitkExtWorkbenchWindowAdvisorHack * QmitkExtWorkbenchWindowAdvisorHack::undohack = new QmitkExtWorkbenchWindowAdvisorHack(); QString QmitkExtWorkbenchWindowAdvisor::QT_SETTINGS_FILENAME = "QtSettings.ini"; class PartListenerForTitle: public berry::IPartListener { public: PartListenerForTitle(QmitkExtWorkbenchWindowAdvisor* wa) : windowAdvisor(wa) { } Events::Types GetPartEventTypes() const { return Events::ACTIVATED | Events::BROUGHT_TO_TOP | Events::CLOSED | Events::HIDDEN | Events::VISIBLE; } void PartActivated(berry::IWorkbenchPartReference::Pointer ref) { if (ref.Cast ()) { windowAdvisor->UpdateTitle(false); } } void PartBroughtToTop(berry::IWorkbenchPartReference::Pointer ref) { if (ref.Cast ()) { windowAdvisor->UpdateTitle(false); } } void PartClosed(berry::IWorkbenchPartReference::Pointer /*ref*/) { windowAdvisor->UpdateTitle(false); } void PartHidden(berry::IWorkbenchPartReference::Pointer ref) { if (!windowAdvisor->lastActiveEditor.Expired() && ref->GetPart(false) == windowAdvisor->lastActiveEditor.Lock()) { windowAdvisor->UpdateTitle(true); } } void PartVisible(berry::IWorkbenchPartReference::Pointer ref) { if (!windowAdvisor->lastActiveEditor.Expired() && ref->GetPart(false) == windowAdvisor->lastActiveEditor.Lock()) { windowAdvisor->UpdateTitle(false); } } private: QmitkExtWorkbenchWindowAdvisor* windowAdvisor; }; class PartListenerForImageNavigator: public berry::IPartListener { public: PartListenerForImageNavigator(QAction* act) : imageNavigatorAction(act) { } Events::Types GetPartEventTypes() const { return Events::OPENED | Events::CLOSED | Events::HIDDEN | Events::VISIBLE; } void PartOpened(berry::IWorkbenchPartReference::Pointer ref) { if (ref->GetId()=="org.mitk.views.imagenavigator") { imageNavigatorAction->setChecked(true); } } void PartClosed(berry::IWorkbenchPartReference::Pointer ref) { if (ref->GetId()=="org.mitk.views.imagenavigator") { imageNavigatorAction->setChecked(false); } } void PartVisible(berry::IWorkbenchPartReference::Pointer ref) { if (ref->GetId()=="org.mitk.views.imagenavigator") { imageNavigatorAction->setChecked(true); } } void PartHidden(berry::IWorkbenchPartReference::Pointer ref) { if (ref->GetId()=="org.mitk.views.imagenavigator") { imageNavigatorAction->setChecked(false); } } private: QAction* imageNavigatorAction; }; class PerspectiveListenerForTitle: public berry::IPerspectiveListener { public: PerspectiveListenerForTitle(QmitkExtWorkbenchWindowAdvisor* wa) : windowAdvisor(wa), perspectivesClosed(false) { } Events::Types GetPerspectiveEventTypes() const { return Events::ACTIVATED | Events::SAVED_AS | Events::DEACTIVATED // remove the following line when command framework is finished | Events::CLOSED | Events::OPENED; } void PerspectiveActivated(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer /*perspective*/) { windowAdvisor->UpdateTitle(false); } void PerspectiveSavedAs(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer /*oldPerspective*/, berry::IPerspectiveDescriptor::Pointer /*newPerspective*/) { windowAdvisor->UpdateTitle(false); } void PerspectiveDeactivated(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer /*perspective*/) { windowAdvisor->UpdateTitle(false); } void PerspectiveOpened(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer /*perspective*/) { if (perspectivesClosed) { QListIterator i(windowAdvisor->viewActions); while (i.hasNext()) { i.next()->setEnabled(true); } //GetViewRegistry()->Find("org.mitk.views.imagenavigator"); if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { windowAdvisor->openDicomEditorAction->setEnabled(true); } if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { windowAdvisor->openXnatEditorAction->setEnabled(true); } windowAdvisor->fileSaveProjectAction->setEnabled(true); windowAdvisor->closeProjectAction->setEnabled(true); windowAdvisor->undoAction->setEnabled(true); windowAdvisor->redoAction->setEnabled(true); windowAdvisor->imageNavigatorAction->setEnabled(true); windowAdvisor->resetPerspAction->setEnabled(true); if( windowAdvisor->GetShowClosePerspectiveMenuItem() ) { windowAdvisor->closePerspAction->setEnabled(true); } } perspectivesClosed = false; } void PerspectiveClosed(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer /*perspective*/) { berry::IWorkbenchWindow::Pointer wnd = windowAdvisor->GetWindowConfigurer()->GetWindow(); bool allClosed = true; if (wnd->GetActivePage()) { std::vector perspectives(wnd->GetActivePage()->GetOpenPerspectives()); allClosed = perspectives.empty(); } if (allClosed) { perspectivesClosed = true; QListIterator i(windowAdvisor->viewActions); while (i.hasNext()) { i.next()->setEnabled(false); } if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { windowAdvisor->openDicomEditorAction->setEnabled(false); } if(windowAdvisor->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { windowAdvisor->openXnatEditorAction->setEnabled(false); } windowAdvisor->fileSaveProjectAction->setEnabled(false); windowAdvisor->closeProjectAction->setEnabled(false); windowAdvisor->undoAction->setEnabled(false); windowAdvisor->redoAction->setEnabled(false); windowAdvisor->imageNavigatorAction->setEnabled(false); windowAdvisor->resetPerspAction->setEnabled(false); if( windowAdvisor->GetShowClosePerspectiveMenuItem() ) { windowAdvisor->closePerspAction->setEnabled(false); } } } private: QmitkExtWorkbenchWindowAdvisor* windowAdvisor; bool perspectivesClosed; }; class PerspectiveListenerForMenu: public berry::IPerspectiveListener { public: PerspectiveListenerForMenu(QmitkExtWorkbenchWindowAdvisor* wa) : windowAdvisor(wa) { } Events::Types GetPerspectiveEventTypes() const { return Events::ACTIVATED | Events::DEACTIVATED; } void PerspectiveActivated(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer perspective) { QAction* action = windowAdvisor->mapPerspIdToAction[perspective->GetId()]; if (action) { action->setChecked(true); } } void PerspectiveDeactivated(berry::IWorkbenchPage::Pointer /*page*/, berry::IPerspectiveDescriptor::Pointer perspective) { QAction* action = windowAdvisor->mapPerspIdToAction[perspective->GetId()]; if (action) { action->setChecked(false); } } private: QmitkExtWorkbenchWindowAdvisor* windowAdvisor; }; QmitkExtWorkbenchWindowAdvisor::QmitkExtWorkbenchWindowAdvisor(berry::WorkbenchAdvisor* wbAdvisor, berry::IWorkbenchWindowConfigurer::Pointer configurer) : berry::WorkbenchWindowAdvisor(configurer), lastInput(0), wbAdvisor(wbAdvisor), showViewToolbar(true), showPerspectiveToolbar(false), showVersionInfo(true), showMitkVersionInfo(true), showViewMenuItem(true), showNewWindowMenuItem(false), showClosePerspectiveMenuItem(true), enableViewBrowser(true), dropTargetListener(new QmitkDefaultDropTargetListener) { productName = QCoreApplication::applicationName().toStdString(); } berry::ActionBarAdvisor::Pointer QmitkExtWorkbenchWindowAdvisor::CreateActionBarAdvisor( berry::IActionBarConfigurer::Pointer configurer) { berry::ActionBarAdvisor::Pointer actionBarAdvisor( new QmitkExtActionBarAdvisor(configurer)); return actionBarAdvisor; } void* QmitkExtWorkbenchWindowAdvisor::CreateEmptyWindowContents(void* parent) { QWidget* parentWidget = static_cast(parent); QLabel* label = new QLabel(parentWidget); label->setText("No perspectives are open. Open a perspective in the Window->Open Perspective menu."); label->setContentsMargins(10,10,10,10); label->setAlignment(Qt::AlignTop); label->setEnabled(false); parentWidget->layout()->addWidget(label); return label; } void QmitkExtWorkbenchWindowAdvisor::ShowClosePerspectiveMenuItem(bool show) { showClosePerspectiveMenuItem = show; } bool QmitkExtWorkbenchWindowAdvisor::GetShowClosePerspectiveMenuItem() { return showClosePerspectiveMenuItem; } void QmitkExtWorkbenchWindowAdvisor::EnableViewBrowser(bool enable) { enableViewBrowser = enable; } bool QmitkExtWorkbenchWindowAdvisor::GetEnableViewBrowser() { return enableViewBrowser; } void QmitkExtWorkbenchWindowAdvisor::ShowNewWindowMenuItem(bool show) { showNewWindowMenuItem = show; } void QmitkExtWorkbenchWindowAdvisor::ShowViewToolbar(bool show) { showViewToolbar = show; } void QmitkExtWorkbenchWindowAdvisor::ShowViewMenuItem(bool show) { showViewMenuItem = show; } void QmitkExtWorkbenchWindowAdvisor::ShowPerspectiveToolbar(bool show) { showPerspectiveToolbar = show; } void QmitkExtWorkbenchWindowAdvisor::ShowVersionInfo(bool show) { showVersionInfo = show; } void QmitkExtWorkbenchWindowAdvisor::ShowMitkVersionInfo(bool show) { showMitkVersionInfo = show; } void QmitkExtWorkbenchWindowAdvisor::SetProductName(const std::string& product) { productName = product; } void QmitkExtWorkbenchWindowAdvisor::SetWindowIcon(const std::string& wndIcon) { windowIcon = wndIcon; } void QmitkExtWorkbenchWindowAdvisor::onViewBrowser() { viewBrowser->setVisible(viewBrowserAction->isChecked()); } void QmitkExtWorkbenchWindowAdvisor::PostWindowCreate() { // very bad hack... berry::IWorkbenchWindow::Pointer window = this->GetWindowConfigurer()->GetWindow(); QMainWindow* mainWindow = static_cast (window->GetShell()->GetControl()); window->SetPerspectiveExcludeList(perspectiveExcludeList); window->SetViewExcludeList(viewExcludeList); if (!windowIcon.empty()) { mainWindow->setWindowIcon(QIcon(QString::fromStdString(windowIcon))); } mainWindow->setContextMenuPolicy(Qt::PreventContextMenu); /*mainWindow->setStyleSheet("color: white;" "background-color: #808080;" "selection-color: #659EC7;" "selection-background-color: #808080;" " QMenuBar {" "background-color: #808080; }");*/ // ==== Application menu ============================ QMenuBar* menuBar = mainWindow->menuBar(); menuBar->setContextMenuPolicy(Qt::PreventContextMenu); QMenu* fileMenu = menuBar->addMenu("&File"); fileMenu->setObjectName("FileMenu"); QAction* fileOpenAction = new QmitkFileOpenAction(QIcon(":/org.mitk.gui.qt.ext/Load_48.png"), window); fileMenu->addAction(fileOpenAction); fileSaveProjectAction = new QmitkExtFileSaveProjectAction(window); fileSaveProjectAction->setIcon(QIcon(":/org.mitk.gui.qt.ext/Save_48.png")); fileMenu->addAction(fileSaveProjectAction); closeProjectAction = new QmitkCloseProjectAction(window); closeProjectAction->setIcon(QIcon(":/org.mitk.gui.qt.ext/Remove_48.png")); fileMenu->addAction(closeProjectAction); fileMenu->addSeparator(); QAction* fileExitAction = new QmitkFileExitAction(window); fileExitAction->setObjectName("QmitkFileExitAction"); fileMenu->addAction(fileExitAction); if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { openDicomEditorAction = new QmitkOpenDicomEditorAction(QIcon(":/org.mitk.gui.qt.ext/dcm-icon.png"),window); } if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { openXnatEditorAction = new QmitkOpenXnatEditorAction(QIcon(":/org.mitk.gui.qt.ext/xnat-icon.png"),window); } berry::IViewRegistry* viewRegistry = berry::PlatformUI::GetWorkbench()->GetViewRegistry(); const std::vector& viewDescriptors = viewRegistry->GetViews(); // another bad hack to get an edit/undo menu... QMenu* editMenu = menuBar->addMenu("&Edit"); undoAction = editMenu->addAction(QIcon(":/org.mitk.gui.qt.ext/Undo_48.png"), "&Undo", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onUndo()), QKeySequence("CTRL+Z")); undoAction->setToolTip("Undo the last action (not supported by all modules)"); redoAction = editMenu->addAction(QIcon(":/org.mitk.gui.qt.ext/Redo_48.png") , "&Redo", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onRedo()), QKeySequence("CTRL+Y")); redoAction->setToolTip("execute the last action that was undone again (not supported by all modules)"); imageNavigatorAction = new QAction(QIcon(":/org.mitk.gui.qt.ext/Slider.png"), "&Image Navigator", NULL); bool imageNavigatorViewFound = window->GetWorkbench()->GetViewRegistry()->Find("org.mitk.views.imagenavigator"); if (imageNavigatorViewFound) { QObject::connect(imageNavigatorAction, SIGNAL(triggered(bool)), QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onImageNavigator())); imageNavigatorAction->setCheckable(true); // add part listener for image navigator imageNavigatorPartListener = new PartListenerForImageNavigator(imageNavigatorAction); window->GetPartService()->AddPartListener(imageNavigatorPartListener); berry::IViewPart::Pointer imageNavigatorView = window->GetActivePage()->FindView("org.mitk.views.imagenavigator"); imageNavigatorAction->setChecked(false); if (imageNavigatorView) { bool isImageNavigatorVisible = window->GetActivePage()->IsPartVisible(imageNavigatorView); if (isImageNavigatorVisible) imageNavigatorAction->setChecked(true); } imageNavigatorAction->setToolTip("Toggle image navigator for navigating through image"); } // add view browser viewBrowserAction = new QAction(QIcon(":/org.mitk.gui.qt.ext/Slider.png"), "&View Browser", NULL); if (enableViewBrowser) { QObject::connect(viewBrowserAction, SIGNAL(triggered(bool)), SLOT(onViewBrowser())); viewBrowserAction->setCheckable(true); viewBrowserAction->setChecked(false); viewBrowserAction->setToolTip("Toggle view browser"); } // toolbar for showing file open, undo, redo and other main actions QToolBar* mainActionsToolBar = new QToolBar; mainActionsToolBar->setObjectName("mainActionsToolBar"); mainActionsToolBar->setContextMenuPolicy(Qt::PreventContextMenu); #ifdef __APPLE__ mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextUnderIcon ); #else mainActionsToolBar->setToolButtonStyle ( Qt::ToolButtonTextBesideIcon ); #endif mainActionsToolBar->addAction(fileOpenAction); mainActionsToolBar->addAction(fileSaveProjectAction); mainActionsToolBar->addAction(closeProjectAction); mainActionsToolBar->addAction(undoAction); mainActionsToolBar->addAction(redoAction); if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.dicomeditor")) { mainActionsToolBar->addAction(openDicomEditorAction); } if(this->GetWindowConfigurer()->GetWindow()->GetWorkbench()->GetEditorRegistry()->FindEditor("org.mitk.editors.xnat.browser")) { mainActionsToolBar->addAction(openXnatEditorAction); } if (imageNavigatorViewFound) { mainActionsToolBar->addAction(imageNavigatorAction); } if (enableViewBrowser) { mainActionsToolBar->addAction(viewBrowserAction); } mainWindow->addToolBar(mainActionsToolBar); #ifdef __APPLE__ mainWindow->setUnifiedTitleAndToolBarOnMac(true); #endif // ==== Window Menu ========================== QMenu* windowMenu = menuBar->addMenu("Window"); if (showNewWindowMenuItem) { windowMenu->addAction("&New Window", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onNewWindow())); windowMenu->addSeparator(); } QMenu* perspMenu = windowMenu->addMenu("&Open Perspective"); QMenu* viewMenu; if (showViewMenuItem) { viewMenu = windowMenu->addMenu("Show &View"); viewMenu->setObjectName("Show View"); } windowMenu->addSeparator(); resetPerspAction = windowMenu->addAction("&Reset Perspective", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onResetPerspective())); if(showClosePerspectiveMenuItem) closePerspAction = windowMenu->addAction("&Close Perspective", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onClosePerspective())); windowMenu->addSeparator(); windowMenu->addAction("&Preferences...", QmitkExtWorkbenchWindowAdvisorHack::undohack, SLOT(onEditPreferences()), QKeySequence("CTRL+P")); // fill perspective menu berry::IPerspectiveRegistry* perspRegistry = window->GetWorkbench()->GetPerspectiveRegistry(); QActionGroup* perspGroup = new QActionGroup(menuBar); std::vector perspectives( perspRegistry->GetPerspectives()); bool skip = false; for (std::vector::iterator perspIt = perspectives.begin(); perspIt != perspectives.end(); ++perspIt) { // if perspectiveExcludeList is set, it contains the id-strings of perspectives, which // should not appear as an menu-entry in the perspective menu if (perspectiveExcludeList.size() > 0) { for (unsigned int i=0; iGetId()) { skip = true; break; } } if (skip) { skip = false; continue; } } QAction* perspAction = new berry::QtOpenPerspectiveAction(window, *perspIt, perspGroup); mapPerspIdToAction.insert(std::make_pair((*perspIt)->GetId(), perspAction)); } perspMenu->addActions(perspGroup->actions()); // sort elements (converting vector to map...) std::vector::const_iterator iter; std::map VDMap; skip = false; for (iter = viewDescriptors.begin(); iter != viewDescriptors.end(); ++iter) { // if viewExcludeList is set, it contains the id-strings of view, which // should not appear as an menu-entry in the menu if (viewExcludeList.size() > 0) { for (unsigned int i=0; iGetId()) { skip = true; break; } } if (skip) { skip = false; continue; } } if ((*iter)->GetId() == "org.blueberry.ui.internal.introview") continue; if ((*iter)->GetId() == "org.mitk.views.imagenavigator") continue; std::pair p( (*iter)->GetLabel(), (*iter)); VDMap.insert(p); } // ================================================== // ==== Perspective Toolbar ================================== QToolBar* qPerspectiveToolbar = new QToolBar; qPerspectiveToolbar->setObjectName("perspectiveToolBar"); if (showPerspectiveToolbar) { qPerspectiveToolbar->addActions(perspGroup->actions()); mainWindow->addToolBar(qPerspectiveToolbar); } else delete qPerspectiveToolbar; // ==== View Toolbar ================================== QToolBar* qToolbar = new QToolBar; qToolbar->setObjectName("viewToolBar"); std::map::const_iterator MapIter; for (MapIter = VDMap.begin(); MapIter != VDMap.end(); ++MapIter) { berry::QtShowViewAction* viewAction = new berry::QtShowViewAction(window, (*MapIter).second); viewActions.push_back(viewAction); if(showViewMenuItem) viewMenu->addAction(viewAction); if (showViewToolbar) { qToolbar->addAction(viewAction); } } if (showViewToolbar) { mainWindow->addToolBar(qToolbar); } else delete qToolbar; QSettings settings(GetQSettingsFile(), QSettings::IniFormat); mainWindow->restoreState(settings.value("ToolbarPosition").toByteArray()); // ==================================================== // ===== Help menu ==================================== QMenu* helpMenu = menuBar->addMenu("&Help"); helpMenu->addAction("&Welcome",this, SLOT(onIntro())); helpMenu->addAction("&Open Help Perspective", this, SLOT(onHelpOpenHelpPerspective())); helpMenu->addAction("&Context Help",this, SLOT(onHelp()), QKeySequence("F1")); helpMenu->addAction("&About",this, SLOT(onAbout())); // ===================================================== QStatusBar* qStatusBar = new QStatusBar(); //creating a QmitkStatusBar for Output on the QStatusBar and connecting it with the MainStatusBar QmitkStatusBar *statusBar = new QmitkStatusBar(qStatusBar); //disabling the SizeGrip in the lower right corner statusBar->SetSizeGripEnabled(false); QmitkProgressBar *progBar = new QmitkProgressBar(); qStatusBar->addPermanentWidget(progBar, 0); progBar->hide(); // progBar->AddStepsToDo(2); // progBar->Progress(1); mainWindow->setStatusBar(qStatusBar); viewBrowser = new QDockWidget("View Browser"); viewBrowser->setWidget(new QmitkViewBrowserWidget()); - viewBrowser->setFeatures(QDockWidget::NoDockWidgetFeatures); + viewBrowser->setFeatures(QDockWidget::DockWidgetMovable | QDockWidget::DockWidgetFloatable); viewBrowser->setVisible(false); mainWindow->addDockWidget(Qt::LeftDockWidgetArea, viewBrowser); QmitkMemoryUsageIndicatorView* memoryIndicator = new QmitkMemoryUsageIndicatorView(); qStatusBar->addPermanentWidget(memoryIndicator, 0); } void QmitkExtWorkbenchWindowAdvisor::PreWindowOpen() { berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer(); // show the shortcut bar and progress indicator, which are hidden by // default //configurer->SetShowPerspectiveBar(true); //configurer->SetShowFastViewBars(true); //configurer->SetShowProgressIndicator(true); // // add the drag and drop support for the editor area // configurer.addEditorAreaTransfer(EditorInputTransfer.getInstance()); // configurer.addEditorAreaTransfer(ResourceTransfer.getInstance()); // configurer.addEditorAreaTransfer(FileTransfer.getInstance()); // configurer.addEditorAreaTransfer(MarkerTransfer.getInstance()); // configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter( // configurer.getWindow())); this->HookTitleUpdateListeners(configurer); menuPerspectiveListener = new PerspectiveListenerForMenu(this); configurer->GetWindow()->AddPerspectiveListener(menuPerspectiveListener); configurer->AddEditorAreaTransfer(QStringList("text/uri-list")); configurer->ConfigureEditorAreaDropListener(dropTargetListener); } void QmitkExtWorkbenchWindowAdvisor::PostWindowOpen() { // Force Rendering Window Creation on startup. berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer(); ctkPluginContext* context = QmitkCommonExtPlugin::getContext(); ctkServiceReference serviceRef = context->getServiceReference(); if (serviceRef) { mitk::IDataStorageService *dsService = context->getService(serviceRef); if (dsService) { mitk::IDataStorageReference::Pointer dsRef = dsService->GetDataStorage(); mitk::DataStorageEditorInput::Pointer dsInput(new mitk::DataStorageEditorInput(dsRef)); mitk::WorkbenchUtil::OpenEditor(configurer->GetWindow()->GetActivePage(),dsInput); } } } void QmitkExtWorkbenchWindowAdvisor::onIntro() { QmitkExtWorkbenchWindowAdvisorHack::undohack->onIntro(); } void QmitkExtWorkbenchWindowAdvisor::onHelp() { QmitkExtWorkbenchWindowAdvisorHack::undohack->onHelp(); } void QmitkExtWorkbenchWindowAdvisor::onHelpOpenHelpPerspective() { QmitkExtWorkbenchWindowAdvisorHack::undohack->onHelpOpenHelpPerspective(); } void QmitkExtWorkbenchWindowAdvisor::onAbout() { QmitkExtWorkbenchWindowAdvisorHack::undohack->onAbout(); } //-------------------------------------------------------------------------------- // Ugly hack from here on. Feel free to delete when command framework // and undo buttons are done. //-------------------------------------------------------------------------------- QmitkExtWorkbenchWindowAdvisorHack::QmitkExtWorkbenchWindowAdvisorHack() : QObject() { } QmitkExtWorkbenchWindowAdvisorHack::~QmitkExtWorkbenchWindowAdvisorHack() { } void QmitkExtWorkbenchWindowAdvisorHack::onUndo() { mitk::UndoModel* model = mitk::UndoController::GetCurrentUndoModel(); if (model) { if (mitk::VerboseLimitedLinearUndo* verboseundo = dynamic_cast( model )) { mitk::VerboseLimitedLinearUndo::StackDescription descriptions = verboseundo->GetUndoDescriptions(); if (descriptions.size() >= 1) { MITK_INFO << "Undo " << descriptions.front().second; } } model->Undo(); } else { MITK_ERROR << "No undo model instantiated"; } } void QmitkExtWorkbenchWindowAdvisorHack::onRedo() { mitk::UndoModel* model = mitk::UndoController::GetCurrentUndoModel(); if (model) { if (mitk::VerboseLimitedLinearUndo* verboseundo = dynamic_cast( model )) { mitk::VerboseLimitedLinearUndo::StackDescription descriptions = verboseundo->GetRedoDescriptions(); if (descriptions.size() >= 1) { MITK_INFO << "Redo " << descriptions.front().second; } } model->Redo(); } else { MITK_ERROR << "No undo model instantiated"; } } void QmitkExtWorkbenchWindowAdvisorHack::onImageNavigator() { // get ImageNavigatorView berry::IViewPart::Pointer imageNavigatorView = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->FindView("org.mitk.views.imagenavigator"); if (imageNavigatorView) { bool isImageNavigatorVisible = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->IsPartVisible(imageNavigatorView); if (isImageNavigatorVisible) { berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->HideView(imageNavigatorView); return; } } berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ShowView("org.mitk.views.imagenavigator"); //berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ResetPerspective(); } void QmitkExtWorkbenchWindowAdvisorHack::onViewBrowser() { // get view browser berry::IViewPart::Pointer viewBrowser = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->FindView("org.mitk.views.viewbrowser"); if (viewBrowser) { bool isVisible = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->IsPartVisible(viewBrowser); if (isVisible) { berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->HideView(viewBrowser); return; } } berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ShowView("org.mitk.views.viewbrowser"); } void QmitkExtWorkbenchWindowAdvisorHack::onEditPreferences() { QmitkPreferencesDialog _PreferencesDialog(QApplication::activeWindow()); _PreferencesDialog.exec(); } void QmitkExtWorkbenchWindowAdvisorHack::onQuit() { berry::PlatformUI::GetWorkbench()->Close(); } void QmitkExtWorkbenchWindowAdvisorHack::onResetPerspective() { berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ResetPerspective(); } void QmitkExtWorkbenchWindowAdvisorHack::onClosePerspective() { berry::IWorkbenchPage::Pointer page = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage(); page->ClosePerspective(page->GetPerspective(), true, true); } void QmitkExtWorkbenchWindowAdvisorHack::onNewWindow() { berry::PlatformUI::GetWorkbench()->OpenWorkbenchWindow(0); } void QmitkExtWorkbenchWindowAdvisorHack::onIntro() { bool hasIntro = berry::PlatformUI::GetWorkbench()->GetIntroManager()->HasIntro(); if (!hasIntro) { QRegExp reg("(.*)(\\n)*"); QRegExp reg2("(\\n)*(.*)"); QFile file(":/org.mitk.gui.qt.ext/index.html"); file.open(QIODevice::ReadOnly | QIODevice::Text); //text file only for reading QString text = QString(file.readAll()); file.close(); QString title = text; title.replace(reg, ""); title.replace(reg2, ""); std::cout << title.toStdString() << std::endl; QMessageBox::information(NULL, title, text, "Close"); } else { berry::PlatformUI::GetWorkbench()->GetIntroManager()->ShowIntro( berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow(), false); } } void QmitkExtWorkbenchWindowAdvisorHack::onHelp() { ctkPluginContext* context = QmitkCommonExtPlugin::getContext(); if (context == 0) { MITK_WARN << "Plugin context not set, unable to open context help"; return; } // Check if the org.blueberry.ui.qt.help plug-in is installed and started QList > plugins = context->getPlugins(); foreach(QSharedPointer p, plugins) { if (p->getSymbolicName() == "org.blueberry.ui.qt.help") { if (p->getState() != ctkPlugin::ACTIVE) { // try to activate the plug-in explicitly try { p->start(ctkPlugin::START_TRANSIENT); } catch (const ctkPluginException& pe) { MITK_ERROR << "Activating org.blueberry.ui.qt.help failed: " << pe.what(); return; } } } } ctkServiceReference eventAdminRef = context->getServiceReference(); ctkEventAdmin* eventAdmin = 0; if (eventAdminRef) { eventAdmin = context->getService(eventAdminRef); } if (eventAdmin == 0) { MITK_WARN << "ctkEventAdmin service not found. Unable to open context help"; } else { ctkEvent ev("org/blueberry/ui/help/CONTEXTHELP_REQUESTED"); eventAdmin->postEvent(ev); } } void QmitkExtWorkbenchWindowAdvisorHack::onHelpOpenHelpPerspective() { berry::PlatformUI::GetWorkbench()->ShowPerspective("org.blueberry.perspectives.help", berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()); } void QmitkExtWorkbenchWindowAdvisorHack::onAbout() { QmitkAboutDialog* aboutDialog = new QmitkAboutDialog(QApplication::activeWindow(),NULL); aboutDialog->open(); } void QmitkExtWorkbenchWindowAdvisor::HookTitleUpdateListeners( berry::IWorkbenchWindowConfigurer::Pointer configurer) { // hook up the listeners to update the window title titlePartListener = new PartListenerForTitle(this); titlePerspectiveListener = new PerspectiveListenerForTitle(this); editorPropertyListener = new berry::PropertyChangeIntAdapter< QmitkExtWorkbenchWindowAdvisor>(this, &QmitkExtWorkbenchWindowAdvisor::PropertyChange); // configurer.getWindow().addPageListener(new IPageListener() { // public void pageActivated(IWorkbenchPage page) { // updateTitle(false); // } // // public void pageClosed(IWorkbenchPage page) { // updateTitle(false); // } // // public void pageOpened(IWorkbenchPage page) { // // do nothing // } // }); configurer->GetWindow()->AddPerspectiveListener(titlePerspectiveListener); configurer->GetWindow()->GetPartService()->AddPartListener(titlePartListener); } std::string QmitkExtWorkbenchWindowAdvisor::ComputeTitle() { berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer(); berry::IWorkbenchPage::Pointer currentPage = configurer->GetWindow()->GetActivePage(); berry::IEditorPart::Pointer activeEditor; if (currentPage) { activeEditor = lastActiveEditor.Lock(); } std::string title; //TODO Product // IProduct product = Platform.getProduct(); // if (product != null) { // title = product.getName(); // } // instead of the product name, we use a custom variable for now title = productName; if(showMitkVersionInfo) { title += std::string(" ") + MITK_VERSION_STRING; } if (showVersionInfo) { // add version informatioin QString versions = QString(" (ITK %1.%2.%3 VTK %4.%5.%6 Qt %7 MITK %8)") .arg(ITK_VERSION_MAJOR).arg(ITK_VERSION_MINOR).arg(ITK_VERSION_PATCH) .arg(VTK_MAJOR_VERSION).arg(VTK_MINOR_VERSION).arg(VTK_BUILD_VERSION) .arg(QT_VERSION_STR) .arg(MITK_VERSION_STRING); title += versions.toStdString(); } if (currentPage) { if (activeEditor) { lastEditorTitle = activeEditor->GetTitleToolTip(); if (!lastEditorTitle.empty()) title = lastEditorTitle + " - " + title; } berry::IPerspectiveDescriptor::Pointer persp = currentPage->GetPerspective(); std::string label = ""; if (persp) { label = persp->GetLabel(); } berry::IAdaptable* input = currentPage->GetInput(); if (input && input != wbAdvisor->GetDefaultPageInput()) { label = currentPage->GetLabel(); } if (!label.empty()) { title = label + " - " + title; } } title += " (Not for use in diagnosis or treatment of patients)"; return title; } void QmitkExtWorkbenchWindowAdvisor::RecomputeTitle() { berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer(); std::string oldTitle = configurer->GetTitle(); std::string newTitle = ComputeTitle(); if (newTitle != oldTitle) { configurer->SetTitle(newTitle); } } void QmitkExtWorkbenchWindowAdvisor::UpdateTitle(bool editorHidden) { berry::IWorkbenchWindowConfigurer::Pointer configurer = GetWindowConfigurer(); berry::IWorkbenchWindow::Pointer window = configurer->GetWindow(); berry::IEditorPart::Pointer activeEditor; berry::IWorkbenchPage::Pointer currentPage = window->GetActivePage(); berry::IPerspectiveDescriptor::Pointer persp; berry::IAdaptable* input = 0; if (currentPage) { activeEditor = currentPage->GetActiveEditor(); persp = currentPage->GetPerspective(); input = currentPage->GetInput(); } if (editorHidden) { activeEditor = 0; } // Nothing to do if the editor hasn't changed if (activeEditor == lastActiveEditor.Lock() && currentPage == lastActivePage.Lock() && persp == lastPerspective.Lock() && input == lastInput) { return; } if (!lastActiveEditor.Expired()) { lastActiveEditor.Lock()->RemovePropertyListener(editorPropertyListener); } lastActiveEditor = activeEditor; lastActivePage = currentPage; lastPerspective = persp; lastInput = input; if (activeEditor) { activeEditor->AddPropertyListener(editorPropertyListener); } RecomputeTitle(); } void QmitkExtWorkbenchWindowAdvisor::PropertyChange(berry::Object::Pointer /*source*/, int propId) { if (propId == berry::IWorkbenchPartConstants::PROP_TITLE) { if (!lastActiveEditor.Expired()) { std::string newTitle = lastActiveEditor.Lock()->GetPartName(); if (lastEditorTitle != newTitle) { RecomputeTitle(); } } } } void QmitkExtWorkbenchWindowAdvisor::SetPerspectiveExcludeList(std::vector v) { this->perspectiveExcludeList = v; } std::vector QmitkExtWorkbenchWindowAdvisor::GetPerspectiveExcludeList() { return this->perspectiveExcludeList; } void QmitkExtWorkbenchWindowAdvisor::SetViewExcludeList(std::vector v) { this->viewExcludeList = v; } std::vector QmitkExtWorkbenchWindowAdvisor::GetViewExcludeList() { return this->viewExcludeList; } void QmitkExtWorkbenchWindowAdvisor::PostWindowClose() { berry::IWorkbenchWindow::Pointer window = this->GetWindowConfigurer()->GetWindow(); QMainWindow* mainWindow = static_cast (window->GetShell()->GetControl()); QSettings settings(GetQSettingsFile(), QSettings::IniFormat); settings.setValue("ToolbarPosition", mainWindow->saveState()); } QString QmitkExtWorkbenchWindowAdvisor::GetQSettingsFile() const { QFileInfo settingsInfo = QmitkCommonExtPlugin::getContext()->getDataFile(QT_SETTINGS_FILENAME); return settingsInfo.canonicalFilePath(); } diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/CMakeLists.txt b/Plugins/org.mitk.gui.qt.viewbrowser/CMakeLists.txt deleted file mode 100644 index a787ff1759..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -project(org_mitk_gui_qt_viewbrowser) - -MACRO_CREATE_MITK_CTK_PLUGIN( - EXPORT_DIRECTIVE VIEWBROWSER_EXPORT - EXPORTED_INCLUDE_SUFFIXES src - MODULE_DEPENDENCIES MitkQtWidgetsExt - PACKAGE_DEPENDS CTK -) diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/Manual.dox deleted file mode 100644 index 88762c4436..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/Manual.dox +++ /dev/null @@ -1,18 +0,0 @@ -/** -\page org_mitk_gui_qt_viewbrowser ViewBrowser - -\imageMacro{icon.png,"Icon of ViewBrowser",2.00} - -Available sections: - - \ref org_mitk_gui_qt_viewbrowserOverview - -\section org_mitk_gui_qt_viewbrowserOverview -Describe the features of your awesome plugin here -
    -
  • Increases productivity -
  • Creates beautiful images -
  • Generates PhD thesis -
  • Brings world peace -
- -*/ diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/icon.xpm deleted file mode 100644 index 9057c20bc6..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/UserManual/icon.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * icon_xpm[] = { -"16 16 2 1", -" c #FF0000", -". c #000000", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.viewbrowser/documentation/doxygen/modules.dox deleted file mode 100644 index 59b2d654d9..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/documentation/doxygen/modules.dox +++ /dev/null @@ -1,16 +0,0 @@ -/** - \defgroup org_mitk_gui_qt_viewbrowser org.mitk.gui.qt.viewbrowser - \ingroup MITKPlugins - - \brief Describe your plugin here. - -*/ - -/** - \defgroup org_mitk_gui_qt_viewbrowser_internal Internal - \ingroup org_mitk_gui_qt_viewbrowser - - \brief This subcategory includes the internal classes of the org.mitk.gui.qt.viewbrowser plugin. Other - plugins must not rely on these classes. They contain implementation details and their interface - may change at any time. We mean it. -*/ diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/files.cmake b/Plugins/org.mitk.gui.qt.viewbrowser/files.cmake deleted file mode 100644 index 43e5215452..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/files.cmake +++ /dev/null @@ -1,49 +0,0 @@ -set(SRC_CPP_FILES -) - -set(INTERNAL_CPP_FILES - org_mitk_gui_qt_viewbrowser_Activator.cpp - ViewBrowserView.cpp - QmitkNewPerspectiveDialog.cpp - - ViewTagsRegistry.cpp - ViewTagsDescriptor.cpp - ExtensionPointDefinitionConstants.cpp -) - -set(UI_FILES - src/internal/ViewBrowserViewControls.ui -) - -set(MOC_H_FILES - src/internal/org_mitk_gui_qt_viewbrowser_Activator.h - src/internal/ViewBrowserView.h - src/internal/mitkQtPerspectiveItem.h - src/internal/mitkQtViewItem.h - src/internal/QmitkNewPerspectiveDialog.h -) - -# 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 -set(CACHED_RESOURCE_FILES - resources/icon.xpm - plugin.xml -) - -# list of Qt .qrc files which contain additional resources -# specific to this plugin -set(QRC_FILES - -) - -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}) diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.viewbrowser/manifest_headers.cmake deleted file mode 100644 index f87eebb8c6..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/manifest_headers.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(Plugin-Name "ViewBrowser") -set(Plugin-Version "0.1") -set(Plugin-Vendor "DKFZ, Medical and Biological Informatics") -set(Plugin-ContactAddress "") -set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/plugin.xml b/Plugins/org.mitk.gui.qt.viewbrowser/plugin.xml deleted file mode 100644 index 003ee7c99f..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/plugin.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - Tag A - Tag B - Tag V - - - diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/resources/icon.xpm b/Plugins/org.mitk.gui.qt.viewbrowser/resources/icon.xpm deleted file mode 100644 index 9057c20bc6..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/resources/icon.xpm +++ /dev/null @@ -1,21 +0,0 @@ -/* XPM */ -static const char * icon_xpm[] = { -"16 16 2 1", -" c #FF0000", -". c #000000", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "}; diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/schema/taglist.exsd b/Plugins/org.mitk.gui.qt.viewbrowser/schema/taglist.exsd deleted file mode 100644 index 5816f273f1..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/schema/taglist.exsd +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - This extension point is used as an example for the extension point declaration (BlueBerry examples). - - - - - - - - - - - - a fully qualified identifier of the target extension point - - - - - - - an optional identifier of the extension instance - - - - - - - an optional name of the extension instance - - - - - - - - - - - - - - - - - - the identifier of the text changer - - - - - - - - - - - - - An optional subelement whose body should contain text providing a short description. - - - - - - - - - - The value of the <samp>class</samp> attribute must be a -fully qualified name of the class that implements -<samp>Inewchangetext</samp>. - - - - - - - - - Copyright (c) 2012 Medical and Biological Informatics, DKFZ<br> -All rights reserved. - - - - diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.cpp deleted file mode 100644 index c92dba6e4e..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.cpp +++ /dev/null @@ -1,23 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "ExtensionPointDefinitionConstants.h" - -#include "ViewTagsRegistry.h" - -const std::string ExtensionPointDefinitionConstants::VIEWTAGS_XP_NAME = "org.mitk.views.viewbrowser.textlists"; -const std::string ExtensionPointDefinitionConstants::VIEWTAGS_CHILD_TAG = "tag"; -const std::string ExtensionPointDefinitionConstants::VIEWTAGS_XMLATTRIBUTE_ID = "id"; \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.h deleted file mode 100644 index f03a0794cd..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ExtensionPointDefinitionConstants.h +++ /dev/null @@ -1,40 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef EXTENSIONPOINTDEFINITIONCONSTANTS_H_ -#define EXTENSIONPOINTDEFINITIONCONSTANTS_H_ - -#include - -/** - * The ExtensionPointDefinitionConstants contains a list of unique ids in the - * following form:
- * "org.mitk.mybundle.mytype.propername"
- * - * This ids have the purpose of connecting the plugin.xml of each bundle to the - * appropriate classes. - * - * Additionally it includes names of tags, which are used in XML files
- * regarding the BlueBerry example. - */ -struct ExtensionPointDefinitionConstants -{ - static const std::string VIEWTAGS_XP_NAME; - static const std::string VIEWTAGS_CHILD_TAG; - static const std::string VIEWTAGS_XMLATTRIBUTE_ID; -}; - -#endif /*EXTENSIONPOINTDEFINITIONCONSTANTS_H_*/ diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.cpp deleted file mode 100644 index e4c33a892c..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.cpp +++ /dev/null @@ -1,88 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "QmitkNewPerspectiveDialog.h" - -#include "mitkOrganTypeProperty.h" - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include - -QmitkNewPerspectiveDialog::QmitkNewPerspectiveDialog(QWidget* parent) - :QDialog(parent) -{ - QGridLayout* formGridLayout = new QGridLayout( this ); - - QLabel* label = new QLabel( "Perspective name:", this ); - - m_PerspectiveNameLineEdit = new QLineEdit( "", this ); - m_PerspectiveNameLineEdit->setFocus(); - - m_AcceptNameButton = new QPushButton( tr("Ok"), this ); - m_AcceptNameButton->setDefault(true); - m_AcceptNameButton->setEnabled(false); - - QPushButton* rejectNameButton = new QPushButton( tr("Cancel"), this ); - - formGridLayout->addWidget(label, 0, 0); - formGridLayout->addWidget(m_PerspectiveNameLineEdit, 0, 1); - formGridLayout->addWidget(m_AcceptNameButton, 1, 0); - formGridLayout->addWidget(rejectNameButton, 1, 1); - setLayout(formGridLayout); - - // create connections - connect( rejectNameButton, SIGNAL(clicked()), this, SLOT(reject()) ); - connect( m_AcceptNameButton, SIGNAL(clicked()), this, SLOT(OnAcceptClicked()) ); - connect( m_PerspectiveNameLineEdit, SIGNAL(textEdited(const QString&)), this, SLOT(OnPerspectiveNameChanged(const QString&)) ); -} - -QmitkNewPerspectiveDialog::~QmitkNewPerspectiveDialog() -{ -} - -void QmitkNewPerspectiveDialog::SetPerspectiveName(QString name) -{ - m_PerspectiveNameLineEdit->setText(name); - OnPerspectiveNameChanged(name); -} - -void QmitkNewPerspectiveDialog::OnAcceptClicked() -{ - m_PerspectiveName = m_PerspectiveNameLineEdit->text(); - this->accept(); -} - -const QString QmitkNewPerspectiveDialog::GetPerspectiveName() -{ - return m_PerspectiveName; -} - -void QmitkNewPerspectiveDialog::OnPerspectiveNameChanged(const QString& newText) -{ - if (!newText.isEmpty()) - m_AcceptNameButton->setEnabled(true); - else - m_AcceptNameButton->setEnabled(false); -} diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.h deleted file mode 100644 index b745e40282..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/QmitkNewPerspectiveDialog.h +++ /dev/null @@ -1,72 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef QmitkNewPerspectiveDialog_h_Included -#define QmitkNewPerspectiveDialog_h_Included - -#include "mitkColorProperty.h" -#include - -#include - -#include - -class QLabel; -class QLineEdit; -class Q3ListBox; -class QPushButton; - -#include - -/** - \brief Dialog for QmitkInteractiveSegmentation. - - \ingroup ToolManagerEtAl - \ingroup Widgets - - This dialog is used to ask a user about the type of a newly created segmentation and a name for it. - - \warning Will not create a new organ type in the OrganTypeProperty. Client has to do that. - - Last contribution by $Author: maleike $. -*/ -class QmitkNewPerspectiveDialog : public QDialog -{ - Q_OBJECT - -public: - - QmitkNewPerspectiveDialog(QWidget* parent = 0); - virtual ~QmitkNewPerspectiveDialog(); - - const QString GetPerspectiveName(); - void SetPerspectiveName(QString name); - -signals: - -protected slots: - - void OnAcceptClicked(); - void OnPerspectiveNameChanged(const QString&); - -protected: - - QLineEdit* m_PerspectiveNameLineEdit; - QPushButton* m_AcceptNameButton; - QString m_PerspectiveName; -}; - -#endif diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.cpp deleted file mode 100644 index d965881141..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.cpp +++ /dev/null @@ -1,532 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - - -// Blueberry -#include -#include -#include -#include -#include - -// Qmitk -#include "ViewBrowserView.h" -#include -#include -#include - -// Qt -#include -#include -#include -#include - -class ClassFilterProxyModel : public QSortFilterProxyModel -{ -private : - bool hasToBeDisplayed(const QModelIndex index) const; - bool displayElement(const QModelIndex index) const; -public: - ClassFilterProxyModel(QObject *parent = NULL); - bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const; -}; -ClassFilterProxyModel::ClassFilterProxyModel(QObject *parent): - QSortFilterProxyModel(parent) -{ -} - -bool ClassFilterProxyModel::filterAcceptsRow(int sourceRow, - const QModelIndex &sourceParent) const -{ - QModelIndex index = sourceModel()->index(sourceRow, 0, sourceParent); - - return hasToBeDisplayed(index); -} - -bool ClassFilterProxyModel::displayElement(const QModelIndex index) const -{ - bool result = false; - QString type = sourceModel()->data(index, Qt::DisplayRole).toString(); - QStandardItem * item = dynamic_cast(sourceModel())->itemFromIndex(index); - - if (type.contains(filterRegExp())) - { - return true; - } - { - mitk::QtViewItem* viewItem = dynamic_cast(item); - if (viewItem) - { - for (int i = 0; i < viewItem->m_Tags.size(); ++i) - { - if (viewItem->m_Tags[i].contains(filterRegExp())) - { - return true; - } - } - } - } - { - mitk::QtPerspectiveItem* viewItem = dynamic_cast(item); - if (viewItem) - { - for (int i = 0; i < viewItem->m_Tags.size(); ++i) - { - if (viewItem->m_Tags[i].contains(filterRegExp())) - { - return true; - } - } - } - } - - return result; -} - -bool ClassFilterProxyModel::hasToBeDisplayed(const QModelIndex index) const -{ - bool result = false; - // How many child this element have - if ( sourceModel()->rowCount(index) > 0 ) - { - for( int ii = 0; ii < sourceModel()->rowCount(index); ii++) - { - QModelIndex childIndex = sourceModel()->index(ii,0,index); - if ( ! childIndex.isValid() ) - break; - result = hasToBeDisplayed(childIndex); - result |= displayElement(index); - if (result) - { - // there is atless one element to display - break; - } - } - } - else - { - result = displayElement(index); - } - return result; -} - -struct ViewBrowserWindowListener : public berry::IWindowListener -{ - ViewBrowserWindowListener(ViewBrowserView* switcher) - : switcher(switcher), - m_Running(false) - {} - - virtual void WindowOpened(berry::IWorkbenchWindow::Pointer /*window*/) - { - if (m_Running) - return; - m_Running = true; - switcher->FillTreeList(); - m_Running = false; - } - - virtual void WindowActivated(berry::IWorkbenchWindow::Pointer /*window*/) - { - if (m_Running) - return; - m_Running = true; - switcher->FillTreeList(); - m_Running = false; - } - -private: - ViewBrowserView* switcher; - bool m_Running; -}; - -const std::string ViewBrowserView::VIEW_ID = "org.mitk.views.viewbrowser"; - -bool compareViews(berry::IViewDescriptor::Pointer a, berry::IViewDescriptor::Pointer b) -{ - if (a.IsNull() || b.IsNull()) - return false; - return a->GetLabel().compare(b->GetLabel()) < 0; -} - -bool compareQStandardItems(QStandardItem* a, QStandardItem* b) -{ - if (a==NULL || b==NULL) - return false; - return a->text().compare(b->text()) < 0; -} - -void ViewBrowserView::SetFocus() -{ -} - -void ViewBrowserView::CreateQtPartControl( QWidget *parent ) -{ - // create GUI widgets from the Qt Designer's .ui file - m_WindowListener = ViewBrowserWindowListener::Pointer(new ViewBrowserWindowListener(this)); - berry::PlatformUI::GetWorkbench()->AddWindowListener(m_WindowListener); - - m_Parent = parent; - m_Controls.setupUi( parent ); - connect( m_Controls.m_PluginTreeView, SIGNAL(customContextMenuRequested(QPoint)), SLOT(CustomMenuRequested(QPoint))); - connect( m_Controls.m_PluginTreeView, SIGNAL(doubleClicked(const QModelIndex&)), SLOT(ItemClicked(const QModelIndex&))); - connect( m_Controls.pushButton, SIGNAL(clicked()), SLOT(ButtonClicked()) ); - connect( m_Controls.lineEdit, SIGNAL(textChanged(QString)), SLOT(FilterChanged())); - - m_ContextMenu = new QMenu(m_Controls.m_PluginTreeView); - m_Controls.m_PluginTreeView->setContextMenuPolicy(Qt::CustomContextMenu); - - // Create a new TreeModel for the data - m_TreeModel = new QStandardItemModel(); - m_FilterProxyModel = new ClassFilterProxyModel(this); - m_FilterProxyModel->setSourceModel(m_TreeModel); - //proxyModel->setFilterFixedString("Diff"); - m_Controls.m_PluginTreeView->setModel(m_FilterProxyModel); - FillTreeList(); - - QList additions = m_Registry.GetViewTags(); - foreach (const ViewTagsDescriptor::Pointer& var, additions) - { - MITK_INFO << var->GetID().toStdString(); - } -} - -void ViewBrowserView::ButtonClicked() -{ - FillTreeList(); -} - -void ViewBrowserView::FillTreeList() -{ - // active workbench window available? - if (berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow().IsNull()) - return; - // active page available? - berry::IWorkbenchPage::Pointer page = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage(); - if (page.IsNull()) - return; - // everything is fine and we can remove the window listener - berry::PlatformUI::GetWorkbench()->RemoveWindowListener(m_WindowListener); - - // initialize tree model - m_TreeModel->clear(); - QStandardItem *treeRootItem = m_TreeModel->invisibleRootItem(); - - // get all available perspectives - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - std::vector perspectives(perspRegistry->GetPerspectives()); - - QModelIndex currentIndex; - berry::IPerspectiveDescriptor::Pointer currentPersp = page->GetPerspective(); - std::vector perspectiveExcludeList = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetPerspectiveExcludeList(); - - QStandardItem *perspectiveRootItem = new QStandardItem("Perspectives"); - treeRootItem->appendRow(perspectiveRootItem); - for (unsigned int i=0; iGetId()) - { - skipPerspective = true; - break; - } - if (skipPerspective) - continue; - - QIcon* pIcon = static_cast(p->GetImageDescriptor()->CreateImage()); - mitk::QtPerspectiveItem* pItem = new mitk::QtPerspectiveItem(*pIcon, QString::fromStdString(p->GetLabel())); - pItem->m_Perspective = p; - ViewTagsDescriptor::Pointer tags = m_Registry.Find(p->GetId()); - pItem->m_Tags = tags->GetTags(); - perspectiveRootItem->appendRow(pItem); - - if (currentPersp->GetId()==p->GetId()) - currentIndex = pItem->index(); - } - - // get all available views - berry::IViewRegistry* viewRegistry = berry::PlatformUI::GetWorkbench()->GetViewRegistry(); - std::vector views(viewRegistry->GetViews()); - std::sort(views.begin(), views.end(), compareViews); - - std::vector viewExcludeList = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetViewExcludeList(); - QStandardItem* viewRootItem = new QStandardItem(QIcon(),"View categories"); - treeRootItem->appendRow(viewRootItem); - - std::vector< QStandardItem* > categoryItems; - QStandardItem* noCategoryItem = new QStandardItem(QIcon(),"Miscellaneous"); - - for (unsigned int i = 0; i < views.size(); ++i) - { - berry::IViewDescriptor::Pointer v = views[i]; - ViewTagsDescriptor::Pointer tags = m_Registry.Find(views[i]->GetId()); - bool skipView = false; - for(unsigned int e=0; eGetId()) - { - skipView = true; - break; - } - if (skipView) - continue; - - std::vector catPath = v->GetCategoryPath(); - - QIcon* icon = static_cast(v->GetImageDescriptor()->CreateImage()); - mitk::QtViewItem* vItem = new mitk::QtViewItem(*icon, QString::fromStdString(v->GetLabel())); - vItem->m_View = v; - vItem->m_Tags = tags->GetTags(); - - - if (catPath.empty()) - noCategoryItem->appendRow(vItem); - else - { - QStandardItem* categoryItem = NULL; - - for (unsigned int c=0; ctext().toStdString() == catPath.front()) - { - categoryItem = categoryItems.at(c); - break; - } - - if (categoryItem==NULL) - { - categoryItem = new QStandardItem(QIcon(),catPath.front().c_str()); - categoryItems.push_back(categoryItem); - } - - categoryItem->appendRow(vItem); - } - } - std::sort(categoryItems.begin(), categoryItems.end(), compareQStandardItems); - - for (unsigned int i=0; iappendRow(categoryItems.at(i)); - if (noCategoryItem->hasChildren()) - viewRootItem->appendRow(noCategoryItem); - - QModelIndex correctedIndex = m_FilterProxyModel->mapFromSource(currentIndex); - m_Controls.m_PluginTreeView->setCurrentIndex(correctedIndex); -} - -void ViewBrowserView::OnSelectionChanged( berry::IWorkbenchPart::Pointer /*source*/, const QList& nodes ) -{ -} - -void ViewBrowserView::FilterChanged() -{ - QString filterString = m_Controls.lineEdit->text(); - if (filterString.size() > 0 ) - m_Controls.m_PluginTreeView->expandAll(); - else - m_Controls.m_PluginTreeView->collapseAll(); - QRegExp::PatternSyntax syntax = QRegExp::RegExp; - - Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive; - QString strPattern = "^*" + filterString; - QRegExp regExp(strPattern, caseSensitivity); - - m_FilterProxyModel->setFilterRegExp(regExp); -} - -void ViewBrowserView::ItemClicked(const QModelIndex &index) -{ - QStandardItem* item = m_TreeModel->itemFromIndex(m_FilterProxyModel->mapToSource(index)); - - if ( dynamic_cast< mitk::QtPerspectiveItem* >(item) ) - { - try - { - mitk::QtPerspectiveItem* pItem = dynamic_cast< mitk::QtPerspectiveItem* >(item); - berry::PlatformUI::GetWorkbench()->ShowPerspective( pItem->m_Perspective->GetId(), berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow() ); - } - catch (...) - { - QMessageBox::critical(0, "Opening Perspective Failed", QString("The requested perspective could not be opened.\nSee the log for details.")); - } - } - else if ( dynamic_cast< mitk::QtViewItem* >(item) ) - { - berry::IWorkbenchPage::Pointer page = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage(); - - if (page.IsNotNull()) - { - try - { - mitk::QtViewItem* vItem = dynamic_cast< mitk::QtViewItem* >(item); - page->ShowView(vItem->m_View->GetId()); - } - catch (berry::PartInitException e) - { - BERRY_ERROR << "Error: " << e.displayText() << std::endl; - } - } - } -} - -void ViewBrowserView::AddPerspective() -{ - QmitkNewPerspectiveDialog* dialog = new QmitkNewPerspectiveDialog( m_Parent ); - - int dialogReturnValue = dialog->exec(); - if ( dialogReturnValue == QDialog::Rejected ) - return; - - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - try - { - perspRegistry->CreatePerspective(dialog->GetPerspectiveName().toStdString(), perspRegistry->FindPerspectiveWithId(perspRegistry->GetDefaultPerspective())); - } - catch(...) - { - QMessageBox::warning(m_Parent, "Error", "Duplication of selected perspective failed. Please make sure the specified perspective name is not already in use!"); - } - FillTreeList(); -} - -void ViewBrowserView::ClonePerspective() -{ - if (m_RegisteredPerspective.IsNotNull()) - { - QmitkNewPerspectiveDialog* dialog = new QmitkNewPerspectiveDialog( m_Parent ); - QString defaultName(m_RegisteredPerspective->GetLabel().c_str()); - defaultName.append(" Copy"); - dialog->SetPerspectiveName(defaultName); - - int dialogReturnValue = dialog->exec(); - if ( dialogReturnValue == QDialog::Rejected ) - return; - - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - try - { - perspRegistry->ClonePerspective(dialog->GetPerspectiveName().toStdString(), dialog->GetPerspectiveName().toStdString(), m_RegisteredPerspective); - } - catch(...) - { - QMessageBox::warning(m_Parent, "Error", "Duplication of selected perspective failed. Please make sure the specified perspective name is not already in use!"); - } - FillTreeList(); - } -} - -void ViewBrowserView::ResetPerspective() -{ - if (QMessageBox::Yes == QMessageBox(QMessageBox::Question, "Please confirm", "Do you really want to reset the curent perspective?", QMessageBox::Yes|QMessageBox::No).exec()) - berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage()->ResetPerspective(); -} - -void ViewBrowserView::DeletePerspective() -{ - if (m_RegisteredPerspective.IsNotNull()) - { - QString question = "Do you really want to remove the perspective '"; - question.append(m_RegisteredPerspective->GetLabel().c_str()); - question.append("'?"); - if (QMessageBox::Yes == QMessageBox(QMessageBox::Question, "Please confirm", question, QMessageBox::Yes|QMessageBox::No).exec()) - { - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - perspRegistry->DeletePerspective(m_RegisteredPerspective); - FillTreeList(); - } - } -} - -void ViewBrowserView::ClosePerspective() -{ - if (QMessageBox::Yes == QMessageBox(QMessageBox::Question, "Please confirm", "Do you really want to close the curent perspective?", QMessageBox::Yes|QMessageBox::No).exec()) - { - berry::IWorkbenchPage::Pointer page = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage(); - page->CloseCurrentPerspective(true, true); - - if ( page->GetPerspective().IsNull() ) - { - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - berry::PlatformUI::GetWorkbench()->ShowPerspective( perspRegistry->GetDefaultPerspective(), berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow() ); - } - } -} - -void ViewBrowserView::ClosePerspectives() -{ - if (QMessageBox::Yes == QMessageBox(QMessageBox::Question, "Please confirm", "Do you really want to close all perspectives?", QMessageBox::Yes|QMessageBox::No).exec()) - { - berry::IWorkbenchPage::Pointer page = berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow()->GetActivePage(); - page->CloseAllPerspectives(true, true); - - berry::IPerspectiveRegistry* perspRegistry = berry::PlatformUI::GetWorkbench()->GetPerspectiveRegistry(); - berry::PlatformUI::GetWorkbench()->ShowPerspective( perspRegistry->GetDefaultPerspective(), berry::PlatformUI::GetWorkbench()->GetActiveWorkbenchWindow() ); - } -} - -void ViewBrowserView::CustomMenuRequested(QPoint pos) -{ - QModelIndex index = m_Controls.m_PluginTreeView->indexAt(pos); - QStandardItem* item = m_TreeModel->itemFromIndex(m_FilterProxyModel->mapToSource(index)); - - if (m_ContextMenu==NULL || item==NULL) - return; - - m_ContextMenu->clear(); - m_RegisteredPerspective = NULL; - - bool showMenu = false; - if (item->text()=="Perspectives") - { - QAction* resetAction = new QAction("Reset current perspective", this); - m_ContextMenu->addAction(resetAction); - connect(resetAction, SIGNAL(triggered()), SLOT(ResetPerspective())); - - QAction* closeAction = new QAction("Close current perspective", this); - m_ContextMenu->addAction(closeAction); - connect(closeAction, SIGNAL(triggered()), SLOT(ClosePerspective())); - - m_ContextMenu->addSeparator(); - - QAction* closeAllAction = new QAction("Close all perspectives", this); - m_ContextMenu->addAction(closeAllAction); - connect(closeAllAction, SIGNAL(triggered()), SLOT(ClosePerspectives())); - - showMenu = true; - } - if (dynamic_cast< mitk::QtPerspectiveItem* >(item) ) - { - m_RegisteredPerspective = dynamic_cast< mitk::QtPerspectiveItem* >(item)->m_Perspective; - - //m_ContextMenu->addSeparator(); - - QAction* cloneAction = new QAction("Duplicate perspective", this); - m_ContextMenu->addAction(cloneAction); - connect(cloneAction, SIGNAL(triggered()), SLOT(ClonePerspective())); - - if (!m_RegisteredPerspective->IsPredefined()) - { - QAction* deleteAction = new QAction("Remove perspective", this); - m_ContextMenu->addAction(deleteAction); - connect(deleteAction, SIGNAL(triggered()), SLOT(DeletePerspective())); - } - - showMenu = true; - } - - if (showMenu) - m_ContextMenu->popup(m_Controls.m_PluginTreeView->viewport()->mapToGlobal(pos)); -} diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.h deleted file mode 100644 index 2335a67ca9..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserView.h +++ /dev/null @@ -1,103 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - - -#ifndef ViewBrowserView_h -#define ViewBrowserView_h - -#include -#include -#include -#include -#include - -#include - -#include "ui_ViewBrowserViewControls.h" - -#include -#include -#include -#include -#include - -#include "ViewTagsRegistry.h" - - -/** - \brief ViewBrowserView - - \warning This class is not yet documented. Use "git blame" and ask the author to provide basic documentation. - - \sa QmitkAbstractView - \ingroup ${plugin_target}_internal -*/ -class ClassFilterProxyModel; - -class ViewBrowserView : public QmitkAbstractView -{ - // this is needed for all Qt objects that should have a Qt meta-object - // (everything that derives from QObject and wants to have signal/slots) - Q_OBJECT - - public: - - static const std::string VIEW_ID; - - - /// \brief Fills the TreeList with the available perspectives and views. - void FillTreeList(); - - - protected slots: - - /// \brief Called when the user clicks the GUI button - void CustomMenuRequested(QPoint pos); - void ItemClicked(const QModelIndex &index); - void AddPerspective(); - void ClonePerspective(); - void ResetPerspective(); - void DeletePerspective(); - void ClosePerspectives(); - void ClosePerspective(); - void ButtonClicked(); - void FilterChanged(); - - protected: - - virtual void CreateQtPartControl(QWidget *parent); - - virtual void SetFocus(); - - /// \brief called by QmitkFunctionality when DataManager's selection has changed - virtual void OnSelectionChanged( berry::IWorkbenchPart::Pointer source, - const QList& nodes ); - - QWidget* m_Parent; - Ui::ViewBrowserViewControls m_Controls; - QStandardItemModel* m_TreeModel; - ClassFilterProxyModel* m_FilterProxyModel; - QMenu* m_ContextMenu; - berry::IPerspectiveDescriptor::Pointer m_RegisteredPerspective; - - berry::IWindowListener::Pointer m_WindowListener; - - friend struct ViewBrowserViewListener; - - ViewTagsRegistry m_Registry; -}; - -#endif // ViewBrowserView_h diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserViewControls.ui b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserViewControls.ui deleted file mode 100644 index 659b5edaf4..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewBrowserViewControls.ui +++ /dev/null @@ -1,59 +0,0 @@ - - - ViewBrowserViewControls - - - - 0 - 0 - 752 - 974 - - - - - 0 - 0 - - - - QmitkTemplate - - - - - - Filter... - - - - - - - true - - - false - - - - - - - PushButton - - - - - - - - - ctkSearchBox - QLineEdit -
ctkSearchBox.h
-
-
- - -
diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.cpp deleted file mode 100644 index e079be9b52..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include "ViewTagsDescriptor.h" -#include "ExtensionPointDefinitionConstants.h" - -#include "berryPlatformException.h" - -ViewTagsDescriptor::ViewTagsDescriptor(QString id) -{ - this->m_Id = id; - m_Tags.clear(); -} -ViewTagsDescriptor::ViewTagsDescriptor(berry::IConfigurationElement::Pointer changeTextExtensionPoint) - : m_ChangeTextExtensionPoint(changeTextExtensionPoint) -{ - std::string id; - std::string name; - - // Check if the "id" and "name" attributes are available - if (!this->m_ChangeTextExtensionPoint->GetAttribute(ExtensionPointDefinitionConstants::VIEWTAGS_XMLATTRIBUTE_ID, id)) - { - throw berry::CoreException("Invalid changetext configuration element (missing id) from: " + - m_ChangeTextExtensionPoint->GetContributor()); - } - - this->m_Id = QString::fromStdString(id); - - // Get the optional "description" child element - std::vector tags( - this->m_ChangeTextExtensionPoint->GetChildren(ExtensionPointDefinitionConstants::VIEWTAGS_CHILD_TAG)); - - for (int i = 0; i < tags.size(); ++i) - { - std::string tmpTag = tags[i]->GetValue(); - m_Tags.push_back(QString::fromStdString(tmpTag)); - } -} - -ViewTagsDescriptor::~ViewTagsDescriptor() -{ -} - -std::vector ViewTagsDescriptor::GetTags() -{ - return m_Tags; -} - -QString ViewTagsDescriptor::GetID() const -{ - return this->m_Id; -} - -bool ViewTagsDescriptor::operator==(const Object* object) const -{ - if (const ViewTagsDescriptor* other = dynamic_cast(object)) - { - return this->GetID() == other->GetID(); - } - return false; -} \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.h deleted file mode 100644 index ced8786754..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsDescriptor.h +++ /dev/null @@ -1,70 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef VIEWTAGSDESCRIPTOR_H_ -#define VIEWTAGSDESCRIPTOR_H_ - -#include -#include - -class ViewTagsDescriptor : public berry::Object -{ -public: - - berryObjectMacro(ViewTagsDescriptor); - - /** - * Initialize the "ChangeText" Descriptor with the given extension point. - * - * @param changeTextExtensionPoint - * element, that refers to a extension point (type, id, name, class) - */ - ViewTagsDescriptor(berry::IConfigurationElement::Pointer changeTextExtensionPoint); - ViewTagsDescriptor(QString id); - - /** - * Default destructor - */ - ~ViewTagsDescriptor(); - - /** - * Returns the id of this "ChangeText". - * - * @return the id - */ - QString GetID() const; - - - std::vector GetTags(); - /** - * Equals this class with the given parameter. - * - * @param object - * the object for the equation - * @return true, if the objects are equal :: false, if they differ in any way - */ - bool operator==(const Object* object) const; - -private: - - // IConfigurationElements are used to access xml files (here: plugin.xml) - berry::IConfigurationElement::Pointer m_ChangeTextExtensionPoint; - - QString m_Id; - std::vector m_Tags; -}; - -#endif /*VIEWTAGSDESCRIPTOR_H_*/ diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.cpp deleted file mode 100644 index 5ea40a1e5e..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#include -#include -#include -#include "ViewTagsRegistry.h" -#include "ExtensionPointDefinitionConstants.h" - -ViewTagsRegistry::ViewTagsRegistry() -{ - //initialize the registry by copying all available extension points into a local variable - berry::IExtensionPointService::Pointer extensionPointService = berry::Platform::GetExtensionPointService(); - std::vector allExtensionsChangeTexts - = extensionPointService->GetConfigurationElementsFor(ExtensionPointDefinitionConstants::VIEWTAGS_XP_NAME); - - for(std::vector::const_iterator it = allExtensionsChangeTexts.begin(); - it != allExtensionsChangeTexts.end();++it) - { - ViewTagsDescriptor::Pointer temp(new ViewTagsDescriptor(*it)); - - if(!this->m_ListRegisteredViewTags.contains(temp->GetID())) - { - m_ListRegisteredViewTags.insert(temp->GetID(),temp); - } - else - { - BERRY_WARN << "The ChangeText ID: " << qPrintable(temp->GetID()) << " is already registered."; - } - } -} - -ViewTagsRegistry::~ViewTagsRegistry() -{ -} - -ViewTagsDescriptor::Pointer ViewTagsRegistry::Find(const std::string &id) const -{ - return this->Find(QString::fromStdString(id)); -} -ViewTagsDescriptor::Pointer ViewTagsRegistry::Find(const QString &id) const -{ - if (this->m_ListRegisteredViewTags.contains(id)) - { - return this->m_ListRegisteredViewTags.value(id); - } - else - { - ViewTagsDescriptor::Pointer tmp(new ViewTagsDescriptor(id)); - return tmp; - } -} - -QList ViewTagsRegistry::GetViewTags() const -{ - return m_ListRegisteredViewTags.values(); -} \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.h deleted file mode 100644 index eadc2d6b72..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/ViewTagsRegistry.h +++ /dev/null @@ -1,54 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef VIEWTAGSREGISTRY_H -#define VIEWTAGSREGISTRY_H - -#include - -#include "ViewTagsDescriptor.h" - -class ViewTagsRegistry : public berry::Object -{ -public: - - ViewTagsRegistry(); - ~ViewTagsRegistry(); - - /** - * Return an "change text" descriptor with the given extension id. If no "change text" exists, - * with the id return null. - * - * @param id - * the id to search for - * @return the descriptor or null - */ - ViewTagsDescriptor::Pointer Find(const QString& id) const; - ViewTagsDescriptor::Pointer Find(const std::string& id) const; - - /** - * Return a list of "change texts" defined in the registry. - * - * @return the change texts. - */ - QList GetViewTags() const; - -private: - - QHash m_ListRegisteredViewTags; -}; - -#endif /*VIEWTAGSREGISTRY_H*/ diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtPerspectiveItem.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtPerspectiveItem.h deleted file mode 100644 index fc09af133d..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtPerspectiveItem.h +++ /dev/null @@ -1,47 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef _PerspectiveItem -#define _PerspectiveItem - -#include -#include - -namespace mitk -{ - -class QtPerspectiveItem : public QStandardItem -{ -public: - QtPerspectiveItem(QString string) : - QStandardItem(string) - { - } - QtPerspectiveItem(const QIcon& icon, QString string) : - QStandardItem(icon, string) - { - } - - berry::IPerspectiveDescriptor::Pointer m_Perspective; - - std::vector m_Tags; -private: - -}; - -} - -#endif diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtViewItem.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtViewItem.h deleted file mode 100644 index 7a363264d9..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/mitkQtViewItem.h +++ /dev/null @@ -1,48 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - -#ifndef _ViewItem -#define _ViewItem - -#include -#include -#include - -namespace mitk -{ - -class QtViewItem : public QStandardItem -{ -public: - QtViewItem(QString string) : - QStandardItem(string) - { - } - QtViewItem(const QIcon& icon, QString string) : - QStandardItem(icon, string) - { - } - - berry::IViewDescriptor::Pointer m_View; - std::vector m_Tags; - -private: - -}; - -} - -#endif diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.cpp b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.cpp deleted file mode 100644 index ff0169f8fc..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - - -#include "org_mitk_gui_qt_viewbrowser_Activator.h" - -#include - -#include "ViewBrowserView.h" - -namespace mitk { - -void org_mitk_gui_qt_viewbrowser_Activator::start(ctkPluginContext* context) -{ - BERRY_REGISTER_EXTENSION_CLASS(ViewBrowserView, context) -} - -void org_mitk_gui_qt_viewbrowser_Activator::stop(ctkPluginContext* context) -{ - Q_UNUSED(context) -} - -} - -Q_EXPORT_PLUGIN2(org_mitk_gui_qt_viewbrowser, mitk::org_mitk_gui_qt_viewbrowser_Activator) diff --git a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.h b/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.h deleted file mode 100644 index fa0f8c7c87..0000000000 --- a/Plugins/org.mitk.gui.qt.viewbrowser/src/internal/org_mitk_gui_qt_viewbrowser_Activator.h +++ /dev/null @@ -1,40 +0,0 @@ -/*=================================================================== - -The Medical Imaging Interaction Toolkit (MITK) - -Copyright (c) German Cancer Research Center, -Division of Medical and Biological Informatics. -All rights reserved. - -This software is distributed WITHOUT ANY WARRANTY; without -even the implied warranty of MERCHANTABILITY or FITNESS FOR -A PARTICULAR PURPOSE. - -See LICENSE.txt or http://www.mitk.org for details. - -===================================================================*/ - - -#ifndef org_mitk_gui_qt_viewbrowser_Activator_h -#define org_mitk_gui_qt_viewbrowser_Activator_h - -#include - -namespace mitk { - -class org_mitk_gui_qt_viewbrowser_Activator : - public QObject, public ctkPluginActivator -{ - Q_OBJECT - Q_INTERFACES(ctkPluginActivator) - -public: - - void start(ctkPluginContext* context); - void stop(ctkPluginContext* context); - -}; // org_mitk_gui_qt_viewbrowser_Activator - -} - -#endif // org_mitk_gui_qt_viewbrowser_Activator_h