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

Persist geometry of ComponentDialog #529

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

iwbnwif
Copy link
Contributor

@iwbnwif iwbnwif commented Feb 4, 2024

The ComponentDialog default size is generally too small to see all the rows and text.

This change 'remembers' the last size that the dialog was set to when the user pressed 'OK'.

It might be better to implement the settings write in the close event.

@ra3xdh ra3xdh added this to the 24.1.0 milestone Feb 5, 2024
@iwbnwif
Copy link
Contributor Author

iwbnwif commented Feb 5, 2024

I am thinking that it might be tidier to put the storing into onShow and onClose event handlers of a QucsDialog base class. Then any dialog that is resizeable can automatically inherit this functionality.

For 24.1.0 I would only propose to implement ComponentDialog from the new base class so we can be sure there are no issues.

@zergud
Copy link
Collaborator

zergud commented Feb 5, 2024

it would be nice to implement settingsManager or at least use static QSettings settings("qucs","qucs_s") instead of hardcoded "organization" and "application" in many files
settingsManager is planned for #368 to store shortcuts for all actions

@iwbnwif
Copy link
Contributor Author

iwbnwif commented Feb 5, 2024

Thanks, that makes a lot of sense.

I would suggest that all is needed is a static/singleton appSettings class that is a very thin wrapper around QSettings as I think QSettings has all the functionality needed?

The shortcut key implementation can follow on from the completion of the appSettings class.

@ra3xdh ra3xdh added the gui label Feb 5, 2024
@zergud
Copy link
Collaborator

zergud commented Feb 5, 2024

all fuctionality +

  • load defaults
  • export/import setting
    at least for shorcuts

I think there is no need to rush and implement this in next release

@ra3xdh this PR can be merged now :)

@ra3xdh ra3xdh merged commit 864042c into ra3xdh:current Feb 5, 2024
2 checks passed
@ra3xdh
Copy link
Owner

ra3xdh commented Feb 5, 2024

Thanks for contribution! Merged.

@iwbnwif iwbnwif mentioned this pull request Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants