Examples of QModelIndex


Examples of com.trolltech.qt.core.QModelIndex

  private void updateListAuthor(String guid, String author) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListAuthor");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        //QModelIndex modelIndex =  noteTableView.proxyModel.index(i, Global.noteTableGuidPosition);
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(guid)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableAuthorPosition,author);
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

  private void updateListSourceUrl(String guid, String url) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListAuthor");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        //QModelIndex modelIndex =  noteTableView.proxyModel.index(i, Global.noteTableGuidPosition);
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
//          SortedMap<Integer, Object> ix = noteTableView.proxyModel.itemData(modelIndex);
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(guid)) {
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

  @SuppressWarnings("unused")
  private void updateListGuid(String oldGuid, String newGuid) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListTitle");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(oldGuid)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableGuidPosition,newGuid);
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

    for (int j=0; j<listManager.getNoteIndex().size(); j++) {
      if (listManager.getNoteIndex().get(j).getTagGuids().contains(guid)) {
        String newName = listManager.getTagNamesForNote(listManager.getNoteIndex().get(j));

        for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
          QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
          if (modelIndex != null) {
            SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
            String noteGuid = (String)ix.values().toArray()[0];
            if (noteGuid.equalsIgnoreCase(listManager.getNoteIndex().get(j).getGuid())) {
              listManager.getNoteTableModel().setData(i, Global.noteTableTagPosition, newName);
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

            listManager.getNoteIndex().get(j).getTagGuids().remove(i);
        }
       
        String newName = listManager.getTagNamesForNote(listManager.getNoteIndex().get(j));
        for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
          QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
          if (modelIndex != null) {
            SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
            String noteGuid = (String)ix.values().toArray()[0];
            if (noteGuid.equalsIgnoreCase(listManager.getNoteIndex().get(j).getGuid())) {
              listManager.getNoteTableModel().setData(i, Global.noteTableTagPosition, newName);
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

    }
    private void updateListNotebookName(String oldName, String newName) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListNotebookName");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableNotebookPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableName =  (String)ix.values().toArray()[0];
          if (tableName.equalsIgnoreCase(oldName)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableNotebookPosition, newName);
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

    @SuppressWarnings("unused")
  private void updateListDateCreated(String guid, QDateTime date) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListDateCreated");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(guid)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableCreationPosition, date.toString(Global.getDateFormat()+" " +Global.getTimeFormat()));
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

    @SuppressWarnings("unused")
  private void updateListDateSubject(String guid, QDateTime date) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListDateSubject");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(guid)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableSynchronizedPosition, "false");
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

    }
  private void updateListDateChanged(String guid, QDateTime date) {
      logger.log(logger.HIGH, "Entering NeverNote.updateListDateChanged");

      for (int i=0; i<listManager.getNoteTableModel().rowCount(); i++) {
        QModelIndex modelIndex =  listManager.getNoteTableModel().index(i, Global.noteTableGuidPosition);
        if (modelIndex != null) {
          SortedMap<Integer, Object> ix = listManager.getNoteTableModel().itemData(modelIndex);
          String tableGuid =  (String)ix.values().toArray()[0];
          if (tableGuid.equals(guid)) {
            listManager.getNoteTableModel().setData(i, Global.noteTableSynchronizedPosition, "false");
View Full Code Here

Examples of com.trolltech.qt.core.QModelIndex

  private void scrollToCurrentGuid() {
      //scrollToGuid(currentNoteGuid);
      List<QModelIndex> selections = noteTableView.selectionModel().selectedRows();
      if (selections.size() == 0)
        return;
      QModelIndex index = selections.get(0);
      int row = selections.get(0).row();
      String guid = (String)index.model().index(row, Global.noteTableGuidPosition).data();
      scrollToGuid(guid);
    }
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.