+ createInterfaceItems(dIn,dOut,dBi);
+ updateGeometry(Creation);
+
+ // position the item
+ int groupWidth = getScene()->getGroupItem()->getWidth();
+ int groupHeight = getScene()->getGroupItem()->getHeight();
+ double xx = 0.0,yy = 0.0;
+ if ((position == BoxItem::Left) || (position == BoxItem::TopLeft) || (position == BoxItem::BottomLeft)) {
+ xx = 0;
+ if ((span == VSpan) || (position == BoxItem::TopLeft)) {
+ yy = 0;
+ }
+ else if (position == BoxItem::BottomLeft) {
+ yy = groupHeight-totalHeight;
+ }
+ else {
+ yy = (groupHeight-totalHeight)/2.0;
+ }
+ }
+ else if ((position == BoxItem::Right) || (position == BoxItem::TopRight) || (position == BoxItem::BottomRight)) {
+ xx = groupWidth-totalWidth;
+ if (xx < 0) xx = 0;
+ if ((span == VSpan) || (position == BoxItem::TopRight)) {
+ yy = 0;
+ }
+ else if (position == BoxItem::BottomRight) {
+ yy = groupHeight-totalHeight;
+ }
+ else {
+ yy = (groupHeight-totalHeight)/2.0;
+ }
+ }
+ else if ((position == BoxItem::Top) || (position == BoxItem::TopLeft) || (position == BoxItem::TopRight)) {
+ yy = 0;
+ if ((span == HSpan) || (position == BoxItem::TopLeft)) {
+ xx = 0;
+ }
+ else if (position == BoxItem::TopRight) {
+ xx = groupWidth-totalWidth;
+ }
+ else {
+ xx = (groupWidth-totalWidth)/2.0;
+ }
+ }
+ else if ((position == BoxItem::Bottom) || (position == BoxItem::BottomLeft) || (position == BoxItem::BottomRight)) {
+ yy = groupHeight-totalHeight;
+ if ((span == HSpan) || (position == BoxItem::BottomLeft)) {
+ xx = 0;
+ }
+ else if (position == BoxItem::BottomRight) {
+ xx = groupWidth-totalWidth;
+ }
+ else {
+ xx = (groupWidth-totalWidth)/2.0;
+ }
+ }
+ else {
+ int marginConn = 2*(params->arrowWidth+params->arrowLineLength);
+ xx = (groupWidth-totalWidth)/2.0;
+ if (xx < marginConn) xx = marginConn;
+ yy = (groupHeight-totalHeight)/2.0;
+ if (yy < marginConn) yy = marginConn;
+ }
+ cout << "setting raw pos to " << xx << "," << yy << endl;
+ QPointF initPos(xx,yy);
+ initPos = initPos-originPoint;