当前位置: 首页>>代码示例>>Python>>正文


Python SymbolSelectionDialog.show方法代码示例

本文整理汇总了Python中gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog.show方法的典型用法代码示例。如果您正苦于以下问题:Python SymbolSelectionDialog.show方法的具体用法?Python SymbolSelectionDialog.show怎么用?Python SymbolSelectionDialog.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog的用法示例。


在下文中一共展示了SymbolSelectionDialog.show方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _symbolBrowserSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [as 别名]
    def _symbolBrowserSlot(self):
        """
        Slot to open the symbol browser and select a new symbol.
        """

        symbol_path = self.uiSymbolLineEdit.text()
        dialog = SymbolSelectionDialog(self, symbol=symbol_path)
        dialog.show()
        if dialog.exec_():
            new_symbol_path = dialog.getSymbol()
            self.uiSymbolLineEdit.setText(new_symbol_path)
            self.uiSymbolLineEdit.setToolTip('<img src="{}"/>'.format(new_symbol_path))
开发者ID:guili618,项目名称:gns3-gui,代码行数:14,代码来源:vpcs_preferences_page.py

示例2: _symbolSelectionSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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)
开发者ID:Legun,项目名称:gns3-gui,代码行数:14,代码来源:qemu_vm_preferences_page.py

示例3: _changeSymbolSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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
开发者ID:guili618,项目名称:gns3-gui,代码行数:18,代码来源:docker_vm_preferences_page.py

示例4: _changeSymbolSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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
开发者ID:planctechnologies,项目名称:gns3-gui,代码行数:20,代码来源:iou_device_preferences_page.py

示例5: _changeSymbolSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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
开发者ID:aoighost,项目名称:gns3-gui,代码行数:20,代码来源:ios_router_preferences_page.py

示例6: _changeSymbolSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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
开发者ID:aoighost,项目名称:gns3-gui,代码行数:20,代码来源:qemu_vm_preferences_page.py

示例7: _changeSymbolSlot

# 需要导入模块: from gns3.dialogs.symbol_selection_dialog import SymbolSelectionDialog [as 别名]
# 或者: from gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog import show [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
开发者ID:planctechnologies,项目名称:gns3-gui,代码行数:20,代码来源:virtualbox_vm_preferences_page.py


注:本文中的gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog.show方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。