Add Cluster.update().

This commit is contained in:
Lukáš Lalinský
2007-12-08 13:25:59 +01:00
parent 4bb6c11616
commit b4d1e0d4fc
2 changed files with 4 additions and 0 deletions

View File

@@ -71,6 +71,9 @@ class Cluster(QtCore.QObject, Item):
def update_file(self, file):
self.tagger.emit(QtCore.SIGNAL('file_updated'), file)
def update(self):
self.tagger.emit(QtCore.SIGNAL("cluster_updated"), self)
def get_num_files(self):
return len(self.files)

View File

@@ -101,6 +101,7 @@ class MainPanel(QtGui.QSplitter):
File.ERROR: self.config.setting["color_error"],
}
self.connect(self.tagger, QtCore.SIGNAL("file_updated"), self.update_file)
self.connect(self.tagger, QtCore.SIGNAL("cluster_updated"), self.update_cluster)
self.connect(self.tagger, QtCore.SIGNAL("file_added_to_cluster"), self.add_file_to_cluster)
self.connect(self.tagger, QtCore.SIGNAL("files_added_to_cluster"), self.add_files_to_cluster)
self.connect(self.tagger, QtCore.SIGNAL("file_removed_from_cluster"), self.remove_file_from_cluster)