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

#include <idtree.hpp>

Inheritance diagram for CSMWorld::IdTree:
Collaboration diagram for CSMWorld::IdTree:

Signals

void resetStart (const QString &id)
 
void resetEnd (const QString &id)
 

Public Member Functions

 IdTree (NestedCollection *nestedCollection, CollectionBase *idCollection, unsigned int features=0)
 The ownerships of nestedCollecton and idCollection are not transferred. More...
 
virtual ~IdTree ()
 
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 bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
virtual QModelIndex parent (const QModelIndex &index) const
 
QModelIndex getNestedModelIndex (const std::string &id, int column) const
 
QVariant nestedHeaderData (int section, int subSection, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
NestedTableWrapperBasenestedTable (const QModelIndex &index) const
 
void setNestedTable (const QModelIndex &index, const NestedTableWrapperBase &nestedTable)
 
void addNestedRow (const QModelIndex &parent, int position)
 
virtual bool hasChildren (const QModelIndex &index) const
 
virtual int searchNestedColumnIndex (int parentColumn, Columns::ColumnId id)
 
virtual int findNestedColumnIndex (int parentColumn, Columns::ColumnId id)
 
- Public Member Functions inherited from CSMWorld::IdTable
 IdTable (CollectionBase *idCollection, unsigned int features=0)
 The ownership of idCollection is not transferred. More...
 
virtual ~IdTable ()
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
void addRecord (const std::string &id, UniversalId::Type type=UniversalId::Type_None)
 
void addRecordWithData (const std::string &id, const std::map< int, QVariant > &data, UniversalId::Type type=UniversalId::Type_None)
 
void cloneRecord (const std::string &origin, const std::string &destination, UniversalId::Type type=UniversalId::Type_None)
 
virtual QModelIndex getModelIndex (const std::string &id, int column) const
 This method can return only indexes to the top level table cells. More...
 
void setRecord (const std::string &id, const RecordBase &record, UniversalId::Type type=UniversalId::Type_None)
 Add record or overwrite existing record. More...
 
const RecordBasegetRecord (const std::string &id) const
 
virtual int searchColumnIndex (Columns::ColumnId id) const
 Return index of column with the given id. If no such column exists, -1 is returned. More...
 
virtual int findColumnIndex (Columns::ColumnId id) const
 
void reorderRows (int baseIndex, const std::vector< int > &newOrder)
 
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 Member Functions

 IdTree (const IdTree &)
 
IdTreeoperator= (const IdTree &)
 
unsigned int foldIndexAddress (const QModelIndex &index) const
 
std::pair< int, intunfoldIndexAddress (unsigned int id) const
 

Private Attributes

NestedCollectionmNestedCollection
 

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
}
 
- Protected Member Functions inherited from CSMWorld::IdTable
virtual CollectionBaseidCollection () const
 

Constructor & Destructor Documentation

CSMWorld::IdTree::IdTree ( const IdTree )
private
CSMWorld::IdTree::IdTree ( NestedCollection nestedCollection,
CollectionBase idCollection,
unsigned int  features = 0 
)

The ownerships of nestedCollecton and idCollection are not transferred.

CSMWorld::IdTree::~IdTree ( )
virtual

Member Function Documentation

void CSMWorld::IdTree::addNestedRow ( const QModelIndex &  parent,
int  position 
)

Here is the call graph for this function:

int CSMWorld::IdTree::columnCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

Here is the caller graph for this function:

QVariant CSMWorld::IdTree::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

Here is the caller graph for this function:

int CSMWorld::IdTree::findNestedColumnIndex ( int  parentColumn,
Columns::ColumnId  id 
)
virtual
Returns
the column index or throws an exception if the requested column wasn't found.

Here is the caller graph for this function:

Qt::ItemFlags CSMWorld::IdTree::flags ( const QModelIndex &  index) const
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

unsigned int CSMWorld::IdTree::foldIndexAddress ( const QModelIndex &  index) const
private
QModelIndex CSMWorld::IdTree::getNestedModelIndex ( const std::string &  id,
int  column 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

bool CSMWorld::IdTree::hasChildren ( const QModelIndex &  index) const
virtual
QModelIndex CSMWorld::IdTree::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
virtual

Reimplemented from CSMWorld::IdTable.

Here is the caller graph for this function:

QVariant CSMWorld::IdTree::nestedHeaderData ( int  section,
int  subSection,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

CSMWorld::NestedTableWrapperBase * CSMWorld::IdTree::nestedTable ( const QModelIndex &  index) const
IdTree& CSMWorld::IdTree::operator= ( const IdTree )
private
QModelIndex CSMWorld::IdTree::parent ( const QModelIndex &  index) const
virtual

Reimplemented from CSMWorld::IdTable.

bool CSMWorld::IdTree::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

void CSMWorld::IdTree::resetEnd ( const QString &  id)
signal
void CSMWorld::IdTree::resetStart ( const QString &  id)
signal
int CSMWorld::IdTree::rowCount ( const QModelIndex &  parent = QModelIndex()) const
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

int CSMWorld::IdTree::searchNestedColumnIndex ( int  parentColumn,
Columns::ColumnId  id 
)
virtual
Returns
the column index or -1 if the requested column wasn't found.
bool CSMWorld::IdTree::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
virtual

Reimplemented from CSMWorld::IdTable.

Here is the call graph for this function:

Here is the caller graph for this function:

void CSMWorld::IdTree::setNestedTable ( const QModelIndex &  index,
const NestedTableWrapperBase nestedTable 
)

Here is the call graph for this function:

std::pair< int, int > CSMWorld::IdTree::unfoldIndexAddress ( unsigned int  id) const
private

Member Data Documentation

NestedCollection* CSMWorld::IdTree::mNestedCollection
private

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