Skip to content

Commit

Permalink
Merge pull request #112 from Alexhuszagh/docs
Browse files Browse the repository at this point in the history
Add documentation for examples and additional enhancements.

- Document the titlebar, custom styles, and other examples.
- Document custom widget overrides like sliders, dials, and LCD numbers.
- Convert the Qt5 refs to Qt6.
- Add in better links to examples in the README.
- Add a changelog.
- Make our custom widgets, like titlebars and sliders, to use a general-purpose class and then reusable components.
- Ensure we use a shallow clone for our CMake builds.
  • Loading branch information
Alexhuszagh authored Sep 8, 2024
2 parents 13826e0 + e8c2378 commit 56c7ecd
Show file tree
Hide file tree
Showing 41 changed files with 1,350 additions and 837 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ trim_trailing_whitespace = true
[*.{cpp,hpp,sh,in,svg,qss,txt,cmake,py,json}]
charset = utf-8

[*.md]
indent_size = 2

[{package.json,.github/workflows/*.yml}]
indent_style = space
indent_size = 2
152 changes: 76 additions & 76 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
name: Linters

on: [push, pull_request]

jobs:
lint-version-python:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-os-python:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-cpp:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-tidy
- name: Analysing the code with clang-tidy
shell: bash
run: |
set -eux pipefail
# Windows oddly requires C++20 support due to internal bugs.
if [[ "${RUNNER_OS}" == "Windows" ]]; then
extra_args="-extra-arg=-std=c++20"
passthrough=""
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
# NOTE: The search paths aren't added by default, and we need C then C++ by default
# for our search. This makes the process easier.
extra_args="-extra-arg=-std=c++17 -extra-arg=--stdlib=libc++"
location="$(xcrun --show-sdk-path)"
passthrough="-I${location}/usr/include/c++/v1 -I${location}/usr/include"
else
extra_args="-extra-arg=-std=c++17"
passthrough=""
fi
clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* ${extra_args} example/breeze_theme.hpp -- ${passthrough}
name: Linters

on: [push, pull_request]

jobs:
lint-version-python:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-os-python:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pylint flake8 pyright
- name: Analysing the code with pylint
run: |
scripts/lint.sh
lint-cpp:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install clang-tidy
- name: Analysing the code with clang-tidy
shell: bash
run: |
set -eux pipefail
# Windows oddly requires C++20 support due to internal bugs.
if [[ "${RUNNER_OS}" == "Windows" ]]; then
extra_args="-extra-arg=-std=c++20"
passthrough=""
elif [[ "${RUNNER_OS}" == "macOS" ]]; then
# NOTE: The search paths aren't added by default, and we need C then C++ by default
# for our search. This makes the process easier.
extra_args="-extra-arg=-std=c++17 -extra-arg=--stdlib=libc++"
location="$(xcrun --show-sdk-path)"
passthrough="-I${location}/usr/include/c++/v1 -I${location}/usr/include"
else
extra_args="-extra-arg=-std=c++17"
passthrough=""
fi
clang-tidy -checks=-*,clang-analyzer-*,-clang-analyzer-cplusplus* ${extra_args} example/detect/system_theme.hpp -- ${passthrough}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# NOTE: this file is auto-generated via `git.py`
# NOTE: this file is auto-generated via `vcs.py`
# DO NOT MANUALLY EDIT THIS FILE.
TODO.md
dist/
Expand Down
68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].

## [Unreleased]

### Added

- Detection of system theme (light or dark mode).
- Support for PySide2 and PySide6 frameworks (from [Inverted-E]).
- Support for flat groupboxes.
- Advanced Docking System styling.
- Examples for title bars, standard icon overrides, LCD displays, and more.
- Configurable stylesheets via themes.
- Custom extension support, such as the advanced docking system.
- Compile Qt resource files (from [chaosink]).
- Documented support for CMake builds (from [ruilvo]).
- Add additional alternate themes for common styles (from [Inverted-E]).
- Add additional a red theme (from [Inverted-E]).

### Changed

- Stylesheets to match KDE-like Breeze and Breeze dark themes.
- Icons to match KDE-like Breeze and Breeze dark themes.
- Make `dark` and `light` aliases for `dark-blue` and `light-blue`, respectively.

### Deprecated

### Removed

- Old PyQt6 packaging system to match the standard Qt5 and Qt6 approach using resource compilers (from [Inverted-E]).
- The `--no-qrc` flag when configuring stylesheets due to the new RCC system (from [Inverted-E]).
- The QRC dist files due to the new RCC system (from [Inverted-E]).

### Fixed

- Documentation for CMake installation.
- QTableWidget::indicator size to match other checkboxes (from [Inverted-E]).
- Menu bar hover styling.
- Qt6 support.
- Branch indicators for QTreeView and QTreeWidget (from [eblade]).

<!-- Unused Sections -->
<!-- ### Security -->

<!-- Initial release
## [0.0.1] - 2024-09-08
- Initial release
-->

<!-- Links -->
[Keep A Changelog]: https://keepachangelog.com/en/1.0.0/
[Semantic Versioning]: https://semver.org/spec/v2.0.0.html

<!-- Versions -->
[Unreleased]: https://github.com/Author/Repository/compare/v0.0.2...HEAD
<!-- [0.0.1]: https://github.com/Author/Repository/releases/tag/v0.0.1 -->

<!-- Contributors -->
[Inverted-E]: https://github.com/Inverted-E/
[eblade]: https://github.com/eblade/
[chaosink]: https://github.com/chaosink/
[ruilvo]: https://github.com/ruilvo/
Loading

0 comments on commit 56c7ecd

Please sign in to comment.