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

Remote control command to change window size #3433

Merged
merged 3 commits into from Sep 29, 2023
Merged

Conversation

gzotti
Copy link
Member

@gzotti gzotti commented Sep 29, 2023

This provides

  • a scriptable command to change window size.
  • a possibility to change window size via RemoteControl API

The main reason is interoperability with a program that utilizes Stellarium's Spout output.
The window size is no property that would else be synchronized over screens of different sizes.

Description

Fixes # (issue)

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
  • Housekeeping

How Has This Been Tested?

Script:
core.setWindowSize(1200, 850);

RemoteControl API:
curl -d 'w=2300&h=800' http://localhost:8090/api/main/window

Test Configuration:

  • Operating system: Windows 11
  • Graphics Card: Geforce 3700Ti

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 (header file)
  • I have updated the respective chapter in the Stellarium User Guide
  • 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

- Also via scripting
- also follow Qt recommendations w.r.t. nullptr and override.
@gzotti gzotti added feature Entirely new feature importance: medium A bit annoying, minor miscalculation, but no crash labels Sep 29, 2023
@gzotti gzotti added this to the 23.4 milestone Sep 29, 2023
@gzotti gzotti self-assigned this Sep 29, 2023
@gzotti gzotti added this to Needs triage in Interoperability of Stellarium via automation Sep 29, 2023
@github-actions
Copy link

Great PR! Please pay attention to the following items before merging:

Files matching src/**/*.cpp:

  • Are possibly unused includes removed?

This is an automatically generated QA checklist based on modified files.

Interoperability of Stellarium automation moved this from Needs triage to In progress Sep 29, 2023
@10110111
Copy link
Contributor

The style cleanup (override etc.) should better be left as a separate commit...

@gzotti gzotti merged commit 9a229ea into master Sep 29, 2023
18 of 20 checks passed
Interoperability of Stellarium automation moved this from In progress to Done Sep 29, 2023
@gzotti gzotti deleted the RemoteControl/windowSize branch September 29, 2023 11:08
@gzotti
Copy link
Member Author

gzotti commented Sep 29, 2023

The whole thing is just a tiny little extra function. And as before, while doing something in a plugin, I change those override etc. keywords. Disentangling that into an extra commit, and squashing the Cleanup commit into the previous, is IMO a needless hassle.

@10110111
Copy link
Contributor

Disentangling that into an extra commit, and squashing the Cleanup commit into the previous, is IMO a needless hassle.

Well, the point of disentangling is to make it truly separate, not to squash it. In fact, it wasn't even related to this PR so could be just pushed independently. And now anyone who gets pointed to this commit, say, by git-bisect, will have to study all these irrelevant diff hunks just to find the parts comprising the core of the change.

@alex-w alex-w added the state: published The fix has been published for testing in weekly binary package label Oct 23, 2023
@github-actions
Copy link

Hello @gzotti!

Please check the fresh version (development snapshot) of Stellarium:
https://github.com/Stellarium/stellarium-data/releases/tag/weekly-snapshot

@alex-w alex-w removed the state: published The fix has been published for testing in weekly binary package label Dec 23, 2023
Copy link

Hello @gzotti!

Please check the latest stable version of Stellarium:
https://github.com/Stellarium/stellarium/releases/latest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Entirely new feature importance: medium A bit annoying, minor miscalculation, but no crash
Development

Successfully merging this pull request may close these issues.

None yet

3 participants