diff --git a/Plugins/PluginList.cmake b/Plugins/PluginList.cmake index 8e07308e30..805d9b500e 100644 --- a/Plugins/PluginList.cmake +++ b/Plugins/PluginList.cmake @@ -1,83 +1,84 @@ # Plug-ins must be ordered according to their dependencies set(MITK_PLUGINS org.blueberry.core.runtime:ON org.blueberry.core.expressions:OFF org.blueberry.core.commands:OFF org.blueberry.core.jobs:OFF org.blueberry.ui.qt:OFF org.blueberry.ui.qt.help:OFF org.blueberry.ui.qt.log:ON org.blueberry.ui.qt.objectinspector:OFF #org.blueberry.test:ON #org.blueberry.uitest:ON #Testing/org.blueberry.core.runtime.tests:ON #Testing/org.blueberry.osgi.tests:ON 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.dicominspector:OFF org.mitk.gui.qt.diffusionimaging:OFF org.mitk.gui.qt.dosevisualization:OFF org.mitk.gui.qt.geometrytools:OFF org.mitk.gui.qt.igtexamples:OFF org.mitk.gui.qt.igttracking:OFF org.mitk.gui.qt.openigtlink:OFF org.mitk.gui.qt.imagecropper:OFF org.mitk.gui.qt.imagenavigator:ON org.mitk.gui.qt.viewnavigator:OFF 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.pointsetinteractionmultispectrum: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.aicpregistration:OFF org.mitk.gui.qt.toftutorial:OFF org.mitk.gui.qt.tofutil:OFF org.mitk.gui.qt.tubegraph: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.igt.app.echotrack:OFF org.mitk.gui.qt.spectrocamrecorder:OFF org.mitk.gui.qt.classificationsegmentation:OFF org.mitk.gui.qt.overlaymanager:OFF org.mitk.gui.qt.multilabelsegmentation:ON org.mitk.matchpoint.core.helper:OFF org.mitk.gui.qt.matchpoint.algorithm.browser:OFF org.mitk.gui.qt.matchpoint.algorithm.control:OFF org.mitk.gui.qt.matchpoint.algorithm.batch:OFF org.mitk.gui.qt.matchpoint.mapper:OFF org.mitk.gui.qt.matchpoint.framereg:OFF org.mitk.gui.qt.matchpoint.visualizer:OFF + org.mitk.gui.qt.webview:OFF ) diff --git a/Plugins/org.mitk.gui.qt.webview/CMakeLists.txt b/Plugins/org.mitk.gui.qt.webview/CMakeLists.txt new file mode 100644 index 0000000000..7f21099107 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/CMakeLists.txt @@ -0,0 +1,8 @@ +project(org_mitk_gui_qt_webview) + +mitk_create_plugin( + EXPORT_DIRECTIVE WEBVIEW_EXPORT + EXPORTED_INCLUDE_SUFFIXES src + MODULE_DEPENDS MitkQtWidgetsExt + PACKAGE_DEPENDS Qt5|WebEngineWidgets +) diff --git a/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/Manual.dox b/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/Manual.dox new file mode 100644 index 0000000000..ec3be64248 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/Manual.dox @@ -0,0 +1,17 @@ +/** +\page org_mitk_gui_qt_webview The Webview + +\imageMacro{icon.png,"Icon of Webview",2.00} + +\tableofcontents + +\section org_mitk_gui_qt_webviewOverview Overview +Describe the features of your awesome plugin here +<ul> +<li>Increases productivity +<li>Creates beautiful images +<li>Generates PhD thesis +<li>Brings world peace +</ul> + +*/ diff --git a/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/icon.xpm b/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/icon.xpm new file mode 100644 index 0000000000..9057c20bc6 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/documentation/UserManual/icon.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static const char * icon_xpm[] = { +"16 16 2 1", +" c #FF0000", +". c #000000", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" ", +" "}; diff --git a/Plugins/org.mitk.gui.qt.webview/documentation/doxygen/modules.dox b/Plugins/org.mitk.gui.qt.webview/documentation/doxygen/modules.dox new file mode 100644 index 0000000000..541ddf30a1 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/documentation/doxygen/modules.dox @@ -0,0 +1,16 @@ +/** + \defgroup org_mitk_gui_qt_webview org.mitk.gui.qt.webview + \ingroup MITKPlugins + + \brief Describe your plugin here. + +*/ + +/** + \defgroup org_mitk_gui_qt_webview_internal Internal + \ingroup org_mitk_gui_qt_webview + + \brief This subcategory includes the internal classes of the org.mitk.gui.qt.webview 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.webview/files.cmake b/Plugins/org.mitk.gui.qt.webview/files.cmake new file mode 100644 index 0000000000..973cc1e9b9 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/files.cmake @@ -0,0 +1,44 @@ +set(SRC_CPP_FILES + +) + +set(INTERNAL_CPP_FILES + org_mitk_gui_qt_webview_Activator.cpp + MitkWebView.cpp + QmitkHTMLWidget.cpp +) + +set(UI_FILES + src/internal/MitkWebViewControls.ui +) + +set(MOC_H_FILES + src/internal/org_mitk_gui_qt_webview_Activator.h + src/internal/MitkWebView.h + src/internal/QmitkHTMLWidget.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/world.svg + 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.webview/manifest_headers.cmake b/Plugins/org.mitk.gui.qt.webview/manifest_headers.cmake new file mode 100644 index 0000000000..f2d61be98b --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/manifest_headers.cmake @@ -0,0 +1,5 @@ +set(Plugin-Name "Webview") +set(Plugin-Version "0.1") +set(Plugin-Vendor "DKFZ") +set(Plugin-ContactAddress "") +set(Require-Plugin org.mitk.gui.qt.common) diff --git a/Plugins/org.mitk.gui.qt.webview/plugin.xml b/Plugins/org.mitk.gui.qt.webview/plugin.xml new file mode 100644 index 0000000000..264443bb8c --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/plugin.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<plugin> + + <extension point="org.blueberry.ui.views"> + <view id="org.mitk.views.mitkwebview" + name="MitkWebView" + class="MitkWebView" + icon="resources/world.svg" /> + </extension> + +</plugin> diff --git a/Plugins/org.mitk.gui.qt.webview/resources/world.svg b/Plugins/org.mitk.gui.qt.webview/resources/world.svg new file mode 100644 index 0000000000..393ee89b1d --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/resources/world.svg @@ -0,0 +1 @@ +<?xml version="1.0" ?><!DOCTYPE svg PUBLIC '-//W3C//DTD SVG 1.1//EN' 'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'><svg enable-background="new 0 0 32 32" height="32px" id="Layer_1" version="1.1" viewBox="0 0 32 32" width="32px" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M15.5,0C6.939,0,0,6.939,0,15.5S6.939,31,15.5,31S31,24.061,31,15.5S24.061,0,15.5,0z M28.975,15 h-5.996c-0.055-2.215-0.449-4.331-1.148-6.268c1.35-0.563,2.598-1.312,3.736-2.197C27.59,8.806,28.855,11.755,28.975,15z M14.947,28.972c-1.662-1.384-3.056-3.181-4.076-5.268c1.309-0.409,2.696-0.633,4.129-0.679v5.949 C14.982,28.974,14.965,28.973,14.947,28.972z M16.051,2.028c1.886,1.57,3.425,3.673,4.466,6.126c-1.426,0.487-2.941,0.77-4.518,0.82 V2.025C16.018,2.026,16.034,2.027,16.051,2.028z M17.717,2.198c2.76,0.459,5.236,1.748,7.164,3.614 c-1.047,0.803-2.191,1.483-3.428,1.998C20.543,5.653,19.266,3.746,17.717,2.198z M15,2.025v6.949 c-1.577-0.051-3.093-0.333-4.518-0.82c1.041-2.453,2.58-4.556,4.466-6.126C14.966,2.027,14.982,2.026,15,2.025z M9.546,7.811 c-1.235-0.515-2.38-1.195-3.427-1.998c1.927-1.866,4.404-3.155,7.164-3.614C11.733,3.746,10.457,5.653,9.546,7.811z M10.105,9.076 C11.647,9.611,13.29,9.923,15,9.975V15H9.021C9.075,12.906,9.446,10.905,10.105,9.076z M15,16v6.025 c-1.577,0.048-3.102,0.306-4.539,0.769C9.595,20.732,9.084,18.435,9.021,16H15z M13.283,28.802 c-2.473-0.411-4.719-1.488-6.545-3.052c0.985-0.683,2.05-1.261,3.188-1.7C10.798,25.858,11.939,27.463,13.283,28.802z M16,28.975 v-5.949c1.432,0.046,2.82,0.27,4.129,0.679c-1.021,2.087-2.414,3.884-4.076,5.268C16.036,28.973,16.018,28.974,16,28.975z M21.074,24.05c1.137,0.439,2.201,1.018,3.188,1.7c-1.826,1.563-4.072,2.641-6.545,3.052C19.061,27.463,20.201,25.858,21.074,24.05z M20.539,22.794c-1.438-0.463-2.963-0.721-4.539-0.769V16h5.979C21.916,18.435,21.404,20.732,20.539,22.794z M16,15V9.975 c1.709-0.052,3.352-0.363,4.895-0.898c0.658,1.829,1.029,3.83,1.084,5.924H16z M5.434,6.535C6.572,7.42,7.82,8.169,9.169,8.732 C8.47,10.669,8.076,12.785,8.021,15H2.025C2.145,11.755,3.41,8.806,5.434,6.535z M2.025,16h5.996 c0.062,2.555,0.596,4.968,1.503,7.137c-1.267,0.494-2.448,1.152-3.538,1.931C3.638,22.731,2.156,19.536,2.025,16z M25.014,25.067 c-1.09-0.778-2.271-1.437-3.539-1.931c0.908-2.169,1.441-4.582,1.504-7.137h5.996C28.844,19.536,27.361,22.731,25.014,25.067z" fill="#333332" id="world"/></svg> \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.cpp b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.cpp new file mode 100644 index 0000000000..36cad5fbaf --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.cpp @@ -0,0 +1,43 @@ +/*=================================================================== + +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. + +===================================================================*/ + + +// Qmitk +#include "MitkWebView.h" + +const std::string MitkWebView::VIEW_ID = "org.mitk.views.mitkwebview"; + +void MitkWebView::SetFocus() +{ + m_Controls.loadURLPushButton->setFocus(); +} + +void MitkWebView::CreateQtPartControl( QWidget *parent ) +{ + // create GUI widgets from the Qt Designer's .ui file + m_Controls.setupUi( parent ); + m_Controls.URLLineEdit->setText("http://www.mitk.org"); + + connect(m_Controls.loadURLPushButton, SIGNAL( clicked() ), this, SLOT( OnLoadURLPushButtonClicked()) ); + connect(m_Controls.URLLineEdit, SIGNAL(returnPressed()), this, SLOT(OnLoadURLPushButtonClicked())); +} + +void MitkWebView::OnLoadURLPushButtonClicked() +{ + QString url = m_Controls.URLLineEdit->text(); + m_Controls.contentHTMLWidget->loadUrl(url); + m_Controls.groupBox->setTitle(m_Controls.contentHTMLWidget->getTitle()); +} diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.h b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.h new file mode 100644 index 0000000000..30b44aecce --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebView.h @@ -0,0 +1,51 @@ +/*=================================================================== + +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 MitkWebView_h +#define MitkWebView_h + +#include <QmitkAbstractView.h> + +#include "ui_MitkWebViewControls.h" + + +/** + \brief MitkWebView Simple web view for loading HTML and setting custom HTML content. + + \sa QmitkAbstractView + \ingroup ${plugin_target}_internal +*/ +class MitkWebView : public QmitkAbstractView +{ + Q_OBJECT + + public: + static const std::string VIEW_ID; + + protected slots: + void OnLoadURLPushButtonClicked(); + + protected: + + virtual void CreateQtPartControl(QWidget *parent) override; + virtual void SetFocus() override; + + Ui::MitkWebViewControls m_Controls; + +}; + +#endif // MitkWebView_h diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebViewControls.ui b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebViewControls.ui new file mode 100644 index 0000000000..f4e84d730c --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/MitkWebViewControls.ui @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MitkWebViewControls</class> + <widget class="QWidget" name="MitkWebViewControls"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>279</width> + <height>395</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="windowTitle"> + <string>QmitkTemplate</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="label"> + <property name="text"> + <string>URL</string> + </property> + </widget> + </item> + <item> + <widget class="QLineEdit" name="URLLineEdit"/> + </item> + <item> + <widget class="QPushButton" name="loadURLPushButton"> + <property name="text"> + <string>load</string> + </property> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Web content</string> + </property> + <widget class="QmitkHTMLWidget" name="contentHTMLWidget" native="true"> + <property name="geometry"> + <rect> + <x>-20</x> + <y>-20</y> + <width>261</width> + <height>154</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <layoutdefault spacing="6" margin="11"/> + <customwidgets> + <customwidget> + <class>QmitkHTMLWidget</class> + <extends>QWidget</extends> + <header>QmitkHTMLWidget.h</header> + <container>1</container> + </customwidget> + </customwidgets> + <resources/> + <connections/> +</ui> diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.cpp b/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.cpp new file mode 100644 index 0000000000..f28f22c5ca --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.cpp @@ -0,0 +1,65 @@ +/*=================================================================== + +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 "QmitkHTMLWidget.h" + +#include <QGridLayout> + +QmitkHTMLWidget::QmitkHTMLWidget(QWidget* parent) + : m_WebEngineView(new QWebEngineView(parent)) +{ + //Set the webengineview to an initial page. + m_WebEngineView->setUrl(QUrl(QStringLiteral("http://www.mitk.org"))); + + m_htmlContent = new QPlainTextEdit(); + + auto layout = new QGridLayout(parent); + layout->setMargin(0); + layout->addWidget(m_WebEngineView); + + parent->setLayout(layout); +} + +QmitkHTMLWidget::~QmitkHTMLWidget() +{ + delete m_WebEngineView; + delete m_htmlContent; +} + +void QmitkHTMLWidget::loadUrl(const QString& url) +{ + //QUrl::fromUserInput returns a valid URL. If the user provides a non existing URL, an error page is loaded + QUrl urlToLoad = QUrl::fromUserInput(url); + m_WebEngineView->load(urlToLoad); +} + +QString QmitkHTMLWidget::getHTMLContent() const +{ + auto webPage = m_WebEngineView->page(); + //workaround from the Qt Examples (Qt Demo browser). It was not successful with setting QString + webPage->toHtml(invoke(m_htmlContent, &QPlainTextEdit::setPlainText)); + return m_htmlContent->toPlainText(); +} + +void QmitkHTMLWidget::setHTMLContent(const QString& content) +{ + m_WebEngineView->setHtml(content); +} + +QString QmitkHTMLWidget::getTitle() const +{ + return m_WebEngineView->page()->title(); +} diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.h b/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.h new file mode 100644 index 0000000000..1a79d465ca --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/QmitkHTMLWidget.h @@ -0,0 +1,66 @@ +/*=================================================================== + +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 <QWebEngineView> +#include <QPlainTextEdit> +#include "org_mitk_gui_qt_webview_Export.h" + + +//originating from the Qt demo browser as a workaround to get the HTML content of a WebEngineView +template<typename Arg, typename R, typename C> +struct InvokeWrapper { + R *receiver; + void (C::*memberFun)(Arg); + void operator()(Arg result) { + (receiver->*memberFun)(result); + } +}; + +template<typename Arg, typename R, typename C> +InvokeWrapper<Arg, R, C> invoke(R *receiver, void (C::*memberFun)(Arg)) +{ + InvokeWrapper<Arg, R, C> wrapper = { receiver, memberFun }; + return wrapper; +} + +/** +\brief QmitkHTMLWidget Widget for showing HTML content +\ingroup ${plugin_target}_internal +*/ +class WEBVIEW_EXPORT QmitkHTMLWidget : public QWidget +{ + Q_OBJECT +public: + explicit QmitkHTMLWidget(QWidget* parent); + ~QmitkHTMLWidget(); + + QmitkHTMLWidget(const QmitkHTMLWidget&) = delete; + QmitkHTMLWidget& operator=(const QmitkHTMLWidget&) = delete; + + /** + * @brief Loads the string url + * url is passed to a special function to convert the string to a valid URL + **/ + void loadUrl(const QString& url); + QString getHTMLContent() const; + QString getTitle() const; + void setHTMLContent(const QString& content); + +private: + QWebEngineView* m_WebEngineView; + QPlainTextEdit* m_htmlContent; +}; \ No newline at end of file diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.cpp b/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.cpp new file mode 100644 index 0000000000..cc19694566 --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.cpp @@ -0,0 +1,33 @@ +/*=================================================================== + +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_webview_Activator.h" +#include "MitkWebView.h" + +namespace mitk { + +void org_mitk_gui_qt_webview_Activator::start(ctkPluginContext* context) +{ + BERRY_REGISTER_EXTENSION_CLASS(MitkWebView, context) +} + +void org_mitk_gui_qt_webview_Activator::stop(ctkPluginContext* context) +{ + Q_UNUSED(context) +} + +} diff --git a/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.h b/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.h new file mode 100644 index 0000000000..c7494948cf --- /dev/null +++ b/Plugins/org.mitk.gui.qt.webview/src/internal/org_mitk_gui_qt_webview_Activator.h @@ -0,0 +1,41 @@ +/*=================================================================== + +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_webview_Activator_h +#define org_mitk_gui_qt_webview_Activator_h + +#include <ctkPluginActivator.h> + +namespace mitk { + +class org_mitk_gui_qt_webview_Activator : + public QObject, public ctkPluginActivator +{ + Q_OBJECT + Q_PLUGIN_METADATA(IID "org_mitk_gui_qt_webview") + Q_INTERFACES(ctkPluginActivator) + +public: + + void start(ctkPluginContext* context); + void stop(ctkPluginContext* context); + +}; // org_mitk_gui_qt_webview_Activator + +} + +#endif // org_mitk_gui_qt_webview_Activator_h