當前位置: 首頁>>代碼示例>>Python>>正文


Python symbol_selection_dialog.SymbolSelectionDialog類代碼示例

本文整理匯總了Python中gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog的典型用法代碼示例。如果您正苦於以下問題:Python SymbolSelectionDialog類的具體用法?Python SymbolSelectionDialog怎麽用?Python SymbolSelectionDialog使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了SymbolSelectionDialog類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: _symbolBrowserSlot

    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,代碼行數:12,代碼來源:vpcs_preferences_page.py

示例2: _symbolSelectionSlot

    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,代碼行數:12,代碼來源:qemu_vm_preferences_page.py

示例3: _changeSymbolSlot

 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,代碼行數:16,代碼來源:docker_vm_preferences_page.py

示例4: _changeSymbolSlot

    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,代碼行數:18,代碼來源:iou_device_preferences_page.py

示例5: _changeSymbolSlot

    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,代碼行數:18,代碼來源:ios_router_preferences_page.py

示例6: _changeSymbolSlot

    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,代碼行數:18,代碼來源:qemu_vm_preferences_page.py

示例7: _changeSymbolSlot

    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,代碼行數:18,代碼來源:virtualbox_vm_preferences_page.py


注:本文中的gns3.dialogs.symbol_selection_dialog.SymbolSelectionDialog類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。