Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -363,6 +363,7 @@ void ContextPaneWidget::onTogglePane() ...@@ -363,6 +363,7 @@ void ContextPaneWidget::onTogglePane()
setLineButton(); setLineButton();
} else { } else {
deactivate(); deactivate();
emit closed();
} }
} }
......
...@@ -100,6 +100,7 @@ signals: ...@@ -100,6 +100,7 @@ signals:
void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool); void removeAndChangeProperty(const QString &, const QString &, const QVariant &, bool);
void pinnedChanged(bool); void pinnedChanged(bool);
void enabledChanged(bool); void enabledChanged(bool);
void closed();
private slots: private slots:
void onDisable(bool); void onDisable(bool);
......
...@@ -56,6 +56,8 @@ public: ...@@ -56,6 +56,8 @@ public:
virtual void setEnabled(bool) = 0; virtual void setEnabled(bool) = 0;
virtual bool isAvailable(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node) = 0; virtual bool isAvailable(TextEditor::BaseTextEditorEditable *editor, Document::Ptr doc, const QmlJS::Snapshot &snapshot, AST::Node *node) = 0;
virtual QWidget* widget() = 0; virtual QWidget* widget() = 0;
signals:
void closed();
}; };
} // namespace QmlJS } // namespace QmlJS
......
...@@ -367,6 +367,7 @@ ContextPaneWidget* QuickToolBar::contextWidget() ...@@ -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(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(enabledChanged(bool)), this, SLOT(onEnabledChanged(bool)));
connect(m_widget.data(), SIGNAL(pinnedChanged(bool)), this, SLOT(onPinnedChanged(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(); return m_widget.data();
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment