Helpviewer/Bookmarks/BookmarkNode.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
7 Module implementing the bookmark node. 7 Module implementing the bookmark node.
8 """ 8 """
9 9
10 from PyQt4.QtCore import * 10 from PyQt4.QtCore import *
11 11
12
12 class BookmarkNode(object): 13 class BookmarkNode(object):
13 """ 14 """
14 Class implementing the bookmark node type. 15 Class implementing the bookmark node type.
15 """ 16 """
16 # possible bookmark node types 17 # possible bookmark node types
17 Root = 0 18 Root = 0
18 Folder = 1 19 Folder = 1
19 Bookmark = 2 20 Bookmark = 2
20 Separator = 3 21 Separator = 3
21 22
22 def __init__(self, type_ = Root, parent = None): 23 def __init__(self, type_=Root, parent=None):
23 """ 24 """
24 Constructor 25 Constructor
25 26
26 @param type_ type of the bookmark node (BookmarkNode.Type) 27 @param type_ type of the bookmark node (BookmarkNode.Type)
27 @param parent reference to the parent node (BookmarkNode) 28 @param parent reference to the parent node (BookmarkNode)
68 69
69 @return reference to the parent node (BookmarkNode) 70 @return reference to the parent node (BookmarkNode)
70 """ 71 """
71 return self._parent 72 return self._parent
72 73
73 def add(self, child, offset = -1): 74 def add(self, child, offset=-1):
74 """ 75 """
75 Public method to add/insert a child node. 76 Public method to add/insert a child node.
76 77
77 @param child reference to the node to add (BookmarkNode) 78 @param child reference to the node to add (BookmarkNode)
78 @param offset position where to insert child (integer, -1 = append) 79 @param offset position where to insert child (integer, -1 = append)

eric ide

mercurial