Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berryIHandlerService.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 
14 #ifndef BERRYIHANDLERSERVICE_H_
15 #define BERRYIHANDLERSERVICE_H_
16 
18 
20 
21 namespace berry {
22 
23 class Command;
24 class ExecutionEvent;
25 class ParameterizedCommand;
26 class Expression;
27 class UIElement;
28 
29 struct IEvaluationContext;
30 struct IHandler;
31 struct IHandlerActivation;
32 
54 {
55 
57 
58  ~IHandlerService() override;
59 
79  virtual SmartPointer<IHandlerActivation> ActivateHandler(const SmartPointer<IHandlerActivation>& activation) = 0;
80 
105  virtual SmartPointer<IHandlerActivation> ActivateHandler(
106  const QString& commandId, const SmartPointer<IHandler>& handler) = 0;
107 
139  virtual SmartPointer<IHandlerActivation> ActivateHandler(
140  const QString& commandId,
141  const SmartPointer<IHandler>& handler,
142  const SmartPointer<Expression>& expression) = 0;
143 
181  virtual SmartPointer<IHandlerActivation> ActivateHandler(
182  const QString& commandId,
183  const SmartPointer<IHandler>& handler,
184  const SmartPointer<Expression>& expression, bool global) = 0;
185 
199  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
200  const SmartPointer<const Command>& command,
201  const SmartPointer<const UIElement>& uielement) = 0;
202 
218  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
220  const SmartPointer<const UIElement>& uielement) = 0;
221 
233  virtual void DeactivateHandler(const SmartPointer<IHandlerActivation>& activation) = 0;
234 
248  virtual void DeactivateHandlers(
249  const QList<SmartPointer<IHandlerActivation> >& activations) = 0;
250 
270  virtual Object::Pointer ExecuteCommand(const QString& commandId,
271  const SmartPointer<const UIElement>& uielement) = 0;
272 
292  virtual Object::Pointer ExecuteCommand(const SmartPointer<ParameterizedCommand>& command,
293  const SmartPointer<const UIElement>& uielement) = 0;
294 
321  virtual Object::Pointer ExecuteCommandInContext(
322  const SmartPointer<ParameterizedCommand>& command,
323  const SmartPointer<const UIElement>& uielement,
324  const SmartPointer<IEvaluationContext>& context) = 0;
325 
336  virtual SmartPointer<IEvaluationContext> CreateContextSnapshot(bool includeSelection) = 0;
337 
348  virtual SmartPointer<IEvaluationContext> GetCurrentState() const = 0;
349 
358  virtual void ReadRegistry() = 0;
359 
372  virtual void SetHelpContextId(const SmartPointer<IHandler>& handler, const QString& helpContextId) = 0;
373 };
374 
375 }
376 
377 Q_DECLARE_INTERFACE(berry::IHandlerService, "org.blueberry.ui.IHandlerService")
378 
379 #endif /* BERRYIHANDLERSERVICE_H_ */
berry::IServiceWithSources
Definition: berryIServiceWithSources.h:34
berry::SmartPointer
Implements transparent reference counting.
Definition: berryICommandCategoryListener.h:21
berryCommandExceptions.h
berryIServiceWithSources.h
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::IHandlerService
Definition: berryIHandlerService.h:53
berryObjectMacro
#define berryObjectMacro(...)
Definition: berryMacros.h:31
berry
Definition: QmitkPropertyItemModel.h:24