Beispiel #1
0
    def __init__(self, data, title, flags="chroma", parent=None, **k):
        QWidget.__init__(self, parent)
        MSDialogController.__init__(self, 0, parent)

        self.model = self.qApp.model
        self.view = self.qApp.view

        self.data = data
        self.title = title
        self.flags = flags

        if self.flags == 'peak':
            if self.acTree not in (self.view.treeView_2, self.view.treeView_3):
                print "Unknown Error"
                return
            idx = self.acTree.selectedIndexes()[0]
            s = qApp.instance().dockControl.currentSample[
                1 if self.acTree is self.view.treeView_2 else 2]
            if s is None:
                print "unknow error"
                return
            values = map(float, idx.data().toString().split('/')[:2])
            self.currentPeak = s.peakAt(*values)
            #connection to update the selected Peak object
            self.connect(self.acTree, SIGNAL("changedLine"),
                         self.updateCurrentPeak)

        self.minX, self.maxX, self.maxY = [0] * 3
        #if flags != 'peak':
        #    self.minX, self.maxX, self.maxY = self.getMax()
        self.pw = PlotWidget(self.minX, self.maxX, self.maxY, parent=self,
                             **k)  #parent=self,
        #self.pw.setAttribute(Qt.WA_DeleteOnClose)#plotItem.setAttribute(Qt.WA_PaintOnScreen & Qt.WA_PaintUnclipped)
        if k.get('antialiased', False):
            self.pw.setRenderHint(0x01)  #antialiasing i suppose
        self.pw.setTitle(title)
        self.pw.updateGrid()

        self._setupUi()

        self.connect(self, SIGNAL('linePlotted'), self.updateContextMenu)
        self.connect(self.view.sampleTableView,
                     SIGNAL("disHighlightRequested(QModelIndex)"),
                     self.disHighlightOne)
        self.connect(self.view.sampleTableView,
                     SIGNAL("highlightRequested(QModelIndex)"), self.highlight)
        self.connect(self.view.sampleTableView,
                     SIGNAL("noHighlightRequested()"), self.disHighlight)
        self.connect(self.view.ppmEditer, SIGNAL('valueChanged(double)'),
                     self.redrawAll)

        self.drawnItems = {}
        self.trashItems = []  #why unecessary? nope to collect annotation stuff
        self.textLabels = []
        self.pixmaps = []
        self.dataPoints = None

        self._plotting(self.data)  #initial plotting
Beispiel #2
0
 def __init__(self,lspl, win, creation):
     MSDialogController.__init__(self, lspl, win, creation)
     QObject.connect(self.view.lineEdit, SIGNAL("textChanged(const QString &)"), self.checkLineEdit)
     if paramikoSupport:
         try:
             QObject.connect(self.view.parallel, SIGNAL("clicked()"), self.showSSHConnect)
         except AttributeError:
             pass
     self.checkLineEdit("")
     self.view.exec_()
Beispiel #3
0
 def __init__(self, lspl, win, creation):
     MSDialogController.__init__(self, lspl, win, creation)
     QObject.connect(self.view.lineEdit,
                     SIGNAL("textChanged(const QString &)"),
                     self.checkLineEdit)
     if paramikoSupport:
         try:
             QObject.connect(self.view.parallel, SIGNAL("clicked()"),
                             self.showSSHConnect)
         except AttributeError:
             pass
     self.checkLineEdit("")
     self.view.exec_()
