forked from qt-creator/qt-creator
QmlJSEditor: extending IContextPane with a signal
closed() is emitted when the pane is hidden/closed.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user