How to use the qdarkstyle.__version__ function in QDarkStyle

To help you get started, we’ve selected a few QDarkStyle examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenCobolIDE / OpenCobolIDE / open_cobol_ide / view / dialogs / report_bug.py View on Github external
def get_system_infos(self):
        try:
            import qdarkstyle
        except ImportError:
            qdarkstyle_version = 'Not installed'
        else:
            qdarkstyle_version = qdarkstyle.__version__

        def get_linux_distro():
            try:
                out = str(subprocess.check_output(['lsb_release', '-i']),
                          locale.getpreferredencoding())
            except OSError:
                distro = platform.linux_distribution()[0]
                if not distro:
                    distro = 'linux distribution not found'
            else:
                distro = out.split(':')[1].strip()
            return distro

        system_info = platform.system()
        if 'linux' in sys.platform.lower():
            system_info = get_linux_distro()
github OpenCobolIDE / OpenCobolIDE / open_cobol_ide / system.py View on Github external
def get_system_infos():
    from open_cobol_ide import __version__
    from open_cobol_ide.compilers import GnuCobolCompiler
    from pyqode.qt import QtCore
    import pyqode.core
    import pyqode.cobol
    import pygments

    try:
        import qdarkstyle
    except ImportError:
        qdarkstyle_version = 'Not installed'
    else:
        qdarkstyle_version = qdarkstyle.__version__

    def get_linux_distro():
        try:
            out = str(subprocess.check_output(['lsb_release', '-i']),
                      locale.getpreferredencoding())
        except OSError:
            distro = platform.linux_distribution()[0]
            if not distro:
                distro = 'linux distribution not found'
        else:
            distro = out.split(':')[1].strip()
        return distro

    system_info = platform.system()
    if 'linux' in sys.platform.lower():
        system_info = get_linux_distro()
github ColinDuquesnoy / QDarkStyleSheet / docs / conf.py View on Github external
#source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = 'QDarkStyle'
copyright = '2020, Colin Duquesnoy'
author = 'Colin Duquesnoy'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = qdarkstyle.__version__
# The full version, including alpha/beta/rc tags.
release = ''

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

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

# The name of the Pygments (syntax highlighting) style to use.
github ColinDuquesnoy / QDarkStyleSheet / script / get_info.py View on Github external
def get_info():
    """Process UI files."""
    info = []
    info.append('QDarkStyle: %s' % qdarkstyle.__version__)
    info.append('OS: %s' % sys.platform)
    info.append('Python: %s' % sys.version)
    info.append('QT_API: %s' % os.environ.get('QT_API', None))
    info.append('PYQTGRAPH_QT_LIB: %s' % os.environ.get('PYQTGRAPH_QT_LIB', None))
    for item in info:
        print(item)
github OpenCobolIDE / OpenCobolIDE / open_cobol_ide / view / dialogs / about.py View on Github external
def get_runtime_env():
        try:
            import qdarkstyle
        except ImportError:
            qdarkstyle_version = 'Not installed'
        else:
            qdarkstyle_version = qdarkstyle.__version__
        versions = {
            'GnuCOBOL': GnuCobolCompiler().get_version(include_all=False),
            'Qt': QtCore.QT_VERSION_STR,
            'PyQt': QtCore.PYQT_VERSION_STR,
            'pyqode.core': pyqode.core.__version__,
            'pyqode.cobol': pyqode.cobol.__version__,
            'pygments': pygments.__version__,
            'qdarkstyle': qdarkstyle_version}
        return versions
github ColinDuquesnoy / QDarkStyleSheet / qdarkstyle / __main__.py View on Github external
parser = argparse.ArgumentParser(description="QDarkStyle helper. Use the option --all to report bugs",
                                     formatter_class=argparse.RawDescriptionHelpFormatter)
    parser.add_argument('-i', '--information', action='store_true',
                        help="Show information about environment")
    parser.add_argument('-b', '--bindings', action='store_true',
                        help="Show available bindings for Qt")
    parser.add_argument('-a', '--abstractions', action='store_true',
                        help="Show available abstraction layers for Qt bindings")
    parser.add_argument('-d', '--dependencies', action='store_true',
                        help="Show information about dependencies")

    parser.add_argument('--all', action='store_true',
                        help="Show all information options at once")

    parser.add_argument('--version', '-v', action='version',
                        version='v{}'.format(qdarkstyle.__version__))

    # parsing arguments from command line
    args = parser.parse_args()
    no_args = not len(sys.argv) > 1
    info = {}

    if no_args:
        parser.print_help()

    if args.information or args.all:
        info.update(helpdev.check_os())
        info.update(helpdev.check_python())

    if args.bindings or args.all:
        info.update(helpdev.check_qt_bindings())
