14 #ifndef BERRYCOMMANDCONTRIBUTIONITEM_H_
15 #define BERRYCOMMANDCONTRIBUTIONITEM_H_
20 #include <QKeySequence>
25 struct ICommandService;
26 struct ICommandListener;
27 struct IHandlerService;
29 struct IElementReference;
30 struct IServiceLocator;
33 class ParameterizedCommand;
34 class CommandContributionItemParameter;
87 QKeySequence shortcut;
95 QScopedPointer<ICommandListener> commandListener;
97 QString dropDownMenuOverride;
101 QString helpContextId;
112 QString contributedLabel;
114 QIcon contributedIcon;
133 void Fill(QMenu* parent, QAction* before)
override;
135 void Fill(QToolBar* parent, QAction* before)
override;
137 void Update()
override;
139 void Update(
const QString&
id)
override;
141 bool IsEnabled()
const override;
143 bool IsVisible()
const override;
154 void UpdateMenuItem();
156 void UpdateToolItem();
164 void CreateCommand(
const QString& commandId,
const QHash<QString, Object::Pointer>& parameters);
166 QString GetToolTipText(
const QString& text)
const;
168 QString UpdateMnemonic(
const QString& s);
191 void SetIcon(
const QIcon& icon);
195 void SetText(
const QString& text);
197 void SetChecked(
bool checked);
199 void SetToolTip(
const QString& text);
203 void HandleActionDestroyed();
204 void HandleWidgetSelection();