Examples of QMessageBox


Examples of com.trolltech.qt.gui.QMessageBox

    public boolean enConnect()  {
      try {
      userStoreTrans = new THttpClient(userStoreUrl);
      userStoreTrans.setCustomHeader("User-Agent", userAgent);
    } catch (TTransportException e) {
      QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, "Transport Excepton", e.getLocalizedMessage());
      mb.exec();
      e.printStackTrace();
    }
    userStoreProt = new TBinaryProtocol(userStoreTrans);
      userStore = new UserStore.Client(userStoreProt, userStoreProt);
      syncSignal.saveUserStore.emit(userStore);
      try {
      //authResult = userStore.authenticate(username, password, consumerKey, consumerSecret);
        user = userStore.getUser(authToken);
    } catch (EDAMUserException e) {
      QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, "Error", "Invalid Authorization");
      mb.exec();
      isConnected = false;
      return false;
    } catch (EDAMSystemException e) {
      QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, "EDAM System Excepton", e.getLocalizedMessage());
      mb.exec();
      e.printStackTrace();
      isConnected = false;
    } catch (TException e) {
      QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, "Transport Excepton", e.getLocalizedMessage());
      mb.exec();
      e.printStackTrace();
      isConnected = false;
    }
   
      boolean versionOk = false;
    try {
      versionOk = userStore.checkVersion("NixNote",
              com.evernote.edam.userstore.Constants.EDAM_VERSION_MAJOR,
                com.evernote.edam.userstore.Constants.EDAM_VERSION_MINOR);
    } catch (TException e) {
      e.printStackTrace();
      isConnected = false;
    }
      if (!versionOk) {
          System.err.println("Incomatible EDAM client protocol version");
          isConnected = false;
      }
      //if (authResult != null) {
        //user = authResult.getUser();
        //authToken = authResult.getAuthenticationToken();
      if (user == null || noteStoreUrlBase == null) {
        logger.log(logger.LOW, "Error retrieving user information.  Aborting.");
        System.err.println("Error retrieving user information.");
        isConnected = false
      QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, tr("Connection Error"), tr("Error retrieving user information.  Synchronization not complete"));
      mb.exec();
      return false;
       
      }
        noteStoreUrl = noteStoreUrlBase + user.getShardId();
        syncSignal.saveAuthToken.emit(authToken);
        syncSignal.saveNoteStore.emit(localNoteStore);
       
  
        try {
          noteStoreTrans = new THttpClient(noteStoreUrl);
          noteStoreTrans.setCustomHeader("User-Agent", userAgent);
        } catch (TTransportException e) {
          QMessageBox mb = new QMessageBox(QMessageBox.Icon.Critical, "Transport Excepton", e.getLocalizedMessage());
          mb.exec();
          e.printStackTrace();
          isConnected = false;
        }
        noteStoreProt = new TBinaryProtocol(noteStoreTrans);
        localNoteStore =
View Full Code Here

Examples of com.trolltech.qt.gui.QMessageBox

      os.writeObject(data);
      os.close();
    } catch (Exception e) {
      e.printStackTrace();
     
      QMessageBox errDialog = new QMessageBox(QMessageBox.Icon.Warning, "Unable to save minefield.", e.getMessage());
      errDialog.exec();
    }
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QMessageBox

      is.close();
      return result;
    } catch (Exception e) {
      e.printStackTrace();
     
      QMessageBox errDialog = new QMessageBox(QMessageBox.Icon.Warning, "Unable to load minefield.", e.getMessage());
      errDialog.exec();

      return null;
    }
  }
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.