Procházet zdrojové kódy

resoolve merge conflicts

olivier.massot před 8 roky
rodič
revize
b1dbdfc380

+ 27 - 0
gridviewer/jobs.yml

@@ -0,0 +1,27 @@
+job_lines:
+  SquareGrid(101, 101):
+  - "line(0, 0, 0, 0)"  
+  - "line(0, 0, 1, 1)"
+  - "line(0, 0, 10, 10)"
+  - "line(0, 0, 100, 100)"
+  - "line(10, 10, 10, 5)"
+  - "line(10, 10, 15, 5)"
+  - "line(10, 10, 15, 10)"
+  - "line(10, 10, 15, 15)"
+  - "line(10, 10, 10, 15)"
+  - "line(10, 10, 5, 15)"
+  - "line(10, 10, 5, 10)"
+  - "line(10, 10, 5, 5)"
+  FHexGrid(101, 101):
+  - "line(0, 0, 0, 0)"  
+  - "line(0, 0, 1, 1)"
+  - "line(0, 0, 10, 10)"
+  - "line(0, 0, 100, 100)"
+  - "line(10, 10, 10, 5)"
+  - "line(10, 10, 15, 5)"
+  - "line(10, 10, 15, 10)"
+  - "line(10, 10, 15, 15)"
+  - "line(10, 10, 10, 15)"
+  - "line(10, 10, 5, 15)"
+  - "line(10, 10, 5, 10)"
+  - "line(10, 10, 5, 5)"

+ 94 - 0
gridviewer/results.yml

