diff -r 2f002657dada -r 6e4b586aa88a vymmodel.h --- a/vymmodel.h Tue May 26 11:24:51 2009 +0000 +++ b/vymmodel.h Wed Jun 03 20:37:17 2009 +0000 @@ -5,7 +5,7 @@ #include #include "file.h" -#include "mapcenterobj.h" +#include "floatimageobj.h" #include "mapeditor.h" #include "parser.h" #include "treeitem.h" @@ -107,7 +107,7 @@ void addMapReplaceInt(const QString & undoSel, const QString & path); void addMapInsertInt (const QString & path, int pos); - FloatImageObj* loadFloatImageInt (QString); + FloatImageObj* loadFloatImageInt (BranchItem *dst,QString); void saveFloatImageInt (FloatImageObj*, const QString &, const QString &); public: void loadFloatImage (); @@ -280,9 +280,9 @@ void sortChildren(); //!< Sort children lexically // The create methods are used to quickly parse a XML file - BranchItem* createMapCenter(); //!< Create and select MapCenter // FIXME-3 maybe join this also with createBranch - BranchItem* createBranch(); //!< Create and select Branch - TreeItem* createImage(); //!< Create and select image + BranchItem* createMapCenter(); //!< Create MapCenter + BranchItem* createBranch(BranchItem *dst); //!< Create Branch + TreeItem* createImage(BranchItem *dst); //!< Create image /*! \brief Add new mapcenter @@ -313,7 +313,7 @@ 0 as child of selection 1 below selection */ - BranchItem* addNewBranch(int pos); + BranchItem* addNewBranch(int pos=0); BranchItem* addNewBranchBefore(); //!< Insert branch between selection and its parent /*! \brief Relink a branch to a new destination dst Relinks branch to dst at branch position pos. There is no saveState @@ -539,9 +539,6 @@ private: TreeItem *latestAddedItem; // latest added object, reset on setChanged() -signals: - void selectionChanged(const QItemSelection &, const QItemSelection &); - public: void setSelectionModel(QItemSelectionModel *); // Set common selectionModel QItemSelectionModel* getSelectionModel(); @@ -591,14 +588,15 @@ QString getSelectString (TreeItem *item); - /* +signals: + void selectionChanged(const QItemSelection &newsel, const QItemSelection &oldsel); + public slots: - void changeSelection (const QItemSelection &newSel, const QItemSelection &delSel); - */ + void updateSelection (const QItemSelection &newSel, const QItemSelection &delSel); public: - void updateSelection(const QItemSelection &oldsel); - void updateSelection(); + void emitSelectionChanged(const QItemSelection &oldsel); + void emitSelectionChanged(); void selectMapLinkColor(); void selectMapSelectionColor(); private: