Examples of QSize


Examples of com.trolltech.qt.core.QSize

        populateTileTypesToHide();
      }
       
      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));
View Full Code Here

Examples of com.trolltech.qt.core.QSize

   * @param tile The new tile to move the cursor to.
   */
  public void moveToTile(String tile){
    Tile t = design.getDevice().getTile(tile);
    int tileSize = scene.getTileSize();
    QSize size = this.frameSize();
    view.fitInView(scene.getDrawnTileX(t)*tileSize - size.width()/2,
        scene.getDrawnTileY(t)*tileSize - size.height()/2,
        size.width(), size.height(), AspectRatioMode.KeepAspectRatio);
    view.zoomIn(); view.zoomIn();
    view.zoomIn(); view.zoomIn();   
    scene.updateCurrXY(scene.getDrawnTileX(t), scene.getDrawnTileY(t));
    scene.updateCursor();
  }
View Full Code Here

Examples of com.trolltech.qt.core.QSize

  private void drawSliceBackground() {

    setBackgroundBrush(new QBrush(QColor.black));
    //Create transparent QPixmap that accepts hovers
    //  so that moveMouseEvent is triggered
    QPixmap qpm = new QPixmap(new QSize((numCols + 1) * (tileSize + 1),
        (numRows + 1) * (tileSize + 1)));
    qpm.fill(new QColor(255, 255,255, 0));
    QGraphicsPixmapItem background = addPixmap(qpm);
    background.setAcceptsHoverEvents(true);
    background.setZValue(-1);
    // Draw colored tiles onto QImage   
    qImage = new QImage(new QSize((numCols + 1) * (tileSize + 1),
        (numRows + 1) * (tileSize + 1)), Format.Format_RGB16);
    QPainter painter = new QPainter(qImage);

    painter.setPen(new QPen(QColor.black, lineWidth));
    // Draw lines between tiles
View Full Code Here

Examples of com.trolltech.qt.core.QSize

   
  private void populateList() {
    List<String> colorNames = QColor.colorNames();
    for(int i=0; i<colorNames.size(); i++) {
      QColor color = new QColor(colorNames.get(i));
      QPixmap pix = new QPixmap(new QSize(22, 22));
      pix.fill(color);
      QAction newAction = new QAction(new QIcon(pix), "", parent);
      newAction.setToolTip(colorNames.get(i));
      newAction.setText(colorNames.get(i));
      newAction.hovered.connect(this, "itemHovered()");
View Full Code Here

Examples of com.trolltech.qt.core.QSize

        syncIcons.add(pix);
        for (int i=0; i<=360; i++) {
          QPixmap rotatedPix = new QPixmap(pix.size());
          QPainter p = new QPainter(rotatedPix);
            rotatedPix.fill(toolBar.palette().color(ColorRole.Button));
            QSize size = pix.size();
            p.translate(size.width()/2, size.height()/2);
            angle = angle+1.0;
            p.rotate(angle);
            p.setBackgroundMode(BGMode.OpaqueMode);
            p.translate(-size.width()/2, -size.height()/2);
            p.drawPixmap(0,0, pix);
            p.end();
            syncIcons.add(rotatedPix);
        }
      }
View Full Code Here

Examples of com.trolltech.qt.core.QSize

      zoom = 1;

      this.logger = logger;
      page = new QWebPage();
      this.conn = conn;
        size = new QSize(1024,768);
//        size = new QSize();
//        size.setWidth(Global.largeThumbnailSize.width());
//        size.setHeight(Global.largeThumbnailSize.height());
        image = new QImage(size, Format.Format_ARGB32_Premultiplied);
      page.setViewportSize(size);
View Full Code Here

Examples of com.trolltech.qt.core.QSize

  public ConfigDialog(QWidget parent) {
   
    contentsWidget = new QListWidget(this);
    setWindowIcon(new QIcon(iconPath+"config.png"));
    contentsWidget.setViewMode(QListView.ViewMode.IconMode);
    contentsWidget.setIconSize(new QSize(96, 84));
    contentsWidget.setMovement(QListView.Movement.Static);
    contentsWidget.setMaximumWidth(128);
    contentsWidget.setSpacing(12);
   
    pagesWidget = new QStackedWidget(this);
View Full Code Here

Examples of com.trolltech.qt.core.QSize

   * @param arg__1 Unknown parameter, which is passed to the super method.
   */
    protected void resizeEvent(QResizeEvent arg__1) {
    super.resizeEvent(arg__1);

    QSize centeredSize = ui.mAgainButton.sizeHint();
   
    int centre = this.width() / 2;
    int left = centre - (centeredSize.width() / 2);
   
    ui.mAgainButton.setGeometry(left, 0, centeredSize.width(), centeredSize.height());

        int minHeight = Math.max(ui.mAgainButton.height(), this.minimumHeight());
    this.setMinimumHeight(minHeight);
    }
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.