jamulus icon indicating copy to clipboard operation
jamulus copied to clipboard

QML client rewrite

Open danryu opened this issue 1 year ago • 4 comments

Description of changes

NOTE: This PR is posted at the request of @ann0see, see https://github.com/orgs/jamulussoftware/discussions/3454. It is intended as a reference or baseline to assist in the effort of converting to a QML-based version in the future.

N.B. I had to implement a freeze on new upstream merges due to the intricate nature of these changes. So it may be necessary to cherry-pick / re-implement / port any necessary upstream changes during the last 4-6 months of 2024 to the files in question, particularly client.cpp and audiomixerboard.cpp

While setting myself the challenge to learn QML, I have succeeded in rewriting the core Jamulus client GUI with QML, removing all widget code in the process. To put it mildly, it was a large, non-trivial effort to disentangle all the widget display logic from the business logic.

All existing business logic is largely preserved, with small changes and additions here and there. In general, things are much simplified when it comes to UI element handling. No need, for example, for the clever audiomixerboard template stuff, or creating and hiding 250 channelfader objects :)

Key Changes:

clientdlg -> removed, business logic moved to client, display moved to QML
settingsdlg -> removed, business logic moved to settings, display moved to QML
chatdlg -> converted to chatbox
audiomixerboard -> CChannelFader and CAudioMixerBoard classes refactored as necessary
all *.qml files representing key components in the UI

Design The UI design is just a demo to contain all the functioning elements. It can easily be adapted as necessary. For this reason it has almost no styling applied.

Features All the core features of the client have been reproduced in the QML version. There may still be some subtle bugs, but it is already quite usable (only tested on Windows 11).

Exclusions To reduce the scope of the project (already large enough) I have not implemented the following, but they should not be challenging to re-introduce:

server chooser dialog
instruments/skills/flags
reverb
what's this stuff
translations / language chooser stuff

I invite you to build and test it locally, and offer any suggestions or enhancements. Especially on macOS as I don't have any Apple hardware at the moment.

CHANGELOG:

Context: Fixes an issue?

Does this change need documentation? What needs to be documented and how?

Status of this Pull Request

What is missing until this pull request can be merged?

Checklist

  • [ ] I've verified that this Pull Request follows the general code principles
  • [ ] I tested my code and it does what I want
  • [ ] My code follows the style guide
  • [ ] I waited some time after this Pull Request was opened and all GitHub checks completed without errors.
  • [ ] I've filled all the content above

danryu avatar Dec 30 '24 07:12 danryu

Maybe out of scope, maybe not:

We'd need to adapt the CI.

ann0see avatar Dec 30 '24 08:12 ann0see

I could imagine the following:

  1. Get an approval from other main developers that we want to move to qml in Jamulus 4
  2. Create a separate branch for Jamulus 4 as soon as 3.12.0 is mostly done (=3.12.0 is frozen)
  3. Merge further changes into the Jamulus 4 branch

ann0see avatar Dec 30 '24 08:12 ann0see

I think we can delay reverb implementation. It's not even clear if this would even be part of Jamulus 4 in the current way.

The connect dialog would be more important.

ann0see avatar Dec 30 '24 08:12 ann0see

If I find time in the following months I'd like to look at getting the CI working.

ann0see avatar Dec 30 '24 08:12 ann0see