-
Notifications
You must be signed in to change notification settings - Fork 36
feat: add unit system setting in gui tab #680
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
…unit setting in gui tab Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
…leUnitDistance Signed-off-by: Tomas Fabrizio Orsi <[email protected]>
|
Some additional notes:
Thanks in advance! Have a nice week 😊 |
|
Thank you for you patch. As usual, I have to ask, what is the motivation? The units are automatically selected according to the settings in the OS. What is the motivation to have this setting different from the user's preferred settings in the OS? |
Hi Foldynl! My main motivation is that, when I opened QLog, it was using Imperial units and I wasn't able to change them. I wasn't able to find an easy way to change my system's With this patch, I was able to display the distance using the metric system without having to go into the Linux rabbit hole of "how do I change my system's QLocale without messing up the rest of my system". As an added bonus, having this setting could serve useful when speaking with another ham that uses a different unit system. Hope that explains my reasoning. Cheers! 😊 PS: I'm more than willing to tune this PR with any modifications you see fit. |
|
Measurement unit is controlled by an environment variable I made an exception for the date and time but I wouldn’t want to replicate settings that are handled elsewhere in the operating system. |
|
Oh I see! I was not aware of that env variable, I'll let you know if that works on my system. Thanks ^_^ |
Hi @foldynl. I did manage to change the Although, I do get the following warning: Tbh, I don't think I'm the biggest fan of having to change the Regardless, thanks for the help! Cheers 😊 |
|
Update: It did mess up with some utilities, so customization of the Context btw: This was raised by Gentoo's So I'd say changing that env variable is a no-go. Have you ever modified it successfully? |
|
If I run I'm not a Gentoo expert, but on Ubuntu, you need to have the required locale installed. |
Oh I see, I passed |
|
+1 for this to be merged. It is really inconvenient to start a qlog from a terminal like this: LC_MEASUREMENT=cs_CZ.UTF-8 ./qlog. |
Your OS should have these variables set according to your preferences. What is the reason to change this before each QLog run? |
|
It is either you change the locale system wide, or start it from the command line as you suggested. Both options have drawbacks. |
|
I meant, why, if you have LC_MEASUREMENT set to, for example, miles, do you expect QLog to use kilometers? In other words, why is your system set to miles if you actually want kilometers (or vice versa)? |
|
For the exact same reason Date and Time format is there. They are also override a format coming from the locale. |
|
to be honest, I was waiting for this answer. Because it's easy to say why it's not for the unit, when it's for the time. But I'm curious, what leads a person to the fact that he/she has the system in miles and it needs km? |
For instance, some DE don't configure said variables. I am using qtile which doesn't set them. |
|
@foldynl I see you tagged this PR as part of the 0.47.0 release. If that's the case, I can work on fixing the conflicts. If you have any thoughts/comments, do let me know 😊 Thanks in advance! |
|
I'll modify it. There are some things that QLog already does differently (ex. QSettings is not used etc). |
|
Sorry, QLog is still using QSettings here. There’ve been so many changes that I’m starting to lose track of what’s what. |
|
Reworked. Please, could you verify it - branch |
AFAIK, one's system's QLocale setting determines the unit system in which distances are displayed, i.e. Metric or Imperial.
This patch adds a new setting in the GUI tab to set a QLog specific preference, without having to modify the unit system used system-wide.
The current implementation looks like this:

Would love to get some feedback on this!
PS: QLog is awesome, thanks for all the work.