diff -r 6e4b586aa88a -r 25e634a7e1dc vymmodel.h --- a/vymmodel.h Wed Jun 03 20:37:17 2009 +0000 +++ b/vymmodel.h Mon Jun 08 11:36:56 2009 +0000 @@ -5,7 +5,7 @@ #include #include "file.h" -#include "floatimageobj.h" +#include "imageitem.h" #include "mapeditor.h" #include "parser.h" #include "treeitem.h" @@ -107,8 +107,8 @@ void addMapReplaceInt(const QString & undoSel, const QString & path); void addMapInsertInt (const QString & path, int pos); - FloatImageObj* loadFloatImageInt (BranchItem *dst,QString); - void saveFloatImageInt (FloatImageObj*, const QString &, const QString &); + ImageItem* loadFloatImageInt (BranchItem *dst,QString); + void saveFloatImageInt (ImageItem*, const QString &, const QString &); public: void loadFloatImage (); void saveFloatImage (); @@ -151,8 +151,8 @@ Returns heading of a branch or name of an object for use in comment of undo/redo history */ - QString getObjectName(const LinkableMapObj*); - QString getObjectName(const TreeItem*); + QString getObjectName(LinkableMapObj*); + QString getObjectName(TreeItem*); void redo(); //!< Redo last action bool isRedoAvailable(); //!< True, if redo is available @@ -282,7 +282,7 @@ // The create methods are used to quickly parse a XML file BranchItem* createMapCenter(); //!< Create MapCenter BranchItem* createBranch(BranchItem *dst); //!< Create Branch - TreeItem* createImage(BranchItem *dst); //!< Create image + ImageItem* createImage(BranchItem *dst); //!< Create image /*! \brief Add new mapcenter @@ -323,11 +323,12 @@ */ bool relinkBranch (BranchItem* branch, BranchItem* dst, int pos =-1); - void deleteSelection(); //!< Delete selection - void deleteKeepChildren(); //!< remove branch, but keep children - void deleteChildren(); //!< keep branch, but remove children + void deleteSelection(); //!< Delete selection + void deleteKeepChildren(); //!< remove branch, but keep children + void deleteChildren(); //!< keep branch, but remove children private: + TreeItem* deleteItem(TreeItem*); //!< Delete item and return parent (if parent!= rootItem) bool scrollBranch(BranchItem *); bool unscrollBranch(BranchItem *); public: @@ -578,11 +579,11 @@ public: TreeItem::Type selectionType(); LinkableMapObj* getSelectedLMO(); - BranchObj* getSelectedBranchObj(); // FIXME-2 replace by item... + BranchObj* getSelectedBranchObj(); // FIXME-3 replace by item... BranchItem* getSelectedBranchItem(); TreeItem* getSelectedItem(); QModelIndex getSelectedIndex(); - FloatImageObj* getSelectedFloatImage(); + ImageItem* getSelectedImageItem(); QString getSelectString (); QString getSelectString (LinkableMapObj *lmo); QString getSelectString (TreeItem *item);