# Commits

committed ddfa94f

• Participants
• Parent commits c840721

# Files changed (3)

` import random`
` from parcond import ParCond`
` from punto import Punto`
`+from rectangulo import Rectangulo`
` class ArbolPrioridad(object):`
`     '''`
`     classdocs`
`         print nodo`
`         self._rec_pre(nodo.izq)`
`         self._rec_pre(nodo.der)`
`-`
`+    def enum_int(self, rect1, rect2, lista):`
`+        rect = Rectangulo.interseccion(rect1, rect2)`
`+        if rect is not None:`
`+            self.enumerar(rect.punto1.x, rect.punto2.x, rect.punto1.y, rect.punto2.y, lista)`
`+            return True`
`+        return False`
` def main():`
`     arbol = ArbolPrioridad(50000)`
`     random.seed()`

`+'''`
`+Created on 27/03/2012`
`+`
`+@author: asdrubal`
`+'''`
`+`
`+from punto import Punto`
`+`
`+class Rectangulo(object):`
`+    '''`
`+    classdocs`
`+    '''`
`+`
`+`
`+    def __init__(self, x0, x1, y0, y1):`
`+        '''`
`+        Constructor`
`+        '''`
`+        self.punto1 = Punto(x0, y0)`
`+        self.punto2 = Punto(x1, y1)`
`+    def __str__(self):`
`+        return "Punto 1: " + str(self.punto1) + " Punto 2: " + str(self.punto2)`
`+    @staticmethod`
`+    def interseccion(rect1, rect2):`
`+        x0 = max(rect1.punto1.x, rect2.punto1.x)`
`+        y0 = max(rect1.punto1.y, rect2.punto1.y)`
`+        x1 = min(rect1.punto2.x, rect2.punto2.x)`
`+        y1 = min(rect1.punto2.y, rect2.punto2.y)`
`+        if x0 > x1 or y0 > y1:`
`+            return None`
`+        return Rectangulo(Punto(x0, y0), Punto(x1, y1))`

` @author: asdrubal`
` '''`
` `
`-from PySide.QtCore import *`
`+#from PySide.QtCore import QA`
` from PySide.QtGui import *`
` from ui_pantalla import Ui_CVentanaPrincipal`
` import sys`
`         QMainWindow.__init__(self, parent)`
`         self.ui = Ui_CVentanaPrincipal()`
`         self.ui.setupUi(self)`
`-        self.setFixedSize(280, 260)`
` `
` def main():`
`     app = QApplication(sys.argv)`