Пример #1
0
 def finalizePlot( self, plot_name ):
     from packages.vtDV3D import ModuleStore
     from packages.vtDV3D.CDMS_VariableReaders import CDMSTransientVariable
     from core.db.action import create_action
     proj_controller = self.app.uvcdatWindow.get_current_project_controller()
     controller = self.app.get_controller()
     plot = proj_controller.plot_registry.add_plot( plot_name, 'DV3D', None, None )
     action = create_action( self.port_ops ) 
     controller.add_new_action(action)
     controller.perform_action(action)
     controller.select_latest_version()
     current_version = controller.current_version
     proj_controller.plot_was_dropped( (plot, self.sheetName, self.row, self.col) )
     proj_controller.execute_plot( current_version )
     controller.change_selected_version( current_version )
     proj_controller.update_plot_configure( self.sheetName, self.row, self.col )
     cell = proj_controller.sheet_map[ self.sheetName ][ ( self.row, self.col ) ]
     cell.current_parent_version = current_version
       
     cell_address = "%s%s" % ( chr(ord('A') + self.col ), self.row + 1 )
     sheetName = proj_controller.current_sheetName
     cell_location = [ proj_controller.name, sheetName, cell_address ]                
     pipeline = controller.current_pipeline              
     for mid in pipeline.modules.keys():
         pmod = ModuleStore.getModule( mid ) 
         if pmod: pmod.setCellLocation( cell_location )
     
     for ( name, var ) in self.variables:
         dvar = CDMSTransientVariable.from_module( var )
         proj_controller.defined_variables[ name ] = dvar
     proj_controller.emit( QtCore.SIGNAL("update_cell"), self.sheetName, self.row, self.col, None, None, 'DV3D', current_version )
Пример #2
0
 def finalizeVariables( self ):
     from packages.vtDV3D.CDMS_VariableReaders import CDMSTransientVariable
     from core.db.action import create_action
     proj_controller = self.app.uvcdatWindow.get_current_project_controller()
     controller = self.app.get_controller()
     action = create_action( self.port_ops ) 
     controller.add_new_action(action)
     controller.perform_action(action)
     controller.select_latest_version()
     current_version = controller.current_version        
     for ( name, var ) in self.variables:
         dvar = CDMSTransientVariable.from_module( var )
         proj_controller.defined_variables[ name ] = dvar
Пример #3
0
 def finalizeVariables(self):
     from packages.vtDV3D.CDMS_VariableReaders import CDMSTransientVariable
     from core.db.action import create_action
     proj_controller = self.app.uvcdatWindow.get_current_project_controller(
     )
     controller = self.app.get_controller()
     action = create_action(self.port_ops)
     controller.add_new_action(action)
     controller.perform_action(action)
     controller.select_latest_version()
     current_version = controller.current_version
     for (name, var) in self.variables:
         dvar = CDMSTransientVariable.from_module(var)
         proj_controller.defined_variables[name] = dvar
Пример #4
0
    def finalizePlot(self, plot_name):
        from packages.vtDV3D import ModuleStore
        from packages.vtDV3D.CDMS_VariableReaders import CDMSTransientVariable
        from core.db.action import create_action
        proj_controller = self.app.uvcdatWindow.get_current_project_controller(
        )
        controller = self.app.get_controller()
        plot = proj_controller.plot_registry.add_plot(plot_name, 'DV3D', None,
                                                      None)
        action = create_action(self.port_ops)
        controller.add_new_action(action)
        controller.perform_action(action)
        controller.select_latest_version()
        current_version = controller.current_version
        proj_controller.plot_was_dropped(
            (plot, self.sheetName, self.row, self.col))
        proj_controller.execute_plot(current_version)
        controller.change_selected_version(current_version)
        proj_controller.update_plot_configure(self.sheetName, self.row,
                                              self.col)
        cell = proj_controller.sheet_map[self.sheetName][(self.row, self.col)]
        cell.current_parent_version = current_version

        cell_address = "%s%s" % (chr(ord('A') + self.col), self.row + 1)
        sheetName = proj_controller.current_sheetName
        cell_location = [proj_controller.name, sheetName, cell_address]
        pipeline = controller.current_pipeline
        for mid in pipeline.modules.keys():
            pmod = ModuleStore.getModule(mid)
            if pmod: pmod.setCellLocation(cell_location)

        for (name, var) in self.variables:
            dvar = CDMSTransientVariable.from_module(var)
            proj_controller.defined_variables[name] = dvar
        proj_controller.emit(QtCore.SIGNAL("update_cell"), self.sheetName,
                             self.row, self.col, None, None, 'DV3D',
                             current_version)