fxicons
This module provides functionality for handling icons in a VFX application.
change_pixmap_color
cached
Change the color of a pixmap.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
pixmap |
QPixmap
|
The pixmap to change the color of. |
required |
color |
str
|
The color to apply. |
required |
Returns:
Name | Type | Description |
---|---|---|
QPixmap |
QPixmap
|
The pixmap with the new color applied. |
get_available_icons_in_library
Get all available icon names in the specified library.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
library |
str
|
The name of the library. |
required |
Returns:
Type | Description |
---|---|
List[str]
|
List[str]: The available icon names in the library. |
Raises:
Type | Description |
---|---|
ValueError
|
If the library does not exist. |
FileNotFoundError
|
If no icons are found in the library. |
Examples:
get_icon
cached
get_icon(
icon_name: str,
width: int = 48,
height: int = 48,
color: Optional[str] = None,
library: Optional[str] = None,
style: Optional[str] = None,
extension: Optional[str] = None,
) -> QIcon
Get a QIcon of the specified icon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
icon_name |
str
|
The name of the icon. |
required |
width |
int
|
The width of the pixmap. Defaults to 48. |
48
|
height |
int
|
The height of the pixmap. Defaults to 48. |
48
|
color |
str
|
The color to convert the pixmap to.
Defaults to |
None
|
library |
str
|
The library of the icon. Defaults to |
None
|
style |
str
|
The style of the icon. Defaults to |
None
|
extension |
str
|
The extension of the icon.
Defaults to |
None
|
Returns:
Name | Type | Description |
---|---|---|
QIcon |
QIcon
|
The QIcon of the icon. |
Examples:
get_icon_path
cached
get_icon_path(
icon_name: str,
library: Optional[str] = None,
style: Optional[str] = None,
extension: Optional[str] = None,
verify: bool = True,
) -> str
Get the path of the specified icon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
icon_name |
str
|
The name of the icon. |
required |
library |
str
|
The library of the icon. Defaults to |
None
|
style |
str
|
The style of the icon. Defaults to |
None
|
extension |
str
|
The extension of the icon.
Defaults to |
None
|
verify |
bool
|
Whether to verify if the icon exists.
Defaults to |
True
|
Raises:
Type | Description |
---|---|
FileNotFoundError
|
If verify is |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
The path of the icon. |
get_pixmap
cached
get_pixmap(
icon_name: str,
width: int = 48,
height: int = 48,
color: Optional[str] = None,
library: Optional[str] = None,
style: Optional[str] = None,
extension: Optional[str] = None,
) -> QPixmap
Get a QPixmap of the specified icon.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
icon_name |
str
|
The name of the icon. |
required |
width |
int
|
The width of the pixmap. Defaults to 48. |
48
|
height |
int
|
The height of the pixmap. Defaults to 48. |
48
|
color |
str
|
The color to convert the pixmap to.
Defaults to |
None
|
library |
str
|
The library of the icon. Defaults to |
None
|
style |
str
|
The style of the icon. Defaults to |
None
|
extension |
str
|
The extension of the icon.
Defaults to |
None
|
Returns:
Name | Type | Description |
---|---|---|
QPixmap |
QPixmap
|
The QPixmap of the icon. |
Examples: