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


Python Qt.RightDockWidgetArea方法代码示例

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


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

示例1: construct_ui

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def construct_ui(self):
        """ UI construction function.
        """
        self.addToolBar(Qt.TopToolBarArea, self.toolbar_control)

        log_dock = QDockWidget("Log", self)
        log_dock.setObjectName("dock_log")
        log_dock.setWidget(self.logger.widget)
        self.add_dock(log_dock)
        self.addDockWidget(Qt.RightDockWidgetArea, log_dock)

        dockFramerate = QDockWidget("Frame rates", self)
        dockFramerate.setWidget(self.plot_framerate)
        dockFramerate.setObjectName("dock_framerates")
        self.addDockWidget(Qt.RightDockWidgetArea, dockFramerate)
        self.add_dock(dockFramerate)

        if self.experiment.trigger is not None:
            self.toolbar_control.addWidget(self.chk_scope)

        self.experiment.gui_timer.timeout.connect(self.plot_framerate.update)

        self.toolbar_control.setObjectName("toolbar_control")
        self.setCentralWidget(None) 
开发者ID:portugueslab,项目名称:stytra,代码行数:26,代码来源:container_windows.py

示例2: createDocks

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def createDocks(self):
        self.docks["color"] = QDockWidget(self.tr("Color Variables"))
        self.docks["preview"] = QDockWidget(self.tr("Preview"))

        self.docks["color"].setMinimumSize(QSize(80, 20))
        self.docks["color"].setFeatures(QDockWidget.AllDockWidgetFeatures)
        self.docks["preview"].setMinimumSize(QSize(200, 200))
        self.docks["preview"].setFeatures(QDockWidget.DockWidgetMovable | QDockWidget.DockWidgetFloatable)

        self.addDockWidget(Qt.LeftDockWidgetArea, self.docks["color"])
        self.addDockWidget(Qt.RightDockWidgetArea, self.docks["preview"])

        class ColorPanelWidget(QWidget):
            def sizeHint(self):
                return self.layout().sizeHint()

        colorPanelWidget = ColorPanelWidget()
        # self.colorPanelLayout = QFlowLayout()
        colorPanelWidget.setLayout(self.colorPanelLayout)
        self.docks["color"].setWidget(colorPanelWidget)
        self.docks["preview"].setWidget(PreviewWidget())

        self.docks["color"].visibilityChanged.connect(self.actions["ShowColor"].setChecked) 
开发者ID:hustlei,项目名称:QssStylesheetEditor,代码行数:25,代码来源:mainwinbase.py

示例3: add_repl

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def add_repl(self, repl_pane, name):
        """
        Adds the referenced REPL pane to the application.
        """
        self.repl_pane = repl_pane
        self.repl = QDockWidget(_("{} REPL").format(name))
        self.repl.setWidget(repl_pane)
        self.repl.setFeatures(QDockWidget.DockWidgetMovable)
        self.repl.setAllowedAreas(
            Qt.BottomDockWidgetArea
            | Qt.LeftDockWidgetArea
            | Qt.RightDockWidgetArea
        )
        self.addDockWidget(Qt.BottomDockWidgetArea, self.repl)
        self.connect_zoom(self.repl_pane)
        self.repl_pane.set_theme(self.theme)
        self.repl_pane.setFocus() 
开发者ID:mu-editor,项目名称:mu,代码行数:19,代码来源:main.py

示例4: add_plotter

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def add_plotter(self, plotter_pane, name):
        """
        Adds the referenced plotter pane to the application.
        """
        self.plotter_pane = plotter_pane
        self.plotter = QDockWidget(_("{} Plotter").format(name))
        self.plotter.setWidget(plotter_pane)
        self.plotter.setFeatures(QDockWidget.DockWidgetMovable)
        self.plotter.setAllowedAreas(
            Qt.BottomDockWidgetArea
            | Qt.LeftDockWidgetArea
            | Qt.RightDockWidgetArea
        )
        self.addDockWidget(Qt.BottomDockWidgetArea, self.plotter)
        self.plotter_pane.set_theme(self.theme)
        self.plotter_pane.setFocus() 
开发者ID:mu-editor,项目名称:mu,代码行数:18,代码来源:main.py

示例5: add_debug_inspector

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def add_debug_inspector(self):
        """
        Display a debug inspector to view the call stack.
        """
        self.debug_inspector = DebugInspector()
        self.debug_model = QStandardItemModel()
        self.debug_inspector.setModel(self.debug_model)
        self.inspector = QDockWidget(_("Debug Inspector"))
        self.inspector.setWidget(self.debug_inspector)
        self.inspector.setFeatures(QDockWidget.DockWidgetMovable)
        self.inspector.setAllowedAreas(
            Qt.BottomDockWidgetArea
            | Qt.LeftDockWidgetArea
            | Qt.RightDockWidgetArea
        )
        self.addDockWidget(Qt.RightDockWidgetArea, self.inspector)
        self.connect_zoom(self.debug_inspector) 
开发者ID:mu-editor,项目名称:mu,代码行数:19,代码来源:main.py

