Beispiel #1
0
    def __set_scene(self, scene):
        self.__scene = Scene.new()  ## erase scene
        TileManager.purge()
        self.__scene = scene
        self.__scene.viewport_size = (self.width(), self.height())

        ## zoom into scene
        self.__scene.centre = (self.width() / 2, self.height() / 2)
        self.__scene.zoom(-5.0)
        self.__scene.aim("z", 5.0)
Beispiel #2
0
    def __init__(self, parent=None, framerate=10):
        """Create a new QZUI QWidget with the given `parent` widget."""
        QtGui.QWidget.__init__(self, parent)

        self.__scene = Scene.new()

        self.__mousedown = False
        self.__mousepos = None
        self.__shift_held = False
        self.__alt_held = False
        self.__dropped_frames = 0
        self.__draft = True

        self.__timer = QtCore.QBasicTimer()

        self.framerate = framerate
        self.reduced_framerate = 2

        self.setFocusPolicy(QtCore.Qt.ClickFocus)
        self.setMouseTracking(True)
Beispiel #3
0
    def __action_new_scene(self):
        """Create a new scene.

        __action_new_scene() -> None
        """
        self.zui.scene = Scene.new()