Package com.trolltech.qt.core

Examples of com.trolltech.qt.core.QSize.height()


  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


    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

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

            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

    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.