Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryIHandlerService.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 BlueBerry Platform
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 
18 #ifndef BERRYIHANDLERSERVICE_H_
19 #define BERRYIHANDLERSERVICE_H_
20 
22 
24 
25 namespace berry {
26 
27 class Command;
28 class ExecutionEvent;
29 class ParameterizedCommand;
30 class Expression;
31 class UIElement;
32 
33 struct IEvaluationContext;
34 struct IHandler;
35 struct IHandlerActivation;
36 
58 {
59 
61 
62  ~IHandlerService();
63 
83  virtual SmartPointer<IHandlerActivation> ActivateHandler(const SmartPointer<IHandlerActivation>& activation) = 0;
84 
109  virtual SmartPointer<IHandlerActivation> ActivateHandler(
110  const QString& commandId, const SmartPointer<IHandler>& handler) = 0;
111 
144  virtual SmartPointer<IHandlerActivation> ActivateHandler(
145  const QString& commandId,
146  const SmartPointer<IHandler>& handler,
147  const SmartPointer<Expression>& expression) = 0;
148 
186  virtual SmartPointer<IHandlerActivation> ActivateHandler(
187  const QString& commandId,
188  const SmartPointer<IHandler>& handler,
189  const SmartPointer<Expression>& expression, bool global) = 0;
190 
206  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
207  const SmartPointer<const Command>& command,
208  const SmartPointer<const UIElement>& uielement) = 0;
209 
227  virtual SmartPointer<const ExecutionEvent> CreateExecutionEvent(
229  const SmartPointer<const UIElement>& uielement) = 0;
230 
242  virtual void DeactivateHandler(const SmartPointer<IHandlerActivation>& activation) = 0;
243 
257  virtual void DeactivateHandlers(
258  const QList<SmartPointer<IHandlerActivation> >& activations) = 0;
259 
281  virtual Object::Pointer ExecuteCommand(const QString& commandId,
282  const SmartPointer<const UIElement>& uielement) = 0;
283 
305  virtual Object::Pointer ExecuteCommand(const SmartPointer<ParameterizedCommand>& command,
306  const SmartPointer<const UIElement>& uielement) = 0;
307 
336  virtual Object::Pointer ExecuteCommandInContext(
337  const SmartPointer<ParameterizedCommand>& command,
338  const SmartPointer<const UIElement>& uielement,
339  const SmartPointer<IEvaluationContext>& context) = 0;
340 
351  virtual SmartPointer<IEvaluationContext> CreateContextSnapshot(bool includeSelection) = 0;
352 
364  virtual SmartPointer<IEvaluationContext> GetCurrentState() const = 0;
365 
374  virtual void ReadRegistry() = 0;
375 
388  virtual void SetHelpContextId(const SmartPointer<IHandler>& handler, const QString& helpContextId) = 0;
389 };
390 
391 }
392 
393 Q_DECLARE_INTERFACE(berry::IHandlerService, "org.blueberry.ui.IHandlerService")
394 
395 #endif /* BERRYIHANDLERSERVICE_H_ */
static MsgHandler handler
Definition: usUtils.cpp:261
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37
#define BERRY_UI_QT