Subgroup: Color
Class: QgsColorSchemeModel¶
-
class
qgis.gui.
QgsColorSchemeModel
¶ Bases:
PyQt5.QtCore.QAbstractItemModel
A model for colors in a color scheme
See also
New in version 2.5: Methods
addColor
Add a color to the list baseColor
Get the base color for the color scheme used by the model beginInsertColumns
beginInsertRows
beginMoveColumns
beginMoveRows
beginRemoveColumns
beginRemoveRows
beginResetModel
blockSignals
buddy
canDropMimeData
canFetchMore
changePersistentIndex
changePersistentIndexList
childEvent
children
colors
Returns a list of colors shown in the widget columnCount
connectNotify
context
Get the current color scheme context for the model createIndex
customEvent
data
decodeData
deleteLater
disconnect
disconnectNotify
dropMimeData
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
encodeData
endInsertColumns
endInsertRows
endMoveColumns
endMoveRows
endRemoveColumns
endRemoveRows
endResetModel
event
eventFilter
fetchMore
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] flags
hasChildren
hasIndex
headerData
index
inherits
insertColumn
insertColumns
insertRow
insertRows
installEventFilter
isDirty
Returns whether the color scheme model has been modified isSignalConnected
isWidgetType
isWindowType
itemData
killTimer
match
metaObject
mimeData
mimeTypes
moveColumn
moveColumns
moveRow
moveRows
moveToThread
objectName
parent
persistentIndexList
property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeColumn
removeColumns
removeEventFilter
removeRow
removeRows
resetInternalData
revert
roleNames
rowCount
sender
senderSignalIndex
setData
setHeaderData
setItemData
setObjectName
setParent
setProperty
setScheme
Sets the color scheme to show in the widget sibling
signalsBlocked
sort
span
startTimer
submit
supportedDragActions
supportedDropActions
thread
timerEvent
tr
Attributes
HorizontalSortHint
NoLayoutChangeHint
VerticalSortHint
columnsAboutToBeInserted
columnsAboutToBeInserted(self, QModelIndex, int, int) [signal] columnsAboutToBeMoved
columnsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsAboutToBeRemoved
columnsAboutToBeRemoved(self, QModelIndex, int, int) [signal] columnsInserted
columnsInserted(self, QModelIndex, int, int) [signal] columnsMoved
columnsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] columnsRemoved
columnsRemoved(self, QModelIndex, int, int) [signal] dataChanged
dataChanged(self, QModelIndex, QModelIndex, Iterable[int] = []) [signal] destroyed
destroyed(self, QObject = None) [signal] layoutAboutToBeChanged
layoutAboutToBeChanged(self, object = QList<QPersistentModelIndex>(), QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] layoutChanged
layoutChanged(self, Iterable[QPersistentModelIndex] = [], QAbstractItemModel.LayoutChangeHint = QAbstractItemModel.NoLayoutChangeHint) [signal] modelAboutToBeReset
modelAboutToBeReset(self) [signal] modelReset
modelReset(self) [signal] objectNameChanged
objectNameChanged(self, str) [signal] rowsAboutToBeInserted
rowsAboutToBeInserted(self, QModelIndex, int, int) [signal] rowsAboutToBeMoved
rowsAboutToBeMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsAboutToBeRemoved
rowsAboutToBeRemoved(self, QModelIndex, int, int) [signal] rowsInserted
rowsInserted(self, QModelIndex, int, int) [signal] rowsMoved
rowsMoved(self, QModelIndex, int, int, QModelIndex, int) [signal] rowsRemoved
rowsRemoved(self, QModelIndex, int, int) [signal] staticMetaObject
-
addColor
(self, color: Union[QColor, Qt.GlobalColor, QGradient], label: str = '', allowDuplicate: bool = False)¶ Add a color to the list
Parameters: - color – color to add
- label – label for color
- allowDuplicate – set to true to allow duplicate colors to be added (colors which are already present in the list)
-
baseColor
(self) → QColor¶ Get the base color for the color scheme used by the model
Returns: base color which is passed to scheme for color generation See also
-
beginInsertColumns
()¶
-
beginInsertRows
()¶
-
beginMoveColumns
()¶
-
beginMoveRows
()¶
-
beginRemoveColumns
()¶
-
beginRemoveRows
()¶
-
beginResetModel
()¶
-
changePersistentIndex
()¶
-
changePersistentIndexList
()¶
-
childEvent
()¶
-
colors
(self) → object¶ Returns a list of colors shown in the widget
Returns: colors shown in the widget
-
columnCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
connectNotify
()¶
-
context
(self) → str¶ Get the current color scheme context for the model
Returns: context string which is passed to scheme for color generation See also
-
createIndex
()¶
-
customEvent
()¶
-
data
(self, index: QModelIndex, role: int = Qt.DisplayRole) → Any¶
-
decodeData
()¶
-
disconnectNotify
()¶
-
dropMimeData
(self, data: QMimeData, action: Qt.DropAction, row: int, column: int, parent: QModelIndex) → bool¶
-
encodeData
()¶
-
endInsertColumns
()¶
-
endInsertRows
()¶
-
endMoveColumns
()¶
-
endMoveRows
()¶
-
endRemoveColumns
()¶
-
endRemoveRows
()¶
-
endResetModel
()¶
-
flags
(self, index: QModelIndex) → Qt.ItemFlags¶
-
headerData
(self, section: int, orientation: Qt.Orientation, role: int = Qt.DisplayRole) → Any¶
-
index
(self, row: int, column: int, parent: QModelIndex = QModelIndex()) → QModelIndex¶
-
insertRows
(self, row: int, count: int, parent: QModelIndex = QModelIndex()) → bool¶
-
isDirty
(self) → bool¶ Returns whether the color scheme model has been modified
Returns: true if colors have been modified
-
isSignalConnected
()¶
-
mimeData
(self, indexes: object) → QMimeData¶
-
mimeTypes
(self) → List[str]¶
-
parent
(self, index: QModelIndex) → QModelIndex¶
-
persistentIndexList
()¶
-
receivers
()¶
-
removeRows
(self, row: int, count: int, parent: QModelIndex = QModelIndex()) → bool¶
-
resetInternalData
()¶
-
rowCount
(self, parent: QModelIndex = QModelIndex()) → int¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setData
(self, index: QModelIndex, value: Any, role: int = Qt.EditRole) → bool¶
-
setScheme
(self, scheme: QgsColorScheme, context: str = '', baseColor: Union[QColor, Qt.GlobalColor, QGradient] = QColor())¶ Sets the color scheme to show in the widget
Parameters: - scheme – color scheme
- context – context for color scheme
- baseColor – base color for color scheme
-
supportedDropActions
(self) → Qt.DropActions¶
-
timerEvent
()¶
-