本文整理汇总了Python中Orange.OrangeWidgets.OWGUI.appendRadioButton方法的典型用法代码示例。如果您正苦于以下问题:Python OWGUI.appendRadioButton方法的具体用法?Python OWGUI.appendRadioButton怎么用?Python OWGUI.appendRadioButton使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Orange.OrangeWidgets.OWGUI
的用法示例。
在下文中一共展示了OWGUI.appendRadioButton方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from Orange.OrangeWidgets import OWGUI [as 别名]
# 或者: from Orange.OrangeWidgets.OWGUI import appendRadioButton [as 别名]
def __init__(self, parent=None, signalManager=None,
title="Venn Diagram"):
super(OWVennDiagram, self).__init__(parent, signalManager, title,
wantGraph=True)
self.autocommit = False
# Selected disjoint subset indices
self.selection = []
# Stored input set hints
# {(index, inputname, attributes): (selectedattrname, itemsettitle)}
# The 'selectedattrname' can be None
self.inputhints = {}
# Use identifier columns for instance matching
self.useidentifiers = 1
self.loadSettings()
# Output changed flag
self._changed = False
# Diagram update is in progress
self._updating = False
# Input update is in progress
self._inputUpdate = False
# All input tables have the same domain.
self.samedomain = True
# Input datasets in the order they were 'connected'.
self.data = OrderedDict()
# Extracted input item sets in the order they were 'connected'
self.itemsets = OrderedDict()
# GUI
box = OWGUI.widgetBox(self.controlArea, "Info")
self.info = OWGUI.widgetLabel(box, "No data on input\n")
self.identifiersBox = OWGUI.radioButtonsInBox(
self.controlArea, self, "useidentifiers", [],
box="Data Instance Identifiers",
callback=self._on_useidentifiersChanged
)
self.useequalityButton = OWGUI.appendRadioButton(
self.identifiersBox, self, "useidentifiers",
"Use instance equality"
)
rb = OWGUI.appendRadioButton(
self.identifiersBox, self, "useidentifiers",
"Use identifiers"
)
self.inputsBox = OWGUI.indentedBox(
self.identifiersBox, sep=OWGUI.checkButtonOffsetHint(rb)
)
self.inputsBox.setEnabled(self.useidentifiers == 1)
for i in range(5):
box = OWGUI.widgetBox(self.inputsBox, "Data set #%i" % (i + 1),
flat=True)
model = OWItemModels.VariableListModel(parent=self)
cb = QComboBox()
cb.setModel(model)
cb.activated[int].connect(self._on_inputAttrActivated)
box.setEnabled(False)
# Store the combo in the box for later use.
box.combo_box = cb
box.layout().addWidget(cb)
OWGUI.rubber(self.controlArea)
box = OWGUI.widgetBox(self.controlArea, "Output")
cb = OWGUI.checkBox(box, self, "autocommit", "Commit on any change")
b = OWGUI.button(box, self, "Commit", callback=self.commit,
default=True)
OWGUI.setStopper(self, b, cb, "_changed", callback=self.commit)
# Main area view
self.scene = QGraphicsScene()
self.view = QGraphicsView(self.scene)
self.view.setRenderHint(QPainter.Antialiasing)
self.view.setBackgroundRole(QPalette.Window)
self.view.setFrameStyle(QGraphicsView.StyledPanel)
self.mainArea.layout().addWidget(self.view)
self.vennwidget = VennDiagram()
self.vennwidget.resize(400, 400)
self.vennwidget.itemTextEdited.connect(self._on_itemTextEdited)
self.scene.selectionChanged.connect(self._on_selectionChanged)
self.scene.addItem(self.vennwidget)
self.resize(self.controlArea.sizeHint().width() + 550,
max(self.controlArea.sizeHint().height(), 550))
self._queue = []
self.graphButton.clicked.connect(self.saveImage)