Commits

Juan BC committed 3c6e4c9

remove test patch in network

  • Participants
  • Parent commits a9b2a43

Comments (0)

Files changed (1)

File yatel/gui/network.py

 
 
 #===============================================================================
-# TEST PROPUSES PATCH
-#===============================================================================
-
-if __name__ == "__main__":
-    import sip
-    sip.setapi('QString', 2)
-    sip.setapi('QVariant', 2)
-    import sys, os
-    path = os.path.abspath(os.path.dirname(__file__))
-    rel = os.path.join(path, "..", "..")
-    sys.path.insert(0, rel)
-
-
-#===============================================================================
 # IMPORTS
 #===============================================================================
 
 #: Default width of pilas widget
 ALTO = 300
 
-pilas.iniciar(ANCHO, ALTO,
-              usar_motor="qtgl" if __name__ == "__main__" else "qtwidget")
+pilas.iniciar(ANCHO, ALTO, "qtwidget")
 
 #: Instance of pilas image representing the clicked and not highlighted node.
 IMAGE_NODE_NORMAL = imagenes.cargar(
 #===============================================================================
 
 if __name__ == "__main__":
-    print "Test"
-
-    n = NetworkProxy()
-
-
-    def printer(evt):
-        n.show_haps_names(not n.haps_names_showed)
-        n.show_weights(not n.weights_showed)
-        pilas.avisar(str(evt))
-
-    def selector(evt):
-        n.select_node(evt["node"])
-
-    a0 = dom.Haplotype("hap0")
-    a1 = dom.Haplotype("hap1")
-    a2 = dom.Haplotype("hap2")
-    a3 = dom.Haplotype("hap3")
-    n.add_node(a0, 100, 200)
-    n.add_node(a1, -100)
-    n.add_node(a2, 200)
-    n.add_node(a3, 0, -100)
-    n.add_edge(dom.Edge(555, a0.hap_id, a1.hap_id))
-    n.add_edge(dom.Edge(666, a3.hap_id, a2.hap_id))
-    n.add_edge(dom.Edge(666, a2.hap_id, a0.hap_id))
-
-    f = dom.Fact(a1.hap_id, a=1)
-    n.highlight_nodes(a1, a2)
-    n.node_clicked.conectar(printer)
-    n.node_clicked.conectar(selector)
-
-    pilas.ejecutar()
-
+    print(__doc__)