Commit 3f623125 authored by Alexander Semke's avatar Alexander Semke

[cas] react on requests to show the panel for the integrated help in

Cantor.
parent 54a190aa
......@@ -72,6 +72,7 @@ void CantorWorksheetDock::setCantorWorksheets(QList<CantorWorksheet*> list) {
for (auto* plugin : plugins) {
if (plugin->name() == QLatin1String("File Browser"))
continue;
connect(plugin, &Cantor::PanelPlugin::visibilityRequested, this, &CantorWorksheetDock::visibilityRequested);
plugin->setParentWidget(this);
int i = ui.tabWidget->addTab(plugin->widget(), plugin->name());
index.append(i);
......@@ -104,6 +105,16 @@ void CantorWorksheetDock::restartBackend() {
m_worksheet->part()->action("restart_backend")->trigger();
}
/*!
* this slot is called when the visibility for one of the panels in Cantor is requested.
* At the moment this can only happen for the integrated help in Maxima, R, etc.
* Here we hard-code the selection of the second tab being for the help.
* TODO: improve this logic without hard-coding for a fixed index.
*/
void CantorWorksheetDock::visibilityRequested() {
ui.tabWidget->setCurrentIndex(1);
}
//*************************************************************
//******** SLOTs for changes triggered in CantorWorksheet ***********
//*************************************************************
......
......@@ -57,9 +57,11 @@ private slots:
//"General"-tab
void evaluateWorksheet();
void restartBackend();
void visibilityRequested();
//SLOTs for changes triggered in Worksheet
void worksheetDescriptionChanged(const AbstractAspect*);
signals:
void info(const QString&);
......
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