github OpenCobolIDE / OpenCobolIDE / oci / dialogs.py View on Github external
def __init__(self, parent=None):
        QtGui.QDialog.__init__(self, parent)
        dlg_about_ui.Ui_Dialog.__init__(self)
        self.setupUi(self)
        self.labelMain.setText(self.labelMain.text() % __version__)
        versions = [compiler.get_cobc_version(),
                    QtCore.QT_VERSION_STR,
                    QtCore.PYQT_VERSION_STR,
                    pyqode.core.__version__,
                    pyqode.widgets.__version__,
                    pygments.__version__,
                    qdarkstyle.__version__]
        for i, version in enumerate(versions):
            item = QtGui.QTableWidgetItem(version)
            self.tbwVersions.setItem(i, 0, item)
        self.textBrowser.setStyleSheet("color: red")
github OpenCobolIDE / OpenCobolIDE / oci_old / frontend / dialogs.py View on Github external
self.tbwVersions.setVerticalHeaderLabels([
            'OpenCobol',
            'Qt',
            'PyQt',
            'pyqode.core',
            'pygments',
            'QDarkStyle'
        ])
        self.tbwVersions.setHorizontalHeaderLabels(["Version"])
        self.labelMain.setText(self.labelMain.text() % __version__)
        versions = [compiler.get_cobc_version(),
                    QtCore.QT_VERSION_STR,
                    QtCore.PYQT_VERSION_STR,
                    pyqode.core.__version__,
                    pygments.__version__,
                    qdarkstyle.__version__]
        for i, version in enumerate(versions):
            item = QtWidgets.QTableWidgetItem(version)
            self.tbwVersions.setItem(i, 0, item)
        self.textBrowser.setStyleSheet("color: red")
github ColinDuquesnoy / QDarkStyleSheet / setup.py View on Github external
# Local imports
from qdarkstyle import __doc__ as long_desc
from qdarkstyle import __version__

install_requires = ['helpdev>=0.6.10', 'qtpy>=1.9']

extras_require = {
    'develop': ['qtsass', 'watchdog'],
    'docs': ['sphinx', 'sphinx_rtd_theme'],
    'example': ['pyqt5', 'pyside2']
}

setup(
    name='QDarkStyle',
    version=__version__,
    packages=find_packages(),
    url='https://github.com/ColinDuquesnoy/QDarkStyleSheet',
    license='MIT',
    author='Colin Duquesnoy',
    author_email='colin.duquesnoy@gmail.com',
    description='The most complete dark stylesheet for Python and Qt applications',
    long_description=long_desc,
    classifiers=[
        'Development Status :: 5 - Production/Stable',
        'Environment :: X11 Applications :: Qt',
        'Environment :: Win32 (MS Windows)',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Operating System :: Microsoft :: Windows',
        'Operating System :: POSIX :: Linux',
        'Operating System :: MacOS',
github ColinDuquesnoy / QDarkStyleSheet / example / example.py View on Github external
style = ''

    if not args.no_dark:
        style = qdarkstyle.load_stylesheet()

    app.setStyleSheet(style)

    # create main window
    window = QMainWindow()
    window.setObjectName('mainwindow')

    ui = ui_main()
    ui.setupUi(window)

    title = ("QDarkStyle Example - "
             + "(QDarkStyle=v" + qdarkstyle.__version__
             + ", QtPy=v" + QTPY_VERSION
             + ", " + API_NAME + "=v" + API_VERSION
             + ", Qt=v" + QT_VERSION
             + ", Python=v" + platform.python_version() + ")")

    _logger.info(title)

    window.setWindowTitle(title)

    # Create docks for buttons
    dw_buttons = QDockWidget()
    dw_buttons.setObjectName('buttons')
    ui_buttons = ui_buttons()
    ui_buttons.setupUi(dw_buttons)
    window.addDockWidget(Qt.RightDockWidgetArea, dw_buttons)