示例6: init_file_tree

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def init_file_tree(self, directory, title, action, filtered=False):
        widget = DirectoryDockWidget(directory, filtered=filtered, parent=self)
        widget.path_label.addAction(action, QLineEdit.LeadingPosition)
        widget.tree_view.activated.connect(
            partial(self.handle_directory_tree_view_activated, directory))
        dock = QDockWidget(title, self)
        dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
        dock.setFeatures(QDockWidget.DockWidgetMovable)
        dock.setWidget(widget)
        self.addDockWidget(Qt.LeftDockWidgetArea, dock) 
开发者ID:fre-sch,项目名称:mhw_armor_edit,代码行数:12,代码来源:suite.py

示例7: init_help

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def init_help(self):
        self.help_widget = HelpWidget(self)
        self.help_widget_dock = QDockWidget("Help", self)
        self.help_widget_dock.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
        self.help_widget_dock.setFeatures(QDockWidget.DockWidgetMovable)
        self.help_widget_dock.setWidget(self.help_widget)
        self.addDockWidget(Qt.RightDockWidgetArea, self.help_widget_dock)
        self.help_widget_dock.hide() 
开发者ID:fre-sch,项目名称:mhw_armor_edit,代码行数:10,代码来源:suite.py

示例8: create_dock_widget

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def create_dock_widget(gui_app, item_key, label, panel, state):
    dock = QDockWidget(item_key, gui_app)
    panel_widget = panel(gui_app, dock)
    dock.setWidget(panel_widget)
    menu_action = create_menu_action(gui_app, item_key, label, state)
    gui_app.addDockWidget(Qt.RightDockWidgetArea, dock)
    dock.setVisible(state)
    return PanelInfo(dock, panel_widget, menu_action) 
开发者ID:mjhoptics,项目名称:ray-optics,代码行数:10,代码来源:dockpanels.py

示例9: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def __init__(self, *__args):
        super(BinjaDockWidget, self).__init__(*__args)
        self._app = QtWidgets.QApplication.instance()
        self._main_window = [x for x in self._app.allWidgets() if x.__class__ is QtWidgets.QMainWindow][0]
        self._tool_menu = [x for x in self._main_window.menuWidget().children() if x.__class__ is QtWidgets.QMenu and x.title() == u'&Tools'][0]
        self._main_window.addDockWidget(Qt.RightDockWidgetArea, self)
        self._tabs = QtWidgets.QTabWidget()
        self._tabs.setTabPosition(QtWidgets.QTabWidget.East)
        self.setWidget(self._tabs)
        self.addToolMenuAction('Toggle plugin dock', self.toggle)
        self.hide() 
开发者ID:NOPDev,项目名称:BinjaDock,代码行数:13,代码来源:widgets.py

示例10: test_Window_add_debug_inspector

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def test_Window_add_debug_inspector(qtapp):
    """
    Ensure a debug inspector (to display local variables) is displayed
    correctly.
    """
    w = mu.interface.main.Window()
    w.theme = mock.MagicMock()
    w.connect_zoom = mock.MagicMock(return_value=None)
    w.addDockWidget = mock.MagicMock()
    mock_debug_inspector = mock.MagicMock()
    mock_debug_inspector_class = mock.MagicMock(
        return_value=mock_debug_inspector
    )
    mock_model = mock.MagicMock()
    mock_model_class = mock.MagicMock(return_value=mock_model)
    mock_dock = mock.MagicMock()
    mock_dock_class = mock.MagicMock(return_value=mock_dock)
    with mock.patch(
        "mu.interface.main.DebugInspector", mock_debug_inspector_class
    ), mock.patch(
        "mu.interface.main.QStandardItemModel", mock_model_class
    ), mock.patch(
        "mu.interface.main.QDockWidget", mock_dock_class
    ):
        w.add_debug_inspector()
    assert w.debug_inspector == mock_debug_inspector
    assert w.debug_model == mock_model
    mock_debug_inspector.setModel.assert_called_once_with(mock_model)
    mock_dock.setWidget.assert_called_once_with(mock_debug_inspector)
    w.addDockWidget.assert_called_once_with(Qt.RightDockWidgetArea, mock_dock) 
开发者ID:mu-editor,项目名称:mu,代码行数:32,代码来源:test_main.py

示例11: __init__

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def __init__(self, device, *args, **kwargs):
        super(TelemetryWidget, self).__init__(*args, **kwargs)
        self.setAllowedAreas(Qt.LeftDockWidgetArea | Qt.RightDockWidgetArea)
        self.setWindowTitle(device.p['FriendlyName1'])

        self.tree_items = {}

        self.tree = QTreeWidget()
        self.setWidget(self.tree)
        self.tree.setColumnCount(2)
        self.tree.setHeaderHidden(True)

        device.update_telemetry.connect(self.update_telemetry)

        self.device = device 
开发者ID:jziolkowski,项目名称:tdm,代码行数:17,代码来源:Telemetry.py

示例12: openTelemetry

# 需要导入模块: from PyQt5.QtCore import Qt [as 别名]
# 或者: from PyQt5.QtCore.Qt import RightDockWidgetArea [as 别名]
def openTelemetry(self):
        if self.device:
            tele_widget = TelemetryWidget(self.device)
            self.addDockWidget(Qt.RightDockWidgetArea, tele_widget)
            self.mqtt_publish(self.device.cmnd_topic('STATUS'), "8") 
开发者ID:jziolkowski,项目名称:tdm,代码行数:7,代码来源:tdmgr.py


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