Page MenuHomePhabricator

iterative_fixing.patch

Authored By
goch
Apr 27 2012, 11:56 AM
Size
18 KB
Referenced Files
None
Subscribers
None

iterative_fixing.patch

From b81a946aefa4fda26f8ef5dcde397b9efaf49f90 Mon Sep 17 00:00:00 2001
From: Caspar Goch <c.goch@dkfz-heidelberg.de>
Date: Fri, 27 Apr 2012 11:54:41 +0200
Subject: [PATCH] Many changes
---
Applications/mitkDiffusion/CMakeLists.txt | 7 -
.../CMakeLists.txt | 11 --
.../files.cmake | 3 -
.../manifest_headers.cmake | 2 +-
.../org.mitk.gui.qt.diffusionimagingapp/plugin.xml | 9 -
.../internal/QmitkDiffusionApplicationPlugin.cpp | 2 -
.../internal/QmitkDiffusionImagingAppIntroPart.cpp | 184 --------------------
.../internal/QmitkDiffusionImagingAppIntroPart.h | 95 ----------
.../src/internal/QmitkWelcomeScreenViewControls.ui | 34 ----
9 files changed, 1 insertions(+), 346 deletions(-)
delete mode 100644 Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.cpp
delete mode 100644 Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.h
delete mode 100644 Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkWelcomeScreenViewControls.ui
diff --git a/Applications/mitkDiffusion/CMakeLists.txt b/Applications/mitkDiffusion/CMakeLists.txt
index 4a0a246..9715b60 100644
--- a/Applications/mitkDiffusion/CMakeLists.txt
+++ b/Applications/mitkDiffusion/CMakeLists.txt
@@ -28,8 +28,6 @@ set(_plugins
org.blueberry.ui
org.blueberry.ui.qt
org.blueberry.ui.qt.help
- org.blueberry.ui.qt.log
- org.blueberry.ui.qt.objectinspector
org.mitk.core.services
org.mitk.gui.common
org.mitk.planarfigure
@@ -70,8 +68,3 @@ FunctionCreateBlueBerryApplication(
LINK_LIBRARIES ${ALL_LIBRARIES}
${_app_options}
)
-
-# Add a build time dependency to legacy BlueBerry bundles.
-if(MITK_MODULES_ENABLED_PLUGINS)
- add_dependencies(${DIFFUSIONAPP_NAME} ${MITK_MODULES_ENABLED_PLUGINS})
-endif()
\ No newline at end of file
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt b/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt
index 4d1d73e..4777d78 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt
+++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/CMakeLists.txt
@@ -1,18 +1,7 @@
-set(QT_USE_QTWEBKIT TRUE)
-include(${QT_USE_FILE})
-
-if(QT_QTWEBKIT_FOUND)
- add_definitions(-DQT_WEBKIT)
-endif(QT_QTWEBKIT_FOUND)
-
-# The project name must correspond to the directory name of your plug-in
-# and must not contain periods.
project(org_mitk_gui_qt_diffusionimagingapp)
MACRO_CREATE_MITK_CTK_PLUGIN(
EXPORT_DIRECTIVE DIFFUSIONIMAGING_APP_EXPORT
EXPORTED_INCLUDE_SUFFIXES src
- MODULE_DEPENDENCIES Qmitk SceneSerialization
)
-target_link_libraries(${PLUGIN_TARGET} ${QT_LIBRARIES})
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake b/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake
index ceb304b..8fb7f2c 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake
+++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/files.cmake
@@ -5,7 +5,6 @@ set(SRC_CPP_FILES
set(INTERNAL_CPP_FILES
QmitkDiffusionApplicationPlugin.cpp
- QmitkDiffusionImagingAppIntroPart.cpp
Perspectives/QmitkDiffusionImagingAppPerspective.cpp
Perspectives/QmitkWelcomePerspective.cpp
Perspectives/QmitkDIAppConnectomicsPerspective.cpp
@@ -20,11 +19,9 @@ set(INTERNAL_CPP_FILES
)
set(UI_FILES
- src/internal/QmitkWelcomeScreenViewControls.ui
)
set(MOC_H_FILES
- src/internal/QmitkDiffusionImagingAppIntroPart.h
src/internal/QmitkDiffusionApplicationPlugin.h
src/QmitkDiffusionImagingAppApplication.h
src/internal/Perspectives/QmitkDiffusionImagingAppPerspective.h
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.diffusionimagingapp/manifest_headers.cmake
index 3474a73..81b28aa 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/manifest_headers.cmake
+++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/manifest_headers.cmake
@@ -2,7 +2,7 @@ set(Plugin-Name "MITK Diffusion")
set(Plugin-Version "1.0")
set(Plugin-Vendor "DKFZ, Medical and Biological Informatics")
set(Plugin-ContactAddress "http://www.mitk.org")
-set(Require-Plugin org.mitk.gui.qt.ext org.mitk.gui.qt.stdmultiwidgeteditor)
+set(Require-Plugin org.mitk.gui.qt.ext )
set(Plugin-Activator QmitkDiffusionImagingAppApplicationPlugin)
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml b/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml
index 174abdc..dee80a6 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml
+++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/plugin.xml
@@ -7,15 +7,6 @@
</application>
</extension>
- <extension point="org.blueberry.ui.intro">
- <intro id="org.mitk.qt.diffusionimagingappintro"
- class="QmitkDiffusionImagingAppIntroPart"
- role="editor"/>
- <introProductBinding
- productId=""
- introId="org.mitk.qt.diffusionimagingappintro"/>
- </extension>
-
<extension point="org.blueberry.ui.perspectives">
<!-- <perspective id="org.mitk.diffusionimagingapp.perspectives.diffusionimagingapp"
name="Data Display"
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp
index 3fe48a1..9be57e1 100644
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp
+++ b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionApplicationPlugin.cpp
@@ -19,7 +19,6 @@ PURPOSE. See the above copyright notices for more information.
#include "src/QmitkDiffusionImagingAppApplication.h"
#include "src/internal/Perspectives/QmitkWelcomePerspective.h"
-#include "src/internal/QmitkDiffusionImagingAppIntroPart.h"
#include "src/internal/Perspectives/QmitkDiffusionImagingAppPerspective.h"
#include "src/internal/Perspectives/QmitkDIAppConnectomicsPerspective.h"
@@ -65,7 +64,6 @@ void QmitkDiffusionApplicationPlugin::start(ctkPluginContext* context)
this->context = context;
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppApplication, context)
- BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppIntroPart, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkDiffusionImagingAppPerspective, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkWelcomePerspective, context)
BERRY_REGISTER_EXTENSION_CLASS(QmitkDIAppConnectomicsPerspective, context)
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.cpp b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.cpp
deleted file mode 100644
index f6d2bcc..0000000
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.cpp
+++ /dev/null
@@ -1,184 +0,0 @@
-/*=========================================================================
-
- 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 "QmitkDiffusionImagingAppIntroPart.h"
-
-#include "mitkNodePredicateDataType.h"
-#include <berryIWorkbenchWindow.h>
-#include <berryIWorkbench.h>
-#include <berryIWorkbenchPage.h>
-#include <berryIPerspectiveRegistry.h>
-#include <berryWorkbenchPreferenceConstants.h>
-#include <berryIPreferences.h>
-#include <berryIEditorReference.h>
-
-#include <mitkLogMacros.h>
-
-#include <QLabel>
-#include <QMessageBox>
-#include <QtCore/qconfig.h>
-#ifdef QT_WEBKIT
-#include <QWebView>
-#include <QWebPage>
-#endif
-#include <QString>
-#include <QStringList>
-#include <QRegExp>
-#include <QChar>
-#include <QByteArray>
-#include <QDesktopServices>
-
-#include "QmitkStdMultiWidget.h"
-#include "QmitkStdMultiWidgetEditor.h"
-#include "QmitkDiffusionApplicationPlugin.h"
-#include "mitkDataStorageEditorInput.h"
-
-#include "mitkBaseDataIOFactory.h"
-#include "mitkSceneIO.h"
-#include "mitkProgressBar.h"
-#include "mitkDataNodeFactory.h"
-#include "mitkNodePredicateNot.h"
-#include "mitkNodePredicateProperty.h"
-
-QmitkDiffusionImagingAppIntroPart::QmitkDiffusionImagingAppIntroPart()
- : m_Controls(NULL)
-{
- berry::IPreferences::Pointer workbenchPrefs = QmitkDiffusionApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences();
- workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, true);
- workbenchPrefs->Flush();
-}
-
-QmitkDiffusionImagingAppIntroPart::~QmitkDiffusionImagingAppIntroPart()
-{
- // if the workbench is not closing (that means, welcome screen was closed explicitly), set "Show_intro" false
- if (!this->GetIntroSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->IsClosing())
- {
- berry::IPreferences::Pointer workbenchPrefs = QmitkDiffusionApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences();
- workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, false);
- workbenchPrefs->Flush();
- }
- else
- {
- berry::IPreferences::Pointer workbenchPrefs = QmitkDiffusionApplicationPlugin::GetDefault()->GetPreferencesService()->GetSystemPreferences();
- workbenchPrefs->PutBool(berry::WorkbenchPreferenceConstants::SHOW_INTRO, true);
- workbenchPrefs->Flush();
- }
-
- // if workbench is not closing (Just welcome screen closing), open last used perspective
- if (this->GetIntroSite()->GetPage()->GetPerspective()->GetId()
- == "org.mitk.diffusionimagingapp.perspectives.welcome" && !this->GetIntroSite()->GetPage()->GetWorkbenchWindow()->GetWorkbench()->IsClosing())
- {
- berry::IPerspectiveDescriptor::Pointer perspective = this->GetIntroSite()->GetWorkbenchWindow()->GetWorkbench()->GetPerspectiveRegistry()->FindPerspectiveWithId("org.mitk.diffusionimagingapp.perspectives.diffusionimagingapp");
- if (perspective)
- {
- this->GetIntroSite()->GetPage()->SetPerspective(perspective);
- }
- }
-
-}
-
-
-void QmitkDiffusionImagingAppIntroPart::CreateQtPartControl(QWidget* parent)
-{
- if (!m_Controls)
- {
- // create GUI widgets
- m_Controls = new Ui::QmitkWelcomeScreenViewControls;
- m_Controls->setupUi(parent);
-#ifdef QT_WEBKIT
-
- // create a QWebView as well as a QWebPage and QWebFrame within the QWebview
- m_view = new QWebView(parent);
- m_view->page()->setLinkDelegationPolicy(QWebPage::DelegateAllLinks);
-
- QUrl urlQtResource(QString("qrc:/org.mitk.gui.qt.welcomescreen/mitkdiffusionimagingappwelcomeview.html"), QUrl::TolerantMode );
- m_view->load( urlQtResource );
-
- // adds the webview as a widget
- parent->layout()->addWidget(m_view);
- this->CreateConnections();
-#else
- parent->layout()->addWidget(new QLabel("<h1><center>Please install Qt with the WebKit option to see cool pictures!</center></h1>"));
-#endif
- }
-}
-
-#ifdef QT_WEBKIT
-void QmitkDiffusionImagingAppIntroPart::CreateConnections()
-{
- if ( m_Controls )
- {
- connect( (QObject*)(m_view->page()), SIGNAL(linkClicked(const QUrl& )), this, SLOT(DelegateMeTo(const QUrl& )) );
- }
-}
-
-
-void QmitkDiffusionImagingAppIntroPart::DelegateMeTo(const QUrl& showMeNext)
-{
- QString scheme = showMeNext.scheme();
- QByteArray urlHostname = showMeNext.encodedHost();
- QByteArray urlPath = showMeNext.encodedPath();
- QByteArray dataset = showMeNext.encodedQueryItemValue("dataset");
- QByteArray clear = showMeNext.encodedQueryItemValue("clear");
-
- if (scheme.isEmpty()) MITK_INFO << " empty scheme of the to be delegated link" ;
-
- // if the scheme is set to mitk, it is to be tested which action should be applied
- if (scheme.contains(QString("mitk")) )
- {
- if(urlPath.isEmpty() ) MITK_INFO << " mitk path is empty " ;
-
- // searching for the perspective keyword within the host name
- if(urlHostname.contains(QByteArray("perspectives")) )
- {
- // the simplified method removes every whitespace
- // ( whitespace means any character for which the standard C++ isspace() method returns true)
- urlPath = urlPath.simplified();
- QString tmpPerspectiveId(urlPath.data());
- tmpPerspectiveId.replace(QString("/"), QString("") );
- std::string perspectiveId = tmpPerspectiveId.toStdString();
-
- // is working fine as long as the perspective id is valid, if not the application crashes
- GetIntroSite()->GetWorkbenchWindow()->GetWorkbench()->ShowPerspective(perspectiveId, GetIntroSite()->GetWorkbenchWindow() );
- }
- }
- // if the scheme is set to http, by default no action is performed, if an external webpage needs to be
- // shown it should be implemented below
- else if (scheme.contains(QString("http")) )
- {
- QDesktopServices::openUrl(showMeNext);
-// m_view->load( ) ;
- }
- else if(scheme.contains("qrc"))
- {
- m_view->load(showMeNext);
- }
-
-}
-
-#endif
-
-void QmitkDiffusionImagingAppIntroPart::StandbyStateChanged(bool standby)
-{
-
-}
-
-
-void QmitkDiffusionImagingAppIntroPart::SetFocus()
-{
-
-}
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.h b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.h
deleted file mode 100644
index b49accd..0000000
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkDiffusionImagingAppIntroPart.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/*=========================================================================
-
- 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.
-
- =========================================================================*/
-
-
-#ifndef QMITKDIFFUSIONIMAGINGAPPINTROPART_H_
-#define QMITKDIFFUSIONIMAGINGAPPINTROPART_H_
-
-#include <QtCore/qconfig.h>
-
-#include <berryQtIntroPart.h>
-#include <ui_QmitkWelcomeScreenViewControls.h>
-
-
-/**
- * \ingroup org_mitk_gui_qt_welcomescreen_internal
- * \brief QmitkWelcomeScreenView
- * The WelcomeView Module is an helpful feature to people new to MITK. The main idea is to provide first
- * information about the particular working modes of the 3 M-3 application suited to specific medical working task.
- * Links to external documentation or information pages such as the mitk.org homepage are thinkable but have
- * not been implemented yet. The WelcomeView is realized by making use of the QTWebKit Module. The Qt WebKit module
- * provides an HTML browser engine that makes it easy to embed web content into native applications, and to enhance
- * web content with native controls.
- * For the welcome view of the application the QWebView, QWebPage classes have been used. The shown WelcomeView
- * html start page is styled by an external css stylesheet. The required resources as well as the html pages are integrated
- * into the QtResource system. The QT resource system allows the storage of files like html pages, css pages, jpgs etc.
- * as binaries within the executable.
- * This minimizes the risk of loosing resource files as well as the risk of getting files deleted. In order to use the Qt
- * resource system the resource files have to be added to the associated qrt resource file list.
- * Due to time issues the html pages of the welcome view do make use of jpegs with hotspots to switch
- * into the particular working modes. <
- * Nevertheless the foundation is set to design more complex html pages. The Q::WebPage gives options to set a
- * LinkDelegationPolicy. The used policy defines how links to external or internal resources are handled. To fit our needs
- * the delegate all links policy is used. This requires all external as well as internal links of the html pages to be handle
- * explicitly. In order to change mitk working modes (perspectives) a mitk url scheme has been designed. The url scheme
- * is set to mitk. The url host provides information about what's next to do. In our case, the case of switching to a
- * particular working mode the host is set to perspectives. The followed path provides information about the perspective id.
- * (e.g. mitk//::mitk.perspectives/org.mitk.qt.defaultperspective) The the generic design of the mitk url scheme allows to * execute other task depending on the mitk url host.
- * \sa QmitkWelcomePage Editor
- */
-
-class QWebView ;
-
-class QmitkDiffusionImagingAppIntroPart : public berry::QtIntroPart
-{
-
-// this is needed for all Qt objects that should have a MOC object (everything that derives from QObject)
- Q_OBJECT
-
-public:
-
- QmitkDiffusionImagingAppIntroPart();
- QmitkDiffusionImagingAppIntroPart(const QmitkDiffusionImagingAppIntroPart& other)
- {
- Q_UNUSED(other)
- throw std::runtime_error("Copy constructor not implemented");
- }
- ~QmitkDiffusionImagingAppIntroPart();
-
-
- virtual void CreateQtPartControl(QWidget *parent);
-
- void StandbyStateChanged(bool standby);
-
- void SetFocus();
-#ifdef QT_WEBKIT
-
- virtual void CreateConnections();
-
-
-protected slots:
-
-
- void DelegateMeTo(const QUrl& ShowMeNext);
-#endif
-protected:
-
- Ui::QmitkWelcomeScreenViewControls* m_Controls;
- QWebView* m_view;
-};
-
-#endif /* QMITKDIFFUSIONIMAGINGAPPINTROPART_H_ */
diff --git a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkWelcomeScreenViewControls.ui b/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkWelcomeScreenViewControls.ui
deleted file mode 100644
index 4a7cda1..0000000
--- a/Plugins/org.mitk.gui.qt.diffusionimagingapp/src/internal/QmitkWelcomeScreenViewControls.ui
+++ /dev/null
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>QmitkWelcomeScreenViewControls</class>
- <widget class="QWidget" name="QmitkWelcomeScreenViewControls">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>458</width>
- <height>398</height>
- </rect>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="windowTitle">
- <string>QmitkTemplate</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="margin">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <layout class="QGridLayout" name="m_WebViewLayout"/>
- </item>
- </layout>
- </widget>
- <layoutdefault spacing="6" margin="11"/>
- <resources/>
- <connections/>
-</ui>
--
1.7.4.msysgit.0

File Metadata

Mime Type
text/plain
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
799
Default Alt Text
iterative_fixing.patch (18 KB)

Event Timeline