(self, widget)
| 168 | Timer(1, self.display_counter).start() |
| 169 | |
| 170 | def menu_dialog_clicked(self, widget): |
| 171 | self.dialog = gui.GenericDialog(title='Dialog Box', message='Click Ok to transfer content to main page', width='500px') |
| 172 | self.dtextinput = gui.TextInput(width=200, height=30) |
| 173 | self.dtextinput.set_value('Initial Text') |
| 174 | self.dialog.add_field_with_label('dtextinput', 'Text Input', self.dtextinput) |
| 175 | |
| 176 | self.dcheck = gui.CheckBox(False, width=200, height=30) |
| 177 | self.dialog.add_field_with_label('dcheck', 'Label Checkbox', self.dcheck) |
| 178 | values = ('Danny Young', 'Christine Holand', 'Lars Gordon', 'Roberto Robitaille') |
| 179 | self.dlistView = gui.ListView.new_from_list(values, width=200, height=120) |
| 180 | self.dialog.add_field_with_label('dlistView', 'Listview', self.dlistView) |
| 181 | |
| 182 | self.ddropdown = gui.DropDown.new_from_list(('DropDownItem 0', 'DropDownItem 1'), |
| 183 | width=200, height=20) |
| 184 | self.dialog.add_field_with_label('ddropdown', 'Dropdown', self.ddropdown) |
| 185 | |
| 186 | self.dspinbox = gui.SpinBox(min=0, max=5000, width=200, height=20) |
| 187 | self.dspinbox.set_value(50) |
| 188 | self.dialog.add_field_with_label('dspinbox', 'Spinbox', self.dspinbox) |
| 189 | |
| 190 | self.dslider = gui.Slider(10, 0, 100, 5, width=200, height=20) |
| 191 | self.dspinbox.set_value(50) |
| 192 | self.dialog.add_field_with_label('dslider', 'Slider', self.dslider) |
| 193 | |
| 194 | self.dcolor = gui.ColorPicker(width=200, height=20) |
| 195 | self.dcolor.set_value('#ffff00') |
| 196 | self.dialog.add_field_with_label('dcolor', 'Colour Picker', self.dcolor) |
| 197 | |
| 198 | self.ddate = gui.Date(width=200, height=20) |
| 199 | self.ddate.set_value('2000-01-01') |
| 200 | self.dialog.add_field_with_label('ddate', 'Date', self.ddate) |
| 201 | |
| 202 | self.dialog.confirm_dialog.do(self.dialog_confirm) |
| 203 | self.dialog.show(self) |
| 204 | |
| 205 | def dialog_confirm(self, widget): |
| 206 | result = self.dialog.get_field('dtextinput').get_value() |
nothing calls this directly
no test coverage detected