25 #ifndef AKREGATOR_NODELIST_H
26 #define AKREGATOR_NODELIST_H
34 template < class K, class T> class TQMap;
35 template < class T> class TQValueList;
40 # define signals public
48 class NodeList : public TQObject
55 NodeList(TQObject *parent=0, const char *name=0);
58 virtual Folder* rootNode() const;
60 virtual bool readFromXML( const TQDomDocument& doc) = 0;
62 virtual TQDomDocument toXML() const = 0;
64 virtual bool isEmpty() const;
66 TreeNode* findByID( int id) const;
69 const TQString& title() const;
72 void setTitle( const TQString& name);
75 const TQValueList<TreeNode*>& asFlatList() const;
78 void signalDestroyed(NodeList*);
80 void signalNodeAdded(TreeNode*);
82 void signalNodeRemoved(TreeNode*);
94 TQValueList<TreeNode*>* flatList() const;
95 TQMap<int, TreeNode*>* idMap() const;
98 void setRootNode(Folder* folder);
99 virtual void addNode(TreeNode* node, bool preserveID);
100 virtual void removeNode(TreeNode* node);
105 virtual void slotNodeDestroyed(TreeNode* node);
106 virtual void slotNodeAdded(TreeNode* node);
107 virtual void slotNodeRemoved(Folder* parent, TreeNode* node);
111 NodeList( const NodeList&) : TQObject() {}
112 NodeList& operator=( const NodeList&) { return * this; }
114 friend class AddNodeVisitor;
115 class AddNodeVisitor;
117 friend class RemoveNodeVisitor;
118 class RemoveNodeVisitor;
120 class NodeListPrivate;
|