Skip to content
Snippets Groups Projects
Commit 5fe49db7 authored by inso's avatar inso
Browse files

Handle node clicks

parent 33303764
No related branches found
No related tags found
No related merge requests found
...@@ -32,7 +32,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget): ...@@ -32,7 +32,7 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
self.comboBoxSearch.setInsertPolicy(QComboBox.NoInsert) self.comboBoxSearch.setInsertPolicy(QComboBox.NoInsert)
# add scene events # add scene events
self.graphicsView.scene().node_clicked.connect(self.draw_graph) self.graphicsView.scene().node_clicked.connect(self.handle_node_click)
self.graphicsView.scene().node_signed.connect(self.sign_node) self.graphicsView.scene().node_signed.connect(self.sign_node)
self.graphicsView.scene().node_transaction.connect(self.send_money_to_node) self.graphicsView.scene().node_transaction.connect(self.send_money_to_node)
self.graphicsView.scene().node_contact.connect(self.add_node_as_contact) self.graphicsView.scene().node_contact.connect(self.add_node_as_contact)
...@@ -50,6 +50,10 @@ class WotTabWidget(QWidget, Ui_WotTabWidget): ...@@ -50,6 +50,10 @@ class WotTabWidget(QWidget, Ui_WotTabWidget):
self._current_identity = None self._current_identity = None
self.draw_graph(self.account.identity(self.community)) self.draw_graph(self.account.identity(self.community))
@pyqtSlot(dict)
def handle_node_click(self, metadata):
self.draw_graph(self.app.identities_registry.from_metadata(metadata))
def draw_graph(self, identity): def draw_graph(self, identity):
""" """
Draw community graph centered on the identity Draw community graph centered on the identity
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment