Skip to content
This repository was archived by the owner on Jan 18, 2026. It is now read-only.

Multiple panes qt6 - #2721

Open
mmalczak wants to merge 27 commits into
m-labs:masterfrom
elhep:multiple_panes_qt6
Open

Multiple panes qt6#2721
mmalczak wants to merge 27 commits into
m-labs:masterfrom
elhep:multiple_panes_qt6

Conversation

@mmalczak

@mmalczak mmalczak commented Apr 16, 2025

Copy link
Copy Markdown

ARTIQ Pull Request

Description of Changes

Add multiple experiment workspaces.
Add possibility to rename workspace tab. Add tooltip informing about that possibility. Ensure unique tab names.
Opening experiment opens related workspace.
The workspace state is save.
Handle migration of experiments from previous version to the version with multiple workspaces.

Related Issue

Type of Changes

Type
✨ New feature

Steps (Choose relevant, delete irrelevant before submitting)

All Pull Requests

  • Use correct spelling and grammar.
  • Check the copyright situation of your changes and sign off your patches (git commit --signoff, see copyright).

Code Changes

  • Run flake8 to check code style (follow PEP-8 style). flake8 has issues with parsing Migen/gateware code, ignore as necessary.
  • Test your changes or have someone test them. Mention what was tested and how.
  • Add and check docstrings and comments
  • Check, test, and update the unittests in /artiq/test/ or gateware simulations in /artiq/gateware/test

Git Logistics

  • Split your contribution into logically separate changes (git rebase --interactive). Merge/squash/fixup commits that just fix or amend previous commits. Remove unintended changes & cleanup. See tutorial.
  • [ x] Write short & meaningful commit messages. Review each commit for messages (git show). Format:
    topic: description. < 50 characters total.
    
    Longer description. < 70 characters per line
    

Licensing

See copyright & licensing for more info.
ARTIQ files that do not contain a license header are copyrighted by M-Labs Limited and are licensed under LGPLv3+.

@sbourdeauducq sbourdeauducq mentioned this pull request Apr 16, 2025
7 tasks
@marmeladapk

Copy link
Copy Markdown
Contributor

image

This is what it looks like in release-8 that we're using internally in Warsaw. Option to hide scheduler settings will be in a future PR. Also we're working on docking applets inside these workspaces.

Here's the original PR where I tested this for some edge cases, when reviewing you can redo those scenarios if you want.
elhep#10

Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/dashboard/experiments.py Outdated
Comment thread artiq/dashboard/experiments.py Outdated
tab_widget = self.main_window.centralWidget()
mdi_area_name = experiment_mdi[expurl]
mdi_area = self.main_window.get_mdi_area_by_name(mdi_area_name)
tab_widget.setCurrentWidget(mdi_area)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems odd to have to switch between tabs for each experiment. Would it be challenging to store the state of each experiment window in their corresponding MdiArea and restore the state of each MdiArea sequentially?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

ok, I save and restore mdi areas and respective experiments as stored in the centralWidget. There is not need to add any additional monotonically increasing index nor depend on unique names anymore.

Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
@SimonRenblad

Copy link
Copy Markdown
Contributor

Can we make the tabs movable?

Comment thread artiq/frontend/artiq_dashboard.py Outdated
index = self.tabAt(event.pos())
if index != -1:
current_name = self.tabText(index)
new_name, ok = QtWidgets.QInputDialog.getText(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I am aware that QTabBar does not come with built in editing of the tab text (which is a shame). I do still think that an input dialog is overkill here. Spawning a QLineEdit and positioning it over the tab text seems more user friendly, see for example https://stackoverflow.com/q/8707457

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I did it and pushed the changes.
Please check it, as I am not convinced if it is a better solution.

If I were to choose, I would go with the input dialog.

@SimonRenblad SimonRenblad mentioned this pull request Apr 17, 2025
8 tasks
mmalczak added 11 commits June 4, 2025 21:12
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
… ExperimentManager #4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
…#4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
mmalczak added 3 commits June 4, 2025 21:12
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
@mmalczak
mmalczak force-pushed the multiple_panes_qt6 branch from 7032c2e to 3869ce2 Compare June 4, 2025 19:13
mmalczak added 3 commits June 4, 2025 21:41
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Comment thread artiq/frontend/artiq_dashboard.py Outdated
Comment thread artiq/frontend/artiq_dashboard.py Outdated
mmalczak added 8 commits June 6, 2025 23:48
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
…mdi_area_by_name which becomes redundant now #4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
… state #4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
…ng input dialog to change the tab name #4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
@mmalczak
mmalczak requested a review from SimonRenblad June 8, 2025 14:51
@mmalczak
mmalczak force-pushed the multiple_panes_qt6 branch from 60b20f0 to 24ba2a7 Compare June 14, 2025 22:16
mmalczak added 2 commits June 15, 2025 00:22
…s and move it to artiq/dashboard/experiment_tabs.py #4

Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
Signed-off-by: Miłosz Malczak <milosz.malczak@gmail.com>
@mmalczak
mmalczak force-pushed the multiple_panes_qt6 branch from 24ba2a7 to bf3ed36 Compare June 14, 2025 22:22
@mmalczak
mmalczak requested a review from marmeladapk June 16, 2025 20:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants