Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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 
140  virtual SmartPointer<IHandlerActivation> ActivateHandler(
141  const QString& commandId,
142  const SmartPointer<IHandler>& handler,
143  const SmartPointer<Expression>& expression) = 0;
144 
182  virtual SmartPointer<IHandlerActivation> ActivateHandler(
183  const QString& commandId,
184  const SmartPointer<IHandler>& handler,
185  const SmartPointer<Expression>& expression, bool global) = 0;
186 
202  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
203  const SmartPointer<const Command>& command,
204  const SmartPointer<const UIElement>& uielement) = 0;
205 
223  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
225  const SmartPointer<const UIElement>& uielement) = 0;
226 
238  virtual void DeactivateHandler(const SmartPointer<IHandlerActivation>& activation) = 0;
239 
253  virtual void DeactivateHandlers(
254  const QList<SmartPointer<IHandlerActivation> >& activations) = 0;
255 
277  virtual Object::Pointer ExecuteCommand(const QString& commandId,
278  const SmartPointer<const UIElement>& uielement) = 0;
279 
301  virtual Object::Pointer ExecuteCommand(const SmartPointer<ParameterizedCommand>& command,
302  const SmartPointer<const UIElement>& uielement) = 0;
303 
332  virtual Object::Pointer ExecuteCommandInContext(
333  const SmartPointer<ParameterizedCommand>& command,
334  const SmartPointer<const UIElement>& uielement,
335  const SmartPointer<IEvaluationContext>& context) = 0;
336 
347  virtual SmartPointer<IEvaluationContext> CreateContextSnapshot(bool includeSelection) = 0;
348 
360  virtual SmartPointer<IEvaluationContext> GetCurrentState() const = 0;
361 
370  virtual void ReadRegistry() = 0;
371 
384  virtual void SetHelpContextId(const SmartPointer<IHandler>& handler, const QString& helpContextId) = 0;
385 };
386 
387 }
388 
389 Q_DECLARE_INTERFACE(berry::IHandlerService, "org.blueberry.ui.IHandlerService")
390 
391 #endif /* BERRYIHANDLERSERVICE_H_ */
static MsgHandler handler
Definition: usUtils.cpp:261
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33
#define BERRY_UI_QT