Package com.trolltech.qt.gui

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


            // If we can't open it, then prompt the user to save it.
            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);
View Full Code Here


          .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

    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

    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

    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

    fd.setConfirmOverwrite(true);
    fd.setWindowTitle(tr("Backup Database"));
    fd.setFilter(tr("NixNote Export (*.nnex);;All Files (*.*)"));
    fd.setAcceptMode(AcceptMode.AcceptSave);
    fd.setDirectory(System.getProperty("user.home"));
    if (fd.exec() == 0 || fd.selectedFiles().size() == 0) {
      return;
    }
   
   
      waitCursor(true);
View Full Code Here

    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

  @SuppressWarnings("unused")
  private void folderButtonClicked() {
    QFileDialog fileDialog = new QFileDialog();
    fileDialog.setFileMode(FileMode.DirectoryOnly);
    fileDialog.fileSelected.connect(this, "folderSelected(String)");
    fileDialog.exec();
  }
 
  @SuppressWarnings("unused")
  private void folderSelected(String f) {
     String whichOS = System.getProperty("os.name");
View Full Code Here

    fd.setAcceptMode(AcceptMode.AcceptOpen);
    if (path == null || path.equals(""))
      fd.setDirectory(Global.getFileManager().getImageDirPath(""));
    else
      fd.setDirectory(path);
    if (fd.exec() == 0 || fd.selectedFiles().size() == 0) {
      return;
    }
   
    this.path = fd.selectedFiles().get(0);
    this.path = path.substring(0,path.lastIndexOf("/"));
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.