Examples of QImage


Examples of com.trolltech.qt.gui.QImage

    selectedFile = f;
  }
  public void rotateImageRight() {
    QWebSettings.setMaximumPagesInCache(0);
    QWebSettings.setObjectCacheCapacities(0, 0, 0);
    QImage image = new QImage(selectedFile);
    QMatrix matrix = new QMatrix();
    matrix.rotate( 90.0 );
    image = image.transformed(matrix);
    image.save(selectedFile);
    QWebSettings.setMaximumPagesInCache(0);
    QWebSettings.setObjectCacheCapacities(0, 0, 0);
    browser.setHtml(browser.page().mainFrame().toHtml());
    browser.reload();
    contentChanged();
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

    contentChanged();
    resourceSignal.contentChanged.emit(selectedFile);

  }
  public void rotateImageLeft() {
    QImage image = new QImage(selectedFile);
    QMatrix matrix = new QMatrix();
    matrix.rotate( -90.0 );
    image = image.transformed(matrix);
    image.save(selectedFile);
    browser.setHtml(browser.page().mainFrame().toHtml());
    browser.reload();
    contentChanged();
    resourceSignal.contentChanged.emit(selectedFile);
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

      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);
      page.loadFinished.connect(this, "loadFinished(Boolean)");
      buffer = new QBuffer();
        mutex.unlock();
    }
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

          mutex.unlock();
          return;
        }
         
    logger.log(logger.EXTREME, "Filling buffer");
    QImage img = image.scaled(Global.largeThumbnailSize,
        AspectRatioMode.KeepAspectRatio, TransformationMode.SmoothTransformation);
        if (!img.save(buffer, "PNG")) {
          logger.log(logger.EXTREME, "Failure to write to buffer.  Aborting.");   
          mutex.unlock();
          return;
        }
        buffer.close();
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

   
    String thumbnailName = Global.getFileManager().getResDirPath("thumbnail-" + currentNoteGuid + ".png");
    QFile thumbnail = new QFile(thumbnailName);
    if (!thumbnail.exists()) {
     
      QImage img = new QImage();
      img.loadFromData(conn.getNoteTable().getThumbnail(currentNoteGuid));
      thumbnailViewer.setThumbnail(img);
    } else
      thumbnailViewer.setThumbnail(thumbnailName);
    if (!thumbnailViewer.isVisible())
      thumbnailViewer.showFullScreen();
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

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

Examples of com.trolltech.qt.gui.QImage

//    this.hide();

  }
  public void setThumbnail(String thumb) {
    thumbnail = thumb;
    image = new QImage(thumbnail);
    picture.setPixmap(QPixmap.fromImage(image));
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QImage

    QVBoxLayout subLayout = new QVBoxLayout();
    setMouseTracking(true);
   
    PreviewImage imageLabel = new PreviewImage(masterLabel);
    imageLabel.ID = "Number 1";
        QImage image = new QImage(Global.getFileManager().getResDirPath("thumbnail.png"));
        imageLabel.setPixmap(QPixmap.fromImage(image).scaled(400, 400));
        subLayout.addWidget(imageLabel);

    PreviewImage imageLabel2 = new PreviewImage(masterLabel);
    imageLabel2.ID = "Number 2";
    QImage image2 = new QImage(Global.getFileManager().getResDirPath("thumbnail.png"));
        imageLabel2.setPixmap(QPixmap.fromImage(image2).scaled(400,400));
        subLayout.addWidget(imageLabel2);
        masterLabel.setLayout(subLayout);

        QScrollArea scrollArea = new QScrollArea();
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.