Update to version 2.5.2

This commit is contained in:
Daniel Pizetta 2018-02-21 16:54:40 -03:00
parent 79c04d4e6f
commit 92f01c91d4
2 changed files with 24 additions and 17 deletions

View File

@ -1,10 +1,16 @@
# Changelog # Changelog
- 2.5.2:
- Modularize files from example/ui to simplify edition (developers)
- Add scripts to process files and run example more easiy (developers)
- Better documentation (developers)
- Add CONTRIBUTE, PRODUCTION files (developers)
- Lint markdown to standardize files
- 2.5.1: - 2.5.1:
- Fix travis files, needs more improvement #74 - Fix travis files, needs more improvement #74
- Improve modules description - Improve modules description
- Update setup.py, remove license - Update setup.py, remove license
- Improve README, CHANGES and AUTHORS - Update and improve README, CHANGES and AUTHORS
- 2.5: - 2.5:
- Add new complete example with new files - Add new complete example with new files
- Add new screenshots for new example - Add new screenshots for new example
@ -19,7 +25,7 @@
- Restructure README creating AUTHORS, CHANGES, and LICENSE #71 - Restructure README creating AUTHORS, CHANGES, and LICENSE #71
- 2.3.1: - 2.3.1:
- Improve checkbox color (use accent color used in other widgets) and - Improve checkbox color (use accent color used in other widgets) and
darken view hover/selected colors to play nicer with other widget colors darken view hover/selected colors to play nicer with other widget colors
- Shift to the right the first tab - Shift to the right the first tab
- Update license year - Update license year
- Update README (fix snapshots links and formatting) - Update README (fix snapshots links and formatting)
@ -41,7 +47,7 @@
- Add style for QPushButton:checked - Add style for QPushButton:checked
- Improve QCheckBox and QRadioButton style - Improve QCheckBox and QRadioButton style
- Add style for QMenu::right-arrow - Add style for QMenu::right-arrow
- 2.0: - **2.0**:
- Improve stylesheet to make it look a bit more modern (see pull request #25) - Improve stylesheet to make it look a bit more modern (see pull request #25)
- 1.16: - 1.16:
- Fix QGroupBox title padding (see issue #20) - Fix QGroupBox title padding (see issue #20)
@ -92,5 +98,5 @@
- 1.1: - 1.1:
- Switch to MIT license - Switch to MIT license
- Add python 3 support - Add python 3 support
- 1.0: - **1.0**:
- First public release (LGPL v2) - First public release (LGPL v2)

View File

@ -41,7 +41,6 @@ Finally, set your QApplication with it
Enjoy! Enjoy!
""" """
import logging import logging
@ -49,7 +48,7 @@ import platform
import os import os
__version__ = "2.5.1" __version__ = "2.5.2"
PYQTGRAPH_QT_LIB_VALUES = ['PyQt', 'PyQt5', 'PySide', 'PySide2'] PYQTGRAPH_QT_LIB_VALUES = ['PyQt', 'PyQt5', 'PySide', 'PySide2']
QT_API_VALUES = ['pyqt', 'pyqt5', 'pyside', 'pyside2'] QT_API_VALUES = ['pyqt', 'pyqt5', 'pyside', 'pyside2']
@ -89,9 +88,9 @@ def _qt_wrapper_import(qt_api):
qt_wrapper = 'PySide2' qt_wrapper = 'PySide2'
loader = load_stylesheet_pyside2() loader = load_stylesheet_pyside2()
except ImportError as err: except ImportError as err:
_logger().error("Impossible import Qt wrapper. " + str(err)) _logger().error("Impossible import Qt wrapper.\n %s", str(err))
else: else:
_logger().info("Using Qt wrapper = %s " % qt_wrapper) _logger().info("Using Qt wrapper = %s ", qt_wrapper)
finally: finally:
return loader return loader
@ -118,16 +117,17 @@ def load_stylesheet_from_environment(is_pyqtgraph=False):
# Log this error just if using QT_API # Log this error just if using QT_API
if not is_pyqtgraph: if not is_pyqtgraph:
_logger().error("QT_API does not exist, do os.environ['QT_API']= " _logger().error("QT_API does not exist, do os.environ['QT_API']= "
"and choose one option from %s" % QT_API_VALUES) "and choose one option from %s", QT_API_VALUES)
else: else:
if not is_pyqtgraph: if not is_pyqtgraph:
if qt_api in QT_API_VALUES: if qt_api in QT_API_VALUES:
_logger().info("Found QT_API='%s'" % qt_api) _logger().info("Found QT_API='%s'", qt_api)
loader = _qt_wrapper_import(qt_api) loader = _qt_wrapper_import(qt_api)
else: else:
# Raise this error because the function need this key/value # Raise this error because the function need this key/value
raise KeyError("QT_API=%s is unknown, please use a value " raise KeyError("QT_API=%s is unknown, please use a value "
"from %s" % (qt_api, QT_API_VALUES)) "from %s",
(qt_api, QT_API_VALUES))
# Get values from PYQTGRAPH_QT_LIB # Get values from PYQTGRAPH_QT_LIB
try: try:
@ -137,26 +137,27 @@ def load_stylesheet_from_environment(is_pyqtgraph=False):
if is_pyqtgraph: if is_pyqtgraph:
_logger().error("PYQTGRAP_QT_API does not exist, do " _logger().error("PYQTGRAP_QT_API does not exist, do "
"os.environ['PYQTGRAPH_QT_LIB']= " "os.environ['PYQTGRAPH_QT_LIB']= "
"and choose one option from %s" % "and choose one option from %s",
PYQTGRAPH_QT_LIB_VALUES) PYQTGRAPH_QT_LIB_VALUES)
else: else:
if is_pyqtgraph: if is_pyqtgraph:
if pyqtgraph_qt_lib in PYQTGRAPH_QT_LIB_VALUES: if pyqtgraph_qt_lib in PYQTGRAPH_QT_LIB_VALUES:
_logger().info("Found PYQTGRAPH_QT_LIB='%s'" % pyqtgraph_qt_lib) _logger().info("Found PYQTGRAPH_QT_LIB='%s'", pyqtgraph_qt_lib)
loader = _qt_wrapper_import(pyqtgraph_qt_lib) loader = _qt_wrapper_import(pyqtgraph_qt_lib)
else: else:
# Raise this error because the function need this key/value # Raise this error because the function need this key/value
raise KeyError("PYQTGRAPH_QT_LIB=%s is unknown, please use a " raise KeyError("PYQTGRAPH_QT_LIB=%s is unknown, please use a "
"value from %s" % (pyqtgraph_qt_lib, "value from %s", (
PYQTGRAPH_QT_LIB_VALUES)) pyqtgraph_qt_lib,
PYQTGRAPH_QT_LIB_VALUES))
# Just a warning if both are set but differs each other # Just a warning if both are set but differs each other
if qt_api and pyqtgraph_qt_lib: if qt_api and pyqtgraph_qt_lib:
if qt_api != pyqtgraph_qt_lib.lower(): if qt_api != pyqtgraph_qt_lib.lower():
_logger().warning("Both QT_API=%s and PYQTGRAPH_QT_LIB=%s are set, " _logger().warning("Both QT_API=%s and PYQTGRAPH_QT_LIB=%s are set, "
"but with different values, this could cause " "but with different values, this could cause "
"some issues if using them in the same project!" "some issues if using them in the same project!",
% (qt_api, pyqtgraph_qt_lib)) qt_api, pyqtgraph_qt_lib)
return loader return loader