Beispiel #1
0
class SensorsEditor():

    _currentProject = None

    _viewer = None
    
    _qtApp = None
    _window = None

    _version = 0.1

    def __init__(self, qtApp, window):
        pass

        self._currentProject = None

        self._qtApp = qtApp
        self._window = window

        TaskManager.Init(self._qtApp)

        self._viewer = Viewer(self._window.winId())
        self._viewer.setOrigin(P3D_WIN_X, P3D_WIN_Y)
        self._viewer.setSize(P3D_WIN_WIDTH, P3D_WIN_HEIGHT)
        self._viewer.startDraw()

    def createNewProject(self, pathToModel):
        pass

    def openProject(self, pathToProject):
        try:
            project = Project()
            project.open(pathToProject)

        except ProjectOpenError:
             logging.error("Can't open project " + pathToProject)
             raise Exception("Can't open project " + pathToProject)

        self._currentProject = project


    def saveProject(self):
        pass

    def saveAsProject(self, pathToProject):
        pass

    def setOrigin(self, x, y):
        self._viewer.setOrigin(x, y)

    def setSize(self, width, height):
        self._viewer.setSize(width, height)
Beispiel #2
0
    def __init__(self, qtApp, window):
        pass

        self._currentProject = None

        self._qtApp = qtApp
        self._window = window

        TaskManager.Init(self._qtApp)

        self._viewer = Viewer(self._window.winId())
        self._viewer.setOrigin(P3D_WIN_X, P3D_WIN_Y)
        self._viewer.setSize(P3D_WIN_WIDTH, P3D_WIN_HEIGHT)
        self._viewer.startDraw()