Examples of QIcon


Examples of com.trolltech.qt.gui.QIcon

  private QAction action(String name, String image, Object shortcut,
      String slot, QMenu menu, QToolBar toolBar) {
    QAction a = new QAction(name, this);

    if (image != null)
      a.setIcon(new QIcon(rsrcPath + File.separator + image + ".png"));
    if (menu != null)
      menu.addAction(a);
    if (toolBar != null)
      toolBar.addAction(a);
    if (slot != null)
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

      return note.getAttributes().getAuthor();
    if (col == Global.noteTableSourceUrlPosition)
      return note.getAttributes().getSourceURL();
    if (col == Global.noteTableSynchronizedPosition) {
      String iconPath = new String("classpath:cx/fbn/nevernote/icons/");
      QIcon dotIcon = new QIcon(iconPath+"dot.png");
      String guid = note.getGuid();
      if (metaData.containsKey(guid) && metaData.get(guid).isDirty())
        return dotIcon;
      return null;
    }
    if (col == Global.noteTablePinnedPosition) {
      String guid = note.getGuid();
      if (metaData.containsKey(guid) && metaData.get(guid).isPinned()) {
        String iconPath = new String("classpath:cx/fbn/nevernote/icons/");
        QIcon dotIcon = new QIcon(iconPath+"dot.png");
        return dotIcon;
      }
      return null;
    }
    if (col == Global.noteTableTagPosition) {
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

    List<String> colorNames = QColor.colorNames();
    for(int i=0; i<colorNames.size(); i++) {
      QColor color = new QColor(colorNames.get(i));
      QPixmap pix = new QPixmap(new QSize(22, 22));
      pix.fill(color);
      QAction newAction = new QAction(new QIcon(pix), "", parent);
      newAction.setToolTip(colorNames.get(i));
      newAction.setText(colorNames.get(i));
      newAction.hovered.connect(this, "itemHovered()");
      menu.addAction(newAction);
    }
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

  // Insert a new tag into the tree.  This is used when we dynamically add a
  // new tag after the full tag tree has been built.  It only adds to the
  // top level.
  public void insertTag(String name, String guid) {
      String iconPath = new String("classpath:cx/fbn/nevernote/icons/");
    QIcon icon = new QIcon(iconPath+"tag.png");
    NTreeWidgetItem child;
    Qt.Alignment ra = new Qt.Alignment(Qt.AlignmentFlag.AlignRight);
   
    // Build new tag & add it
    child = new NTreeWidgetItem();
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

      sortItems(0, SortOrder.AscendingOrder);
  }
 
  private QIcon findDefaultIcon(String guid) {
      String iconPath = new String("classpath:cx/fbn/nevernote/icons/");
    QIcon icon = new QIcon(iconPath+"tag.png");
    QIcon linkedIcon = new QIcon(iconPath+"tag-orange.png");

    if (db.getTagTable().getNotebookGuid(guid) == null ||
        db.getTagTable().getNotebookGuid(guid).equals(""))
      return icon;
    else
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

     
      //Clear out the tree & reload
      clear();
      String iconPath = new String("classpath:cx/fbn/nevernote/icons/");
    QIcon icon = new QIcon(iconPath+"tag.png");
     
    Qt.Alignment ra = new Qt.Alignment(Qt.AlignmentFlag.AlignRight);
 
    // Create a copy.  We delete them out as they are found
    List<Tag> tempList = new ArrayList<Tag>();
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

      logger.log(logger.EXTREME, "Error finding system icon.");
    if (!query.next() || query.getBlob(0) == null)
      return null;
   
    QByteArray blob = new QByteArray(query.getBlob(0));
    QIcon icon = new QIcon(QPixmap.fromImage(QImage.fromData(blob)));
    return icon;
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

      logger.log(logger.EXTREME, "Error executing "+dbName+" getAllIcons select.");
    while (query.next()) {
      if (query.getBlob(1) != null) {
        String guid = query.valueString(0);
        QByteArray blob = new QByteArray(query.getBlob(1));
        QIcon icon = new QIcon(QPixmap.fromImage(QImage.fromData(blob)));
        values.put(guid, icon);
      }
    }
    return values;
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

      logger.log(logger.EXTREME, "Error finding "+dbName+" icon.");
    if (!query.next() || query.getBlob(0) == null)
      return null;
   
    QByteArray blob = new QByteArray(query.getBlob(0));
    QIcon icon = new QIcon(QPixmap.fromImage(QImage.fromData(blob)));
    return icon;
  }
View Full Code Here

Examples of com.trolltech.qt.gui.QIcon

          }   
          if (reader.name().equalsIgnoreCase("Icon")) {
            byte[] b = textValue().getBytes();   // data binary
            QByteArray hexData = new QByteArray(b);
            QByteArray binData = new QByteArray(QByteArray.fromHex(hexData));
            notebookIcon = new QIcon(QPixmap.fromImage(QImage.fromData(binData)));
          }
          if (reader.name().equalsIgnoreCase("Stack"))
            notebook.setStack(textValue());
        }
      }
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.