Examples of QByteArray


Examples of com.trolltech.qt.core.QByteArray

      if (hash.equalsIgnoreCase(oldHash)) {
        String newSegment = oldSegment.replace(oldHash, newHash);
        String content = browser.getContent().substring(0,position) +
                         newSegment +
                         browser.getContent().substring(endPos);
        browser.setContent(new QByteArray(content));;
      }
     
      position = browser.getContent().indexOf("en-tag=\"en-media\" guid=\""+guid+"\" type=", position+1);
    }
  }
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray

    if (event.source() == this) {
      if (Global.tagBehavior().equals("HideInactiveCount")) {
        event.ignore();
        return;
      }
      event.mimeData().setData("application/x-nevernote-tag", new QByteArray(currentItem().text(2)));
      event.accept();
      return;
    }
    event.ignore();
  }
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray

  }

  @Override
  public boolean dropMimeData(QTreeWidgetItem parent, int index, QMimeData data, Qt.DropAction action) {
    if (data.hasFormat("application/x-nevernote-tag")) {
      QByteArray d = data.data("application/x-nevernote-tag");
      String current = d.toString();
     
      // Check we don't do a dumb thing like move a parent to a child of itself
      if (!checkParent(parent, current))
        return false;
      QTreeWidgetItem newChild;
      if (parent == null) {
//        tagSignal.changeParent.emit(current, "");
        db.getTagTable().updateTagParent(current, "");
        newChild = new QTreeWidgetItem(this);
      } else {
//        tagSignal.changeParent.emit(current, parent.text(2));
        db.getTagTable().updateTagParent(current, parent.text(2));
        newChild = new QTreeWidgetItem(parent);
      }
      copyTreeItem(currentItem(), newChild);
      currentItem().setHidden(true);
      sortItems(0, SortOrder.AscendingOrder);
      return true;
    }
   
    // If we are dropping a note
    if (data.hasFormat("application/x-nevernote-note")) {
      String notebookGuid = db.getTagTable().getNotebookGuid(parent.text(2));
      QByteArray d = data.data("application/x-nevernote-note");
      String s = d.toString();
      String noteGuidArray[] = s.split(" ");
      for (String element : noteGuidArray) {
        Note n = db.getNoteTable().getNote(element.trim(), false, false, false, false, false);
       
        // Check that...
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray

    if (!query.exec())
      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.core.QByteArray

          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":name", name);
    query.bindValue(":type", rectype);
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray

          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, filetype.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":name", name);
    query.bindValue(":type", rectype);
View Full Code Here

Examples of com.trolltech.qt.core.QByteArray

    if (!query.exec("SELECT guid, icon from "+dbName+" where ARCHIVED  != true"))
      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.core.QByteArray

    if (!query.exec())
      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.core.QByteArray

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

Examples of com.trolltech.qt.core.QByteArray

          }
          QPixmap p = icon.pixmap(32, 32);
          QImage i = p.toImage();
           i.save(buffer, type.toUpperCase());
           buffer.close();
           QByteArray b = new QByteArray(buffer.buffer());
           if (!b.isNull() && !b.isEmpty())
             query.bindValue(":icon", b.toByteArray());
           else
             return;
    }
    query.bindValue(":guid", guid);
    if (!query.exec())
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.