Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ Or use the helpdev if you have

[If used, please inform their versions]

- PySide:
- PyQt:
- PyQtGraph:
- PySide6:
- QtPy:
- QT_API:
- PYQTGRAPH_QT_LIB:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@ on:

jobs:
build:
name: Build - Python ${{ matrix.python-version }} - ${{ matrix.platform }}
name: Build - Python ${{ matrix.python-version }} - ${{ matrix.qt-binding }} - ${{ matrix.platform }}
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 2
max-parallel: 4
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.9]
qt-binding: [pyqt5, pyside2, pyside6]
python-version: [3.10]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -29,18 +30,18 @@ jobs:
run: tox
env:
PLATFORM: ${{ matrix.platform }}
TASK: build
QT_BINDING: ${{ matrix.qt-binding }}

test:
needs: [build]
name: Test - ${{ matrix.tasks }}
runs-on: ${{ matrix.platform }}
strategy:
max-parallel: 2
max-parallel: 4
matrix:
platform: [ubuntu-latest]
python-version: [3.9]
tasks: [lint, safety, metric, doc, release]
python-version: [3.10]
tasks: [lint, safety, format, metric, doc, release]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -57,7 +58,6 @@ jobs:
run: tox
env:
PLATFORM: ${{ matrix.platform }}
TASK: ${{ matrix.tasks }}

release:
runs-on: ubuntu-latest
Expand All @@ -69,7 +69,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2.3.2
with:
python-version: 3.9
python-version: 3.10

