38 QAbstractItemModel.__init__(self, parent) |
38 QAbstractItemModel.__init__(self, parent) |
39 |
39 |
40 self.__endMacro = False |
40 self.__endMacro = False |
41 self.__bookmarksManager = manager |
41 self.__bookmarksManager = manager |
42 |
42 |
43 self.connect(manager, |
43 manager.entryAdded.connect(self.entryAdded) |
44 SIGNAL("entryAdded"), |
44 manager.entryRemoved.connect(self.entryRemoved) |
45 self.entryAdded) |
45 manager.entryChanged.connect(self.entryChanged) |
46 self.connect(manager, |
|
47 SIGNAL("entryRemoved"), |
|
48 self.entryRemoved) |
|
49 self.connect(manager, |
|
50 SIGNAL("entryChanged"), |
|
51 self.entryChanged) |
|
52 |
46 |
53 self.__headers = [ |
47 self.__headers = [ |
54 self.trUtf8("Title"), |
48 self.trUtf8("Title"), |
55 self.trUtf8("Address"), |
49 self.trUtf8("Address"), |
56 ] |
50 ] |
111 Public method to change a node. |
105 Public method to change a node. |
112 |
106 |
113 @param node reference to the bookmark node to change (BookmarkNode) |
107 @param node reference to the bookmark node to change (BookmarkNode) |
114 """ |
108 """ |
115 idx = self.nodeIndex(node) |
109 idx = self.nodeIndex(node) |
116 self.emit(SIGNAL("dataChanged(const QModelIndex&, const QModelIndex&)"), |
110 self.dataChanged.emit(idx, idx) |
117 idx, idx) |
|
118 |
111 |
119 def removeRows(self, row, count, parent = QModelIndex()): |
112 def removeRows(self, row, count, parent = QModelIndex()): |
120 """ |
113 """ |
121 Public method to remove bookmarks from the model. |
114 Public method to remove bookmarks from the model. |
122 |
115 |