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

Adding Zoom 5 (or Zoom N) #312

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Adding Zoom 5 (or Zoom N) #312

wants to merge 9 commits into from

Conversation

vshekar
Copy link
Collaborator

@vshekar vshekar commented Jul 10, 2023

Pull request that replaces the zoom radio buttons with a zoom slider. The zoom slider is not static and can be modified based on beamline config parameters

- Replaced them with QSlider with labels for extensibility
- Callbacks and certain functions related to the buttons now moved to the slider class
- Slider class allows other mag levels to be added easily
from gui.control_main import ControlMain


class CustomView(QGraphicsView):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Created CustomView mainly to handle events that happen when the sample cam is in focus. It handles the following events:

  • Using the mouse wheel (connects to handle_wheel method in gui.camera.zoom_widget.ZoomSlider
  • Detects whether Ctrl key is pressed and the mouse is clicked on the sample cam
  • Triggers center_on_click when all conditions above are met

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.

1 participant