1 #ifndef __STIMULIITEM_H__
2 #define __STIMULIITEM_H__
9 #include <QtXmlPatterns>
12 #include "AbstractBoxItem.h"
13 class AbstractBoxItem;
18 #include "Exception.h"
24 * \brief The StimuliItem class
25 * A StimuliItem represents a special type of block that is added only
26 * to the top scene, in order to simulate inputs on the FPGA input
27 * pins. This, the reference block used as a source must be chosen
28 * among blocks that have no inputs and only outputs (with multiplicity
31 class StimuliItem : public AbstractBoxItem {
34 StimuliItem(AbstractBlock *_refBlock, Dispatcher *_dispatcher, Parameters *_params) throw(Exception);
35 StimuliItem(Dispatcher *_dispatcher, Parameters *_params) throw(Exception);
38 void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
45 void moveTo(QPointF dest);
46 void load(QDomElement funcElement) throw(Exception);
47 void save(QXmlStreamWriter& writer);
51 void updateMinimumSize(); // modify the minimum size
52 bool updateGeometry(ChangeType type); // modify the originPoint and the total dimension
54 void mousePressEvent(QGraphicsSceneMouseEvent *event);
55 void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
56 void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
57 void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
58 void hoverMoveEvent( QGraphicsSceneHoverEvent *event);
62 #endif // __STIMULIITEM_H__