Medical Imaging Interaction Toolkit  2018.4.99-b20efe7f
Medical Imaging Interaction Toolkit
berryCommandCategory.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 #ifndef BERRYCOMMANDCATEGORY_H_
14 #define BERRYCOMMANDCATEGORY_H_
15 
18 
20 
21 namespace berry
22 {
23 
32 {
33 
34 public:
35 
37 
45  void AddCategoryListener(ICommandCategoryListener* categoryListener);
46 
61  void Define(const QString& name, const QString& description);
62 
70  void RemoveCategoryListener(ICommandCategoryListener* categoryListener);
71 
72  /*
73  * (non-Javadoc)
74  *
75  * @see org.eclipse.core.commands.common.HandleObject#toString()
76  */
77  QString ToString() const override;
78 
79  /*
80  * (non-Javadoc)
81  *
82  * @see org.eclipse.core.commands.common.HandleObject#undefine()
83  */
84  void Undefine() override;
85 
86 protected:
87 
88  friend class CommandManager;
89 
101  CommandCategory(const QString& id);
102 
103 private:
104 
112  void FireCategoryChanged(const SmartPointer<CommandCategoryEvent> categoryEvent);
113 
118  ICommandCategoryListener::Events categoryEvents;
119 };
120 
121 }
122 
123 #endif /* BERRYCOMMANDCATEGORY_H_ */
Implements transparent reference counting.
#define berryObjectMacro(...)
Definition: berryMacros.h:33