本文整理汇总了Python中pyqtgraph.dockarea.DockArea.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python DockArea.__init__方法的具体用法?Python DockArea.__init__怎么用?Python DockArea.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.dockarea.DockArea
的用法示例。
在下文中一共展示了DockArea.__init__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from pyqtgraph.dockarea import DockArea [as 别名]
# 或者: from pyqtgraph.dockarea.DockArea import __init__ [as 别名]
def __init__(self):
DockArea.__init__(self)
self.project_tree_dock = Dock(u"Project Tree", hideTitle=True)
self.addDock(self.project_tree_dock,
'top') #'above', self.flowcharts_dock)
self.project_tree = SegmentTreeWidget()
self.project_tree_dock.addWidget(self.project_tree)
self.properties_table = TableWidget(sortable=False, editable=False)
self.properties_table.setFormat("%.3f",1)
self.properties_table.setColumnCount(1)
self.properties_table.contextMenu.clear()
self.properties_table.horizontalHeader().hide()
self.properties_dock = Dock("Selected Object Properties",
widget=self.properties_table,
hideTitle=True)
self.addDock(self.properties_dock, 'bottom')
MarkWriteMainWindow.instance().sigProjectChanged.connect(
self.handleProjectChange)
MarkWriteMainWindow.instance().sigSegmentCreated.connect(
self.handleSegmentCreated)
MarkWriteMainWindow.instance().sigSegmentRemoved.connect(
self.handleSegmentRemoved)
MarkWriteMainWindow.instance().sigActiveObjectChanged.connect(
self.handleActiveObjectChanged)
self.project_tree.currentItemChanged.connect(
self.currentTreeItemChangedEvent)
self.project_tree.itemDoubleClicked.connect(
self.treeItemDoubleClickedEvent)
self.project_tree.customContextMenuRequested.connect(
self.rightClickTreeEvent)
# self.project_tree.itemSelectionChanged.connect(self.handleItemSelectionChanged)
self.project_tree.setExpandsOnDoubleClick(False)
self.doNotSetActiveObject=False