Examples of QAbstractItemModel


Examples of com.trolltech.qt.core.QAbstractItemModel

            super(parent);
        }
        @Override
        protected boolean filterAcceptsRow(int sourceRow, QModelIndex sourceParent){
            QRegExp filter = filterRegExp();
            QAbstractItemModel model = sourceModel();
            boolean matchFound = false;

            for(int i=0; i < model.columnCount(); i++){
              Object data = model.data(sourceModel().index(sourceRow, i, sourceParent));
              matchFound |= data != null && filter.indexIn(data.toString()) != -1;
            }
            return matchFound;
        }
View Full Code Here

Examples of com.trolltech.qt.core.QAbstractItemModel

  public void filter() {
    invalidateFilter();
  }
  @Override
  protected boolean filterAcceptsRow(int sourceRow, QModelIndex sourceParent) {
    QAbstractItemModel model = sourceModel();
    QModelIndex guidIndex = sourceModel().index(sourceRow, Global.noteTableGuidPosition);
    String guid = (String)model.data(guidIndex);
   
    if (guids.containsKey(guid) || pinnedGuids.containsKey(guid))
      return true;
    else
      return false;
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.