13 class TreeItem:public XMLObj
16 enum Type {Undefined,MapCenter,Branch,Image};
17 TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
19 QString saveToDir (const QString &tmpdir,const QString &prefix, const QPointF& offset);
22 // General housekeeping
23 void setModel (VymModel *m);
26 void appendChild (TreeItem *child);
27 void removeChild (int row);
29 TreeItem *child(int row);
30 int childCount() const;
31 int childNumber() const;
32 int columnCount() const;
33 int branchCount() const;
39 int num(); // object index, e.g. branch number
42 QVariant data(int column) const;
43 void setHeading (const QString s);
49 void setNote(const QString s);
51 virtual void setNoteObj(const NoteObj &, bool updateNoteEditor=true);
52 virtual NoteObj getNoteObj();
53 virtual QString getNoteASCII(const QString &indent, const int &width); // returns note (ASCII)
54 virtual QString getNoteASCII(); // returns note (ASCII)
55 virtual QString getNoteOpenDoc(); // returns note (OpenDoc)
61 void setType (const Type t);
63 QString getTypeName ();
65 // Navigation and selection
66 TreeItem* getChildNum(const int &n);
67 TreeItem* getFirstBranch();
68 TreeItem* getLastBranch();
69 TreeItem* getBranchNum(const int &n);
70 void setLastSelectedBranch();
71 TreeItem* getLastSelectedBranch();
74 // Relation to map objects in graphicsscene
75 LinkableMapObj* getLMO();
76 void setLMO (LinkableMapObj*);
81 QList<TreeItem*> childItems;
82 QList<QVariant> itemData;
89 int lastSelectedBranchNum;
91 bool hidden; //! Hidden in export if true