Skip to content

Commit 6d0a791

Browse files
committed
#62 MLC GUI about section added
1 parent ce163ba commit 6d0a791

File tree

6 files changed

+1683
-1466
lines changed

6 files changed

+1683
-1466
lines changed

MLC/GUI/Autogenerated/autogenerated.py

Lines changed: 1493 additions & 1464 deletions
Large diffs are not rendered by default.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<ui version="4.0">
3+
<class>MLCAboutDialog</class>
4+
<widget class="QDialog" name="MLCAboutDialog">
5+
<property name="geometry">
6+
<rect>
7+
<x>0</x>
8+
<y>0</y>
9+
<width>403</width>
10+
<height>464</height>
11+
</rect>
12+
</property>
13+
<property name="windowTitle">
14+
<string>MLC</string>
15+
</property>
16+
<property name="sizeGripEnabled">
17+
<bool>false</bool>
18+
</property>
19+
<layout class="QGridLayout" name="gridLayout">
20+
<item row="0" column="0">
21+
<widget class="QWidget" name="mlcimage" native="true">
22+
<property name="styleSheet">
23+
<string notr="true">image: url(:/boards/images/uno.jpg);</string>
24+
</property>
25+
</widget>
26+
</item>
27+
<item row="2" column="0">
28+
<widget class="QDialogButtonBox" name="buttonBox">
29+
<property name="orientation">
30+
<enum>Qt::Horizontal</enum>
31+
</property>
32+
<property name="standardButtons">
33+
<set>QDialogButtonBox::Ok</set>
34+
</property>
35+
<property name="centerButtons">
36+
<bool>true</bool>
37+
</property>
38+
</widget>
39+
</item>
40+
<item row="1" column="0">
41+
<widget class="QLabel" name="labelabout">
42+
<property name="text">
43+
<string/>
44+
</property>
45+
<property name="textFormat">
46+
<enum>Qt::RichText</enum>
47+
</property>
48+
<property name="wordWrap">
49+
<bool>true</bool>
50+
</property>
51+
<property name="openExternalLinks">
52+
<bool>true</bool>
53+
</property>
54+
<property name="textInteractionFlags">
55+
<set>Qt::TextBrowserInteraction</set>
56+
</property>
57+
</widget>
58+
</item>
59+
</layout>
60+
</widget>
61+
<resources/>
62+
<connections>
63+
<connection>
64+
<sender>buttonBox</sender>
65+
<signal>accepted()</signal>
66+
<receiver>MLCAboutDialog</receiver>
67+
<slot>accept()</slot>
68+
<hints>
69+
<hint type="sourcelabel">
70+
<x>248</x>
71+
<y>254</y>
72+
</hint>
73+
<hint type="destinationlabel">
74+
<x>157</x>
75+
<y>274</y>
76+
</hint>
77+
</hints>
78+
</connection>
79+
<connection>
80+
<sender>buttonBox</sender>
81+
<signal>rejected()</signal>
82+
<receiver>MLCAboutDialog</receiver>
83+
<slot>reject()</slot>
84+
<hints>
85+
<hint type="sourcelabel">
86+
<x>316</x>
87+
<y>260</y>
88+
</hint>
89+
<hint type="destinationlabel">
90+
<x>286</x>
91+
<y>274</y>
92+
</hint>
93+
</hints>
94+
</connection>
95+
</connections>
96+
</ui>

MLC/GUI/Autogenerated/mlc_qtcreator/mainwindow.ui

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
<x>0</x>
173173
<y>0</y>
174174
<width>749</width>
175-
<height>19</height>
175+
<height>23</height>
176176
</rect>
177177
</property>
178178
<widget class="QMenu" name="menuMLC">
@@ -193,6 +193,17 @@
193193
<addaction name="menuProperties"/>
194194
</widget>
195195
<widget class="QStatusBar" name="statusBar"/>
196+
<widget class="QToolBar" name="toolBar">
197+
<property name="windowTitle">
198+
<string>toolBar</string>
199+
</property>
200+
<attribute name="toolBarArea">
201+
<enum>TopToolBarArea</enum>
202+
</attribute>
203+
<attribute name="toolBarBreak">
204+
<bool>false</bool>
205+
</attribute>
206+
</widget>
196207
<action name="menu_properties">
197208
<property name="text">
198209
<string>Properties</string>
@@ -381,6 +392,22 @@
381392
</hint>
382393
</hints>
383394
</connection>
395+
<connection>
396+
<sender>menu_about</sender>
397+
<signal>triggered()</signal>
398+
<receiver>MLCManager</receiver>
399+
<slot>menu_about()</slot>
400+
<hints>
401+
<hint type="sourcelabel">
402+
<x>-1</x>
403+
<y>-1</y>
404+
</hint>
405+
<hint type="destinationlabel">
406+
<x>374</x>
407+
<y>292</y>
408+
</hint>
409+
</hints>
410+
</connection>
384411
</connections>
385412
<slots>
386413
<slot>on_new_button_clicked()</slot>
@@ -391,5 +418,6 @@
391418
<slot>on_experiment_list_clicked()</slot>
392419
<slot>on_import_button_clicked()</slot>
393420
<slot>on_export_button_clicked()</slot>
421+
<slot>menu_about()</slot>
394422
</slots>
395423
</ui>

