Examples of QPixmap


Examples of com.trolltech.qt.gui.QPixmap

  private void drawFPGAFabric(boolean drawPrimitives){
    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

Examples of com.trolltech.qt.gui.QPixmap

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

Examples of com.trolltech.qt.gui.QPixmap

      return;
    QByteArray recoData = new QByteArray(recoResource.getRecognition().getBody());
    String xml = recoData.toString();
   
    // Get a painter for the image.  This is the background (the initial image).
      QPixmap pix = new QPixmap(f.fileName());
      QPixmap hilightedPix = new QPixmap(pix.size());
      QPainter p = new QPainter(hilightedPix);
      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

Examples of com.trolltech.qt.gui.QPixmap

    if (col == Global.noteTableThumbnailPosition) {
      if (!Global.enableThumbnails())
        return null;
      if (Global.getListView() == Global.View_List_Wide) {
//        QImage img = listManager.getThumbnail(note.getGuid());
        QPixmap img = listManager.getThumbnailPixmap(note.getGuid());
        if (img != null)
          return img.scaled(Global.smallThumbnailSize,
            AspectRatioMode.KeepAspectRatio, TransformationMode.SmoothTransformation);
        else
          return null;
      }
      else {
        QImage img = listManager.getThumbnail(note.getGuid());
        if (img != null)
          return img.scaled(Global.largeThumbnailSize,
            AspectRatioMode.KeepAspectRatio, TransformationMode.SmoothTransformation);
        else
          return null;
      }
       
View Full Code Here

Examples of com.trolltech.qt.gui.QPixmap

   
  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

Examples of com.trolltech.qt.gui.QPixmap

      QBuffer buffer = new QBuffer();
          if (!buffer.open(QIODevice.OpenModeFlag.ReadWrite)) {
            logger.log(logger.EXTREME, "Failure to open buffer.  Aborting.");
            return;
          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
View Full Code Here

Examples of com.trolltech.qt.gui.QPixmap

      QBuffer buffer = new QBuffer();
          if (!buffer.open(QIODevice.OpenModeFlag.ReadWrite)) {
            logger.log(logger.EXTREME, "Failure to open buffer.  Aborting.");
            return;
          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
View Full Code Here

Examples of com.trolltech.qt.gui.QPixmap

  }
  public QPixmap getThumbnailPixmap(String guid) {
//    if (getThumbnails().containsKey(guid))
//      return getThumbnails().get(guid);
   
    QPixmap img = new QPixmap();
    img.loadFromData(conn.getNoteTable().getThumbnail(guid));
    if (img == null || img.isNull())
      return null;
    //getThumbnails().put(guid, img);
    return img;
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QPixmap

      QBuffer buffer = new QBuffer();
          if (!buffer.open(QIODevice.OpenModeFlag.ReadWrite)) {
            logger.log(logger.EXTREME, "Failure to open buffer.  Aborting.");
            return;
          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, type.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
View Full Code Here

Examples of com.trolltech.qt.gui.QPixmap

      return;
    mutex.lock();
    logger.log(logger.EXTREME, "Image found "+guid);
     
    logger.log(logger.EXTREME, "Getting image");
    QPixmap image = new QPixmap();
    if (!image.load(Global.getFileManager().getResDirPath()+"thumbnail-"+guid+".png")) {
      logger.log(logger.EXTREME, "Failure to reload image. Aborting.");
      mutex.unlock();
      return;
    }
   
   
    logger.log(logger.EXTREME, "Opening buffer");
        QBuffer buffer = new QBuffer();
        if (!buffer.open(QIODevice.OpenModeFlag.WriteOnly)) {
          logger.log(logger.EXTREME, "Failure to open buffer.  Aborting.");
          mutex.unlock();
          return;
        }
         
    logger.log(logger.EXTREME, "Filling buffer");
        if (!image.save(buffer, "PNG")) {
          logger.log(logger.EXTREME, "Failure to write to buffer.  Aborting.");   
          mutex.unlock();
          return;
        }
        buffer.close();
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.