Skip to content

Commit 31c81ee

Browse files
committed
Added ArduinoBoard controller
* Implemented GUI adding and removing of ports * Al added and removed ports are tracked by the controller/model (some refactoring is needed here) * Added spinner for the checking connection dialog * Switching between boards erase current configuration (user check is made) * Standarized paths for image query issue #22
1 parent 722075e commit 31c81ee

File tree

14 files changed

+1422
-813
lines changed

14 files changed

+1422
-813
lines changed

MLC/GUI/Autogenerated/autogenerated.py

Lines changed: 735 additions & 710 deletions
Large diffs are not rendered by default.

MLC/GUI/Autogenerated/mlc_qtcreator/arduinoconnectiontest.ui

Lines changed: 9 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@
1717
<property name="sizeConstraint">
1818
<enum>QLayout::SetMinimumSize</enum>
1919
</property>
20-
<item>
21-
<widget class="QLabel" name="loadingPanel">
22-
<property name="text">
23-
<string/>
24-
</property>
25-
<property name="alignment">
26-
<set>Qt::AlignCenter</set>
27-
</property>
20+
<item alignment="Qt::AlignHCenter">
21+
<widget class="QWidget" name="widget" native="true">
22+
<layout class="QVBoxLayout" name="verticalLayout_2"/>
2823
</widget>
2924
</item>
3025
<item>
@@ -68,33 +63,17 @@
6863
<connections>
6964
<connection>
7065
<sender>buttonBox</sender>
71-
<signal>accepted()</signal>
72-
<receiver>ArduinoConnectionDialog</receiver>
73-
<slot>accept()</slot>
74-
<hints>
75-
<hint type="sourcelabel">
76-
<x>248</x>
77-
<y>254</y>
78-
</hint>
79-
<hint type="destinationlabel">
80-
<x>157</x>
81-
<y>274</y>
82-
</hint>
83-
</hints>
84-
</connection>
85-
<connection>
86-
<sender>buttonBox</sender>
87-
<signal>rejected()</signal>
66+
<signal>clicked(QAbstractButton*)</signal>
8867
<receiver>ArduinoConnectionDialog</receiver>
89-
<slot>reject()</slot>
68+
<slot>close()</slot>
9069
<hints>
9170
<hint type="sourcelabel">
92-
<x>316</x>
93-
<y>260</y>
71+
<x>199</x>
72+
<y>277</y>
9473
</hint>
9574
<hint type="destinationlabel">
96-
<x>286</x>
97-
<y>274</y>
75+
<x>199</x>
76+
<y>149</y>
9877
</hint>
9978
</hints>
10079
</connection>

MLC/GUI/Autogenerated/mlc_qtcreator/board_config_design.ui

