pyqt5-fugueicons


Namepyqt5-fugueicons JSON
Version 3.5.6.2 PyPI version JSON
download
home_pagehttps://github.com/glourencoffee/pyqt5_fugueicons
SummaryFugue Icons for PyQt5
upload_time2023-05-26 16:35:49
maintainer
docs_urlNone
authorGiovanni Lourenço
requires_python>=3.6
licenseMIT
keywords pyqt5 icons
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # About

`pyqt5_fugueicons` is a library for PyQt5 that provides the icons in the collection [Fugue Icons][fugue-website] created by Yusuke Kamiyamane. It uses the Qt Resource System to embed icons into the library, which allows them to be used directly in an
application.

# Installation

```sh
> pip install pyqt5-fugueicons
```

# Usage

## Icons

```py
import pyqt5_fugueicons as fugue
from PyQt5 import QtWidgets

icon   = fugue.icon('application-blue')
button = QtWidgets.PushButton(icon, 'application-blue')
...
```

The above call returns the icon named "application-blue" with the dimensions 16x16. The icon can then be assigned to any `QtWidgets` class that supports a `QIcon`.

## Shadowed and Shadowless

There are two versions of icons, shadowed and shadowless. Shadowed icons have a small
shadow, which shadowless ones don't. By default, `icon()` returns the shadowed
version of an icon. This can be changed by passing the parameter `shadowless=True`:

```py
import pyqt5_fugueicons as fugue

icon = fugue.icon('application-blue', shadowless=True)
```

## Size and Fallback

Some icons also have 24x24 and 32x32 counterparts. The parameter `size` allows
one to specify the desired size of an icon, and the parameter `fallback_size`
defines whether the smaller counterparts of an icon should be tried if an icon
with the desired size is not found:

```py
import pyqt5_fugueicons as fugue

icon = fugue.icon('application-blue', size=24, fallback_size=True)
```

In the above code, if the shadowed version of the icon "application-blue" is
not found with dimensions 24x24, the function will try to find the shadowed version
of the same icon with dimensions 16x16. If still no icon is found, an empty
`QIcon` is returned. `size` accepts the values 16, 24, and 32.

## Icon Names

Icon names can be found in the author's [website][fugue-website]. An icon name
is simply its file name without the extension. The function `iconNames()` returns
all icon names:

```py
for name in fugue.iconNames():
    print(name)
```

## Animated Icons

Animated icons in the Fugue collection are returned by the function `movie()`:

```py
import pyqt5_fugueicons as fugue
from PyQt5 import QtWidgets

movie = fugue.movie('terminal')
movie.start()

label = QtWidgets.QLabel()
label.setMovie(movie)
...
```

The reason the library calls it "movie" rather than "animation" is to be
consistent with Qt terminology, since Qt animations are [something else][pyqt-animation-framework]. The class `QMovie` is the one responsible for
showing gifs on the Qt framework, so the library follows that.

`movie()` works similar to `icon()`, with the difference being that there exist
only Fugue animations with the dimensions 16x16 and 24x24, so `size` only accepts the
values 16 and 24. There is also a function `movieNames()` which returns all movie names.

## Examples

More elaborated examples of usage can be found in the folder `samples` of this repository.

# Compiling Resources

Since the icon files are already compiled into `resource.py`, this
repository does not include the icon files from the Fugue's website.
If you want to compile it by yourself, you must [download it][fugue-download],
extract it into the folder `resources`, and run `pyrcc5`:

```sh
pyrcc5 -o pyqt5_fugueicons/resources.py resources/resources.qrc
```

Or `rcc.exe`:

```sh
rcc.exe -g python pyqt5_fugueicons/resources.py resources/resources.qrc
```

