Medical Imaging Interaction Toolkit  2025.12.02
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 
80 
106  const QString& commandId, const SmartPointer<IHandler>& handler) = 0;
107 
140  const QString& commandId,
141  const SmartPointer<IHandler>& handler,
142  const SmartPointer<Expression>& expression) = 0;
143 
182  const QString& commandId,
183  const SmartPointer<IHandler>& handler,
184  const SmartPointer<Expression>& expression, bool global) = 0;
185 
200  const SmartPointer<const Command>& command,
201  const SmartPointer<const UIElement>& uielement) = 0;
202 
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 
293  const SmartPointer<const UIElement>& uielement) = 0;
294 
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 
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_ */
Implements transparent reference counting.
#define BERRY_UI_QT
virtual SmartPointer< const ExecutionEvent > CreateExecutionEvent(const SmartPointer< const ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement)=0
virtual SmartPointer< IEvaluationContext > CreateContextSnapshot(bool includeSelection)=0
virtual Object::Pointer ExecuteCommand(const SmartPointer< ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement)=0
virtual SmartPointer< IHandlerActivation > ActivateHandler(const QString &commandId, const SmartPointer< IHandler > &handler)=0
virtual void SetHelpContextId(const SmartPointer< IHandler > &handler, const QString &helpContextId)=0
virtual void DeactivateHandlers(const QList< SmartPointer< IHandlerActivation > > &activations)=0
virtual void DeactivateHandler(const SmartPointer< IHandlerActivation > &activation)=0
virtual SmartPointer< IEvaluationContext > GetCurrentState() const =0
virtual Object::Pointer ExecuteCommandInContext(const SmartPointer< ParameterizedCommand > &command, const SmartPointer< const UIElement > &uielement, const SmartPointer< IEvaluationContext > &context)=0
virtual SmartPointer< IHandlerActivation > ActivateHandler(const SmartPointer< IHandlerActivation > &activation)=0
virtual Object::Pointer ExecuteCommand(const QString &commandId, const SmartPointer< const UIElement > &uielement)=0
berryObjectMacro(berry::IHandlerService)
virtual SmartPointer< IHandlerActivation > ActivateHandler(const QString &commandId, const SmartPointer< IHandler > &handler, const SmartPointer< Expression > &expression)=0
virtual SmartPointer< const ExecutionEvent > CreateExecutionEvent(const SmartPointer< const Command > &command, const SmartPointer< const UIElement > &uielement)=0
~IHandlerService() override
virtual void ReadRegistry()=0
virtual SmartPointer< IHandlerActivation > ActivateHandler(const QString &commandId, const SmartPointer< IHandler > &handler, const SmartPointer< Expression > &expression, bool global)=0