本文整理汇总了Python中gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog.getSymbols方法的典型用法代码示例。如果您正苦于以下问题:Python SymbolSelectionDialog.getSymbols方法的具体用法?Python SymbolSelectionDialog.getSymbols怎么用?Python SymbolSelectionDialog.getSymbols使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog
的用法示例。
在下文中一共展示了SymbolSelectionDialog.getSymbols方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _symbolSelectionSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _symbolSelectionSlot(self):
"""
Slot to select a symbol for the QEMU VM.
"""
dialog = SymbolSelectionDialog(self)
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
self.uiSymbolPushButton.setIcon(QtGui.QIcon(normal_symbol))
self.uiSymbolPushButton.setProperty("default_symbol", normal_symbol)
self.uiSymbolPushButton.setProperty("hover_symbol", selected_symbol)
示例2: _changeSymbolSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _changeSymbolSlot(self):
"""Change a symbol for a Docker image."""
item = self.uiDockerVMsTreeWidget.currentItem()
if item:
key = item.data(0, QtCore.Qt.UserRole)
docker_image = self._docker_images[key]
dialog = SymbolSelectionDialog(
self, symbol=docker_image["symbol"],
category=docker_image["category"])
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
category = dialog.getCategory()
item.setIcon(0, QtGui.QIcon(normal_symbol))
docker_image["symbol"] = normal_symbol
docker_image["category"] = category
示例3: _changeSymbolSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _changeSymbolSlot(self):
"""
Change a symbol for an IOU device.
"""
item = self.uiIOUDevicesTreeWidget.currentItem()
if item:
key = item.data(0, QtCore.Qt.UserRole)
iou_device = self._iou_devices[key]
dialog = SymbolSelectionDialog(self, symbol=iou_device["default_symbol"], category=iou_device["category"])
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
category = dialog.getCategory()
item.setIcon(0, QtGui.QIcon(normal_symbol))
iou_device["default_symbol"] = normal_symbol
iou_device["hover_symbol"] = selected_symbol
iou_device["category"] = category
示例4: _changeSymbolSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _changeSymbolSlot(self):
"""
Change a symbol for an IOS router.
"""
dialog = SymbolSelectionDialog(self)
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
category = dialog.getCategory()
item = self.uiIOSRoutersTreeWidget.currentItem()
if item:
item.setIcon(0, QtGui.QIcon(normal_symbol))
key = item.data(0, QtCore.Qt.UserRole)
ios_router = self._ios_routers[key]
ios_router["default_symbol"] = normal_symbol
ios_router["hover_symbol"] = selected_symbol
ios_router["category"] = category
示例5: _changeSymbolSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _changeSymbolSlot(self):
"""
Change a symbol for a QEMU VM.
"""
dialog = SymbolSelectionDialog(self)
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
category = dialog.getCategory()
item = self.uiQemuVMsTreeWidget.currentItem()
if item:
item.setIcon(0, QtGui.QIcon(normal_symbol))
key = item.data(0, QtCore.Qt.UserRole)
qemu_vm = self._qemu_vms[key]
qemu_vm["default_symbol"] = normal_symbol
qemu_vm["hover_symbol"] = selected_symbol
qemu_vm["category"] = category
示例6: _changeSymbolSlot
# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import getSymbols [as 别名]
def _changeSymbolSlot(self):
"""
Change a symbol for a VirtualBox VM.
"""
item = self.uiVirtualBoxVMsTreeWidget.currentItem()
if item:
key = item.data(0, QtCore.Qt.UserRole)
vbox_vm = self._virtualbox_vms[key]
dialog = SymbolSelectionDialog(self, symbol=vbox_vm["default_symbol"], category=vbox_vm["category"])
dialog.show()
if dialog.exec_():
normal_symbol, selected_symbol = dialog.getSymbols()
category = dialog.getCategory()
item.setIcon(0, QtGui.QIcon(normal_symbol))
vbox_vm["default_symbol"] = normal_symbol
vbox_vm["hover_symbol"] = selected_symbol
vbox_vm["category"] = category