In the latter case, `resources.py` has to be manually opened and the line
`from PySide2 import QtCore` must be replaced with `from PyQt5 import QtCore`.


  [fugue-website]: <https://p.yusukekamiyamane.com>
  [pyqt-animation-framework]: <https://doc.qt.io/qtforpython-5/overviews/animation-overview.html>
  [fugue-download]: <https://p.yusukekamiyamane.com/icons/downloads/fugue-icons-3.5.6.zip>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/glourencoffee/pyqt5_fugueicons",
    "name": "pyqt5-fugueicons",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "pyqt5,icons",
    "author": "Giovanni Louren\u00e7o",
    "author_email": "gvnl.developer@outlook.com",
    "download_url": "https://files.pythonhosted.org/packages/9f/23/7b9ba9775f8e5b05092fba5e981c57634c40c4d03c2fa834d790fc734527/pyqt5_fugueicons-3.5.6.2.tar.gz",
    "platform": null,
    "description": "# About\n\n`pyqt5_fugueicons` is a library for PyQt5 that provides the icons in the collection [Fugue Icons][fugue-website] created by Yusuke Kamiyamane. It uses the Qt Resource System to embed icons into the library, which allows them to be used directly in an\napplication.\n\n# Installation\n\n```sh\n> pip install pyqt5-fugueicons\n```\n\n# Usage\n\n## Icons\n\n```py\nimport pyqt5_fugueicons as fugue\nfrom PyQt5 import QtWidgets\n\nicon   = fugue.icon('application-blue')\nbutton = QtWidgets.PushButton(icon, 'application-blue')\n...\n```\n\nThe above call returns the icon named \"application-blue\" with the dimensions 16x16. The icon can then be assigned to any `QtWidgets` class that supports a `QIcon`.\n\n## Shadowed and Shadowless\n\nThere are two versions of icons, shadowed and shadowless. Shadowed icons have a small\nshadow, which shadowless ones don't. By default, `icon()` returns the shadowed\nversion of an icon. This can be changed by passing the parameter `shadowless=True`:\n\n```py\nimport pyqt5_fugueicons as fugue\n\nicon = fugue.icon('application-blue', shadowless=True)\n```\n\n## Size and Fallback\n\nSome icons also have 24x24 and 32x32 counterparts. The parameter `size` allows\none to specify the desired size of an icon, and the parameter `fallback_size`\ndefines whether the smaller counterparts of an icon should be tried if an icon\nwith the desired size is not found:\n\n```py\nimport pyqt5_fugueicons as fugue\n\nicon = fugue.icon('application-blue', size=24, fallback_size=True)\n```\n\nIn the above code, if the shadowed version of the icon \"application-blue\" is\nnot found with dimensions 24x24, the function will try to find the shadowed version\nof the same icon with dimensions 16x16. If still no icon is found, an empty\n`QIcon` is returned. `size` accepts the values 16, 24, and 32.\n\n## Icon Names\n\nIcon names can be found in the author's [website][fugue-website]. An icon name\nis simply its file name without the extension. The function `iconNames()` returns\nall icon names:\n\n```py\nfor name in fugue.iconNames():\n    print(name)\n```\n\n## Animated Icons\n\nAnimated icons in the Fugue collection are returned by the function `movie()`:\n\n```py\nimport pyqt5_fugueicons as fugue\nfrom PyQt5 import QtWidgets\n\nmovie = fugue.movie('terminal')\nmovie.start()\n\nlabel = QtWidgets.QLabel()\nlabel.setMovie(movie)\n...\n```\n\nThe reason the library calls it \"movie\" rather than \"animation\" is to be\nconsistent with Qt terminology, since Qt animations are [something else][pyqt-animation-framework]. The class `QMovie` is the one responsible for\nshowing gifs on the Qt framework, so the library follows that.\n\n`movie()` works similar to `icon()`, with the difference being that there exist\nonly Fugue animations with the dimensions 16x16 and 24x24, so `size` only accepts the\nvalues 16 and 24. There is also a function `movieNames()` which returns all movie names.\n\n## Examples\n\nMore elaborated examples of usage can be found in the folder `samples` of this repository.\n\n# Compiling Resources\n\nSince the icon files are already compiled into `resource.py`, this\nrepository does not include the icon files from the Fugue's website.\nIf you want to compile it by yourself, you must [download it][fugue-download],\nextract it into the folder `resources`, and run `pyrcc5`:\n\n```sh\npyrcc5 -o pyqt5_fugueicons/resources.py resources/resources.qrc\n```\n\nOr `rcc.exe`:\n\n```sh\nrcc.exe -g python pyqt5_fugueicons/resources.py resources/resources.qrc\n```\n\nIn the latter case, `resources.py` has to be manually opened and the line\n`from PySide2 import QtCore` must be replaced with `from PyQt5 import QtCore`.\n\n\n  [fugue-website]: <https://p.yusukekamiyamane.com>\n  [pyqt-animation-framework]: <https://doc.qt.io/qtforpython-5/overviews/animation-overview.html>\n  [fugue-download]: <https://p.yusukekamiyamane.com/icons/downloads/fugue-icons-3.5.6.zip>\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Fugue Icons for PyQt5",
    "version": "3.5.6.2",
    "project_urls": {
        "Homepage": "https://github.com/glourencoffee/pyqt5_fugueicons"
    },
    "split_keywords": [
        "pyqt5",
        "icons"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "822d2a9ebc644f10a8555caa3d98600412d7502bdd86a313842bb261252157ff",
                "md5": "7855aadfd7fbc256fae643376315c908",
                "sha256": "27eb1d5ab5f8898c310583159c011150ad9302955f4d4ffba507f29fe2ecccb1"
            },
            "downloads": -1,
            "filename": "pyqt5_fugueicons-3.5.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7855aadfd7fbc256fae643376315c908",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6898505,
            "upload_time": "2023-05-26T16:35:40",
            "upload_time_iso_8601": "2023-05-26T16:35:40.236418Z",
            "url": "https://files.pythonhosted.org/packages/82/2d/2a9ebc644f10a8555caa3d98600412d7502bdd86a313842bb261252157ff/pyqt5_fugueicons-3.5.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9f237b9ba9775f8e5b05092fba5e981c57634c40c4d03c2fa834d790fc734527",
                "md5": "0d09aa4c80b9695e00b1704c1d130d83",
                "sha256": "18f9a2d8f04579e8bedffea653846abc2fd484b21d648d2bbf8c98f8bd6200d0"
            },
            "downloads": -1,
            "filename": "pyqt5_fugueicons-3.5.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "0d09aa4c80b9695e00b1704c1d130d83",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6620315,
            "upload_time": "2023-05-26T16:35:49",
            "upload_time_iso_8601": "2023-05-26T16:35:49.791870Z",
            "url": "https://files.pythonhosted.org/packages/9f/23/7b9ba9775f8e5b05092fba5e981c57634c40c4d03c2fa834d790fc734527/pyqt5_fugueicons-3.5.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-26 16:35:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "glourencoffee",
    "github_project": "pyqt5_fugueicons",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "pyqt5-fugueicons"
}
        
Elapsed time: 0.07737s