return false;
}
+void GroupItem::interfaceRenamed() {
+ updateGeometry(InterfaceMove);
+}
+
+
void GroupItem::mouseMoveEvent(QGraphicsSceneMouseEvent *event) {
if(params->editState == Parameters::EditGroupMove) {
QString name = currentInterfaceNode.attribute("name","none");
if(name == "none") throw(Exception(PROJECTFILE_CORRUPTED));
- QString levelStr = currentInterfaceNode.attribute("level","none");
- int level = AbstractInterface::getIntLevel(levelStr);
- if(level == -1) throw(Exception(PROJECTFILE_CORRUPTED));
-
QString directionStr = currentInterfaceNode.attribute("direction","none");
int direction = AbstractInterface::getIntDirection(directionStr);
if(direction == -1) throw(Exception(PROJECTFILE_CORRUPTED));
double position = currentInterfaceNode.attribute("position","none").toDouble(&ok);
if(!ok) throw(Exception(PROJECTFILE_CORRUPTED));
- GroupInterface *groupInterface = new GroupInterface(groupBlock,name,direction,level);
+ GroupInterface *groupInterface = new GroupInterface(groupBlock,name,direction,AbstractInterface::Data);
InterfaceItem *interfaceItem = new InterfaceItem(position,orientation,groupInterface,this,params);
interfaceItem->setId(id);
if(parentItem != NULL){
attrUpperItem = QString::number(parentItem->getId());
}
- QString attrPos = QString::number(pos().x()).append(",").append(QString::number(pos().y()));
+ QString attrPos = QString::number((int)(pos().x())).append(",").append(QString::number((int)(pos().y())));
QString attrDim = QString::number(getWidth()).append(",").append(QString::number(getHeight()));
writer.writeStartElement("group_iface");
writer.writeAttribute("id",QString::number(item->getId()));
- writer.writeAttribute("name",item->getName());
- writer.writeAttribute("level",QString(item->refInter->getLevelString()));
+ writer.writeAttribute("name",item->getName());
writer.writeAttribute("direction",QString(item->refInter->getDirectionString()));
writer.writeAttribute("orientation",item->getStrOrientation());
writer.writeAttribute("position",QString::number(item->getPositionRatio()));