Yes, CPDB is just a different backend for the existing print dialog GUI.
It's merely a different way of enumerating printers and their features.
I have already prepared a simple CPDB plugin (still requires a few
changes and additions) which can already respond to
QPrinterInfo::availablePrinters() queries:
https://github.com/TinyTrebuchet/qtbase/commits/cpdb.
On 9/26/22 21:30, Shawn Rutledge wrote:
On 2022 Sep 26, at 16:54, Volker Hilsheimer <volker.hilshei...@qt.io>
wrote:
I think it will be easier to understand what abstraction we need once
we have a patch to look at that implements CPDB support. That we
don’t have a QPA-level abstraction for print dialogs in Qt shouldn’t
block adding CPDB support.
However, rather than throwing more #if’ery complexity into
qprintdialog_unix.cpp it might be best to make a dedicated
implementation of a CPDB-dialog.
But it was already pointed out that the widget dialog is intended to
look exactly the same, right? This is not a native dialog, it’s just
a different backend that the same old widget dialog should learn how
to deal with, AFAIU. And qprintdialog_unix.cpp is really building up
the widget hierarchy for it. It has a complex feature set. We
haven’t been writing new widgets ourselves, and a few more #if’s will
be less to maintain than a whole new widget-based dialog would be.
Refactoring into whatever plugins or QPA stuff is worth discussing,
but I guess it will be easier to visualize the refactoring after we’ve
got something that works. And I haven’t dug into the implementation
enough to think about whether anything there is reusable in Qt Quick.
QPrinterInfo is public, so I guess the first natural “model” for the
dialog is going to end up being the list returned from
QPrinterInfo::availablePrinters() anyway.
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development
_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development