Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional import settings in Wave project file #121

Merged
merged 30 commits into from
Nov 11, 2023
Merged

Additional import settings in Wave project file #121

merged 30 commits into from
Nov 11, 2023

Conversation

jamaa
Copy link
Member

@jamaa jamaa commented Oct 8, 2023

implements #117

@jamaa jamaa self-assigned this Oct 8, 2023
@jamaa jamaa linked an issue Oct 8, 2023 that may be closed by this pull request
@jamaa
Copy link
Member Author

jamaa commented Oct 8, 2023

Import is implemented for the following options:

  • title
  • unit
  • color
  • linestyle
  • linewidth
  • interpretation

"markers" could be an additional import setting?

When saving to WVP, currently only the title is saved (if different from the original name). For the other properties, it is not feasible to determine whether they have been modified or not. Possible options:

  • keep it as is, only ever write the title option,
  • always write all options,
  • create some sort of UI for asking the user which properties (for which series?) they would like to save

Opinions?

@jamaa
Copy link
Member Author

jamaa commented Oct 14, 2023

WVP sample file with all possible options:

# Wave project file
file=..\WEL\DEMONA_PSI.wel
    series=AA  _1AB
    series=AB  _1AB:AB  _1AB custom title
    series=AC  _1AB:title=AC  _1AB custom title
    series=AD  _1AB:title="AD  _1AB ,= custom title", unit="m³/s", interpretation=BlockLeft, color=Red, linestyle=Dash, linewidth=4, showpoints=True

Loading this file and then saving again as WVP will result in the following:

# Wave project file
file=H:\DEV\BLUEM\CODE\BlueM.Datasets\Wave\WEL\DEMONA_PSI.wel
    series=AA  _1AB: title="AA  _1AB", unit="m3/s", interpretation=BlockRight, color=ff03a9f4, linewidth=2, linestyle=Solid, showpoints=False
    series=AB  _1AB: title="AB  _1AB custom title", unit="m3/s", interpretation=BlockRight, color=fff44336, linewidth=2, linestyle=Solid, showpoints=False
    series=AC  _1AB: title="AC  _1AB custom title", unit="m3/s", interpretation=BlockRight, color=ff9c27b0, linewidth=2, linestyle=Solid, showpoints=False
    series=AD  _1AB: title="AD  _1AB ,= custom title", unit="m³/s", interpretation=BlockLeft, color=ffff0000, linewidth=4, linestyle=Dash, showpoints=True

Note that all options are written to the file (even if they have default values) and that colors are hexadecimal ARGB values (this is because once series are loaded in the chart, the colors assigned by TeeChart are not "known colors" that have a name).

@jamaa jamaa marked this pull request as draft October 20, 2023 12:46
@jamaa
Copy link
Member Author

jamaa commented Oct 20, 2023

I am not really happy with this change. It makes the exported project file very clunky. Maybe the user should be able to choose whether to save series option or not. But I also don't want to introduce another step into the save process...

@jamaa
Copy link
Member Author

jamaa commented Nov 11, 2023

I guess there is no way around introducing an additional dialog with options when saving. Here is a draft:
grafik

@jamaa jamaa marked this pull request as ready for review November 11, 2023 14:17
@jamaa jamaa merged commit c2ec05c into master Nov 11, 2023
3 checks passed
@jamaa jamaa deleted the wvp-options branch November 11, 2023 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional import settings in Wave project file
1 participant