diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-01-18 17:57:54 -0500 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-01-18 17:57:54 -0500 |
commit | 43198c6d82561e4af9401ac7cec793e50189711d (patch) | |
tree | 0d01916bd902e87dab52abb66a31b70f7ffd78af /sigmod/MapTile.h | |
parent | a77b099ce425299c3de1c3e1e9c067f97425c003 (diff) | |
download | sigen-43198c6d82561e4af9401ac7cec793e50189711d.tar.gz sigen-43198c6d82561e4af9401ac7cec793e50189711d.tar.xz sigen-43198c6d82561e4af9401ac7cec793e50189711d.zip |
Added MapTile documentation
Diffstat (limited to 'sigmod/MapTile.h')
-rw-r--r-- | sigmod/MapTile.h | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/sigmod/MapTile.h b/sigmod/MapTile.h index 63e40b70..30cadf61 100644 --- a/sigmod/MapTile.h +++ b/sigmod/MapTile.h @@ -15,6 +15,10 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ +/** + * \file sigmod/MapTile.h + */ + #ifndef SIGMOD_MAPTILE #define SIGMOD_MAPTILE @@ -23,27 +27,102 @@ namespace Sigmod { +/** + * \class Sigmod::MapTile MapTile.h sigmod/MapTile.h + * \brief Class describing a tile on a map. + * + * All tiles for a map must be declared with an instance of this class. + */ class SIGMOD_EXPORT MapTile : public Object { Q_OBJECT public: + /** + * Copy constructor. + * + * \param tile The tile to copy. + */ MapTile(const MapTile& tile); + /** + * Create a new tile belonging to \p parent and id \p id. + * + * \param parent The parent of the tile. + * \param id The id number for the tile. + */ MapTile(const Map* parent, const int id); + /** + * Data copy constructor. Copies the data from \p tile as a child of \p parent with id \p id. + * + * \param tile The tile to copy the data from. + * \param parent The parent of the tile. + * \param id The id number for the tile. + */ MapTile(const MapTile& tile, const Map* parent, const int id); + /** + * XML data constructor. + * + * \param xml The XML structure to extract the data from. + * \param parent The parent of the tile. + * \param id The id number for the tile. + */ MapTile(const QDomElement& xml, const Map* parent, const int id = -1); + /** + * Check to make sure the tile's values are valid. + */ void validate(); + /** + * Load data from XML. + * + * \param xml The XML structure to extract data from. + */ void load(const QDomElement& xml); + /** + * Get the data for the tile in XML format. + * + * \return The XML structure representing the tile. + */ QDomElement save() const; + /** + * Sets the id of the tile that represents the tile. + * + * \param tile The id of the tile. + */ void setTile(const int tile); + /** + * Sets the position of the tile on the map. + * + * \param position The position of the tile. + */ void setPosition(const QPoint& position); + /** + * Sets the z-index of the tile on the map. Higher numbers are drawn on top + * of lower numbers. + * + * \param zIndex The z-index of the tile. + */ void setZIndex(const int zIndex); + /** + * \sa setTile + * + * \return The id of the tile used for the image. + */ int tile() const; + /** + * \sa setPosition + * + * \return The position of the tile. + */ QPoint position() const; + /** + * \sa setZIndex + * + * \return The z-index of the tile. + */ int zIndex() const; bool tileCheck(const int tile) const; |