Пример #1
0
    def show_model_ctrl(self, event):

        frame = wx.Frame(None)
        frame.SetSize((640, 690))

        models_controller = ModelCtrl(frame)

        details = models_controller.add_detail_page()
        details.model_object = self.model_obj
        details.populate_grid_by_model_object()

        spatial = models_controller.add_spatial_page()
        iei = spatial.get_input_exchange_item_by_id(self.model_obj.ID)
        igeoms = spatial.get_geometries(iei)

        oei = spatial.get_output_exchange_item_by_id(self.model_obj.ID)
        ogeoms = spatial.get_geometries(oei)

        spatial.set_data(target=igeoms, source=ogeoms)
        spatial.raw_input_data = iei
        spatial.raw_output_data = oei

        spatial.add_input_combo_choices(igeoms.keys())
        spatial.add_output_combo_choices(ogeoms.keys())

        frame.Show()
Пример #2
0
    def on_view_details(self, event):
        """
        Files must be in json format in order for method to work
        :param event:
        :return:
        """
        name = self.tree.GetItemText(self.tree.GetSelection())
        path = self.filepath.get(name)

        if not path:
            return  # Selected a folder or something else

        frame = wx.Frame(None)
        frame.SetSize((640, 690))

        models_controller = ModelCtrl(frame)

        details = models_controller.add_detail_page()
        details.data_path = path
        details.populate_grid_by_path()
        edit = models_controller.add_edit_page()
        edit.file_path = path
        edit.populate_edit()

        frame.Show()
Пример #3
0
    def on_view_details(self, event):
        """
        Files must be in json format in order for method to work
        :param event:
        :return:
        """
        name = self.tree.GetItemText(self.tree.GetSelection())
        path = self.filepath.get(name)

        if not path:
            return  # Selected a folder or something else

        frame = wx.Frame(None)
        frame.SetSize((640, 690))

        models_controller = ModelCtrl(frame)

        details = models_controller.add_detail_page()
        details.data_path = path
        details.populate_grid_by_path()
        edit = models_controller.add_edit_page()
        edit.file_path = path
        edit.populate_edit()

        frame.Show()