Skip to content

Add PySide6 GUI for QuickSync4Linux#13

Open
pandinus wants to merge 52 commits into
schorschii:mainfrom
pandinus:main
Open

Add PySide6 GUI for QuickSync4Linux#13
pandinus wants to merge 52 commits into
schorschii:mainfrom
pandinus:main

Conversation

@pandinus

@pandinus pandinus commented Jun 1, 2026

Copy link
Copy Markdown

This adds a PySide6-based GUI for QuickSync4Linux. Features include device info display, contact management (view, export, import), file manager with preview, Bluetooth support, and a settings dialog for timeouts and baud rate.

@schorschii

Copy link
Copy Markdown
Owner

Hi, thanks for your pull request. I have the following points before it can be merged:

  • The program (CLI) should still be usable without GUI components and I don't like that PySide6 is an obligatory dependency now. Please don't remove QuickSync4Linux/__main__.py.
    The package name and config file name should not be changed. Either you create the new package QuickSync4LinuxGui for the GUI components only (and keep the other files in QuickSync4Linux) or you add the GUI components into QuickSync4Linux and then add PySide6 as optional dependency. You can have a look at https://github.com/schorschii/LAPS4LINUX/tree/master/laps-client how to implement optional dependencies. This project of mine has an optional "barcode" dependency.
  • The GUI language should be English by default. Multi-language support with German would be nice but not necessary. You can have a look at https://github.com/schorschii/certuploader for how to implement multi-language support in Qt.
  • I don't really like the build_cmd() function. The appropriate functions could be called directly without spawning a new python process with subprocess.run().
  • Please add the missing "c" to the "Sreenshots" directory.
  • The README.md now says that this it is a fork - such a text cannot be merged into my main repo. Please also don't use German words in here mixed with English.

@pandinus

Copy link
Copy Markdown
Author

Hello @schorschii ,

i rebuild the code like you wanted. i hope i did it right. Please let me know when you have any further suggestion.

- sidebar.setFixedWidth(155) replaced with QSplitter(Qt.Horizontal)
  with setMinimumWidth(120) / setMaximumWidth(300)
- vertical QFrame separator removed; splitter handle takes its place
- right_col wrapped in right_widget as second splitter child
- default sizes: 160px sidebar, remaining space for content
- right_col left margin set to 6px for visual breathing room
- splitter position saved/restored via QSettings on close/start
- closeEvent added to QuickSyncGUI for state persistence
- suppress qt.qpa.xcb debug output via QT_LOGGING_RULES in __main__.py
- backend.py: interpret_connection_error() now matches errno numbers
  directly ([Errno 110] etc.) instead of English text — locale-independent
- gui.py: replace hardcoded German strings with tr() calls (status bar,
  file manager status, connection messages)
- lang/de.ts: add all missing backend error string translations
  (ERR_NOT_CONNECTED, ERR_TIMEOUT etc.) and new status strings
- gui.py: add Language button to settings sidebar
- gui.py: add open_settings_language() dialog with English/Deutsch
  selection, saved via QSettings
- gui.py: run() respects saved language setting; falls back to system
  locale if no language is explicitly set; 'en' forces English
  regardless of system locale
- lang/de.ts: add translations for Language and restart hint
- lang/de.ts: add the 6 backend error code translations
  (ERR_NOT_CONNECTED, ERR_TIMEOUT etc.) that were missing
- lang/de.ts: add 5 further missing strings (Connection to, failed,
  Unknown action, {} file(s) in {}, ✗ No device selected or
  connection lost)
- lang/de.ts: add Reload / unsaved changes prompt to ContactsWindow
  context, Info / Baudrate to QuickSyncGUI context
- gui.py: replace two hardcoded German strings (Hinweis/Bitte eine
  Datei auswählen, Neu laden/Es gibt ungespeicherte Änderungen) with
  English tr() source strings
- verified via script: all 84 tr() calls now have a matching
  <source> entry in de.ts
_make_dialog_buttons(self) was called inside the standalone
simple_input() function where 'self' does not exist.
Replaced with _make_dialog_buttons(dlg) since QDialog provides tr().
- gui.py: table headers (Date, Size), preview panel (Path, Size, Date,
  No selection, Loading image, No preview available, Image error)
  now use tr() with English source strings
- gui.py: FileManagerWindow.reload() now uses
  interpret_connection_error() + _translate_err() for connection
  errors instead of showing the raw OS error message
- lang/de.ts: add translations for all new file manager strings
- pyproject.toml: add [project.optional-dependencies] gui = [PySide6]
  so GUI dependencies can be installed via pip install .[gui]
- requirements.txt: reference pip install .[gui] for GUI support
- README.md: document pip install .[gui] as installation option
@pandinus

Copy link
Copy Markdown
Author

@schorschii

One open question remains regarding the package structure you mentioned. As I understand it, there are two possible approaches:

  1. Keep QuickSync4LinuxGui as a separate package for the GUI components only, while restoring/keeping the original QuickSync4Linux package with its original files, including QuickSync4Linux/__main__.py.

  2. Integrate the GUI components directly into QuickSync4Linux, with PySide6 as an optional dependency, similar to the pattern you mentioned in LAPS4LINUX/certuploader.

Do you have a preference here? I’m happy to implement either approach, but wanted to check before doing a larger restructuring so I don’t end up redoing the work.

Please let me know which approach you would prefer.

@schorschii

Copy link
Copy Markdown
Owner

Thanks for your adjustments so far. I think the best solution would be to create a separate QuickSync4LinuxGui package/module, which has QuickSync4Linux as dependency. QuickSync4LinuxGui can then import the AT/Obex functions from QuickSync4Linux and execute them accordingly. This allows the user to install the CLI only or, if he likes, the complete GUI with all the Qt libs etc.

Can you please mark the pull request as draft as long as you're working on it? So I know when you're finished and when I can do the next review.

@pandinus pandinus marked this pull request as draft June 15, 2026 21:46
- Add new QuickSync4Linux/ package containing the original CLI files
  (at.py, obex.py, btserial.py, quicksync.py, __init__.py, __main__.py)
- QuickSync4LinuxGui/ is now a standalone package with its own
  pyproject.toml, depending on QuickSync4Linux and PySide6
- gui.py: update imports to use QuickSync4Linux as dependency
  (from QuickSync4Linux import quicksync, btserial)
- QuickSync4LinuxGui/__main__.py: import quicksync from QuickSync4Linux
- Root pyproject.toml: updated to build QuickSync4Linux package only
- Makefile: update paths to reflect new package structure
- requirements.txt: update install instructions for two-package setup
- README.md: update installation and CLI usage instructions
- QuickSync4LinuxGui.desktop: fix Path= to new location
@pandinus pandinus marked this pull request as ready for review June 17, 2026 11:02
@pandinus

Copy link
Copy Markdown
Author

Hello @schorschii

I rebuilt the project as suggested. The GUI is now split into a separate QuickSync4LinuxGui package which depends on QuickSync4Linux. The CLI remains fully usable without any GUI components.

The code is ready for your review. If you have any further suggestions please let me know.

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.

3 participants