OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
CSMWorld::ResourceTable Class Reference

#include <resourcetable.hpp>

Inheritance diagram for CSMWorld::ResourceTable:
Collaboration diagram for CSMWorld::ResourceTable:

Public Member Functions

 ResourceTable (const Resources *resources, unsigned int features=0)
 
virtual ~ResourceTable ()
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual QModelIndex parent (const QModelIndex &index) const
 
virtual QModelIndex getModelIndex (const std::string &id, int column) const
 
virtual int searchColumnIndex (Columns::ColumnId id) const
 
virtual int findColumnIndex (Columns::ColumnId id) const
 
virtual std::pair< UniversalId,
std::string > 
view (int row) const
 
virtual bool isDeleted (const std::string &id) const
 Is id flagged as deleted? More...
 
virtual int getColumnId (int column) const
 
- Public Member Functions inherited from CSMWorld::IdTableBase
 IdTableBase (unsigned int features)
 
unsigned int getFeatures () const
 

Private Attributes

const ResourcesmResources
 

Additional Inherited Members

- Public Types inherited from CSMWorld::IdTableBase
enum  Features {
  Feature_ReorderWithinTopic = 1, Feature_ViewId = 2, Feature_ViewCell = 4, Feature_View = Feature_ViewId | Feature_ViewCell,
  Feature_Preview = 8, Feature_Constant = 16
}
 

Constructor & Destructor Documentation

CSMWorld::ResourceTable::ResourceTable ( const Resources resources,
unsigned int  features = 0 
)
Note
The feature Feature_Constant will be added implicitly.
CSMWorld::ResourceTable::~ResourceTable ( )
virtual

Member Function Documentation

int CSMWorld::ResourceTable::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual
QVariant CSMWorld::ResourceTable::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual
int CSMWorld::ResourceTable::findColumnIndex ( Columns::ColumnId  id) const
virtual

Return index of column with the given id. If no such column exists, an exception is thrown.

Implements CSMWorld::IdTableBase.

Qt::ItemFlags CSMWorld::ResourceTable::flags ( const QModelIndex &  index) const
virtual
int CSMWorld::ResourceTable::getColumnId ( int  column) const
virtual

Implements CSMWorld::IdTableBase.

QModelIndex CSMWorld::ResourceTable::getModelIndex ( const std::string &  id,
int  column 
) const
virtual

Implements CSMWorld::IdTableBase.

QVariant CSMWorld::ResourceTable::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
virtual

Here is the call graph for this function:

QModelIndex CSMWorld::ResourceTable::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual
bool CSMWorld::ResourceTable::isDeleted ( const std::string &  id) const
virtual

Is id flagged as deleted?

Implements CSMWorld::IdTableBase.

QModelIndex CSMWorld::ResourceTable::parent ( const QModelIndex &  index) const
virtual
int CSMWorld::ResourceTable::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual
int CSMWorld::ResourceTable::searchColumnIndex ( Columns::ColumnId  id) const
virtual

Return index of column with the given id. If no such column exists, -1 is returned.

Implements CSMWorld::IdTableBase.

bool CSMWorld::ResourceTable::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual
std::pair< CSMWorld::UniversalId, std::string > CSMWorld::ResourceTable::view ( int  row) const
virtual

Return the UniversalId and the hint for viewing row. If viewing is not supported by this table, return (UniversalId::Type_None, "").

Implements CSMWorld::IdTableBase.

Member Data Documentation

const Resources* CSMWorld::ResourceTable::mResources
private

The documentation for this class was generated from the following files: