- Notifications
You must be signed in to change notification settings - Fork3
Library of useful Qt widgets. Contains double slider, progress bars, integer, double, string and date filters.
License
przemek83/wble
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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
- date filter
- infinity progress bar
- counter progress bar
This section describes briefly how to setup the environment and build the project.
Qt in version 6.5 or greater, C++ compiler with C++17 support as a minimum, and CMake 3.16+.
Clone and use CMake directly or via any IDE supporting it. CMake should:
- configure everything automatically,
- compile and create binaries.
As a result of compilation, binary for simulations and binary for testing should be created.
TIP: Remember to set properly theCMAKE_PREFIX_PATH
env variable. It should have a Qt installation path to let CMakefind_package
command work.
UseFetchContent
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 thetarget_link_libraries
command:
add_executable(${PROJECT_NAME}${SOURCES})target_link_libraries(${PROJECT_NAME} shared wble)
Check my other projectVolbx
for real world CMake integration.
Windows | Windows | Ubuntu | |
---|---|---|---|
OS version | 10 22H2 | 10 22H2 | 24.04 |
compiler | GCC 13.1.0 | MSVC 19.29 | GCC 13.2.0 |
CMake | 3.30.2 | 3.30.2 | 3.28.3 |
Git | 2.46.0 | 2.46.0 | 2.43.0 |
Qt | 6.5.2 | 6.5.2 | 6.5.2 |
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 calledVolbx
where widgets from this library are used.
Each handle can be moved independently. Check also Integer and Double filters, which are wrapping double slider into handy adjustable widgets.
Each filter widget inherits fromQGroupBox
. It means all filters can be checkable or not. Use standardsetCheckable()
to alter behavior.
Wrapped double slider into an adjustable widget. Dedicated for integer values.
Wrapped double slider into an adjustable widget. Dedicated for double values.
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.
Widget allowing to pick multiple string values as filtered set. Additional checkbox "Select/Unselect all" for quick unchecking/checking all string values in filter.
Widgets capable of showing progress of longer tasks. Can be used as a blend in widget or modal one.
Can be used for tasks with unknown end time. The progress bar displays moving arcs until it is stopped or destroyed.
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.
For testing purposes, the Qt Test framework is used. Build the project first. Make sure that thewble-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 thebuild/tests
directory, where the binarywble-tests
should be available. Launching it should produce the following output on Linux:Example run:
$ ./wble-tests********* Start testing of DoubleSliderTest *********Config: Using QtTest library 6.5.2, Qt 6.5.2 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 10.3.1 20210422 (Red Hat 10.3.1-1)), ubuntu 24.04PASS : DoubleSliderTest::initTestCase()PASS : DoubleSliderTest::testSettingCurrentValues()PASS : DoubleSliderTest::testEmittingCurrentMinChanged()(...)PASS : UtilitiesTest::testGetSpanAngleCounterHalf()PASS : UtilitiesTest::testGetSpanAngleCounterFull()PASS : UtilitiesTest::cleanupTestCase()Totals: 10 passed, 0 failed, 0 skipped, 0 blacklisted, 0ms********* Finished testing of UtilitiesTest *********
As an alternative, CTest can be used to run tests from thebuild/tests
directory:
$ ctestTest project <path>/wble/build/tests Start 1: wble-tests1/1 Test #1: wble-tests ....................... Passed 0.11 sec100% tests passed, 0 tests failed out of 1Total Test time (real) = 0.11 sec
Wble library is published under a LGPL license.
The project uses the following software:
Name | License | Home | Description |
---|---|---|---|
Qt | LGPLv3 | https://www.qt.io/ | cross-platform application development framework |
About
Library of useful Qt widgets. Contains double slider, progress bars, integer, double, string and date filters.