Example #1
0
def finalize():
    spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
    ### DO NOT ADD BACK spreadsheetWindow.destroy()
    ### That will crash VisTrails on Mac. 
    ### It is not supposed to be called directly
    spreadsheetWindow.cleanup()
    spreadsheetWindow.deleteLater()
Example #2
0
def finalize():
    spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
    ### DO NOT ADD BACK spreadsheetWindow.destroy()
    ### That will crash VisTrails on Mac. 
    ### It is not supposed to be called directly
    spreadsheetWindow.cleanup()
    spreadsheetWindow.deleteLater()
Example #3
0
def initialize(*args, **keywords):
    """ initialize() -> None
    Package-entry to initialize the package
    
    """
    import vistrails.core.application
    if not vistrails.core.application.is_running_gui():
        raise RuntimeError, "GUI is not running. The Spreadsheet package requires the GUI"

    # initialize widgets
    debug.log('Loading Spreadsheet widgets...')
    global basicWidgets
    if basicWidgets == None:
        basicWidgets = addWidget(
            'vistrails.packages.spreadsheet.basic_widgets')
    importWidgetModules(basicWidgets)

    # Create application if there is no one available
    global app
    app = QtCore.QCoreApplication.instance()
    if app == None:
        app = QtGui.QApplication(sys.argv)
    if hasattr(app, 'builderWindow'):
        global spreadsheetWindow
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow(
            show=False)
    def displayAndWait(self, cellType, inputPorts):
        """ displayAndWait(cellType: python type, iputPorts: tuple)
        Send the message and wait for the cell to complete its movement
        constructed to return it

        Keyword arguments:
        cellType   --- widget type, this is truely a python type
        inputPorts --- a tuple of input data that cellType() will understand
        
        """
        e = self.createDisplayEvent(cellType, inputPorts)
        QtCore.QCoreApplication.processEvents()
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
        if spreadsheetWindow.echoMode == False:
            spreadsheetWindow.configShow(show=True)
        return spreadsheetWindow.displayCellEvent(e)
Example #5
0
    def displayAndWait(self, cellType, inputPorts):
        """ displayAndWait(cellType: python type, iputPorts: tuple)
        Send the message and wait for the cell to complete its movement
        constructed to return it

        Keyword arguments:
        cellType   --- widget type, this is truely a python type
        inputPorts --- a tuple of input data that cellType() will understand
        
        """
        e = self.createDisplayEvent(cellType, inputPorts)
        QtCore.QCoreApplication.processEvents()
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
        if spreadsheetWindow.echoMode == False:
            spreadsheetWindow.configShow(show=True)
        return spreadsheetWindow.displayCellEvent(e)
def initialize(*args, **keywords):
    """ initialize() -> None
    Package-entry to initialize the package
    
    """
    debug.log('Loading Spreadsheet widgets...')
    global basicWidgets
    if basicWidgets==None:
        basicWidgets = addWidget('packages.spreadsheet.basic_widgets')
    importWidgetModules(basicWidgets)

    # Create application if there is no one available
    global app
    app = QtCore.QCoreApplication.instance()
    if app==None:
        app = QtGui.QApplication(sys.argv)
    if hasattr(app, 'builderWindow'):
        global spreadsheetWindow        
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow(show=False)
Example #7
0
    def display_and_wait(self, output_module, configuration, cell_type,
                         input_ports):
        """display_and_wait(output_module: Module,
                            configuration: OutputModeConfig,
                            cell_cls: class,
                            input_ports: tuple) -> None
        Send the message and wait for the cell to complete its movement
        constructed to return it

        """
        e = self.create_display_event(output_module, configuration,
                                      cell_type, input_ports)
        QtCore.QCoreApplication.processEvents()
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
        if spreadsheetWindow.echoMode == False:
            spreadsheetWindow.configShow(show=True)
        cell = spreadsheetWindow.displayCellEvent(e)
        if cell is not None:
            cell.set_output_module(output_module, configuration)
        return cell
Example #8
0
    def display_and_wait(self, output_module, configuration, cell_type,
                         input_ports):
        """display_and_wait(output_module: Module,
                            configuration: OutputModeConfig,
                            cell_cls: class,
                            input_ports: tuple) -> None
        Send the message and wait for the cell to complete its movement
        constructed to return it

        """
        e = self.create_display_event(output_module, configuration, cell_type,
                                      input_ports)
        QtCore.QCoreApplication.processEvents()
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow()
        if spreadsheetWindow.echoMode == False:
            spreadsheetWindow.configShow(show=True)
        cell = spreadsheetWindow.displayCellEvent(e)
        if cell is not None:
            cell.set_output_module(output_module, configuration)
        return cell
Example #9
0
def initialize(*args, **keywords):
    """ initialize() -> None
    Package-entry to initialize the package
    
    """
    import vistrails.core.application
    if not vistrails.core.application.is_running_gui():
        raise RuntimeError, "GUI is not running. The Spreadsheet package requires the GUI"
    
    # initialize widgets
    debug.log('Loading Spreadsheet widgets...')
    global basicWidgets
    if basicWidgets==None:
        basicWidgets = addWidget('vistrails.packages.spreadsheet.basic_widgets')
    importWidgetModules(basicWidgets)

    # Create application if there is no one available
    global app
    app = QtCore.QCoreApplication.instance()
    if app==None:
        app = QtGui.QApplication(sys.argv)
    if hasattr(app, 'builderWindow'):
        global spreadsheetWindow
        spreadsheetWindow = spreadsheetController.findSpreadsheetWindow(show=False)