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