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

Make raw dialog settings saveable #444

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open

Make raw dialog settings saveable #444

wants to merge 43 commits into from

Conversation

lauramurgatroyd
Copy link
Member

@lauramurgatroyd lauramurgatroyd commented Dec 10, 2024

Describe your changes

Closes #443
I updated standalone viewer to use this dialog.

To try it out yourself:

  • install this branch of the viewer
  • run 'cilviewer' on command line
  • load a raw file - I recommend the head :)

to discuss

  • name of the dialog is currently SaveableRawInputDialog - any suggestions?

pic of the dialog:

image

The pop out dialog if you press save:
image

Describe any testing you have performed

Consider adding example code to examples
Added unit tests to test:

  • saving of settings when app is first ever opened (therefore qsettings is empty)
  • saving of settings when qsettings is already populated (app has been opened before)
  • loading of settings from Qsettings onto interface, by checking value in a widget

Link relevant issues

Checklist when you are ready to request a review

  • I have performed a self-review of my code
  • I have added docstrings in line with the guidance in the CIL developer guide
  • I have implemented unit tests that cover any new or modified functionality
  • CHANGELOG.md has been updated with any functionality change
  • Request review from all relevant developers
  • Change pull request label to 'waiting for review'

Contribution Notes

  • The content of this Pull Request (the Contribution) is intentionally submitted for inclusion in CILViewer (the Work) under the terms and conditions of the Apache-2.0 License
  • I confirm that the contribution does not violate any intellectual property rights of third parties

Qt contributions should follow Qt naming conventions i.e. camelCase method names.

VTK contributions should follow VTK naming conventions i.e. PascalCase method names.

@lauramurgatroyd
Copy link
Member Author

lauramurgatroyd commented Dec 10, 2024

Suggestions from @paskino:
image

@lauramurgatroyd lauramurgatroyd changed the base branch from toolbar3d to master December 18, 2024 15:48
@lauramurgatroyd
Copy link
Member Author

I have made the suggested changes and updated the PR description accordingly

@lauramurgatroyd lauramurgatroyd marked this pull request as ready for review December 18, 2024 16:27
@lauramurgatroyd
Copy link
Member Author

I believe requires #446 for action to pass

Comment on lines +315 to +318
def __init__(self, parent, fname, qsettings):
super(SaveableRawInputDialog, self).__init__(parent, fname)

self.settings = qsettings
Copy link
Member Author

Choose a reason for hiding this comment

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

can we create a qsettings in here if one isn't passed in?

Copy link
Member Author

Choose a reason for hiding this comment

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

Test this case

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.

Add version of the RawInputDialog which allows saving of settings under a set name
2 participants