Package schrodinger :: Package application :: Package phase :: Module phase_markers :: Class EditFeatureDialog
[hide private]
[frames] | no frames]

Class EditFeatureDialog

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt4.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt4.QtGui.QPaintDevice --+        
                            |        
          PyQt4.QtGui.QWidget --+    
                                |    
              PyQt4.QtGui.QDialog --+
                                    |
                                   EditFeatureDialog
Known Subclasses:

Class for Phase feature editor dialog. It allows to modify attributes of sites in Phase hypothesis.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QDialog: DialogCode

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self, feature_id)
Class initializer.
 
setupPanel(self, feature_id)
Set up panel.
 
initialize(self)
Initialize dialog.
 
setupConnections(self)
Set up connnections
 
showAtCursor(self)
Shows feature dialog at the current cursor position.
 
_removeWorkspaceChangedCallback(self)
Removes workspace changed callback.
 
_workspaceChanged(self, what_changed)
Delays the call to check the Workspace changes to see if this dialog should be closed.
 
_checkHypothesisIncluded(self)
Checks whether hypothesis for the current feature is included in the Workspace.
 
_resetFeature(self)
Reset feature attributes to its original values.
 
_moveToggled(self, state)
This function is called to toggle feature translation/rotation on and off.
 
_initializeRotation(self)
This function adds rotation points.
 
_moveStop(self)
This function is called when point translation/rotation is toggled off.
 
_featureMoved(self, cur_points)
This function is called when the feature is moved in the workspace by translation or rotation.
 
_featureRotated(self, cur_points)
Rotates projected points around the 'main' feature site.
 
_featureTypeChanged(self, index)
This function is called when the feature type is changed.
list
_getSiteCoordinates(self)
This function returns a list of coordinates for all sites (including projected points if any) for Phase feature.
 
_coordinatesChanged(self)
This function is called when user changes site coordinates by using spin boxes in the editor rather than manually moving feature.
 
_setSiteCoordinates(self, xyz)
This function is called to change values of site coordinates in the editor when user moves site in the workspace.
 
accept(self)
This function is called when user clicks 'Ok' button.
 
reject(self)
This function is called when user closes dialog by clicking [x] button.
 
_unregisterDialog(self)
Marks this dialog as 'closed' in a global registry of all edit feature dialogs.

Inherited from PyQt4.QtGui.QDialog: accepted, closeEvent, contextMenuEvent, done, eventFilter, exec_, extension, finished, isSizeGripEnabled, keyPressEvent, minimumSizeHint, open, orientation, rejected, resizeEvent, result, setExtension, setModal, setOrientation, setResult, setSizeGripEnabled, setVisible, showEvent, showExtension, sizeHint

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, enabledChange, ensurePolished, enterEvent, event, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, heightForWidth, hide, hideEvent, inputContext, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyReleaseEvent, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, resize, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputContext, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, width, winId, window, windowActivationChange, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

Inherited from PyQt4.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connect, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, tr, trUtf8

Inherited from PyQt4.QtGui.QPaintDevice: colorCount, depth, heightMM, logicalDpiX, logicalDpiY, numColors, paintingActive, physicalDpiX, physicalDpiY, widthMM

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  FEATURE_OFFSET = [0.002, 0.0, 0.0]

Inherited from PyQt4.QtGui.QDialog: Accepted, Rejected

Inherited from PyQt4.QtGui.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Inherited from PyQt4.QtGui.QPaintDevice: PdmDepth, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, feature_id)
(Constructor)

 

Class initializer.

Parameters:
  • feature_id (int) - feature id that it being modified
Overrides: object.__init__

setupPanel(self, feature_id)

 

Set up panel.

Parameters:
  • feature_id (int) - feature id

_workspaceChanged(self, what_changed)

 

Delays the call to check the Workspace changes to see if this dialog should be closed. Using a single shot allows for the project table to be updated appropriately.

_checkHypothesisIncluded(self)

 

Checks whether hypothesis for the current feature is included in the Workspace. If hypothesis entry was excluded close edit feature dialog.

_moveToggled(self, state)

 

This function is called to toggle feature translation/rotation on and off.

Parameters:
  • state (int) - state of movement toggle. It can be either Qt.Checked or Qt.Unchecked

_initializeRotation(self)

 

This function adds rotation points. It should be called every time feature is translated in order to reset center of rotation.

_featureMoved(self, cur_points)

 

This function is called when the feature is moved in the workspace by translation or rotation.

Parameters:
  • cur_points (list) - coordinates of site points of Phase feature.

_featureRotated(self, cur_points)

 

Rotates projected points around the 'main' feature site. Since custom features only allow one projected point we discard all but the first projected points.

Parameters:
  • cur_points (list) - coordinates of Phase feature projected points

_featureTypeChanged(self, index)

 

This function is called when the feature type is changed.

Parameters:
  • index (int) - type index in features combo box

_getSiteCoordinates(self)

 

This function returns a list of coordinates for all sites (including projected points if any) for Phase feature.

Returns: list
list of site coordinates

_setSiteCoordinates(self, xyz)

 

This function is called to change values of site coordinates in the editor when user moves site in the workspace.

Parameters:
  • xyz (list) - site xyz coordinates

accept(self)

 

This function is called when user clicks 'Ok' button. Here we determine what attributes were modified and make calls to save modified hypothesis in the Project Table.

Overrides: PyQt4.QtGui.QDialog.accept

reject(self)

 

This function is called when user closes dialog by clicking [x] button. Here we reset feature options to original values and close dialog.

Overrides: PyQt4.QtGui.QDialog.reject

_unregisterDialog(self)

 

Marks this dialog as 'closed' in a global registry of all edit feature dialogs. This is done to allow at most one dialog to be open for any hypothesis.