Exemplo n.º 1
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # get the tool
        if evt != None:
            tool = 'errors'
            if evt and evt.GetId() == ID_matchErrors:
                tool = 'errors'
            elif evt and evt.GetId() == ID_matchSummary:
                tool = 'summary'

        # set current tool
        self.currentTool = tool

        # hide panels
        self.mainSizer.Hide(2)
        self.mainSizer.Hide(3)

        # set icons off
        self.errors_butt.SetBitmapLabel(images.lib['matchErrorsOff'])
        self.summary_butt.SetBitmapLabel(images.lib['matchSummaryOff'])

        # set panel
        if tool == 'errors':
            self.mainSizer.Show(2)
            self.errors_butt.SetBitmapLabel(images.lib['matchErrorsOn'])

        elif tool == 'summary':
            self.mainSizer.Show(3)
            self.summary_butt.SetBitmapLabel(images.lib['matchSummaryOn'])

        # fit layout
        mwx.layout(self, self.mainSizer)
Exemplo n.º 2
0
    def makeGUI(self):
        """Make panel gui."""

        # make toolbar
        toolbar = self.makeToolbar()
        controlbar = self.makeControlbar()

        # make panels
        results = self.makeResultsPanel()
        gauge = self.makeGaugePanel()

        # pack element
        self.mainSizer = wx.BoxSizer(wx.VERTICAL)
        self.mainSizer.Add(toolbar, 0, wx.EXPAND, 0)
        self.mainSizer.Add(controlbar, 0, wx.EXPAND, 0)
        self.mainSizer.Add(results, 1, wx.EXPAND, 0)
        self.mainSizer.Add(gauge, 0, wx.EXPAND, 0)

        # hide gauge
        self.mainSizer.Hide(3)

        # fit layout
        self.mainSizer.Fit(self)
        self.SetSizer(self.mainSizer)
        self.SetMinSize(self.GetSize())
        mwx.layout(self, self.mainSizer)
Exemplo n.º 3
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # get the tool
     if evt != None:
         tool = 'errors'
         if evt and evt.GetId() == ID_matchErrors:
             tool = 'errors'
         elif evt and evt.GetId() == ID_matchSummary:
             tool = 'summary'
     
     # set current tool
     self.currentTool = tool
     
     # hide panels
     self.mainSizer.Hide(2)
     self.mainSizer.Hide(3)
     
     # set icons off
     self.errors_butt.SetBitmapLabel(images.lib['matchErrorsOff'])
     self.summary_butt.SetBitmapLabel(images.lib['matchSummaryOff'])
     
     # set panel
     if tool == 'errors':
         self.mainSizer.Show(2)
         self.errors_butt.SetBitmapLabel(images.lib['matchErrorsOn'])
         
     elif tool == 'summary':
         self.mainSizer.Show(3)
         self.summary_butt.SetBitmapLabel(images.lib['matchSummaryOn'])
     
     # fit layout
     mwx.layout(self, self.mainSizer)
Exemplo n.º 4
0
 def makeGUI(self):
     """Make panel gui."""
     
     # make toolbar
     toolbar = self.makeToolbar()
     controlbar = self.makeControlbar()
     
     # make panels
     results = self.makeResultsPanel()
     gauge = self.makeGaugePanel()
     
     # pack element
     self.mainSizer = wx.BoxSizer(wx.VERTICAL)
     self.mainSizer.Add(toolbar, 0, wx.EXPAND, 0)
     self.mainSizer.Add(controlbar, 0, wx.EXPAND, 0)
     self.mainSizer.Add(results, 1, wx.EXPAND, 0)
     self.mainSizer.Add(gauge, 0, wx.EXPAND, 0)
     
     # hide gauge
     self.mainSizer.Hide(3)
     
     # fit layout
     self.mainSizer.Fit(self)
     self.SetSizer(self.mainSizer)
     self.SetMinSize(self.GetSize())
     mwx.layout(self, self.mainSizer)
Exemplo n.º 5
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # get the tool
        if evt != None:
            tool = "references"
            if evt.GetId() == ID_calibrationReferences:
                tool = "references"
            elif evt.GetId() == ID_calibrationErrors:
                tool = "errors"

        # set current tool
        self.currentTool = tool

        # hide panels
        self.mainSizer.Hide(1)
        self.mainSizer.Hide(2)

        # set icons off
        self.references_butt.SetBitmapLabel(images.lib["calibrationReferencesOff"])
        self.errors_butt.SetBitmapLabel(images.lib["calibrationErrorsOff"])

        # set panel
        if tool == "references":
            self.SetTitle("Calibration")
            self.references_butt.SetBitmapLabel(images.lib["calibrationReferencesOn"])
            self.mainSizer.Show(1)

        elif tool == "errors":
            self.SetTitle("Error Plot")
            self.errors_butt.SetBitmapLabel(images.lib["calibrationErrorsOn"])
            self.mainSizer.Show(2)

        # fit layout
        mwx.layout(self, self.mainSizer)
