1
0
forked from IPKM/nmreval

display drawings of graphs

This commit is contained in:
Dominik Demuth 2023-04-01 20:25:44 +02:00
parent c31f52cefe
commit 8d2bfacaca

View File

@ -31,6 +31,18 @@ class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
for gid, windows in self.graphs.items(): for gid, windows in self.graphs.items():
self.graph_combobox.addItem(windows.title, userData=gid) self.graph_combobox.addItem(windows.title, userData=gid)
@QtCore.pyqtSlot(int, name='on_graph_combobox_currentIndexChanged')
def look_for_drawing(self, idx: int):
self.listWidget.clear()
graph_id = self.graph_combobox.itemData(idx)
for k, v in self.graphs[graph_id].drawings.items():
child = QtWidgets.QListWidgetItem(str(v))
child.setData(QtCore.Qt.UserRole, k)
self.listWidget.addItem(child)
@QtCore.pyqtSlot(name='on_newButton_clicked') @QtCore.pyqtSlot(name='on_newButton_clicked')
@QtCore.pyqtSlot(name='on_editButton_clicked') @QtCore.pyqtSlot(name='on_editButton_clicked')
def start_drawing(self): def start_drawing(self):