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

Oculars plugin: Introduce a 5-value pluginMode property #1521

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

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented Feb 21, 2021

Description

The mode switching and zooming code in the Oculars plugin is hard to follow, with a series of intermingled side effects.
This work here should consolidate the state switching. However, it seems the menu buttons in the top-right GUI panel still need boolean properties. I have moved those as "slave properties" with private getters/setters.

  • better understandable mode switching with one centralized method.
  • no more entangled side effects
  • cleanup not finished yet. For now I have commented away the previous functions for easier comparison.
  • Any missing switching, storage and re-setting of main program settings should be done in the setPluginMode().

The other, even larger restructuring is the introduction of a dedicated Finder mode which replaces the hybrid isBinocular() from Ocular mode. This adds a button to the menu bar. However, Binoculars and Finders are collected in the same class "Finder" given that their properties are specified in the same way.

Fixes #1509, #356

Screenshots (if appropriate):

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • This change requires a documentation update

How Has This Been Tested?

Test Configuration:

  • Operating system: Windows 10
  • Graphics Card: irrelevant

Checklist:

  • My code follows the code style of this project.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@gzotti gzotti added the importance: medium A bit annoying, minor miscalculation, but no crash label Feb 21, 2021
@gzotti gzotti added this to the 0.21.0 milestone Feb 21, 2021
@gzotti gzotti self-assigned this Feb 21, 2021
@gzotti gzotti added this to To do in Plugin: Oculars via automation Feb 21, 2021
@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@todo

This comment has been minimized.

@gzotti
Copy link
Member Author

gzotti commented Aug 3, 2022

Don't bother with the conflicts! This requires a rebase first.

@github-actions github-actions bot added the has conflicts The pull request has conflicts label Aug 3, 2022
@github-actions
Copy link

github-actions bot commented Aug 3, 2022

This pull request has conflicts, please resolve those before we can evaluate the pull request.

- better understandable mode switching
- no more entangled side effects
- cleanup not finished yet
- begin of restructuring
- runs, but Finder does nothing.
- need to move isBinocular() functionality from Ocular to Finder
- certainly many mode switching details unfinished
- also simplify mappings in other instrument classes
switch handling still not complete yet.
@gzotti gzotti added this to the 23.2 milestone Mar 13, 2023
@github-actions github-actions bot removed the has conflicts The pull request has conflicts label Mar 13, 2023
@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

@github-actions github-actions bot added the has conflicts The pull request has conflicts label Apr 22, 2023
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@gzotti gzotti modified the milestones: 23.2, 23.3 May 18, 2023
@gzotti gzotti modified the milestones: 23.3, 23.4 Aug 6, 2023
@alex-w alex-w modified the milestones: 23.4, 24.1 Dec 4, 2023
@gzotti gzotti linked an issue Jan 15, 2024 that may be closed by this pull request
@gzotti gzotti modified the milestones: 24.1, 24.2 Mar 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has conflicts The pull request has conflicts importance: medium A bit annoying, minor miscalculation, but no crash
Projects
Plugin: Oculars
  
In progress
2 participants