Exemplo n.º 6
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # get the tool
     if evt != None:
         tool = 'pmf'
         if evt and evt.GetId() == ID_profoundPMF:
             tool = 'pmf'
         elif evt and evt.GetId() == ID_profoundQuery:
             tool = 'query'
     
     # set current tool
     self.currentTool = tool
     
     # hide panels
     self.mainSizer.Hide(1)
     self.mainSizer.Hide(2)
     
     # set icons off
     self.pmf_butt.SetBitmapLabel(images.lib['profoundPMFOff'])
     self.query_butt.SetBitmapLabel(images.lib['profoundQueryOff'])
     
     # set panel
     if tool == 'pmf':
         self.SetTitle("ProFound - Peptide Mass Fingerprint")
         self.mainSizer.Show(1)
         self.pmf_butt.SetBitmapLabel(images.lib['profoundPMFOn'])
     
     elif tool == 'query':
         self.SetTitle("ProFound - Peak List")
         self.mainSizer.Show(2)
         self.query_butt.SetBitmapLabel(images.lib['profoundQueryOn'])
     
     # fit layout
     mwx.layout(self, self.mainSizer)
Exemplo n.º 7
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # get the tool
        if evt != None:
            tool = 'summary'
            if evt and evt.GetId() == ID_massCalculatorSummary:
                tool = 'summary'
            elif evt and evt.GetId() == ID_massCalculatorIonSeries:
                tool = 'ionseries'
            elif evt and evt.GetId() == ID_massCalculatorPattern:
                tool = 'pattern'

        # set current tool
        self.currentTool = tool

        # hide panels
        self.mainSizer.Hide(1)
        self.mainSizer.Hide(2)
        self.mainSizer.Hide(3)

        # hide save button
        self.toolbar.Hide(7)
        self.toolbar.Hide(8)

        # set icons off
        self.summary_butt.SetBitmapLabel(
            images.lib['massCalculatorSummaryOff'])
        self.ionseries_butt.SetBitmapLabel(
            images.lib['massCalculatorIonSeriesOff'])
        self.pattern_butt.SetBitmapLabel(
            images.lib['massCalculatorPatternOff'])

        # set panel
        if tool == 'summary':
            self.SetTitle("Compound Summary")
            self.mainSizer.Show(1)
            self.summary_butt.SetBitmapLabel(
                images.lib['massCalculatorSummaryOn'])

        elif tool == 'ionseries':
            self.SetTitle("Ion Series")
            self.mainSizer.Show(2)
            self.ionseries_butt.SetBitmapLabel(
                images.lib['massCalculatorIonSeriesOn'])

        elif tool == 'pattern':
            self.SetTitle("Isotopic Pattern")
            self.mainSizer.Show(3)
            self.toolbar.Show(7)
            self.toolbar.Show(8)
            self.pattern_butt.SetBitmapLabel(
                images.lib['massCalculatorPatternOn'])
            self.patternCollapse_butt.SetBitmapLabel(images.lib['arrowsDown'])

        # fit layout
        mwx.layout(self, self.mainSizer)
Exemplo n.º 8
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # check processing
        if self.processing != None:
            wx.Bell()
            return

        # get the tool
        if evt != None:
            tool = 'image'
            if evt.GetId() == ID_documentExportImage:
                tool = 'image'
            elif evt.GetId() == ID_documentExportPeaklist:
                tool = 'peaklist'
            elif evt.GetId() == ID_documentExportSpectrum:
                tool = 'spectrum'

        # set current tool
        self.currentTool = tool

        # hide panels
        self.mainSizer.Hide(1)
        self.mainSizer.Hide(2)
        self.mainSizer.Hide(3)

        # set icons off
        self.image_butt.SetBitmapLabel(images.lib['documentExportImageOff'])
        self.peaklist_butt.SetBitmapLabel(
            images.lib['documentExportPeaklistOff'])
        self.spectrum_butt.SetBitmapLabel(
            images.lib['documentExportSpectrumOff'])

        # set panel
        if tool == 'image':
            self.SetTitle("Export Spectrum Image")
            self.mainSizer.Show(1)
            self.image_butt.SetBitmapLabel(images.lib['documentExportImageOn'])

        elif tool == 'peaklist':
            self.SetTitle("Export Peak List")
            self.mainSizer.Show(2)
            self.peaklist_butt.SetBitmapLabel(
                images.lib['documentExportPeaklistOn'])

        elif tool == 'spectrum':
            self.SetTitle("Export Spectrum Data")
            self.mainSizer.Show(3)
            self.spectrum_butt.SetBitmapLabel(
                images.lib['documentExportSpectrumOn'])

        # fit layout
        mwx.layout(self, self.mainSizer)
