2011-12-14 21:34:24 |
mahfiaz |
description |
Under advanced setting tab there could be "Default service name" option.
It could include a date, changeable in settings.
Default could be "Service %y-%m-%d"
It breaks down to the following parts:
Adding option to settings under advanced settings tab:
"Default service name:" and a text input box, a button to reset to default with icon (a circle, like an arrow, tip touching the start of it)
Under that, using smaller font:
"Default service name when saving a new service. You can use date placeholders like %y-%m-%d for e.g 2011-12-25. Leave it empty to use no default value."
Before saving one needs to check if the value really is sane and does not contain
* characters not usable in filename such as /\| (and maybe more)
* does not contain wrong placeholders such as %s or any other which would result in an error
On saving we need to check if the value is anything other than the default, if so, we save the value to "servicemanager/default service name", otherwise unset the value (this prevents the default value becoming persistent after first save of settings dialog).
When opening save dialog for a new service, it should check for the value:
settings.value("servicemanager/default service name", translate(default_value)), and use the value, it might be empty as well, if user chose so. |
Under advanced setting tab there could be "Default service name" option.
It could include a date, changeable in settings.
Default could be "Service %y-%m-%d"
It breaks down to the following parts:
Adding option to settings under advanced settings tab:
"Default service name:" and a text input box, a button to reset to default with icon (a circle, like an arrow, tip touching the start of it)
Under that, using smaller font:
"Default service name when saving a new service. You can use date placeholders like %y-%m-%d for e.g 2011-12-25. Leave it empty to use no default value."
Before saving one needs to check if the value really is sane and does not contain
* characters not usable in filename such as /\| (and maybe more)
* leading or following spaces
* does not contain wrong placeholders such as %s or any other which would result in an error
On saving we need to check if the value is anything other than the default, if so, we save the value to "servicemanager/default service name", otherwise unset the value (this prevents the default value becoming persistent after first save of settings dialog).
When opening save dialog for a new service, it should check for the value:
settings.value("servicemanager/default service name", translate(default_value)), and use the value, it might be empty as well, if user chose so. |
|