Commit 2c160a9b authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlJSEditor: extending IContextPane with a signal

closed() is emitted when the pane is hidden/closed.
parent bc28e5d9
......@@ -363,6 +363,7 @@ void ContextPaneWidget::onTogglePane()
setLineButton();
} else {
deactivate();
emit closed();
}
}
......
......@@ -100,6 +100,7 @@ signals:
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool);
void pinnedChanged(bool);
void enabledChanged(bool);
void closed();
private slots:
void onDisable(bool);
......
......@@ -56,6 +56,8 @@ public:
virtual void setEnabled(bool) = 0;
virtual bool isAvailable(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node) = 0;
virtual QWidget* widget() = 0;
signals:
void closed();
};
} // namespace QmlJS
......
......@@ -367,6 +367,7 @@ ContextPaneWidget* QuickToolBar::contextWidget()
connect(m_widget.data(), SIGNAL(removeAndChangeProperty(QString,QString,QVariant, bool)), this, SLOT(onPropertyRemovedAndChange(QString,QString,QVariant, bool)));
connect(m_widget.data(), SIGNAL(enabledChanged(bool)), this, SLOT(onEnabledChanged(bool)));
connect(m_widget.data(), SIGNAL(pinnedChanged(bool)), this, SLOT(onPinnedChanged(bool)));
connect(m_widget.data(), SIGNAL(closed()), this, SIGNAL(closed()));
}
return m_widget.data();
}
......
Supports Markdown
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