(self, title='', message='')
| 327 | KEY_RESOURCEPATH = 'config_resourcepath' |
| 328 | |
| 329 | def __init__(self, title='', message=''): |
| 330 | super(ProjectConfigurationDialog, self).__init__('Project Configuration', |
| 331 | 'Here are the configuration options of the project.', width=500) |
| 332 | # standard configuration |
| 333 | self.configDict = {} |
| 334 | |
| 335 | self.configDict[self.KEY_PRJ_NAME] = 'untitled' |
| 336 | self.configDict[self.KEY_ADDRESS] = '0.0.0.0' |
| 337 | self.configDict[self.KEY_PORT] = 8081 |
| 338 | self.configDict[self.KEY_MULTIPLE_INSTANCE] = True |
| 339 | self.configDict[self.KEY_ENABLE_CACHE] = True |
| 340 | self.configDict[self.KEY_START_BROWSER] = True |
| 341 | self.configDict[self.KEY_RESOURCEPATH] = "./res/" |
| 342 | |
| 343 | self.add_field_with_label( |
| 344 | self.KEY_PRJ_NAME, 'Project Name', gui.TextInput()) |
| 345 | self.add_field_with_label( |
| 346 | self.KEY_ADDRESS, 'IP address', gui.TextInput()) |
| 347 | self.add_field_with_label( |
| 348 | self.KEY_PORT, 'Listen port', gui.SpinBox(8082, 1025, 65535)) |
| 349 | self.add_field_with_label( |
| 350 | self.KEY_MULTIPLE_INSTANCE, 'Use single App instance for multiple users', gui.CheckBox(True)) |
| 351 | self.add_field_with_label( |
| 352 | self.KEY_ENABLE_CACHE, 'Enable file caching', gui.CheckBox(True)) |
| 353 | self.add_field_with_label( |
| 354 | self.KEY_START_BROWSER, 'Start browser automatically', gui.CheckBox(True)) |
| 355 | self.add_field_with_label( |
| 356 | self.KEY_RESOURCEPATH, 'Additional resource path', gui.TextInput()) |
| 357 | self.from_dict_to_fields(self.configDict) |
| 358 | |
| 359 | def from_dict_to_fields(self, dictionary): |
| 360 | for key in self.inputs.keys(): |
nothing calls this directly
no test coverage detected