Commit dff3dc49 authored by Alexander Semke's avatar Alexander Semke
Browse files

Redesigned settings widgets for python (moved autorun and documentation

to new tabs) and the proper initalization of QtHelpWidget for python.
parent b8c30d91
......@@ -15,17 +15,19 @@
Boston, MA 02110-1301, USA.
---
Copyright (C) 2020 Alexander Semke <alexander.semke@web.de>
Copyright (C) 2020 Shubham <aryan100jangid@gmail.com>
*/
#include "pythonsettingswidget.h"
#include "../qthelpconfig.h"
PythonSettingsWidget::PythonSettingsWidget(QWidget *parent) : QWidget(parent)
PythonSettingsWidget::PythonSettingsWidget(QWidget* parent, const QString& id) : QWidget(parent)
{
setupUi(this);
// Add QtHelp widget
QtHelpConfig* docWidget = new QtHelpConfig(QLatin1String("python"));
static_cast<QGridLayout*>(this->layout())->addWidget(docWidget, 8, 0, 1, 5);
QtHelpConfig* docWidget = new QtHelpConfig(id);
auto hboxLayout = new QHBoxLayout(tabDocumentation);
hboxLayout->addWidget(docWidget);
}
......@@ -15,6 +15,7 @@
Boston, MA 02110-1301, USA.
---
Copyright (C) 2020 Alexander Semke <alexander.semke@web.de>
Copyright (C) 2020 Shubham <aryan100jangid@gmail.com>
*/
......@@ -28,7 +29,7 @@ class PythonSettingsWidget : public QWidget, public Ui::PythonSettingsBase
Q_OBJECT
public:
explicit PythonSettingsWidget(QWidget *parent = nullptr);
explicit PythonSettingsWidget(QWidget *parent = nullptr, const QString& id = QString());
};
#endif /* _PYTHONSETTINGSWIDGET_H */
......@@ -6,194 +6,205 @@
<rect>
<x>0</x>
<y>0</y>
<width>621</width>
<height>561</height>
<width>641</width>
<height>317</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="3">
<widget class="KUrlRequester" name="kcfg_pythonServerPath"/>
</item>
<item row="1" column="3">
<widget class="KUrlRequester" name="kcfg_localDoc">
<property name="toolTip">
<string>If empty, the &quot;Show help&quot; action will show the default online documentation. Otherwise, the specified URL will be opened.</string>
</property>
</widget>
</item>
<item row="2" column="3">
<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="3" column="3">
<widget class="QCheckBox" name="kcfg_variableManagement">
<property name="toolTip">
<string>Monitor the creation and destruction of variables and show the existing variables in the variable panel.</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
<item row="4" column="3">
<widget class="KComboBox" name="kcfg_choosenGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Matplotlib (with seaborn, ggplot support too)</string>
</property>
</item>
<item>
<property name="text">
<string>Plot.ly</string>
</property>
</item>
<item>
<property name="text">
<string>All supported</string>
</property>
</item>
</widget>
</item>
<item row="5" column="0" colspan="3">
<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>
<item row="5" column="3">
<widget class="KComboBox" name="kcfg_plotExtenstionGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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="6" column="2">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="0" colspan="4">
<widget class="QGroupBox" name="groupBox">
<property name="toolTip">
<string>Commands to automatically run on start. They can be useful for loading needed modules, changing environment, etc.</string>
</property>
<property name="title">
<string>Commands to autorun</string>
</property>
<layout class="QVBoxLayout" name="verticalLayoutScripts">
<item>
<widget class="KEditListWidget" name="kcfg_autorunScripts"/>
</item>
</layout>
</widget>
</item>
<item row="8" 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" colspan="3">
<widget class="QLabel" name="label3">
<property name="text">
<string>Executable:</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="label2">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Documentation:</string>
</property>
</widget>
</item>
<item row="2" column="0" colspan="3">
<widget class="QLabel" name="lPlotIntegration">
<property name="text">
<string>Plot Integration:</string>
</property>
</widget>
</item>
<item row="3" column="0" colspan="3">
<widget class="QLabel" name="lVariableManagement">
<property name="text">
<string>Variable Management:</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="3">
<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>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QLabel" name="label3">
<property name="text">
<string>Executable:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="KUrlRequester" name="kcfg_pythonServerPath"/>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label2">
<property name="toolTip">
<string/>
</property>
<property name="text">
<string>Documentation:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="KUrlRequester" name="kcfg_localDoc">
<property name="toolTip">
<string>If empty, the &quot;Show help&quot; action will show the default online documentation. Otherwise, the specified URL will be opened.</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="lPlotIntegration">
<property name="text">
<string>Plot Integration:</string>
</property>
</widget>
</item>
<item row="2" 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="3" column="0">
<widget class="QLabel" name="lVariableManagement">
<property name="text">
<string>Variable Management:</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="kcfg_variableManagement">
<property name="toolTip">
<string>Monitor the creation and destruction of variables and show the existing variables in the variable panel.</string>
</property>
<property name="text">
<string>Enabled</string>
</property>
</widget>
</item>
<item row="4" 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="1">
<widget class="KComboBox" name="kcfg_choosenGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Matplotlib (with seaborn, ggplot support too)</string>
</property>
</item>
<item>
<property name="text">
<string>Plot.ly</string>
</property>
</item>
<item>
<property name="text">
<string>All supported</string>
</property>
</item>
</widget>
</item>
<item row="5" 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>
<item row="5" column="1">
<widget class="KComboBox" name="kcfg_plotExtenstionGraphicPackage">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</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="6" column="0">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabAutorun">
<attribute name="title">
<string>Autorun</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Commands to autorun</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="KEditListWidget" name="kcfg_autorunScripts"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabDocumentation">
<attribute name="title">
<string>Documentation</string>
</attribute>
</widget>
</widget>
</item>
</layout>
......
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