Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
berryQActionContributionItem.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 BERRYQACTIONCONTRIBUTIONITEM_H
15 #define BERRYQACTIONCONTRIBUTIONITEM_H
16 
17 #include "berryContributionItem.h"
18 
19 namespace berry {
20 
28 {
29 
30 public:
31 
38  QActionContributionItem(QAction* action, const QString& id);
39 
40  ~QActionContributionItem() override;
41 
46  bool operator==(const Object* o) const override;
47 
48  uint HashCode() const override;
49 
57  void Fill(QStatusBar* parent) override;
58 
67  void Fill(QMenu* parent, QAction *before) override;
68 
77  void Fill(QToolBar* parent, QAction* before) override;
78 
80 
86  QAction* GetAction() const;
87 
96  Modes GetMode() const;
97 
103  bool IsDynamic() const override;
104 
105  /*
106  * Method declared on IContributionItem.
107  */
108  bool IsEnabled() const override;
109 
116  bool IsVisible() const override;
117 
125  void SetMode(Modes mode);
126 
131  void Update() override;
132 
140  void Update(const QString& propertyName) override;
141 
142 protected:
143 
150  bool IsEnabledAllowed() const;
151 
165  //QString ShortenText(const QString& textValue, QToolButton* item);
166 
167 private:
168 
174  //Listener GetToolItemListener();
175 
179  //void HandleWidgetDispose(Event e);
180 
184  //void HandleWidgetSelection(Event e, bool selection);
185 
194  //bool HasImages(Action* actionToCheck) const;
195 
199  bool IsCommandActive() const;
200 
211  //bool UpdateImages(bool forceImage);
212 
216  //void DisposeOldImages();
217 
224  //Listener getMenuCreatorListener();
225 
232  //void HandleShowProxy(QMenu* proxy);
233 
243  //void CopyMenu(QMenu* realMenu, QMenu* proxy);
244 
251  //void HandleHideProxy(QMenu* proxy);
252 
253 private:
254 
259  //QMenu* holdMenu = null;
260 
261  //bool menuCreatorCalled = false;
262 
263 
265  //static const QString ellipsis = "...";
266 
270  Modes mode; // = 0;
271 
275  QAction* action;
276 
277 };
278 
279 }
280 
281 #endif // BERRYQACTIONCONTRIBUTIONITEM_H
berryContributionItem.h
berry::Object
Light weight base class for most BlueBerry classes.
Definition: berryObject.h:72
berry::ContributionItem::Fill
void Fill(QStatusBar *parent) override
berry::ContributionItem
Definition: berryContributionItem.h:26
BERRY_UI_QT
#define BERRY_UI_QT
Definition: org_blueberry_ui_qt_Export.h:26
mitk::operator==
MITKCORE_EXPORT bool operator==(const InteractionEvent &a, const InteractionEvent &b)
berry::QActionContributionItem
Definition: berryQActionContributionItem.h:27
berry
Definition: QmitkPropertyItemModel.h:24