Commit d8f36700 authored by Marco Bubke's avatar Marco Bubke

QmlDesigner: Make defaultAction method public

Change-Id: Iae347b33dc2e8d74c99cee7fd2ee837bc7a4e1ae
Reviewed-by: default avatarThomas Hartmann <Thomas.Hartmann@digia.com>
parent 0d0c5057
......@@ -78,8 +78,9 @@ DefaultAction::DefaultAction(const QString &description)
connect(this, SIGNAL(triggered(bool)), this, SLOT(actionTriggered(bool)));
}
void DefaultAction::actionTriggered(bool)
void DefaultAction::actionTriggered(bool enable)
{
emit triggered(enable, m_selectionContext);
}
void DefaultAction::setSelectionContext(const SelectionContext &selectionContext)
......
......@@ -45,8 +45,11 @@ class QMLDESIGNERCORE_EXPORT DefaultAction : public QAction
public:
DefaultAction(const QString &description);
signals:
void triggered(bool checked, const SelectionContext &selectionContext);
public slots: //virtual method instead of slot
virtual void actionTriggered(bool);
virtual void actionTriggered(bool enable);
void setSelectionContext(const SelectionContext &selectionContext);
protected:
......@@ -59,14 +62,15 @@ public:
DefaultDesignerAction(const QString &description = QString());
DefaultDesignerAction(DefaultAction *action);
QAction *action() const { return m_action; }
QAction *action() const;
DefaultAction *defaultAction() const;
void currentContextChanged(const SelectionContext &selectionContext);
protected:
virtual void updateContext();
virtual bool isVisible(const SelectionContext &selectionContext) const = 0;
virtual bool isEnabled(const SelectionContext &selectionContext) const = 0;
DefaultAction *defaultAction() const;
SelectionContext selectionContext() const;
private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment