Package com.trolltech.qt.gui

Examples of com.trolltech.qt.gui.QImage.loadFromData()


      int sequence = 0;
      if (currentNote.getResources() != null || currentNote.getResources().size() > 0)
        sequence = currentNote.getResources().size();
      newRes = createResource(path,sequence ,"image/gif", false);
      QImage pix = new QImage();
      pix.loadFromData(image);
      newRes.setHeight(new Integer(pix.height()).shortValue());
      newRes.setWidth(new Integer(pix.width()).shortValue());
      logger.log(logger.EXTREME, "Renaming temporary file to " +newRes.getGuid()+".gif");
      path = Global.getFileManager().getResDirPath(newRes.getGuid()+".gif");
      tfile.rename(path);
View Full Code Here


          newRes.getData().setBodyHash(hash);
      } catch (NoSuchAlgorithmException e) {
        e.printStackTrace();
      }
      QImage pix = new QImage();
      pix.loadFromData(image);
      newRes.setHeight(new Integer(pix.height()).shortValue());
      newRes.setWidth(new Integer(pix.width()).shortValue());
      conn.getNoteTable().noteResourceTable.updateNoteResource(newRes, true);
    }
View Full Code Here

    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

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.