#include <QtCore>
#include <QtGui>
+#include <QtXml>
+#include <QtXmlPatterns>
+
#include "AbstractBoxItem.h"
class AbstractBoxItem;
*/
GroupItem(BoxItem* _parentItem, AbstractBlock *_refBlock, Dispatcher *_dispatcher, Parameters *_params) throw(Exception);
+ GroupItem(Dispatcher *_dispatcher, Parameters *_params) throw(Exception); //! uses only when loading a project file
~GroupItem();
// getters
BoxItem* getParentItem();
// setters
+ void setParentItem(BoxItem* _parentItem);
// testers
bool isGroupItem();
// others
- void updateShape();
+ void nameChanged();
+
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
+ void load(QDomElement groupElement) throw(Exception);
void save(QXmlStreamWriter& writer);
-protected:
-
+ void updateShape();
void updateMinimumSize(); // modify the minimum size
bool updateGeometry(ChangeType type);
+ void updateBorderSpanItems();
+
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
+ void mousePressEvent(QGraphicsSceneMouseEvent *event);
+ void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
+
+protected:
+
- void mousePressEvent(QGraphicsSceneMouseEvent *event);
- void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
- void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
- void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
void contextMenuEvent(QGraphicsSceneContextMenuEvent *event);
in the top scene
*/
BoxItem* parentItem;
- QRectF rectTitle;
-
+ QRectF rectTitle;
+ QPointF boxPoint; // the coordinates of the top-left corner of the box (without ifaces)
InterfaceItem *isHoverInterface(QPointF point);
};