Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QPixmap.fill()


    setBackgroundBrush(new QBrush(QColor.black));
   
    //Create transparent QPixmap that accepts hovers
    //  so that moveMouseEvent is triggered
    QPixmap pixelMap = new QPixmap(sceneSize);
    pixelMap.fill(QColor.transparent);
    QGraphicsPixmapItem background = addPixmap(pixelMap);
    background.setAcceptsHoverEvents(true);
    background.setZValue(-1);
   
    // Draw colored tiles onto QPixMap
View Full Code Here


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

      p.drawPixmap(0,0, pix);

      // Create a transparent pixmap.  The only non-transparent
      // piece is the hilight that will be overlayed to hilight text no the background
      QPixmap overlayPix = new QPixmap(pix.size());
      overlayPix.fill(QColor.transparent);
      QPainter p2 = new QPainter(overlayPix);
      p2.setBackgroundMode(BGMode.TransparentMode);
      p2.setRenderHint(RenderHint.Antialiasing, true);
    QColor yellow = QColor.yellow;
//    yellow.setAlphaF(0.4);
View Full Code Here

  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()");
      menu.addAction(newAction);
View Full Code Here

          QPixmap pix = new QPixmap(iconPath+"synchronize.png");
        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);
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.