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

Multiple independent bandmap windows #593

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

Conversation

kyleboyle
Copy link

@kyleboyle kyleboyle commented Feb 7, 2025

closes #339

Attempt at adding multiple bandmap windows, using the existing right click menu to change which band is displayed. The VFO linked bandmap serves as the "master" which manages the spot data model shared with the non-vfo bandmaps. The user may close the vfo bandmap but it continues to operate in the background as it always has. This master vfo bandmap is also used to launch new non-vfo bandmaps and continues to provide the existing clear all and spot expiry features. I've tried to reuse as much of the existing bandmap as possible for the non-vfo bandmaps. Basically they are stripped of rig link and data management.

This change introduces a new concept around dockwidgets, which is the actual deletion and removal of dockwidgets when they are closed. This goal so far has been unexpectedly buggy, which is why you see some weird management code in mainwindow, even though this feature is meant to be built into qt but it doesn't work in many different scenarios. (WA_DeleteOnClose)

There are some remaining items to clean up which I will continue with if @foldynl gives the go ahead for this feature.
Screenshot 2025-02-06 at 9 22 35 PM

Kapture.2025-02-06.at.21.41.34.webm

(I gave up working on split mode support, too many design choices to do on my own)

@kyleboyle kyleboyle marked this pull request as draft February 7, 2025 01:50
@aa5sh
Copy link

aa5sh commented Feb 7, 2025

This looks great @kyleboyle

@foldynl
Copy link
Owner

foldynl commented Feb 7, 2025

I have tried several concepts on how to implement this. I started that the new bands will be in the same widget but it was not user-friendly, then I tried to create new widgets inside or outside the dock as a new docked widget. But it seemed quite unclear to me.

But I definitely like your approach and I welcome this PR.

I didn't look into the source code, why it can't be compiled to QT5, but hopefully it will work. Thank you.

@kyleboyle
Copy link
Author

kyleboyle commented Feb 8, 2025

Added a checkbox to the band selector now that it is an integral part of the user experience of this feature.
Screenshot 2025-02-07 at 8 30 02 PM

Modified the widget close / delete approach to hopefully work around all of the bugs/gaps I've found in the signalling.

This is ready to test I think. If you are willing to spare some time, please focus on docking the widgets together and closing them, closing the app, making sure the layout state / bands are restored correctly. I can't do much docking testing because it crashes the app in my dev env, even though the official builds work fine.

I spent some time trying to come up with an icon that was better than the plus button, but didn't like anything I came up with that worked on light&dark. I'll stick with the plus sign for now.. If anyone has any suggestions let me know.

@kyleboyle kyleboyle marked this pull request as ready for review February 8, 2025 01:20
@kyleboyle kyleboyle changed the title WIP POC for multiple bandmap windows Multiple independent bandmap windows Feb 8, 2025
@foldynl
Copy link
Owner

foldynl commented Feb 8, 2025

I will test it as soon as possible. in the meantime. @aa5sh @kyleboyle Do you have any idea why MacOS CI Github Action is failing with this?

Info: creating stash file /Users/runner/work/QLog/QLog/build/.qmake.stash Project ERROR: Unknown module(s) in QT: webenginewidgets

It seems that something changes in QT between 6.8.1 and 6.8.2. In Windows this module has also been moved to a separate external module. But I don't know what needs to be installed in Homebrew to make it work.

@kyleboyle
Copy link
Author

@foldynl I'm using the qt version from homebrew which is old 6.7.3

$ brew info qt
==> qt: stable 6.7.3 (bottled), HEAD
Cross-platform application and UI framework
https://www.qt.io/
Installed
/opt/homebrew/Cellar/qt/6.7.3 (15,224 files, 666.6MB) *

Ill try updating my formula to the newest and see what happens.

@kyleboyle
Copy link
Author

kyleboyle commented Feb 8, 2025

I upgraded to 6.8.2 and it compiles and runs in QT Creator 15. I started from a fresh project by deleting all the user generated files in the project directory. However this feature is broken for me now - clicking on the plus button doesn't launch a new bandmap widget. I will continue to investigate.

All i did was a brew install qt and it upgraded everything.

@kyleboyle
Copy link
Author

kyleboyle commented Feb 8, 2025

Ok the codebase is functional now, and my dev env seems to be producing much more stable builds so thanks for forcing me to update qt :D

