Examples of QRectF


Examples of com.trolltech.qt.core.QRectF

      }
       
      rows = device.getRows();
      cols = device.getColumns();
      sceneSize = new QSize((cols + 1) * (tileSize + 1), (rows + 1) * (tileSize + 1));
      setSceneRect(new QRectF(new QPointF(0, 0), new QSizeF(sceneSize)));
      drawFPGAFabric(drawPrimitives);
    }
    else{
      setSceneRect(new QRectF(0, 0, tileSize + 1, tileSize + 1));
    }
    //this array is used to determine how many hard macros are
    // attempting to use each tile.
    tileOccupantCount = new HashSet[rows][cols];
    for(int y=0;y<rows;y++){
View Full Code Here

Examples of com.trolltech.qt.core.QRectF

      moved.emit();
    } else if (change == GraphicsItemChange.ItemPositionChange
        && scene() != null) {
      // value is the new position.
      QPointF newPos = (QPointF) value;
      QRectF rect = scene().sceneRect();

      double width = this.boundingRect().width();
      width = Math.floor(width / scene.tileSize);
      double height = this.boundingRect().height();
      height = Math.floor(height / scene.tileSize);
      QPointF p = rect.bottomRight();
      //p.setX((fpScene.device.getColumns() - width) * fpScene.tileSize);
      //p.setY((fpScene.device.getRows() - height) * fpScene.tileSize);
     
      p.setX((scene.cols - width) * scene.tileSize);
      p.setY((scene.rows - height) * scene.tileSize);
      rect.setBottomRight(p);
      if (!rect.contains(newPos)) {
        // Keep the item inside the scene rect.
        newPos.setX(Math.min(rect.right(), Math.max(newPos.x(), rect
            .left())));
        newPos.setY(Math.min(rect.bottom(), Math.max(newPos.y(), rect
            .top())));
      }
      long x = Math.round(newPos.x() / scene.tileSize)
          * scene.tileSize;
      long y = Math.round(newPos.y() / scene.tileSize)
View Full Code Here

Examples of com.trolltech.qt.core.QRectF

      this.numCols = device.getColumns();
    } else {
      this.numRows = 8;
      this.numCols = 8;
    }
    setSceneRect(new QRectF(0, 0, (numCols + 1) * (tileSize + 1),
        (numRows + 1) * (tileSize + 1)));
    drawSliceBackground();
  }
View Full Code Here

Examples of com.trolltech.qt.core.QRectF

    } else {
      this.numRows = 8;
      this.numCols = 8;
    }
    this.clear();
    setSceneRect(new QRectF(0, 0, (numCols + 1) * (tileSize + 1),
        (numRows + 1) * (tileSize + 1)));
    drawSliceBackground();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.