Package client :: Package Dock :: Module Holders :: Class NameHolder
[hide private]
[frames] | no frames]

Class NameHolder

source code


Overview

This holder is a simple implementation of a PyQt4.QtGui.QLineEdit which has a default value. The purpose of the default value is that when the holder is cleared, instead of an empty string the default value appears. This is used for the naming of data which has yet to be created. In that sense the NameHolder is different from other holders since it doesn't represent data, just a name for future data.

Nested Classes [hide private]

Inherited from PyQt4.QtGui.QLineEdit: EchoMode

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods [hide private]
 
__init__(self, text)
This simple constructor will create a PyQt4.QtGui.QLineEdit and set its default value and initial value.
source code
 
clear(self)
This overrides the normal implementation of clear so that instead of setting its text to an empty string, it is reset to the default value.
source code
 
dropEvent(self, ev)
This method handles the dropping of objects into the PyQt4.QtGui.QLineEdit.
source code
 
dragEnterEvent(self, ev)
This method simply allows objects to be dragged over the PyQt4.QtGui.QLineEdit.
source code

Inherited from PyQt4.QtGui.QLineEdit: actionEvent, alignment, backspace, changeEvent, childEvent, closeEvent, completer, connectNotify, contextMenuEvent, copy, create, createStandardContextMenu, cursorBackward, cursorForward, cursorPosition, cursorPositionAt, cursorWordBackward, cursorWordForward, customEvent, cut, del_, deselect, destroy, disconnectNotify, displayText, dragEnabled, dragLeaveEvent, dragMoveEvent, echoMode, enabledChange, end, enterEvent, event, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, focusPreviousChild, fontChange, hasAcceptableInput, hasFrame, hasSelectedText, hideEvent, home, inputMask, inputMethodEvent, inputMethodQuery, insert, isModified, isReadOnly, isRedoAvailable, isUndoAvailable, keyPressEvent, keyReleaseEvent, languageChange, leaveEvent, maxLength, metric, minimumSizeHint, mouseDoubleClickEvent, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, moveEvent, paintEvent, paletteChange, paste, receivers, redo, resetInputContext, resizeEvent, selectAll, selectedText, selectionStart, sender, setAlignment, setCompleter, setCursorPosition, setDragEnabled, setEchoMode, setFrame, setInputMask, setMaxLength, setModified, setReadOnly, setSelection, setText, setValidator, showEvent, sizeHint, tabletEvent, text, timerEvent, undo, updateMicroFocus, validator, wheelEvent, windowActivationChange

Inherited from PyQt4.QtGui.QWidget: acceptDrops, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsRect, contextMenuPolicy, cursor, devType, ensurePolished, find, focusPolicy, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabKeyboard, grabMouse, grabShortcut, handle, hasFocus, hasMouseTracking, height, heightForWidth, hide, inputContext, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, layout, layoutDirection, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, minimumHeight, minimumSize, minimumWidth, mouseGrabber, move, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, parentWidget, pos, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, repaint, resize, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setHidden, setInputContext, setLayout, setLayoutDirection, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, testAttribute, toolTip, topLevelWidget, underMouse, unsetCursor, unsetLayoutDirection, update, updateGeometry, updatesEnabled, visibleRegion, whatsThis, width, winId, window, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

Inherited from PyQt4.QtCore.QObject: blockSignals, children, connect, deleteLater, disconnect, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, emit, eventFilter, findChild, findChildren, inherits, installEventFilter, isWidgetType, killTimer, metaObject, moveToThread, objectName, parent, property, removeEventFilter, setObjectName, setProperty, signalsBlocked, startTimer, thread, tr, trUtf8

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

Inherited from sip.wrapper: __delattr__, __getattribute__, __new__, __setattr__

Inherited from object: __hash__, __reduce__, __reduce_ex__, __repr__, __str__

Class Variables [hide private]

Inherited from PyQt4.QtGui.QLineEdit: NoEcho, Normal, Password, PasswordEchoOnEdit

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, text)
(Constructor)

source code 

Overview

This simple constructor will create a PyQt4.QtGui.QLineEdit and set its default value and initial value.

Parameters:
  • text (string) - This will become the initial text of the PyQt4.QtGui.QLineEdit, as well as the default value for it.
Overrides: object.__init__

clear(self)

source code 

Overview

This overrides the normal implementation of clear so that instead of setting its text to an empty string, it is reset to the default value.

Overrides: PyQt4.QtGui.QLineEdit.clear

dropEvent(self, ev)

source code 

Overview

This method handles the dropping of objects into the PyQt4.QtGui.QLineEdit. It will essentially take the displayed name of objects from the basin object tree and set the text of the PyQt4.QtGui.QLineEdit to that.

Parameters:
  • ev (QDropEvent) - This is the event object for dropping an object into the PyQt4.QtGui.QLineEdit. It must have a mime data type that is plain text.
Overrides: PyQt4.QtGui.QWidget.dropEvent

dragEnterEvent(self, ev)

source code 

Overview

This method simply allows objects to be dragged over the PyQt4.QtGui.QLineEdit. Without the ability to be drug over this object, an object could not be dropped into it.

Parameters:
  • ev (QDragEnterEvent)
Overrides: PyQt4.QtGui.QWidget.dragEnterEvent