Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
berryICommandService.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 BERRYICOMMANDSERVICE_H_
19 #define BERRYICOMMANDSERVICE_H_
20 
21 #include "../services/berryIDisposable.h"
22 
23 #include <QHash>
24 
25 namespace berry {
26 
27 struct IExecutionListener;
28 struct IHandler;
29 struct IElementReference;
30 
31 class UIElement;
32 class Command;
33 class CommandCategory;
34 class ParameterizedCommand;
35 class ParameterType;
36 
56 {
57 
59 
60 
64  static const QString AUTOGENERATED_CATEGORY_ID();
65 
79  virtual void AddExecutionListener(IExecutionListener* listener) = 0;
80 
93  virtual void DefineUncategorizedCategory(const QString& name, const QString& description) = 0;
94 
134  virtual SmartPointer<ParameterizedCommand> Deserialize(const QString& serializedParameterizedCommand) const = 0;
135 
147  virtual SmartPointer<CommandCategory> GetCategory(const QString& categoryId) const = 0;
148 
157  virtual SmartPointer<Command> GetCommand(const QString& commandId) const = 0;
158 
165  virtual QList<SmartPointer<CommandCategory> > GetDefinedCategories() const = 0;
166 
174  virtual QStringList GetDefinedCategoryIds() const = 0;
175 
183  virtual QStringList GetDefinedCommandIds() const = 0;
184 
191  virtual QList<SmartPointer<Command> > GetDefinedCommands() const = 0;
192 
200  virtual QStringList GetDefinedParameterTypeIds() const = 0;
201 
209  virtual QList<SmartPointer<ParameterType> > GetDefinedParameterTypes() const = 0;
210 
226  virtual QString GetHelpContextId(const SmartPointer<const Command>& command) const = 0;
227 
243  virtual QString GetHelpContextId(const QString& commandId) const = 0;
244 
255  virtual SmartPointer<ParameterType> GetParameterType(const QString& parameterTypeId) const = 0;
256 
266  virtual void ReadRegistry() = 0;
267 
274  virtual void RemoveExecutionListener(IExecutionListener* listener) = 0;
275 
287  virtual void SetHelpContextId(const SmartPointer<IHandler>& handler, const QString& helpContextId) = 0;
288 
311  virtual SmartPointer<IElementReference> RegisterElementForCommand(
312  const SmartPointer<ParameterizedCommand>& command,
313  const SmartPointer<UIElement>& element) = 0;
314 
330  virtual void RegisterElement(const SmartPointer<IElementReference>& elementReference) = 0;
331 
341  virtual void UnregisterElement(const SmartPointer<IElementReference>& elementReference) = 0;
342 
369  virtual void RefreshElements(const QString& commandId, const QHash<QString, Object::Pointer>& filter) = 0;
370 };
371 
372 }
373 
374 Q_DECLARE_INTERFACE(berry::ICommandService, "org.blueberry.ui.ICommandService")
375 
376 #endif /* BERRYICOMMANDSERVICE_H_ */
static MsgHandler handler
Definition: usUtils.cpp:261
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37
#define BERRY_UI_QT