From 0f55d2ea13c5a59b41fb623c83c5157448b2ff02 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sat, 28 Dec 2024 15:53:44 +0100 Subject: [PATCH 1/9] Adjust alt text for Wble examples screenshot. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c84be47..8c9e18b 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ - [Widgets](#widgets) ## Examples screenshot -![Alt text](examples.png?raw=true "String filter not checkable") +![Alt text](examples.png?raw=true "Wble examples app screenshot") ## About project Library of useful Qt widgets. Created as a result of division of code of Volbx project and moving parts of it to independent library. Library contains: From 42668b87fd535741a878c20f602b8cd46ce97813 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sat, 28 Dec 2024 16:01:23 +0100 Subject: [PATCH 2/9] Correct the languages problems in READFME file. --- README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 8c9e18b..62ca9d3 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ ![Alt text](examples.png?raw=true "Wble examples app screenshot") ## About project - Library of useful Qt widgets. Created as a result of division of code of Volbx project and moving parts of it to independent library. Library contains: +Library of useful Qt widgets. Created as a result of the division of code of Volbx project and moving parts of it to an independent library. Library contains: + double slider + numeric filters (integer and double one) + string filter @@ -30,7 +30,7 @@ This section describes briefly how to setup the environment and build the project. ### Prerequisites -Qt in version 6.5 or greater, C++ compiler with C++17 support as a minimum and CMake 3.16+. +Qt in version 6.5 or greater, C++ compiler with C++17 support as a minimum, and CMake 3.16+. ### Building Clone and use CMake directly or via any IDE supporting it. CMake should: @@ -39,7 +39,7 @@ Clone and use CMake directly or via any IDE supporting it. CMake should: As a result of compilation, binary for simulations and binary for testing should be created. -**TIP**: remember to set properly `CMAKE_PREFIX_PATH` env variable. It should have Qt installation path to let CMake `find_package` command work. +**TIP**: Remember to set properly the `CMAKE_PREFIX_PATH` env variable. It should have a Qt installation path to let CMake `find_package` command work. ## Built with | Tool | Windows | Ubuntu | @@ -64,16 +64,16 @@ Each handle can be moved independently. Check also Integer and Double filters, w Each filter widget inherits from `QGroupBox`. It means all filters can be checkable or not. Use standard `setCheckable()` to alter behavior. #### Integer filter ![Alt text](IntegerFilter.png?raw=true "Integer filter not checkable") -Wrapped double slider into adjustable widget. Dedicated for integer values. +Wrapped double slider into an adjustable widget. Dedicated for integer values. #### Double filter ![Alt text](DoubleFilter.png?raw=true "Double filter not checkable") -Wrapped double slider into adjustable widget. Dedicated for double values. +Wrapped double slider into an adjustable widget. Dedicated for double values. #### Date filter ![Alt text](DateFilter.png?raw=true "Date filter not checkable") Widget allowing to pick custom date range. An additional "Ignore data with empty dates" check box can be used to filter out data entries with empty dates. #### String filter ![Alt text](StringFilter.png?raw=true "String filter not checkable") -Widget allowing to pick multiple string values as filtered set. Additional checkbox "Select/Unselect all" for quick unchecking / checking all string values in filter. +Widget allowing to pick multiple string values as filtered set. Additional checkbox "Select/Unselect all" for quick unchecking/checking all string values in filter. ### Progress bars Widgets capable of showing progress of longer tasks. Can be used as a blend in widget or modal one. #### Infinity progress bar @@ -81,10 +81,10 @@ Widgets capable of showing progress of longer tasks. Can be used as a blend in w Can be used for tasks with unknown end time. The progress bar displays moving arcs until it is stopped or destroyed. #### Counter progress bar ![Alt text](CounterProgressBar.png?raw=true "String filter not checkable") -Can be used for tasks with known end time. The progress bar displays arc, which is moving from 0 towards 100 percent. In the middle, current percent is displayed. +Can be used for tasks with a known end time. The progress bar displays an arc, which is moving from 0 toward 100 percent. In the middle, the current percent is displayed. ## Testing -For testing purposes, the QtTest framework is used. Build the project first. Make sure that the `wble-tests` target is built. Modern IDEs supporting CMake also support running tests with monitoring of failures. But in case you would like to run it manually, go to the `build/tests` directory, where the⁣ binary `wble-tests` should be available. Launching it should produce the following output on Linux: +For testing purposes, the Qt Test framework is used. Build the project first. Make sure that the `wble-tests` target is built. Modern IDEs supporting CMake also support running tests with monitoring of failures. But in case you would like to run it manually, go to the `build/tests` directory, where the⁣ binary `wble-tests` should be available. Launching it should produce the following output on Linux: Example run: ``` $ ./wble-tests From 18d150c2ed2887b9175b3fbd352f62e9608fa239 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sat, 28 Dec 2024 16:04:03 +0100 Subject: [PATCH 3/9] Replace table of contents with current one. --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62ca9d3..1b8d762 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,27 @@ [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=przemek83_wble&metric=coverage)](https://sonarcloud.io/summary/new_code?id=przemek83_wble) [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=przemek83_wble&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=przemek83_wble) -## Table of content +## Table of contents +- [Table of content](#table-of-content) +- [Examples screenshot](#examples-screenshot) - [About project](#about-project) -- [Building](#building) +- [Getting Started](#getting-started) + * [Prerequisites](#prerequisites) + * [Building](#building) +- [Built with](#built-with) - [Usage](#usage) - [Widgets](#widgets) + * [Double slider](#double-slider) + * [Filters](#filters) + + [Integer filter](#integer-filter) + + [Double filter](#double-filter) + + [Date filter](#date-filter) + + [String filter](#string-filter) + * [Progress bars](#progress-bars) + + [Infinity progress bar](#infinity-progress-bar) + + [Counter progress bar](#counter-progress-bar) +- [Testing](#testing) +- [Licensing](#licensing) ## Examples screenshot ![Alt text](examples.png?raw=true "Wble examples app screenshot") From d6b25d112bac44ae565f03a3ca02e6ea53e063bf Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sat, 28 Dec 2024 16:05:23 +0100 Subject: [PATCH 4/9] Remove table of contents from entry from table of contents. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 1b8d762..ed48862 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ [![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=przemek83_wble&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=przemek83_wble) ## Table of contents -- [Table of content](#table-of-content) - [Examples screenshot](#examples-screenshot) - [About project](#about-project) - [Getting Started](#getting-started) From 5b47d467c5e5fee3d8e9db49c60002d585c6a29f Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:18:40 +0100 Subject: [PATCH 5/9] Added "CMake integration" section to README file. --- README.md | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ed48862..92ccec9 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - [Getting Started](#getting-started) * [Prerequisites](#prerequisites) * [Building](#building) + * [CMake integration](#cmake-integration) - [Built with](#built-with) - [Usage](#usage) - [Widgets](#widgets) @@ -56,6 +57,26 @@ As a result of compilation, binary for simulations and binary for testing should **TIP**: Remember to set properly the `CMAKE_PREFIX_PATH` env variable. It should have a Qt installation path to let CMake `find_package` command work. +### CMake integration +Use `FetchContent` CMake module in your project: +``` +include(FetchContent) + +FetchContent_Declare( + wble + GIT_REPOSITORY https://github.com/przemek83/wble.git + GIT_TAG v1.2.0 +) + +FetchContent_MakeAvailable(wble) +``` +From that moment, wble library can be used in the `target_link_libraries` command: +``` +add_executable(${PROJECT_NAME} ${SOURCES}) +target_link_libraries(${PROJECT_NAME} shared wble) +``` +Check my other project `Volbx` for real world CMake integration. + ## Built with | Tool | Windows | Ubuntu | | --- | --- | --- | @@ -68,8 +89,7 @@ As a result of compilation, binary for simulations and binary for testing should | VS Code | 1.92.0 | 1.95.3 | ## Usage -The easiest way is to check examples subproject, where you can find how to create and interact with each widget included in this library. -Alternatively, tests subproject can be checked. Usage also can be found in my other project called Volbx where widgets from this library are used. +The easiest way is to check examples subproject, where you can find how to create and interact with each widget included in this library. Alternatively, tests subproject can be checked. Usage also can be found in my other project called `Volbx` where widgets from this library are used. ## Widgets ### Double slider From e0288f76ca46317d5db3e455436cd6ff759fea8b Mon Sep 17 00:00:00 2001 From: Przemek <4788832+przemek83@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:38:17 +0100 Subject: [PATCH 6/9] Update CMakeLists.txt --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9bb991..2df2c5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16) project(wble LANGUAGES CXX - VERSION 1.1.0 + VERSION 1.2.0 DESCRIPTION "Library of useful Qt widgets" HOMEPAGE_URL "https://github.com/przemek83/wble") From a8a310f0585eb9288e61430153f6c4fae31d88e9 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sun, 5 Jan 2025 14:48:25 +0100 Subject: [PATCH 7/9] Remove commented code. --- tests/ProgressBarCounterTest.cpp | 29 ----------------------------- tests/ProgressBarCounterTest.h | 6 ------ 2 files changed, 35 deletions(-) diff --git a/tests/ProgressBarCounterTest.cpp b/tests/ProgressBarCounterTest.cpp index dd86023..98cebfe 100644 --- a/tests/ProgressBarCounterTest.cpp +++ b/tests/ProgressBarCounterTest.cpp @@ -37,32 +37,3 @@ void ProgressBarCounterTest::testReseting() ProgressBarCounter progressBar(QString::fromLatin1(""), max_); ProgressBarCommon::checkReseting(progressBar); } - -// void ProgressBarCounterTest::checkInitialPaint() -// { -// ProgressBarCounter progressBar(QLatin1String("Initial"), max_); -// auto actual{progressBar.grab().toImage()}; -// QImage expected(":/res/counterInitial.png"); -// expected = expected.convertToFormat(actual.format()); -// QCOMPARE(actual, expected); -// } - -// void ProgressBarCounterTest::checkPaintAfterUpdate() -// { -// ProgressBarCounter progressBar(QLatin1String("Updated"), max_); -// progressBar.updateProgress(10); -// auto actual{progressBar.grab().toImage()}; -// QImage expected(":/res/counterUpdated.png"); -// expected = expected.convertToFormat(actual.format()); -// QCOMPARE(actual, expected); -// } - -// void ProgressBarCounterTest::checkPaintFinished() -// { -// ProgressBarCounter progressBar(QLatin1String("Finished"), max_); -// progressBar.updateProgress(100); -// auto actual{progressBar.grab().toImage()}; -// QImage expected(":/res/counterFinished.png"); -// expected = expected.convertToFormat(actual.format()); -// QCOMPARE(actual, expected); -// } diff --git a/tests/ProgressBarCounterTest.h b/tests/ProgressBarCounterTest.h index 1279a03..e9467d1 100644 --- a/tests/ProgressBarCounterTest.h +++ b/tests/ProgressBarCounterTest.h @@ -16,12 +16,6 @@ private Q_SLOTS: static void testReseting(); - // static void checkInitialPaint(); - - // static void checkPaintAfterUpdate(); - - // static void checkPaintFinished(); - private: static constexpr int max_{100}; }; From 1ba506ef30900247e7af381a43fd004bce3d8d23 Mon Sep 17 00:00:00 2001 From: przemek83 <4788832+przemek83@users.noreply.github.com> Date: Sun, 5 Jan 2025 15:08:09 +0100 Subject: [PATCH 8/9] Remove irreverent info from the "Built with" table. --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 92ccec9..0688b41 100644 --- a/README.md +++ b/README.md @@ -85,8 +85,6 @@ Check my other project `Volbx` for real world CMake integration. | CMake | 3.30.2 | 3.28.3 | | Git | 2.46.0 | 2.43.0 | | Qt | 6.5.2 | 6.5.2 | -| Qt Creator | 10.0.2 | 10.0.2 | -| VS Code | 1.92.0 | 1.95.3 | ## Usage The easiest way is to check examples subproject, where you can find how to create and interact with each widget included in this library. Alternatively, tests subproject can be checked. Usage also can be found in my other project called `Volbx` where widgets from this library are used. From 6e2fb7096e369853b4fd87c40a91c9ee7d810d8c Mon Sep 17 00:00:00 2001 From: Przemek <4788832+przemek83@users.noreply.github.com> Date: Sun, 5 Jan 2025 16:25:44 +0100 Subject: [PATCH 9/9] Update README.md Add appropriate code for CMake code. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0688b41..fa9863b 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ As a result of compilation, binary for simulations and binary for testing should ### CMake integration Use `FetchContent` CMake module in your project: -``` +```cmake include(FetchContent) FetchContent_Declare( @@ -71,7 +71,7 @@ FetchContent_Declare( FetchContent_MakeAvailable(wble) ``` From that moment, wble library can be used in the `target_link_libraries` command: -``` +```cmake add_executable(${PROJECT_NAME} ${SOURCES}) target_link_libraries(${PROJECT_NAME} shared wble) ```