Commit 0f5e7d6f authored by Georges Khaznadar's avatar Georges Khaznadar

New upstream version 0.11~beta

parent 4a2f5106
......@@ -23,7 +23,6 @@ moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
Makefile*
*build-*
# QtCreator
......@@ -54,3 +53,6 @@ turing
*.zip
src/turing.spec
.DS_Store
# emacs
*~
DESTDIR =
all:
make -C src $@ DESTDIR=$(DESTDIR)
clean:
rm -f *~
make -C src $@ DESTDIR=$(DESTDIR)
install:
make -C src $@ DESTDIR=$(DESTDIR)
.PHONY: all clean install
......@@ -24,15 +24,23 @@ In both modes, the code can be debugged and executed step-by-step to facilitate
Turing is cross-platform, but has only been tested on Windows and Linux-based operating systems. macOS should be supported, but no guarantee is made of that.
### Using the package (recommended for Linux)
A package is available for Ubuntu and Debian. You can install it like this:
`sudo apt-get install turing`
If it does not work, use the pre-compiled binaries available below.
### Using pre-compiled binaries (recommended)
Click on the [**Releases**](https://github.com/TuringApp/Turing/releases) tab at the top of the page and download the release corresponding to your OS.
- windows32: Windows 32 bits (7 or later)
- `windows32`: Windows 32 bits (7 or later)
- tested on 10 x64
- nix64: Linux 64 bits (Ubuntu 14.04 or later)
- `nix64`: Linux 64 bits (Ubuntu 14.04 / Debian 8 or later)
- tested on 18.04
- osx: macOS 64 bits (10.13 *High Sierra* or later)
- `osx`: macOS 64 bits (10.13 *High Sierra* or later)
- tested on 10.13
### Using the source code (advanced users)
......
File mode changed from 100755 to 100644
# http://www.fundza.com/algorithmic/space_filling/hilbert/basics/index.html
last_x, last_y = -1, -1
def add_point(x, y):
global last_x, last_y
if last_x != -1:
g_line(last_x, last_y, x, y)
last_x, last_y = x, y
def hilbert(x0, y0, xi, xj, yi, yj, n):
if n <= 0:
X = x0 + (xi + yi)/2
Y = y0 + (xj + yj)/2
add_point(X, Y)
else:
hilbert(x0, y0, yi/2, yj/2, xi/2, xj/2, n - 1)
hilbert(x0 + xi/2, y0 + xj/2, xi/2, xj/2, yi/2, yj/2, n - 1)
hilbert(x0 + xi/2 + yi/2, y0 + xj/2 + yj/2, xi/2, xj/2, yi/2, yj/2, n - 1)
hilbert(x0 + xi/2 + yi, y0 + xj/2 + yj, -yi/2,-yj/2,-xi/2,-xj/2, n - 1)
g_window(0, 1, 0, 1)
hilbert(0, 0, 1, 0, 0, 1, 3)
\ No newline at end of file
g_window(-10, 100, 100, -10)
order = 5
size = 2 ** order
for y in range(size):
for x in range(size):
if x & y == 0:
g_point(x * 2, y * 2)
\ No newline at end of file
BlockStmt([AssignStmt(IdentifierNode('lst'), ListNode([NumberNode(5), NumberNode(1), NumberNode(4), NumberNode(2), NumberNode(8), NumberNode(2), NumberNode(7), NumberNode(1), NumberNode(8), NumberNode(3), NumberNode(6), NumberNode(4), NumberNode(9), NumberNode(5), NumberNode(2), NumberNode(4)])), GWindowStmt(NumberNode(0), CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), CallNode(IdentifierNode('min'), [IdentifierNode('lst')]), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), NumberNode(0), NumberNode(0)), ForStmt('i', BinOpNode(CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), NumberNode(1), '-'), NumberNode(1), [ForStmt('j', NumberNode(0), BinOpNode(IdentifierNode('i'), NumberNode(1), '-'), [GClearStmt(), IfStmt(BinOpNode(ArrayAccessNode(IdentifierNode('lst'), BinOpNode(IdentifierNode('j'), NumberNode(1), '+')), ArrayAccessNode(IdentifierNode('lst'), IdentifierNode('j')), '<'), [CallStmt(IdentifierNode('swap'), [IdentifierNode('lst'), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), IdentifierNode('j')]), GLineStmt(IdentifierNode('j'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), StringNode('red'))]), ElseStmt([GLineStmt(IdentifierNode('j'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), StringNode('green'))]), ForStmt('i', NumberNode(0), BinOpNode(CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), NumberNode(1), '-'), [GLineStmt(IdentifierNode('i'), NumberNode(0), IdentifierNode('i'), ArrayAccessNode(IdentifierNode('lst'), IdentifierNode('i')), StringNode('red'))], None), SleepStmt(NumberNode(0.3))], None)], None)])
\ No newline at end of file
BlockStmt([AssignStmt(IdentifierNode('lst'), ListNode([NumberNode(5), NumberNode(1), NumberNode(4), NumberNode(2), NumberNode(8), NumberNode(2), NumberNode(7), NumberNode(1), NumberNode(8), NumberNode(3), NumberNode(6), NumberNode(4), NumberNode(9), NumberNode(5), NumberNode(2), NumberNode(4)])), GWindowStmt(NumberNode(0), CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), CallNode(IdentifierNode('min'), [IdentifierNode('lst')]), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), NumberNode(0), NumberNode(0)), ForStmt('i', BinOpNode(CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), NumberNode(1), '-'), NumberNode(1), [ForStmt('j', NumberNode(0), BinOpNode(IdentifierNode('i'), NumberNode(1), '-'), [GClearStmt(), IfStmt(BinOpNode(ArrayAccessNode(IdentifierNode('lst'), BinOpNode(IdentifierNode('j'), NumberNode(1), '+')), ArrayAccessNode(IdentifierNode('lst'), IdentifierNode('j')), '<'), [CallStmt(IdentifierNode('swap'), [IdentifierNode('lst'), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), IdentifierNode('j')]), GLineStmt(IdentifierNode('j'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), StringNode('red'))]), ElseStmt([GLineStmt(IdentifierNode('j'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), BinOpNode(IdentifierNode('j'), NumberNode(1), '+'), CallNode(IdentifierNode('max'), [IdentifierNode('lst')]), StringNode('green'))]), ForStmt('i', NumberNode(0), BinOpNode(CallNode(IdentifierNode('len'), [IdentifierNode('lst')]), NumberNode(1), '-'), [GLineStmt(IdentifierNode('i'), NumberNode(0), IdentifierNode('i'), ArrayAccessNode(IdentifierNode('lst'), IdentifierNode('i')), StringNode('black'))], None), SleepStmt(NumberNode(0.3))], None)], None)])
\ No newline at end of file
DESTDIR =
all:
pylupdate5 project-linux.pro
make -C lang $@ DESTDIR=$(DESTDIR)
make -C forms $@ DESTDIR=$(DESTDIR)
clean:
rm -f *~
make -C lang $@ DESTDIR=$(DESTDIR)
make -C forms $@ DESTDIR=$(DESTDIR)
install:
make -C lang $@ DESTDIR=$(DESTDIR)
make -C forms $@ DESTDIR=$(DESTDIR)
.PHONY: all clean install
# -*- coding: utf-8 -*-
This diff is collapsed.
# -*- coding: utf-8 -*-
......@@ -4,9 +4,6 @@ from .BaseStmt import *
class AssignStmt(BaseStmt):
variable = None
value = None
def __init__(self, variable: AstNode, value: AstNode = None):
super().__init__()
self.variable = variable
......
......@@ -6,10 +6,8 @@ from maths.nodes import AstNode
class BaseStmt:
parent = None
def __init__(self):
pass
self.parent = None
def __repr__(self):
return "BaseStmt()"
......
......@@ -7,8 +7,6 @@ from maths.nodes import AstNode
class BlockStmt(BaseStmt):
children = None
def __init__(self, children: CodeBlock):
super().__init__()
self.set_children(children)
......
......@@ -5,9 +5,6 @@ from .BaseStmt import *
class CallStmt(BaseStmt):
function = None
arguments = None
def __init__(self, function: AstNode, arguments: List[AstNode]):
super().__init__()
self.function = function
......
......@@ -4,8 +4,6 @@ from .BaseStmt import *
class CommentStmt(BaseStmt):
content = None
def __init__(self, content: str):
super().__init__()
self.content = content
......
......@@ -4,9 +4,6 @@ from .BaseStmt import *
class DisplayStmt(BaseStmt):
content = None
newline = None
def __init__(self, content: AstNode, newline: bool = True):
super().__init__()
self.content = content
......
......@@ -5,11 +5,6 @@ from .BaseStmt import *
class ForStmt(BlockStmt):
variable = None
begin = None
end = None
step = None
def __init__(self, variable: str, begin: AstNode, end: AstNode, children: CodeBlock, step: AstNode = None):
super().__init__(children)
self.variable = variable
......
......@@ -5,9 +5,6 @@ from .BaseStmt import *
class FuncStmt(BlockStmt):
name = None
parameters = None
def __init__(self, name: str, parameters: List[str], children: CodeBlock):
super().__init__(children)
self.name = name
......
......@@ -4,13 +4,6 @@ from .BaseStmt import *
class GFuncStmt(BaseStmt):
var = None
expr = None
start = None
end = None
step = None
color = None
def __init__(self, var: str, expr: AstNode, start: AstNode, end: AstNode, step: AstNode, color: AstNode):
super().__init__()
self.var = var
......
......@@ -4,12 +4,6 @@ from .BaseStmt import *
class GLineStmt(BaseStmt):
start_x = None
start_y = None
end_x = None
end_y = None
color = None
def __init__(self, start_x: AstNode, start_y: AstNode, end_x: AstNode, end_y: AstNode, color: AstNode):
super().__init__()
self.start_x = start_x
......
......@@ -4,10 +4,6 @@ from .BaseStmt import *
class GPointStmt(BaseStmt):
x = None
y = None
color = None
def __init__(self, x: AstNode, y: AstNode, color: AstNode):
super().__init__()
self.x = x
......
......@@ -4,13 +4,6 @@ from .BaseStmt import *
class GWindowStmt(BaseStmt):
x_min = None
x_max = None
y_min = None
y_max = None
x_grad = None
y_grad = None
def __init__(self, x_min: AstNode, x_max: AstNode, y_min: AstNode, y_max: AstNode, x_grad: AstNode,
y_grad: AstNode):
super().__init__()
......
......@@ -5,8 +5,6 @@ from .BaseStmt import *
class IfStmt(BlockStmt):
condition = AstNode
def __init__(self, condition: AstNode, children: CodeBlock):
super().__init__(children)
self.condition = condition
......
......@@ -5,9 +5,6 @@ from .BaseStmt import *
class InputStmt(BaseStmt):
variable = None
prompt = None
def __init__(self, variable: AstNode, prompt: AstNode = None, text: bool = False):
super().__init__()
self.variable = variable
......
......@@ -4,8 +4,6 @@ from .BaseStmt import *
class ReturnStmt(BaseStmt):
value = None
def __init__(self, value: AstNode = None):
super().__init__()
self.value = value
......
......@@ -4,8 +4,6 @@ from .BaseStmt import *
class SleepStmt(BaseStmt):
duration = None
def __init__(self, value: AstNode):
super().__init__()
self.duration = value
......
......@@ -4,8 +4,6 @@ from .BaseStmt import *
class StopStmt(BaseStmt):
message = None
def __init__(self, message: AstNode = None):
super().__init__()
self.message = message
......
......@@ -5,8 +5,6 @@ from .BaseStmt import *
class WhileStmt(BlockStmt):
condition = None
def __init__(self, condition: AstNode, children: CodeBlock):
super().__init__(children)
self.condition = condition
......
# -*- coding: utf-8 -*-
import os
import sys
## add a path to get the embedded unmaintained package pyqode
sys.path.insert(0,
os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
)
import keyword
......@@ -14,10 +21,6 @@ class PythonCompletionProvider:
class LibCompletionProvider:
functions = None
constants = None
directory = None
def __init__(self):
self.functions = [f[0] for fns in maths.lib.get_funcs().values() for f in fns]
self.constants = [c[0] for cts in maths.lib.get_consts().values() for c in cts]
......@@ -28,7 +31,8 @@ class LibCompletionProvider:
class FinalCompletionProvider:
providers = []
def __init__(self):
self.providers = []
def complete(self, code, *args):
return [c for prov in self.providers for c in prov.complete(code, args)]
......
# files generated by pyuic5
ui*.py
# backups for Emacs
*~
DESTDIR =
UI_SOURCES = $(shell ls *.ui)
UI_TARGETS = $(patsubst %.ui, %.py, $(UI_SOURCES))
all: $(UI_TARGETS)
clean: rm -f *~
install:
%.py: %.ui
pyuic5 $< -o $@
.PHONY: all clean install
......@@ -2,7 +2,6 @@
import re
from html import escape
from typing import Dict, List, Tuple
import maths.lib
import maths.lib.docs
......@@ -38,10 +37,6 @@ class HelpWindow(QDialog):
self.load_funcs()
self.show()
function = Tuple
functions: Dict[str, List[function]] = None
catItems = []
def on_item_select(self):
current = self.ui.listFuncs.currentItem()
......@@ -108,6 +103,7 @@ class HelpWindow(QDialog):
def load_funcs(self):
self.functions = maths.lib.get_funcs()
self.catItems = []
for k in sorted(self.functions.keys()):
item_category = QTreeWidgetItem()
item_category.setText(0, "%s" % k)
......
This diff is collapsed.
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_about.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AboutWindow(object):
def setupUi(self, AboutWindow):
AboutWindow.setObjectName("AboutWindow")
AboutWindow.resize(671, 402)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/icon/media/icon.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AboutWindow.setWindowIcon(icon)
AboutWindow.setModal(True)
self.verticalLayout = QtWidgets.QVBoxLayout(AboutWindow)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(AboutWindow)
self.label.setText("<img src=\":/icon/media/icon_96.png\"/>")
self.label.setTextFormat(QtCore.Qt.RichText)
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.tabWidget = QtWidgets.QTabWidget(AboutWindow)
self.tabWidget.setTabShape(QtWidgets.QTabWidget.Rounded)
self.tabWidget.setObjectName("tabWidget")
self.tab = QtWidgets.QWidget()
self.tab.setObjectName("tab")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.textBrowser_about = QtWidgets.QTextBrowser(self.tab)
self.textBrowser_about.setReadOnly(True)
self.textBrowser_about.setOpenExternalLinks(True)
self.textBrowser_about.setObjectName("textBrowser_about")
self.verticalLayout_2.addWidget(self.textBrowser_about)
self.tabWidget.addTab(self.tab, "")
self.tab_2 = QtWidgets.QWidget()
self.tab_2.setObjectName("tab_2")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.tab_2)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.textEdit_2 = QtWidgets.QTextEdit(self.tab_2)
self.textEdit_2.setReadOnly(True)
self.textEdit_2.setHtml("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt; font-weight:600;\">Copyright © 2018 Turing </span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: </span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. </span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-size:8pt;\">THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span></p></body></html>")
self.textEdit_2.setObjectName("textEdit_2")
self.verticalLayout_3.addWidget(self.textEdit_2)
self.tabWidget.addTab(self.tab_2, "")
self.horizontalLayout.addWidget(self.tabWidget)
self.verticalLayout.addLayout(self.horizontalLayout)
self.buttonBox = QtWidgets.QDialogButtonBox(AboutWindow)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(AboutWindow)
self.tabWidget.setCurrentIndex(1)
self.buttonBox.accepted.connect(AboutWindow.accept)
self.buttonBox.rejected.connect(AboutWindow.reject)
QtCore.QMetaObject.connectSlotsByName(AboutWindow)
def retranslateUi(self, AboutWindow):
_translate = QtCore.QCoreApplication.translate
AboutWindow.setWindowTitle(_translate("AboutWindow", "About Turing"))
self.textBrowser_about.setHtml(_translate("AboutWindow", "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
"p, li { white-space: pre-wrap; }\n"
"</style></head><body style=\" font-family:\'MS Shell Dlg 2\'; font-size:8.25pt; font-weight:400; font-style:normal;\">\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Turing {version}</span></p>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Release channel : </span>{channel} <br /><br />Free and open-source software to assist the learning of algorithms and programming. <br /><br /><span style=\" font-weight:600;\">Copyright (c) 2018 the Turing development team (Leo Joly, Tom Niget)</span></p>\n"
"<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">This software is distributed under the terms of the MIT license and makes use of the <a href=\"https://www.qt.io/\"><span style=\" text-decoration: underline; color:#0000ff;\">Qt</span></a> / <a href=\"https://riverbankcomputing.com/software/pyqt/\"><span style=\" text-decoration: underline; color:#0000ff;\">pyQt</span></a>. frameworks.</li>\n"
"<li style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">CS &gt; Maths</li>\n"
"<li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">Windows icons under CC-BY 3.0 license - <a href=\"http://www.fatcow.com/free-icons\"><span style=\" text-decoration: underline; color:#0000ff;\">(c) Fatcow Web Hosting</span></a></li></ul>\n"
"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Special thanks :</span></p>\n"
"<ul style=\"margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;\"><li style=\" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><a href=\"https://twitter.com/davR74130\"><span style=\" font-weight:600; text-decoration: underline; color:#0000ff;\">David Roche</span></a>, physics and computer science teacher, whose lessons and modesty were a big help during the development</li>\n"
"<li style=\" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"><span style=\" font-weight:600;\">Alan Turing</span>, without whom the computer you\'re looking at wouldn\'t be a thing</li></ul>\n"
"<p style=\" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">plz give us a good grade</p></body></html>"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), _translate("AboutWindow", "Program"))
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("AboutWindow", "License"))
import turing_rc
......@@ -39,7 +39,7 @@
<enum>QTabWidget::Rounded</enum>
</property>
<property name="currentIndex">
<number>1</number>
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
......@@ -57,7 +57,7 @@
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Turing {version}&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Release channel : &lt;/span&gt;{channel} &lt;br /&gt;&lt;br /&gt;Free and open-source software to assist the learning of algorithms and programming. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Copyright (c) 2018 the Turing development team (Leo Joly, Tom Niget)&lt;/span&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Release channel : &lt;/span&gt;{channel} &lt;br /&gt;&lt;br /&gt;Free and open-source software to assist the learning of algorithms and programming. &lt;br /&gt;&lt;br /&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Copyright (c) 2018 the Turing development team (Léo Joly, Tom Niget)&lt;/span&gt;&lt;/p&gt;
&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;This software is distributed under the terms of the MIT license and makes use of the &lt;a href=&quot;https://www.qt.io/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Qt&lt;/span&gt;&lt;/a&gt; / &lt;a href=&quot;https://riverbankcomputing.com/software/pyqt/&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;pyQt&lt;/span&gt;&lt;/a&gt;. frameworks.&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;CS &amp;gt; Maths&lt;/li&gt;
&lt;li style=&quot; margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Windows icons under CC-BY 3.0 license - &lt;a href=&quot;http://www.fatcow.com/free-icons&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;(c) Fatcow Web Hosting&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;
......
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_alg_call.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AlgoCallStmt(object):
def setupUi(self, AlgoCallStmt):
AlgoCallStmt.setObjectName("AlgoCallStmt")
AlgoCallStmt.setWindowModality(QtCore.Qt.WindowModal)
AlgoCallStmt.resize(477, 193)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/action/media/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlgoCallStmt.setWindowIcon(icon)
AlgoCallStmt.setModal(True)
self.verticalLayout = QtWidgets.QVBoxLayout(AlgoCallStmt)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(AlgoCallStmt)
self.label.setWordWrap(True)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.label_2 = QtWidgets.QLabel(AlgoCallStmt)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
self.btnCodeFunc = QtWidgets.QPushButton(AlgoCallStmt)
self.btnCodeFunc.setText("")
icon1 = QtGui.QIcon()
icon1.addPixmap(QtGui.QPixmap(":/action/media/edit_line.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.btnCodeFunc.setIcon(icon1)
self.btnCodeFunc.setObjectName("btnCodeFunc")
self.gridLayout.addWidget(self.btnCodeFunc, 0, 2, 1, 1)
self.txtFunction = QtWidgets.QLineEdit(AlgoCallStmt)
self.txtFunction.setObjectName("txtFunction")
self.gridLayout.addWidget(self.txtFunction, 0, 1, 1, 1)
self.btnCodeArgs = QtWidgets.QPushButton(AlgoCallStmt)
self.btnCodeArgs.setText("")
self.btnCodeArgs.setIcon(icon1)
self.btnCodeArgs.setObjectName("btnCodeArgs")
self.gridLayout.addWidget(self.btnCodeArgs, 1, 2, 1, 1)
self.txtArguments = QtWidgets.QLineEdit(AlgoCallStmt)
self.txtArguments.setObjectName("txtArguments")
self.gridLayout.addWidget(self.txtArguments, 1, 1, 1, 1)
self.label_3 = QtWidgets.QLabel(AlgoCallStmt)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 1, 0, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.buttonBox = QtWidgets.QDialogButtonBox(AlgoCallStmt)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.label_2.setBuddy(self.txtFunction)
self.label_3.setBuddy(self.txtArguments)
self.retranslateUi(AlgoCallStmt)
self.buttonBox.accepted.connect(AlgoCallStmt.accept)
self.buttonBox.rejected.connect(AlgoCallStmt.reject)
QtCore.QMetaObject.connectSlotsByName(AlgoCallStmt)
AlgoCallStmt.setTabOrder(self.txtFunction, self.txtArguments)
AlgoCallStmt.setTabOrder(self.txtArguments, self.btnCodeFunc)
AlgoCallStmt.setTabOrder(self.btnCodeFunc, self.btnCodeArgs)
def retranslateUi(self, AlgoCallStmt):
_translate = QtCore.QCoreApplication.translate
AlgoCallStmt.setWindowTitle(_translate("AlgoCallStmt", "Call function"))
self.label.setText(_translate("AlgoCallStmt", "<html><head/><body><p>Calls the function with the specified arguments.</p><p>The argument list must consist of a comma-separated list of arguments.</p></body></html>"))
self.label_2.setText(_translate("AlgoCallStmt", "Function:"))
self.label_3.setText(_translate("AlgoCallStmt", "Arguments:"))
import turing_rc
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_alg_comment.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AlgoCommentStmt(object):
def setupUi(self, AlgoCommentStmt):
AlgoCommentStmt.setObjectName("AlgoCommentStmt")
AlgoCommentStmt.setWindowModality(QtCore.Qt.WindowModal)
AlgoCommentStmt.resize(477, 193)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/action/media/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlgoCommentStmt.setWindowIcon(icon)
AlgoCommentStmt.setModal(True)
self.verticalLayout = QtWidgets.QVBoxLayout(AlgoCommentStmt)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(AlgoCommentStmt)
self.label.setWordWrap(True)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.gridLayout = QtWidgets.QGridLayout()
self.gridLayout.setObjectName("gridLayout")
self.lineEdit = QtWidgets.QLineEdit(AlgoCommentStmt)
self.lineEdit.setObjectName("lineEdit")
self.gridLayout.addWidget(self.lineEdit, 0, 1, 1, 1)
self.label_2 = QtWidgets.QLabel(AlgoCommentStmt)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 0, 0, 1, 1)
self.verticalLayout.addLayout(self.gridLayout)
self.buttonBox = QtWidgets.QDialogButtonBox(AlgoCommentStmt)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.label_2.setBuddy(self.lineEdit)
self.retranslateUi(AlgoCommentStmt)
self.buttonBox.accepted.connect(AlgoCommentStmt.accept)
self.buttonBox.rejected.connect(AlgoCommentStmt.reject)
QtCore.QMetaObject.connectSlotsByName(AlgoCommentStmt)
def retranslateUi(self, AlgoCommentStmt):
_translate = QtCore.QCoreApplication.translate
AlgoCommentStmt.setWindowTitle(_translate("AlgoCommentStmt", "Comment"))
self.label.setText(_translate("AlgoCommentStmt", "<html><head/><body><p>A comment has no effect whatsoever on the execution of the program.</p><p>It can contain anything.</p></body></html>"))
self.label_2.setText(_translate("AlgoCommentStmt", "Comment:"))
import turing_rc
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_alg_define.ui'
#
# Created by: PyQt5 UI code generator 5.10.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AlgoDefineStmt(object):
def setupUi(self, AlgoDefineStmt):
AlgoDefineStmt.setObjectName("AlgoDefineStmt")
AlgoDefineStmt.setWindowModality(QtCore.Qt.WindowModal)
AlgoDefineStmt.resize(477, 193)
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(":/action/media/settings.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
AlgoDefineStmt.setWindowIcon(icon)
AlgoDefineStmt.setModal(True)
self.verticalLayout = QtWidgets.QVBoxLayout(AlgoDefineStmt)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(AlgoDefineStmt)
self.label.setWordWrap(True)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)