source: orange/orange/doc/extend-widgets/gui_indentedBox.py @ 9398:a6b3d9c13ee0

Revision 9398:a6b3d9c13ee0, 1.3 KB checked in by mitar, 2 years ago (diff)

Renaming documentation for widgets developers.

Line 
1from OWWidget import *
2import OWGUI
3
4class Test(OWWidget):
5    def __init__(self, parent=None):
6        OWWidget.__init__(self, parent, title='Listbox')
7
8        self.method = 0
9
10        self.removeRedundant = self.removeContinuous = self.addNoise = self.classOnly = True
11        self.removeClasses = False
12
13        box = OWGUI.widgetBox(self.controlArea, "Redundant values")
14        remRedCB = OWGUI.checkBox(box, self, "removeRedundant", "Remove redundant values")
15        iBox = OWGUI.indentedBox(box)
16        OWGUI.checkBox(iBox, self, "removeContinuous", "Reduce continuous attributes")
17        OWGUI.checkBox(iBox, self, "removeClasses", "Reduce class attribute")
18        remRedCB.disables.append(iBox)
19
20        OWGUI.separator(self.controlArea)
21
22        box = OWGUI.widgetBox(self.controlArea, "Noise")       
23        noiseCB = OWGUI.checkBox(box, self, "addNoise", "Add noise to data")
24        classNoiseCB = OWGUI.checkBox(OWGUI.indentedBox(box), self, "classOnly", "Add noise to class only")
25        noiseCB.disables.append(classNoiseCB)
26
27        self.adjustSize()
28
29##############################################################################
30# Test the widget, run from prompt
31
32if __name__=="__main__":
33    appl = QApplication(sys.argv)
34    ow = Test()
35    ow.show()
36    appl.exec_()
Note: See TracBrowser for help on using the repository browser.