[Ktechlab-devel] Rotary Switch

David Saxton david at bluehaze.org
Sun Dec 18 23:45:14 UTC 2005


Cool stuff :) I've added the switch to svn.

Are you planning on doing an icon for it? If not, I'll make one for it.

Also, selection of the component relies on the bounding points you give it - 
at the moment, you have a rectangle - but a circle might better suit the 
circular switch; to do so, replace "setSize( -64, -64, 128, 128 );" with 
something like

QPointArray pa;
pa.makeArc( -56, -56, 112, 112 , 0, 16*360 );
setItemPoints( pa );

and update the positioning of other things (the bounding points as defined in 
setSize or setItemPoints shouldn't really overlap with the pins).

If you want an svn account, email me with a username and password.


On Sunday 18 December 2005 21:13, John Myers wrote:
> Here is some preliminary code for a rotary switch. It mostly works, but
> still has a couple of problems, such as that changing the number of
> positions causes all the connections to be dropped.
>
> Attached:
> src/electronics/components/rotoswitch.cpp
> src/electronics/components/rotoswitch.h




More information about the Ktechlab-devel mailing list