Subgroup: other
Class: QgsCompoundColorWidget¶
-
class
qgis.gui.
QgsCompoundColorWidget
(parent: QWidget = None, color: Union[QColor, Qt.GlobalColor, QGradient] = QColor(), layout: QgsCompoundColorWidget.Layout = QgsCompoundColorWidget.LayoutDefault)¶ Bases:
qgis._gui.QgsPanelWidget
Constructor for QgsCompoundColorWidget
Parameters: - parent – parent widget
- color – initial color for dialog
- layout – widget layout to use
A custom QGIS widget for selecting a color, including options for selecting colors via hue wheel, color swatches, and a color sampler.
New in version 2.16: Methods
Signals
currentColorChanged
Emitted when the dialog’s color changes Attributes
LayoutDefault
LayoutVertical
-
class
Layout
¶ Bases:
int
-
LayoutDefault
= 0¶
-
LayoutVertical
= 1¶
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
color
(self) → QColor¶ Returns the current color for the dialog
Returns: dialog color
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
createNewUserPalette
(parent: QWidget) → QgsUserColorScheme¶ Triggers a user prompt for creating a new user color scheme.
The
parent
argument must be set to a valid parent widget for the dialog prompts.See also
See also
New in version 3.2.
-
currentColorChanged
¶ Emitted when the dialog’s color changes
Parameters: color – current color [signal]
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
importUserPaletteFromFile
(parent: QWidget) → QgsUserColorScheme¶ Triggers a user prompt for importing a new color scheme from an existing GPL file.
The
parent
argument must be set to a valid parent widget for the dialog prompts.See also
See also
New in version 3.2.
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
(self, e: QKeyEvent)¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
(self, e: QMouseEvent)¶
-
mousePressEvent
(self, e: QMouseEvent)¶
-
mouseReleaseEvent
(self, e: QMouseEvent)¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
removeUserPalette
(scheme: QgsUserColorScheme, parent: QWidget) → bool¶ Triggers a user prompt for removing an existing user color
scheme
.The
parent
argument must be set to a valid parent widget for the dialog prompts.See also
See also
New in version 3.2.
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAllowOpacity
(self, allowOpacity: bool)¶ Sets whether opacity modification (transparency) is permitted for the color dialog. Defaults to true.
Parameters: allowOpacity – set to false to disable opacity modification New in version 3.0.
-
setColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the current color for the dialog
Parameters: color – desired color
-
setDiscarded
(self, discarded: bool)¶ Sets whether the widget’s color has been “discarded” and the selected color should not be stored in the recent color list.
Parameters: discarded – set to true to avoid adding color to recent color list on widget destruction. New in version 3.0.
-
setPreviousColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient])¶ Sets the color to show in an optional “previous color” section
Parameters: color – previous color
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