EcranFondPlateau.py 823 B

1234567891011121314151617181920
  1. #from __future__ import unicode_literals
  2. # -*- coding: utf-8 -*-
  3. from __future__ import division
  4. from PyQt4.QtCore import *
  5. from PyQt4.QtGui import *
  6. class EcranFondPlateau(QGraphicsScene):
  7. """ecran de fond lorsqu'aucun plateau n'est cree"""
  8. def __init__(self, fenetre, parent=None):
  9. super(EcranFondPlateau, self).__init__()
  10. self.fenetre = fenetre
  11. self.setBackgroundBrush(QBrush(QPixmap("img\\parchemin.jpg")))
  12. police = QFont("GothicI", 16)
  13. self.addText(QString.fromUtf8("Cliquer pour créer\nou ouvrir un plateau"),police)
  14. #self.ecranFondPlateau.addText(QString("Charger un plateau"),police)
  15. def mousePressEvent(self, event):
  16. """cree un plateau sur clic gauche"""
  17. if event.button() == 1:
  18. self.fenetre.afficherEcranCreationPlateau()