Пример #1
0
class WeaponCautionClueView(QFrame):  # Prolly could use a better name
    """ Represents a Weapon Caution Clue View """
    def __init__(self, weaponCautionClue, parent=None):
        """ Initialize the Weapon Caution Clue View """
        QFrame.__init__(self, parent)
        self.weaponCautionClue = weaponCautionClue
        self.resize(16, 15)
        self.loadImage()
        self.setVisible(False)

    def loadImage(self):
        """ Load the Warning Image """
        self.image = LoadImageLabel("warning.gif", parent=self)
        self.image.move(0, 0)

    def updateView(self):
        """ Update the View """
        self.setVisible(self.weaponCautionClue.nearWeapons)
Пример #2
0
class WeaponCautionClueView(QFrame): # Prolly could use a better name
    """ Represents a Weapon Caution Clue View """
    
    def __init__(self, weaponCautionClue, parent=None):
        """ Initialize the Weapon Caution Clue View """
        QFrame.__init__(self, parent)
        self.weaponCautionClue = weaponCautionClue
        self.resize(16, 15)
        self.loadImage()
        self.setVisible(False)
        
    def loadImage(self):
        """ Load the Warning Image """
        self.image = LoadImageLabel("warning.gif", parent=self)
        self.image.move(0, 0)
        
    def updateView(self):
        """ Update the View """
        self.setVisible(self.weaponCautionClue.nearWeapons)
Пример #3
0
 def loadArrow(self, filename, xPosition, yPosition):
     """ Load Arrow Image """
     arrowLabel = LoadImageLabel(filename, parent=self)
     arrowLabel.setVisible(False)
     arrowLabel.move(xPosition, yPosition)
     return arrowLabel
Пример #4
0
 def loadImage(self):
     """ Load the Warning Image """
     self.image = LoadImageLabel("warning.gif", parent=self)
     self.image.move(0, 0)
Пример #5
0
 def loadGridSquareSizedImage(self, filename, visible=True):
     """ Load a Grid Square Sized Image from the filename given """
     image = LoadImageLabel(filename, scaledXSize=self.GRID_SQUARE_SIZE, scaledYSize=self.GRID_SQUARE_SIZE, parent=self)
     image.move(0, 0)
     image.setVisible(visible)
     return image
Пример #6
0
 def loadArrow(self, filename, xPosition, yPosition):
     """ Load Arrow Image """
     arrowLabel = LoadImageLabel(filename, parent=self)
     arrowLabel.setVisible(False)
     arrowLabel.move(xPosition, yPosition)
     return arrowLabel
Пример #7
0
 def loadImage(self):
     """ Load the Warning Image """
     self.image = LoadImageLabel("warning.gif", parent=self)
     self.image.move(0, 0)