Subgroup: Symbol
Class: QgsSymbolButton¶
-
class
qgis.gui.
QgsSymbolButton
¶ Bases:
PyQt5.QtWidgets.QToolButton
A button for creating and modifying QgsSymbol settings.
The button shows a preview icon for the current symbol, and will open a detailed symbol editor dialog (or panel widget) when clicked.
New in version 3.0: Methods
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
adjustSize
animateClick
arrowType
autoExclusive
autoFillBackground
autoRaise
autoRepeat
autoRepeatDelay
autoRepeatInterval
backgroundRole
baseSize
blockSignals
changeEvent
checkStateSet
childAt
childAt(self, int, int) -> QWidget childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
click
close
closeEvent
colorCount
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
copyColor
Copies the current symbol color to the clipboard. copySymbol
Copies the current symbol to the clipboard. create
createWindowContainer
cursor
customEvent
defaultAction
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
dialogTitle
Returns the title for the symbol settings dialog window. disconnect
disconnectNotify
dragEnterEvent
dragLeaveEvent
dragMoveEvent
dropEvent
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
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
group
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
height
heightForWidth
heightMM
hide
hideEvent
hitButton
icon
iconSize
inherits
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isCheckable
isChecked
isDown
isEnabled
isEnabledTo
isFullScreen
isHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isSignalConnected
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
keyPressEvent
keyReleaseEvent
keyboardGrabber
killTimer
layer
Returns the layer associated with the widget. layout
layoutDirection
leaveEvent
locale
logicalDpiX
logicalDpiY
lower
mapCanvas
Returns the map canvas associated with the widget. mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumWidth
menu
metaObject
metric
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
move(self, int, int) moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextCheckState
nextInFocusChain
normalGeometry
objectName
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
pasteColor
Pastes a color from the clipboard to the symbol. pasteSymbol
Pastes a symbol from the clipboard. physicalDpiX
physicalDpiY
popupMode
pos
previousInFocusChain
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. raise_
receivers
rect
registerExpressionContextGenerator
Register an expression context generator class that will be used to retrieve an expression context for the button when required. 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
saveGeometry
scroll
scroll(self, int, int, QRect) sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setArrowType
setAttribute
setAutoExclusive
setAutoFillBackground
setAutoRaise
setAutoRepeat
setAutoRepeatDelay
setAutoRepeatInterval
setBackgroundRole
setBaseSize
setBaseSize(self, QSize) setCheckable
setChecked
setColor
Sets the current color
for the symbol.setContentsMargins
setContentsMargins(self, QMargins) setContextMenuPolicy
setCursor
setDefaultAction
setDialogTitle
Sets the title
for the symbol settings dialog window.setDisabled
setDown
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
setIcon
setIconSize
setInputMethodHints
setLayer
Sets a layer
to associate with the widget.setLayout
setLayoutDirection
setLocale
setMapCanvas
Sets a map canvas
to associate with the widget.setMask
setMask(self, QRegion) setMaximumHeight
setMaximumSize
setMaximumSize(self, QSize) setMaximumWidth
setMenu
setMinimumHeight
setMinimumSize
setMinimumSize(self, QSize) setMinimumWidth
setMouseTracking
setObjectName
setPalette
setParent
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) setPopupMode
setProperty
setShortcut
setShortcutAutoRepeat
setShortcutEnabled
setSizeIncrement
setSizeIncrement(self, QSize) setSizePolicy
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) setStatusTip
setStyle
setStyleSheet
setSymbol
Sets the symbol
for the button.setSymbolType
Sets the symbol type
which the button requires.setTabOrder
setTabletTracking
setText
setToolButtonStyle
setToolTip
setToolTipDuration
setUpdatesEnabled
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
sharedPainter
shortcut
show
showEvent
showFullScreen
showMaximized
showMenu
showMinimized
showNormal
signalsBlocked
size
sizeHint
sizeIncrement
sizePolicy
stackUnder
startTimer
statusTip
style
styleSheet
symbol
Returns the current symbol defined by the button. symbolType
Returns the symbol type which the button requires. tabletEvent
testAttribute
text
thread
timerEvent
toggle
toolButtonStyle
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
DelayedPopup
DrawChildren
DrawWindowBackground
IgnoreMask
InstantPopup
MenuButtonPopup
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
changed
Emitted when the symbol’s settings are changed. clicked
clicked(self, bool = False) [signal] customContextMenuRequested
customContextMenuRequested(self, QPoint) [signal] destroyed
destroyed(self, QObject = None) [signal] objectNameChanged
objectNameChanged(self, str) [signal] pressed
pressed(self) [signal] released
released(self) [signal] staticMetaObject
toggled
toggled(self, bool) [signal] triggered
triggered(self, QAction) [signal] windowIconChanged
windowIconChanged(self, QIcon) [signal] windowIconTextChanged
windowIconTextChanged(self, str) [signal] windowTitleChanged
windowTitleChanged(self, str) [signal] -
actionEvent
()¶
-
changeEvent
(self, e: QEvent)¶
-
changed
¶ Emitted when the symbol’s settings are changed.
See also
See also
setSymbol()
[signal]
-
checkStateSet
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
copyColor
(self)¶ Copies the current symbol color to the clipboard.
See also
-
copySymbol
(self)¶ Copies the current symbol to the clipboard.
See also
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
dialogTitle
(self) → str¶ Returns the title for the symbol settings dialog window.
See also
-
disconnectNotify
()¶
-
dragEnterEvent
(self, e: QDragEnterEvent)¶
-
dragLeaveEvent
(self, e: QDragLeaveEvent)¶
-
dragMoveEvent
()¶
-
dropEvent
(self, e: QDropEvent)¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
hitButton
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layer
(self) → QgsVectorLayer¶ Returns the layer associated with the widget.
See also
-
leaveEvent
()¶
-
mapCanvas
(self) → QgsMapCanvas¶ Returns the map canvas associated with the widget.
See also
-
metric
()¶
-
minimumSizeHint
(self) → QSize¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
(self, e: QMouseEvent)¶
-
mousePressEvent
(self, e: QMouseEvent)¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
nextCheckState
()¶
-
paintEvent
()¶
-
pasteColor
(self)¶ Pastes a color from the clipboard to the symbol. If clipboard does not contain a valid color or string representation of a color, then no change is applied.
See also
-
pasteSymbol
(self)¶ Pastes a symbol from the clipboard. If clipboard does not contain a valid symbol then no change is applied.
See also
-
receivers
()¶
-
registerExpressionContextGenerator
(self, generator: QgsExpressionContextGenerator)¶ Register an expression context generator class that will be used to retrieve an expression context for the button when required.
-
resizeEvent
(self, event: QResizeEvent)¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the current
color
for the symbol. Will emit a changed() signal if the color is different to the previous symbol color.
-
setDialogTitle
(self, title: str)¶ Sets the
title
for the symbol settings dialog window.See also
-
setLayer
(self, layer: QgsVectorLayer)¶ Sets a
layer
to associate with the widget. This allows the widget to setup layer related settings within the symbol settings dialog, such as correctly populating data defined override buttons.See also
-
setMapCanvas
(self, canvas: QgsMapCanvas)¶ Sets a map
canvas
to associate with the widget. This allows the widget to fetch current settings from the map canvas, such as current scale.See also
-
setSymbol
(self, symbol: QgsSymbol)¶ Sets the
symbol
for the button. Ownership ofsymbol
is transferred to the button.See also
See also
-
setSymbolType
(self, type: QgsSymbol.SymbolType)¶ Sets the symbol
type
which the button requires. If the type differs from the current symbol type, the symbol will be reset to a default symbol style of the new type.See also
-
showEvent
(self, e: QShowEvent)¶
-
sizeHint
(self) → QSize¶
-
symbol
(self) → QgsSymbol¶ Returns the current symbol defined by the button.
See also
See also
-
symbolType
(self) → QgsSymbol.SymbolType¶ Returns the symbol type which the button requires.
See also
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-