[ CLASS ] - Class offers functionalities to find and create icons.
More...
|
def | __init__ (self, path=None, colorScheme=ColorScheme.kDark) |
| Constructor. More...
|
|
def | getFile (self, fileName, useNA=True) |
| Get absolute path of the given icon file. More...
|
|
def | createIcon (self, fileName, useNA=True) |
| Create and return an QIcon instance for the given icon file. More...
|
|
def | createPixmap (self, fileName, useNA=True) |
| Create and return a QPixmap instance for the given icon file. More...
|
|
def | createIconForFileExtension (self, fileName, useNA=True) |
| Create QIcon instance for the given file's extension. More...
|
|
def | createPixmapForFileExtension (self, fileName, useNA=True) |
| Create QPixmap instance for the given file's extension. More...
|
|
def | createPlatformIcon (self, platformIcon=None) |
| Create and return an QIcon instance for the given platform. More...
|
|
def | createPlatformPixmap (self, platformIcon=None) |
| Create and return an QPixmap instance for the given platform. More...
|
|
|
def | builtInIconPath (self) |
| Built-in icon path. More...
|
|
def | packageIconPath (self) |
| Package icon path. More...
|
|
[ CLASS ] - Class offers functionalities to find and create icons.
◆ __init__()
def mQtWidgets.iconLib.Icon.__init__ |
( |
|
self, |
|
|
|
path = None , |
|
|
|
colorScheme = ColorScheme.kDark |
|
) |
| |
Constructor.
- Parameters
-
path | [ str | None | in ] - Absolute path of the python module where this class is being used (i.e. file). |
colorScheme | [ enum | mQtWidgets.iconLib.Icon.ColorScheme.kDark | in ] - Color scheme from mQtWidgets.iconLib.Icon.ColorScheme enum class. |
- Exceptions
-
- Returns
- None - None.
◆ builtInIconPath()
def mQtWidgets.iconLib.Icon.builtInIconPath |
( |
|
self | ) |
|
Built-in icon path.
- Exceptions
-
- Returns
- str - Absolute path.
◆ packageIconPath()
def mQtWidgets.iconLib.Icon.packageIconPath |
( |
|
self | ) |
|
Package icon path.
- Exceptions
-
- Returns
- str - Absolute path.
◆ getFile()
def mQtWidgets.iconLib.Icon.getFile |
( |
|
self, |
|
|
|
fileName, |
|
|
|
useNA = True |
|
) |
| |
Get absolute path of the given icon file.
Method first checks whether given fileName is a file, then checks local package and then checks built-in icon location for in order to retrieve the icon.
- Parameters
-
fileName | [ str | None | in ] - Absolute path or name of the icon file. |
useNA | [ bool | True | in ] - Use "Not Applicable" icon if icon with fileName doesn't exist. |
- Exceptions
-
- Returns
- str - Absolute path of the icon file.
-
None - If icon file doesn't exist.
◆ createIcon()
def mQtWidgets.iconLib.Icon.createIcon |
( |
|
self, |
|
|
|
fileName, |
|
|
|
useNA = True |
|
) |
| |
Create and return an QIcon instance for the given icon file.
Method first checks whether given fileName is a file, then checks local package and then checks built-in icon location in order to retrieve the icon.
- Parameters
-
fileName | [ str | None | in ] - Absolute path or name of the icon file. |
useNA | [ bool | True | in ] - Use "Not Applicable" icon if icon with fileName doesn't exist. |
- Exceptions
-
- Returns
- QIcon - QIcon instance.
◆ createPixmap()
def mQtWidgets.iconLib.Icon.createPixmap |
( |
|
self, |
|
|
|
fileName, |
|
|
|
useNA = True |
|
) |
| |
Create and return a QPixmap instance for the given icon file.
Method first checks whether given fileName is a file, then checks local package and then checks built-in icon location in order to retrieve the icon.
- Parameters
-
fileName | [ str | None | in ] - Absolute path or name of the icon file. |
useNA | [ bool | True | in ] - Use "Not Applicable" icon if icon with fileName doesn't exist. |
- Exceptions
-
- Returns
- QPixmap - QPixmap instance.
◆ createIconForFileExtension()
def mQtWidgets.iconLib.Icon.createIconForFileExtension |
( |
|
self, |
|
|
|
fileName, |
|
|
|
useNA = True |
|
) |
| |
Create QIcon instance for the given file's extension.
Method first checks whether given fileName is a file, then checks local package and then checks built-in icon location in order to retrieve the icon.
- Parameters
-
fileName | [ str | None | in ] - Absolute path or name of the icon file. |
useNA | [ bool | True | in ] - Use "Not Applicable" icon if icon with fileName doesn't exist. |
- Exceptions
-
- Returns
- QIcon - QIcon instance.
◆ createPixmapForFileExtension()
def mQtWidgets.iconLib.Icon.createPixmapForFileExtension |
( |
|
self, |
|
|
|
fileName, |
|
|
|
useNA = True |
|
) |
| |
Create QPixmap instance for the given file's extension.
Method first checks whether given fileName is a file, then checks local package and then checks built-in icon location in order to retrieve the icon.
- Parameters
-
fileName | [ str | None | in ] - Absolute path or name of the icon file. |
useNA | [ bool | True | in ] - Use "Not Applicable" icon if icon with fileName doesn't exist. |
- Exceptions
-
- Returns
- None - None.
◆ createPlatformIcon()
def mQtWidgets.iconLib.Icon.createPlatformIcon |
( |
|
self, |
|
|
|
platformIcon = None |
|
) |
| |
Create and return an QIcon instance for the given platform.
If platformIcon argument is not provided, current platform will be used.
- Parameters
-
platformIcon | [ enum | None | in ] - Platform icon from mQtWidgets.iconLib.Platform enum class. |
- Exceptions
-
- Returns
- QIcon - QIcon instance.
◆ createPlatformPixmap()
def mQtWidgets.iconLib.Icon.createPlatformPixmap |
( |
|
self, |
|
|
|
platformIcon = None |
|
) |
| |
Create and return an QPixmap instance for the given platform.
If platformIcon argument is not provided, current platform will be used.
- Parameters
-
platformIcon | [ enum | None | in ] - Platform icon from mQtWidgets.iconLib.Platform enum class. |
- Exceptions
-
- Returns
- QPixmap - QPixmap instance.
The documentation for this class was generated from the following file: