本文整理汇总了Python中Orange.OrangeWidgets.OWGUI.auto_commit方法的典型用法代码示例。如果您正苦于以下问题:Python OWGUI.auto_commit方法的具体用法?Python OWGUI.auto_commit怎么用?Python OWGUI.auto_commit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orange.OrangeWidgets.OWGUI
的用法示例。
在下文中一共展示了OWGUI.auto_commit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import auto_commit [as 别名]
def __init__(self, parent=None, signalManager=None, name=" GEO Data Sets"):
OWWidget.__init__(self, parent, signalManager, name)
self.selectionChanged = False
self.filterString = ""
self.datasetName = ""
## GUI
box = gui.widgetBox(self.controlArea, "Info", addSpace=True)
self.infoBox = gui.widgetLabel(box, "Initializing\n\n")
box = gui.widgetBox(self.controlArea, "Output", addSpace=True)
gui.radioButtonsInBox(box, self, "outputRows",
["Genes or spots", "Samples"], "Rows",
callback=self.commitIf)
gui.checkBox(box, self, "mergeSpots", "Merge spots of same gene",
callback=self.commitIf)
gui.separator(box)
self.nameEdit = gui.lineEdit(
box, self, "datasetName", "Data set name",
tooltip="Override the default output data set name",
callback=self.onNameEdited
)
self.nameEdit.setPlaceholderText("")
if sys.version_info < (3, ):
box = gui.widgetBox(self.controlArea, "Commit", addSpace=True)
self.commitButton = gui.button(
box, self, "Commit", callback=self.commit)
cb = gui.checkBox(box, self, "autoCommit", "Commit on any change")
gui.setStopper(self, self.commitButton, cb, "selectionChanged",
self.commit)
else:
gui.auto_commit(self.controlArea, self, "autoCommit", "Commit",
box="Commit")
gui.rubber(self.controlArea)
# self.filterLineEdit = OWGUIEx.lineEditHint(
# self.mainArea, self, "filterString", "Filter",
# caseSensitive=False, matchAnywhere=True,
# callback=self.filter, delimiters=" ")
gui.widgetLabel(self.mainArea, "Filter")
self.filterLineEdit = QLineEdit(
textChanged=self.filter
)
self.completer = QCompleter(
caseSensitivity=Qt.CaseInsensitive
)
self.completer.setModel(QStringListModel(self))
self.filterLineEdit.setCompleter(self.completer)
self.mainArea.layout().addWidget(self.filterLineEdit)
splitter = QSplitter(Qt.Vertical, self.mainArea)
self.mainArea.layout().addWidget(splitter)
self.treeWidget = QTreeView(splitter)
self.treeWidget.setSelectionMode(QTreeView.SingleSelection)
self.treeWidget.setRootIsDecorated(False)
self.treeWidget.setSortingEnabled(True)
self.treeWidget.setAlternatingRowColors(True)
self.treeWidget.setUniformRowHeights(True)
self.treeWidget.setEditTriggers(QTreeView.NoEditTriggers)
linkdelegate = LinkStyledItemDelegate(self.treeWidget)
self.treeWidget.setItemDelegateForColumn(1, linkdelegate)
self.treeWidget.setItemDelegateForColumn(8, linkdelegate)
self.treeWidget.setItemDelegateForColumn(
0, gui.IndicatorItemDelegate(self.treeWidget,
role=Qt.DisplayRole))
proxyModel = MySortFilterProxyModel(self.treeWidget)
self.treeWidget.setModel(proxyModel)
self.treeWidget.selectionModel().selectionChanged.connect(
self.updateSelection
)
self.treeWidget.viewport().setMouseTracking(True)
splitterH = QSplitter(Qt.Horizontal, splitter)
box = gui.widgetBox(splitterH, "Description")
self.infoGDS = gui.widgetLabel(box, "")
self.infoGDS.setWordWrap(True)
gui.rubber(box)
box = gui.widgetBox(splitterH, "Sample Annotations")
self.annotationsTree = QTreeWidget(box)
self.annotationsTree.setHeaderLabels(
["Type (Sample annotations)", "Sample count"]
)
self.annotationsTree.setRootIsDecorated(True)
box.layout().addWidget(self.annotationsTree)
self.annotationsTree.itemChanged.connect(
self.annotationSelectionChanged
)
self._annotationsUpdating = False
self.splitters = splitter, splitterH
#.........这里部分代码省略.........