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


Python QGraphicsView.setEnabled方法代码示例

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


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

示例1: CarlaPatchbayW

# 需要导入模块: from PyQt5.QtWidgets import QGraphicsView [as 别名]
# 或者: from PyQt5.QtWidgets.QGraphicsView import setEnabled [as 别名]

#.........这里部分代码省略.........
        self.fParent.ui.act_settings_show_keyboard.setChecked(showKeyboard)
        self.fKeys.setVisible(showKeyboard)

        # -------------------------------------------------------------
        # Connect actions to functions (part 2)

        host.PluginAddedCallback.connect(self.slot_handlePluginAddedCallback)
        host.PluginRemovedCallback.connect(self.slot_handlePluginRemovedCallback)
        host.NoteOnCallback.connect(self.slot_handleNoteOnCallback)
        host.NoteOffCallback.connect(self.slot_handleNoteOffCallback)
        host.PatchbayClientAddedCallback.connect(self.slot_handlePatchbayClientAddedCallback)
        host.PatchbayClientRemovedCallback.connect(self.slot_handlePatchbayClientRemovedCallback)
        host.PatchbayClientRenamedCallback.connect(self.slot_handlePatchbayClientRenamedCallback)
        host.PatchbayClientDataChangedCallback.connect(self.slot_handlePatchbayClientDataChangedCallback)
        host.PatchbayPortAddedCallback.connect(self.slot_handlePatchbayPortAddedCallback)
        host.PatchbayPortRemovedCallback.connect(self.slot_handlePatchbayPortRemovedCallback)
        host.PatchbayPortRenamedCallback.connect(self.slot_handlePatchbayPortRenamedCallback)
        host.PatchbayConnectionAddedCallback.connect(self.slot_handlePatchbayConnectionAddedCallback)
        host.PatchbayConnectionRemovedCallback.connect(self.slot_handlePatchbayConnectionRemovedCallback)

        if not doSetup: return

        parent.ui.act_plugins_enable.triggered.connect(self.slot_pluginsEnable)
        parent.ui.act_plugins_disable.triggered.connect(self.slot_pluginsDisable)
        parent.ui.act_plugins_volume100.triggered.connect(self.slot_pluginsVolume100)
        parent.ui.act_plugins_mute.triggered.connect(self.slot_pluginsMute)
        parent.ui.act_plugins_wet100.triggered.connect(self.slot_pluginsWet100)
        parent.ui.act_plugins_bypass.triggered.connect(self.slot_pluginsBypass)
        parent.ui.act_plugins_center.triggered.connect(self.slot_pluginsCenter)
        parent.ui.act_plugins_panic.triggered.connect(self.slot_pluginsDisable)

        parent.ui.act_canvas_show_internal.triggered.connect(self.slot_canvasShowInternal)
        parent.ui.act_canvas_show_external.triggered.connect(self.slot_canvasShowExternal)
        parent.ui.act_canvas_arrange.setEnabled(False) # TODO, later
        parent.ui.act_canvas_arrange.triggered.connect(self.slot_canvasArrange)
        parent.ui.act_canvas_refresh.triggered.connect(self.slot_canvasRefresh)
        parent.ui.act_canvas_zoom_fit.triggered.connect(self.slot_canvasZoomFit)
        parent.ui.act_canvas_zoom_in.triggered.connect(self.slot_canvasZoomIn)
        parent.ui.act_canvas_zoom_out.triggered.connect(self.slot_canvasZoomOut)
        parent.ui.act_canvas_zoom_100.triggered.connect(self.slot_canvasZoomReset)
        parent.ui.act_canvas_print.triggered.connect(self.slot_canvasPrint)
        parent.ui.act_canvas_save_image.triggered.connect(self.slot_canvasSaveImage)

        parent.ui.act_settings_configure.triggered.connect(self.slot_configureCarla)

    # -----------------------------------------------------------------

    def getPluginEditDialog(self, pluginId):
        if pluginId >= self.fPluginCount:
            return None

        pedit = self.fPluginList[pluginId]
        if pedit is None:
            return None
        if False:
            pedit = DummyPluginEdit(self, 0)

        return pedit

    # -----------------------------------------------------------------

    @pyqtSlot(int, str)
    def slot_handlePluginAddedCallback(self, pluginId, pluginName):
        if self.fIsOnlyPatchbay:
            pedit = PluginEdit(self, self.host, pluginId)
        else:
开发者ID:denisfitz57,项目名称:Carla,代码行数:70,代码来源:carla_patchbay.py


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