Bug 377009 - KSaneWidget selection interface
Summary: KSaneWidget selection interface
Status: RESOLVED WORKSFORME
Alias: None
Product: libksane
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Debian unstable Linux
: NOR minor
Target Milestone: ---
Assignee: Kåre Särs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-28 10:56 UTC by Alexander Trufanov
Modified: 2022-12-03 05:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Trufanov 2017-02-28 10:56:14 UTC
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.
Comment 1 Kåre Särs 2017-03-06 14:59:59 UTC
Hi,

You clearly have an itch to fix things. Please scratch it by hacking on libksane and Skanlite and post the changes for review. You can start with https://git.reviewboard.kde.org until I figure out how to get the projects added to phabricator.kde.org.

I welcome all improvements!

Hoping for patches :)
  Kåre

PS. The README describes the situation quite accurately :)
Comment 2 Christoph Feck 2017-03-08 16:04:00 UTC
Kåre, all repositories are on Phabricator:

https://phabricator.kde.org/differential/diff/create/

There the Repository can be selected:
"Skanlite" (R483)
"KSane Library" (R382)
"KSane Plugin" (R376)

You can create (and later save) a filter to see open requests using
https://phabricator.kde.org/differential/query/advanced/
Comment 3 Justin Zobel 2022-11-03 01:40:31 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 4 Bug Janitor Service 2022-11-18 05:15:25 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 5 Bug Janitor Service 2022-12-03 05:19:11 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!