diff -r 2d4cc445a86a -r ee6b0f3a4c2f treeitem.h --- a/treeitem.h Mon Mar 23 09:06:51 2009 +0000 +++ b/treeitem.h Thu Mar 26 07:49:17 2009 +0000 @@ -4,16 +4,25 @@ #include #include +#include "noteobj.h" +#include "xmlobj.h" + class LinkableMapObj; +class VymModel; -class TreeItem +class TreeItem:public XMLObj { public: enum Type {Undefined,MapCenter,Branch,Image}; TreeItem(const QList &data, TreeItem *parent = 0); ~TreeItem(); + QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset); + // General housekeeping + void setModel (VymModel *m); + VymModel* getModel(); + void appendChild (TreeItem *child); void removeChild (int row); @@ -33,8 +42,22 @@ QVariant data(int column) const; void setHeading (const QString s); QString getHeading(); + +protected: + NoteObj note; +public: void setNote(const QString s); QString getNote(); + virtual void setNoteObj(const NoteObj &, bool updateNoteEditor=true); + virtual NoteObj getNoteObj(); + virtual QString getNoteASCII(const QString &indent, const int &width); // returns note (ASCII) + virtual QString getNoteASCII(); // returns note (ASCII) + virtual QString getNoteOpenDoc(); // returns note (OpenDoc) + + +protected: + Type type; +public: void setType (const Type t); Type getType (); QString getTypeName (); @@ -53,16 +76,19 @@ void setLMO (LinkableMapObj*); protected: + VymModel *model; + QList childItems; QList itemData; TreeItem *parentItem; - Type type; LinkableMapObj *lmo; int branchOffset; int branchCounter; int lastSelectedBranchNum; + + bool hidden; //! Hidden in export if true }; #endif