forked from ham-radio-software/D-Rats
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
Add Info Window, Remove fudge factor. #57
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added the info window functionality. Finally found the way to convert between display coordinates and point positions with out using fudge factors. Fixed up minor issues with marker display. d_rats/map/mapdraw.py: remove unused get_map_base method. Move calculating map to display offset to MapTile class. In draw_image_at method, center icon over point. in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy. In draw_marker method, remove fudge factor usage. in draw_text_marker_at method, Make sure text is centered on point. In expose_map method, refactor to use MapTile methods to reduce code duplication in other methods. d_rats/map/maptile.py: Add _set_x_origin method to calculate and store display origin as a class variable. Add get_display_center as a class method, as a common method of getting the center tile offset. Add get_display_limits to return number of display pixels for each axis. Add get_display_tile_limits to return number of tiles for each axis. Add get_display_origin to return the offset of the display from the map tile numbers. Add set_center method to store the center position of the map. In the set_map_widget method store the the requested tile limits for each axis as class variables In the set_zoom method, calculate and store the maximum number of tiles to avoid doing that calculation for every coordinate to or from degree method called. Removed unused deg2pixel method. Add deg2display method to replace latlon2xy method and eliminate fudge factors. Add display2deg method to replace xy2latlon method and eliminate fudge factors. d_rats/map/mapwidget.py: Simplify calculate_bounds method, remove fudge factor calculation. Remove latlon2xy and xy2latlon methods. d_rats/map/mapwindow.py: Implement the Info Window mouse popup for points. Shorten the mouse movement timer from 10 to 5 to be more responsive.
hi John, I am also testing it via radio as well... just need some traffic with positions on our local d-star repeater from other folks... will let you know |
wb8tyw
added a commit
that referenced
this pull request
Sep 5, 2022
Added the info window functionality. Finally found the way to convert between display coordinates and point positions with out using fudge factors. Fixed up minor issues with marker display. d_rats/map/mapdraw.py: remove unused get_map_base method. Move calculating map to display offset to MapTile class. In draw_image_at method, center icon over point. in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy. In draw_marker method, remove fudge factor usage. in draw_text_marker_at method, Make sure text is centered on point. In expose_map method, refactor to use MapTile methods to reduce code duplication in other methods. d_rats/map/maptile.py: Add _set_x_origin method to calculate and store display origin as a class variable. Add get_display_center as a class method, as a common method of getting the center tile offset. Add get_display_limits to return number of display pixels for each axis. Add get_display_tile_limits to return number of tiles for each axis. Add get_display_origin to return the offset of the display from the map tile numbers. Add set_center method to store the center position of the map. In the set_map_widget method store the the requested tile limits for each axis as class variables In the set_zoom method, calculate and store the maximum number of tiles to avoid doing that calculation for every coordinate to or from degree method called. Removed unused deg2pixel method. Add deg2display method to replace latlon2xy method and eliminate fudge factors. Add display2deg method to replace xy2latlon method and eliminate fudge factors. d_rats/map/mapwidget.py: Simplify calculate_bounds method, remove fudge factor calculation. Remove latlon2xy and xy2latlon methods. d_rats/map/mapwindow.py: Implement the Info Window mouse popup for points. Shorten the mouse movement timer from 10 to 5 to be more responsive. Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
wb8tyw
added a commit
that referenced
this pull request
Sep 6, 2022
Added the info window functionality. Finally found the way to convert between display coordinates and point positions with out using fudge factors. Fixed up minor issues with marker display. d_rats/map/mapdraw.py: remove unused get_map_base method. Move calculating map to display offset to MapTile class. In draw_image_at method, center icon over point. in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy. In draw_marker method, remove fudge factor usage. in draw_text_marker_at method, Make sure text is centered on point. In expose_map method, refactor to use MapTile methods to reduce code duplication in other methods. d_rats/map/maptile.py: Add _set_x_origin method to calculate and store display origin as a class variable. Add get_display_center as a class method, as a common method of getting the center tile offset. Add get_display_limits to return number of display pixels for each axis. Add get_display_tile_limits to return number of tiles for each axis. Add get_display_origin to return the offset of the display from the map tile numbers. Add set_center method to store the center position of the map. In the set_map_widget method store the the requested tile limits for each axis as class variables In the set_zoom method, calculate and store the maximum number of tiles to avoid doing that calculation for every coordinate to or from degree method called. Removed unused deg2pixel method. Add deg2display method to replace latlon2xy method and eliminate fudge factors. Add display2deg method to replace xy2latlon method and eliminate fudge factors. d_rats/map/mapwidget.py: Simplify calculate_bounds method, remove fudge factor calculation. Remove latlon2xy and xy2latlon methods. d_rats/map/mapwindow.py: Implement the Info Window mouse popup for points. Shorten the mouse movement timer from 10 to 5 to be more responsive. Co-authored-by: John E. Malmberg <wb8tyw@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the info window functionality.
Finally found the way to convert between display coordinates and
point positions with out using fudge factors.
Fixed up minor issues with marker display.
d_rats/map/mapdraw.py:
remove unused get_map_base method.
Move calculating map to display offset to MapTile class.
In draw_image_at method, center icon over point.
in draw_marker method, use Map.Tile.deg2display() instead of latlon2xy.
In draw_marker method, remove fudge factor usage.
in draw_text_marker_at method, Make sure text is centered on point.
In expose_map method, refactor to use MapTile methods to reduce
code duplication in other methods.
d_rats/map/maptile.py:
Add _set_x_origin method to calculate and store display origin as
a class variable.
Add get_display_center as a class method, as a common method of getting
the center tile offset.
Add get_display_limits to return number of display pixels for each axis.
Add get_display_tile_limits to return number of tiles for each axis.
Add get_display_origin to return the offset of the display from the
map tile numbers.
Add set_center method to store the center position of the map.
In the set_map_widget method store the the requested tile limits for
each axis as class variables
In the set_zoom method, calculate and store the maximum number of tiles
to avoid doing that calculation for every coordinate to or from degree
method called.
Removed unused deg2pixel method.
Add deg2display method to replace latlon2xy method and eliminate
fudge factors.
Add display2deg method to replace xy2latlon method and eliminate fudge
factors.
d_rats/map/mapwidget.py:
Simplify calculate_bounds method, remove fudge factor calculation.
Remove latlon2xy and xy2latlon methods.
d_rats/map/mapwindow.py:
Implement the Info Window mouse popup for points.
Shorten the mouse movement timer from 10 to 5 to be more responsive.