Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berryICommandService.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 BERRYICOMMANDSERVICE_H_
15 #define BERRYICOMMANDSERVICE_H_
16 
17 #include "../services/berryIDisposable.h"
18 
19 #include <QHash>
20 
21 namespace berry {
22 
23 struct IExecutionListener;
24 struct IHandler;
25 struct IElementReference;
26 
27 class UIElement;
28 class Command;
29 class CommandCategory;
30 class ParameterizedCommand;
31 class ParameterType;
32 
52 {
53 
55 
60  static const QString AUTOGENERATED_CATEGORY_ID();
61 
75  virtual void AddExecutionListener(IExecutionListener* listener) = 0;
76 
89  virtual void DefineUncategorizedCategory(const QString& name, const QString& description) = 0;
90 
130  virtual SmartPointer<ParameterizedCommand> Deserialize(const QString& serializedParameterizedCommand) const = 0;
131 
143  virtual SmartPointer<CommandCategory> GetCategory(const QString& categoryId) const = 0;
144 
153  virtual SmartPointer<Command> GetCommand(const QString& commandId) const = 0;
154 
161  virtual QList<SmartPointer<CommandCategory> > GetDefinedCategories() const = 0;
162 
170  virtual QStringList GetDefinedCategoryIds() const = 0;
171 
179  virtual QStringList GetDefinedCommandIds() const = 0;
180 
187  virtual QList<SmartPointer<Command> > GetDefinedCommands() const = 0;
188 
196  virtual QStringList GetDefinedParameterTypeIds() const = 0;
197 
205  virtual QList<SmartPointer<ParameterType> > GetDefinedParameterTypes() const = 0;
206 
222  virtual QString GetHelpContextId(const SmartPointer<const Command>& command) const = 0;
223 
239  virtual QString GetHelpContextId(const QString& commandId) const = 0;
240 
251  virtual SmartPointer<ParameterType> GetParameterType(const QString& parameterTypeId) const = 0;
252 
262  virtual void ReadRegistry() = 0;
263 
270  virtual void RemoveExecutionListener(IExecutionListener* listener) = 0;
271 
283  virtual void SetHelpContextId(const SmartPointer<IHandler>& handler, const QString& helpContextId) = 0;
284 
307  virtual SmartPointer<IElementReference> RegisterElementForCommand(
308  const SmartPointer<ParameterizedCommand>& command,
309  const SmartPointer<UIElement>& element) = 0;
310 
326  virtual void RegisterElement(const SmartPointer<IElementReference>& elementReference) = 0;
327 
337  virtual void UnregisterElement(const SmartPointer<IElementReference>& elementReference) = 0;
338 
365  virtual void RefreshElements(const QString& commandId, const QHash<QString, Object::Pointer>& filter) = 0;
366 };
367 
368 }
369 
370 Q_DECLARE_INTERFACE(berry::ICommandService, "org.blueberry.ui.ICommandService")
371 
372 #endif /* BERRYICOMMANDSERVICE_H_ */
berry::IExecutionListener
Definition: berryIExecutionListener.h:35
berry::IDisposable
Definition: berryIDisposable.h:45
berry::SmartPointer
Implements transparent reference counting.
Definition: berryICommandCategoryListener.h:21
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
berry::ICommandService
Definition: berryICommandService.h:51
berryObjectMacro
#define berryObjectMacro(...)
Definition: berryMacros.h:31
berry
Definition: QmitkPropertyItemModel.h:24