Subgroup: New

Class: QgsNewNameDialog

class qgis.gui.QgsNewNameDialog

Bases: qgis._gui.QgsDialog

New name, for example new layer name dialog. If existing names are provided, the dialog warns users if an entered name already exists.

New in version 2.10: Methods

accept
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
autoFillBackground
backgroundRole
baseSize
blockSignals
buttonBox Returns the button box.
changeEvent
childAt childAt(self, int, int) -> QWidget
childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
close
closeEvent
colorCount
conflictingNameWarning Returns the string used for warning users if a conflicting name exists.
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
cursor
customEvent
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
done
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
exec
exec_
exists Test if name or name with at least one extension exists.
find
findChild findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject
findChildren findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]
focusInEvent
focusNextChild
focusNextPrevChild
focusOutEvent
focusPolicy
focusPreviousChild
focusProxy
focusWidget
font
fontInfo
fontMetrics
foregroundRole
frameGeometry
frameSize
fullNames
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse grabMouse(self, Union[QCursor, Qt.CursorShape])
grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
highlightText List of names with extensions
hintString Returns the hint string for the dialog (the text shown above the name input box).
inherits
initPainter
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isSizeGripEnabled
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout Returns the central layout.
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
matching
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move move(self, int, int)
moveEvent
moveToThread
name Name entered by user.
nameChanged
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
open
overrideWindowFlags
overrideWindowState
overwriteEnabled Returns whether users are permitted to overwrite existing names.
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure Each keyword argument is either the name of a Qt property or a Qt signal.
raise_
receivers
rect
reject
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
render render(self, QPainter, targetOffset: QPoint = QPoint(), sourceRegion: QRegion = QRegion(), flags: Union[QWidget.RenderFlags, QWidget.RenderFlag] = QWidget.RenderFlags(QWidget.DrawWindowBackground|QWidget.DrawChildren))
repaint repaint(self, int, int, int, int)
resize resize(self, int, int)
resizeEvent
restoreGeometry
result
saveGeometry
scroll scroll(self, int, int, QRect)
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize setBaseSize(self, QSize)
setConflictingNameWarning Sets the string used for warning users if a conflicting name exists.
setContentsMargins setContentsMargins(self, QMargins)
setContextMenuPolicy
setCursor
setDisabled
setEnabled
setFixedHeight
setFixedSize setFixedSize(self, int, int)
setFixedWidth
setFocus setFocus(self, Qt.FocusReason)
setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry setGeometry(self, int, int, int, int)
setGraphicsEffect
setHidden
setHintString Sets the hint string for the dialog (the text shown above the name input box).
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMask setMask(self, QRegion)
setMaximumHeight
setMaximumSize setMaximumSize(self, QSize)
setMaximumWidth
setMinimumHeight
setMinimumSize setMinimumSize(self, QSize)
setMinimumWidth
setModal
setMouseTracking
setObjectName
setOverwriteEnabled Sets whether users are permitted to overwrite existing names.
setPalette
setParent setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType])
setProperty
setResult
setShortcutAutoRepeat
setShortcutEnabled
setSizeGripEnabled
setSizeIncrement setSizeIncrement(self, QSize)
setSizePolicy setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy)
setStatusTip
setStyle
setStyleSheet
setTabOrder
setTabletTracking
setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
tabletEvent
testAttribute
thread
timerEvent
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update update(self, QRect)
updateGeometry
updateMicroFocus
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y

Attributes

Accepted
DrawChildren
DrawWindowBackground
IgnoreMask
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
Rejected
accepted accepted(self) [signal]
customContextMenuRequested customContextMenuRequested(self, QPoint) [signal]
destroyed destroyed(self, QObject = None) [signal]
finished finished(self, int) [signal]
objectNameChanged objectNameChanged(self, str) [signal]
rejected rejected(self) [signal]
staticMetaObject
windowIconChanged windowIconChanged(self, QIcon) [signal]
windowIconTextChanged windowIconTextChanged(self, str) [signal]
windowTitleChanged windowTitleChanged(self, str) [signal]
actionEvent()
changeEvent()
childEvent()
closeEvent()
conflictingNameWarning(self) → str

Returns the string used for warning users if a conflicting name exists.

New in version 2.12.

connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
eventFilter()
exists(name: str, extensions: Iterable[str], existing: Iterable[str], cs: Qt.CaseSensitivity = Qt.CaseSensitive) → bool

Test if name or name with at least one extension exists.

Parameters:
  • name – name or base name
  • extensions – base name extensions
  • existing – existing names
  • cs – case sensitivity for new name to existing names comparison
Returns:

true if name exists

focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
fullNames(name: str, extensions: Iterable[str]) → List[str]
hideEvent()
highlightText(self, text: str) → str

List of names with extensions

hintString(self) → str

Returns the hint string for the dialog (the text shown above the name input box).

See also

setHintString()

New in version 2.12.

initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
matching(newNames: Iterable[str], existingNames: Iterable[str], cs: Qt.CaseSensitivity = Qt.CaseSensitive) → List[str]
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
name(self) → str

Name entered by user.

Returns:new name
nameChanged(self)
nativeEvent()
overwriteEnabled(self) → bool

Returns whether users are permitted to overwrite existing names.

New in version 2.12.

paintEvent()
receivers()
resizeEvent()
sender()
senderSignalIndex()
setConflictingNameWarning(self, string: str)

Sets the string used for warning users if a conflicting name exists.

Parameters:string – warning string. If empty a default warning string will be used.

New in version 2.12.

setHintString(self, hintString: str)

Sets the hint string for the dialog (the text shown above the name input box).

Parameters:hintString – hint text

See also

hintString()

New in version 2.12.

setOverwriteEnabled(self, enabled: bool)

Sets whether users are permitted to overwrite existing names. If true, then the dialog will reflect that the new name will overwrite an existing name. If false, then the dialog will not accept names which already exist.

New in version 2.12.

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()