MLC/GUI/Autogenerated/mlc_qtcreator/mlc_qtcreator.pro

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ FORMS += \
2828
board_config_design.ui \
2929
arduinoconnectiontest.ui \
3030
pinout_design.ui \
31-
arduino_performance_test.ui
31+
arduino_performance_test.ui \
32+
about.ui
3233

3334
DISTFILES +=
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- coding: utf-8 -*-
2+
# MLC (Machine Learning Control): A genetic algorithm library to solve chaotic problems
3+
# Copyright (C) 2015-2017, Thomas Duriez (thomas.duriez@gmail.com)
4+
# Copyright (C) 2015, Adrian Durán (adrianmdu@gmail.com)
5+
# Copyright (C) 2015-2017, Ezequiel Torres Feyuk (ezequiel.torresfeyuk@gmail.com)
6+
# Copyright (C) 2016-2017, Marco Germano Zbrun (marco.germano@intraway.com)
7+
# Copyright (C) 2016-2017, Raúl Lopez Skuba (raulopez0@gmail.com)
8+
#
9+
# This program is free software: you can redistribute it and/or modify
10+
# it under the terms of the GNU General Public License as published by
11+
# the Free Software Foundation, either version 3 of the License, or
12+
# (at your option) any later version.
13+
#
14+
# This program is distributed in the hope that it will be useful,
15+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17+
# GNU General Public License for more details.
18+
#
19+
# You should have received a copy of the GNU General Public License
20+
# along with this program. If not, see <http://www.gnu.org/licenses/>
21+
22+
from PyQt5.QtWidgets import QDialog
23+
from MLC.GUI.Autogenerated.autogenerated import Ui_MLCAboutDialog
24+
25+
26+
class MLCAboutDialog(QDialog):
27+
MLC_ABOUT = """
28+
MLC (Machine Learning Control), A genetic algorithm library to solve chaotic problems<br>
29+
<br>
30+
Version:%s<br>
31+
<br>
32+
Copyright (C) 2015-2017, Thomas Duriez (thomas.duriez@gmail.com)<br>
33+
Copyright (C) 2015, Adrian Durán (adrianmdu@gmail.com)<br>
34+
Copyright (C) 2015-2017, Ezequiel Torres Feyuk (ezequiel.torresfeyuk@gmail.com)<br>
35+
Copyright (C) 2016-2017, Marco Germano Zbrun (marco.germano@intraway.com)<br>
36+
Copyright (C) 2016-2017, Raúl Lopez Skuba (raulopez0@gmail.com)<br>
37+
<br>
38+
This program is free software: you can redistribute it and/or modify
39+
it under the terms of the GNU General Public License as published by
40+
the Free Software Foundation, either version 3 of the License, or
41+
(at your option) any later version.
42+
<br>
43+
<br>
44+
<div style="text-align: center">
45+
<a href=\"https://github.com/Ezetowers/MLC\">https://github.com/Ezetowers/MLC</a>
46+
</div>
47+
<br>
48+
<br>
49+
""" % "2.0"
50+
51+
def __init__(self, board_path, parent=None):
52+
super(MLCAboutDialog, self).__init__(parent)
53+
self.ui = Ui_MLCAboutDialog()
54+
self.ui.setupUi(self)
55+
self.ui.mlcimage.setStyleSheet("image: url(images/mlc_icon.png);")
56+
self.ui.labelabout.setText(self.MLC_ABOUT)
57+
self.resize(600, 500)
58+
self.setFixedSize(600, 500)

MLC/GUI/mlc_gui.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
from MLC.GUI.ExperimentsManager import ExperimentsManager
3434
from MLC.GUI.Autogenerated.autogenerated import Ui_MLCManager
3535
from MLC.GUI.Autogenerated.autogenerated import Ui_PropertiesDialog
36+
from MLC.GUI.Experiment.MLCAboutDialog import MLCAboutDialog
3637
from MLC.GUI.Experiment.ExperimentWindow import ExperimentWindow
3738
from MLC.GUI.Tables.ConfigParserTableModel import ConfigParserTableModel
3839
from MLC.Log.log import get_gui_logger
@@ -284,6 +285,10 @@ def edit_gui_config(self):
284285
properties_dialog.tableView.setSortingEnabled(True)
285286
dialog.exec_()
286287

288+
def menu_about(self):
289+
dialog = MLCAboutDialog(self)
290+
dialog.exec_()
291+
287292
def on_experiment_list_clicked(self, model_index):
288293
list_view = self._autogenerated_object.experiment_list
289294
experiment_name = list_view.model().itemFromIndex(model_index).text()

0 commit comments

Comments
 (0)