Package com.trolltech.qt.core

Examples of com.trolltech.qt.core.QModelIndex


    private void switchToNetTab(String data){
      if(data.equals("")) return;
      explorer.tabs.setCurrentWidget(explorer.netWindow);
    for(int i = 0; i < explorer.netWindow.proxyModel.rowCount(); i++){
      if(explorer.netWindow.proxyModel.data(i, 0).toString().equals(data)){
        QModelIndex dstIndex = explorer.netWindow.proxyModel.index(i, 0);
        explorer.netWindow.view.scrollTo(dstIndex,ScrollHint.PositionAtCenter);
        explorer.netWindow.selectionModel.setCurrentIndex(dstIndex, QItemSelectionModel.SelectionFlag.SelectCurrent);
      }
    }
    }
View Full Code Here


    private void switchToInstanceTab(String data){
      if(data.equals("")) return;
      explorer.tabs.setCurrentWidget(explorer.instanceWindow);
    for(int i = 0; i < explorer.instanceWindow.proxyModel.rowCount(); i++){
      if(explorer.instanceWindow.proxyModel.data(i, 0).toString().equals(data)){
        QModelIndex dstIndex = explorer.instanceWindow.proxyModel.index(i, 0);
        explorer.instanceWindow.view.scrollTo(dstIndex,ScrollHint.PositionAtCenter);
        explorer.instanceWindow.selectionModel.setCurrentIndex(dstIndex, QItemSelectionModel.SelectionFlag.SelectCurrent);
      }
    }
    }
View Full Code Here

    private void switchToModuleTab(String data){
      if(data.equals("")) return;
      explorer.tabs.setCurrentWidget(explorer.moduleWindow);
    for(int i = 0; i < explorer.moduleWindow.proxyModel.rowCount(); i++){
      if(explorer.moduleWindow.proxyModel.data(i, 0).toString().equals(data)){
        QModelIndex dstIndex = explorer.moduleWindow.proxyModel.index(i, 0);
        explorer.moduleWindow.view.scrollTo(dstIndex,ScrollHint.PositionAtCenter);
        explorer.moduleWindow.selectionModel.setCurrentIndex(dstIndex, QItemSelectionModel.SelectionFlag.SelectCurrent);
      }
    }
    }
View Full Code Here

    private void switchToModuleInstanceTab(String data){
      if(data.equals("")) return;
      explorer.tabs.setCurrentWidget(explorer.moduleInstanceWindow);
    for(int i = 0; i < explorer.moduleInstanceWindow.proxyModel.rowCount(); i++){
      if(explorer.moduleInstanceWindow.proxyModel.data(i, 0).toString().equals(data)){
        QModelIndex dstIndex = explorer.moduleInstanceWindow.proxyModel.index(i, 0);
        explorer.moduleInstanceWindow.view.scrollTo(dstIndex,ScrollHint.PositionAtCenter);
        explorer.moduleInstanceWindow.selectionModel.setCurrentIndex(dstIndex, QItemSelectionModel.SelectionFlag.SelectCurrent);
      }
    }     
    }
View Full Code Here

  // Update a note title
  public void updateNoteTitle(String guid, String title) {
    for (int i=0; i<getMasterNoteIndex().size(); i++) {
      if (getMasterNoteIndex().get(i).getGuid().equals(guid)) {
        getMasterNoteIndex().get(i).setTitle(title);
        QModelIndex idx = createIndex(i, Global.noteTableTitlePosition, nativePointer());
        setData(idx, title, Qt.ItemDataRole.EditRole);
        i = getMasterNoteIndex().size();
     
    }
    // Update the list tables
View Full Code Here

          display = display+names.get(j);
          if (j+2<names.size()) {
            display = display+Global.tagDelimeter+" ";
          }
        }
        QModelIndex idx = createIndex(i, Global.noteTableTagPosition, nativePointer());
        setData(idx, display, Qt.ItemDataRole.EditRole);
        i = getMasterNoteIndex().size();
     
    }
  }
View Full Code Here

  public void updateNoteCreatedDate(String guid, QDateTime date) {
   
    for (int i=0; i<getMasterNoteIndex().size(); i++) {
      if (getMasterNoteIndex().get(i).getGuid().equals(guid)) {
        getMasterNoteIndex().get(i).setCreated((long)date.toTime_t()*1000);
        QModelIndex idx = createIndex(i, Global.noteTableCreationPosition, nativePointer());
        setData(idx, new Long(getMasterNoteIndex().get(i).getCreated()), Qt.ItemDataRole.EditRole);
        i = getMasterNoteIndex().size();
     
    }
   
View Full Code Here

  public void updateNoteSubjectDate(String guid, QDateTime date) {
   
    for (int i=0; i<getMasterNoteIndex().size(); i++) {
      if (getMasterNoteIndex().get(i).getGuid().equals(guid)) {
        getMasterNoteIndex().get(i).getAttributes().setSubjectDate((long)date.toTime_t()*1000);
        QModelIndex idx = createIndex(i, Global.noteTableSubjectDatePosition, nativePointer());
        setData(idx, new Long(getMasterNoteIndex().get(i).getAttributes().getSubjectDate()), Qt.ItemDataRole.EditRole);
        i = getMasterNoteIndex().size();
     
    }
   
View Full Code Here

 
  public void updateNoteChangedDate(String guid, QDateTime date) {
    for (int i=0; i<getMasterNoteIndex().size(); i++) {
      if (getMasterNoteIndex().get(i).getGuid().equals(guid)) {
        getMasterNoteIndex().get(i).setUpdated((long)date.toTime_t()*1000);
        QModelIndex idx = createIndex(i, Global.noteTableChangedPosition, nativePointer());
        setData(idx, new Long(getMasterNoteIndex().get(i).getAttributes().getSubjectDate()), Qt.ItemDataRole.EditRole);
        i = getMasterNoteIndex().size();
     
    }
    // Update the list tables
View Full Code Here

      if (getMasterNoteIndex().get(i).getGuid().equals(guid)) {
        getMasterNoteIndex().get(i).setNotebookGuid(notebookGuid);
        for (int j=0; j<listManager.getNotebookIndex().size(); j++) {
          if (listManager.getNotebookIndex().get(j).getGuid().equals(notebookGuid)) {
            String name = listManager.getNotebookIndex().get(j).getName();
            QModelIndex idx = createIndex(i, Global.noteTableNotebookPosition, nativePointer());
            setData(idx, name, Qt.ItemDataRole.EditRole);
            j=listManager.getNotebookIndex().size();
          }
        }
        i=getMasterNoteIndex().size();
View Full Code Here

TOP

Related Classes of com.trolltech.qt.core.QModelIndex

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.