diff -r 7ea31701156e -r 7f43b93242aa vymmodel.h --- a/vymmodel.h Tue Aug 05 07:36:53 2008 +0000 +++ b/vymmodel.h Mon Oct 06 11:10:20 2008 +0000 @@ -9,14 +9,10 @@ #include "mapeditor.h" #include "parser.h" #include "selection.h" +#include "treeitem.h" #include "treemodel.h" -#include "xmlobj.h" - -/*! \brief This will later be divided into Model/View -*/ - -class VymModel : public QObject, public XMLObj { +class VymModel : public TreeModel { Q_OBJECT //////////////////////////////////////////// @@ -39,11 +35,6 @@ MapEditor* getMapEditor(); // FIXME not necessary -private: - TreeModel* treeModel; -public: - TreeModel* getTreeModel(); - bool isRepositionBlocked(); //!< While load or undo there is no need to update graphicsview void updateActions(); //!< Update buttons in mainwindow @@ -288,6 +279,10 @@ void moveBranchDown(); //!< Move branch down void sortChildren(); //!< Sort children lexically + // The create methods are used to quickly parse a XML file + void createMapCenter(); //!< Create and select MapCenter + void createBranch(); //!< Create and select Branch + /*! \brief Add new mapcenter Disclaimer: Still experimental, not fully supported yet. @@ -552,6 +547,7 @@ void selectRightBranch(); void selectFirstBranch(); void selectLastBranch(); + void selectParent(); public: Selection::Type selectionType();