https://github.com/jcelerier/magicitems
https://github.com/jcelerier/magicitems
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/jcelerier/magicitems
- Owner: jcelerier
- License: agpl-3.0
- Created: 2020-02-28T17:20:02.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-12-09T18:08:38.000Z (over 5 years ago)
- Last Synced: 2025-01-28T14:33:10.182Z (over 1 year ago)
- Language: C++
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# magicitems
A simple set of Qt / C++ classes that allow to create a debug UI for Qt apps.
Does nothing if -DNDEBUG is defined.
### Usage : in a paint() method
- Inherit from `MagicGraphicsItem`.
- `double x = magic("gain", 0.5, 0., 1.);` creates a slider with a value between 0. and 1.
- 0.5 will be the value used when the library is disabled.
### Usage : in a constructor
- Inherit from `MagicGraphicsItem`.
- `panPort->setPos(magic("panport", {3, 18}, {0, 0}, {15, 30}, [=] (auto p) { panPort->setPos(p); });`
- Same as before, `{3, 18}` will be the default position.