Subgroup: Color
Class: QgsColorSchemeList¶
-
class
qgis.gui.
QgsColorSchemeList
¶ Bases:
PyQt5.QtWidgets.QTreeView
An editable list of color swatches, taken from an associated
QgsColorScheme
.See also
New in version 2.5: Methods
acceptDrops
accessibleDescription
accessibleName
actionEvent
actions
activateWindow
addAction
addActions
addColor
Adds a color to the list addScrollBarWidget
adjustSize
allColumnsShowFocus
alternatingRowColors
autoExpandDelay
autoFillBackground
autoScrollMargin
backgroundRole
baseSize
blockSignals
changeEvent
childAt
childAt(self, int, int) -> QWidget childEvent
children
childrenRect
childrenRegion
clearFocus
clearMask
clearSelection
close
closeEditor
closeEvent
closePersistentEditor
collapse
collapseAll
colorCount
columnAt
columnCountChanged
columnMoved
columnResized
columnViewportPosition
columnWidth
commitData
connectNotify
contentsMargins
contentsRect
contextMenuEvent
contextMenuPolicy
copyColors
Copies colors from the list to the clipboard cornerWidget
create
createWindowContainer
currentChanged
currentIndex
cursor
customEvent
dataChanged
defaultDropAction
deleteLater
depth
destroy
devType
devicePixelRatio
devicePixelRatioF
devicePixelRatioFScale
dirtyRegionOffset
disconnect
disconnectNotify
dragDropMode
dragDropOverwriteMode
dragEnabled
dragEnterEvent
dragLeaveEvent
dragMoveEvent
drawBranches
drawFrame
drawRow
drawTree
dropEvent
dropIndicatorPosition
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
edit
editTriggers
editorDestroyed
effectiveWinId
ensurePolished
enterEvent
event
eventFilter
executeDelayedItemsLayout
expand
expandAll
expandToDepth
expandsOnDoubleClick
exportColorsToGpl
Export colors to a GPL palette file from the list 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
frameRect
frameShadow
frameShape
frameSize
frameStyle
frameWidth
geometry
getContentsMargins
grab
grabGesture
grabKeyboard
grabMouse
grabMouse(self, Union[QCursor, Qt.CursorShape]) grabShortcut
graphicsEffect
graphicsProxyWidget
hasAutoScroll
hasFocus
hasHeightForWidth
hasMouseTracking
hasTabletTracking
header
height
heightForWidth
heightMM
hide
hideColumn
hideEvent
horizontalOffset
horizontalScrollBar
horizontalScrollBarPolicy
horizontalScrollMode
horizontalScrollbarAction
horizontalScrollbarValueChanged
iconSize
importColorsFromGpl
Import colors from a GPL palette file to the list indentation
indexAbove
indexAt
indexBelow
indexRowSizeHint
indexWidget
inherits
initPainter
initStyleOption
inputMethodEvent
inputMethodHints
inputMethodQuery
insertAction
insertActions
installEventFilter
isActiveWindow
isAncestorOf
isAnimated
isColumnHidden
isDirty
Returns whether the color scheme list has been modified isEnabled
isEnabledTo
isExpanded
isFirstColumnSpanned
isFullScreen
isHeaderHidden
isHidden
isIndexHidden
isLeftToRight
isMaximized
isMinimized
isModal
isRightToLeft
isRowHidden
isSignalConnected
isSortingEnabled
isVisible
isVisibleTo
isWidgetType
isWindow
isWindowModified
isWindowType
itemDelegate
itemDelegate(self, QModelIndex) -> QAbstractItemDelegate itemDelegateForColumn
itemDelegateForRow
itemsExpandable
keyPressEvent
keyReleaseEvent
keyboardGrabber
keyboardSearch
killTimer
layout
layoutDirection
leaveEvent
lineWidth
locale
logicalDpiX
logicalDpiY
lower
mapFrom
mapFromGlobal
mapFromParent
mapTo
mapToGlobal
mapToParent
mask
maximumHeight
maximumSize
maximumViewportSize
maximumWidth
metaObject
metric
midLineWidth
minimumHeight
minimumSize
minimumSizeHint
minimumWidth
model
mouseDoubleClickEvent
mouseGrabber
mouseMoveEvent
mousePressEvent
mouseReleaseEvent
move
move(self, int, int) moveCursor
moveEvent
moveToThread
nativeEvent
nativeParentWidget
nextInFocusChain
normalGeometry
objectName
openPersistentEditor
overrideWindowFlags
overrideWindowState
paintEngine
paintEvent
paintingActive
palette
parent
parentWidget
pasteColors
Pastes colors from clipboard to the list physicalDpiX
physicalDpiY
pos
previousInFocusChain
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. raise_
receivers
rect
reexpand
releaseKeyboard
releaseMouse
releaseShortcut
removeAction
removeEventFilter
removeSelection
Removes any selected colors from the list 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) reset
resetHorizontalScrollMode
resetIndentation
resetVerticalScrollMode
resize
resize(self, int, int) resizeColumnToContents
resizeEvent
restoreGeometry
rootIndex
rootIsDecorated
rowHeight
rowsAboutToBeRemoved
rowsInserted
rowsRemoved
saveColorsToScheme
Saves the current colors shown in the list back to a color scheme, if supported by the color scheme. saveGeometry
scheduleDelayedItemsLayout
scheme
Returns the scheme currently selected in the list. scroll
scroll(self, int, int, QRect) scrollBarWidgets
scrollContentsBy
scrollDirtyRegion
scrollTo
scrollToBottom
scrollToTop
selectAll
selectedIndexes
selectionBehavior
selectionChanged
selectionCommand
selectionMode
selectionModel
sender
senderSignalIndex
setAcceptDrops
setAccessibleDescription
setAccessibleName
setAllColumnsShowFocus
setAlternatingRowColors
setAnimated
setAttribute
setAutoExpandDelay
setAutoFillBackground
setAutoScroll
setAutoScrollMargin
setBackgroundRole
setBaseSize
setBaseSize(self, QSize) setColumnHidden
setColumnWidth
setContentsMargins
setContentsMargins(self, QMargins) setContextMenuPolicy
setCornerWidget
setCurrentIndex
setCursor
setDefaultDropAction
setDirtyRegion
setDisabled
setDragDropMode
setDragDropOverwriteMode
setDragEnabled
setDropIndicatorShown
setEditTriggers
setEnabled
setExpanded
setExpandsOnDoubleClick
setFirstColumnSpanned
setFixedHeight
setFixedSize
setFixedSize(self, int, int) setFixedWidth
setFocus
setFocus(self, Qt.FocusReason) setFocusPolicy
setFocusProxy
setFont
setForegroundRole
setFrameRect
setFrameShadow
setFrameShape
setFrameStyle
setGeometry
setGeometry(self, int, int, int, int) setGraphicsEffect
setHeader
setHeaderHidden
setHidden
setHorizontalScrollBar
setHorizontalScrollBarPolicy
setHorizontalScrollMode
setIconSize
setIndentation
setIndexWidget
setInputMethodHints
setItemDelegate
setItemDelegateForColumn
setItemDelegateForRow
setItemsExpandable
setLayout
setLayoutDirection
setLineWidth
setLocale
setMask
setMask(self, QRegion) setMaximumHeight
setMaximumSize
setMaximumSize(self, QSize) setMaximumWidth
setMidLineWidth
setMinimumHeight
setMinimumSize
setMinimumSize(self, QSize) setMinimumWidth
setModel
setMouseTracking
setObjectName
setPalette
setParent
setParent(self, QWidget, Union[Qt.WindowFlags, Qt.WindowType]) setProperty
setRootIndex
setRootIsDecorated
setRowHidden
setScheme
Sets the color scheme to show in the list setSelection
setSelectionBehavior
setSelectionMode
setSelectionModel
setShortcutAutoRepeat
setShortcutEnabled
setSizeAdjustPolicy
setSizeIncrement
setSizeIncrement(self, QSize) setSizePolicy
setSizePolicy(self, QSizePolicy.Policy, QSizePolicy.Policy) setSortingEnabled
setState
setStatusTip
setStyle
setStyleSheet
setTabKeyNavigation
setTabOrder
setTabletTracking
setTextElideMode
setToolTip
setToolTipDuration
setTreePosition
setUniformRowHeights
setUpdatesEnabled
setVerticalScrollBar
setVerticalScrollBarPolicy
setVerticalScrollMode
setViewport
setViewportMargins
setVisible
setWhatsThis
setWindowFilePath
setWindowFlag
setWindowFlags
setWindowIcon
setWindowIconText
setWindowModality
setWindowModified
setWindowOpacity
setWindowRole
setWindowState
setWindowTitle
setWordWrap
setupViewport
sharedPainter
show
showColumn
showDropIndicator
showEvent
showExportColorsDialog
Displays a file picker dialog allowing users to export colors from the list into a file. showFullScreen
showImportColorsDialog
Displays a file picker dialog allowing users to import colors into the list from a file. showMaximized
showMinimized
showNormal
signalsBlocked
size
sizeAdjustPolicy
sizeHint
sizeHintForColumn
sizeHintForIndex
sizeHintForRow
sizeIncrement
sizePolicy
sortByColumn
stackUnder
startDrag
startTimer
state
statusTip
style
styleSheet
tabKeyNavigation
tabletEvent
testAttribute
textElideMode
thread
timerEvent
toolTip
toolTipDuration
tr
treePosition
underMouse
ungrabGesture
uniformRowHeights
unsetCursor
unsetLayoutDirection
unsetLocale
update
update(self, QModelIndex) updateEditorData
updateEditorGeometries
updateGeometries
updateGeometry
updateMicroFocus
updatesEnabled
verticalOffset
verticalScrollBar
verticalScrollBarPolicy
verticalScrollMode
verticalScrollbarAction
verticalScrollbarValueChanged
viewOptions
viewport
viewportEvent
viewportMargins
viewportSizeHint
visibleRegion
visualRect
visualRegionForSelection
whatsThis
wheelEvent
width
widthMM
winId
window
windowFilePath
windowFlags
windowHandle
windowIcon
windowIconText
windowModality
windowOpacity
windowRole
windowState
windowTitle
windowType
wordWrap
x
y
Attributes
AboveItem
AdjustIgnored
AdjustToContents
AdjustToContentsOnFirstShow
AllEditTriggers
AnimatingState
AnyKeyPressed
BelowItem
Box
CollapsingState
ContiguousSelection
CurrentChanged
DoubleClicked
DragDrop
DragOnly
DragSelectingState
DraggingState
DrawChildren
DrawWindowBackground
DropOnly
EditKeyPressed
EditingState
EnsureVisible
ExpandingState
ExtendedSelection
HLine
IgnoreMask
InternalMove
MoveDown
MoveEnd
MoveHome
MoveLeft
MoveNext
MovePageDown
MovePageUp
MovePrevious
MoveRight
MoveUp
MultiSelection
NoDragDrop
NoEditTriggers
NoFrame
NoSelection
NoState
OnItem
OnViewport
Panel
PdmDepth
PdmDevicePixelRatio
PdmDevicePixelRatioScaled
PdmDpiX
PdmDpiY
PdmHeight
PdmHeightMM
PdmNumColors
PdmPhysicalDpiX
PdmPhysicalDpiY
PdmWidth
PdmWidthMM
Plain
PositionAtBottom
PositionAtCenter
PositionAtTop
Raised
ScrollPerItem
ScrollPerPixel
SelectColumns
SelectItems
SelectRows
SelectedClicked
Shadow_Mask
Shape_Mask
SingleSelection
StyledPanel
Sunken
VLine
WinPanel
activated
activated(self, QModelIndex) [signal] clicked
clicked(self, QModelIndex) [signal] collapsed
collapsed(self, QModelIndex) [signal] colorSelected
Emitted when a color is selected from the list customContextMenuRequested
customContextMenuRequested(self, QPoint) [signal] destroyed
destroyed(self, QObject = None) [signal] doubleClicked
doubleClicked(self, QModelIndex) [signal] entered
entered(self, QModelIndex) [signal] expanded
expanded(self, QModelIndex) [signal] iconSizeChanged
iconSizeChanged(self, QSize) [signal] objectNameChanged
objectNameChanged(self, str) [signal] pressed
pressed(self, QModelIndex) [signal] staticMetaObject
viewportEntered
viewportEntered(self) [signal] windowIconChanged
windowIconChanged(self, QIcon) [signal] windowIconTextChanged
windowIconTextChanged(self, str) [signal] windowTitleChanged
windowTitleChanged(self, str) [signal] -
actionEvent
()¶
-
addColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient], label: str = '', allowDuplicate: bool = False)¶ Adds a color to the list
Parameters: - color – color to add
- label – optional label for color
- allowDuplicate – set to true to allow duplicate colors to be added, ie colors which already exist in the list
-
changeEvent
()¶
-
childEvent
()¶
-
closeEditor
()¶
-
closeEvent
()¶
-
colorSelected
¶ Emitted when a color is selected from the list
Parameters: color – color selected [signal]
-
columnCountChanged
()¶
-
columnMoved
()¶
-
columnResized
()¶
-
commitData
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
copyColors
(self)¶ Copies colors from the list to the clipboard
See also
-
create
()¶
-
currentChanged
()¶
-
customEvent
()¶
-
destroy
()¶
-
dirtyRegionOffset
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
drawBranches
()¶
-
drawFrame
()¶
-
drawRow
()¶
-
drawTree
()¶
-
dropEvent
()¶
-
dropIndicatorPosition
()¶
-
edit
()¶
-
editorDestroyed
()¶
-
enterEvent
()¶
-
event
()¶
-
eventFilter
()¶
-
executeDelayedItemsLayout
()¶
-
exportColorsToGpl
(self, file: QFile) → bool¶ Export colors to a GPL palette file from the list
Parameters: file – destination file See also
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
horizontalOffset
()¶
-
horizontalScrollbarAction
()¶
-
horizontalScrollbarValueChanged
()¶
-
importColorsFromGpl
(self, file: QFile) → bool¶ Import colors from a GPL palette file to the list
Parameters: file – file to import See also
-
indexRowSizeHint
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isDirty
(self) → bool¶ Returns whether the color scheme list has been modified
Returns: true if colors have been modified
-
isIndexHidden
()¶
-
isSignalConnected
()¶
-
keyPressEvent
(self, event: QKeyEvent)¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
(self, event: QMouseEvent)¶
-
mouseReleaseEvent
(self, event: QMouseEvent)¶
-
moveCursor
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
pasteColors
(self)¶ Pastes colors from clipboard to the list
See also
-
receivers
()¶
-
reexpand
()¶
-
removeSelection
(self)¶ Removes any selected colors from the list
-
resizeEvent
()¶
-
rowHeight
()¶
-
rowsAboutToBeRemoved
()¶
-
rowsInserted
()¶
-
rowsRemoved
()¶
-
saveColorsToScheme
(self) → bool¶ Saves the current colors shown in the list back to a color scheme, if supported by the color scheme.
Note
this method is only effective if the color scheme is editable
-
scheduleDelayedItemsLayout
()¶
-
scheme
(self) → QgsColorScheme¶ Returns the scheme currently selected in the list.
New in version 3.0.
See also
-
scrollContentsBy
()¶
-
scrollDirtyRegion
()¶
-
selectedIndexes
()¶
-
selectionChanged
()¶
-
selectionCommand
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setDirtyRegion
()¶
-
setScheme
(self, scheme: QgsColorScheme, context: str = '', baseColor: Union[QColor, Qt.GlobalColor, QGradient] = QColor())¶ Sets the color scheme to show in the list
Parameters: - scheme – QgsColorScheme for colors to show in the list
- context – context string provided to color scheme
- baseColor – base color for color scheme
See also
-
setSelection
()¶
-
setState
()¶
-
setViewportMargins
()¶
-
showEvent
()¶
-
showExportColorsDialog
(self)¶ Displays a file picker dialog allowing users to export colors from the list into a file.
New in version 3.0.
See also
-
showImportColorsDialog
(self)¶ Displays a file picker dialog allowing users to import colors into the list from a file.
New in version 3.0.
See also
-
sizeHintForColumn
()¶
-
startDrag
()¶
-
state
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateEditorData
()¶
-
updateEditorGeometries
()¶
-
updateGeometries
()¶
-
updateMicroFocus
()¶
-
verticalOffset
()¶
-
verticalScrollbarAction
()¶
-
verticalScrollbarValueChanged
()¶
-
viewOptions
()¶
-
viewportEvent
()¶
-
viewportMargins
()¶
-
viewportSizeHint
()¶
-
visualRegionForSelection
()¶
-
wheelEvent
()¶
-