@@ -0,0 +1,94 @@
+FHexGrid(101, 101).line(0, 0, 0, 0): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(0,
+    0, 0, 0)', '[(0, 0)]', 0.041079513450399945]
+FHexGrid(101, 101).line(0, 0, 1, 1): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(0,
+    0, 1, 1)', '[(0, 0), (0, 1), (1, 1)]', 0.030429877442970654]
+FHexGrid(101, 101).line(0, 0, 10, 10): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(0,
+    0, 10, 10)', '[(0, 0), (1, 0), (1, 1), (2, 2), (3, 2), (3, 3), (4, 4), (5, 4),
+    (5, 5), (6, 6), (7, 6), (7, 7), (8, 8), (9, 8), (9, 9), (10, 10)]', 0.040673070133231265]
+FHexGrid(101, 101).line(0, 0, 100, 100): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(0,
+    0, 100, 100)', '[(0, 0), (1, 0), (1, 1), (2, 2), (3, 2), (3, 3), (4, 4), (5, 4),
+    (5, 5), (6, 6), (7, 6), (7, 7), (8, 8), (9, 8), (9, 9), (10, 10), (11, 10), (11,
+    11), (12, 12), (13, 12), (13, 13), (14, 14), (15, 14), (15, 15), (16, 16), (17,
+    16), (17, 17), (18, 18), (19, 18), (19, 19), (20, 20), (21, 20), (21, 21), (22,
+    22), (23, 22), (23, 23), (24, 24), (25, 24), (25, 25), (26, 26), (27, 26), (27,
+    27), (28, 28), (29, 28), (29, 29), (30, 30), (31, 30), (31, 31), (32, 32), (33,
+    32), (33, 33), (34, 34), (35, 34), (35, 35), (36, 36), (37, 36), (37, 37), (38,
+    38), (39, 38), (39, 39), (40, 40), (41, 40), (41, 41), (42, 42), (43, 42), (43,
+    43), (44, 44), (45, 44), (45, 45), (46, 46), (47, 46), (47, 47), (48, 48), (49,
+    48), (49, 49), (50, 50), (51, 50), (51, 51), (52, 52), (53, 52), (53, 53), (54,
+    54), (55, 54), (55, 55), (56, 56), (57, 56), (57, 57), (58, 58), (59, 58), (59,
+    59), (60, 60), (61, 60), (61, 61), (62, 62), (63, 62), (63, 63), (64, 64), (65,
+    64), (65, 65), (66, 66), (67, 66), (67, 67), (68, 68), (69, 68), (69, 69), (70,
+    70), (71, 70), (71, 71), (72, 72), (73, 72), (73, 73), (74, 74), (75, 74), (75,
+    75), (76, 76), (77, 76), (77, 77), (78, 78), (79, 78), (79, 79), (80, 80), (81,
+    80), (81, 81), (82, 82), (83, 82), (83, 83), (84, 84), (85, 84), (85, 85), (86,
+    86), (87, 86), (87, 87), (88, 88), (89, 88), (89, 89), (90, 90), (91, 90), (91,
+    91), (92, 92), (93, 92), (93, 93), (94, 94), (95, 94), (95, 95), (96, 96), (97,
+    96), (97, 97), (98, 98), (99, 98), (99, 99), (100, 100)]', 0.13580954476706264]
+FHexGrid(101, 101).line(10, 10, 10, 15): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 10, 15)', '[(10, 10), (10, 11), (10, 12), (10, 13), (10, 14), (10, 15)]',
+  0.04562839421224721]
+FHexGrid(101, 101).line(10, 10, 10, 5): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 10, 5)', '[(10, 10), (10, 9), (10, 8), (10, 7), (10, 6), (10, 5)]', 0.04160912140913478]
+FHexGrid(101, 101).line(10, 10, 15, 10): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 15, 10)', '[(10, 10), (11, 10), (12, 10), (13, 10), (14, 10), (15, 10)]',
+  0.03190374765371359]
+FHexGrid(101, 101).line(10, 10, 15, 15): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 15, 15)', '[(10, 10), (11, 10), (11, 11), (12, 12), (12, 13), (13, 13), (14,
+    14), (14, 15), (15, 15)]', 0.03405091790501871]
+FHexGrid(101, 101).line(10, 10, 15, 5): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 15, 5)', '[(10, 10), (11, 9), (11, 8), (12, 8), (13, 7), (14, 7), (14, 6),
+    (15, 5)]', 0.03530309176094232]
+FHexGrid(101, 101).line(10, 10, 5, 10): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 5, 10)', '[(10, 10), (9, 10), (8, 10), (7, 10), (6, 10), (5, 10)]', 0.030885586616765798]
+FHexGrid(101, 101).line(10, 10, 5, 15): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 5, 15)', '[(10, 10), (9, 10), (9, 11), (8, 12), (7, 12), (7, 13), (6, 14),
+    (6, 15), (5, 15)]', 0.036189877180219515]
+FHexGrid(101, 101).line(10, 10, 5, 5): ['FHexGrid(101, 101)', 'FHexGrid(101, 101).line(10,
+    10, 5, 5)', '[(10, 10), (9, 9), (9, 8), (8, 8), (7, 7), (6, 7), (6, 6), (5, 5)]',
+  0.03423977035542036]
+SquareGrid(101, 101).line(0, 0, 0, 0): ['SquareGrid(101, 101)', 'SquareGrid(101, 101).line(0,
+    0, 0, 0)', '[(0, 0)]', 0.04233579279437581]
+SquareGrid(101, 101).line(0, 0, 1, 1): ['SquareGrid(101, 101)', 'SquareGrid(101, 101).line(0,
+    0, 1, 1)', '[(0, 0), (1, 1)]', 0.061857388482628034]
+SquareGrid(101, 101).line(0, 0, 10, 10): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(0, 0, 10, 10)', '[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6,
+    6), (7, 7), (8, 8), (9, 9), (10, 10)]', 0.050333283520078306]
+SquareGrid(101, 101).line(0, 0, 100, 100): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(0, 0, 100, 100)', '[(0, 0), (1, 1), (2, 2), (3, 3), (4, 4), (5, 5),
+    (6, 6), (7, 7), (8, 8), (9, 9), (10, 10), (11, 11), (12, 12), (13, 13), (14, 14),
+    (15, 15), (16, 16), (17, 17), (18, 18), (19, 19), (20, 20), (21, 21), (22, 22),
+    (23, 23), (24, 24), (25, 25), (26, 26), (27, 27), (28, 28), (29, 29), (30, 30),
+    (31, 31), (32, 32), (33, 33), (34, 34), (35, 35), (36, 36), (37, 37), (38, 38),
+    (39, 39), (40, 40), (41, 41), (42, 42), (43, 43), (44, 44), (45, 45), (46, 46),
+    (47, 47), (48, 48), (49, 49), (50, 50), (51, 51), (52, 52), (53, 53), (54, 54),
+    (55, 55), (56, 56), (57, 57), (58, 58), (59, 59), (60, 60), (61, 61), (62, 62),
+    (63, 63), (64, 64), (65, 65), (66, 66), (67, 67), (68, 68), (69, 69), (70, 70),
+    (71, 71), (72, 72), (73, 73), (74, 74), (75, 75), (76, 76), (77, 77), (78, 78),
+    (79, 79), (80, 80), (81, 81), (82, 82), (83, 83), (84, 84), (85, 85), (86, 86),
+    (87, 87), (88, 88), (89, 89), (90, 90), (91, 91), (92, 92), (93, 93), (94, 94),
+    (95, 95), (96, 96), (97, 97), (98, 98), (99, 99), (100, 100)]', 0.057320824184937426]
+SquareGrid(101, 101).line(10, 10, 10, 15): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 10, 15)', '[(10, 10), (10, 11), (10, 12), (10, 13), (10, 14),
+    (10, 15)]', 0.05235728912981721]
+SquareGrid(101, 101).line(10, 10, 10, 5): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 10, 5)', '[(10, 10), (10, 9), (10, 8), (10, 7), (10, 6), (10,
+    5)]', 0.04914269198493779]
+SquareGrid(101, 101).line(10, 10, 15, 10): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 15, 10)', '[(10, 10), (11, 10), (12, 10), (13, 10), (14, 10),
+    (15, 10)]', 0.027375394332127406]
+SquareGrid(101, 101).line(10, 10, 15, 15): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 15, 15)', '[(10, 10), (11, 11), (12, 12), (13, 13), (14, 14),
+    (15, 15)]', 0.03304096784417537]
+SquareGrid(101, 101).line(10, 10, 15, 5): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 15, 5)', '[(10, 10), (11, 9), (12, 8), (13, 7), (14, 6), (15,
+    5)]', 0.02793374070722776]
+SquareGrid(101, 101).line(10, 10, 5, 10): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 5, 10)', '[(10, 10), (9, 10), (8, 10), (7, 10), (6, 10), (5,
+    10)]', 0.027670989471886426]
+SquareGrid(101, 101).line(10, 10, 5, 15): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 5, 15)', '[(10, 10), (9, 11), (8, 12), (7, 13), (6, 14), (5,
+    15)]', 0.03189553667760921]
+SquareGrid(101, 101).line(10, 10, 5, 5): ['SquareGrid(101, 101)', 'SquareGrid(101,
+    101).line(10, 10, 5, 5)', '[(10, 10), (9, 9), (8, 8), (7, 7), (6, 6), (5, 5)]',
+  0.029058644433532996]

