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

Revision 9398:a6b3d9c13ee0, 918 bytes checked in by mitar, 2 years ago (diff)

Renaming documentation for widgets developers.

Line 
1from OWWidget import *
2import OWGUI
3
4class Test(OWWidget):
5   
6    settingsList = ["chkA", "chkB", "dx"]
7    def __init__(self, parent=None):
8        OWWidget.__init__(self, parent, 'Check')
9       
10        # GUI       
11        self.spinval = 10
12        self.chkA = 1
13        self.chkB = 0
14        self.dx = 15
15
16        box = OWGUI.widgetBox(self.controlArea, "Settings")
17        gridbox = OWGUI.widgetBox(self.controlArea, "Grid Opions")
18        gridbox.setEnabled(self.chkB)
19        OWGUI.checkBox(box, self, "chkA", "Verbose")
20        OWGUI.checkBox(box, self, "chkB", "Display Grid", disables=[gridbox])
21        OWGUI.spin(gridbox, self, "dx", 10, 20)
22       
23        self.resize(100,50)
24
25##############################################################################
26# Test the widget, run from prompt
27
28if __name__=="__main__":
29    appl = QApplication(sys.argv)
30    ow = Test()
31    ow.show()
32    appl.exec_()
Note: See TracBrowser for help on using the repository browser.