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

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.
 
initialize(self)
Initialize dialog using site attributes from the Phase hypothesis stored in the PT.
 
_setSiteMask(self, site_mask)
Sets site mask to a given type
int
_getSiteMask(self)
Returns current site mask.
 
_resetFeature(self)
Reset feature attributes to its original values.
 
_moveToggled(self, state)
This function is called to toggle feature translation/rotation on and off.
 
_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.
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.
int or None
_findSiteIndex(self)
This function determines site index in a hypothesis for the current feature.
 
_setSiteCoordinates(self, xyz)
This function is called to change values of site coordinates in the editor when user moves site in the workspace.
 
_modifyFragments(self)
Modify hypothesis fragments when feature attributes were modified.
 
_updateHypothesis(self, hypo)
This function is called to update hypothesis in the project table after feature attributes have been modified.
structure.Structure
_getFragmentForSite(self)
This function is called to create fragment structure for the site that user is modifying.
 
_featureTypeChanged(self, index)
This function is called when the feature type is changed.
 
closeEvent(self, e)
This function is called when the feature editor is closed.
 
_updateTolerance(self)
Updates feature tolerance data.
 
_updateSiteMask(self)
Updates site mask data.

Inherited from PyQt4.QtGui.QDialog: accept, accepted, contextMenuEvent, done, eventFilter, exec_, extension, finished, isSizeGripEnabled, keyPressEvent, minimumSizeHint, open, orientation, reject, 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]
  MASK_PERMITTED = 0
hash(x)
  MASK_REQUIRED = 1
  MASK_DISABLED = -1
  DEFAULT_TOL = 2.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__

_setSiteMask(self, site_mask)

 

Sets site mask to a given type

Parameters:
  • site_mask (int) - site mask type

_getSiteMask(self)

 

Returns current site mask.

Returns: int
site mask

_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

_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

_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

_findSiteIndex(self)

 

This function determines site index in a hypothesis for the current feature.

Returns: int or None
index of a given site in the current hypothesis

_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

_modifyFragments(self)

 

Modify hypothesis fragments when feature attributes were modified. This function is called when hypothesis already has fragments.

_updateHypothesis(self, hypo)

 

This function is called to update hypothesis in the project table after feature attributes have been modified.

Parameters:

_getFragmentForSite(self)

 

This function is called to create fragment structure for the site that user is modifying.

Returns: structure.Structure
fragment structure

_featureTypeChanged(self, index)

 

This function is called when the feature type is changed.

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

closeEvent(self, e)

 

This function is called when the feature editor is closed. Here we determine what attributes were modified and make calls to save modified hypothesis in the Project Table.

Overrides: PyQt4.QtGui.QWidget.closeEvent