Subgroup: Color
Class: QgsColorSwatchGridAction¶
-
class
qgis.gui.
QgsColorSwatchGridAction
¶ Bases:
PyQt5.QtWidgets.QWidgetAction
A color swatch grid which can be embedded into a menu.
See also
New in version 2.5: Methods
actionGroup
activate
associatedGraphicsWidgets
associatedWidgets
autoRepeat
baseColor
Get the base color for the color grid blockSignals
childEvent
children
connectNotify
context
Get the current context for the color grid createWidget
createdWidgets
customEvent
data
defaultWidget
deleteLater
deleteWidget
disconnect
disconnectNotify
dismissOnColorSelection
Returns whether the parent menu will be dismissed after a color is selected from the action’s color widget. dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
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] font
hover
icon
iconText
inherits
installEventFilter
isCheckable
isChecked
isEnabled
isIconVisibleInMenu
isSeparator
isSignalConnected
isVisible
isWidgetType
isWindowType
killTimer
menu
menuRole
metaObject
moveToThread
objectName
parent
parentWidget
priority
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
refreshColors
Reload colors from scheme and redraws the widget releaseWidget
removeEventFilter
requestWidget
sender
senderSignalIndex
setActionGroup
setAutoRepeat
setBaseColor
Sets the base color for the color grid setCheckable
setChecked
setContext
Sets the current context for the color grid setData
setDefaultWidget
setDisabled
setDismissOnColorSelection
Sets whether the parent menu should be dismissed and closed when a color is selected from the action’s color widget. setEnabled
setFont
setIcon
setIconText
setIconVisibleInMenu
setMenu
setMenuRole
setObjectName
setParent
setPriority
setProperty
setSeparator
setShortcut
setShortcutContext
setShortcuts
setShortcuts(self, QKeySequence.StandardKey) setStatusTip
setText
setToolTip
setVisible
setWhatsThis
shortcut
shortcutContext
shortcuts
showStatusText
signalsBlocked
startTimer
statusTip
text
thread
timerEvent
toggle
toolTip
tr
trigger
whatsThis
Attributes
AboutQtRole
AboutRole
ApplicationSpecificRole
HighPriority
Hover
LowPriority
NoRole
NormalPriority
PreferencesRole
QuitRole
TextHeuristicRole
Trigger
changed
changed(self) [signal] colorChanged
Emitted when a color has been selected from the widget destroyed
destroyed(self, QObject = None) [signal] hovered
hovered(self) [signal] objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
toggled
toggled(self, bool) [signal] triggered
triggered(self, bool = False) [signal] -
baseColor
(self) → QColor¶ Get the base color for the color grid
Returns: base color which is passed to scheme for color generation See also
-
childEvent
()¶
-
colorChanged
¶ Emitted when a color has been selected from the widget
Parameters: color – selected color [signal]
-
connectNotify
()¶
-
context
(self) → str¶ Get the current context for the color grid
Returns: context string which is passed to scheme for color generation See also
-
createWidget
()¶
-
createdWidgets
()¶
-
customEvent
()¶
-
deleteWidget
()¶
-
disconnectNotify
()¶
-
dismissOnColorSelection
(self) → bool¶ Returns whether the parent menu will be dismissed after a color is selected from the action’s color widget.
See also
New in version 2.14.
-
event
()¶
-
eventFilter
()¶
-
isSignalConnected
()¶
-
receivers
()¶
-
refreshColors
(self)¶ Reload colors from scheme and redraws the widget
-
sender
()¶
-
senderSignalIndex
()¶
-
setBaseColor
(self, baseColor: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the base color for the color grid
Parameters: baseColor – base color to pass to scheme for color generation See also
-
setContext
(self, context: str)¶ Sets the current context for the color grid
Parameters: context – string which is passed to scheme for color generation See also
-
setDismissOnColorSelection
(self, dismiss: bool)¶ Sets whether the parent menu should be dismissed and closed when a color is selected from the action’s color widget.
Parameters: dismiss – set to true (default) to immediately close the menu when a color is selected from the widget. If set to false, the colorChanged signal will be emitted but the menu will stay open.
See also
New in version 2.14.
-
timerEvent
()¶
-