diff -r 6e4b586aa88a -r 25e634a7e1dc treeitem.h --- a/treeitem.h Wed Jun 03 20:37:17 2009 +0000 +++ b/treeitem.h Mon Jun 08 11:36:56 2009 +0000 @@ -6,21 +6,23 @@ #include #include "flagrow.h" -#include "mapitem.h" #include "noteobj.h" #include "xmlobj.h" class LinkableMapObj; class BranchObj; class BranchItem; +class FloatImageObj; +class ImageItem; class VymModel; -class TreeItem:public MapItem +class TreeItem { public: enum Type {Undefined,MapCenter,Branch,Image}; enum HideTmpMode {HideNone, HideExport}; + TreeItem(); TreeItem(const QList &data, TreeItem *parent = 0); ~TreeItem(); void init(); @@ -29,6 +31,11 @@ virtual void setModel (VymModel *m); virtual VymModel* getModel(); + + /*! Return number of item, as it would be after it would have been appended. + This is used to notify view about layout changes before model is modified. */ + virtual int getRowNumAppend (TreeItem *child); + virtual void appendChild (TreeItem *child); virtual void removeChild (int row); virtual void removeChildBranches (); @@ -95,7 +102,8 @@ virtual void clearNote(); virtual QString getNote(); virtual bool hasEmptyNote(); - virtual void setNoteObj(const NoteObj &, bool updateNoteEditor=true); + virtual void setNoteObj(const NoteObj &, bool updateNoteEditor=true); //FIXME-1 setNoteObj is called for every select or so??? + virtual NoteObj getNoteObj(); virtual QString getNoteASCII(const QString &indent, const int &width); // returns note (ASCII) virtual QString getNoteASCII(); // returns note (ASCII) @@ -146,6 +154,8 @@ virtual void setLastSelectedBranch(int i); //! Set last selected branch directly virtual TreeItem* getLastSelectedBranch(); + virtual ImageItem* getImageNum(const int &n); + virtual FloatImageObj* getImageObjNum(const int &n); protected: bool hideExport; //! Hide this item in export public: