Thu, 30 Dec 2021 11:17:58 +0100
Updated copyright for 2022.
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
8881
54e42bc2437a
Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8318
diff
changeset
|
3 | # Copyright (c) 2021 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing a dialog to select the port to connect to and the type of |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | the attached device. |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | |
8318
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
11 | from PyQt6.QtCore import pyqtSlot, Qt |
962bce857696
Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
12 | from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | from .Ui_ConnectionSelectionDialog import Ui_ConnectionSelectionDialog |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | from . import MicroPythonDevices |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | class ConnectionSelectionDialog(QDialog, Ui_ConnectionSelectionDialog): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | Class implementing a dialog to select the port to connect to and the type |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | of the attached device. |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | """ |
8143
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8139
diff
changeset
|
24 | PortNameRole = Qt.ItemDataRole.UserRole |
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8139
diff
changeset
|
25 | VidPidRole = Qt.ItemDataRole.UserRole + 1 |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | def __init__(self, ports, currentPort, currentType, parent=None): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | Constructor |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | @param ports list of detected ports |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | @type list of str |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | @param currentPort port most recently selected |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | @type str |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | @param currentType device type most recently selected |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | @type str |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | @param parent reference to the parent widget (defaults to None) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | @type QWidget (optional) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | """ |
8218
7c09585bd960
Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8143
diff
changeset
|
40 | super().__init__(parent) |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | self.setupUi(self) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | for index, (vid, pid, description, portName) in enumerate( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | sorted(ports, key=lambda x: x[3]) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | ): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | self.portNameComboBox.addItem( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | self.tr("{0} - {1}", "description - port name") |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | .format(description, portName)) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | self.portNameComboBox.setItemData( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | index, portName, self.PortNameRole) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | self.portNameComboBox.setItemData( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | index, (vid, pid), self.VidPidRole) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | self.deviceTypeComboBox.addItem("", "") |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | for board, description in sorted( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | MicroPythonDevices.getSupportedDevices(), |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | key=lambda x: x[1] |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | ): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | self.deviceTypeComboBox.addItem(description, board) |
8135
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
60 | |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
61 | if self.portNameComboBox.currentText(): |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
62 | # some ports were found; use the previously selected type as |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
63 | # default |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
64 | portIndex = self.portNameComboBox.findData( |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
65 | currentPort, self.PortNameRole) |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
66 | typeIndex = self.deviceTypeComboBox.findData(currentType) |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
67 | else: |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
68 | portIndex = 0 |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
69 | typeIndex = 0 |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
70 | self.portNameComboBox.setCurrentIndex(portIndex) |
7cbb1ebf8d2d
MicroPython: fixed some logic issues related to handling of unknown devices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8134
diff
changeset
|
71 | self.deviceTypeComboBox.setCurrentIndex(typeIndex) |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | self.__updateOK() |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
74 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | msh = self.minimumSizeHint() |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | self.resize(max(self.width(), msh.width()), msh.height()) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | def __updateOK(self): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
80 | Private method to update the status of the OK button. |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
81 | """ |
8143
2c730d5fd177
Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8139
diff
changeset
|
82 | self.buttonBox.button(QDialogButtonBox.StandardButton.Ok).setEnabled( |
8139
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
83 | bool(self.portNameComboBox.currentData(self.PortNameRole)) and |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
84 | bool(self.deviceTypeComboBox.currentData()) |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
85 | ) |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
86 | |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
87 | @pyqtSlot(str) |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
88 | def on_portNameComboBox_currentTextChanged(self, txt): |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
89 | """ |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
90 | Private slot to handle the selection of a port name. |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
91 | |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
92 | @param txt selected port |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
93 | @type str |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
94 | """ |
418c2d9a767d
MicroPython: refined the selection of unknown dvices.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8135
diff
changeset
|
95 | self.__updateOK() |
8134
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
96 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
97 | @pyqtSlot(str) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
98 | def on_deviceTypeComboBox_currentTextChanged(self, txt): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
99 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
100 | Private slot to handle the selection of a device type. |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
101 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
102 | @param txt selected device description |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
103 | @type str |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
104 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
105 | self.__updateOK() |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
106 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
107 | def getData(self): |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
108 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
109 | Public method to get the entered data. |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
110 | |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
111 | @return tuple containing the VID, PID and name of the selected port |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
112 | and the selected device type |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
113 | @rtype tuple of (int, int, str, str) |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
114 | """ |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
115 | return ( |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
116 | *self.portNameComboBox.currentData(self.VidPidRole), |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
117 | self.portNameComboBox.currentData(self.PortNameRole), |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
118 | self.deviceTypeComboBox.currentData(), |
a5c4ac339f2a
MicroPython: finished adding manual connection capability with device type and port selection.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
119 | ) |