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

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

Renaming documentation for widgets developers.

Line 
1from OWWidget import *
2import OWGUI, OWGUIEx, string
3
4class OWLineEditFilter(OWWidget):
5    settingsList = []
6    def __init__(self, parent=None):
7        OWWidget.__init__(self, parent, title='Line Edit as Filter')
8       
9        self.filter = ""
10        self.listboxValue = ""
11        lineEdit = OWGUIEx.lineEditFilter(self.controlArea, self, "filter", "Filter:", useRE = 1, emptyText = "filter...")
12           
13        lineEdit.setListBox(OWGUI.listBox(self.controlArea, self, "listboxValue"))
14        names = []
15        for i in range(10000):
16            names.append("".join([string.ascii_lowercase[random.randint(0, len(string.ascii_lowercase)-1)] for c in range(10)]))
17        lineEdit.listbox.addItems(names)
18        lineEdit.setAllListItems(names)
19
20   
21##############################################################################
22# Test the widget, run from prompt
23
24if __name__=="__main__":
25    appl = QApplication(sys.argv)
26    ow = OWLineEditFilter()
27    ow.show()
28    appl.exec_()
Note: See TracBrowser for help on using the repository browser.