Examples of selectedFiles()


Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

            if (!QDesktopServices.openUrl(url)) {
          logger.log(logger.EXTREME, "We can't handle this.  Where do we put it?");
              QFileDialog dialog = new QFileDialog();
              dialog.show();
              if (dialog.exec()!=0) {
                List<String> fileNames = dialog.selectedFiles(); //gets all selected filenames
                if (fileNames.size() == 0)
                  return;
                String sf = fileNames.get(0);
                QFile saveFile = new QFile(sf);
                mode.set(QFile.OpenModeFlag.WriteOnly);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

          .replace(FileUtils.toForwardSlashedPath(Global.getFileManager().getResDirPath()), "");

    pos = guid.lastIndexOf('.');
    if (pos > 0)
      guid = guid.substring(0,pos);
    if (fd.exec() != 0 && fd.selectedFiles().size() > 0) {
      name = name.replace('\\', '/');
      Resource resBinary = conn.getNoteTable().noteResourceTable.getNoteResource(guid, true);
      QFile saveFile = new QFile(fd.selectedFiles().get(0));
      QFile.OpenMode mode = new QFile.OpenMode();
      mode.set(QFile.OpenModeFlag.WriteOnly);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

    if (pos > 0)
      guid = guid.substring(0,pos);
    if (fd.exec() != 0 && fd.selectedFiles().size() > 0) {
      name = name.replace('\\', '/');
      Resource resBinary = conn.getNoteTable().noteResourceTable.getNoteResource(guid, true);
      QFile saveFile = new QFile(fd.selectedFiles().get(0));
      QFile.OpenMode mode = new QFile.OpenMode();
      mode.set(QFile.OpenModeFlag.WriteOnly);
      saveFile.open(mode);
      QDataStream saveOut = new QDataStream(saveFile);
      QByteArray binData = new QByteArray(resBinary.getData().getBody());
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

    pos = name.lastIndexOf(Global.attachmentNameDelimeter);
    if (pos > -1) {
      guid = name.substring(0, pos);
      fd.selectFile(name.substring(pos+Global.attachmentNameDelimeter.length()));   
    }
    if (fd.exec() != 0 && fd.selectedFiles().size() > 0) {
      Resource resBinary = conn.getNoteTable().noteResourceTable.getNoteResource(guid, true);
      String fileName = fd.selectedFiles().get(0);
      QFile saveFile = new QFile(fileName);
      QFile.OpenMode mode = new QFile.OpenMode();
      mode.set(QFile.OpenModeFlag.WriteOnly);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

      guid = name.substring(0, pos);
      fd.selectFile(name.substring(pos+Global.attachmentNameDelimeter.length()));   
    }
    if (fd.exec() != 0 && fd.selectedFiles().size() > 0) {
      Resource resBinary = conn.getNoteTable().noteResourceTable.getNoteResource(guid, true);
      String fileName = fd.selectedFiles().get(0);
      QFile saveFile = new QFile(fileName);
      QFile.OpenMode mode = new QFile.OpenMode();
      mode.set(QFile.OpenModeFlag.WriteOnly);
      saveFile.open(mode);
      QDataStream saveOut = new QDataStream(saveFile);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

    fd.setAcceptMode(AcceptMode.AcceptSave);
    if (saveLastPath == null || saveLastPath.equals(""))
      fd.setDirectory(System.getProperty("user.home"));
    else
      fd.setDirectory(saveLastPath);
    if (fd.exec() == 0 || fd.selectedFiles().size() == 0) {
      return;
    }
   
   
      waitCursor(true);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

      return;
    }
   
   
      waitCursor(true);
      saveLastPath = fd.selectedFiles().get(0);
      saveLastPath = saveLastPath.substring(0,saveLastPath.lastIndexOf("/"));
      setMessage(tr("Backing up database"));
      saveNote();
//      conn.backupDatabase(Global.getUpdateSequenceNumber(), Global.getSequenceDate());
     
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

      setMessage(tr("Backing up database"));
      saveNote();
//      conn.backupDatabase(Global.getUpdateSequenceNumber(), Global.getSequenceDate());
     
      ExportData noteWriter = new ExportData(conn, true);
      String fileName = fd.selectedFiles().get(0);

      if (!fileName.endsWith(".nnex"))
        fileName = fileName +".nnex";
      noteWriter.exportData(fileName);
      setMessage(tr("Database backup completed."));
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

    fd.setAcceptMode(AcceptMode.AcceptOpen);
    if (saveLastPath == null || saveLastPath.equals(""))
      fd.setDirectory(System.getProperty("user.home"));
    else
      fd.setDirectory(saveLastPath);
    if (fd.exec() == 0 || fd.selectedFiles().size() == 0) {
      return;
    }
   
   
    waitCursor(true);
View Full Code Here

Examples of com.trolltech.qt.gui.QFileDialog.selectedFiles()

      return;
    }
   
   
    waitCursor(true);
      saveLastPath = fd.selectedFiles().get(0);
      saveLastPath = saveLastPath.substring(0,saveLastPath.lastIndexOf("/"));

    setMessage(tr("Restoring database"));
      ImportData noteReader = new ImportData(conn, true);
      noteReader.importData(fd.selectedFiles().get(0));
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.