Lines changed: 141 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -280,10 +280,44 @@
280280
</widget>
281281
</item>
282282
<item>
283-
<widget class="QPushButton" name="addDigitalPin">
284-
<property name="text">
285-
<string>Add Pin</string>
283+
<widget class="QFrame" name="frame_8">
284+
<property name="frameShape">
285+
<enum>QFrame::NoFrame</enum>
286+
</property>
287+
<property name="frameShadow">
288+
<enum>QFrame::Raised</enum>
286289
</property>
290+
<layout class="QHBoxLayout" name="horizontalLayout_6">
291+
<property name="spacing">
292+
<number>4</number>
293+
</property>
294+
<property name="leftMargin">
295+
<number>0</number>
296+
</property>
297+
<property name="topMargin">
298+
<number>0</number>
299+
</property>
300+
<property name="rightMargin">
301+
<number>0</number>
302+
</property>
303+
<property name="bottomMargin">
304+
<number>0</number>
305+
</property>
306+
<item>
307+
<widget class="QPushButton" name="addDigitalPin">
308+
<property name="text">
309+
<string>Add Pin</string>
310+
</property>
311+
</widget>
312+
</item>
313+
<item>
314+
<widget class="QPushButton" name="removeDigitalPin">
315+
<property name="text">
316+
<string>Remove Pin</string>
317+
</property>
318+
</widget>
319+
</item>
320+
</layout>
287321
</widget>
288322
</item>
289323
<item>
@@ -417,10 +451,44 @@
417451
</widget>
418452
</item>
419453
<item>
420-
<widget class="QPushButton" name="addPin">
421-
<property name="text">
422-
<string>Add Pin</string>
454+
<widget class="QFrame" name="frame_9">
455+
<property name="frameShape">
456+
<enum>QFrame::StyledPanel</enum>
457+
</property>
458+
<property name="frameShadow">
459+
<enum>QFrame::Raised</enum>
423460
</property>
461+
<layout class="QHBoxLayout" name="horizontalLayout_7">
462+
<property name="spacing">
463+
<number>4</number>
464+
</property>
465+
<property name="leftMargin">
466+
<number>0</number>
467+
</property>
468+
<property name="topMargin">
469+
<number>0</number>
470+
</property>
471+
<property name="rightMargin">
472+
<number>0</number>
473+
</property>
474+
<property name="bottomMargin">
475+
<number>0</number>
476+
</property>
477+
<item>
478+
<widget class="QPushButton" name="addAnalogPin">
479+
<property name="text">
480+
<string>Add Pin</string>
481+
</property>
482+
</widget>
483+
</item>
484+
<item>
485+
<widget class="QPushButton" name="removeAnalogPin">
486+
<property name="text">
487+
<string>Remove Pin</string>
488+
</property>
489+
</widget>
490+
</item>
491+
</layout>
424492
</widget>
425493
</item>
426494
</layout>
@@ -490,16 +558,9 @@
490558
</widget>
491559
</item>
492560
<item>
493-
<widget class="QPushButton" name="cancelButton">
494-
<property name="text">
495-
<string>Cancel</string>
496-
</property>
497-
</widget>
498-
</item>
499-
<item>
500-
<widget class="QPushButton" name="acceptButton">
561+
<widget class="QPushButton" name="closeButton">
501562
<property name="text">
502-
<string>Accept</string>
563+
<string>Close</string>
503564
</property>
504565
</widget>
505566
</item>
@@ -513,14 +574,14 @@
513574
<resources/>
514575
<connections>
515576
<connection>
516-
<sender>addDigitalPin</sender>
577+
<sender>addAnalogPin</sender>
517578
<signal>clicked()</signal>
518579
<receiver>BoardConfigurationWindow</receiver>
519-
<slot>insertDigitalPin()</slot>
580+
<slot>insertAnalogPin()</slot>
520581
<hints>
521582
<hint type="sourcelabel">
522-
<x>203</x>
523-
<y>207</y>
583+
<x>577</x>
584+
<y>242</y>
524585
</hint>
525586
<hint type="destinationlabel">
526587
<x>391</x>
@@ -529,14 +590,14 @@
529590
</hints>
530591
</connection>
531592
<connection>
532-
<sender>addPin</sender>
593+
<sender>testInterface</sender>
533594
<signal>clicked()</signal>
534595
<receiver>BoardConfigurationWindow</receiver>
535-
<slot>insertAnalogPin()</slot>
596+
<slot>checkConnection()</slot>
536597
<hints>
537598
<hint type="sourcelabel">
538-
<x>579</x>
539-
<y>206</y>
599+
<x>692</x>
600+
<y>92</y>
540601
</hint>
541602
<hint type="destinationlabel">
542603
<x>391</x>
@@ -545,14 +606,14 @@
545606
</hints>
546607
</connection>
547608
<connection>
548-
<sender>testInterface</sender>
609+
<sender>showPinout</sender>
549610
<signal>clicked()</signal>
550611
<receiver>BoardConfigurationWindow</receiver>
551-
<slot>checkConnection()</slot>
612+
<slot>showPinout()</slot>
552613
<hints>
553614
<hint type="sourcelabel">
554615
<x>692</x>
555-
<y>92</y>
616+
<y>56</y>
556617
</hint>
557618
<hint type="destinationlabel">
558619
<x>391</x>
@@ -561,26 +622,76 @@
561622
</hints>
562623
</connection>
563624
<connection>
564-
<sender>showPinout</sender>
625+
<sender>addDigitalPin</sender>
565626
<signal>clicked()</signal>
566627
<receiver>BoardConfigurationWindow</receiver>
567-
<slot>showPinout()</slot>
628+
<slot>insertDigitalPin()</slot>
568629
<hints>
569630
<hint type="sourcelabel">
570-
<x>692</x>
571-
<y>56</y>
631+
<x>201</x>
632+
<y>242</y>
633+
</hint>
634+
<hint type="destinationlabel">
635+
<x>391</x>
636+
<y>294</y>
637+
</hint>
638+
</hints>
639+
</connection>
640+
<connection>
641+
<sender>closeButton</sender>
642+
<signal>clicked()</signal>
643+
<receiver>BoardConfigurationWindow</receiver>
644+
<slot>close()</slot>
645+
<hints>
646+
<hint type="sourcelabel">
647+
<x>580</x>
648+
<y>566</y>
572649
</hint>
573650
<hint type="destinationlabel">
574651
<x>391</x>
575652
<y>294</y>
576653
</hint>
577654
</hints>
578655
</connection>
656+
<connection>
657+
<sender>removeDigitalPin</sender>
658+
<signal>clicked()</signal>
659+
<receiver>BoardConfigurationWindow</receiver>
660+
<slot>removeDigitalPin()</slot>
661+
<hints>
662+
<hint type="sourcelabel">
663+
<x>358</x>
664+
<y>225</y>
665+
</hint>
666+
<hint type="destinationlabel">
667+
<x>3</x>
668+
<y>228</y>
669+
</hint>
670+
</hints>
671+
</connection>
672+
<connection>
673+
<sender>removeAnalogPin</sender>
674+
<signal>clicked()</signal>
675+
<receiver>BoardConfigurationWindow</receiver>
676+
<slot>removeAnalogPin()</slot>
677+
<hints>
678+
<hint type="sourcelabel">
679+
<x>712</x>
680+
<y>234</y>
681+
</hint>
682+
<hint type="destinationlabel">
683+
<x>775</x>
684+
<y>288</y>
685+
</hint>
686+
</hints>
687+
</connection>
579688
</connections>
580689
<slots>
581690
<slot>insertDigitalPin()</slot>
582691
<slot>insertAnalogPin()</slot>
583692
<slot>checkConnection()</slot>
584693
<slot>showPinout()</slot>
694+
<slot>removeDigitalPin()</slot>
695+
<slot>removeAnalogPin()</slot>
585696
</slots>
586697
</ui>

MLC/GUI/Autogenerated/mlc_qtcreator/mainwindow.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ void MainWindow::on_experiment_list_clicked(const QModelIndex &index)
2121
{
2222

2323
}
24+

0 commit comments

Comments
 (0)