diff --git a/Plugins/org.blueberry.ui.qt/src/berryIReusableEditor.h b/Plugins/org.blueberry.ui.qt/src/berryIReusableEditor.h index ff4b4fa5e9..f61fe6e917 100644 --- a/Plugins/org.blueberry.ui.qt/src/berryIReusableEditor.h +++ b/Plugins/org.blueberry.ui.qt/src/berryIReusableEditor.h @@ -1,55 +1,55 @@ /*=================================================================== BlueBerry Platform 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 BERRYIREUSABLEEDITOR_H_ #define BERRYIREUSABLEEDITOR_H_ #include "berryIEditorPart.h" #include "berryIEditorInput.h" namespace berry { /** * \ingroup org_blueberry_ui_qt * * Interface for reusable editors. * * An editors may support changing its input so that * the workbench may change its contents instead of * opening a new editor. */ struct BERRY_UI_QT IReusableEditor : public virtual IEditorPart { berryObjectMacro(berry::IReusableEditor) virtual ~IReusableEditor(); /** * Sets the input to this editor. * - *

Note: Clients must fire the {@link IEditorPart#PROP_INPUT } + *

Note: Clients must fire the {@link IWorkbenchPartConstants#PROP_INPUT } * property change within their implementation of * setInput().

* * @param input the editor input */ virtual void SetInput(IEditorInput::Pointer input) = 0; }; } #endif /*BERRYIREUSABLEEDITOR_H_*/ diff --git a/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchSourceProvider.h b/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchSourceProvider.h index a502935478..089a02ab3b 100644 --- a/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchSourceProvider.h +++ b/Plugins/org.blueberry.ui.qt/src/internal/berryWorkbenchSourceProvider.h @@ -1,243 +1,243 @@ /*=================================================================== BlueBerry Platform 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 BERRYWORKBENCHSOURCEPROVIDER_H #define BERRYWORKBENCHSOURCEPROVIDER_H #include "berryAbstractSourceProvider.h" #include "berryINullSelectionListener.h" #include "berryIPartListener.h" #include "berryIWindowListener.h" #include "berryIPropertyChangeListener.h" #include "berryIPerspectiveListener.h" #include "berryIShellListener.h" namespace berry { struct IEditorPart; struct IEditorInput; struct IShowInSource; class Display; class ObjectBool; class ObjectString; class ShowInContext; class WorkbenchWindow; class WorkbenchSourceProvider : public QObject, public AbstractSourceProvider, private INullSelectionListener, private IPartListener, private IWindowListener, private IPropertyChangeListener, private IPerspectiveListener { Q_OBJECT Q_INTERFACES(berry::ISourceProvider) private: /** * The names of the sources supported by this source provider. */ static const QList PROVIDED_SOURCE_NAMES; IWorkbench* workbench; WeakPointer lastWindow; // private IServiceLocator locator; // Selection SourceProvider SmartPointer selection; public: berryObjectMacro(berry::WorkbenchSourceProvider) WorkbenchSourceProvider(); void Initialize(IServiceLocator* locator) override; ~WorkbenchSourceProvider(); QList GetProvidedSourceNames() const override; ISourceProvider::StateMapType GetCurrentState() const override; private: void SelectionChanged(const SmartPointer& part, const SmartPointer& newSelection) override; int UpdateSelection(ISourceProvider::StateMapType& currentState) const; void UpdateWindows(IWorkbenchWindow* newWindow); // Active Part SourceProvider /** * The last active editor part seen as active by this provider. This value * may be null if there is no currently active editor. */ const IEditorPart* lastActiveEditor; /** * The last active editor id seen as active by this provider. This value may * be null if there is no currently active editor. */ SmartPointer lastActiveEditorId; /** * The last active part seen as active by this provider. This value may be * null if there is no currently active part. */ const IWorkbenchPart* lastActivePart; /** * The last active part id seen as active by this provider. This value may * be null if there is no currently active part. */ SmartPointer lastActivePartId; /** * The last active part site seen by this provider. This value may be * null if there is no currently active site. */ const IWorkbenchPartSite* lastActivePartSite; - const Object* lastShowInInput; + SmartPointer lastShowInInput; void PartActivated(const SmartPointer& part) override; void PartBroughtToTop(const SmartPointer& part) override; void PartClosed(const SmartPointer& part) override; void PartDeactivated(const SmartPointer& part) override; void PartOpened(const SmartPointer& part) override; void WindowActivated(const SmartPointer& window) override; void WindowClosed(const SmartPointer& window) override; void WindowDeactivated(const SmartPointer& window) override; void WindowOpened(const SmartPointer& window) override; const IEditorInput* lastEditorInput; void HandleCheck(const SmartPointer& s); void CheckActivePart(); void CheckActivePart(bool updateShowInSelection); SmartPointer GetShowInSource(const SmartPointer& sourcePart) const; SmartPointer GetContext(const SmartPointer& sourcePart) const; IWorkbenchWindow* GetActiveWindow() const; void UpdateActivePart(ISourceProvider::StateMapType& currentState) const; void UpdateActivePart(ISourceProvider::StateMapType& currentState, bool updateShowInSelection) const; // Active Part SourceProvider /** * The display on which this provider is working. */ Display* display; /** * The last shell seen as active by this provider. This value may be * null if the last call to * Display.getActiveShell() returned null. */ WeakPointer lastActiveShell; /** * The last workbench window shell seen as active by this provider. This * value may be null if the last call to * workbench.getActiveWorkbenchWindow() returned * null. */ WeakPointer lastActiveWorkbenchWindowShell; /** * The last workbench window seen as active by this provider. This value may * be null if the last call to * workbench.getActiveWorkbenchWindow() returned * null. */ WeakPointer lastActiveWorkbenchWindow; /** * The result of the last visibility check on the toolbar of the last active * workbench window. */ SmartPointer lastToolbarVisibility; /** * The result of the last visibility check on the perspective bar of the * last active workbench window. */ SmartPointer lastPerspectiveBarVisibility; /** * The result of the last visibility check on the status line for the last * workbench window. */ SmartPointer lastStatusLineVisibility; /** * The last perspective id that was provided by this source. */ SmartPointer lastPerspectiveId; /** * The listener to individual window properties. */ void PropertyChange(const SmartPointer& event) override; void PropertyChange(const Object::Pointer& source, int propId) override; void PerspectiveActivated(const SmartPointer& page, const SmartPointer& perspective) override; using IPerspectiveListener::PerspectiveChanged; void PerspectiveChanged(const SmartPointer& page, const SmartPointer& perspective, const QString& changeId) override; bool eventFilter(QObject *obj, QEvent *event) override; /** * The listener to shell activations on the display. * Notifies all listeners that the source has changed. */ void HandleShellEvent(); void CheckOtherSources(const SmartPointer& s); void HandleInputChanged(const SmartPointer& editor); void HookListener(WorkbenchWindow* lastActiveWorkbenchWindow, WorkbenchWindow* newActiveWorkbenchWindow); void HookListener(IEditorPart* lastActiveEditor, IEditorPart* newActiveEditor); void UpdateActiveShell(ISourceProvider::StateMapType& currentState) const; IPartListener::Events::Types GetPartEventTypes() const override; IPerspectiveListener::Events::Types GetPerspectiveEventTypes() const override; }; } #endif // BERRYWORKBENCHSOURCEPROVIDER_H