ccpn.ui.gui.lib package¶
Module Documentation here
Subpackages¶
- ccpn.ui.gui.lib.OpenGL package
- Submodules
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGL module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLABC module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLArrays module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLDefs module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLExport module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLFonts module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLGlobal module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLIntegral module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLLabelling module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLMultiplet module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLNotifier module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLPeak module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLSandbox module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLShader module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLSimpleLabels module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLViewports module
- ccpn.ui.gui.lib.OpenGL.CcpnOpenGLWidgets module
- ccpn.ui.gui.lib.OpenGL.setup module
- ccpn.ui.gui.lib.chemometrics package
Submodules¶
ccpn.ui.gui.lib.ChangeStateHandler module¶
Module Documentation here
- class ccpn.ui.gui.lib.ChangeStateHandler.ChangeDict(enabled=True, *args, **kwds)[source]¶
Bases:
collections.OrderedDict
Dict that contains the changes that are applied to a popup Can be enabled or disabled
- property enabled¶
- None, mutable -
- class ccpn.ui.gui.lib.ChangeStateHandler.changeState(widget, allChanges, applyState, revertState, okButton, applyButton, revertButton, numApplies)¶
Bases:
tuple
- allChanges¶
Alias for field number 1
- applyButton¶
Alias for field number 5
- applyState¶
Alias for field number 2
- numApplies¶
Alias for field number 7
- okButton¶
Alias for field number 4
- revertButton¶
Alias for field number 6
- revertState¶
Alias for field number 3
- widget¶
Alias for field number 0
ccpn.ui.gui.lib.GuiGenerator module¶
ccpn.ui.gui.lib.GuiIntegralListView module¶
Get the regions between two peak Limits and fill the area under the curve.
- class ccpn.ui.gui.lib.GuiIntegralListView.GuiIntegralListView[source]¶
Bases:
ccpn.ui.gui.lib.GuiListView.GuiListViewABC
integralList is the CCPN wrapper object
ccpn.ui.gui.lib.GuiListView module¶
Module Documentation here
ccpn.ui.gui.lib.GuiMainWindow module¶
This Module implements the main graphics window functionality It works in concert with a wrapper object for storing/retrieving attibute values
- class ccpn.ui.gui.lib.GuiMainWindow.GuiMainWindow(application=None)[source]¶
Bases:
ccpn.ui.gui.lib.GuiWindow.GuiWindow
,PyQt5.QtWidgets.QMainWindow
- WindowMaximiseMinimise¶
- property modules¶
- None, immutable - Return tuple of modules currently displayed
- property project: ccpn.core.Project.Project¶
- ccpn.core.Project.Project, immutable - The current project
- showNefPopup(path=None)[source]¶
Query for a Nef file if path is None Opens the Nef import popup If path specified then opens popup to the file otherwise opens load dialog
- property ui¶
- None, immutable - The application.ui instance; eg. the gui
ccpn.ui.gui.lib.GuiMultipletListView module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiMultipletListView.GuiMultipletListView[source]¶
Bases:
ccpn.ui.gui.lib.GuiListView.GuiListViewABC
multipletList is the CCPN wrapper object
ccpn.ui.gui.lib.GuiNotifier module¶
Notifier extensions for Gui objects, wrapping it into a class that also acts as the called function, displatching the ‘user’ callback if required. The Notifier can be defined relative to any valid V3 Widget object as it first checks if the triggered signature is valid.
The callback function is passed a callback dictionary with relevant info (see docstring of Notifier class. This idea was copied from the Traitlets package.
Very similar (and if fact based upon) the Notifier Class for core objects, but separate to keep graphics code isolated
April 2017: First design by Geerten Vuister
- class ccpn.ui.gui.lib.GuiNotifier.GuiNotifier(theObject: Any, triggers: list, targetName: list, callback: Callable[[...], Optional[str]], debug=False, **kwargs)[source]¶
Bases:
ccpn.core.lib.Notifiers.NotifierABC
GuiNotifier class:
triggers callback function with signature: callback(callbackDict [, *args] [, **kwargs])
- Notifier.DROPEVENT [dropTargets] theObject, theObject should inherit from QtWidgets.QWidget
and be droppable
- targetName targetName: optional dropTargets to filter for
before callback (None to skip), as defined in DropBase
trigger, notifier, event, isCcpnJson, [dropTargets]
dropTargets: keywords defining type of dropped objects: currently implemented: ‘urls’, ‘text’, ‘pids’ (see DropBase)
Implemention:
The callback provides a dict with several key, value pairs and optional arguments and/or keyword arguments if defined in the instantiation of the Notifier object. (idea following the Traitlets concept). Note that this dict also contains a reference to the GuiNotifier object itself; this way it can be used to pass-on additional implementation specfic information to the callback function.
On Intialisation, the GuiNotifier instance sets the appropriate callback functions of the widget, as defined in DropBase, from which each Ccpn-Widget derives.
- DRAGMOVEEVENT = 'dragMoveEvent'¶
- DROPEVENT = 'dropEvent'¶
- ENTEREVENT = 'enterEvent'¶
ccpn.ui.gui.lib.GuiPath module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiPath.PathEdit(parent, fileMode='Path', **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.LineEdit.LineEdit
LineEdit widget that contains validator for checking filePaths exists
ccpn.ui.gui.lib.GuiPeakListView module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiPeakListView.GuiPeakListView[source]¶
Bases:
ccpn.ui.gui.lib.GuiListView.GuiListViewABC
peakList is the CCPN wrapper object
ccpn.ui.gui.lib.GuiSpectrumDisplay module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiSpectrumDisplay.GuiSpectrumDisplay(mainWindow, useScrollArea=False)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
Main spectrum display Module object.
This module inherits the following attributes from the SpectrumDisplay wrapper class:
- title Name of spectrumDisplay;
:return <str>
- stripDirection Strip axis direction
:return <str>:(‘X’, ‘Y’, None) - None only for non-strip plots
- stripCount Number of strips
:return <str>.
- comment Free-form text comment
comment = <str> :return <str>
- axisCodes Fixed string Axis codes in original display order
:return <tuple>:(X, Y, Z1, Z2, …)
- axisOrder String Axis codes in display order, determine axis display order
axisOrder = <sequence>:(X, Y, Z1, Z2, …) :return <tuple>:(X, Y, Z1, Z2, …)
- is1D True if this is a 1D display
:return <bool>
- window Gui window showing SpectrumDisplay
window = <Window> :return <Window>
- nmrResidue NmrResidue attached to SpectrumDisplay
nmrResidue = <NmrResidue> :return <NmrResidue>
- positions Axis centre positions, in display order
positions = <Tuple> :return <Tuple>
- widths Axis display widths, in display order
widths = <Tuple> :return <Tuple>
- units Axis units, in display order
:return <Tuple>
resetAxisOrder Reset display to original axis order findAxis Find axis
- findAxis(axisCode)
:param axisCode :return axis
- MAXPEAKLABELTYPES = 0¶
- MAXPEAKSYMBOLTYPES = 0¶
- addStrip(strip=None) GuiStripNd [source]¶
Creates a new strip by cloning strip with index (default the last) in the display.
- attachZPlaneWidgets()[source]¶
Attach the strip zPlane navigation widgets for the strips to the correct containers
- clearContourAttributes()[source]¶
Clear all the contour attributes associated with the spectrumViews in the spectrumDisplay Attributes will revert to the spectrum values
- property columnCount¶
- None, immutable - Strip column count. This is independent of the stripArrangement and always returns the same value. If stripArrangement is ‘Y’, strips are in a row and ‘column’ will return the visible column count If stripArrangement is ‘X’, strips are in a column and ‘column’ will return the visible row count
- copyContourAttributesFromSpectra()[source]¶
Copy all the contour attributes associated with a spectrumView.spectrum to the spectrumView for all spectrumViews in the spectrumDisplay
- deleteStrip(strip)[source]¶
Delete a strip from the spectrumDisplay
- Parameters
strip – strip to delete as object or pid
- displaySpectrum(spectrum)[source]¶
Display spectrum, with spectrum axes ordered according to display axisCodes :return SpectrumView instance or None
- getVisibleSpectra() list [source]¶
Return a list of spectra currently visible in the spectrumDisplay
- includeSettingsWidget = True¶
- property isGrouped¶
- None, mutable - Return whether the spectrumDisplay contains grouped spectra
- makeStripPlot(peaks=None, nmrResidues=None, autoClearMarks=True, sequentialStrips=True, markPositions=True, widths=None)[source]¶
Make a list of strips in the current spectrumDisplay based on the list of peaks or the list of nmrResidues passing in Can only choose either peaks or nmrResidues, peaks chosen will override any selected nmrResidues
- maxSettingsState = 2¶
- restoreWidgetsState(**widgetsState)[source]¶
Restore the gui params. To Call it: _setParams(**{“variableName”:”value”})
This is automatically called after every restoration and after the module has been initialised. Subclass this for a custom behaviour. for example custom callback after the widgets have been restored. Subclass like this:
- Parameters
widgetsState –
- property rowCount¶
- None, immutable - Strip row count. This is independent of the stripArrangement and always returns the same value. If stripArrangement is ‘Y’, strips are in a row and ‘row’ will return the visible row count If stripArrangement is ‘X’, strips are in a column and ‘row’ will return the visible column count
- setColumnStretches(stretchValue=False, scaleFactor=1.0, widths=True, minimumWidth=None, deletingStrip=False)[source]¶
Set the column widths of the strips so that the last strip accommodates the axis bar if necessary.
- setScrollbarPolicies(horizontal='asNeeded', vertical='asNeeded')[source]¶
Set the scrolbar policies; convenience to expose to the user
- setVisibleAxes()[source]¶
Set which of the axis widgets are visible based on the strip tilePositions and stripArrangement
- setVisibleSpectrum(spectrum, visible)[source]¶
Toggle on/off a spectrum from the visible spectra :param spectrum: :param visible: bool. True to show, False to hide :return:
- settingsMinimumSizes = (250, 50)¶
- settingsPosition = 'left'¶
- showAxes(strips=None, stretchValue=False, widths=True, minimumWidth=100, deletingStrip=False)[source]¶
- property stripArrangement¶
- None, mutable - Strip axis direction (‘X’, ‘Y’, ‘T’, None) - None only for non-strip plots
- stripAtTilePosition(tilePosition: Tuple[int, int]) Strip [source]¶
Return the strip at a given tilePosition
- stripColumn()[source]¶
Return the ordered stripColumn at a given column tilePositions are independent of stripArrangement
- stripRow()[source]¶
Return the ordered stripRow at a given row tilePositions are independent of stripArrangement
- toggleCrosshair()[source]¶
Toggles whether cross hair is displayed in all strips of spectrum display.
- toggleDoubleCrosshair()[source]¶
Toggles whether double cross hairs are displayed in all strips of spectrum display.
- toggleSideBands()[source]¶
Toggles whether sideBands are displayed in all strips of spectrum display.
- None, mutable - Position of the zPlane navigation buttons
ccpn.ui.gui.lib.GuiSpectrumView module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiSpectrumView.GuiSpectrumView[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsObject
- class ccpn.ui.gui.lib.GuiSpectrumView.SpectrumViewParams(valuePerPoint, pointCount, minAliasedFrequency, maxAliasedFrequency, minSpectrumFrequency, maxSpectrumFrequency, axisReversed, spectralWidth, aliasingIndex, foldingMode, regionBounds, minFoldingFrequency, maxFoldingFrequency, isTimeDomain)¶
Bases:
tuple
- aliasingIndex¶
Alias for field number 8
- axisReversed¶
Alias for field number 6
- foldingMode¶
Alias for field number 9
- isTimeDomain¶
Alias for field number 13
- maxAliasedFrequency¶
Alias for field number 3
- maxFoldingFrequency¶
Alias for field number 12
- maxSpectrumFrequency¶
Alias for field number 5
- minAliasedFrequency¶
Alias for field number 2
- minFoldingFrequency¶
Alias for field number 11
- minSpectrumFrequency¶
Alias for field number 4
- pointCount¶
Alias for field number 1
- regionBounds¶
Alias for field number 10
- spectralWidth¶
Alias for field number 7
- valuePerPoint¶
Alias for field number 0
ccpn.ui.gui.lib.GuiSpectrumView1d module¶
Module Documentation here
ccpn.ui.gui.lib.GuiSpectrumViewNd module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiSpectrumViewNd.AxisPlaneData(startPoint, endPoint, pointCount)¶
Bases:
tuple
- endPoint¶
Alias for field number 1
- pointCount¶
Alias for field number 2
- startPoint¶
Alias for field number 0
- class ccpn.ui.gui.lib.GuiSpectrumViewNd.GuiSpectrumViewNd[source]¶
Bases:
ccpn.ui.gui.lib.GuiSpectrumView.GuiSpectrumView
- property traceScale: float¶
- float, mutable - Scale for trace in this spectrumView
ccpn.ui.gui.lib.GuiStrip module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiStrip.GuiStrip(spectrumDisplay)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
- property aliasEnabled¶
- None, mutable - Get aliasEnabled for the strip
- property aliasLabelsEnabled¶
- None, mutable - Get aliasLabelsEnabled for the strip
- property aliasShade¶
- None, mutable - Get aliasShade for the strip
- property contextMenuMode¶
- None, mutable -
- property contourThickness¶
- None, mutable - Get the contour thickness for the strip
- createPeak(ppmPositions: List[float]) Tuple[Tuple[ccpn.core.Peak.Peak, ...], Tuple[ccpn.core.PeakList.PeakList, ...]] [source]¶
Create peak at position for all spectra currently displayed in strip.
- property crosshairVisible¶
- None, mutable - True if crosshair is visible.
- property doubleCrosshairVisible¶
- None, mutable - True if doubleCrosshair is visible.
- firstVisibleSpectrum()[source]¶
return the first visible spectrum in the strip, or the first if none are visible.
- getAxisRegion(axisIndex)[source]¶
Return the region currently displayed in the strip as tuple(min, max) for given axis. axisIndex is the screen axis; X is 0, Y is 1
- getAxisRegions() Tuple[Tuple, ...] [source]¶
Return a tuple if tuples for the regions ((min, max), …) Visible direction of axes is not preserved
- property gridVisible¶
- None, mutable - True if grid is visible.
- makeStripPlot(includePeakLists=True, includeNmrChains=True, includeSpectrumTable=False)[source]¶
Make a strip plot in the current spectrumDisplay
- property multipletLabelsEnabled¶
- None, mutable - Get multipletLabelsEnabled for the strip
Navigate to peak.position, optionally setting widths of this Strip
Navigate to positions, optionally setting widths of this Strip
- optionsChanged¶
- property peakLabelsEnabled¶
- None, mutable - Get peakLabelsEnabled for the strip
- pickPeaks(regions: List[Tuple[float, float]]) list [source]¶
Peak-pick in regions for all spectra currently displayed in the strip. :param regions: a list of (minVal,maxVal) tuples in display order :return a list of Peak instances
- report()[source]¶
Generate a drawing object that can be added to reports :return reportlab drawing object:
- restoreZoomFromState(zoomState)[source]¶
Restore zoom from a saved state :param zoomState: list of Axis coordinate Left, Right, Bottom, Top
- setAxesVisible(rightAxisVisible=True, bottomAxisVisible=False)[source]¶
Set the visibility of strip axes
- setAxisPosition(axisIndex, position, rescale=True, update=True)[source]¶
Set the axis position of the strip if rescale is False, the symbols, etc., must explicitly be refreshed
- setAxisRegion(axisIndex, width, rescale=True, update=True)[source]¶
Set the axis region for the strip. if rescale is False, the symbols, etc., must explicitly be refreshed
- setAxisWidth(axisIndex, width, rescale=True, update=True)[source]¶
Set the axis width of the strip, centred on the axis position if rescale is False, the symbols, etc., must explicitly be refreshed
- setSymbolLabelling(value)[source]¶
Toggles whether peak labelling is minimal is visible in the strip.
- property sideBandsVisible¶
- None, mutable - True if sideBands are visible.
- property spectrumBordersVisible¶
- None, mutable - True if spectrumBorders are visible.
- stripResized¶
- property symbolLabelling¶
- None, mutable - Get the symbol labelling for the strip
- property symbolSize¶
- None, mutable - Get the symbol size for the strip
- property symbolThickness¶
- None, mutable - Get the symbol thickness for the strip
- property symbolType¶
- None, mutable - Get the symbol type for the strip
- zoom(xRegion: Tuple[float, float], yRegion: Tuple[float, float])[source]¶
Zooms strip to the specified region.
- property zoomState¶
- None, immutable -
ccpn.ui.gui.lib.GuiStrip1d module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiStrip1d.GuiStrip1d(spectrumDisplay)[source]¶
Bases:
ccpn.ui.gui.lib.GuiStrip.GuiStrip
Strip class for display of 1D spectra
This module inherits the following attributes from the Strip wrapper class:
- axisCodes Fixed string Axis codes in original display order
:return <tuple>:(X, Y, Z1, Z2, …)
- axisOrder String Axis codes in display order, determine axis display order
axisOrder = <sequence>:(X, Y, Z1, Z2, …) :return <tuple>:(X, Y, Z1, Z2, …)
- positions Axis centre positions, in display order
positions = <Tuple> :return <Tuple>:(<float>, …)
- widths Axis display widths, in display order
widths = <Tuple> :return <Tuple>:(<float>, …)
- units Axis units, in display order
:return <Tuple>
- spectra List of the spectra attached to the strip
- (whether display is currently turned on or not)
:return <Tuple>:(<Spectrum>, …)
delete Delete a strip clone Create new strip that duplicates this one, appending it at the end moveTo Move strip to index newIndex in orderedStrips
- moveTo(newIndex:int)
:param newIndex:<int> new index position
- findAxis Find axis
- findAxis(axisCode)
- param axisCode
:return axis
- displaySpectrum Display additional spectrum on strip, with spectrum axes ordered according to axisOrder
- displaySpectrum(spectrum:Spectrum, axisOrder:Sequence=()
:param spectrum:<Spectrum> additional spectrum to display :param axisOrder:<Sequence>=() new axis ordering
- peakIsInPlane Return whether the peak is in currently displayed planes for strip
- peakIsInPlane(peak:Peak)
:param peak:<Peak> peak of interest :return <bool>
- peakIsInFlankingPlane Return whether the peak is in planes flanking currently displayed planes for strip
- peakIsInFlankingPlane(peak:Peak)
:param peak:<Peak> peak of interest :return <bool>
- peakPickPosition Pick peak at position for all spectra currently displayed in strip
- peakPickPosition(position:List[float])
:param position:<List> coordinates to test :return <Tuple>:(<Peak>, …)
- peakPickRegion Peak pick all spectra currently displayed in strip in selectedRegion
- selectedRegion:List[List[float])
:param selectedRegion:<List> of <List> of coordinates to test :return <Tuple>:(<Peak>, …)
- property symbolType¶
- None, mutable - Get the symbol type for the strip
ccpn.ui.gui.lib.GuiStripContextMenus module¶
A File containing all the context menus of a gui Strip. To create a menu:
make a list of objs of type _SCMitem
call the function _createMenu, give the strip where the context menu will be needed and the list of items
ccpn.ui.gui.lib.GuiStripNd module¶
This widget implements the nD (n>2) strip. Strips are contained within a SpectrumDisplay.
Some of the available methods:
- changeZPlane(n:int=0, planeCount:int=None, position:float=None): Changes the position
of the z axis of the strip by number of planes or a ppm position, depending on which is specified.
nextZPlane(n:int=0): Decreases z ppm position by one plane prevZPlane(n:int=0): Decreases z ppm position by one plane
- resetZoom(axis=None): Resets zoom of strip axes to limits of maxima and minima of
the limits of the displayed spectra.
toggleHorizontalTrace(self): Toggles display of the horizontal trace. toggleVerticalTrace(self): Toggles display of the vertical trace.
setStripLabelText(text:str): set the text of the stripLabel getStripLabelText() -> str: get the text of the stripLabel showStripLabel(doShow:bool): show/hide the stripLabel
- class ccpn.ui.gui.lib.GuiStripNd.GuiStripNd(spectrumDisplay)[source]¶
Bases:
ccpn.ui.gui.lib.GuiStrip.GuiStrip
Strip class for display of nD spectra
This module inherits the following attributes from the Strip wrapper class:
- axisCodes Fixed string Axis codes in original display order
:return <tuple>:(X, Y, Z1, Z2, …)
- axisOrder String Axis codes in display order, determine axis display order
axisOrder = <sequence>:(X, Y, Z1, Z2, …) :return <tuple>:(X, Y, Z1, Z2, …)
- positions Axis centre positions, in display order
positions = <Tuple> :return <Tuple>:(<float>, …)
- widths Axis display widths, in display order
widths = <Tuple> :return <Tuple>:(<float>, …)
- units Axis units, in display order
:return <Tuple>
- spectra List of the spectra attached to the strip
- (whether display is currently turned on or not)
:return <Tuple>:(<Spectrum>, …)
delete Delete a strip clone Create new strip that duplicates this one, appending it at the end moveTo Move strip to index newIndex in orderedStrips
- moveTo(newIndex:int)
:param newIndex:<int> new index position
- findAxis Find axis
- findAxis(axisCode)
- param axisCode
:return axis
- displaySpectrum Display additional spectrum on strip, with spectrum axes ordered according to axisOrder
- displaySpectrum(spectrum:Spectrum, axisOrder:Sequence=()
:param spectrum:<Spectrum> additional spectrum to display :param axisOrder:<Sequence>=() new axis ordering
- peakIsInPlane Return whether the peak is in currently displayed planes for strip
- peakIsInPlane(peak:Peak)
:param peak:<Peak> peak of interest :return <bool>
- peakIsInFlankingPlane Return whether the peak is in planes flanking currently displayed planes for strip
- peakIsInFlankingPlane(peak:Peak)
:param peak:<Peak> peak of interest :return <bool>
- peakPickPosition Pick peak at position for all spectra currently displayed in strip
- peakPickPosition(position:List[float])
:param position:<List> coordinates to test :return <Tuple>:(<Peak>, …)
- peakPickRegion Peak pick all spectra currently displayed in strip in selectedRegion
- selectedRegion:List[List[float])
:param selectedRegion:<List> of <List> of coordinates to test :return <Tuple>:(<Peak>, …)
- extractVisiblePlanes(openInSpectrumDisplay=True) list [source]¶
Extract all visible planes of strip to file, creating a Spectrum instance for each plane :param openInSpectrumDisplay: optionally open in a new SpectrumDisplay :returns: a list of Spectrum instances
ccpn.ui.gui.lib.GuiWindow module¶
Module Documentation here
- class ccpn.ui.gui.lib.GuiWindow.GuiWindow(application)[source]¶
Bases:
object
- createMark(axisIndex=None)[source]¶
Creates a mark at the current cursor position in the current strip.
- createMultipletAxisMarks(axisIndex=None)[source]¶
Creates marks at the selected multiplet positions.
- cyclePeakSymbols()[source]¶
restore the zoom of the currently selected strip to the top item of the queue
- cycleSymbolLabelling()[source]¶
restore the zoom of the currently selected strip to the top item of the queue
- estimateVolumes()[source]¶
Estimate volumes of peaks selected by right-mouse menu If clicking on a selected peak then apply to all selected, otherwise apply to clicked peaks
- invertSelectedSpectra()[source]¶
invertes the selected spectra in the spectrum display. The toggled in will be hided and the hidden spectra will be displayed.
- makeStripPlot(includePeakLists=True, includeNmrChains=True, includeSpectrumTable=False)[source]¶
Make a strip plot in the current spectrumDisplay
- markPositions(axisCodes, chemicalShifts)[source]¶
Create marks based on the axisCodes and adds annotations where appropriate.
- Parameters
axisCodes – The axisCodes making a mark for
chemicalShifts – A list or tuple of ChemicalShifts at whose values the marks should be made
- moveToNextSpectrum()[source]¶
moves to next spectrum on the current strip, Toggling off the currently displayed spectrum.
- moveToPreviousSpectrum()[source]¶
moves to next spectrum on the current strip, Toggling off the currently displayed spectrum.
- recalculateCurrentPeakHeights()[source]¶
Recalculates the peak height without changing the ppm position
- reorderPeakListAxes()[source]¶
Reorder axes of all peaks in peakList of first selected peak by right-mouse menu
- selectAllPeaks(strip=None)[source]¶
selects all peaks in the strip or current strip if any and if the spectrum is toggled on
- snapCurrentPeaksToExtremum(parent=None)[source]¶
Snaps selected peaks. If more then one, pops up a Yes/No. Uses the minDropFactor from the preferences, and applies a parabolic fit to give first-estimate of lineWidths
- toggleConsole()[source]¶
Opens a new pythonConsole module if none available.
Show/hide the pythonConsole module if already one available.
- toggleHTrace(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow)[source]¶
Toggles whether horizontal traces are displayed in the specified window.
- toggleLastAxisOnly(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow)[source]¶
Toggles whether the axis is displayed in the last strip of the display
- togglePhaseConsole(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow)[source]¶
Toggles whether the phasing console is displayed in the specified window.
- toggleVTrace(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow)[source]¶
Toggles whether vertical traces are displayed in the specified window.
- traceScaleDown(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow, scale=0.7142857142857143)[source]¶
Halves the scale for all traces in the specified window.
- traceScaleScale(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow, scale: float)[source]¶
Changes the scale of a trace in all spectrum displays of the window.
- traceScaleUp(window: ccpn.ui.gui.lib.GuiWindow.GuiWindow, scale=1.4)[source]¶
Doubles the scale for all traces in the specified window.
ccpn.ui.gui.lib.MenuActions module¶
Module Documentation here
- class ccpn.ui.gui.lib.MenuActions.AddToCollectionPopup(mainWindow=None, project=None, *args, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.SpeechBalloon.SpeechBalloon
Balloon to hold the collection list For later when a more complex selector is required
- class ccpn.ui.gui.lib.MenuActions.CreateNewObjectABC(**kwds)[source]¶
Bases:
object
An ABC to implement an abstract callback function to create new object The __call__(self, dataPid, node) method acts as the callback function
- parentMethodName = None¶
- class ccpn.ui.gui.lib.MenuActions.OpenItemABC(useNone=False, **kwds)[source]¶
Bases:
object
An ABC to implement an abstract openItem in moduleArea class The __call__(self, dataPid, node) method acts as the callback function
- contextMenuText = 'Open as a Module'¶
- hasOpenMethod = True¶
- objectArgumentName = 'obj'¶
- openItemDirectMethod = None¶
- openItemMethod = None¶
- useApplication = True¶
- validActionTargets = (<class 'ccpn.core.Spectrum.Spectrum'>, <class 'ccpn.core.PeakList.PeakList'>, <class 'ccpn.core.MultipletList.MultipletList'>, <class 'ccpn.core.IntegralList.IntegralList'>, <class 'ccpn.core.NmrChain.NmrChain'>, <class 'ccpn.core.Chain.Chain'>, <class 'ccpn.core.SpectrumGroup.SpectrumGroup'>, <class 'ccpn.core.Sample.Sample'>, <class 'ccpn.core.ChemicalShiftList.ChemicalShiftList'>, <class 'ccpn.core.RestraintTable.RestraintTable'>, <class 'ccpn.core.Note.Note'>, <class 'ccpn.core.StructureEnsemble.StructureEnsemble'>, <class 'ccpn.core.DataTable.DataTable'>, <class 'ccpn.core.ViolationTable.ViolationTable'>, <class 'ccpn.core.Collection.Collection'>)¶
- class ccpn.ui.gui.lib.MenuActions.RaisePopupABC(useParent=False, useNone=False, **kwds)[source]¶
Bases:
object
An ABC to implement an abstract popup class The __call__(self, dataPid, node) method acts as the callback function
- objectArgumentName = 'obj'¶
- parentObjectArgumentName = None¶
- popupClass = None¶
ccpn.ui.gui.lib.NoUIModuleBase module¶
ccpn.ui.gui.lib.PeakList module¶
Module Documentation here
ccpn.ui.gui.lib.Shortcuts module¶
Module Documentation here
- ccpn.ui.gui.lib.Shortcuts.addShortCut(keys=None, obj=None, func=None, context=None)[source]¶
Add a new shortcut to the widget/context and store in the shortcut list :param keys - string containing the keys; e.g., ‘a, b’ or the keySequence object:
e.g., QtGui.QKeySequence.SelectAll
- Parameters
to (obj - widget to attach keySequence) –
attach (func - function to) –
WidgetShortcut|ApplicationShortcut (context - context; e.g.,) –
- ccpn.ui.gui.lib.Shortcuts.clearShortcuts(widget=None)[source]¶
Clear all shortcuts that exist in all objects from the current widget :param widget - target widget:
- ccpn.ui.gui.lib.Shortcuts.storeShortcut(keys=None, obj=None, func=None, context=None, shortcut=None)[source]¶
Store the new shortcut in the dict, may be an Action from the menu :param keys - string containing the keys; e.g., ‘a, b’ or the keySequence object:
e.g., QtGui.QKeySequence.SelectAll
- Parameters
to (obj - widget to attach keySequence) –
attach (func - function to) –
WidgetShortcut|ApplicationShortcut (context - context; e.g.,) –
ccpn.ui.gui.lib.SpectrumDisplay module¶
Module Documentation here
- ccpn.ui.gui.lib.SpectrumDisplay.makeStripPlot(spectrumDisplay: ccpn.ui.gui.lib.GuiSpectrumDisplay.GuiSpectrumDisplay, nmrAtomPairs: List[List[ccpn.core.NmrAtom.NmrAtom]], autoWidth=True, widths=None)[source]¶
- ccpn.ui.gui.lib.SpectrumDisplay.makeStripPlotFromSingles(spectrumDisplay: ccpn.ui.gui.lib.GuiSpectrumDisplay.GuiSpectrumDisplay, nmrAtoms: List[ccpn.core.NmrAtom.NmrAtom], autoWidth=True)[source]¶
Takes the current nmrResidue and navigates (centres) to that position all strips and spectrum displays of the project. Called by shortcut. For a more generic usage refer to: “navigateToPositionInStrip” instead
Takes the current peak position and navigates (centres) to that position all strips and spectrum displays of the project. Called by shortcut. For a more generic usage refer to: “navigateToPositionInStrip” instead
ccpn.ui.gui.lib.StripLib module¶
Strip Library functionalities
- ccpn.ui.gui.lib.StripLib.copyStripAxisPositionsAndWidths(fromStrip, toStrip)[source]¶
copy the strip axes to the new strip
- ccpn.ui.gui.lib.StripLib.isPositionWithinfBounds(strip: ccpn.ui.gui.lib.GuiStrip.GuiStrip, shift: ccpn.core._OldChemicalShift._OldChemicalShift, axis: object)[source]¶
Determines whether a given shift is within the bounds of the specified axis of the specified strip.
NBNB Bug Fixed by Rasmus 13/3/2016. This was not used then. Maybe it should be?
Modified to use aliasingLimits instead of spectrumLimits. Rasmus, 24/7/2016
- ccpn.ui.gui.lib.StripLib.matchAxesAndNmrAtoms(strip: ccpn.ui.gui.lib.GuiStrip.GuiStrip, nmrAtoms: List[ccpn.core.NmrAtom.NmrAtom])[source]¶
Takes an NmrResidue and optional spectrum displays and strips and navigates the strips and spectrum displays to the positions specified by the peak.
Navigate in to nmrResidue in strip[stripIndex] of display, with optionally-1, +1 residues in strips[stripIndex-1] and strips[stripIndex+1]. return list of strips
- Parameters
nmrResidue – nmrResidue to display
display – target spectrumDisplay for nmrResidue
stripIndex – location of strip in display (assumed 0 if connected and showSequentialResidues)
widths – ignored (for now)
showSequentialResidues – boolean selecting if sequential strips are displayed
markPositions – boolean selecting if marks are displayed
- Returns
list of strips
Takes a strip, a list of positions and optionally, a parallel list of axisCodes. Navigates to specified positions in strip using axisCodes, if specified, otherwise it navigates to the positions in the displayed axis order of the strip.
ccpn.ui.gui.lib.Validators module¶
Module Documentation here
- class ccpn.ui.gui.lib.Validators.LineEditValidator(parent=None, allowSpace=True, allowEmpty=True)[source]¶
Bases:
PyQt5.QtGui.QValidator
Validator to restrict input to non-whitespace characters
- property checkState¶
- None, immutable -
- class ccpn.ui.gui.lib.Validators.LineEditValidatorCoreObject(parent=None, target=None, klass=None, allowSpace=True, allowEmpty=True)[source]¶
Bases:
PyQt5.QtGui.QValidator
Validator to restrict input to non-whitespace characters and restrict input to the names not already in the core object klass
- property checkState¶
- None, immutable -
- property isValid¶
- None, immutable -
ccpn.ui.gui.lib.guiDecorators module¶
Module Documentation here
ccpn.ui.gui.lib.mouseEvents module¶
various mouse event functions. See ViewBox.py for the full mouse commands description.
- ccpn.ui.gui.lib.mouseEvents.getMouseEventDict(event: PyQt5.QtGui.QMouseEvent)[source]¶
Return a dict with the status of each mouseEvent as boolean
- ccpn.ui.gui.lib.mouseEvents.makeDragEvent(self, dataDict, texts, label=None, action=1, alignCentre=True)[source]¶
Create a new drag event with ‘self’ as the source
- Parameters
self – source of the new drag event
dataDict – data to add as mimeData
texts – list of strings to copy/move to list widget types (if required)
label – string required to create the drag icon
action – QtCore.Qt.CopyAction or Move action - may be used by dropEvent
- Returns