コード例 #1
0
ファイル: vertex.py プロジェクト: gbaty/openalea
 def contextMenuEvent(self, event):
     if isinstance(self.port(), OutputPort):
         operator = GraphOperator(graph=self.graph,
                                  graphScene=self.scene())
         operator.set_port_item(self)
         menu = qtutils.AleaQMenu(operator.get_sensible_parent())
         menu.addAction(operator("Send to pool", menu, "port_send_to_pool"))
         menu.addAction(operator("Send to console", menu, "port_send_to_console"))
         menu.addAction(operator("Print", menu, "port_print_value"))
         menu.show()
         menu.move(event.screenPos())
         event.accept()
コード例 #2
0
 def contextMenuEvent(self, event):
     if isinstance(self.port(), OutputPort):
         operator = GraphOperator(graph=self.graph, graphScene=self.scene())
         operator.set_port_item(self)
         menu = qtutils.AleaQMenu(operator.get_sensible_parent())
         menu.addAction(operator("Send to pool", menu, "port_send_to_pool"))
         menu.addAction(
             operator("Send to console", menu, "port_send_to_console"))
         menu.addAction(operator("Print", menu, "port_print_value"))
         menu.show()
         menu.move(event.screenPos())
         event.accept()