https://bugs.kde.org/show_bug.cgi?id=377009
Bug ID: 377009 Summary: KSaneWidget selection interface Product: libksane Version: unspecified Platform: Debian unstable OS: Linux Status: UNCONFIRMED Severity: minor Priority: NOR Component: general Assignee: kare.s...@iki.fi Reporter: trufano...@gmail.com Target Milestone: --- Hi, I've noticed a few inconveniences while working with KSaneWidget. 1. It has setSelection(QPointF topLeft, QPointF bottomRight); but has no getSelection() function. This can be workarounded by getting current scanner settings via getOpts() and looking for "tl-x", "tl-y", "br-x", "br-y" in QMap. 2. getOpts() might has selection data in result. If you try to apply setOpts() with selection data in it - the selection size wont change if it wasn't exist before. I mean if you select something and do setOpts() with old selection state - the selection will change its size. But If you just created KSaneWidget and nothing is selected in it then after calling setOpts() with same settings won't create selection for you. I've workarounded this by checking if setOpts() argument has some selection data and creating small selection on screen before calling it in this case. I do setSelection(QPointF(0,0),QPointF(1,1)); Or one can parse settings, extract selection data and apply it via setSelection() instead of relying on setOpts(). The 2 above are come into play if you try to implement settings profiles and switching between them. I've described why I need such settings profiles in README of my SkanLite fork: https://github.com/trufanov-nok/skanlite 3. It seems KSaneWidget doesn't provide controls over multiple selections and getOpts() contains empty selection in case user selected several areas on screen. Not critical for me - never used multiple selections in practice. -- You are receiving this mail because: You are watching all bug changes.