diff --git a/Examples/Plugins/org.mitk.example.gui.extensionpointdefinition/src/internal/ExtensionPointDefinition.cpp b/Examples/Plugins/org.mitk.example.gui.extensionpointdefinition/src/internal/ExtensionPointDefinition.cpp index 46c93785ee..54d67ed0eb 100644 --- a/Examples/Plugins/org.mitk.example.gui.extensionpointdefinition/src/internal/ExtensionPointDefinition.cpp +++ b/Examples/Plugins/org.mitk.example.gui.extensionpointdefinition/src/internal/ExtensionPointDefinition.cpp @@ -1,79 +1,81 @@ /*=================================================================== 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 "ExtensionPointDefinition.h" // berry Includes #include #include class MinimalWorkbenchAdvisor : public berry::QtWorkbenchAdvisor { public: static const std::string DEFAULT_PERSPECTIVE_ID; berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( berry::IWorkbenchWindowConfigurer::Pointer configurer) { // Set an individual initial size configurer->SetInitialSize(berry::Point(600,400)); + // Set an individual title + configurer->SetTitle("Extension Points"); // Enable or disable the perspective bar configurer->SetShowPerspectiveBar(false); wwAdvisor.reset(new berry::WorkbenchWindowAdvisor(configurer)); return wwAdvisor.data(); } std::string GetInitialWindowPerspectiveId() { return DEFAULT_PERSPECTIVE_ID; } private: QScopedPointer wwAdvisor; }; const std::string MinimalWorkbenchAdvisor::DEFAULT_PERSPECTIVE_ID = "org.mitk.example.minimalperspective"; ExtensionPointDefinition::ExtensionPointDefinition() { } ExtensionPointDefinition::~ExtensionPointDefinition() { } int ExtensionPointDefinition::Start() { berry::Display* display = berry::PlatformUI::CreateDisplay(); wbAdvisor.reset(new MinimalWorkbenchAdvisor); int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data()); // exit the application with an appropriate return code return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } void ExtensionPointDefinition::Stop() { //nothing to do } diff --git a/Examples/Plugins/org.mitk.example.gui.minimalapplication/src/internal/MinimalApplication.cpp b/Examples/Plugins/org.mitk.example.gui.minimalapplication/src/internal/MinimalApplication.cpp index 69a327018a..e16035e072 100644 --- a/Examples/Plugins/org.mitk.example.gui.minimalapplication/src/internal/MinimalApplication.cpp +++ b/Examples/Plugins/org.mitk.example.gui.minimalapplication/src/internal/MinimalApplication.cpp @@ -1,79 +1,80 @@ /*=================================================================== 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 "MinimalApplication.h" // Berry #include #include class MinimalWorkbenchAdvisor : public berry::QtWorkbenchAdvisor { public: static const std::string DEFAULT_PERSPECTIVE_ID; berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( berry::IWorkbenchWindowConfigurer::Pointer configurer) { // Set an individual initial size configurer->SetInitialSize(berry::Point(600,400)); + // Set an individual title + configurer->SetTitle("Minimal Application"); // Enable or disable the perspective bar configurer->SetShowPerspectiveBar(false); - //configurer->SetTitle("TEST TEST TEST!"); wwAdvisor.reset(new berry::WorkbenchWindowAdvisor(configurer)); return wwAdvisor.data(); } std::string GetInitialWindowPerspectiveId() { return DEFAULT_PERSPECTIVE_ID; } private: QScopedPointer wwAdvisor; }; const std::string MinimalWorkbenchAdvisor::DEFAULT_PERSPECTIVE_ID = "org.mitk.example.minimalperspective"; MinimalApplication::MinimalApplication() { } MinimalApplication::~MinimalApplication() { } int MinimalApplication::Start() { berry::Display* display = berry::PlatformUI::CreateDisplay(); wbAdvisor.reset(new MinimalWorkbenchAdvisor); int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data()); // exit the application with an appropriate return code return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } void MinimalApplication::Stop() { } diff --git a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/plugin.xml b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/plugin.xml index 2b913c0d62..6e2d1d5e7d 100644 --- a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/plugin.xml +++ b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/plugin.xml @@ -1,46 +1,46 @@ diff --git a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/ExtendedPerspective.cpp b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/ExtendedPerspective.cpp index 23f4a4c9b3..b12b5f2c2b 100644 --- a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/ExtendedPerspective.cpp +++ b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/ExtendedPerspective.cpp @@ -1,37 +1,37 @@ /*=================================================================== 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 "ExtendedPerspective.h" // berry includes #include "berryIViewLayout.h" ExtendedPerspective::ExtendedPerspective() { } void ExtendedPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { // Editors are placed for free std::string editorAreaId = layout->GetEditorArea(); // Hide editor area layout->SetEditorAreaVisible(false); // add emptyviews to perspective - layout->AddView("org.mitk.views.emptyview1", berry::IPageLayout::LEFT,0.3f, editorAreaId); - layout->AddView("org.mitk.views.emptyview2", berry::IPageLayout::RIGHT,0.3f, editorAreaId); + layout->AddView("org.mitk.views.emptyview1", berry::IPageLayout::LEFT, 1.0f, editorAreaId); + layout->AddView("org.mitk.views.emptyview2", berry::IPageLayout::RIGHT, 0.3f, "org.mitk.views.emptyview1"); } diff --git a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MinimalPerspective.cpp b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MinimalPerspective.cpp index d243b6a371..a521fab2ca 100644 --- a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MinimalPerspective.cpp +++ b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MinimalPerspective.cpp @@ -1,44 +1,44 @@ /*=================================================================== 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 "MinimalPerspective.h" // berry includes #include "berryIViewLayout.h" MinimalPerspective::MinimalPerspective() { } void MinimalPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { // Editors are placed for free. std::string editorAreaId = layout->GetEditorArea(); //! [Visibility of editor area] // set editor area to visible layout->SetEditorAreaVisible(true); //! [Visibility of editor area] // create folder with alignment "left" berry::IFolderLayout::Pointer left = - layout->CreateFolder("left", berry::IPageLayout::LEFT, 0.3f, editorAreaId); + layout->CreateFolder("left", berry::IPageLayout::LEFT, 0.5f, editorAreaId); // add emptyview1 to the folder left->AddView("org.mitk.views.emptyview1"); - // add emptyview2 to the layout (not the folder) with alignment "right" - layout->AddView("org.mitk.views.emptyview2", berry::IPageLayout::RIGHT,0.3f, editorAreaId); + // add emptyview2 to the folder + left->AddView("org.mitk.views.emptyview2"); } diff --git a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MultiplePerspectives.cpp b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MultiplePerspectives.cpp index e52019eed8..4d059f27ab 100644 --- a/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MultiplePerspectives.cpp +++ b/Examples/Plugins/org.mitk.example.gui.multipleperspectives/src/internal/MultiplePerspectives.cpp @@ -1,83 +1,86 @@ /*=================================================================== 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 "MultiplePerspectives.h" // berry includes #include #include class MultiplePerspectivesWorkbenchAdvisor : public berry::QtWorkbenchAdvisor { public: static const std::string DEFAULT_PERSPECTIVE_ID; berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( berry::IWorkbenchWindowConfigurer::Pointer configurer) { //! [initial window size] // Set an individual initial size configurer->SetInitialSize(berry::Point(600,400)); //! [initial window size] + // Set an individual title + configurer->SetTitle("Multiple Perspectives"); + //! [Visibility of perspective bar] // Enable or disable the perspective bar configurer->SetShowPerspectiveBar(true); //! [Visibility of perspective bar] wwAdvisor.reset(new berry::WorkbenchWindowAdvisor(configurer)); return wwAdvisor.data(); } std::string GetInitialWindowPerspectiveId() { return DEFAULT_PERSPECTIVE_ID; } private: QScopedPointer wwAdvisor; }; const std::string MultiplePerspectivesWorkbenchAdvisor::DEFAULT_PERSPECTIVE_ID = "org.mitk.example.minimalperspective"; MultiplePerspectives::MultiplePerspectives() { } MultiplePerspectives::~MultiplePerspectives() { } int MultiplePerspectives::Start() { berry::Display* display = berry::PlatformUI::CreateDisplay(); wbAdvisor.reset(new MultiplePerspectivesWorkbenchAdvisor); int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data()); // exit the application with an appropriate return code return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } void MultiplePerspectives::Stop() { } diff --git a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk.views/plugin.xml b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk.views/plugin.xml index 1d543d1dfe..2fecdbf5fe 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk.views/plugin.xml +++ b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk.views/plugin.xml @@ -1,23 +1,23 @@ diff --git a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/plugin.xml b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/plugin.xml index 99f88e0f7b..089d33a105 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/plugin.xml +++ b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/plugin.xml @@ -1,19 +1,19 @@ diff --git a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/ExtendedPerspective.cpp b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/ExtendedPerspective.cpp index e219eb1e4f..f13f0f3bba 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/ExtendedPerspective.cpp +++ b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/ExtendedPerspective.cpp @@ -1,37 +1,37 @@ /*=================================================================== 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 "ExtendedPerspective.h" // berry includes #include "berryIViewLayout.h" ExtendedPerspective::ExtendedPerspective() { } void ExtendedPerspective::CreateInitialLayout(berry::IPageLayout::Pointer layout) { // Editors are placed for free. std::string editorAreaId = layout->GetEditorArea(); // Hides the editor area. layout->SetEditorAreaVisible(false); // add the selection view (for providing selection events for the listener view) to the perspective - layout->AddView("org.mitk.views.selectionviewmitk", berry::IPageLayout::LEFT,0.3f, editorAreaId); + layout->AddView("org.mitk.views.selectionviewmitk", berry::IPageLayout::LEFT,1.0f, editorAreaId); // add the listener view (listening for selection events of the selection view) to the perspective - layout->AddView("org.mitk.views.listenerviewmitk", berry::IPageLayout::RIGHT,0.4f, editorAreaId); + layout->AddView("org.mitk.views.listenerviewmitk", berry::IPageLayout::RIGHT,0.5f, "org.mitk.views.selectionviewmitk"); } diff --git a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/SelectionServiceMitk.cpp b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/SelectionServiceMitk.cpp index f5b4b23de7..fb8785949e 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/SelectionServiceMitk.cpp +++ b/Examples/Plugins/org.mitk.example.gui.selectionservicemitk/src/internal/SelectionServiceMitk.cpp @@ -1,76 +1,78 @@ /*=================================================================== 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 "SelectionServiceMitk.h" // berry includes #include #include class SelectionServiceMITKWorkbenchAdvisor : public berry::QtWorkbenchAdvisor { public: static const std::string DEFAULT_PERSPECTIVE_ID; berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( berry::IWorkbenchWindowConfigurer::Pointer configurer) { // Set an individual initial size configurer->SetInitialSize(berry::Point(600,400)); + // Set the window title + configurer->SetTitle("MITK Selection Service"); wwAdvisor.reset(new berry::WorkbenchWindowAdvisor(configurer)); return wwAdvisor.data(); } std::string GetInitialWindowPerspectiveId() { return DEFAULT_PERSPECTIVE_ID; } private: QScopedPointer wwAdvisor; }; const std::string SelectionServiceMITKWorkbenchAdvisor::DEFAULT_PERSPECTIVE_ID = "org.mitk.example.extendedperspective"; SelectionServiceMitk::SelectionServiceMitk() { } SelectionServiceMitk::~SelectionServiceMitk() { } int SelectionServiceMitk::Start() { berry::Display* display = berry::PlatformUI::CreateDisplay(); wbAdvisor.reset(new SelectionServiceMITKWorkbenchAdvisor); int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data()); // exit the application with an appropriate return code return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } void SelectionServiceMitk::Stop() { } diff --git a/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/plugin.xml b/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/plugin.xml index 36ef3cd873..86fcc0acc4 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/plugin.xml +++ b/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/plugin.xml @@ -1,37 +1,37 @@ diff --git a/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/src/internal/SelectionServiceQt.cpp b/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/src/internal/SelectionServiceQt.cpp index 700f1c3948..9657bfbeb6 100644 --- a/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/src/internal/SelectionServiceQt.cpp +++ b/Examples/Plugins/org.mitk.example.gui.selectionserviceqt/src/internal/SelectionServiceQt.cpp @@ -1,76 +1,78 @@ /*=================================================================== 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 "SelectionServiceQt.h" // berry includes #include #include class SelectionServiceQtWorkbenchAdvisor : public berry::QtWorkbenchAdvisor { public: static const std::string DEFAULT_PERSPECTIVE_ID; berry::WorkbenchWindowAdvisor* CreateWorkbenchWindowAdvisor( berry::IWorkbenchWindowConfigurer::Pointer configurer) { // Set an individual initial size configurer->SetInitialSize(berry::Point(600,400)); + // Set the window title + configurer->SetTitle("Qt Selection Service"); wwAdvisor.reset(new berry::WorkbenchWindowAdvisor(configurer)); return wwAdvisor.data(); } std::string GetInitialWindowPerspectiveId() { return DEFAULT_PERSPECTIVE_ID; } private: QScopedPointer wwAdvisor; }; const std::string SelectionServiceQtWorkbenchAdvisor::DEFAULT_PERSPECTIVE_ID = "org.mitk.example.extendedperspective"; SelectionServiceQt::SelectionServiceQt() { } SelectionServiceQt::~SelectionServiceQt() { } int SelectionServiceQt::Start() { berry::Display* display = berry::PlatformUI::CreateDisplay(); wbAdvisor.reset(new SelectionServiceQtWorkbenchAdvisor); int code = berry::PlatformUI::CreateAndRunWorkbench(display, wbAdvisor.data()); // exit the application with an appropriate return code return code == berry::PlatformUI::RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } void SelectionServiceQt::Stop() { }