+ 110 - 7
tools/gridviewer/GridViewer.py

@@ -2,29 +2,32 @@
 
     ** By Cro-Ki l@b, 2017 **
 '''
+
+from timeit import timeit
+
 from PyQt5.Qt import Qt
 from PyQt5.QtCore import QPointF
 from PyQt5.QtWidgets import QMainWindow, \
     QApplication, QGraphicsScene, QGraphicsView
+import ipdb  # until I find another way to print traceback with pyqt5
+import yaml
 
 from GridDialogBox import GridDialogBox
+from GridViewerCell import GridViewerCell
 from ListViewDialog import ListViewDialog
 from pypog.grid_objects import SquareGrid
+from pypog.grid_objects import SquareGrid, FHexGrid
+from qt_viewer import Ui_window
 
 
-try:
-    from gridviewer.GridViewerCell import GridViewerCell
-    from gridviewer.qt_viewer import Ui_window
-except ImportError:
-    from GridViewerCell import GridViewerCell
-    from qt_viewer import Ui_window
-
 class GridViewer(QMainWindow):
 
     def __init__(self):
         super (GridViewer, self).__init__()
         self.cells = {}
         self.selection = []
+        self.job_index = 0
+        self.job_results = []
         self.createWidgets()
 
     def createWidgets(self):
@@ -34,6 +37,8 @@ class GridViewer(QMainWindow):
         self._init_scene()
 
         self.ui.btn_new_grid.clicked.connect(self.new_grid_dialog)
+
+        self.ui.btn_run.clicked.connect(self.run_f)
         self.ui.btn_list_view.clicked.connect(self.list_view_dialog)
         self.ui.btn_zoom_plus.clicked.connect(self.zoom_plus)
         self.ui.btn_zoom_minus.clicked.connect(self.zoom_minus)
@@ -54,6 +59,13 @@ class GridViewer(QMainWindow):
         self.ui.view.setDragMode(QGraphicsView.NoDrag)
         self.ui.view.setTransformationAnchor(QGraphicsView.AnchorUnderMouse)
 
+        self.ui.cb_jobs.insertItems(0, self.job_names())
+        self.update_stack_job()
+        self.ui.btn_run_job.clicked.connect(self.run_selected_job)
+        self.ui.btn_job_next.clicked.connect(self.job_next)
+        self.ui.btn_job_previous.clicked.connect(self.job_previous)
+        self.ui.btn_job_validate.clicked.connect(self.job_validate)
+
     def make_grid(self, grid):
         QApplication.setOverrideCursor(Qt.WaitCursor)
         self.grid = grid
@@ -73,6 +85,8 @@ class GridViewer(QMainWindow):
             self.cells[(x, y)] = cell
 
         self.ui.view.centerOn(QPointF(0, 0))
+
+        self.grid = grid
         QApplication.restoreOverrideCursor()
 
     def add_to_selection(self, x, y):
@@ -131,3 +145,92 @@ class GridViewer(QMainWindow):
             pass
         elif event.key() == Qt.Key_Up:
             pass
+
+    def job_names(self):
+        with open("jobs.yml", "r") as f:
+            jobs = yaml.load(f)
+        return jobs.keys()
+
+    def run_selected_job(self):
+        self.job_index = 0
+        self.job_results = self.run_job(self.ui.cb_jobs.currentText())
+        self.update_stack_job()
+
+    def update_stack_job(self):
+        if not self.job_results:
+            self.ui.stack_job.setCurrentIndex(0)
+            return
+
+        self.ui.stack_job.setCurrentIndex(1)
+        self.ui.lbl_job_number.setText("Test {} / {}".format(self.job_index + 1, len(self.job_results)))
+
+        gridstr, callstr, result, ittime = self.job_results[self.job_index]
+
+        new_grid = eval(gridstr)
+        if not (new_grid.__class__ == self.grid.__class__ and
+                new_grid.width == self.grid.width and
+                new_grid.height == self.grid.height):
+            self.make_grid(new_grid)
+
+        self.ui.txt_job_run.setText(callstr)
+        self.update_selected_cells(result)
+
+        saved = self.saved_result_for(callstr)
+        if saved:
+            self.ui.lbl_job_exectime.setText("Exec. in {0:.2f} ms. / Saved: {1:.2f} ms. / Same result: {2:}".format(ittime, saved[3], str(result) == saved[2]))
+        else:
+            self.ui.lbl_job_exectime.setText("Exec. in {0:.2f} ms.".format(ittime))
+
+    def job_next(self):
+        if self.job_index < (len(self.job_results) - 1):
+            self.job_index += 1
+            self.update_stack_job()
+
+    def job_previous(self):
+        if self.job_index > 0:
+            self.job_index -= 1
+            self.update_stack_job()
+
+    def run_job(self, job_name):
+        with open("jobs.yml", "r") as f:
+            jobs = yaml.load(f)
+        callstrings = [(gridstr, "{}.{}".format(gridstr, funcstr)) for gridstr, calls in jobs[job_name].items() for funcstr in calls]
+        return [(gridstr, callstr, eval(callstr), self.ittime(callstr)) for gridstr, callstr in callstrings]
+
+    def ittime(self, callstr):
+        """ returns the execution time in milli-seconds
+            callstr has to be a string
+            (ex: 'time.sleep(1)', which will return 1000)
+        """
+        number, t = 1, 0
+        while t < 10 ** 8:
+            t = timeit(lambda: eval(callstr), number=number)
+            if t >= 0.001:
+                return 1000 * t / number
+            number *= 10
+        else:
+            return -1
+
+    def saved_results(self):
+        try:
+            with open("results.yml", "r") as f:
+                data = yaml.load(f)
+            return dict(data)
+        except (FileNotFoundError, TypeError):
+            return {}
+
+    def saved_result_for(self, callstr):
+        try:
+            return tuple(self.saved_results()[callstr])
+        except (TypeError, KeyError):
+            return None
+
+    def job_validate(self):
+        gridstr, callstr, result, ittime = self.job_results[self.job_index]
+        data = self.saved_results()
+
+        data[callstr] = [gridstr, callstr, str(result), ittime]
+
+        with open("results.yml", "w+") as f:
+            yaml.dump(data, f)
+        self.update_stack_job()

+ 52 - 25
tools/gridviewer/qt_viewer.py

@@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
 class Ui_window(object):
     def setupUi(self, window):
         window.setObjectName("window")
-        window.resize(910, 658)
+        window.resize(909, 658)
         font = QtGui.QFont()
         font.setFamily("Verdana")
         font.setPointSize(8)
@@ -50,30 +50,54 @@ class Ui_window(object):
         self.horizontalLayout_2.addWidget(self.btn_new_grid)
         spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
         self.horizontalLayout_2.addItem(spacerItem)
-        self.cb_functions = QtWidgets.QComboBox(self.frame_tools)
-        self.cb_functions.setObjectName("cb_functions")
-        self.horizontalLayout_2.addWidget(self.cb_functions)
-        self.txt_args = QtWidgets.QLineEdit(self.frame_tools)
-        self.txt_args.setMinimumSize(QtCore.QSize(200, 0))
-        self.txt_args.setMaximumSize(QtCore.QSize(200, 16777215))
-        self.txt_args.setObjectName("txt_args")
-        self.horizontalLayout_2.addWidget(self.txt_args)
-        self.chk_expand = QtWidgets.QCheckBox(self.frame_tools)
-        self.chk_expand.setMinimumSize(QtCore.QSize(100, 0))
-        self.chk_expand.setMaximumSize(QtCore.QSize(100, 16777215))
-        self.chk_expand.setObjectName("chk_expand")
-        self.horizontalLayout_2.addWidget(self.chk_expand)
-        self.btn_run = QtWidgets.QToolButton(self.frame_tools)
-        self.btn_run.setMinimumSize(QtCore.QSize(0, 20))
-        self.btn_run.setMaximumSize(QtCore.QSize(16777215, 20))
-        self.btn_run.setObjectName("btn_run")
-        self.horizontalLayout_2.addWidget(self.btn_run)
+        self.cb_jobs = QtWidgets.QComboBox(self.frame_tools)
+        self.cb_jobs.setMinimumSize(QtCore.QSize(150, 0))
+        self.cb_jobs.setObjectName("cb_jobs")
+        self.horizontalLayout_2.addWidget(self.cb_jobs)
+        self.btn_run_job = QtWidgets.QToolButton(self.frame_tools)
+        self.btn_run_job.setMinimumSize(QtCore.QSize(0, 20))
+        self.btn_run_job.setMaximumSize(QtCore.QSize(16777215, 20))
+        self.btn_run_job.setObjectName("btn_run_job")
+        self.horizontalLayout_2.addWidget(self.btn_run_job)
         spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
         self.horizontalLayout_2.addItem(spacerItem1)
         self.btn_list_view = QtWidgets.QPushButton(self.frame_tools)
         self.btn_list_view.setObjectName("btn_list_view")
         self.horizontalLayout_2.addWidget(self.btn_list_view)
         self.verticalLayout.addWidget(self.frame_tools)
+        self.stack_job = QtWidgets.QStackedWidget(self.centralwidget)
+        self.stack_job.setMinimumSize(QtCore.QSize(0, 30))
+        self.stack_job.setMaximumSize(QtCore.QSize(16777215, 30))
+        self.stack_job.setObjectName("stack_job")
+        self.page_2 = QtWidgets.QWidget()
+        self.page_2.setObjectName("page_2")
+        self.stack_job.addWidget(self.page_2)
+        self.page = QtWidgets.QWidget()
+        self.page.setObjectName("page")
+        self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.page)
+        self.horizontalLayout_3.setContentsMargins(3, 3, 3, 3)
+        self.horizontalLayout_3.setObjectName("horizontalLayout_3")
+        self.btn_job_previous = QtWidgets.QToolButton(self.page)
+        self.btn_job_previous.setObjectName("btn_job_previous")
+        self.horizontalLayout_3.addWidget(self.btn_job_previous)
+        self.btn_job_next = QtWidgets.QToolButton(self.page)
+        self.btn_job_next.setObjectName("btn_job_next")
+        self.horizontalLayout_3.addWidget(self.btn_job_next)
+        self.lbl_job_number = QtWidgets.QLabel(self.page)
+        self.lbl_job_number.setObjectName("lbl_job_number")
+        self.horizontalLayout_3.addWidget(self.lbl_job_number)
+        self.txt_job_run = QtWidgets.QLineEdit(self.page)
+        self.txt_job_run.setReadOnly(True)
+        self.txt_job_run.setObjectName("txt_job_run")
+        self.horizontalLayout_3.addWidget(self.txt_job_run)
+        self.lbl_job_exectime = QtWidgets.QLabel(self.page)
+        self.lbl_job_exectime.setObjectName("lbl_job_exectime")
+        self.horizontalLayout_3.addWidget(self.lbl_job_exectime)
+        self.btn_job_validate = QtWidgets.QPushButton(self.page)
+        self.btn_job_validate.setObjectName("btn_job_validate")
+        self.horizontalLayout_3.addWidget(self.btn_job_validate)
+        self.stack_job.addWidget(self.page)
+        self.verticalLayout.addWidget(self.stack_job)
         self.view = QtWidgets.QGraphicsView(self.centralwidget)
         font = QtGui.QFont()
         font.setStyleStrategy(QtGui.QFont.PreferAntialias)
@@ -117,12 +141,11 @@ class Ui_window(object):
         self.actionQuitter.setObjectName("actionQuitter")
 
         self.retranslateUi(window)
+        self.stack_job.setCurrentIndex(1)
         QtCore.QMetaObject.connectSlotsByName(window)
         window.setTabOrder(self.view, self.btn_new_grid)
-        window.setTabOrder(self.btn_new_grid, self.cb_functions)
-        window.setTabOrder(self.cb_functions, self.txt_args)
-        window.setTabOrder(self.txt_args, self.chk_expand)
-        window.setTabOrder(self.chk_expand, self.btn_list_view)
+        window.setTabOrder(self.btn_new_grid, self.cb_jobs)
+        window.setTabOrder(self.cb_jobs, self.btn_list_view)
         window.setTabOrder(self.btn_list_view, self.btn_zoom_plus)
         window.setTabOrder(self.btn_zoom_plus, self.btn_zoom_minus)
         window.setTabOrder(self.btn_zoom_minus, self.chk_displayCoords)
@@ -133,9 +156,13 @@ class Ui_window(object):
         window.setWindowTitle(_translate("window", "GridViewer"))
         self.lbl_title.setText(_translate("window", "Grid Viewer"))
         self.btn_new_grid.setText(_translate("window", "New Grid"))
-        self.chk_expand.setText(_translate("window", "Auto-expand"))
-        self.btn_run.setText(_translate("window", ">"))
+        self.btn_run_job.setText(_translate("window", "Run job"))
         self.btn_list_view.setText(_translate("window", "List View"))
+        self.btn_job_previous.setText(_translate("window", "<"))
+        self.btn_job_next.setText(_translate("window", ">"))
+        self.lbl_job_number.setText(_translate("window", "Test 1 / 1"))
+        self.lbl_job_exectime.setText(_translate("window", "Exec. in 1000.000 ms. (saved: 10000.000 ms.)"))
+        self.btn_job_validate.setText(_translate("window", "Validate"))
         self.label_3.setText(_translate("window", "Zoom"))
         self.btn_zoom_plus.setText(_translate("window", "+"))
         self.btn_zoom_minus.setText(_translate("window", "-"))

+ 84 - 36
tools/gridviewer/qt_viewer.ui

@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>910</width>
+    <width>909</width>
     <height>658</height>
    </rect>
   </property>
@@ -123,45 +123,17 @@
           </spacer>
          </item>
          <item>
-          <widget class="QComboBox" name="cb_functions"/>
-         </item>
-         <item>
-          <widget class="QLineEdit" name="txt_args">
+          <widget class="QComboBox" name="cb_jobs">
            <property name="minimumSize">
             <size>
-             <width>200</width>
+             <width>150</width>
              <height>0</height>
             </size>
            </property>
-           <property name="maximumSize">
-            <size>
-             <width>200</width>
-             <height>16777215</height>
-            </size>
-           </property>
           </widget>
          </item>
          <item>
-          <widget class="QCheckBox" name="chk_expand">
-           <property name="minimumSize">
-            <size>
-             <width>100</width>
-             <height>0</height>
-            </size>
-           </property>
-           <property name="maximumSize">
-            <size>
-             <width>100</width>
-             <height>16777215</height>
-            </size>
-           </property>
-           <property name="text">
-            <string>Auto-expand</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QToolButton" name="btn_run">
+          <widget class="QToolButton" name="btn_run_job">
            <property name="minimumSize">
             <size>
              <width>0</width>
@@ -175,7 +147,7 @@
             </size>
            </property>
            <property name="text">
-            <string>&gt;</string>
+            <string>Run job</string>
            </property>
           </widget>
          </item>
@@ -202,6 +174,84 @@
         </layout>
        </widget>
       </item>
+      <item>
+       <widget class="QStackedWidget" name="stack_job">
+        <property name="minimumSize">
+         <size>
+          <width>0</width>
+          <height>30</height>
+         </size>
+        </property>
+        <property name="maximumSize">
+         <size>
+          <width>16777215</width>
+          <height>30</height>
+         </size>
+        </property>
+        <property name="currentIndex">
+         <number>0</number>
+        </property>
+        <widget class="QWidget" name="page_2"/>
+        <widget class="QWidget" name="page">
+         <layout class="QHBoxLayout" name="horizontalLayout_3">
+          <property name="leftMargin">
+           <number>3</number>
+          </property>
+          <property name="topMargin">
+           <number>3</number>
+          </property>
+          <property name="rightMargin">
+           <number>3</number>
+          </property>
+          <property name="bottomMargin">
+           <number>3</number>
+          </property>
+          <item>
+           <widget class="QToolButton" name="btn_job_previous">
+            <property name="text">
+             <string>&lt;</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QToolButton" name="btn_job_next">
+            <property name="text">
+             <string>&gt;</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="lbl_job_number">
+            <property name="text">
+             <string>Test 1 / 1</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLineEdit" name="txt_job_run">
+            <property name="readOnly">
+             <bool>true</bool>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QLabel" name="lbl_job_exectime">
+            <property name="text">
+             <string>Exec. in 1000.000 ms. (saved: 10000.000 ms.)</string>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="QPushButton" name="btn_job_validate">
+            <property name="text">
+             <string>Validate</string>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </widget>
+       </widget>
+      </item>
       <item>
        <widget class="QGraphicsView" name="view">
         <property name="font">
@@ -301,9 +351,7 @@
  <tabstops>
   <tabstop>view</tabstop>
   <tabstop>btn_new_grid</tabstop>
-  <tabstop>cb_functions</tabstop>
-  <tabstop>txt_args</tabstop>
-  <tabstop>chk_expand</tabstop>
+  <tabstop>cb_jobs</tabstop>
   <tabstop>btn_list_view</tabstop>
   <tabstop>btn_zoom_plus</tabstop>
   <tabstop>btn_zoom_minus</tabstop>