Exemplo n.º 9
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # get the tool
     if evt != None:
         tool = 'summary'
         if evt and evt.GetId() == ID_massCalculatorSummary:
             tool = 'summary'
         elif evt and evt.GetId() == ID_massCalculatorIonSeries:
             tool = 'ionseries'
         elif evt and evt.GetId() == ID_massCalculatorPattern:
             tool = 'pattern'
     
     # set current tool
     self.currentTool = tool
     
     # hide panels
     self.mainSizer.Hide(1)
     self.mainSizer.Hide(2)
     self.mainSizer.Hide(3)
     
     # hide save button
     self.toolbar.Hide(7)
     self.toolbar.Hide(8)
     
     # set icons off
     self.summary_butt.SetBitmapLabel(images.lib['massCalculatorSummaryOff'])
     self.ionseries_butt.SetBitmapLabel(images.lib['massCalculatorIonSeriesOff'])
     self.pattern_butt.SetBitmapLabel(images.lib['massCalculatorPatternOff'])
     
     # set panel
     if tool == 'summary':
         self.SetTitle("Compound Summary")
         self.mainSizer.Show(1)
         self.summary_butt.SetBitmapLabel(images.lib['massCalculatorSummaryOn'])
         
     elif tool == 'ionseries':
         self.SetTitle("Ion Series")
         self.mainSizer.Show(2)
         self.ionseries_butt.SetBitmapLabel(images.lib['massCalculatorIonSeriesOn'])
         
     elif tool == 'pattern':
         self.SetTitle("Isotopic Pattern")
         self.mainSizer.Show(3)
         self.toolbar.Show(7)
         self.toolbar.Show(8)
         self.pattern_butt.SetBitmapLabel(images.lib['massCalculatorPatternOn'])
         self.patternCollapse_butt.SetBitmapLabel(images.lib['arrowsDown'])
     
     # fit layout
     mwx.layout(self, self.mainSizer)
Exemplo n.º 10
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # check processing
     if self.processing != None:
         wx.Bell()
         return
     
     # get the tool
     if evt != None:
         tool = 'image'
         if evt.GetId() == ID_documentExportImage:
             tool = 'image'
         elif evt.GetId() == ID_documentExportPeaklist:
             tool = 'peaklist'
         elif evt.GetId() == ID_documentExportSpectrum:
             tool = 'spectrum'
     
     # set current tool
     self.currentTool = tool
     
     # hide panels
     self.mainSizer.Hide(1)
     self.mainSizer.Hide(2)
     self.mainSizer.Hide(3)
     
     # set icons off
     self.image_butt.SetBitmapLabel(images.lib['documentExportImageOff'])
     self.peaklist_butt.SetBitmapLabel(images.lib['documentExportPeaklistOff'])
     self.spectrum_butt.SetBitmapLabel(images.lib['documentExportSpectrumOff'])
     
     # set panel
     if tool == 'image':
         self.SetTitle("Export Spectrum Image")
         self.mainSizer.Show(1)
         self.image_butt.SetBitmapLabel(images.lib['documentExportImageOn'])
         
     elif tool == 'peaklist':
         self.SetTitle("Export Peak List")
         self.mainSizer.Show(2)
         self.peaklist_butt.SetBitmapLabel(images.lib['documentExportPeaklistOn'])
         
     elif tool == 'spectrum':
         self.SetTitle("Export Spectrum Data")
         self.mainSizer.Show(3)
         self.spectrum_butt.SetBitmapLabel(images.lib['documentExportSpectrumOn'])
     
     # fit layout
     mwx.layout(self, self.mainSizer)
