pyqt-slideshow


Namepyqt-slideshow JSON
Version 0.0.22 PyPI version JSON
download
home_pagehttps://github.com/yjg30737/pyqt-slideshow.git
SummaryPyQt widget for slide show
upload_time2023-01-23 02:12:52
maintainer
docs_urlNone
authorJung Gyu Yoon
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# pyqt-slideshow

PyQt widget for slide show



## Requirements

* PyQt5 >= 5.8



## Setup

`python -m pip install pyqt-slideshow`



## Detailed Description



![image](https://user-images.githubusercontent.com/55078043/170638847-1816f292-f731-49bc-bbb3-d7180e7ec779.png)



This widget mainly consists of three child widget.



* View

* Navigation button widget - buttons on the both sides of the view

* Bottom button widget - buttons at the bottom



You can set the image files to show with `setFilenames`.



You can watch previous/next image by clicking the navigation button or nth image file by clicking the buttons at the bottom.



Image is automatically changed by internal timer(QTimer). Interval is set to 5000 milliseconds by default.



## Method Overview

* `setFilenames(filenames: list)` - give the image files. You have to call this one time only so far.

* `setTimerEnabled(f: bool)` - set the image change timer

* `setInterval(milliseconds: int)` - set the image change interval

* `setNavigationButtonVisible(f: bool)` - set the navigation button's visibility(which also decides that you use it or not)

* `setBottomButtonVisible(f: bool)` - set the bottom button's visibility(which also decides that you use it or not)

* `setGradientEnabled(f: bool)` - Cover the dark gradient over the image



For example



<img src="https://user-images.githubusercontent.com/55078043/213953541-bc00a0c8-f11b-4054-8efe-7bdfead13262.png" width=320, height=200/>



* `getButtonGroup()` - get the button group(QButtonGroup) which has the every button. You can get them by `btnGrp.buttons()`

* `getBtnWidget()` - get the btn widget to set the spacing between the bottom button or other customization of button widget

* `getPrevBtn()` - get the prev button

* `getNextBtn()` - get the next button



## Example

### Code Sample 1 (Including navigation/bottom button)

```python

from PyQt5.QtWidgets import QApplication

from pyqt_slideshow import SlideShow



if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    s = SlideShow()

    s.setFilenames(['bioshock.jpg', 'dragon_age.jpg', 'ride_to_hell_retribution.jpg'])

    s.show()

    app.exec_()

```



### Result



https://user-images.githubusercontent.com/55078043/170615616-932fb93d-3311-4f97-8ad7-10943e0d2308.mp4



### Code Sample 2 (Not including navigation/bottom button)

```python

from PyQt5.QtWidgets import QApplication

from pyqt_slideshow import SlideShow



if __name__ == "__main__":

    import sys



    app = QApplication(sys.argv)

    s = SlideShow()

    s.setFilenames(['bioshock.jpg', 'dragon_age.jpg', 'ride_to_hell_retribution.jpg'])

    s.setNavigationButtonVisible(False) # to not show the navigation button

    s.setBottomButtonVisible(False) # to not show the bottom button

    s.show()

    app.exec_()

```



### Result



https://user-images.githubusercontent.com/55078043/170641896-336308b5-6f5c-4099-8b03-029a1f81337e.mp4



## TODO list

* Give the option to go back to first page by user when pressing the next button in the last page

* Transition effect

* Default screen when there is no image (thumbnail?)

* Add more styles with QML


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yjg30737/pyqt-slideshow.git",
    "name": "pyqt-slideshow",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jung Gyu Yoon",
    "author_email": "yjg30737@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/26/32/a2d1a32a80c81e905c9723310a15e9a4e3097ab6a69969935809d9bb0a7c/pyqt-slideshow-0.0.22.tar.gz",
    "platform": null,
    "description": "\n# pyqt-slideshow\n\nPyQt widget for slide show\n\n\n\n## Requirements\n\n* PyQt5 >= 5.8\n\n\n\n## Setup\n\n`python -m pip install pyqt-slideshow`\n\n\n\n## Detailed Description\n\n\n\n![image](https://user-images.githubusercontent.com/55078043/170638847-1816f292-f731-49bc-bbb3-d7180e7ec779.png)\n\n\n\nThis widget mainly consists of three child widget.\n\n\n\n* View\n\n* Navigation button widget - buttons on the both sides of the view\n\n* Bottom button widget - buttons at the bottom\n\n\n\nYou can set the image files to show with `setFilenames`.\n\n\n\nYou can watch previous/next image by clicking the navigation button or nth image file by clicking the buttons at the bottom.\n\n\n\nImage is automatically changed by internal timer(QTimer). Interval is set to 5000 milliseconds by default.\n\n\n\n## Method Overview\n\n* `setFilenames(filenames: list)` - give the image files. You have to call this one time only so far.\n\n* `setTimerEnabled(f: bool)` - set the image change timer\n\n* `setInterval(milliseconds: int)` - set the image change interval\n\n* `setNavigationButtonVisible(f: bool)` - set the navigation button's visibility(which also decides that you use it or not)\n\n* `setBottomButtonVisible(f: bool)` - set the bottom button's visibility(which also decides that you use it or not)\n\n* `setGradientEnabled(f: bool)` - Cover the dark gradient over the image\n\n\n\nFor example\n\n\n\n<img src=\"https://user-images.githubusercontent.com/55078043/213953541-bc00a0c8-f11b-4054-8efe-7bdfead13262.png\" width=320, height=200/>\n\n\n\n* `getButtonGroup()` - get the button group(QButtonGroup) which has the every button. You can get them by `btnGrp.buttons()`\n\n* `getBtnWidget()` - get the btn widget to set the spacing between the bottom button or other customization of button widget\n\n* `getPrevBtn()` - get the prev button\n\n* `getNextBtn()` - get the next button\n\n\n\n## Example\n\n### Code Sample 1 (Including navigation/bottom button)\n\n```python\n\nfrom PyQt5.QtWidgets import QApplication\n\nfrom pyqt_slideshow import SlideShow\n\n\n\nif __name__ == \"__main__\":\n\n    import sys\n\n\n\n    app = QApplication(sys.argv)\n\n    s = SlideShow()\n\n    s.setFilenames(['bioshock.jpg', 'dragon_age.jpg', 'ride_to_hell_retribution.jpg'])\n\n    s.show()\n\n    app.exec_()\n\n```\n\n\n\n### Result\n\n\n\nhttps://user-images.githubusercontent.com/55078043/170615616-932fb93d-3311-4f97-8ad7-10943e0d2308.mp4\n\n\n\n### Code Sample 2 (Not including navigation/bottom button)\n\n```python\n\nfrom PyQt5.QtWidgets import QApplication\n\nfrom pyqt_slideshow import SlideShow\n\n\n\nif __name__ == \"__main__\":\n\n    import sys\n\n\n\n    app = QApplication(sys.argv)\n\n    s = SlideShow()\n\n    s.setFilenames(['bioshock.jpg', 'dragon_age.jpg', 'ride_to_hell_retribution.jpg'])\n\n    s.setNavigationButtonVisible(False) # to not show the navigation button\n\n    s.setBottomButtonVisible(False) # to not show the bottom button\n\n    s.show()\n\n    app.exec_()\n\n```\n\n\n\n### Result\n\n\n\nhttps://user-images.githubusercontent.com/55078043/170641896-336308b5-6f5c-4099-8b03-029a1f81337e.mp4\n\n\n\n## TODO list\n\n* Give the option to go back to first page by user when pressing the next button in the last page\n\n* Transition effect\n\n* Default screen when there is no image (thumbnail?)\n\n* Add more styles with QML\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "PyQt widget for slide show",
    "version": "0.0.22",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "13c837c4a6a4b2b9c5c63f34cbfc54063fe7c2a4448a2e7dd9aa70cadf7455ca",
                "md5": "6f9b0737c346acef4ae6990a8ff6405e",
                "sha256": "b8808757aa51dda275dab5c0fbbaeea168fb500899ae8847a5b99d9b9827018c"
            },
            "downloads": -1,
            "filename": "pyqt_slideshow-0.0.22-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6f9b0737c346acef4ae6990a8ff6405e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9761,
            "upload_time": "2023-01-23T02:12:50",
            "upload_time_iso_8601": "2023-01-23T02:12:50.816813Z",
            "url": "https://files.pythonhosted.org/packages/13/c8/37c4a6a4b2b9c5c63f34cbfc54063fe7c2a4448a2e7dd9aa70cadf7455ca/pyqt_slideshow-0.0.22-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2632a2d1a32a80c81e905c9723310a15e9a4e3097ab6a69969935809d9bb0a7c",
                "md5": "7365f65133a5985d08b16e8be63a5481",
                "sha256": "a83c8d2853a55d40fb3d06707b4a5c7ebf52bc1302d541cb5a42187fe0c04025"
            },
            "downloads": -1,
            "filename": "pyqt-slideshow-0.0.22.tar.gz",
            "has_sig": false,
            "md5_digest": "7365f65133a5985d08b16e8be63a5481",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7826,
            "upload_time": "2023-01-23T02:12:52",
            "upload_time_iso_8601": "2023-01-23T02:12:52.330470Z",
            "url": "https://files.pythonhosted.org/packages/26/32/a2d1a32a80c81e905c9723310a15e9a4e3097ab6a69969935809d9bb0a7c/pyqt-slideshow-0.0.22.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-23 02:12:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "yjg30737",
    "github_project": "pyqt-slideshow.git",
    "lcname": "pyqt-slideshow"
}
        
Elapsed time: 0.04068s