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

Fix/map feature #2187

Merged
merged 7 commits into from
Jul 9, 2024
Merged

Fix/map feature #2187

merged 7 commits into from
Jul 9, 2024

Conversation

dforsi
Copy link
Contributor

@dforsi dforsi commented Jun 27, 2024

This PR:

  • adds the transmitters.csv file to the resources and converts its encoding from ISO-8859-1 to UTF-8 to show the accented letters
  • modifies the table of map items settings
    • to right align all numeric cells
    • to use a QSpinBox for the "Filter Distance" cells
    • to do a case insensitive sorting of column containing the labels

For the QSpinBox of "Filter Distance" I set a minimum value of zero and a maximum of 10000 km; I used setSpecialValueText() to replace the zero with one space so the the look of the table isn't too much different from before (we can't use an empty string or a nullptr because they disable the replacement).

The case sensitive sorting is needed otherwise "Airport" and "Airspace" were coming after APTdemod.

@srcejon
Copy link
Collaborator

srcejon commented Jun 27, 2024

For the QSpinBox of "Filter Distance" I set a minimum value of zero and a maximum of 10000 km;

Half the circumference of the Earth is larger than that, so probably should be a bit bigger.

@srcejon
Copy link
Collaborator

srcejon commented Jun 27, 2024

I used setSpecialValueText() to replace the zero with one space so the the look of the table isn't too much different from before (we can't use an empty string or a nullptr because they disable the replacement).

How does a user enter "No filter"? Can they delete the characters or do they have to insert a space? If the latter, then it would be better to create a custom spin box, like DMSSpinBox etc.

@f4exb f4exb requested a review from srcejon June 28, 2024 14:04
@dforsi
Copy link
Contributor Author

dforsi commented Jul 6, 2024

For the QSpinBox of "Filter Distance" I set a minimum value of zero and a maximum of 10000 km;

Half the circumference of the Earth is larger than that, so probably should be a bit bigger.

I was just thinking of a big number, but we can set it to 40075+1

@dforsi
Copy link
Contributor Author

dforsi commented Jul 6, 2024

How does a user enter "No filter"? Can they delete the characters or do they have to insert a space? If the latter, then it would be better to create a custom spin box, like DMSSpinBox etc.

Now, with the commit that adds QAbstractSpinBox::CorrectToNearestValue the user can delete the characters, or type a zero which disappears when the cell looses the focus.

@f4exb
Copy link
Owner

f4exb commented Jul 7, 2024

@srcejon Hello Jon, can it be merged?

@srcejon
Copy link
Collaborator

srcejon commented Jul 9, 2024

@srcejon Hello Jon, can it be merged?

Yep

@f4exb f4exb merged commit 1df378d into f4exb:master Jul 9, 2024
3 checks passed
@dforsi dforsi deleted the fix/map-feature branch July 12, 2024 19:00
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.

3 participants