Exemplo n.º 11
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # get the tool
     if evt != None:
         tool = 'summary'
         if evt.GetId() == ID_documentInfoSummary:
             tool = 'summary'
         elif evt.GetId() == ID_documentInfoSpectrum:
             tool = 'spectrum'
         elif evt.GetId() == ID_documentInfoNotes:
             tool = 'notes'
     
     # set current tool
     self.currentTool = tool
     
     # hide panels
     self.mainSizer.Hide(1)
     self.mainSizer.Hide(2)
     self.mainSizer.Hide(3)
     
     # hide presets button
     self.toolbar.Hide(5)
     
     # set icons off
     self.summary_butt.SetBitmapLabel(images.lib['documentInfoSummaryOff'])
     self.spectrum_butt.SetBitmapLabel(images.lib['documentInfoSpectrumOff'])
     self.notes_butt.SetBitmapLabel(images.lib['documentInfoNotesOff'])
     
     # set panel
     if tool == 'summary':
         self.SetTitle("Document Summary")
         self.mainSizer.Show(1)
         self.toolbar.Show(5)
         self.summary_butt.SetBitmapLabel(images.lib['documentInfoSummaryOn'])
         
     elif tool == 'spectrum':
         self.SetTitle("Spectrum Info")
         self.mainSizer.Show(2)
         self.spectrum_butt.SetBitmapLabel(images.lib['documentInfoSpectrumOn'])
         
     elif tool == 'notes':
         self.SetTitle("Analysis Notes")
         self.mainSizer.Show(3)
         self.notes_butt.SetBitmapLabel(images.lib['documentInfoNotesOn'])
     
     # fit layout
     mwx.layout(self, self.mainSizer)
Exemplo n.º 12
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # get the tool
        if evt != None:
            tool = 'compounds'
            if evt.GetId() == ID_compoundsSearchCompounds:
                tool = 'compounds'
            elif evt.GetId() == ID_compoundsSearchFormula:
                tool = 'formula'

        # set current tool
        self.currentTool = tool

        # hide toolbars
        self.toolbar.Hide(5)
        self.toolbar.Hide(6)

        # set icons off
        self.compounds_butt.SetBitmapLabel(
            images.lib['compoundsSearchCompoundsOff'])
        self.formula_butt.SetBitmapLabel(
            images.lib['compoundsSearchFormulaOff'])

        # set panel
        if tool == 'compounds':
            self.SetTitle("Compounds Search")
            self.tool_label.SetLabel('Compounds:')
            self.compounds_butt.SetBitmapLabel(
                images.lib['compoundsSearchCompoundsOn'])
            self.toolbar.Show(5)

        elif tool == 'formula':
            self.SetTitle("Formula Search")
            self.tool_label.SetLabel('Formula:')
            self.formula_butt.SetBitmapLabel(
                images.lib['compoundsSearchFormulaOn'])
            self.toolbar.Show(6)

        # fit layout
        self.toolbar.Layout()
        mwx.layout(self, self.mainSizer)
Exemplo n.º 13
0
 def onToolSelected(self, evt=None, tool=None):
     """Selected tool."""
     
     # get the tool
     if evt != None:
         tool = 'compounds'
         if evt.GetId() == ID_compoundsSearchCompounds:
             tool = 'compounds'
         elif evt.GetId() == ID_compoundsSearchFormula:
             tool = 'formula'
     
     # set current tool
     self.currentTool = tool
     
     # hide toolbars
     self.toolbar.Hide(5)
     self.toolbar.Hide(6)
     
     # set icons off
     self.compounds_butt.SetBitmapLabel(images.lib['compoundsSearchCompoundsOff'])
     self.formula_butt.SetBitmapLabel(images.lib['compoundsSearchFormulaOff'])
     
     # set panel
     if tool == 'compounds':
         self.SetTitle("Compounds Search")
         self.tool_label.SetLabel('Compounds:')
         self.compounds_butt.SetBitmapLabel(images.lib['compoundsSearchCompoundsOn'])
         self.toolbar.Show(5)
         
     elif tool == 'formula':
         self.SetTitle("Formula Search")
         self.tool_label.SetLabel('Formula:')
         self.formula_butt.SetBitmapLabel(images.lib['compoundsSearchFormulaOn'])
         self.toolbar.Show(6)
     
     # fit layout
     self.toolbar.Layout()
     mwx.layout(self, self.mainSizer)
Exemplo n.º 14
0
    def onToolSelected(self, evt=None, tool=None):
        """Selected tool."""

        # get the tool
        if evt != None:
            tool = 'references'
            if evt.GetId() == ID_calibrationReferences:
                tool = 'references'
            elif evt.GetId() == ID_calibrationErrors:
                tool = 'errors'

        # set current tool
        self.currentTool = tool

        # hide panels
        self.mainSizer.Hide(1)
        self.mainSizer.Hide(2)

        # set icons off
        self.references_butt.SetBitmapLabel(
            images.lib['calibrationReferencesOff'])
        self.errors_butt.SetBitmapLabel(images.lib['calibrationErrorsOff'])

        # set panel
        if tool == 'references':
            self.SetTitle("Calibration")
            self.references_butt.SetBitmapLabel(
                images.lib['calibrationReferencesOn'])
            self.mainSizer.Show(1)

        elif tool == 'errors':
            self.SetTitle("Error Plot")
            self.errors_butt.SetBitmapLabel(images.lib['calibrationErrorsOn'])
            self.mainSizer.Show(2)

        # fit layout
        mwx.layout(self, self.mainSizer)