Hi! On Monday 09 July 2007 Jason Lucas wrote: > In 0.3.6 it was possible to select the > input/output of the PIC via a mouse click or drag. This is no longer > working with the current svn version. i fixed that... see my attached diff
bye then 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,24 @@
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;
+ }
+ }
+ 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 DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Ktechlab-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ktechlab-devel
