On Monday 10 September 2007 Chitlesh GOORAH wrote: > On Monday 10 September 2007 20:27:43 Julian Bäume wrote: > > Just the patch i did submit some weeks ago... Don't know, what happened > > to it. > > Can you send it again to this mailing list? sounds like Jason didn't commit > to svn yet. Ok, it's attached. This patch makes the pins of a PIC component be "clickable" again. So one is able to set the IO Ports of the PIC in a point and click way.
> > > At least some work will still be available. > > > > Can you be a bit more specific? May be, I can help out somewhere? > The next step to do is to port ktechlab to kde4. Unfortunately, I'm a bit > busy with fedora electronic lab to spare some time in porting. But for > testing I'm here. Well, as i mentioned before on this list, I'm playing around with Qt4 at the moment to see, how the QGraphicsView can be of use, allways with the intention to get the most out of it for ktechlab. (Well, actually it's not playing ;) I'm working on a project for my studies, nothing to do with electronics, but anyway, scientific sector (matlab<->Qt interface)... hehe) > I'll send a mail later on describing my new project "fedora electronic > lab". Perhaps you might be interested. I'm excited to see, what you're doing. bye julian
Index: src/picitem.h =================================================================== --- src/picitem.h (Revision 18) +++ src/picitem.h (Arbeitskopie) @@ -76,6 +76,8 @@ static QString typeString() { return "microitem"; } virtual void updateZ( int baseZ ); + + bool mousePressEvent( const EventInfo &info ); protected slots: void slotMicroSettingsDlgAccepted(); Index: src/picitem.cpp =================================================================== --- src/picitem.cpp (Revision 18) +++ src/picitem.cpp (Arbeitskopie) @@ -15,6 +15,7 @@ #include "microsettingsdlg.h" #include "micropackage.h" #include "picitem.h" +#include "eventinfo.h" #include <kdebug.h> #include <kiconloader.h> @@ -386,6 +387,26 @@ p_icnDocument->requestStateSave(); } + +bool PicItem::mousePressEvent( const EventInfo &info ) +{ + QMouseEvent *e = info.mouseReleaseEvent( 0, 0 ); + + const PinItemList::iterator end = m_pinItemList.end(); + for ( PinItemList::iterator it = m_pinItemList.begin(); it != end; ++it ) + if ( (*it)->boundingRect().contains(info.pos) ) + { + if (e->isAccepted()) + { + (*it)->switchState(); + delete e; + return true; + } + } + delete e; + + return CNItem::mousePressEvent( info ); +} //END class PicItem #include "picitem.moc"
signature.asc
Description: This is a digitally signed message part.
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ Ktechlab-devel mailing list Ktechlab-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ktechlab-devel