mainui: implemented show/hide internal VMs
This commit is contained in:
parent
70e0a2b97a
commit
268c9a9d94
@ -799,6 +799,9 @@
|
|||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="checked">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset resource="resources.qrc">
|
<iconset resource="resources.qrc">
|
||||||
<normaloff>:/show-all-running.png</normaloff>:/show-all-running.png</iconset>
|
<normaloff>:/show-all-running.png</normaloff>:/show-all-running.png</iconset>
|
||||||
|
@ -1002,6 +1002,21 @@ class VmManagerWindow(Ui_VmManagerWindow, QMainWindow):
|
|||||||
self.table.setRowHidden(row_no, True)
|
self.table.setRowHidden(row_no, True)
|
||||||
row_no += 1
|
row_no += 1
|
||||||
|
|
||||||
|
def showhide_internal_vms(self, show_internal):
|
||||||
|
if show_internal:
|
||||||
|
row_no = 0
|
||||||
|
while row_no < self.table.rowCount():
|
||||||
|
self.table.setRowHidden(row_no, False)
|
||||||
|
row_no += 1
|
||||||
|
else:
|
||||||
|
row_no = 0
|
||||||
|
while row_no < self.table.rowCount():
|
||||||
|
widget = self.table.cellWidget(row_no, self.columns_indices["State"])
|
||||||
|
internal = widget.vm.internal
|
||||||
|
if internal:
|
||||||
|
self.table.setRowHidden(row_no, True)
|
||||||
|
row_no += 1
|
||||||
|
|
||||||
def mark_table_for_update(self):
|
def mark_table_for_update(self):
|
||||||
self.reload_table = True
|
self.reload_table = True
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user