Draft: add edit color value dialogs
- Change
dbpath
in sohstationviewer/conf/dbSettings.py to not need to change path when running from a dialog or test file. - Implement a dialog to add/edit a single channel, widget to edit one value color, widgets to edit value color string for different types of plots.
- Implement a widget to display valueColors of a channel that have the color displayed from hex color code. The background of the widget following the mode of the widget so the editor can have a better feeling when choosing the color for the plot. It also have a button to open a dialog corresponding to plot_type of the channel's parameter.
- Implement different dialog to allow user editing colors/values for that parameter.
This change the format of value color in database to be more readable and having hex color code to display:
- From
L:W|D:Y
toLine:#FFFFFF|Dot:#00FF00
for linesDots - From
1:Y|0:R
toUp:##00FF00|Down:#FF0000
for upDownDots - From
0:_|1:R|+1:M
to<=0:not plot|<=1:#00FF00|1<:#FF00FF
for multiColorDotsEqualOnUpperBound - From
3:R|3.3:Y|=3.3:G
to<3:#FF0000|<3.3:#FFFF00|=3.3:#00FF00
for multiColorDotsEqualOnLowerBound
Because of this change the sql will be printed out, not executed yet. It will only be executed when the database and other GUI is updated with this change
For testing, uncomment the line for the plot_type that tester want to check, run file sohstationviewer/view/db_config/add_edit_single_channel_dialog.py
Edited by Lan Dam