X-Git-Url: https://ruin.nu/git/index.pl?a=blobdiff_plain;f=bs%2Fbsdoc.h;h=eac45f40432b1a62ee0865ba64d3a8961d07f9a0;hb=e07f49323a1936c90605d06f6f63e4c39b4c4aca;hp=0c02c6fa3fe0a19773ba8acb44356d4f03c27f22;hpb=fb2a45b071b141a63140645c135ade3c731fa503;p=hbs.git diff --git a/bs/bsdoc.h b/bs/bsdoc.h index 0c02c6f..eac45f4 100644 --- a/bs/bsdoc.h +++ b/bs/bsdoc.h @@ -20,10 +20,19 @@ // include files for QT #include +// standard library +#include + // application specific includes +#include "fleet.h" -/** - * the Document Class +//! The document class +/** This class is holding all the data, handles the transportation of the + * data to a couple of different mediums and informs users of the data + * if it's changed (through the documentChnaged() signal) + * \bug it's too open.. + * \todo make this class more closed. + * \author Michael Andreen */ class BSDoc : public QObject @@ -39,11 +48,25 @@ class BSDoc : public QObject bool load(const QString &filename); bool isModified() const; + /**Adds a new battle to the dokument and emits documentChanged. + * \todo add some checks to see if the battle exist and so and return the status. + * \return returns 0 if everything is ok. + */ + int newBattle(QString name); + + /**This returns the the data structure, so other can work on it, but not supposed + * change it. + * \todo remove this, and replace it with a better more closed interface. + */ + std::map > >& Battles(); + signals: void documentChanged(); protected: bool modified; + + std::map > > m_Battles; }; #endif