示例#1
0
文件: clue_view.py 项目: cloew/PyMine
class ClueView(GridSquareFrame):
    """ Represents the Graphical view of the Drone """
    TRANSPARENCY = 100

    def __init__(self, clue, parent=None):
        """ Initialize the drone view """
        GridSquareFrame.__init__(self, parent)
        self.clue = clue
        
        self.adjacencyClue = AdjacencyClueView(clue.adjacencyClue, clue.fragilityClue, parent=self)
        self.adjacencyClue.move(45, 5)
        
        self.warningClue = WeaponCautionClueView(clue.weaponCautionClue, parent=self)
        self.warningClue.move(10, 10)
        
    def updateView(self):
        """ Update the View """
        self.adjacencyClue.updateView()
        self.warningClue.updateView()
        
    def representNewClue(self, clue):
        """ Represent a New Clue """
        self.clue = clue
        self.adjacencyClue.adjacencyClue = clue.adjacencyClue
        self.adjacencyClue.fragilityClue = clue.fragilityClue
        self.warningClue.clue = clue
示例#2
0
class ClueView(GridSquareFrame):
    """ Represents the Graphical view of the Drone """
    TRANSPARENCY = 100

    def __init__(self, clue, parent=None):
        """ Initialize the drone view """
        GridSquareFrame.__init__(self, parent)
        self.clue = clue

        self.adjacencyClue = AdjacencyClueView(clue.adjacencyClue,
                                               clue.fragilityClue,
                                               parent=self)
        self.adjacencyClue.move(45, 5)

        self.warningClue = WeaponCautionClueView(clue.weaponCautionClue,
                                                 parent=self)
        self.warningClue.move(10, 10)

    def updateView(self):
        """ Update the View """
        self.adjacencyClue.updateView()
        self.warningClue.updateView()

    def representNewClue(self, clue):
        """ Represent a New Clue """
        self.clue = clue
        self.adjacencyClue.adjacencyClue = clue.adjacencyClue
        self.adjacencyClue.fragilityClue = clue.fragilityClue
        self.warningClue.clue = clue
示例#3
0
    def __init__(self, clue, parent=None):
        """ Initialize the drone view """
        GridSquareFrame.__init__(self, parent)
        self.clue = clue

        self.adjacencyClue = AdjacencyClueView(clue.adjacencyClue,
                                               clue.fragilityClue,
                                               parent=self)
        self.adjacencyClue.move(45, 5)

        self.warningClue = WeaponCautionClueView(clue.weaponCautionClue,
                                                 parent=self)
        self.warningClue.move(10, 10)
示例#4
0
文件: clue_view.py 项目: cloew/PyMine
 def __init__(self, clue, parent=None):
     """ Initialize the drone view """
     GridSquareFrame.__init__(self, parent)
     self.clue = clue
     
     self.adjacencyClue = AdjacencyClueView(clue.adjacencyClue, clue.fragilityClue, parent=self)
     self.adjacencyClue.move(45, 5)
     
     self.warningClue = WeaponCautionClueView(clue.weaponCautionClue, parent=self)
     self.warningClue.move(10, 10)