Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
berryCommandCategory.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 #ifndef BERRYCOMMANDCATEGORY_H_
18 #define BERRYCOMMANDCATEGORY_H_
19 
22 
24 
25 namespace berry
26 {
27 
36 {
37 
38 public:
39 
41 
49  void AddCategoryListener(ICommandCategoryListener* categoryListener);
50 
65  void Define(const QString& name, const QString& description);
66 
74  void RemoveCategoryListener(ICommandCategoryListener* categoryListener);
75 
76  /*
77  * (non-Javadoc)
78  *
79  * @see org.eclipse.core.commands.common.HandleObject#toString()
80  */
81  QString ToString() const override;
82 
83  /*
84  * (non-Javadoc)
85  *
86  * @see org.eclipse.core.commands.common.HandleObject#undefine()
87  */
88  void Undefine() override;
89 
90 protected:
91 
92  friend class CommandManager;
93 
105  CommandCategory(const QString& id);
106 
107 private:
108 
116  void FireCategoryChanged(const SmartPointer<CommandCategoryEvent> categoryEvent);
117 
122  ICommandCategoryListener::Events categoryEvents;
123 };
124 
125 }
126 
127 #endif /* BERRYCOMMANDCATEGORY_H_ */
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:37