| 388 | |
| 389 | |
| 390 | class FormTabWidget(QtWidgets.QWidget): |
| 391 | update_buttons = QtCore.Signal() |
| 392 | |
| 393 | def __init__(self, datalist, comment="", parent=None): |
| 394 | super().__init__(parent) |
| 395 | layout = QtWidgets.QVBoxLayout() |
| 396 | self.tabwidget = QtWidgets.QTabWidget() |
| 397 | layout.addWidget(self.tabwidget) |
| 398 | layout.setContentsMargins(0, 0, 0, 0) |
| 399 | self.setLayout(layout) |
| 400 | self.widgetlist = [] |
| 401 | for data, title, comment in datalist: |
| 402 | if len(data[0]) == 3: |
| 403 | widget = FormComboWidget(data, comment=comment, parent=self) |
| 404 | else: |
| 405 | widget = FormWidget(data, with_margin=True, comment=comment, |
| 406 | parent=self) |
| 407 | index = self.tabwidget.addTab(widget, title) |
| 408 | self.tabwidget.setTabToolTip(index, comment) |
| 409 | self.widgetlist.append(widget) |
| 410 | |
| 411 | def setup(self): |
| 412 | for widget in self.widgetlist: |
| 413 | widget.setup() |
| 414 | |
| 415 | def get(self): |
| 416 | return [widget.get() for widget in self.widgetlist] |
| 417 | |
| 418 | |
| 419 | class FormDialog(QtWidgets.QDialog): |
no outgoing calls
no test coverage detected
searching dependent graphs…