[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    RE: [PyKDE] Re: kdepyuic from PyKDE-3.3.2
From:       Jim Bublitz <jbublitz () nwinternet ! com>
Date:       2003-04-19 19:41:56
[Download RAW message or body]

On 19-Apr-03 Hans-Peter Jansen wrote:
> On Saturday 19 April 2003 18:50, Jim Bublitz wrote:
>> On 19-Apr-03 Hans-Peter Jansen wrote:
>> > today I started to play with qt designer and kde widgets.
>> > During this course, I stumbled across some pretty obvious
>> > flaws in kdepyuic (besides being white space damaged).
>> > While at it, I've applied a KDatePicker ctor mangling in
>> > order to satisfy KDE's needs.

>> > Attached:
>> > kdepyuic.diff
>> > kdepyuic-ws.diff (same with my prefered white spacing)
>> > kdeform1.ui{.h} (which I played with)

>> > Let me know, what do you think about it

>> kdepyuic was kind of a hack in the first place, and fell into
>> the "works for me but not for anyone else" category, so I
>> pulled it from PyKDE-3.5. This has always been kind of an
>> afterthought in PyKDE and deserves some more focused attention.

>> However if this works, I'll consider putting it back in. Long
>> term I'd like a better solution, and anyone interested is
>> welcome to provide it if I don't get to it first.
 
> Well, I cannot imagine, how kdepyuic from 3.3.2 worked out of the
> box. 

Apparently I pulled a bad version from somewhere and put it in the
distribution.

> Looking into the package revealed two versions
> (kdepyuic{.py}), from which the damaged one got installed here
> and where I based my work on :(. Sorry for not looking deeper
> before.
 
> Comparing them showed some print statements were added, which I 
> added now, too. Here is the corrected full version.

> Please check it, and add again to the distribution again.

OK - I'll try to get it in the next bug fix release.
 
> While experimenting with KHSSelector, I got stuck, because I have
> no idea on how to extract the color with the given coordinates.
 
> Somebody with an idea out there? (kdeform2.ui*)

From looking at kcolordialog.cpp, it appears the points on the
selector are mapped to the (h. s) values directly: 0->359 in the x/h
direction and 0->255 in the y/s direction. If I understand the basic
KXYSelector, these are independent of the actual physical
dimensions of the selector, the same as a progress bar indicates
0->100% if it's 100 pixels wide or 1000 pixels wide.

If you read back xValue() and yValue() (inherited from KXYSelector),
you should get the (h. s) values directly - KColorDialog doesn't
appear to do any other scaling or transformation with the values.
The mouse coordinates would give you the location in
two-dimensional physical space, not (h, s) space (although you
could scale the mouse coordinates, which appears to be what
selectors do).

Jim

_______________________________________________
PyKDE mailing list    PyKDE@mats.gmd.de
http://mats.gmd.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic