ccpn.ui.gui.widgets package¶
Submodules¶
ccpn.ui.gui.widgets.Action module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Action.Action(parent, text, callback=None, shortcut=None, checked=True, checkable=False, icon=None, translate=True, enabled=True, toolTip=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Base.Base
,PyQt5.QtWidgets.QAction
ccpn.ui.gui.widgets.Application module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Application.Application(applicationName, applicationVersion, organizationName='CCPN', organizationDomain='ccpn.ac.uk')[source]¶
Bases:
PyQt5.QtWidgets.QApplication
- ccpn.ui.gui.widgets.Application.newTestApplication(projectPath=None, useTestProjects=False, nologging=False, interface='NoUi', debug=True, noApplication=False)[source]¶
Create a full application for testing. This will contain an empty project and preferences.
If interface is specified as ‘NoUi’ no mainWindow will be created, but a full application and project will be created.
if interface is specified as ‘Gui’ a mainWindow will be created, but the event execution loop will not be started.
Popups can be instantiated with exec_ which will automatically show the mainWindow.
The mainWindow can be instantiated manually with app.start(); however, any code after this cannot be guaranteed to run after closing mainWindow.
Set noApplication=True for a basic test that only creates a QApplication; a Ccpn application will not be created.
- Parameters
projectPath – str or Path object, path of project to load on startup
useTestProjects – bool, True uses the Ccpn testing folder as the root for the project to load
nologging – bool, enable or disable lopgging
interface – ‘NoUi’ or ‘Gui’, determines whether mainWindow is created
debug – bool, enable/disable debugging
noApplication – bool, enable/disable creation of CCpn application
- Returns
instance of new application
ccpn.ui.gui.widgets.Arrow module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Arrow.Arrow(pos=None, angle=90, pen=None, movable=False, bounds=None)[source]¶
Bases:
pyqtgraph.graphicsItems.ArrowItem.ArrowItem
- setPen(pen)[source]¶
Set the pen for drawing the line. Allowable arguments are any that are valid for
mkPen
.
- sigDragged¶
- sigPositionChangeFinished¶
- sigPositionChanged¶
ccpn.ui.gui.widgets.BalloonMetrics module¶
- class ccpn.ui.gui.widgets.BalloonMetrics.Axis(value)[source]¶
Bases:
enum.IntEnum
An enumeration.
- X = 0¶
- Y = 1¶
- class ccpn.ui.gui.widgets.BalloonMetrics.BalloonMetrics(corner_radius=3, pointer_side=Side.RIGHT, pointer_height=10, pointer_width=20)[source]¶
Bases:
object
- property body_rect¶
- None, immutable -
- property body_rect_viewport¶
- None, immutable -
- property inner¶
- None, immutable -
- property inner_viewport¶
- None, immutable -
- property outer¶
- None, immutable -
- property outer_viewport¶
- None, immutable -
- property pointer¶
- None, immutable -
- property pointer_rect¶
- None, immutable -
- property pointer_viewport¶
- None, immutable -
- class ccpn.ui.gui.widgets.BalloonMetrics.Pointer(left, top, bottom)[source]¶
Bases:
tuple
- bottom: PyQt5.QtCore.QPoint¶
Alias for field number 2
- left: PyQt5.QtCore.QPoint¶
Alias for field number 0
- top: PyQt5.QtCore.QPoint¶
Alias for field number 1
- class ccpn.ui.gui.widgets.BalloonMetrics.Side(value)[source]¶
Bases:
enum.IntEnum
An enumeration.
- BOTTOM = 3¶
- LEFT = 0¶
- RIGHT = 2¶
- TOP = 1¶
- ccpn.ui.gui.widgets.BalloonMetrics.calc_side_distance_outside_rect(test_rect: PyQt5.QtCore.QRect, target_rect: PyQt5.QtCore.QRect)[source]¶
- ccpn.ui.gui.widgets.BalloonMetrics.new_rect_xleftytop_xrightybottom(xleft, ytop, xright, ybottom)[source]¶
- ccpn.ui.gui.widgets.BalloonMetrics.rect_get_side(rect: PyQt5.QtCore.QRect, side: ccpn.ui.gui.widgets.BalloonMetrics.Side) int [source]¶
ccpn.ui.gui.widgets.BarGraph module¶
Module Documentation Here
- class ccpn.ui.gui.widgets.BarGraph.BarGraph(application=None, viewBox=None, xValues=None, yValues=None, objects=None, brush=None, drawLabels=True, labelDistanceRatio=0.1, **kwds)[source]¶
Bases:
pyqtgraph.graphicsItems.BarGraphItem.BarGraphItem
- class ccpn.ui.gui.widgets.BarGraph.CustomLabel(text, application=None)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsSimpleTextItem
A text annotation of a bar.
- class ccpn.ui.gui.widgets.BarGraph.CustomViewBox(application=None, *args, **kwds)[source]¶
Bases:
pyqtgraph.graphicsItems.ViewBox.ViewBox.ViewBox
- itemsSelected¶
- mouseDragEvent(event)[source]¶
Re-implementation of PyQtGraph mouse drag event to allow custom actions off of different mouse drag events. Same as spectrum Display. Check SpectrumDisplay View Box for more documentation.
- property xLine¶
- None, immutable -
ccpn.ui.gui.widgets.BarGraphWidget module¶
ccpn.ui.gui.widgets.Base module¶
Base class for gridding, optionally setting up size policies and layout, optionally inserting itself into parent using keyword, grid, gridspan, hAlign, vAlign
The proper way for adding widgets explicitly is: widget.getLayout().addWidget(row, col, [rowspan, [colspan])
- class ccpn.ui.gui.widgets.Base.Base[source]¶
Bases:
ccpn.ui.gui.widgets.DropBase.DropBase
,ccpn.ui.gui.widgets.Base.SignalBlocking
- addSpacer(width, height, grid, gridSpan=(1, 1), expandX=False, expandY=False, parent=None)[source]¶
Convenience to insert spacer width, height: in pixels grid=(row,col): tuple or list defining row, column gridSpan: tuple or list defining grid-span along row, column
if either expandX or expandY are True, then the corresponding expanding policy is set to ‘minimumExpanding’ otherwise it is set to ‘fixed’
- Returns
Spacer widget
- class ccpn.ui.gui.widgets.Base.SignalBlocking[source]¶
Bases:
object
Class to add widget blocking methods to a subclass. Blocks signals from nested widgets.
Blocking is applied by a contextManager
- blockWidgetSignals(root=None, recursive=True, additionalWidgets=None)[source]¶
Block all signals for the widget.
root is the widget to be blocked, if no widget specified then self is assumed. If recursive=False then only the specified widget is blocked.
Updates are also blocked for the widget, this should automatically block updates for all nested widgets.
- Parameters
root – widget to be blocked, defaults to self
recursive – bool, defaults to True
- property widgetIsBlocked¶
- None, immutable - True if widget is blocked, i.e., blocking level > 0
ccpn.ui.gui.widgets.BasePopup module¶
Module Documentation here
ccpn.ui.gui.widgets.Blank module¶
Module Documentation here
ccpn.ui.gui.widgets.Button module¶
This module implements the Button class
- class ccpn.ui.gui.widgets.Button.Button(parent=None, text='', callback=None, icon=None, toggle=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QPushButton
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.ButtonList module¶
Module Documentation here
- class ccpn.ui.gui.widgets.ButtonList.ButtonBoxList(parent=None, texts=None, callbacks=None, icons=None, tipTexts=None, direction='h', commands=None, ok='OK', cancel='cancel', destructive=('Discard', "Don't Save"), images=None, **kwargs)[source]¶
Bases:
PyQt5.QtWidgets.QDialogButtonBox
,ccpn.ui.gui.widgets.Base.Base
,ccpn.ui.gui.widgets.ButtonList.ButtonListMixin
- class ccpn.ui.gui.widgets.ButtonList.ButtonList(parent=None, texts=None, callbacks=None, icons=None, setMinimumWidth=True, tipTexts=None, direction='h', commands=None, images=None, setLastButtonFocus=True, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
,ccpn.ui.gui.widgets.ButtonList.ButtonListMixin
- class ccpn.ui.gui.widgets.ButtonList.ButtonListMixin[source]¶
Bases:
object
- getButton(buttonName: str)[source]¶
Return the button with the given name or return None :param buttonName(str) - name of the button
- class ccpn.ui.gui.widgets.ButtonList.UtilityButtonList(parent, webBrowser=None, helpUrl=None, helpMsg=None, doClone=True, doHelp=True, doClose=True, cloneText=None, helpText=None, closeText=None, cloneCmd=None, helpCmd=None, closeCmd=None, cloneTip='Duplicate window', helpTip='Show help', closeTip='Close window', *args, **kwds)[source]¶
ccpn.ui.gui.widgets.CalibrateXSpectrum1DWidget module¶
Module Documentation here
ccpn.ui.gui.widgets.CalibrateXSpectrumNDWidget module¶
Module Documentation here
- class ccpn.ui.gui.widgets.CalibrateXSpectrumNDWidget.CalibrateXNDWidgets(parent=None, mainWindow=None, strip=None, enableClose=True, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CalibrateXSpectrum1DWidget.CalibrateX1DWidgets
- CLOSELABEL = 'Close'¶
ccpn.ui.gui.widgets.CalibrateYSpectrum1DWidget module¶
Module Documentation here
ccpn.ui.gui.widgets.CalibrateYSpectrumNDWidget module¶
Module Documentation here
- class ccpn.ui.gui.widgets.CalibrateYSpectrumNDWidget.CalibrateYNDWidgets(parent=None, mainWindow=None, strip=None, enableClose=True, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CalibrateYSpectrum1DWidget.CalibrateY1DWidgets
- CLOSELABEL = 'Close'¶
ccpn.ui.gui.widgets.CallbackTimer module¶
Module Documentation here
ccpn.ui.gui.widgets.CcpnGridItem module¶
ccpn.ui.gui.widgets.CcpnModuleArea module¶
- class ccpn.ui.gui.widgets.CcpnModuleArea.CcpnModuleArea(mainWindow, **kwargs)[source]¶
Bases:
pyqtgraph.dockarea.DockArea.DockArea
,ccpn.ui.gui.widgets.DropBase.DropBase
- addModule(module, position=None, relativeTo=None, **kwds)[source]¶
With these settings the user can close all the modules from the label ‘close module’ or pop up and when re-add a new module it makes sure there is a container available.
- property ccpnModules¶
- None, immutable -
- property modules¶
- None, immutable -
- moveModule(dock, position, neighbor)¶
Move an existing Dock to a new location.
- restoreModuleState(layout, module, discard=False)[source]¶
Search the restore tree for a given module
- restoreState(state, restoreSpectrumDisplay=False)[source]¶
Restore Dock configuration as generated by saveState.
Note that this function does not create any Docks–it will only restore the arrangement of an existing set of Docks.
- saveState(docksOnly=False)[source]¶
Return a serialized (storable) representation of the state of all Docks in this DockArea.
- property spectrumDisplays¶
- None, immutable - Return the list of opened spectrumDisplays in the order of their opening. Contrary to mainWindow.spectrumDisplays that return in alphabetical order.
- class ccpn.ui.gui.widgets.CcpnModuleArea.TempAreaWindow(area, mainWindow=None, **kwargs)[source]¶
Bases:
ccpn.ui.gui.lib.GuiWindow.GuiWindow
,ccpn.ui.gui.widgets.MainWindow.MainWindow
ccpn.ui.gui.widgets.CcpnWebView module¶
- class ccpn.ui.gui.widgets.CcpnWebView.CcpnWebView(mainWindow=None, name='HtmlModule', urlPath=None)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
- IGNORE_SHORTCUTS = False¶
- className = 'CcpnWebView'¶
ccpn.ui.gui.widgets.CheckBox module¶
CheckBox widget
- class ccpn.ui.gui.widgets.CheckBox.CheckBox(parent=None, checked=False, text='', callback=None, checkable=True, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QCheckBox
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.CheckBoxes module¶
- class ccpn.ui.gui.widgets.CheckBoxes.CheckBoxes(parent, texts=None, selectedInd=None, exclusive=False, selectAll=None, deselectAll=None, callback=None, direction='h', tipTexts=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
- property isChecked¶
- None, immutable -
ccpn.ui.gui.widgets.ColourDialog module¶
Module Documentation here
- class ccpn.ui.gui.widgets.ColourDialog.ColourDialog(parent=None, doAlpha=False, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QColorDialog
ccpn.ui.gui.widgets.Column module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Column.Column(headerText, getValue, getEditValue=None, setEditValue=None, editClass=None, editArgs=None, editKw=None, tipText=None, getColor=None, getIcon=None, stretch=False, format=None, editDecimals=None, editStep=None, alignment=1)[source]¶
Bases:
object
- class ccpn.ui.gui.widgets.Column.ColumnClass(columnList)[source]¶
Bases:
object
- property columns¶
- None, immutable -
- property formats¶
- None, immutable -
- property functions¶
- None, immutable -
- property getEditValues¶
- None, immutable -
- property headings¶
- None, immutable -
- property numColumns¶
- None, immutable -
- property setEditValues¶
- None, immutable -
- property tipTexts¶
- None, immutable -
ccpn.ui.gui.widgets.ColumnViewSettings module¶
Module Documentation here
- class ccpn.ui.gui.widgets.ColumnViewSettings.ColumnViewSettings(parent=None, table=None, dfObject=None, direction='v', hiddenColumns=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
hide show check boxes corresponding to the table columns
ccpn.ui.gui.widgets.CompoundBaseWidget module¶
Base class for compound widgets
- class ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget(parent, layoutDict, orientation, showBorder, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
,ccpn.ui.gui.widgets.Base.SignalBlocking
Base widget for Compound classes; inherits from Frame (and hence Base) Implements the addNotifier and deleteNotifiers methods
- addObjectNotifier(theObject, triggers, targetName, func, *args, **kwds)[source]¶
Add and store a notifier with widget;
- Parameters
theObject – A valid V3 core or current object
triggers – any of the triggers, as defined in Notifier class
targetName – a valid target for theObject, as defined in the Notifier class
func – callback function on triggering
args – optional arguments to func
kwds – optional keyword arguments to func
- Returns
Notifier instance
ccpn.ui.gui.widgets.CompoundView module¶
This widget is based on the CcpNmr ChemBuild. Credits to Tim Stevens, University of Cambridge December 2010-2012
- class ccpn.ui.gui.widgets.CompoundView.Atom(compound, element, name, isVariable=False)[source]¶
Bases:
object
- class ccpn.ui.gui.widgets.CompoundView.AtomGroup(compound, varAtoms, groupType)[source]¶
Bases:
object
- class ccpn.ui.gui.widgets.CompoundView.AtomGroupItem(scene, compoundView, atomGroup)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
- class ccpn.ui.gui.widgets.CompoundView.AtomItem(scene, compoundView, atom)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
- class ccpn.ui.gui.widgets.CompoundView.AtomLabel(scene, atomView, compoundView, atom)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
- class ccpn.ui.gui.widgets.CompoundView.Bond(varAtoms, bondType='single', autoVar=True)[source]¶
Bases:
object
- class ccpn.ui.gui.widgets.CompoundView.BondItem(scene, compoundView, bond)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
- class ccpn.ui.gui.widgets.CompoundView.CompoundView(parent=None, smiles=None, variant=None, preferences=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsView
,ccpn.ui.gui.widgets.Base.Base
- class ccpn.ui.gui.widgets.CompoundView.SelectionBox(scene, compoundView)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItem
- class ccpn.ui.gui.widgets.CompoundView.VarAtom(variantA, atom, freeValences=None, chirality=None, coords=(0.0, 0.0, 0.0), isLabile=False, charge=0)[source]¶
Bases:
object
- class ccpn.ui.gui.widgets.CompoundView.Variant(compound, templateVarAtoms=None)[source]¶
Bases:
object
- ccpn.ui.gui.widgets.CompoundView.crossProduct(v1, v2)[source]¶
Returns the cross product of v1 and v2. Both must be 3-dimensional vectors.
ccpn.ui.gui.widgets.CompoundWidgets module¶
- class ccpn.ui.gui.widgets.CompoundWidgets.CheckBoxCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', text='', callback=None, checked=False, editable=True, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a CheckBox, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ———————— left: Label CheckBox
right: CheckBox Label
- top: Label
CheckBox
- bottom: CheckBox
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.ColourSelectionWidget(parent=None, labelName=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.CompoundWidgets.CompoundViewCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', callback=None, editable=False, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and an compoundView, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— —————————- left: Label compoundView
right: compoundView Label
- top: Label
compoundView
- bottom: compoundView
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.DoubleSpinBoxCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', value=None, range=(None, None), step=None, showButtons=True, decimals=None, callback=None, editable=False, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a DoubleSpinBox, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— —————————- left: Label DoubleSpinBox
right: DoubleSpinBox Label
- top: Label
DoubleSpinBox
- bottom: DoubleSpinBox
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- property textFromValue¶
- None, immutable -
- class ccpn.ui.gui.widgets.CompoundWidgets.EntryCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', entryText='', callback=None, default=None, editable=True, sizeAdjustPolicy=None, compoundKwds={}, tipText=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a Entry widget, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ———————— left: Label Entry
right: Entry Label
- top: Label
Entry
- bottom: Entry
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.InputPulldown(parent=None, callback=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.CompoundWidgets.LineEditPopup(parent=None, dataType=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QDialog
,ccpn.ui.gui.widgets.Base.Base
- class ccpn.ui.gui.widgets.CompoundWidgets.ListCompoundWidget(parent=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', texts=None, callback=None, defaults=None, uniqueList=True, objectName='', compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label, a PulldownList, and a ListWidget, combined in a CompoundBaseWidget (i.e.a Frame)
- NB: can also be used as only a Label and a ListWidget by hiding the Pulldown:
myWidget.showPulldownList(False)
orientation widget layout ———— ———————— left: Label PullDown
ListWidget
- centreLeft: PullDown
Label ListWidget
- right: PullDown Label
ListWidget
- centreRight: PullDown
ListWidget Label
- top: Label
PullDown ListWidget
- bottom: PullDown
ListWidget Label
horizontal: Label PullDown ListWidget
- LIST_BORDER_COLOR = '#a9a9a9'¶
- LIST_BORDER_WIDTH = 1¶
- layoutDict = {'bottom': [(2, 0), (0, 0), (1, 0)], 'centreLeft': [(1, 0), (0, 1), (1, 1)], 'centreRight': [(1, 1), (0, 0), (1, 0)], 'horizontal': [(0, 0), (0, 1), (0, 2)], 'left': [(0, 0), (0, 1), (1, 1)], 'right': [(0, 1), (0, 0), (1, 0)], 'top': [(0, 0), (1, 0), (2, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.PulldownListCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', texts=None, toolTips=None, callback=None, default=None, sizeAdjustPolicy=None, editable=False, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a PulldownList, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ———————— left: Label PullDown
right: PullDown Label
- top: Label
PullDown
- bottom: PullDown
Label
- SELECTTEXT = '> Select <'¶
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.RadioButtonsCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', texts=[], callback=None, selectedInd=0, editable=True, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a RadioButtons box, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— —————————- left: Label RadioButtons
right: RadioButtons Label
- top: Label
RadioButtons
- bottom: RadioButtons
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.ScientificSpinBoxCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', value=None, range=(None, None), step=None, showButtons=True, decimals=None, callback=None, editable=False, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a scientificSpinBox, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ————————————- left: Label ScientificSpinBox
right: ScientificSpinBox Label
- top: Label
ScientificSpinBox
- bottom: ScientificSpinBox
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.SelectorWidget(parent=None, label='', data=None, callback=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.CompoundWidgets.SpinBoxCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', value=None, range=(None, None), step=None, showButtons=True, decimals=None, callback=None, editable=False, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and an integer SpinBox, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ———————— left: Label SpinBox
right: SpinBox Label
- top: Label
SpinBox
- bottom: SpinBox
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
- class ccpn.ui.gui.widgets.CompoundWidgets.TextEditorCompoundWidget(parent=None, mainWindow=None, showBorder=False, orientation='left', minimumWidths=None, maximumWidths=None, fixedWidths=None, labelText='', callback=None, default=None, editable=True, sizeAdjustPolicy=None, compoundKwds=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.CompoundBaseWidget.CompoundBaseWidget
Compound class comprising a Label and a Entry widget, combined in a CompoundBaseWidget (i.e. a Frame)
orientation widget layout ———— ———————— left: Label Entry
right: Entry Label
- top: Label
Entry
- bottom: Entry
Label
- layoutDict = {'bottom': [(1, 0), (0, 0)], 'left': [(0, 0), (0, 1)], 'right': [(0, 1), (0, 0)], 'top': [(0, 0), (1, 0)]}¶
ccpn.ui.gui.widgets.ConcentrationsWidget module¶
A widget to get concentration Values and concentrationUnits
ccpn.ui.gui.widgets.Console module¶
Module Documentation here
ccpn.ui.gui.widgets.CustomExportDialog module¶
Reimplementation of PyQtGraph
- class ccpn.ui.gui.widgets.CustomExportDialog.CustomExportDialog(scene, titleName=None, exportType='Default')[source]¶
Bases:
PyQt5.QtWidgets.QDialog
ccpn.ui.gui.widgets.DataFrameTableExample module¶
- class ccpn.ui.gui.widgets.DataFrameTableExample.PandasDataFrameGuiTable(parent, mainWindow, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.GuiTable.GuiTable
A GUI table for a flat Pandas DataFrame type (not a ccpn dataFrameObject).
Usage: dataFrame = pd.DataFrame() myTable = PandasDataFrameGuiTable() myTable.dataFrame = dataFrame
To update the table: myTable.dataFrame = dataFrame
- OBJECT = 'object'¶
- TABLE = 'table'¶
- className = '_PandasDataFrameGuiTable'¶
- property dataFrame¶
- None, mutable -
- class ccpn.ui.gui.widgets.DataFrameTableExample.PandasTableModuleExample(mainWindow, name)[source]¶
Bases:
ccpn.ui.gui.modules.CcpnModule.CcpnModule
This is example of CCPN module showing a Pandas DataFrame table.
- className = 'MyModule'¶
- property dataFrame¶
- None, mutable -
- includeSettingsWidget = True¶
- maxSettingsState = 2¶
- settingsPosition = 'top'¶
ccpn.ui.gui.widgets.DateTime module¶
- class ccpn.ui.gui.widgets.DateTime.DateTime(parent, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QDateEdit
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.DialogButtonBox module¶
Module Documentation here
- class ccpn.ui.gui.widgets.DialogButtonBox.DialogButtonBox(parent=None, buttons=None, callbacks=None, texts=None, tipTexts=None, icons=None, enabledStates=None, visibleStates=None, defaultButton=None, enableIcons=False, orientation='horizontal', **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QDialogButtonBox
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.Dock module¶
ccpn.ui.gui.widgets.DoubleSlider module¶
- class ccpn.ui.gui.widgets.DoubleSlider.Centre(width=None, parent=None)[source]¶
Bases:
ccpn.ui.gui.widgets.DoubleSlider.GraphicsItemBase
,ccpn.ui.gui.widgets.DoubleSlider.Named
- class ccpn.ui.gui.widgets.DoubleSlider.DoubleRangeView[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsView
- displayValues¶
- maxValue¶
- minValue¶
- pageStep¶
- range¶
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- rangeChanged¶
- setMaxValue¶
- setMinValue¶
- setRange¶
int([x]) -> integer int(x, base=10) -> integer
Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.__int__(). For floating point numbers, this truncates towards zero.
If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by ‘+’ or ‘-’ and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal. >>> int(‘0b100’, base=0) 4
- setValueConverter(converter)[source]¶
takes a value an converts it for display :param converter: function taking a single value and returning a single value :return:
- setValueFormatter(formatter)[source]¶
takes a value and formats it to a string for display
- Parameters
formatter – function taking a single value and returning a single string
- sliderPressed¶
- sliderReleased¶
- values¶
- valuesChanged¶
- class ccpn.ui.gui.widgets.DoubleSlider.GraphicsItemBase(parent=None)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsObject
- class ccpn.ui.gui.widgets.DoubleSlider.GraphicsRoundedRectItem(*args, x_radius=0, y_radius=0, **kwargs)[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsRectItem
,ccpn.ui.gui.widgets.DoubleSlider.Named
- class ccpn.ui.gui.widgets.DoubleSlider.HandleItem(orientation=1, parent=None)[source]¶
Bases:
ccpn.ui.gui.widgets.DoubleSlider.GraphicsItemBase
,ccpn.ui.gui.widgets.DoubleSlider.Named
- class ccpn.ui.gui.widgets.DoubleSlider.MyApplication(arg)[source]¶
Bases:
PyQt5.QtWidgets.QApplication
- class ccpn.ui.gui.widgets.DoubleSlider.MyLabel(text, parent=None)[source]¶
Bases:
PyQt5.QtWidgets.QLabel
- class ccpn.ui.gui.widgets.DoubleSlider.PopoverButton(balloon_side=Side.BOTTOM, *args, **kwargs)[source]¶
Bases:
PyQt5.QtWidgets.QToolButton
- balloonSide¶
- class ccpn.ui.gui.widgets.DoubleSlider.SelectArgument(index)[source]¶
Bases:
PyQt5.QtCore.QObject
- output¶
- class ccpn.ui.gui.widgets.DoubleSlider.SetOneOf(index, target=None, instance=None)[source]¶
Bases:
PyQt5.QtCore.QObject
- output¶
- class ccpn.ui.gui.widgets.DoubleSlider.Slider[source]¶
Bases:
PyQt5.QtWidgets.QGraphicsItemGroup
,ccpn.ui.gui.widgets.DoubleSlider.Named
- INSIDE = 'inside'¶
- OUTSIDE = 'outside'¶
- SINGLE = 'single'¶
- WAIT = 'wait'¶
- class ccpn.ui.gui.widgets.DoubleSlider.Track(*args, **kwargs)[source]¶
Bases:
ccpn.ui.gui.widgets.DoubleSlider.GraphicsRoundedRectItem
,ccpn.ui.gui.widgets.DoubleSlider.Named
ccpn.ui.gui.widgets.DoubleSpinbox module¶
Module Documentation here
- class ccpn.ui.gui.widgets.DoubleSpinbox.DoubleSpinbox(parent, value=None, min=None, max=None, step=None, prefix=None, suffix=None, showButtons=True, decimals=None, callback=None, editable=True, locale=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QDoubleSpinBox
,ccpn.ui.gui.widgets.Base.Base
- returnPressed¶
- wheelChanged¶
- class ccpn.ui.gui.widgets.DoubleSpinbox.ScientificDoubleSpinBox(*args, **kwargs)[source]¶
Bases:
ccpn.ui.gui.widgets.DoubleSpinbox.DoubleSpinbox
Constructs a spinbox in which the values can be set using Sci notation
ccpn.ui.gui.widgets.DropBase module¶
Define routines for a dropable widget This module is subclassed by widgets.Base and should not be used directly
GWV April-2017: Drived from an earlier version of DropBase
- class ccpn.ui.gui.widgets.DropBase.DropBase[source]¶
Bases:
object
Class to implement drop and drag Callback signature on drop: dropEventCallback(dataDict)
- DFS = 'dfs'¶
- IDS = 'ids'¶
- JSONDATA = 'ccpnmr-json'¶
- MODELDATALIST = 'ccpnmr-model-datalist'¶
- PIDS = 'pids'¶
- TEXT = 'text'¶
- URLS = 'urls'¶
- dropEvent(event)[source]¶
Catch dropEvent and dispatch to processing callback ‘Native’ treatment of CcpnModule instances
ccpn.ui.gui.widgets.Entry module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Entry.Entry(parent, text='', callback=None, maxLength=1000, listener=None, stripEndWhitespace=True, editable=True, backgroundText='<default>', **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QLineEdit
,ccpn.ui.gui.widgets.Base.Base
- getText()¶
- class ccpn.ui.gui.widgets.Entry.FloatEntry(parent, text=0.0, callback=None, minValue=- inf, maxValue=inf, decimals=4, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Entry.Entry
- decimals = 4¶
- class ccpn.ui.gui.widgets.Entry.IntEntry(parent, text=0, callback=None, minValue=- 2147483647, maxValue=2147483647, **kwds)[source]¶
- class ccpn.ui.gui.widgets.Entry.LabelledEntry(parent, labelText, entryText='', callback=None, maxLength=32, tipText=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.Entry.LabelledFloatEntry(parent, labelText, entryText='', callback=None, minValue=- 2147483647, maxValue=2147483647, decimals=4, tipText=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.Entry.LabelledIntEntry(parent, labelText, entryText='', callback=None, minValue=- 2147483647, maxValue=2147483647, tipText=None, **kwds)[source]¶
ccpn.ui.gui.widgets.FileDialog module¶
Module Documentation here
- class ccpn.ui.gui.widgets.FileDialog.AdminFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ArchivesFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.AuxiliaryFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.BackupsFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.CcpnMacrosFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ChemCompFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.DataFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ExcelFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ExecutablesFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ExportFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.FileDialogABC(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QFileDialog
Class to implement open/save dialogs
- property initialPath¶
- None, mutable - The initial path that the dialog will be set to on opening. Path is stored between instances, and is unique to the subclassed type.
- restrictDirToFilter = (False,)¶
- class ccpn.ui.gui.widgets.FileDialog.LayoutsFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.LineButtonFileDialog(parent=None, fileMode='anyFile', dialogText=None, directory=None, fileFilter=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.FileDialog.FileDialogABC
Special class for a lineEdit button in pipelines
- class ccpn.ui.gui.widgets.FileDialog.LineEditButtonDialog(parent, textDialog=None, textLineEdit=None, fileMode=None, fileFilter=None, directory=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.MacrosFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.NMRStarFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.NefFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.OtherFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.PDFFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.PipelineFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.PluginsFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.PreferencesFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ProjectFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.ProjectSaveFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.FileDialog.SpectrumFileDialog(parent=None, acceptMode='open', selectFile=None, fileFilter=None, directory=None, useNative=None, _useDirectoryOnly=False, confirmOverwrite=True, **kwds)[source]¶
ccpn.ui.gui.widgets.FillBetweenRegions module¶
ccpn.ui.gui.widgets.FilteringPulldownList module¶
Module Documentation here
ccpn.ui.gui.widgets.Font module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Font.Font(fontName, size, bold=False, italic=False, underline=False, strikeout=False)[source]¶
Bases:
PyQt5.QtGui.QFont
- ccpn.ui.gui.widgets.Font.getFont(name='defaultFont', size='MEDIUM')[source]¶
Get the specified font from the fonts dict
- ccpn.ui.gui.widgets.Font.getFontHeight(name='defaultFont', size='MEDIUM')[source]¶
Get the font height form the specified font
- ccpn.ui.gui.widgets.Font.getTextDimensionsFromFont(name='defaultFont', size='MEDIUM', bold=False, italic=False, textList=None)[source]¶
Get the bounding box for the specified text
ccpn.ui.gui.widgets.Frame module¶
This module implemented a Frame and a ScrollableFrame
- Frame(parent=None, showBorder=False, fShape=None, fShadow=None, **kwds)
NB: Until now: fShape and fShadow do not seem to alter the appearance on OSX
- ScrollableFrame(parent=None, showBorder=False, fShape=None, fShadow=None,
minimumSizes=(50,50), scrollBarPolicies=(‘asNeeded’,’asNeeded’), **kwds)
From: http://pyqt.sourceforge.net/Docs/PyQt5/qframe.html#details
The QFrame class is the base class of widgets that can have a frame. More…
Inherits QWidget.
Inherited by QAbstractScrollArea, QLabel, QLCDNumber, QSplitter, QStackedWidget and QToolBox.
Types
enum Shadow { Plain, Raised, Sunken } enum Shape { NoFrame, Box, Panel, WinPanel, …, StyledPanel } enum StyleMask { Shadow_Mask, Shape_Mask } Methods
__init__ (self, QWidget parent = None, Qt.WindowFlags flags = 0) changeEvent (self, QEvent) drawFrame (self, QPainter) bool event (self, QEvent e) QRect frameRect (self) Shadow frameShadow (self) Shape frameShape (self) int frameStyle (self) int frameWidth (self) int lineWidth (self) int midLineWidth (self) paintEvent (self, QPaintEvent) setFrameRect (self, QRect) setFrameShadow (self, Shadow) setFrameShape (self, Shape) setFrameStyle (self, int) setLineWidth (self, int) setMidLineWidth (self, int) QSize sizeHint (self)
- class ccpn.ui.gui.widgets.Frame.Frame(parent=None, showBorder=False, fShape=None, fShadow=None, setLayout=False, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QFrame
,ccpn.ui.gui.widgets.Base.Base
- FRAME_DICT = {'box': 1, 'hLine': 4, 'noFrame': 0, 'panel': 2, 'plain': 16, 'raised': 32, 'styledPanel': 6, 'sunken': 48, 'vLine': 5}¶
- class ccpn.ui.gui.widgets.Frame.OpenGLOverlayFrame(parent=None, showBorder=False, fShape=None, fShadow=None, setLayout=False, backgroundColour=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
- AUTOFILLBACKGROUND = False¶
- class ccpn.ui.gui.widgets.Frame.ScrollOpenGLOverlayFrame(parent=None, setLayout=False, showBorder=False, fShape=None, fShadow=None, minimumSizes=(50, 50), scrollBarPolicies=('asNeeded', 'asNeeded'), margins=(0, 0, 0, 0), **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.OpenGLOverlayFrame
A scrollable frame
- property scrollArea¶
- None, immutable - Return the scrollbar widget; for external usage
- class ccpn.ui.gui.widgets.Frame.ScrollableFrame(parent=None, setLayout=False, showBorder=False, fShape=None, fShadow=None, minimumSizes=(50, 50), scrollBarPolicies=('asNeeded', 'asNeeded'), margins=(0, 0, 0, 0), **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
A scrollable frame
- insertCornerWidget()[source]¶
Insert a corner widget into the target widget with the correct borders
- property scrollArea¶
- None, immutable - Return the scrollbar widget; for external usage
ccpn.ui.gui.widgets.GLAxis module¶
Module Documentation here
- class ccpn.ui.gui.widgets.GLAxis.Gui1dWidgetAxis(parent, spectrumDisplay=None, mainWindow=None, antiAlias=4, drawRightAxis=False, drawBottomAxis=False, fullHeightRightAxis=False, fullWidthBottomAxis=False)[source]¶
Bases:
PyQt5.QtWidgets.QOpenGLWidget
- AXISLOCKEDBUTTON = False¶
- AXISLOCKEDBUTTONALLSTRIPS = False¶
- AXIS_INSIDE = False¶
- AXIS_LINE = 7¶
- AXIS_MARGINBOTTOM = 25¶
- AXIS_MARGINRIGHT = 80¶
- AXIS_MOUSEYOFFSET = 32¶
- AXIS_OFFSET = 3¶
- INVERTXAXIS = True¶
- INVERTYAXIS = True¶
- SHOWSPECTRUMONPHASING = False¶
- SPECTRUMXZOOM = 50.0¶
- SPECTRUMYZOOM = 50.0¶
- XAXES = ['[ppm]', '[Hz]', '[pnts]']¶
- YAXES = ['']¶
- YAXISUSEEFORMAT = True¶
- is1D = True¶
- rescale(rescaleOverlayText=True, rescaleMarksRulers=True, rescaleIntegralLists=True, rescaleRegions=True, rescaleSpectra=True, rescaleStaticHTraces=True, rescaleStaticVTraces=True, rescaleSpectrumLabels=True, rescaleLegend=True)[source]¶
Change to axes of the view, axis visibility, scale and rebuild matrices when necessary to improve display speed
- Gui1dWidgetAxis.resizeGL(self, int, int)[source]
- setAxisType(dimension)[source]¶
Set the current axis type for the axis widget 0 = X Axis type, 1 = Y Axis type Only the required axis is drawn and the widget dimensions are fixed in the other axis
- setBackgroundColour(col, silent=False)[source]¶
set all background colours in the shaders :param col - vec4, 4 element list e.g.: [0.05, 0.05, 0.05, 1.0], very dark gray
- property tilePosition: Tuple[int, int]¶
- Tuple[int, int], mutable - Returns a tuple of the tile coordinates (from top-left) tilePosition = (x, y)
- class ccpn.ui.gui.widgets.GLAxis.GuiNdWidgetAxis(parent, spectrumDisplay=None, mainWindow=None, antiAlias=4, drawRightAxis=False, drawBottomAxis=False, fullHeightRightAxis=False, fullWidthBottomAxis=False)[source]¶
Bases:
ccpn.ui.gui.widgets.GLAxis.Gui1dWidgetAxis
Testing a widget that only contains a right axis
- AXISLOCKEDBUTTON = True¶
- AXISLOCKEDBUTTONALLSTRIPS = True¶
- AXIS_INSIDE = False¶
- AXIS_LINE = 7¶
- AXIS_MARGINBOTTOM = 25¶
- AXIS_MARGINRIGHT = 50¶
- AXIS_MOUSEYOFFSET = 32¶
- AXIS_OFFSET = 3¶
- INVERTXAXIS = True¶
- INVERTYAXIS = True¶
- SHOWSPECTRUMONPHASING = True¶
- SPECTRUMXZOOM = 50.0¶
- SPECTRUMYZOOM = 50.0¶
- XAXES = ['[ppm]', '[Hz]', '[pnts]']¶
- YAXES = ['[ppm]', '[Hz]', '[pnts]']¶
- YAXISUSEEFORMAT = False¶
- is1D = False¶
ccpn.ui.gui.widgets.GLLinearRegionsPlot module¶
Module documentation here
ccpn.ui.gui.widgets.GLWidgets module¶
Module Documentation here
- class ccpn.ui.gui.widgets.GLWidgets.Gui1dWidget(strip=None, mainWindow=None, stripIDLabel=None)[source]¶
Bases:
ccpn.ui.gui.lib.OpenGL.CcpnOpenGL.CcpnGLWidget
- AXISLOCKEDBUTTON = True¶
- AXISLOCKEDBUTTONALLSTRIPS = True¶
- AXIS_MARGINRIGHT = 80¶
- INVERTXAXIS = True¶
- INVERTYAXIS = False¶
- SHOWSPECTRUMONPHASING = False¶
- SPECTRUMNEGCOLOUR = 'sliceColour'¶
- SPECTRUMPOSCOLOUR = 'sliceColour'¶
- SPECTRUMXZOOM = 100.0¶
- SPECTRUMYZOOM = 1000000.0¶
- YAXES = ['']¶
- YAXISUSEEFORMAT = True¶
- buildDiagonals()[source]¶
Build a list containing the diagonal and the spinningRate lines for the sidebands
- getPeakPositionFromMouse(peak, lastStartCoordinate, cursorPosition=None)[source]¶
Get the centre position of the clicked 1d peak
- is1D = True¶
- property showSpectraOnPhasing¶
- None, mutable -
- class ccpn.ui.gui.widgets.GLWidgets.GuiNdWidget(strip=None, mainWindow=None, stripIDLabel=None)[source]¶
Bases:
ccpn.ui.gui.lib.OpenGL.CcpnOpenGL.CcpnGLWidget
- AXIS_INSIDE = False¶
- INVERTXAXIS = True¶
- INVERTYAXIS = True¶
- SPECTRUMNEGCOLOUR = 'negativeContourColour'¶
- SPECTRUMPOSCOLOUR = 'positiveContourColour'¶
- getPeakPositionFromMouse(peak, lastStartCoordinate, cursorPosition=None)[source]¶
Get the centre position of the clicked peak
- is1D = False¶
ccpn.ui.gui.widgets.GroupBox module¶
Module Documentation here
- class ccpn.ui.gui.widgets.GroupBox.GroupBox(parent=None, border=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QGroupBox
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.GuiTable module¶
Module Documentation here
- class ccpn.ui.gui.widgets.GuiTable.GuiTable(parent=None, mainWindow=None, dataFrameObject=None, actionCallback=None, selectionCallback=None, checkBoxCallback=None, _pulldownKwds=None, enableMouseMoveEvent=True, allowRowDragAndDrop=False, multiSelect=False, selectRows=True, numberRows=False, autoResize=False, enableExport=True, enableDelete=True, enableSearch=True, hideIndex=True, stretchLastSection=True, **kwds)[source]¶
Bases:
pyqtgraph.widgets.TableWidget.TableWidget
,ccpn.ui.gui.widgets.Base.Base
- EXPANDERCOLUMN = 0¶
- ICON_FILE = '/Users/ejb66/PycharmProjects/Git/AnalysisV3/src/python/ccpn/ui/gui/widgets/icons/editable.png'¶
- ITEMKLASS¶
alias of
ccpn.ui.gui.widgets.TableSorting.CcpnTableWidgetItem
- MERGECOLUMN = 0¶
- MINSORTCOLUMN = 0¶
- PIDCOLUMN = 0¶
- PRIMARYCOLUMN = 'Pid'¶
- SPANCOLUMNS = ()¶
- applySortToGroups = False¶
- clearSelection()[source]¶
Clear the current selection in the table and remove objects from the current list
- property columnDefinitions¶
- None, immutable - return a ccpn ColumnClass obj if _dataFrameObject is set.
- property columnTexts¶
- None, immutable - return a list of column texts.
- property columns¶
- None, immutable - return a list of column objs.
- dropEvent(event)[source]¶
Extension to the dropEvent of DropBase. To setup this event in a module/table see the gui.lib.GuiNotifier.GuiNotifier class example: module.setGuiNotifier(table, [GuiNotifier.DROPEVENT], [DropBase.PIDS], callback=module.theCallback)
- enableMultiColumnSort = False¶
- exportTableDialog(exportAll=True)[source]¶
export the contents of the table to a file The actual data values are exported, not the visible items which may be rounded due to the table settings
- Parameters
exportAll – True/False - True implies export whole table - but in visible order False, export only the visible table
- getCellToRows(cellItem, attribute)[source]¶
Get the list of objects which cellItem maps to for this table To be subclassed as required
- getDataFrameFromList(table=None, buildList=None, colDefs=None)[source]¶
Return a Pandas dataFrame from an internal list of objects The columns are based on the ‘func’ functions in the columnDefinitions
- Parameters
buildList –
colDefs –
- Return pandas dataFrameObject
- getDataFrameFromRows(table=None, dataFrame=None, colDefs=None)[source]¶
Return a Pandas dataFrame from the internal rows of an internal Pandas dataFrame The columns are based on the ‘func’ functions in the columnDefinitions
- Parameters
buildList –
colDefs –
- Return pandas dataFrame
- getIndexList(classItems, attribute)[source]¶
Get the list of objects on which to before the indexing To be subclassed as required
- getSelectedObjects(fromSelection=None)[source]¶
- Parameters
fromSelection –
- Returns
get a list of table objects. If the table has a header called pid, the object is a ccpn Core obj like Peak, otherwise is a Pandas series object corresponding to the selected row(s).
- hideDefaultColumns()[source]¶
If the table is empty then check visible headers against the last header hidden list
- highlightObjects(objectList, scrollToSelection=True)[source]¶
Highlight a list of objects in the table
- populateTable(rowObjects=None, columnDefs=None, selectedObjects=None)[source]¶
Populate the table with a set of objects to highlight, or keep current selection highlighted with the first item visible.
Use selectedObjects = [] to clear the selected items
- Parameters
rowObjects – list of objects to set each row
- selectObjects(objList: list, setUpdatesEnabled: bool = False)[source]¶
Select the object in the table
- setData(data)[source]¶
Set the data displayed in the table. Allowed formats are:
numpy arrays
numpy record arrays
metaarrays
list-of-lists [[1,2,3], [4,5,6]]
dict-of-lists {‘x’: [1,2,3], ‘y’: [4,5,6]}
list-of-dicts [{‘x’: 1, ‘y’: 4}, {‘x’: 2, ‘y’: 5}, …]
Pandas Dataframes
- setHiddenColumns(texts, update=True)[source]¶
set a list of columns headers to be hidden from the table.
- setRow(*args, **kwds)¶
- setRowBackgroundColour(row, colour, columnList=None)[source]¶
Set the background colour for the row
- Parameters
row – row to be coloured
colour – colour of type QtGui.Brush/QtGui.Color
columnList – None, or list of column numbers, out-of-range columns are ignored
- Returns
- setTableFromDataFrameObject(dataFrameObject, columnDefs=None)[source]¶
Populate the table from a Pandas dataFrame
- setTableNotifiers(tableClass=None, rowClass=None, cellClassNames=None, tableName=None, rowName=None, className=None, changeFunc=None, updateFunc=None, tableSelection=None, pullDownWidget=None, callBackClass=None, selectCurrentCallBack=None, searchCallBack=None, moduleParent=namespace(className='notDefined', serial=0))[source]¶
Set a Notifier to call when an object is created/deleted/renamed/changed rename calls on name change calls on any other attribute
- Parameters
pulldown (tableClass - class of table object, selected by) –
table (rowClass - class identified by a row in the) –
cellClassName) (cellClassNames - list of tuples (cellClass,) – class that affects row when changed
row (tableName - name of attribute for parent name of) –
cell (rowName - name of attribute for parent name of) –
changeFunc –
updateFunc –
tableSelection –
pullDownWidget –
- Returns
- styleSheet = 'GuiTable {\n background-color: %(GUITABLE_BACKGROUND)s;\n alternate-background-color: %(GUITABLE_ALT_BACKGROUND)s;\n border: 2px solid %(BORDER_NOFOCUS)s;\n border-radius: 2px;\n }\n GuiTable::focus {\n background-color: %(GUITABLE_BACKGROUND)s;\n alternate-background-color: %(GUITABLE_ALT_BACKGROUND)s;\n border: 2px solid %(BORDER_FOCUS)s;\n border-radius: 2px;\n }\n GuiTable::item {\n padding: 2px;\n color: %(GUITABLE_ITEM_FOREGROUND)s;\n }\n GuiTable::item::selected {\n background-color: %(GUITABLE_SELECTED_BACKGROUND)s;\n color: %(GUITABLE_SELECTED_FOREGROUND)s;\n }\n '¶
- tableToDataFrame(exportAll=True)[source]¶
Extract the table as a dataframe for later printing The actual data values are exported, not the visible items which may be rounded due to the table settings
- Parameters
exportAll – True/False - True implies export whole table - but in visible order False, export only the visible table
- class ccpn.ui.gui.widgets.GuiTable.GuiTableDelegate(parent)[source]¶
Bases:
PyQt5.QtWidgets.QStyledItemDelegate
handle the setting of data when editing the table
- ccpn.ui.gui.widgets.GuiTable.dataFrameToExcel(dataFrame, path, sheet_name='Table', columns=None)[source]¶
ccpn.ui.gui.widgets.HLine module¶
- class ccpn.ui.gui.widgets.HLine.HLine(parent=None, style='SolidLine', colour=2, height=10, lineWidth=2, divisor=3, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
- DASH_DOT_DOT_LINE = 'DashDotDotLine'¶
- DASH_DOT_LINE = 'DashDotLine'¶
- DASH_LINE = 'DashLine'¶
- SOLID_LINE = 'SolidLine'¶
- styles = {'DashDotDotLine': 5, 'DashDotLine': 4, 'DashLine': 2, 'SolidLine': 1}¶
- class ccpn.ui.gui.widgets.HLine.LabeledHLine(parent=None, height=30, text=None, bold=False, sides='both', style='SolidLine', colour=2, lineWidth=2, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
A class to make a Frame with an Hline - Label - Hline
ccpn.ui.gui.widgets.HighlightBox module¶
Module Documentation here
- class ccpn.ui.gui.widgets.HighlightBox.HighlightBox(parent=None, style: str = 'SolidLine', colour: str | PyQt5.QtGui.QColor = 2, lineWidth: int = 2, showBorder=True, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
Widget to put a selection box around a span of cells in a grid layout
- DASH_DOT_DOT_LINE = 'DashDotDotLine'¶
- DASH_DOT_LINE = 'DashDotLine'¶
- DASH_LINE = 'DashLine'¶
- SOLID_LINE = 'SolidLine'¶
- property showBorder¶
- None, mutable - Get the visible state of the border without hiding the widget
- styles = {'DashDotDotLine': 5, 'DashDotLine': 4, 'DashLine': 2, 'SolidLine': 1}¶
ccpn.ui.gui.widgets.Icon module¶
Module Documentation here
ccpn.ui.gui.widgets.InputDialog module¶
Module Documentation here
- ccpn.ui.gui.widgets.InputDialog.askFloat(title, prompt, initialValue=0.0, minValue=- 2147483647, maxValue=2147483647, decimals=6, parent=None)[source]¶
ccpn.ui.gui.widgets.IpythonConsole module¶
Module Documentation here
- class ccpn.ui.gui.widgets.IpythonConsole.IpythonConsole(mainWindow, namespace=None, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
- focusedIn¶
- mouseMoved¶
- writeConsoleCommand(command: str, **objectParameters)[source]¶
Set keyword:value objectParameters to point to the relevant objects, echo command in console, and set Undo
Example calls:
writeConsoleCommand(“application.newSpectrumDisplay(spectrum)”, spectrum=spectrumOrPid)
- writeConsoleCommand(
“newAssignment = peak.assignDimension(axisCode=%s, value=[newNmrAtom]” % axisCode, peak=peakOrPid)
ccpn.ui.gui.widgets.Label module¶
Module Documentation here
- class ccpn.ui.gui.widgets.Label.ActiveLabel(parent=None, mainWindow=None, text='', textColour=None, textSize=12, bold=False, margins=[2, 1, 2, 1], selectionCallback=None, actionCallback=None, **kwds)[source]¶
- class ccpn.ui.gui.widgets.Label.Label(parent=None, text='', textColour=None, textSize=None, bold=False, italic=False, margins=[2, 1, 2, 1], icon=None, iconSize=(16, 16), **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QLabel
,ccpn.ui.gui.widgets.Base.Base
- class ccpn.ui.gui.widgets.Label.VerticalLabel(parent=None, text='', textColour=None, textSize=12, bold=False, margins=[2, 1, 2, 1], orientation='horizontal', **kwds)[source]¶
Bases:
pyqtgraph.widgets.VerticalLabel.VerticalLabel
,ccpn.ui.gui.widgets.Base.Base
ccpn.ui.gui.widgets.LegendItem module¶
Module Documentation Here
- class ccpn.ui.gui.widgets.LegendItem.CustomItemSample(item, showLine)[source]¶
Bases:
pyqtgraph.graphicsItems.LegendItem.ItemSample
ccpn.ui.gui.widgets.LineEdit module¶
Module Documentation here
- class ccpn.ui.gui.widgets.LineEdit.FloatLineEdit(parent, text='', textAlignment='c', backgroundText=None, minimumWidth=100, textColor=None, editable=True, **kwds)[source]¶
- class ccpn.ui.gui.widgets.LineEdit.LineEdit(parent, text='', textAlignment='c', backgroundText=None, minimumWidth=100, textColor=None, editable=True, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QLineEdit
,ccpn.ui.gui.widgets.Base.Base
- class ccpn.ui.gui.widgets.LineEdit.PasswordEdit(parent, text='', textAlignment='c', backgroundText=None, minimumWidth=100, textColor=None, editable=True, **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.LineEdit.LineEdit
Subclass of LineEdit to handle passwords to be shown as **
ccpn.ui.gui.widgets.LinearRegionsPlot module¶
- class ccpn.ui.gui.widgets.LinearRegionsPlot.LinearRegionsPlot(values=None, orientation='v', brush=None, colour=None, movable=True, bounds=None, **kwds)[source]¶
Bases:
pyqtgraph.graphicsItems.LinearRegionItem.LinearRegionItem
Used for marking a horizontal or vertical region in plots. The region can be dragged and is bounded by lines which can be dragged individually.
ccpn.ui.gui.widgets.ListView module¶
Module Documentation here
- class ccpn.ui.gui.widgets.ListView.ListView(parent=None, mainWindow=None, fitToContents=False, listViewContainer=None, maximumRows=200, headerHeight=None, minRowCount=None, multiSelect=False, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QListView
,ccpn.ui.gui.widgets.Base.Base
Class to implement a ListView
ListView can be set to show a maximum number of rows. Can also be minimised to the contents - this requires the container to be set.
Also advisable to set the sizePolicy of the container: e.g. listViewContainer.setSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
- mouseMoveEvent(event: PyQt5.QtGui.QMouseEvent) None [source]¶
Create a mouse drag event with the selected items when dragging with the left button
ccpn.ui.gui.widgets.ListWidget module¶
List widget
- class ccpn.ui.gui.widgets.ListWidget.ListWidget(parent=None, objects=None, callback=None, rightMouseCallback=None, contextMenu=True, multiSelect=True, acceptDrops=False, sortOnDrop=False, allowDuplicates=False, copyDrop=True, infiniteHeight=False, minRowsVisible=4, emptyText=None, **kwds)[source]¶
Bases:
PyQt5.QtWidgets.QListWidget
,ccpn.ui.gui.widgets.Base.Base
- changed¶
- cleared¶
- dropped¶
- class ccpn.ui.gui.widgets.ListWidget.ListWidgetPair(parent=None, leftObjects=None, rightObjects=None, callback=None, rightMouseCallback=None, contextMenu=True, multiSelect=True, acceptDrops=True, showMoveArrows=False, showMoveText=False, leftLabel='Not included', rightLabel='Included', setLayout=True, copyDrop=False, objAttr='pid', **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Widget.Widget
Define a pair of listWidgets such that information can be copied from one side to the other and vise-versa
- class ccpn.ui.gui.widgets.ListWidget.ListWidgetSelector(parent=None, objects=None, callback=None, rightMouseCallback=None, contextMenu=True, multiSelect=True, acceptDrops=False, title='Copy Items', **kwds)[source]¶
Bases:
ccpn.ui.gui.widgets.Frame.Frame
Define a pair of listWidgets such that information can be cpoied from one side to the other and vise-versa
- residueTypes = [('Alanine', 'ALA', 'A'), ('Arginine', 'ARG', 'R'), ('Asparagine', 'ASN', 'N'), ('Aspartic acid', 'ASP', 'D'), ('ASP/ASN ambiguous', 'ASX', 'B'), ('Cysteine', 'CYS', 'C'), ('Glutamine', 'GLN', 'Q'), ('Glutamic