Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Education
Cantor
Commits
985dffad
Commit
985dffad
authored
Nov 20, 2020
by
Alexander Semke
Browse files
Redesigned the settings widget for Scilab.
parent
76928b72
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/backends/lua/luasettingswidget.h
View file @
985dffad
...
...
@@ -19,7 +19,7 @@
*/
#ifndef LUASETTINGSWIDGET_H
#define LUA
MA
SETTINGSWIDGET_H
#define LUASETTINGSWIDGET_H
#include "ui_settings.h"
#include "../backendsettingswidget.h"
...
...
src/backends/scilab/CMakeLists.txt
View file @
985dffad
...
...
@@ -6,6 +6,8 @@ set( ScilabBackend_SRCS
scilabkeywords.cpp
scilabhighlighter.cpp
scilabcompletionobject.cpp
scilabsettingswidget.cpp
../backendsettingswidget.cpp
)
kconfig_add_kcfg_files
(
ScilabBackend_SRCS settings.kcfgc
)
...
...
@@ -15,7 +17,7 @@ ki18n_wrap_ui(ScilabBackend_SRCS settings.ui)
add_backend
(
scilabbackend
${
ScilabBackend_SRCS
}
)
target_link_libraries
(
cantor_scilabbackend
target_link_libraries
(
cantor_scilabbackend
cantor_help
KF5::KIOCore
KF5::SyntaxHighlighting
)
...
...
src/backends/scilab/scilabbackend.cpp
View file @
985dffad
...
...
@@ -16,13 +16,14 @@
---
Copyright (C) 2011 Filipe Saraiva <filipe@kde.org>
Copyright (C) 2020 Alexander Semke <alexander.semke@web.de>
*/
#include "scilabbackend.h"
#include "scilabsession.h"
#include "scilabextensions.h"
#include "scilabsettingswidget.h"
#include "settings.h"
#include "ui_settings.h"
ScilabBackend
::
ScilabBackend
(
QObject
*
parent
,
const
QList
<
QVariant
>
args
)
:
Cantor
::
Backend
(
parent
,
args
)
...
...
@@ -68,10 +69,7 @@ bool ScilabBackend::requirementsFullfilled(QString* const reason) const
QWidget
*
ScilabBackend
::
settingsWidget
(
QWidget
*
parent
)
const
{
QWidget
*
widget
=
new
QWidget
(
parent
);
Ui
::
ScilabSettingsBase
s
;
s
.
setupUi
(
widget
);
return
widget
;
return
new
ScilabSettingsWidget
(
parent
,
id
());
}
KConfigSkeleton
*
ScilabBackend
::
config
()
const
...
...
src/backends/scilab/settings.ui
View file @
985dffad
...
...
@@ -6,80 +6,88 @@
<rect>
<x>
0
</x>
<y>
0
</y>
<width>
4
16
</width>
<height>
3
54
</height>
<width>
4
20
</width>
<height>
3
02
</height>
</rect>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout"
>
<item
row=
"0"
column=
"2"
>
<widget
class=
"KUrlRequester"
name=
"kcfg_Path"
/>
</item>
<item
row=
"1"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"lPlotIntegration"
>
<property
name=
"text"
>
<string>
Plot Integration:
</string>
</property>
</widget>
</item>
<item
row=
"1"
column=
"2"
>
<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=
"2"
column=
"1"
>
<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=
"3"
column=
"0"
colspan=
"3"
>
<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=
"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=
"0"
column=
"0"
colspan=
"2"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Executable:
</string>
<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=
"label"
>
<property
name=
"text"
>
<string>
Executable:
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"KUrlRequester"
name=
"kcfg_Path"
/>
</item>
<item
row=
"1"
column=
"0"
>
<widget
class=
"QLabel"
name=
"lPlotIntegration"
>
<property
name=
"text"
>
<string>
Plot Integration:
</string>
</property>
</widget>
</item>
<item
row=
"1"
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=
"2"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
</property>
<property
name=
"sizeHint"
stdset=
"0"
>
<size>
<width>
20
</width>
<height>
162
</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=
"lAutorun"
>
<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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment