コード例 #1
0
    def load_project(self, json_file):
        qDebug("load project " + json_file)
        if not os.path.exists(json_file):
            raise Exception("project.dice not found in " + str(json_file))

        project = Project(self)
        project.path = os.path.abspath(os.path.dirname(json_file))
        project.project_config = JsonOrderedDict(json_file)

        if "projectName" in project.project_config:
            project.name = project.project_config["projectName"]

        self.project = project  # set project before using self.desk, so it can access the project
        self.desk.load_desk(project.project_config)
        project.loaded = True
        self.home.add_recent_project(project.name, json_file)
コード例 #2
0
ファイル: main.py プロジェクト: nxsofsys/dice-dev
    def load_project(self, json_file):
        qDebug("load project "+json_file)
        if not os.path.exists(json_file):
            raise Exception("project.dice not found in "+str(json_file))

        project = Project(self)
        project.path = os.path.abspath(os.path.dirname(json_file))
        project.project_config = JsonOrderedDict(json_file)

        if "projectName" in project.project_config:
            project.name = project.project_config["projectName"]

        self.project = project  # set project before using self.desk, so it can access the project
        self.desk.load_desk(project.project_config)
        project.loaded = True
        self.home.add_recent_project(project.name, json_file)