18 #ifndef BERRYCOMMANDCONTRIBUTIONITEM_H_
19 #define BERRYCOMMANDCONTRIBUTIONITEM_H_
24 #include <QKeySequence>
29 struct ICommandService;
30 struct ICommandListener;
31 struct IHandlerService;
33 struct IElementReference;
34 struct IServiceLocator;
37 class ParameterizedCommand;
38 class CommandContributionItemParameter;
92 QKeySequence shortcut;
100 QScopedPointer<ICommandListener> commandListener;
102 QString dropDownMenuOverride;
106 QString helpContextId;
117 QString contributedLabel;
119 QIcon contributedIcon;
138 void Fill(QMenu* parent, QAction* before)
override;
140 void Fill(QToolBar* parent, QAction* before)
override;
144 void Update(
const QString&
id)
override;
146 bool IsEnabled()
const override;
148 bool IsVisible()
const override;
159 void UpdateMenuItem();
161 void UpdateToolItem();
169 void CreateCommand(
const QString& commandId,
const QHash<QString, Object::Pointer>& parameters);
171 QString GetToolTipText(
const QString& text)
const;
173 QString UpdateMnemonic(
const QString& s);
196 void SetIcon(
const QIcon& icon);
200 void SetText(
const QString& text);
202 void SetChecked(
bool checked);
204 void SetToolTip(
const QString& text);
208 void HandleActionDestroyed();
209 void HandleWidgetSelection();
static MsgHandler handler
static void Update(vtkPolyData *)
Implements transparent reference counting.
void Fill(QStatusBar *parent) override