Package cx.fbn.nevernote.dialog

Examples of cx.fbn.nevernote.dialog.SetIcon


    currentSelection = selections.get(0)
    String guid = currentSelection.text(2);

    QIcon currentIcon = currentSelection.icon(0);
    QIcon icon = conn.getTagTable().getIcon(guid);
    SetIcon dialog;
    if (icon == null) {
      dialog = new SetIcon(currentIcon, saveLastPath);
      dialog.setUseDefaultIcon(true);
    } else {
      dialog = new SetIcon(icon, saveLastPath);
      dialog.setUseDefaultIcon(false);
    }
    dialog.exec();
    if (dialog.okPressed()) {
        saveLastPath = dialog.getPath();
      QIcon newIcon = dialog.getIcon();
      conn.getTagTable().setIcon(guid, newIcon, dialog.getFileType());
      if (newIcon == null)
        newIcon = new QIcon(iconPath+"tag.png");
      currentSelection.setIcon(0, newIcon);
    }
 
View Full Code Here


    currentSelection = selections.get(0)
    String guid = currentSelection.text(1);

    QIcon currentIcon = currentSelection.icon(0);
    QIcon icon = conn.getSavedSearchTable().getIcon(guid);
    SetIcon dialog;
    if (icon == null) {
      dialog = new SetIcon(currentIcon, saveLastPath);
      dialog.setUseDefaultIcon(true);
    } else {
      dialog = new SetIcon(icon, saveLastPath);
      dialog.setUseDefaultIcon(false);
    }
    dialog.exec();
    if (dialog.okPressed()) {
        saveLastPath = dialog.getPath();
      QIcon newIcon = dialog.getIcon();
      conn.getSavedSearchTable().setIcon(guid, newIcon, dialog.getFileType());
      if (newIcon == null)
        newIcon = new QIcon(iconPath+"search.png");
      currentSelection.setIcon(0, newIcon);
    }
 
View Full Code Here

    if (guid.equalsIgnoreCase("STACK"))
      stackSelected = true;

    QIcon currentIcon = currentSelection.icon(0);
    QIcon icon;
    SetIcon dialog;
   
    if (!stackSelected && !allNotebookSelected) {
      icon = conn.getNotebookTable().getIcon(guid);
      if (icon == null) {
        dialog = new SetIcon(currentIcon, saveLastPath);
        dialog.setUseDefaultIcon(true);
      } else {
        dialog = new SetIcon(icon, saveLastPath);
        dialog.setUseDefaultIcon(false);
      }
    } else {
      if (stackSelected) {
        icon = conn.getSystemIconTable().getIcon(currentSelection.text(0), "STACK");
      } else {
        icon = conn.getSystemIconTable().getIcon(currentSelection.text(0), "ALLNOTEBOOK");       
      }
      if (icon == null) {
        dialog = new SetIcon(currentIcon, saveLastPath);
        dialog.setUseDefaultIcon(true);
      } else {
        dialog = new SetIcon(icon, saveLastPath);
        dialog.setUseDefaultIcon(false);
      }
    }
    dialog.exec();
    if (dialog.okPressed()) {
        saveLastPath = dialog.getPath();

      QIcon newIcon = dialog.getIcon();
      if (stackSelected) {
        conn.getSystemIconTable().setIcon(currentSelection.text(0), "STACK", newIcon, dialog.getFileType());
        if (newIcon == null) {
          newIcon = new QIcon(iconPath+"books2.png");
        }
        currentSelection.setIcon(0,newIcon);
        return;
      }
      if (allNotebookSelected) {
        conn.getSystemIconTable().setIcon(currentSelection.text(0), "ALLNOTEBOOK", newIcon, dialog.getFileType());
        if (newIcon == null) {
          newIcon = new QIcon(iconPath+"notebook-green.png");
        }
        currentSelection.setIcon(0,newIcon);
        return;
      }
      conn.getNotebookTable().setIcon(guid, newIcon, dialog.getFileType());
      if (newIcon == null) {
        boolean isPublished = false;;
        boolean found = false;
        for (int i=0; i<listManager.getNotebookIndex().size() && !found; i++) {
          if (listManager.getNotebookIndex().get(i).getGuid().equals(guid)) {
View Full Code Here

TOP

Related Classes of cx.fbn.nevernote.dialog.SetIcon

Copyright © 2018 www.massapicom. 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.