PyQtWaitingSpinner


NamePyQtWaitingSpinner JSON
Version 1.3.2 PyPI version JSON
download
home_pageNone
Summary(Py)QtWaitingSpinner is a highly configurable, custom Qt widget for showing "waiting" or "loading" spinner icons in (Py)Qt(6) applications.
upload_time2024-08-20 03:36:48
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords loading pyqt pyqt6 qt qt6 spinner waiting widget
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PyQtWaitingSpinner

![Python](https://img.shields.io/badge/python-3.8_|_3.9_|_3.10_|_3.11_|_3.12_-ffff54?style=for-the-badge&logo=python&logoColor=ffdd54&labelColor=3670A0)
![Static Badge](https://img.shields.io/badge/Qt-6.7.0-0?logo=qt&logoColor=white&style=for-the-badge)
![Static Badge](https://custom-icon-badges.demolab.com/badge/license-MIT-blue?logoColor=blue&style=for-the-badge&logo=law)

![PyPI - Version](https://img.shields.io/pypi/v/pyqtwaitingspinner)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/pyqtwaitingspinner)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/pyqtwaitingspinner)
<!-- ![GitLab Issues](https://img.shields.io/gitlab/issues/open/Batticus%2FPyQtWaitingSpinner) -->
![GitLab Issues](https://img.shields.io/gitlab/issues/open/Batticus/pyqtwaitingspinner)

<!-- ![PyPI - Downloads](https://img.shields.io/pypi/dd/pyqtwaitingspinner)
![PyPI - Downloads](https://img.shields.io/pypi/dw/pyqtwaitingspinner)
![PyPI - Downloads](https://img.shields.io/pypi/dm/pyqtwaitingspinner) -->

(Py)QtWaitingSpinner is a highly configurable, custom (Py)Qt widget for showing "waiting", or
"loading", spinner icons in (Py)Qt applications.

Based on [pyqtspinner](https://github.com/fbjorn/QtWaitingSpinner), by [fbjorn](https://github.com/fbjorn), which is a fork of [z3ntu](https://github.com/z3ntu/QtWaitingSpinner)'s port of [snowwlex](https://github.com/snowwlex)'s [QtWaitingSpinner](https://github.com/snowwlex/QtWaitingSpinner).

The spinners below are all (Py)QtWaitingSpinner widgets, differing only in their configuration:

<!-- <img src="static/WaitingSpinner-04.gif" width=56 height=56>
<img src="static/WaitingSpinner-02.gif" width=56 height=56>
<img src="static/WaitingSpinner-03.gif" width=56 height=56>
<img src="static/WaitingSpinner-01.gif" width=56 height=56>
<br> -->
<!-- <img src="static/waiting-spinners.gif"> -->

<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-04.gif?ref_type=heads" width=56 height=56>
<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-03.gif?ref_type=heads" width=56 height=56>
<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-02.gif?ref_type=heads" width=56 height=56>
<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-01.gif?ref_type=heads" width=56 height=56>
<br>
<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/waiting-spinners.gif?ref_type=heads">

<sup>Original GIF by [snowwlex](https://github.com/snowwlex)</sup>

<!-- <img src="static/examples.png" alt="Original GIF by snowwlex" width=504 height=415> -->
<img src="https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/examples.png?ref_type=heads" alt="Original GIF by snowwlex" width=504 height=415>

<sup>Original Image by [fbjorn](https://github.com/fbjorn)</sup>

---

# Installation

`pip install pyqtwaitingspinner`

---

# Dependencies

- [PyYAML](https://pypi.org/project/PyYAML/)
- [PyQt6](https://pypi.org/project/PyQt6/)

---

# Configuration

The following properties can all be controlled directly through their corresponding
properties:

- Color of the widget
- "Roundness" of the lines
- Speed (rotations per second)
- Number of lines to be drawn
- Line length
- Line width
- Radius of the spinner's "dead space" or inner circle
- The percentage fade of the "trail"
- The minimum opacity of the "trail"
- Whether to center the spinner on its parent widget
- Whether or not to disable the parent widget whilst the spinner is spinning
- The direction in which the spinner will spin

---

# Usage

## *Spinner*

The following code will create a simple spinner that

- (1) blocks all user input to the main application for as long as the spinner is active
- (2) automatically centers itself on its parent widget every time "start" is called
- (3) makes use of the default shape, size and color settings.

```python
spin_pars = SpinnerParameters(disable_parent_when_spinning=True)
spinner = WaitingSpinner(parent, spin_pars)
```

## *Configurator*

The graphical Configurator allows you edit the parameters of the spinner, and view the changes live.

The Configurator can be launched with:

```
spinner-conf
```

<!-- ![configuration](static/configurator.png "Configurator") -->
![configuration](https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/configurator.png?ref_type=heads "Configurator")

Once the spinner's appearance is to your liking, you can either copy (and view) the initialization parameters for the construction of a `SpinnerParameters` object, or you can save the spinner as a YAML configuration and load it from within a `WaitingSpinner` class.

### Show Init Args

Pressing the **`Show Init Args`** button will show the initialization arguments for the equivalent **`SpinnerParameters`** object, and will make a copy to the clipboard, ***including newlines and whitespace***.

<!-- ![show-init-args](static/show-init-args.png "Show Init Args") -->
![show-init-args](https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/show-init-args.png?ref_type=heads "Show Init Args")
```python
SpinnerParameters(
    roundness=100.0,
    trail_fade_percentage=67.0,
    number_of_lines=8,
    line_length=40,
    line_width=40,
    inner_radius=32,
    revolutions_per_second=1.0,
    color=QColor(0, 170, 0),
    minimum_trail_opacity=1.0,
    spin_direction=SpinDirection.COUNTERCLOCKWISE,
    center_on_parent=True,
    disable_parent_when_spinning=False,
)
```

### Save Config
Pressing the **`Save`** button will open a dialog allowing you to select the location, and name, in which to save the configured spinner. The outputted **YAML** file can then be loaded like so:

```python
spinner = WaitingSpinner(parent)
spinner.load("path/to/spinner.yaml")
```

---

# Documentation

Full documentation at [ReadTheDocs](https://pyqtwaitingspinner.readthedocs.io/en/latest/)

---

# Credits

- [snowwlex (Alex Turkin)](https://github.com/snowwlex), [William Hallatt](https://github.com/williamhallatt), & [jacob3141 (Jacob Dawid)](https://github.com/jacob3141) for the original Qt widget.
- [z3ntu (Luca Weiss)](https://github.com/z3ntu) for his [PyQt6 port](https://github.com/z3ntu/QtWaitingSpinner).
- [fbjorn](https://github.com/fbjorn) for his [PyQt5 port](https://github.com/fbjorn/QtWaitingSpinner) of [z3ntu](https://github.com/z3ntu)'s port.
- [Yusuke Kamiyamane](http://p.yusukekamiyamane.com) for the icons used in the Configurator.

- See full [credits](https://pyqtwaitingspinner.readthedocs.io/en/latest/credits/)

---

Enjoy!

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "PyQtWaitingSpinner",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "loading, pyqt, pyqt6, qt, qt6, spinner, waiting, widget",
    "author": null,
    "author_email": "Batticus <myshorts.mail@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/a1/bf/26482cec798e88ead3aa266c09e2b0079b448ff8508c97d78a68ce4f4207/pyqtwaitingspinner-1.3.2.tar.gz",
    "platform": null,
    "description": "# PyQtWaitingSpinner\n\n![Python](https://img.shields.io/badge/python-3.8_|_3.9_|_3.10_|_3.11_|_3.12_-ffff54?style=for-the-badge&logo=python&logoColor=ffdd54&labelColor=3670A0)\n![Static Badge](https://img.shields.io/badge/Qt-6.7.0-0?logo=qt&logoColor=white&style=for-the-badge)\n![Static Badge](https://custom-icon-badges.demolab.com/badge/license-MIT-blue?logoColor=blue&style=for-the-badge&logo=law)\n\n![PyPI - Version](https://img.shields.io/pypi/v/pyqtwaitingspinner)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/pyqtwaitingspinner)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/pyqtwaitingspinner)\n<!-- ![GitLab Issues](https://img.shields.io/gitlab/issues/open/Batticus%2FPyQtWaitingSpinner) -->\n![GitLab Issues](https://img.shields.io/gitlab/issues/open/Batticus/pyqtwaitingspinner)\n\n<!-- ![PyPI - Downloads](https://img.shields.io/pypi/dd/pyqtwaitingspinner)\n![PyPI - Downloads](https://img.shields.io/pypi/dw/pyqtwaitingspinner)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/pyqtwaitingspinner) -->\n\n(Py)QtWaitingSpinner is a highly configurable, custom (Py)Qt widget for showing \"waiting\", or\n\"loading\", spinner icons in (Py)Qt applications.\n\nBased on [pyqtspinner](https://github.com/fbjorn/QtWaitingSpinner), by [fbjorn](https://github.com/fbjorn), which is a fork of [z3ntu](https://github.com/z3ntu/QtWaitingSpinner)'s port of [snowwlex](https://github.com/snowwlex)'s [QtWaitingSpinner](https://github.com/snowwlex/QtWaitingSpinner).\n\nThe spinners below are all (Py)QtWaitingSpinner widgets, differing only in their configuration:\n\n<!-- <img src=\"static/WaitingSpinner-04.gif\" width=56 height=56>\n<img src=\"static/WaitingSpinner-02.gif\" width=56 height=56>\n<img src=\"static/WaitingSpinner-03.gif\" width=56 height=56>\n<img src=\"static/WaitingSpinner-01.gif\" width=56 height=56>\n<br> -->\n<!-- <img src=\"static/waiting-spinners.gif\"> -->\n\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-04.gif?ref_type=heads\" width=56 height=56>\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-03.gif?ref_type=heads\" width=56 height=56>\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-02.gif?ref_type=heads\" width=56 height=56>\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/WaitingSpinner-01.gif?ref_type=heads\" width=56 height=56>\n<br>\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/waiting-spinners.gif?ref_type=heads\">\n\n<sup>Original GIF by [snowwlex](https://github.com/snowwlex)</sup>\n\n<!-- <img src=\"static/examples.png\" alt=\"Original GIF by snowwlex\" width=504 height=415> -->\n<img src=\"https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/examples.png?ref_type=heads\" alt=\"Original GIF by snowwlex\" width=504 height=415>\n\n<sup>Original Image by [fbjorn](https://github.com/fbjorn)</sup>\n\n---\n\n# Installation\n\n`pip install pyqtwaitingspinner`\n\n---\n\n# Dependencies\n\n- [PyYAML](https://pypi.org/project/PyYAML/)\n- [PyQt6](https://pypi.org/project/PyQt6/)\n\n---\n\n# Configuration\n\nThe following properties can all be controlled directly through their corresponding\nproperties:\n\n- Color of the widget\n- \"Roundness\" of the lines\n- Speed (rotations per second)\n- Number of lines to be drawn\n- Line length\n- Line width\n- Radius of the spinner's \"dead space\" or inner circle\n- The percentage fade of the \"trail\"\n- The minimum opacity of the \"trail\"\n- Whether to center the spinner on its parent widget\n- Whether or not to disable the parent widget whilst the spinner is spinning\n- The direction in which the spinner will spin\n\n---\n\n# Usage\n\n## *Spinner*\n\nThe following code will create a simple spinner that\n\n- (1) blocks all user input to the main application for as long as the spinner is active\n- (2) automatically centers itself on its parent widget every time \"start\" is called\n- (3) makes use of the default shape, size and color settings.\n\n```python\nspin_pars = SpinnerParameters(disable_parent_when_spinning=True)\nspinner = WaitingSpinner(parent, spin_pars)\n```\n\n## *Configurator*\n\nThe graphical Configurator allows you edit the parameters of the spinner, and view the changes live.\n\nThe Configurator can be launched with:\n\n```\nspinner-conf\n```\n\n<!-- ![configuration](static/configurator.png \"Configurator\") -->\n![configuration](https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/configurator.png?ref_type=heads \"Configurator\")\n\nOnce the spinner's appearance is to your liking, you can either copy (and view) the initialization parameters for the construction of a `SpinnerParameters` object, or you can save the spinner as a YAML configuration and load it from within a `WaitingSpinner` class.\n\n### Show Init Args\n\nPressing the **`Show Init Args`** button will show the initialization arguments for the equivalent **`SpinnerParameters`** object, and will make a copy to the clipboard, ***including newlines and whitespace***.\n\n<!-- ![show-init-args](static/show-init-args.png \"Show Init Args\") -->\n![show-init-args](https://gitlab.com/Batticus/pyqtwaitingspinner/-/raw/main/static/show-init-args.png?ref_type=heads \"Show Init Args\")\n```python\nSpinnerParameters(\n    roundness=100.0,\n    trail_fade_percentage=67.0,\n    number_of_lines=8,\n    line_length=40,\n    line_width=40,\n    inner_radius=32,\n    revolutions_per_second=1.0,\n    color=QColor(0, 170, 0),\n    minimum_trail_opacity=1.0,\n    spin_direction=SpinDirection.COUNTERCLOCKWISE,\n    center_on_parent=True,\n    disable_parent_when_spinning=False,\n)\n```\n\n### Save Config\nPressing the **`Save`** button will open a dialog allowing you to select the location, and name, in which to save the configured spinner. The outputted **YAML** file can then be loaded like so:\n\n```python\nspinner = WaitingSpinner(parent)\nspinner.load(\"path/to/spinner.yaml\")\n```\n\n---\n\n# Documentation\n\nFull documentation at [ReadTheDocs](https://pyqtwaitingspinner.readthedocs.io/en/latest/)\n\n---\n\n# Credits\n\n- [snowwlex (Alex Turkin)](https://github.com/snowwlex), [William Hallatt](https://github.com/williamhallatt), & [jacob3141 (Jacob Dawid)](https://github.com/jacob3141) for the original Qt widget.\n- [z3ntu (Luca Weiss)](https://github.com/z3ntu) for his [PyQt6 port](https://github.com/z3ntu/QtWaitingSpinner).\n- [fbjorn](https://github.com/fbjorn) for his [PyQt5 port](https://github.com/fbjorn/QtWaitingSpinner) of [z3ntu](https://github.com/z3ntu)'s port.\n- [Yusuke Kamiyamane](http://p.yusukekamiyamane.com) for the icons used in the Configurator.\n\n- See full [credits](https://pyqtwaitingspinner.readthedocs.io/en/latest/credits/)\n\n---\n\nEnjoy!\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "(Py)QtWaitingSpinner is a highly configurable, custom Qt widget for showing \"waiting\" or \"loading\" spinner icons in (Py)Qt(6) applications.",
    "version": "1.3.2",
    "project_urls": {
        "Documentation": "https://pyqtwaitingspinner.readthedocs.io/en/latest/",
        "Homepage": "https://gitlab.com/Batticus/pyqtwaitingspinner",
        "Issues": "https://gitlab.com/Batticus/pyqtwaitingspinner/-/issues"
    },
    "split_keywords": [
        "loading",
        " pyqt",
        " pyqt6",
        " qt",
        " qt6",
        " spinner",
        " waiting",
        " widget"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e02602c4c0a292ed991368bc9cbf5d861fcfaaa0623e59cf5b158031eadaef20",
                "md5": "3dae22eb02853e58e3917d067338e617",
                "sha256": "7300f1d3f7718910b893af70794845bd28253de6081723b514ac670f855cce24"
            },
            "downloads": -1,
            "filename": "pyqtwaitingspinner-1.3.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3dae22eb02853e58e3917d067338e617",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 21967,
            "upload_time": "2024-08-20T03:36:46",
            "upload_time_iso_8601": "2024-08-20T03:36:46.213812Z",
            "url": "https://files.pythonhosted.org/packages/e0/26/02c4c0a292ed991368bc9cbf5d861fcfaaa0623e59cf5b158031eadaef20/pyqtwaitingspinner-1.3.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1bf26482cec798e88ead3aa266c09e2b0079b448ff8508c97d78a68ce4f4207",
                "md5": "19f74a529ca29f41b9b11e0f899807f6",
                "sha256": "17985450521c85d670e44b15a750bbd47689499ba795a57ec4d46dd738ff942d"
            },
            "downloads": -1,
            "filename": "pyqtwaitingspinner-1.3.2.tar.gz",
            "has_sig": false,
            "md5_digest": "19f74a529ca29f41b9b11e0f899807f6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 19904,
            "upload_time": "2024-08-20T03:36:48",
            "upload_time_iso_8601": "2024-08-20T03:36:48.088321Z",
            "url": "https://files.pythonhosted.org/packages/a1/bf/26482cec798e88ead3aa266c09e2b0079b448ff8508c97d78a68ce4f4207/pyqtwaitingspinner-1.3.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-20 03:36:48",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "Batticus",
    "gitlab_project": "pyqtwaitingspinner",
    "lcname": "pyqtwaitingspinner"
}
        
Elapsed time: 3.79878s