#include <Nepomuk/Utils/SimpleResourceModel>
A simple ResourceModel that handles a list of Resource instances which can be managed via the setResources(), addResource(), addResources(), and clear() methods. 
- Author
 - Sebastian Trueg trueg.nosp@m.@kde.nosp@m..org
 
- Since
 - 4.6 
 
Definition at line 47 of file simpleresourcemodel.h.
 
      
        
          | Nepomuk::Utils::SimpleResourceModel::SimpleResourceModel  | 
          ( | 
          QObject *  | 
          parent = 0 | ) | 
           | 
        
      
 
Creates an empty resource model. 
 
 
      
        
          | Nepomuk::Utils::SimpleResourceModel::~SimpleResourceModel  | 
          ( | 
           | ) | 
           | 
        
      
 
 
  
  
      
        
          | void Nepomuk::Utils::SimpleResourceModel::addResource  | 
          ( | 
          const Nepomuk::Resource &  | 
          resource | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
Add resource to the list of resources being provided by the model. 
 
 
  
  
      
        
          | void Nepomuk::Utils::SimpleResourceModel::addResources  | 
          ( | 
          const QList< Nepomuk::Resource > &  | 
          resources | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
Add resources to the list of resources being provided by the model. 
 
 
This method is similar to addResource(). 
It is provided for allowing convenient connections from signals that provide Query::Result objects. 
 
 
This method is similar to addResources(). 
It is provided for allowing convenient connections from signals that provide Query::Result objects like Query::QueryServiceClient::newResults(). 
 
 
  
  
      
        
          | void Nepomuk::Utils::SimpleResourceModel::clear  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
Clear the model by removing all resources added via setResources() and friends. 
 
 
      
        
          | QModelIndex Nepomuk::Utils::SimpleResourceModel::index  | 
          ( | 
          int  | 
          row,  | 
        
        
           | 
           | 
          int  | 
          column,  | 
        
        
           | 
           | 
          const QModelIndex &  | 
          parent = QModelIndex()  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Creates an index for the cell at row and column. 
 
 
  
  
      
        
          | QModelIndex Nepomuk::Utils::SimpleResourceModel::indexForResource  | 
          ( | 
          const Resource &  | 
          res | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
 
      
        
          | bool Nepomuk::Utils::SimpleResourceModel::removeRows  | 
          ( | 
          int  | 
          row,  | 
        
        
           | 
           | 
          int  | 
          count,  | 
        
        
           | 
           | 
          const QModelIndex &  | 
          parent = QModelIndex()  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Removes those resources from the model. 
 
 
  
  
      
        
          | Resource Nepomuk::Utils::SimpleResourceModel::resourceForIndex  | 
          ( | 
          const QModelIndex &  | 
          index | ) | 
           const | 
         
       
   | 
  
virtual   | 
  
 
Get the index for a resource. 
- Returns
 - The index which corresponds to 
res of an invalid QModelIndex if res is not part of this model.  
Implements Nepomuk::Utils::ResourceModel.
 
 
      
        
          | int Nepomuk::Utils::SimpleResourceModel::rowCount  | 
          ( | 
          const QModelIndex &  | 
          parent = QModelIndex() | ) | 
           const | 
        
      
 
- Returns
 - The number of resources added to the model for an invalid parent index. 
 
 
 
  
  
      
        
          | void Nepomuk::Utils::SimpleResourceModel::setResources  | 
          ( | 
          const QList< Nepomuk::Resource > &  | 
          resources | ) | 
           | 
         
       
   | 
  
slot   | 
  
 
Set the resources to be provided by the model to resources. 
 
 
This method is similar to setResources(). 
It is provided for allowing convenient connections from signals that provide Query::Result objects. 
 
 
The documentation for this class was generated from the following file:
 
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:03 by
doxygen 1.8.7 written
by 
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.