Class: QgsRecentColorScheme¶
- class qgis.core.QgsRecentColorScheme¶
Bases:
QgsColorScheme
A color scheme which contains the most recently used colors.
New in version 2.5.
QgsRecentColorScheme() Constructor for QgsRecentColorScheme.
QgsRecentColorScheme(
QgsRecentColorScheme
)Methods
Adds a color to the list of recent colors.
- rtype
QgsRecentColorScheme
- param context
- rtype
QgsColorScheme.SchemeFlags
Returns the most recently used color.
- rtype
str
- addRecentColor(color: Union[QColor, Qt.GlobalColor, QGradient])¶
Adds a color to the list of recent colors.
- Parameters
color (Union[QColor) – color to add
See also
New in version 2.14.
- clone(self) QgsRecentColorScheme ¶
- Return type
- fetchColors(self, context: str = '', baseColor: Union[QColor, Qt.GlobalColor, QGradient] = QColor()) List[Tuple[QColor, str]] ¶
- Parameters
context (str = '') –
baseColor (Union[QColor) –
- Return type
List[Tuple[QColor, str]]
- flags(self) QgsColorScheme.SchemeFlags ¶
- Return type
- lastUsedColor() QColor ¶
Returns the most recently used color.
See also
New in version 3.0.
- Return type
QColor
- schemeName(self) str ¶
- Return type
str