- name: Install dependencies
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2.3.2
with:
python-version: 3.9
python-version: 3.10

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_TEST_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload --repository testpypi --skip-existing --verbose dist/*

deploy:
Expand All @@ -39,17 +39,17 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2.3.2
with:
python-version: 3.9
python-version: 3.10

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install build twine

- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload --skip-existing --verbose dist/*
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2.3.2
with:
python-version: 3.9
python-version: 3.10

- name: Install dependencies
run: |
Expand Down
19 changes: 19 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
Changelog
=========
- Unreleased
-

- 0.9.9
- Fix size and tooltip for palette button in palette picker widgets
- Add AIK and Djurgården palettes
- Update to GBK palette to reduce contrast between colors
- Fix complex dependencies by replacing linting tools with ruff
and safety with pip audit

- 0.9.8
- Add new palettes: GBK

- 0.9.7
- Add support for py 3.10
- Add support for PySide6
- Remove traces of unsupported Qt, PyQt4 and PySide
- Remove support for pyqtgraph
- Remove GoogleMapsWidgets to remove WebEngine dependencies

- 0.9.6:
- Cast ``floats`` to ``ints`` to fix TypeErrors in new Qt version
Expand Down
18 changes: 8 additions & 10 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,7 @@ inside script folder, using:
python process_ui.py
```

It will generate all ``_ui.py`` files for PyQt4, PyQt5, PySide, QtPy,
PyQtGraph.
It will generate all ``_ui.py`` files for PySide2, PySide6, PyQt5, QtPy.

Modifying QSS File
~~~~~~~~~~~~~~~~~~
Expand All @@ -223,8 +222,7 @@ folder.
python process_qrc.py
```

This generates all ``_rc.py`` files for PyQt4, PyQt5, PySide, QtPy,
PyQtGraph.
This generates all ``_rc.py`` files for PySide2, PySide6, PyQt5, QtPy.

Making It Easy
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -354,17 +352,17 @@ maintainer in both.

2. Generate a distribution (code package and wheel)

``python setup.py sdist bdist_wheel``
``python -m build``

3. Check with ``twine``, which also tests README format for PyPI

``twine check dist/*``

4. Try upload in `PyPI test
page <https://test.pypi.org/project/QRainbowstyle>`__ platform before
the oficial
page <https://test.pypi.org/project/QRainbowstyle>`__ platform before the
official one.

``twine upload --repository-url https://test.pypi.org/legacy/ dist/*``
``twine upload --repository testpypi dist/*``

5. Try to install from test

Expand All @@ -375,9 +373,9 @@ maintainer in both.
``pip uninstall qrainbowstyle -y``

7. Upload to `PyPI official
page <https://pypi.python.org/pypi/QRainbowstyle>`__
page <https://pypi.org/project/QRainbowstyle>`__

``twine upload --repository-url https://upload.pypi.org/legacy/ dist/*``
``twine upload dist/*``

8. Try to install from oficial

Expand Down
24 changes: 7 additions & 17 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ QRainbowStyleSheet
|License: CC BY 4.0| |Conduct|

The most complete customizable stylesheet for Qt application (PySide2,
PyQt5, QtPy, Qt.Py).
PySide6, PyQt5, QtPy, Qt.Py).

Preview
-------
Expand Down Expand Up @@ -72,8 +72,10 @@ Frameless windows
from qtpy.QtWidgets import QApplication
from qtpy.QtCore import Qt

QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)
# If using Qt5 enable for HighDPI support, in Qt6 HighDPI support is
# enabled by default.
# QApplication.setAttribute(Qt.AA_UseHighDpiPixmaps)
# QApplication.setAttribute(Qt.AA_EnableHighDpiScaling)

app = QApplication(sys.argv)
app.setStyleSheet(qrainbowstyle.load_stylesheet(style="oceanic"))
Expand Down Expand Up @@ -109,7 +111,7 @@ Style sheet
import qrainbowstyle

# set the environment variable to use a specific wrapper
# it can be set to pyqt, pyqt5, or pyside2
# it can be set to pyqt5, pyside2 or pyside6
# you do not need to use QtPy to set this variable
os.environ['QT_API'] = 'pyqt5'

Expand Down Expand Up @@ -143,8 +145,6 @@ If you are using PyQt5 directly, see the complete example
window = QMainWindow()

# setup stylesheet
app.setStyleSheet(qrainbowstyle.load_stylesheet_pyqt5())
# or in new API
app.setStyleSheet(qrainbowstyle.load_stylesheet(qt_api='pyqt5'))

# run
Expand All @@ -165,8 +165,6 @@ Here is an example using PySide2
window = QMainWindow()

# setup stylesheet
app.setStyleSheet(qrainbowstyle.load_stylesheet_pyside2())
# or in new API
app.setStyleSheet(qrainbowstyle.load_stylesheet(qt_api='pyside2'))

# run
Expand All @@ -184,6 +182,7 @@ Available styles
Currently available styles are:

* Oceanic
* GBK
* QDarkStyle3
* QDarkstyle3Light
* LightOrange
Expand All @@ -204,15 +203,6 @@ In v0.6 I added a few new widgets which automatically load colors from current
stylesheet's palette.


GoogleMapsView
~~~~~~~~~~~~~~

GoogleMapsView allows to load Google Maps to application. Supports creating markers and polylines.
Call handler captures all map/markers/polylines actions such as map move or marker click/double click.

.. image:: https://raw.githubusercontent.com/desty2k/QRainbowStyleSheet/master/images/frameless_mainwindow_google_maps_example.png


StylePicker
~~~~~~~~~~~

Expand Down
44 changes: 23 additions & 21 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
import os
import sys

sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(1, os.path.abspath(os.path.join('..', 'scripts')))
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(1, os.path.abspath(os.path.join("..", "scripts")))

import qrainbowstyle

# -- Project information -----------------------------------------------------

project = 'QRainbowStyle'
copyright = '2021, Wojciech Wentland'
author = 'Wojciech Wentland'
project = "QRainbowStyle"
copyright = "2021, Wojciech Wentland"
author = "Wojciech Wentland"


# The version info for the project you're documenting, acts as replacement for
Expand All @@ -32,7 +32,7 @@
# The short X.Y version.
version = qrainbowstyle.__version__
# The full version, including alpha/beta/rc tags.
release = ''
release = ""

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand All @@ -46,39 +46,41 @@
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.todo',
'sphinx.ext.coverage',
'sphinx.ext.mathjax',
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode',
'sphinx.ext.githubpages',
'sphinx.ext.napoleon']
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.todo",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.ifconfig",
"sphinx.ext.viewcode",
"sphinx.ext.githubpages",
"sphinx.ext.napoleon",
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
source_suffix = ['.rst']
source_suffix = [".rst"]

# The master toctree document.
master_doc = 'index'
master_doc = "index"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = "sphinx"


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'
html_theme = "sphinx_rtd_theme"
8 changes: 8 additions & 0 deletions docs/example/FramelessWindowExample.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FramelessWindowExample module
=============================

.. automodule:: FramelessWindowExample
:members:
:undoc-members:
:show-inheritance:
:private-members:
8 changes: 8 additions & 0 deletions docs/example/FramelessWindowsMenuExample.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FramelessWindowsMenuExample module
==================================

.. automodule:: FramelessWindowsMenuExample
:members:
:undoc-members:
:show-inheritance:
:private-members:
8 changes: 8 additions & 0 deletions docs/example/QRoundProgressBarExample.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
QRoundProgressBarExample module
===============================

.. automodule:: QRoundProgressBarExample
:members:
:undoc-members:
:show-inheritance:
:private-members:
Loading