Beispiel #4
0
    def __init__(self, data, title, flags="chroma", parent=None, **k):
        QWidget.__init__(self, parent)
        MSDialogController.__init__(self, 0, parent)
        
        self.model = self.qApp.model
        self.view =  self.qApp.view
      
        self.data=data
        self.title=title
        self.flags=flags
        
        if self.flags == 'peak':
            if self.acTree not in (self.view.treeView_2, self.view.treeView_3):
                print "Unknown Error"
                return
            idx=self.acTree.selectedIndexes()[0]
            s = qApp.instance().dockControl.currentSample[1 if self.acTree is self.view.treeView_2 else 2]
            if s is None:
                print "unknow error"
                return            
            values = map(float, idx.data().toString().split('/')[:2])
            self.currentPeak = s.peakAt(*values)
            #connection to update the selected Peak object
            self.connect(self.acTree, SIGNAL("changedLine"), self.updateCurrentPeak)
        
        self.minX, self.maxX, self.maxY  = [0] * 3
        #if flags != 'peak':
        #    self.minX, self.maxX, self.maxY = self.getMax()
        self.pw = PlotWidget(self.minX, self.maxX, self.maxY,  parent=self, **k)#parent=self,
        #self.pw.setAttribute(Qt.WA_DeleteOnClose)#plotItem.setAttribute(Qt.WA_PaintOnScreen & Qt.WA_PaintUnclipped)
        if k.get('antialiased', False):
            self.pw.setRenderHint(0x01)#antialiasing i suppose
        self.pw.setTitle(title)
        self.pw.updateGrid()

        
        self._setupUi()        
        
        self.connect(self, SIGNAL('linePlotted'), self.updateContextMenu)
        self.connect(self.view.sampleTableView, SIGNAL("disHighlightRequested(QModelIndex)"), self.disHighlightOne)
        self.connect(self.view.sampleTableView, SIGNAL("highlightRequested(QModelIndex)"), self.highlight)
        self.connect(self.view.sampleTableView, SIGNAL("noHighlightRequested()"), self.disHighlight)
        self.connect(self.view.ppmEditer, SIGNAL('valueChanged(double)'), self.redrawAll)
        
        self.drawnItems = {} 
        self.trashItems=[]#why unecessary? nope to collect annotation stuff
        self.textLabels = []
        self.pixmaps = []
        self.dataPoints = None
        
        self._plotting(self.data)#initial plotting
Beispiel #5
0
 def __init__(self, lspl, visu, creation):
     MSDialogController.__init__(self, lspl, visu, creation)
     self.polarity=1 #initialisation
     if not self.model:
         self.goodIdx = 0
     else:
         self.goodIdx = 0 if self.model[0].kind == 'HighRes' else 1
     
     self.populateTableViews(self.polarity)
     self.allAddsChecked = False
     self.allFragsChecked = False
     QObject.connect(self.view.posmode, SIGNAL('toggled(bool)'), self.updatePolarity)
     QObject.connect(self.view.checkAllAdds, SIGNAL('clicked()'), self.checkAdds)
     QObject.connect(self.view.checkAllFrags, SIGNAL('clicked()'), self.checkFrags)
     
     self.view.exec_()
 def __init__(self, lspl, visu, creation, showDirectResult=False):
     """
     constructor 
     
     """
     #data needed to process
     MSDialogController.__init__(self, lspl, visu, creation)
     self.databases ={"KEGG":None,
                      "METJP":None, 
                      "BIOCYC":None,
                      "METEXPLORE":None}
     QObject.connect(self.view.checkBox_8, SIGNAL('toggled(bool)'), self._update)
     self._update(True)#initializing to metexplore so we keep enabled
     self.showDirectResult = showDirectResult        
     
     self.view.exec_()
Beispiel #7
0
    def __init__(self, lspl, visu, creation):
        MSDialogController.__init__(self, lspl, visu, creation)
        self.polarity = 1  #initialisation
        if not self.model:
            self.goodIdx = 0
        else:
            self.goodIdx = 0 if self.model[0].kind == 'HighRes' else 1

        self.populateTableViews(self.polarity)
        self.allAddsChecked = False
        self.allFragsChecked = False
        QObject.connect(self.view.posmode, SIGNAL('toggled(bool)'),
                        self.updatePolarity)
        QObject.connect(self.view.checkAllAdds, SIGNAL('clicked()'),
                        self.checkAdds)
        QObject.connect(self.view.checkAllFrags, SIGNAL('clicked()'),
                        self.checkFrags)

        self.view.exec_()