move to combobox + list instead of tree
This commit is contained in:
parent
bd4b88102a
commit
b31dec4c7b
@ -257,13 +257,13 @@ class Ui_BaseWindow(object):
|
||||
self.actionGuide_lines.setObjectName("actionGuide_lines")
|
||||
self.actionMaximize = QtWidgets.QAction(BaseWindow)
|
||||
self.actionMaximize.setCheckable(True)
|
||||
self.actionMaximize.setVisible(False)
|
||||
self.actionMaximize.setVisible(True)
|
||||
self.actionMaximize.setObjectName("actionMaximize")
|
||||
self.actionTile = QtWidgets.QAction(BaseWindow)
|
||||
self.actionTile.setObjectName("actionTile")
|
||||
self.actionMinimize = QtWidgets.QAction(BaseWindow)
|
||||
self.actionMinimize.setCheckable(True)
|
||||
self.actionMinimize.setVisible(False)
|
||||
self.actionMinimize.setVisible(True)
|
||||
self.actionMinimize.setObjectName("actionMinimize")
|
||||
self.actionNew_window = QtWidgets.QAction(BaseWindow)
|
||||
self.actionNew_window.setObjectName("actionNew_window")
|
||||
|
@ -18,9 +18,9 @@ class Ui_Form(object):
|
||||
self.verticalLayout_2 = QtWidgets.QVBoxLayout(Form)
|
||||
self.verticalLayout_2.setContentsMargins(3, 3, 3, 3)
|
||||
self.verticalLayout_2.setObjectName("verticalLayout_2")
|
||||
self.comboBox = QtWidgets.QComboBox(Form)
|
||||
self.comboBox.setObjectName("comboBox")
|
||||
self.verticalLayout_2.addWidget(self.comboBox)
|
||||
self.graph_combobox = QtWidgets.QComboBox(Form)
|
||||
self.graph_combobox.setObjectName("graph_combobox")
|
||||
self.verticalLayout_2.addWidget(self.graph_combobox)
|
||||
self.listWidget = QtWidgets.QListWidget(Form)
|
||||
self.listWidget.setObjectName("listWidget")
|
||||
self.verticalLayout_2.addWidget(self.listWidget)
|
||||
|
@ -220,3 +220,6 @@ class Ellipse(GraphicsObject):
|
||||
self.log_mode = [x_mode, y_mode]
|
||||
|
||||
self.informViewBoundsChanged()
|
||||
|
||||
def get_state(self):
|
||||
return {'center': self.center, 'axes': self.ax}
|
||||
|
@ -21,18 +21,10 @@ class DrawingsWidget(QtWidgets.QWidget, Ui_Form):
|
||||
|
||||
def update_tree(self):
|
||||
for gid, windows in self.graphs.items():
|
||||
item = QtWidgets.QTreeWidgetItem([windows.title])
|
||||
item.setData(0, QtCore.Qt.UserRole, gid)
|
||||
|
||||
for d in windows.drawings.values():
|
||||
child = QtWidgets.QTreeWidgetItem([d])
|
||||
item.addChild(child)
|
||||
|
||||
self.treeWidget.addTopLevelItem(item)
|
||||
# self.graph_comboBox.addItem(name, userData=gid)
|
||||
self.graph_combobox.addItem(windows.title, userData=gid)
|
||||
|
||||
def clear(self):
|
||||
self.graph_comboBox.clear()
|
||||
self.graph_combobox.clear()
|
||||
|
||||
@QtCore.pyqtSlot(int, name='on_mode_comboBox_currentIndexChanged')
|
||||
def change_draw_type(self, idx: int):
|
||||
|
@ -734,7 +734,7 @@
|
||||
<string>Maximize</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionTile">
|
||||
@ -750,7 +750,7 @@
|
||||
<string>Minimize</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionNew_window">
|
||||
|
@ -27,7 +27,7 @@
|
||||
<number>3</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox"/>
|
||||
<widget class="QComboBox" name="graph_combobox"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
|
Loading…
Reference in New Issue
Block a user