Ejemplo n.º 1
0
 def openMashup(self, version):
     from vistrails.gui.mashups.mashups_manager import MashupsManager
     item_key = (self.mtrail.id, version)
     if self.apps.has_key(item_key):
         app = self.apps[item_key]
         if app:
             app.activateWindow()
             return
     
     app = MashupsManager.createMashupApp(self.controller, self.mtrail, 
                                          version)
     app.setAttribute(QtCore.Qt.WA_DeleteOnClose)
     app.appWasClosed.connect(self.appWasClosed)
     self.apps[item_key] = app
     app.activateWindow()
     app.raise_()
Ejemplo n.º 2
0
    def openMashup(self, version):
        from vistrails.gui.mashups.mashups_manager import MashupsManager
        item_key = (self.mtrail.id, version)
        if self.apps.has_key(item_key):
            app = self.apps[item_key]
            if app:
                app.activateWindow()
                return

        app = MashupsManager.createMashupApp(self.controller, self.mtrail,
                                             version)
        app.setAttribute(QtCore.Qt.WA_DeleteOnClose)
        app.appWasClosed.connect(self.appWasClosed)
        self.apps[item_key] = app
        app.activateWindow()
        app.raise_()
Ejemplo n.º 3
0
 def exportMashupGUI(self):
     if self.controller:
         dialog = QMashupExportDialog(self)
         if dialog.exec_() == QtGui.QDialog.Accepted:
             result = dialog.btnPressed
             fileName = QtGui.QFileDialog.getSaveFileName(
                        self,
                        "Export Mashup...",
                        vistrails.core.system.vistrails_file_directory(),
                        "VisTrail link files (*.vtl)")
             if fileName:
                 filename = str(fileName)
                 res = MashupsManager.exportMashup(filename, 
                                                   self.controller.originalController, 
                                                   self.controller.mshptrail,
                                                   self.controller.currentVersion,
                                                   result)
                 if not res:
                     show_warning('VisTrails - Exporting Mashup',
                 'There was an error and the mashup could not be exported.')
Ejemplo n.º 4
0
 def exportMashupGUI(self):
     if self.controller:
         dialog = QMashupExportDialog(self)
         if dialog.exec_() == QtGui.QDialog.Accepted:
             result = dialog.btnPressed
             fileName = QtGui.QFileDialog.getSaveFileName(
                 self, "Export Mashup...",
                 vistrails.core.system.vistrails_file_directory(),
                 "VisTrail link files (*.vtl)")
             if fileName:
                 filename = str(fileName)
                 res = MashupsManager.exportMashup(
                     filename, self.controller.originalController,
                     self.controller.mshptrail,
                     self.controller.currentVersion, result)
                 if not res:
                     show_warning(
                         'VisTrails - Exporting Mashup',
                         'There was an error and the mashup could not be exported.'
                     )
Ejemplo n.º 5
0
 def __init__(self, controller=None, parent=None):
     """ QMashupsInspector(controller: MashupController,
                         parent: QWidget) -> QMashupsInspector
     
     """
     QtGui.QFrame.__init__(self, parent)
     QVistrailsPaletteInterface.__init__(self)
     #print "****** Inspector INIT"
     self.set_title("Mashups Inspector")
     self.setFrameStyle(QtGui.QFrame.Panel|QtGui.QFrame.Sunken)
     self.setSizePolicy(QtGui.QSizePolicy.Expanding,
                        QtGui.QSizePolicy.Expanding)
     
     #ok, this will store the original vistrail controller
     self.controller = controller
     self.mshpController = None #MashupController
     self.manager = MashupsManager.getInstance()
     
     layout = QtGui.QVBoxLayout()
     layout.setMargin(2)
     layout.setSpacing(3)
     self.workflowLabel = QtGui.QLabel("Workflow: ")
     layout.addWidget(self.workflowLabel)
     self.mashupsList = QMashupsListPanel(parent=self)
     listLabel = QtGui.QLabel("Available Mashups:")
     layout.addWidget(listLabel)
     layout.addWidget(self.mashupsList)
     
     self.mashupInspector = QMashupProp(parent=self)
     inspector_group = QtGui.QGroupBox("Mashup properties")
     g_layout = QtGui.QVBoxLayout()
     g_layout.setMargin(1)
     g_layout.setSpacing(3)
     g_layout.addWidget(self.mashupInspector)
     inspector_group.setLayout(g_layout)
     layout.addWidget(inspector_group)
     self.setLayout(layout)
Ejemplo n.º 6
0
    def __init__(self, controller=None, parent=None):
        """ QMashupsInspector(controller: MashupController,
                            parent: QWidget) -> QMashupsInspector
        
        """
        QtGui.QFrame.__init__(self, parent)
        QVistrailsPaletteInterface.__init__(self)
        #print "****** Inspector INIT"
        self.set_title("Mashups Inspector")
        self.setFrameStyle(QtGui.QFrame.Panel | QtGui.QFrame.Sunken)
        self.setSizePolicy(QtGui.QSizePolicy.Expanding,
                           QtGui.QSizePolicy.Expanding)

        #ok, this will store the original vistrail controller
        self.controller = controller
        self.mshpController = None  #MashupController
        self.manager = MashupsManager.getInstance()

        layout = QtGui.QVBoxLayout()
        layout.setMargin(2)
        layout.setSpacing(3)
        self.workflowLabel = QtGui.QLabel("Workflow: ")
        layout.addWidget(self.workflowLabel)
        self.mashupsList = QMashupsListPanel(parent=self)
        listLabel = QtGui.QLabel("Available Mashups:")
        layout.addWidget(listLabel)
        layout.addWidget(self.mashupsList)

        self.mashupInspector = QMashupProp(parent=self)
        inspector_group = QtGui.QGroupBox("Mashup properties")
        g_layout = QtGui.QVBoxLayout()
        g_layout.setMargin(1)
        g_layout.setSpacing(3)
        g_layout.addWidget(self.mashupInspector)
        inspector_group.setLayout(g_layout)
        layout.addWidget(inspector_group)
        self.setLayout(layout)