Commit 04958c12 authored by Alexander Semke's avatar Alexander Semke
Browse files

[python] remove the option "graphic packages for integrated plots".

This option doesn't make much sense. We either support integrated plots or not independent of which
package is used internlally to generate plots. There is no such option for other backends, removing it for python now, too.

Also, some minor improvements for the wording of some tooltip texts.
parent 30476363
Pipeline #152903 passed with stage
in 4 minutes and 24 seconds
......@@ -34,7 +34,7 @@
<choice name="pyplot"/>
<choice name="gadfly"/>
</choices>
<label>Graphical package, for which will be enable support for embedding plots</label>
<label>Graphical package for the Plot-Assistant</label>
<default>0</default>
</entry>
</group>
......
......@@ -92,10 +92,10 @@
<item row="4" column="0">
<widget class="QLabel" name="label3">
<property name="toolTip">
<string>Graphic package, which code will be used for plotting via &quot;Plot&quot; Cantor menu.</string>
<string>Graphic package to be used in the Plot Assistant</string>
</property>
<property name="text">
<string>Graphic Package for &quot;Plot&quot;-assistant</string>
<string>Package for Plot Assistant</string>
</property>
</widget>
</item>
......@@ -107,6 +107,9 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Graphic package to be used in the Plot Assistant</string>
</property>
<item>
<property name="text">
<string>GR</string>
......
......@@ -17,15 +17,6 @@
<entry name="autorunScripts" type="StringList">
<label>List of scripts to autorun at the beginning of session</label>
</entry>
<entry name="choosenGraphicPackage" type="Enum">
<choices>
<choice name="matplotlib"/>
<choice name="plotly"/>
<choice name="all"/>
</choices>
<label>Graphical package, for which will be enable support for embedding plots</label>
<default>0</default>
</entry>
<entry name="plotExtenstionGraphicPackage" type="Enum">
<choices>
<choice name="matplotlib"/>
......@@ -34,7 +25,7 @@
<choice name="gr"/>
<choice name="bokeh"/>
</choices>
<label>Graphical package, for which will be enable support for embedding plots</label>
<label>Graphical package for the Plot-Assistant</label>
<default>0</default>
</entry>
</group>
......
......@@ -298,36 +298,7 @@ QString PythonSession::plotFilePrefixPath()
void PythonSession::updateGraphicPackagesFromSettings()
{
QList<Cantor::GraphicPackage> enabledInSettingPackages;
if (PythonSettings::integratePlots())
{
int val = PythonSettings::choosenGraphicPackage();
if (val != PythonSettings::EnumChoosenGraphicPackage::all)
{
QString searchId;
Q_ASSERT(PythonSettings::EnumChoosenGraphicPackage::COUNT == 3);
if (val == PythonSettings::EnumChoosenGraphicPackage::matplotlib)
searchId = QLatin1String("matplotlib");
else if (val == PythonSettings::EnumChoosenGraphicPackage::plotly)
searchId = QLatin1String("plotly");
for (const auto& package : backend()->availableGraphicPackages())
{
if (package.id() == searchId)
{
enabledInSettingPackages = QList<Cantor::GraphicPackage>{package};
break;
}
}
}
else
{
enabledInSettingPackages = backend()->availableGraphicPackages();
}
}
updateEnabledGraphicPackages(enabledInSettingPackages, m_plotFilePrefixPath);
updateEnabledGraphicPackages(backend()->availableGraphicPackages(), m_plotFilePrefixPath);
}
QString PythonSession::graphicPackageErrorMessage(QString packageId) const
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>566</width>
<height>296</height>
<width>401</width>
<height>278</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
......@@ -21,39 +21,51 @@
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="3" column="1">
<widget class="KComboBox" name="kcfg_plotExtenstionGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="1" column="0">
<widget class="QLabel" name="lVariableManagement">
<property name="text">
<string>Variable Management:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lPlotIntegration">
<property name="text">
<string>Plot Integration:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label4">
<property name="toolTip">
<string>Graphic package to be used in the Plot Assistant</string>
</property>
<property name="text">
<string>Package for Plot Assistant</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="kcfg_integratePlots">
<property name="toolTip">
<string>If enabled, plots will be shown inside of the worksheet. Otherwise, plots will be shown in an external window.</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
<item>
<property name="text">
<string>matplotlib</string>
</property>
</item>
<item>
<property name="text">
<string>pylab</string>
</property>
</item>
<item>
<property name="text">
<string>plot.ly</string>
</property>
</item>
<item>
<property name="text">
<string>GR</string>
</property>
</item>
<item>
<property name="text">
<string>bokeh</string>
</property>
</item>
</widget>
</item>
<item row="1" column="1">
......@@ -67,85 +79,41 @@
</widget>
</item>
<item row="2" column="1">
<widget class="KComboBox" name="kcfg_choosenGraphicPackage">
<widget class="KComboBox" name="kcfg_plotExtenstionGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Graphic package to be used in the Plot Assistant</string>
</property>
<item>
<property name="text">
<string>Matplotlib (with seaborn, ggplot support too)</string>
<string>matplotlib</string>
</property>
</item>
<item>
<property name="text">
<string>Plot.ly</string>
<string>pylab</string>
</property>
</item>
<item>
<property name="text">
<string>All supported</string>
<string>plot.ly</string>
</property>
</item>
<item>
<property name="text">
<string>GR</string>
</property>
</item>
<item>
<property name="text">
<string>bokeh</string>
</property>
</item>
</widget>
</item>
<item row="0" column="1">
<widget class="QCheckBox" name="kcfg_integratePlots">
<property name="toolTip">
<string>If enabled, plots will be shown inside of the worksheet. Otherwise, plots will be shown in an external window.</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lPlotIntegration">
<property name="text">
<string>Plot Integration:</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="lVariableManagement">
<property name="text">
<string>Variable Management:</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label">
<property name="toolTip">
<string>Graphic package, used for plotting. When integrated plots option is enabled, then plots from the package will be integrated to worksheet</string>
</property>
<property name="text">
<string>Graphic Package: </string>
</property>
</widget>
</item>
<item row="4" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label4">
<property name="toolTip">
<string>Graphic package, which code will be used for plotting via &quot;Plot&quot; Cantor menu.</string>
</property>
<property name="text">
<string>Graphic Package for &quot;Plot&quot;-assistant</string>
</property>
</widget>
</item>
</layout>
......
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