|
OpenMW
|
Model for the region map. More...
#include <regionmap.hpp>
Classes | |
| struct | CellDescription |
Public Types | |
| enum | Role { Role_Region = Qt::UserRole, Role_CellId = Qt::UserRole+1 } |
Public Member Functions | |
| RegionMap (Data &data) | |
| 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 Qt::ItemFlags | flags (const QModelIndex &index) const |
Private Slots | |
| void | regionsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
| void | regionsInserted (const QModelIndex &parent, int start, int end) |
| void | regionsChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
| void | cellsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
| void | cellsInserted (const QModelIndex &parent, int start, int end) |
| void | cellsChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
Private Member Functions | |
| CellCoordinates | getIndex (const QModelIndex &index) const |
| Translates a Qt model index into a cell index (which can contain negative components) More... | |
| QModelIndex | getIndex (const CellCoordinates &index) const |
| CellCoordinates | getIndex (const Cell &cell) const |
| void | buildRegions () |
| void | buildMap () |
| void | addCell (const CellCoordinates &index, const CellDescription &description) |
| May be called on a cell that is already in the map (in which case an update is. More... | |
| void | addCells (int start, int end) |
| void | removeCell (const CellCoordinates &index) |
| May be called on a cell that is not in the map (in which case the call is ignored) More... | |
| void | addRegion (const std::string ®ion, unsigned int colour) |
| void | removeRegion (const std::string ®ion) |
| void | updateRegions (const std::vector< std::string > ®ions) |
| Update cells affected by the listed regions. More... | |
| void | updateSize () |
| std::pair< CellCoordinates, CellCoordinates > | getSize () const |
Private Attributes | |
| Data & | mData |
| std::map< CellCoordinates, CellDescription > | mMap |
| CellCoordinates | mMin |
| inclusive More... | |
| CellCoordinates | mMax |
| exclusive More... | |
| std::map< std::string, unsigned int > | mColours |
| region ID, colour (RGBA) More... | |
Model for the region map.
This class does not holds any record data (other than for the purpose of buffering).
| CSMWorld::RegionMap::RegionMap | ( | Data & | data | ) |
|
private |
May be called on a cell that is already in the map (in which case an update is.
|
private |
May be called on a region that is already listed (in which case an update is performed)
|
private |
|
private |
|
privateslot |
|
privateslot |
|
privateslot |
|
virtual |
|
virtual |
|
virtual |
|
private |
Translates a Qt model index into a cell index (which can contain negative components)
|
private |
|
private |
|
private |
|
privateslot |
|
privateslot |
|
privateslot |
|
private |
May be called on a cell that is not in the map (in which case the call is ignored)
|
private |
May be called on a region that is not listed (in which case the call is ignored)
|
virtual |
|
private |
Update cells affected by the listed regions.
|
private |
|
private |
region ID, colour (RGBA)
|
private |
|
private |
|
private |
exclusive
|
private |
inclusive
1.8.6