Could you try using macos-14 instead. There are older posts about this problem and the os version seems to play a part.

@foldynl
Copy link
Owner

foldynl commented Feb 8, 2025

I just used the MacOS15 Image in testing_0.42 GitHub CI and everything is working.

@foldynl
Copy link
Owner

foldynl commented Feb 8, 2025

everything is working.

It means that it is possible to compile the testing_0.42 branch under MacOS...Now I am going to test this PR

@aa5sh
Copy link

aa5sh commented Feb 9, 2025 via email

@aa5sh
Copy link

aa5sh commented Feb 9, 2025

I also had 6.7.2 install and just updated to 6.8.2 in homebrew. two things I noticed quickly:

  • If I undock a bandmap then create a new one I was moving it and docked it in the same window as original and it acted weird. Like he header wasn't there to undock it. I clicked around and it appeared and I was able to undock it. I tried again and crashed qlog.
  • If I don't have a bandmap open by default it's like I send a phantom bandmap window appear then close as qlog as opening.
    I'll spend some more time with it but two quick comments.

But I do like the ease of opening a new bandmap, the context menu to change bands, can click one of the new windows and all seems well.

Michael

@foldynl
Copy link
Owner

foldynl commented Feb 9, 2025

I tested the change. I like its simplicity. I only found these issues:

  1. If I save the layout via the Activity Manager, then add a new Bandmap window but don’t save the layout again, this new Bandmap window is shown during the next start even though his position was not saved. In general, your change doesn’t work well with the Activity Manager because when switching between profiles with different layouts, Bandmap windows remain from the previous profile and do not reflect the saved layout.

  2. The second point is more of a consideration. I don’t have a strong opinion yet on whether it’s good or bad. The original window is the VFO Bandmap. If I have the VFO Bandmap on 20m and then open a new Bandmap for 40m, clicking on the 40m band results in having two windows for 40m. I was wondering whether the VFO window should stay on 20m, but in that case, it wouldn’t match its name—VFO Bandmap.

Point 2 is mostly cosmetic, but point 1 needs to be fixed. I’ll also take a look to see how this could be efficiently handled in the Activity Manager.

@kyleboyle
Copy link
Author

* If I undock a bandmap then create a new one I was moving it and docked it in the same window as original and it acted weird.  Like he header wasn't there to undock it.  I clicked around and it appeared and I was able to undock it.  I tried again and crashed qlog.

I have these types of issues as well but with all floating windows on macos - think perhaps there are dock window / tools window mac os bugs in general, at least while running with qt creator builds. I don't seem to have the same crashes when running official builds from you.

* If I don't have a bandmap open by default it's like I send a phantom bandmap window appear then close as qlog as opening.
  I'll spend some more time with it but two quick comments.

I've had this happen when crashes occur as the geometry / layout gets out of sync with the saved non vfo bandmap state

@kyleboyle
Copy link
Author

1. If I save the layout via the Activity Manager, then add a new Bandmap window but don’t save the layout again, this new Bandmap window is shown during the next start even though his position was not saved. In general, your change doesn’t work well with the Activity Manager because when switching between profiles with different layouts, Bandmap windows remain from the previous profile and do not reflect the saved layout.

Lada this shows my unfamiliarity with all of the features :) I thought that the activity profiles were only for setting the qso fields and associated equipment. You mention that you will investigate how to integrate with activity profiles - I'll leave it with you for now and if you want me to look into it please let me know.

2. The second point is more of a consideration. I don’t have a strong opinion yet on whether it’s good or bad. The original window is the VFO Bandmap. If I have the VFO Bandmap on 20m and then open a new Bandmap for 40m, clicking on the 40m band results in having two windows for 40m. I was wondering whether the VFO window should stay on 20m, but in that case, it wouldn’t match its name—VFO Bandmap.

This is also something that I thought about as well. My initial thought was that if the user doesn't want a bandmap to follow the VFO they may close it and rely on multiple non vfo bandmaps set at the bands they are switching between. Though I personally wouldn't want to introduce the complexity in the first version - in the future we could add an option to only sync the vfo bandmap if there is not another bandmap open which is on the new band.

@aa5sh
Copy link

aa5sh commented Feb 9, 2025 via email

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.

Multiple windows of bandmap
3 participants