Subgroup: other
Class: QgsExtentGroupBox¶
-
class
qgis.gui.
QgsExtentGroupBox
¶ Bases:
qgis._gui.QgsCollapsibleGroupBox
Collapsible group box for configuration of extent, typically for a save operation.
Besides allowing the user to enter the extent manually, it comes with options to use original extent or extent defined by the current view in map canvas.
When using the widget, make sure to call setOriginalExtent(), setCurrentExtent() and setOutputCrs() during initialization.
New in version 2.4: Methods
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
alignment
autoFillBackground
backgroundRole
baseSize
blockSignals
changeEvent
checkClicked
checkToggled
childAt
childAt(self, int, int) -> QWidget childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
clearModifiers
close
closeEvent
collapseExpandFixes
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
create
createWindowContainer
currentCrs
Returns the coordinate reference system for the current extent set for the widget. currentExtent
Returns the current extent set for the widget. cursor
customEvent
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
extentState
Returns the currently selected state for the widget’s extent. 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
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse
grabMouse(self, Union[QCursor, Qt.CursorShape]) grabShortcut
graphicsEffect
graphicsProxyWidget
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
inherits
init
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isCheckable
isChecked
isCollapsed
Returns the current collapsed state of this group box isEnabled
isEnabledTo
isFlat
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layout
layoutDirection
leaveEvent
loadState
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
move(self, int, int) moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
originalCrs
Returns the original coordinate reference system set for the widget. originalExtent
Returns the original extent set for the widget. outputCrs
Returns the current output CRS, used in the display. outputExtent
Returns the extent shown in the widget - in output CRS coordinates. overrideWindowFlags
overrideWindowState
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_
ratio
Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. receivers
rect
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
saveCheckedState
saveCollapsedState
saveGeometry
saveKey
saveState
scroll
scroll(self, int, int, QRect) scrollOnExpand
If this is set to false the parent QScrollArea will not be automatically scrolled to this widget’s contents when expanded sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAlignment
setAttribute
setAutoFillBackground
setBackgroundRole
setBaseSize
setBaseSize(self, QSize) setCheckable
setChecked
setCollapsed
Collapse or uncollapse this groupbox setContentsMargins
setContentsMargins(self, QMargins) setContextMenuPolicy
setCurrentExtent
Sets the current extent to show in the widget - should be called as part of initialization (or whenever current extent changes). setCursor
setDisabled
setEnabled
setFixedHeight
setFixedSize
setFixedSize(self, int, int) setFixedWidth
setFlat
setFocus
setFocus(self, Qt.FocusReason) setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setGeometry
setGeometry(self, int, int, int, int) setGraphicsEffect
setHidden
setInputMethodHints
setLayout
setLayoutDirection
setLocale
setMapCanvas
Sets the map canvas to enable dragging of extent on a canvas. setMask
setMask(self, QRegion) setMaximumHeight
setMaximumSize
setMaximumSize(self, QSize) setMaximumWidth
setMinimumHeight
setMinimumSize
setMinimumSize(self, QSize) setMinimumWidth
setMouseTracking
setObjectName
setOriginalExtent
Sets the original extent and coordinate reference system for the widget. setOutputCrs
Sets the output CRS - may need to be used for transformation from original/current extent. setOutputExtentFromCurrent
Sets the output extent to be the same as current extent (may be transformed to output CRS). setOutputExtentFromDrawOnCanvas
Sets the output extent by dragging on the canvas. setOutputExtentFromLayer
Sets the output extent to match a layer
’s extent (may be transformed to output CRS).setOutputExtentFromOriginal
Sets the output extent to be the same as original extent (may be transformed to output CRS). setOutputExtentFromUser
Sets the output extent to a custom extent (may be transformed to output CRS). setPalette
setParent
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) setProperty
setRatio
Sets a fixed aspect ratio to be used when dragging extent onto the canvas. setSaveCheckedState
Set this to true to save/restore checked state setSaveCollapsedState
set this to false to not save/restore collapsed state setScrollOnExpand
Set this to false to not automatically scroll parent QScrollArea to this widget’s contents when expanded setSettingGroup
Set this to a defined string to share save/restore states across different parent dialogs setSettings
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement
setSizeIncrement(self, QSize) setSizePolicy
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) setStatusTip
setStyle
setStyleSheet
setSyncGroup
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key setTabOrder
setTabletTracking
setTitle
setTitleBase
Sets the base part of title
of the group box (will be appended with extent state)setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
settingGroup
Returns the name of the setting group in which the collapsed state will be saved sharedPainter
show
showEvent
showFullScreen
showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
syncGroup
Named group which synchronizes collapsing action when triangle is clicked while holding alt modifier key tabletEvent
testAttribute
thread
timerEvent
title
titleBase
Returns the base part of title of the group box (will be appended with extent state). titleRect
toggleCollapsed
toolTip
toolTipDuration
tr
underMouse
ungrabGesture
unsetCursor
unsetLayoutDirection
unsetLocale
update
update(self, QRect) updateGeometry
updateMicroFocus
updateStyle
updatesEnabled
visibleRegion
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
x
y
Attributes
CurrentExtent
DrawChildren
DrawOnCanvas
DrawWindowBackground
IgnoreMask
OriginalExtent
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
ProjectLayerExtent
UserExtent
clicked
clicked(self, bool = False) [signal] collapsedStateChanged
Signal emitted when groupbox collapsed/expanded state is changed, and when first shown [signal] customContextMenuRequested
customContextMenuRequested(self, QPoint) [signal] destroyed
destroyed(self, QObject = None) [signal] extentChanged
Emitted when the widget’s extent is changed. objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
toggled
toggled(self, bool) [signal] windowIconChanged
windowIconChanged(self, QIcon) [signal] windowIconTextChanged
windowIconTextChanged(self, str) [signal] windowTitleChanged
windowTitleChanged(self, str) [signal] -
CurrentExtent
= 1¶
-
DrawOnCanvas
= 4¶
-
class
ExtentState
¶ Bases:
int
-
OriginalExtent
= 0¶
-
ProjectLayerExtent
= 3¶
-
UserExtent
= 2¶
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
clearModifiers
()¶
-
closeEvent
()¶
-
collapseExpandFixes
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
currentCrs
(self) → QgsCoordinateReferenceSystem¶ Returns the coordinate reference system for the current extent set for the widget. The current extent and CRS usually reflects the map canvas extent and CRS.
See also
See also
-
currentExtent
(self) → QgsRectangle¶ Returns the current extent set for the widget. The current extent is usually set to match the current map canvas extent.
See also
See also
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
extentChanged
¶ Emitted when the widget’s extent is changed. [signal]
-
extentState
(self) → QgsExtentGroupBox.ExtentState¶ Returns the currently selected state for the widget’s extent.
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
init
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
loadState
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
originalCrs
(self) → QgsCoordinateReferenceSystem¶ Returns the original coordinate reference system set for the widget.
See also
See also
-
originalExtent
(self) → QgsRectangle¶ Returns the original extent set for the widget.
See also
See also
-
outputCrs
(self) → QgsCoordinateReferenceSystem¶ Returns the current output CRS, used in the display.
See also
New in version 3.0.
-
outputExtent
(self) → QgsRectangle¶ Returns the extent shown in the widget - in output CRS coordinates.
See also
-
paintEvent
()¶
-
ratio
(self) → QSize¶ Returns the current fixed aspect ratio to be used when dragging extent onto the canvas. If the aspect ratio isn’t fixed, the width and height will be set to zero.
New in version 3.0.
-
receivers
()¶
-
resizeEvent
()¶
-
saveKey
()¶
-
saveState
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setCurrentExtent
(self, currentExtent: QgsRectangle, currentCrs: QgsCoordinateReferenceSystem)¶ Sets the current extent to show in the widget - should be called as part of initialization (or whenever current extent changes). The current extent is usually set to match the current map canvas extent.
See also
See also
-
setMapCanvas
(self, canvas: QgsMapCanvas)¶ Sets the map canvas to enable dragging of extent on a canvas.
Parameters: canvas – the map canvas New in version 3.0.
-
setOriginalExtent
(self, originalExtent: QgsRectangle, originalCrs: QgsCoordinateReferenceSystem)¶ Sets the original extent and coordinate reference system for the widget. This should be called as part of initialization.
See also
See also
-
setOutputCrs
(self, outputCrs: QgsCoordinateReferenceSystem)¶ Sets the output CRS - may need to be used for transformation from original/current extent. Should be called as part of initialization and whenever the the output CRS is changed. The current extent will be reprojected into the new output CRS.
-
setOutputExtentFromCurrent
(self)¶ Sets the output extent to be the same as current extent (may be transformed to output CRS).
-
setOutputExtentFromDrawOnCanvas
(self)¶ Sets the output extent by dragging on the canvas.
New in version 3.0.
-
setOutputExtentFromLayer
(self, layer: QgsMapLayer)¶ Sets the output extent to match a
layer
’s extent (may be transformed to output CRS).New in version 3.0.
-
setOutputExtentFromOriginal
(self)¶ Sets the output extent to be the same as original extent (may be transformed to output CRS).
-
setOutputExtentFromUser
(self, extent: QgsRectangle, crs: QgsCoordinateReferenceSystem)¶ Sets the output extent to a custom extent (may be transformed to output CRS).
-
setRatio
(self, ratio: QSize)¶ Sets a fixed aspect ratio to be used when dragging extent onto the canvas. To unset a fixed aspect ratio, set the width and height to zero.
Parameters: ratio – aspect ratio’s width and height New in version 3.0.
-
setTitleBase
(self, title: str)¶ Sets the base part of
title
of the group box (will be appended with extent state)New in version 2.12.
See also
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
titleBase
(self) → str¶ Returns the base part of title of the group box (will be appended with extent state).
New in version 2.12.
See also
-
titleRect
()¶
-
updateMicroFocus
()¶
-
updateStyle
()¶
-
wheelEvent
()¶
-