#ifndef CSM_WOLRD_REGIONMAP_H #define CSM_WOLRD_REGIONMAP_H #include #include #include namespace CSMWorld { /// \brief Model for the region map /// /// This class does not holds any record data (other than for the purpose of buffering). class RegionMap : public QAbstractTableModel { std::map, std::string> mMap; ///< cell index, region std::pair mMin; ///< inclusive std::pair mMax; ///< exclusive std::map mColours; ///< region ID, colour (RGBA) std::pair getIndex (const QModelIndex& index) const; ///< Translates a Qt model index into a cell index (which can contain negative components) public: RegionMap(); 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; }; } #endif