qskinny/playground/plots/QskPlotViewSkinlet.cpp

280 lines
7.9 KiB
C++
Raw Normal View History

2023-11-28 12:36:47 +00:00
/******************************************************************************
2024-01-17 13:31:45 +00:00
* QSkinny - Copyright (C) The authors
2023-11-28 12:36:47 +00:00
* SPDX-License-Identifier: BSD-3-Clause
*****************************************************************************/
#include "QskPlotViewSkinlet.h"
#include "QskPlotView.h"
#include <QskGraduationRenderer.h>
2023-11-28 13:35:28 +00:00
#include <QskGraduationMetrics.h>
2023-11-28 12:36:47 +00:00
#include <QskTickmarks.h>
#include <QskTextColors.h>
#include <QskFunctions.h>
#include <QskSGNode.h>
#include <QskBoxBorderMetrics.h>
2024-02-19 14:51:55 +00:00
#include <QskFontRole.h>
2023-11-28 12:36:47 +00:00
static inline QskTextColors qskTextColors(
const QskSkinnable* skinnable, QskAspect aspect )
{
using A = QskAspect;
QskSkinHintStatus status;
Squashed commit of the following: commit c331fd601a727ca0c616f320a0d35577c3689352 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 12:17:51 2024 +0100 use enums for class members commit 0d86454774aa440af1d403f9d8f6dc6f843eafbe Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 11:27:16 2024 +0100 elide mode for QskTextField::PlaceholderText added commit 0038f6d3b34d3a8c9229532f33125035922ac15c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 16:03:55 2024 +0100 more enums specified commit 5d959133663226f3fc04c0f708d4cf1f82969833 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:56:49 2024 +0100 QskSizePolicy enums specified commit 4220edc7ca741483f7be44748aa0cfb6e26e545b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:46:43 2024 +0100 don't use enum bitfields for unspecied enums commit 36f502b57ab19deca67702c7e5dfafa2f3edcca9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:43:57 2024 +0100 QskItem::UpdateFlags sepcified commit 23beda3c2868f3d23560c4dadc6f0a9703475d40 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:39:06 2024 +0100 more enum types specified commit 08495715231243e3e6f00a2fa83a1ed57894863b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:21:37 2024 +0100 enum types specified commit d53579f3d9e74657b7d3c567842917e7055b2c50 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:04:37 2024 +0100 enum types specified commit 4e6ee36420dfffb5ba00dce37807e50694ea31c9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 14:53:59 2024 +0100 NodeRole enums qualified as quint8 commit 3a83f5fa2c29c4da1dd3fab44823c12927346fd8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 13:29:03 2024 +0100 compiler errors fixed commit d1fa0207fa12eb4a47d8ffc895ade75f23895ccd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:10:10 2024 +0100 Markdown format added commit 66d97831b50af569036ccd2bc40fddd0b6b1de48 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:01:16 2024 +0100 QskTextColors is a Q_GADGET now commit 4ad28e6076ad5ab297ddfbc836f76a2844820499 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 10:04:33 2024 +0100 don't show the placeholder when text is not empty commit b6f20038265661cc6fe8a3f199d8ce5d79beda75 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Dec 4 10:08:39 2024 +0100 QskTextFieldSkinlet::sizeHint added commit f0d53322aaa98ff818fc84aa2d02a7e34603febd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 17:52:39 2024 +0100 gallery updated, dummy TextFieldSkinlets introduced commit e86378a0725b8a3dd74cf52727df4309ef2f151a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 13:33:17 2024 +0100 fusion skin improved commit 4540cc1e4e21fea77d80343b3f4c27f9386b7c3e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 10:06:26 2024 +0100 QskTextFieldSkinlet::Selected state introduced commit 77e556fad27cd133c40103205a8b3ac35b273cb7 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 09:32:39 2024 +0100 QskTextField::placeholderText introduced, QskTextField::description removed commit 77739d773474306c00ec2fce67f8d2ba11a63f2b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 07:44:44 2024 +0100 skin hint table size reduced commit 108aa23397265749216909d2a48bdf7111f7fb9c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 2 12:54:31 2024 +0100 QskTextInput renamed to QskTextField ( term used by F2/M3 and QC2 ) commit b0864965a804a514525d53986e8425444b2ca5ff Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Sun Dec 1 11:06:51 2024 +0100 Material3 adjustements for progress bars commit d18017ca90b93c8c366ad6b755699bc40c42ad62 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 13:55:30 2024 +0100 QskProgressRing fixed + M3 updates commit a58d6dd5896b2c9e92a959668f452e50c733e385 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 09:42:01 2024 +0100 QskProgressIndicator::hasOrigin(), QskSlider::hasOrigin added commit 12dfac153d473040ab98eec7bd9178897347b0e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 16:06:00 2024 +0100 QskSlider::inverted introduced commit db1e9a7e44aa045e05948dba354e40d96cc83b92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:59:59 2024 +0100 key handling of bounded inputs improved commit d9a66e4a98407d72b9a078ea0b8a99af6aadf009 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:55:57 2024 +0100 QskSlider API cleanup commit 9d13cd1edf8608fea7e1b7f43e732ac1d30f7447 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:47:20 2024 +0100 subcontrol renamed from Knob to Handle commit 7a180cfe5e9fefe1f69da84b46c34d9cf2ca4dca Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 12:00:46 2024 +0100 the corrected mouse/touch handling works without extending the handle selection area handle selection commit 66085ea41f0c708f5f3e7dfd62365493c4f2ac7b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:27:57 2024 +0100 QskSlider::origin implemented commit e2c76aa121653f82758100464e23b0443086a254 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:24:55 2024 +0100 QskSlider ticks implementaton completed commit 77731954eb081416928fa4f998f2f23318a4ba92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:59:42 2024 +0100 slider changes on press commit 59b88ffd7c5502ee50c657feac366226b2bd8900 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:57:13 2024 +0100 slider layout code fixed commit cd65adb4518d8f22d570d83cb3211a57ada35aef Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:48:55 2024 +0100 QskSkinnable::metric with default value commit ea3d7a5e699bd813d16528fb3b81d69b30f0737d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 25 09:02:04 2024 +0100 QskInterval::center(), QskInterval::stretch removed as they the implementation is only handling normalized intervals commit 494c370e61bcb418c97426116bffa0bab501c6d4 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:38:58 2024 +0100 ticks for F2 sliders commit f4c2211f2c196b6662fdc023578e1498805f3377 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:37:47 2024 +0100 API extended commit 5c1e0ccad485fc81a3fa0b9576333fcefd7bdfdc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 19:19:53 2024 +0100 invalid constexpr qualifier removed commit 9a5dd886ed2445606dc7887e7d7024a588a967aa Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:54 2024 +0100 slider ticks - not only for M3 commit d04c0309248b72088d7099cbcd86140739b15885 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:37 2024 +0100 using constexpr commit d87c8e3d0b4b579aa0a67c173833c4a7ea28af0a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 13:54:01 2024 +0100 API cleanup of the Bounded controls commit 109fc7d7f48420662b5ca9bed548444dce83e055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 14:57:16 2024 +0100 QskBoxClipNode renamed to QskClipNode + more clip options added commit 1e383406e213fc3f129729760da3960b16d2e827 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 11:00:17 2024 +0100 M3 specific definitions moved to M3 classes commit 97e3ea6e1f10a804cb1b4c926ff9f3506f20df3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:44:06 2024 +0100 Qt5 incompatibility fixed commit 00f2112817e1a07cb37ab3e4e421393716a37fc6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:15:50 2024 +0100 QskMaterial3SliderSkinlet introduced commit 9fc7b1f677f2983d304dfedabd6499214f60fc31 Author: Peter Hartmann <peter@edelhirsch.io> Date: Mon Nov 18 12:18:30 2024 +0100 push buttons: Style checked state properly (#477) Resolves #367 commit b5c56f7f8043391d1236eefcf4510d54d9aee4a2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:52:08 2024 +0100 mismatch between allocated and used memory fixed commit d1c2751a8e40e32e1ed45663b3ea42e4621b3960 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:51:53 2024 +0100 nullptr check added commit 8dd5a7b249edfa269a048496d9b6577297933fc2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 08:52:40 2024 +0100 dangling reference fixed commit baaccb2f414b28f647f50c05081418415c6fd295 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 07:43:34 2024 +0100 avoid enum bitfields commit 7f389ef6cca50800fadc19c35ae951213989418b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 13 14:11:11 2024 +0100 don't subtract the slider margins twice commit d84ab6e387163cc2da6c4d3e6a2ab623a324e727 Author: Peter Hartmann <peter@edelhirsch.io> Date: Wed Nov 13 10:00:38 2024 +0100 Update instructions on how to build the website (#470) * Regenerate doxygen file ... and change some things * Add custom stylesheet from Skia * update instructions on how to build the website commit 525ca3bd0e66dc864b5d21e37d8dd7f95cb060f3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 7 17:31:14 2024 +0100 QskSlider: Adapt to new Material3 style ( ValueLabel a.k.a Tooltip is not done yet )
2024-12-10 13:41:17 +00:00
auto textColor = skinnable->color( aspect | A::TextColor, &status );
2023-11-28 12:36:47 +00:00
if ( status.aspect.subControl() != aspect.subControl() )
{
// using the same color as the one for the ticks
Squashed commit of the following: commit c331fd601a727ca0c616f320a0d35577c3689352 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 12:17:51 2024 +0100 use enums for class members commit 0d86454774aa440af1d403f9d8f6dc6f843eafbe Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 11:27:16 2024 +0100 elide mode for QskTextField::PlaceholderText added commit 0038f6d3b34d3a8c9229532f33125035922ac15c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 16:03:55 2024 +0100 more enums specified commit 5d959133663226f3fc04c0f708d4cf1f82969833 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:56:49 2024 +0100 QskSizePolicy enums specified commit 4220edc7ca741483f7be44748aa0cfb6e26e545b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:46:43 2024 +0100 don't use enum bitfields for unspecied enums commit 36f502b57ab19deca67702c7e5dfafa2f3edcca9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:43:57 2024 +0100 QskItem::UpdateFlags sepcified commit 23beda3c2868f3d23560c4dadc6f0a9703475d40 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:39:06 2024 +0100 more enum types specified commit 08495715231243e3e6f00a2fa83a1ed57894863b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:21:37 2024 +0100 enum types specified commit d53579f3d9e74657b7d3c567842917e7055b2c50 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:04:37 2024 +0100 enum types specified commit 4e6ee36420dfffb5ba00dce37807e50694ea31c9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 14:53:59 2024 +0100 NodeRole enums qualified as quint8 commit 3a83f5fa2c29c4da1dd3fab44823c12927346fd8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 13:29:03 2024 +0100 compiler errors fixed commit d1fa0207fa12eb4a47d8ffc895ade75f23895ccd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:10:10 2024 +0100 Markdown format added commit 66d97831b50af569036ccd2bc40fddd0b6b1de48 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:01:16 2024 +0100 QskTextColors is a Q_GADGET now commit 4ad28e6076ad5ab297ddfbc836f76a2844820499 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 10:04:33 2024 +0100 don't show the placeholder when text is not empty commit b6f20038265661cc6fe8a3f199d8ce5d79beda75 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Dec 4 10:08:39 2024 +0100 QskTextFieldSkinlet::sizeHint added commit f0d53322aaa98ff818fc84aa2d02a7e34603febd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 17:52:39 2024 +0100 gallery updated, dummy TextFieldSkinlets introduced commit e86378a0725b8a3dd74cf52727df4309ef2f151a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 13:33:17 2024 +0100 fusion skin improved commit 4540cc1e4e21fea77d80343b3f4c27f9386b7c3e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 10:06:26 2024 +0100 QskTextFieldSkinlet::Selected state introduced commit 77e556fad27cd133c40103205a8b3ac35b273cb7 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 09:32:39 2024 +0100 QskTextField::placeholderText introduced, QskTextField::description removed commit 77739d773474306c00ec2fce67f8d2ba11a63f2b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 07:44:44 2024 +0100 skin hint table size reduced commit 108aa23397265749216909d2a48bdf7111f7fb9c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 2 12:54:31 2024 +0100 QskTextInput renamed to QskTextField ( term used by F2/M3 and QC2 ) commit b0864965a804a514525d53986e8425444b2ca5ff Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Sun Dec 1 11:06:51 2024 +0100 Material3 adjustements for progress bars commit d18017ca90b93c8c366ad6b755699bc40c42ad62 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 13:55:30 2024 +0100 QskProgressRing fixed + M3 updates commit a58d6dd5896b2c9e92a959668f452e50c733e385 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 09:42:01 2024 +0100 QskProgressIndicator::hasOrigin(), QskSlider::hasOrigin added commit 12dfac153d473040ab98eec7bd9178897347b0e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 16:06:00 2024 +0100 QskSlider::inverted introduced commit db1e9a7e44aa045e05948dba354e40d96cc83b92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:59:59 2024 +0100 key handling of bounded inputs improved commit d9a66e4a98407d72b9a078ea0b8a99af6aadf009 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:55:57 2024 +0100 QskSlider API cleanup commit 9d13cd1edf8608fea7e1b7f43e732ac1d30f7447 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:47:20 2024 +0100 subcontrol renamed from Knob to Handle commit 7a180cfe5e9fefe1f69da84b46c34d9cf2ca4dca Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 12:00:46 2024 +0100 the corrected mouse/touch handling works without extending the handle selection area handle selection commit 66085ea41f0c708f5f3e7dfd62365493c4f2ac7b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:27:57 2024 +0100 QskSlider::origin implemented commit e2c76aa121653f82758100464e23b0443086a254 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:24:55 2024 +0100 QskSlider ticks implementaton completed commit 77731954eb081416928fa4f998f2f23318a4ba92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:59:42 2024 +0100 slider changes on press commit 59b88ffd7c5502ee50c657feac366226b2bd8900 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:57:13 2024 +0100 slider layout code fixed commit cd65adb4518d8f22d570d83cb3211a57ada35aef Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:48:55 2024 +0100 QskSkinnable::metric with default value commit ea3d7a5e699bd813d16528fb3b81d69b30f0737d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 25 09:02:04 2024 +0100 QskInterval::center(), QskInterval::stretch removed as they the implementation is only handling normalized intervals commit 494c370e61bcb418c97426116bffa0bab501c6d4 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:38:58 2024 +0100 ticks for F2 sliders commit f4c2211f2c196b6662fdc023578e1498805f3377 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:37:47 2024 +0100 API extended commit 5c1e0ccad485fc81a3fa0b9576333fcefd7bdfdc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 19:19:53 2024 +0100 invalid constexpr qualifier removed commit 9a5dd886ed2445606dc7887e7d7024a588a967aa Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:54 2024 +0100 slider ticks - not only for M3 commit d04c0309248b72088d7099cbcd86140739b15885 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:37 2024 +0100 using constexpr commit d87c8e3d0b4b579aa0a67c173833c4a7ea28af0a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 13:54:01 2024 +0100 API cleanup of the Bounded controls commit 109fc7d7f48420662b5ca9bed548444dce83e055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 14:57:16 2024 +0100 QskBoxClipNode renamed to QskClipNode + more clip options added commit 1e383406e213fc3f129729760da3960b16d2e827 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 11:00:17 2024 +0100 M3 specific definitions moved to M3 classes commit 97e3ea6e1f10a804cb1b4c926ff9f3506f20df3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:44:06 2024 +0100 Qt5 incompatibility fixed commit 00f2112817e1a07cb37ab3e4e421393716a37fc6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:15:50 2024 +0100 QskMaterial3SliderSkinlet introduced commit 9fc7b1f677f2983d304dfedabd6499214f60fc31 Author: Peter Hartmann <peter@edelhirsch.io> Date: Mon Nov 18 12:18:30 2024 +0100 push buttons: Style checked state properly (#477) Resolves #367 commit b5c56f7f8043391d1236eefcf4510d54d9aee4a2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:52:08 2024 +0100 mismatch between allocated and used memory fixed commit d1c2751a8e40e32e1ed45663b3ea42e4621b3960 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:51:53 2024 +0100 nullptr check added commit 8dd5a7b249edfa269a048496d9b6577297933fc2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 08:52:40 2024 +0100 dangling reference fixed commit baaccb2f414b28f647f50c05081418415c6fd295 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 07:43:34 2024 +0100 avoid enum bitfields commit 7f389ef6cca50800fadc19c35ae951213989418b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 13 14:11:11 2024 +0100 don't subtract the slider margins twice commit d84ab6e387163cc2da6c4d3e6a2ab623a324e727 Author: Peter Hartmann <peter@edelhirsch.io> Date: Wed Nov 13 10:00:38 2024 +0100 Update instructions on how to build the website (#470) * Regenerate doxygen file ... and change some things * Add custom stylesheet from Skia * update instructions on how to build the website commit 525ca3bd0e66dc864b5d21e37d8dd7f95cb060f3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 7 17:31:14 2024 +0100 QskSlider: Adapt to new Material3 style ( ValueLabel a.k.a Tooltip is not done yet )
2024-12-10 13:41:17 +00:00
textColor = skinnable->color( aspect );
2023-11-28 12:36:47 +00:00
}
Squashed commit of the following: commit c331fd601a727ca0c616f320a0d35577c3689352 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 12:17:51 2024 +0100 use enums for class members commit 0d86454774aa440af1d403f9d8f6dc6f843eafbe Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 10 11:27:16 2024 +0100 elide mode for QskTextField::PlaceholderText added commit 0038f6d3b34d3a8c9229532f33125035922ac15c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 16:03:55 2024 +0100 more enums specified commit 5d959133663226f3fc04c0f708d4cf1f82969833 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:56:49 2024 +0100 QskSizePolicy enums specified commit 4220edc7ca741483f7be44748aa0cfb6e26e545b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:46:43 2024 +0100 don't use enum bitfields for unspecied enums commit 36f502b57ab19deca67702c7e5dfafa2f3edcca9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:43:57 2024 +0100 QskItem::UpdateFlags sepcified commit 23beda3c2868f3d23560c4dadc6f0a9703475d40 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:39:06 2024 +0100 more enum types specified commit 08495715231243e3e6f00a2fa83a1ed57894863b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:21:37 2024 +0100 enum types specified commit d53579f3d9e74657b7d3c567842917e7055b2c50 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 15:04:37 2024 +0100 enum types specified commit 4e6ee36420dfffb5ba00dce37807e50694ea31c9 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 14:53:59 2024 +0100 NodeRole enums qualified as quint8 commit 3a83f5fa2c29c4da1dd3fab44823c12927346fd8 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 13:29:03 2024 +0100 compiler errors fixed commit d1fa0207fa12eb4a47d8ffc895ade75f23895ccd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:10:10 2024 +0100 Markdown format added commit 66d97831b50af569036ccd2bc40fddd0b6b1de48 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 12:01:16 2024 +0100 QskTextColors is a Q_GADGET now commit 4ad28e6076ad5ab297ddfbc836f76a2844820499 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 9 10:04:33 2024 +0100 don't show the placeholder when text is not empty commit b6f20038265661cc6fe8a3f199d8ce5d79beda75 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Dec 4 10:08:39 2024 +0100 QskTextFieldSkinlet::sizeHint added commit f0d53322aaa98ff818fc84aa2d02a7e34603febd Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 17:52:39 2024 +0100 gallery updated, dummy TextFieldSkinlets introduced commit e86378a0725b8a3dd74cf52727df4309ef2f151a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 13:33:17 2024 +0100 fusion skin improved commit 4540cc1e4e21fea77d80343b3f4c27f9386b7c3e Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 10:06:26 2024 +0100 QskTextFieldSkinlet::Selected state introduced commit 77e556fad27cd133c40103205a8b3ac35b273cb7 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 09:32:39 2024 +0100 QskTextField::placeholderText introduced, QskTextField::description removed commit 77739d773474306c00ec2fce67f8d2ba11a63f2b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Dec 3 07:44:44 2024 +0100 skin hint table size reduced commit 108aa23397265749216909d2a48bdf7111f7fb9c Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Dec 2 12:54:31 2024 +0100 QskTextInput renamed to QskTextField ( term used by F2/M3 and QC2 ) commit b0864965a804a514525d53986e8425444b2ca5ff Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Sun Dec 1 11:06:51 2024 +0100 Material3 adjustements for progress bars commit d18017ca90b93c8c366ad6b755699bc40c42ad62 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 13:55:30 2024 +0100 QskProgressRing fixed + M3 updates commit a58d6dd5896b2c9e92a959668f452e50c733e385 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 29 09:42:01 2024 +0100 QskProgressIndicator::hasOrigin(), QskSlider::hasOrigin added commit 12dfac153d473040ab98eec7bd9178897347b0e0 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 16:06:00 2024 +0100 QskSlider::inverted introduced commit db1e9a7e44aa045e05948dba354e40d96cc83b92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:59:59 2024 +0100 key handling of bounded inputs improved commit d9a66e4a98407d72b9a078ea0b8a99af6aadf009 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:55:57 2024 +0100 QskSlider API cleanup commit 9d13cd1edf8608fea7e1b7f43e732ac1d30f7447 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 15:47:20 2024 +0100 subcontrol renamed from Knob to Handle commit 7a180cfe5e9fefe1f69da84b46c34d9cf2ca4dca Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 28 12:00:46 2024 +0100 the corrected mouse/touch handling works without extending the handle selection area handle selection commit 66085ea41f0c708f5f3e7dfd62365493c4f2ac7b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:27:57 2024 +0100 QskSlider::origin implemented commit e2c76aa121653f82758100464e23b0443086a254 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 27 16:24:55 2024 +0100 QskSlider ticks implementaton completed commit 77731954eb081416928fa4f998f2f23318a4ba92 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:59:42 2024 +0100 slider changes on press commit 59b88ffd7c5502ee50c657feac366226b2bd8900 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:57:13 2024 +0100 slider layout code fixed commit cd65adb4518d8f22d570d83cb3211a57ada35aef Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Tue Nov 26 13:48:55 2024 +0100 QskSkinnable::metric with default value commit ea3d7a5e699bd813d16528fb3b81d69b30f0737d Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 25 09:02:04 2024 +0100 QskInterval::center(), QskInterval::stretch removed as they the implementation is only handling normalized intervals commit 494c370e61bcb418c97426116bffa0bab501c6d4 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:38:58 2024 +0100 ticks for F2 sliders commit f4c2211f2c196b6662fdc023578e1498805f3377 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Fri Nov 22 17:37:47 2024 +0100 API extended commit 5c1e0ccad485fc81a3fa0b9576333fcefd7bdfdc Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 19:19:53 2024 +0100 invalid constexpr qualifier removed commit 9a5dd886ed2445606dc7887e7d7024a588a967aa Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:54 2024 +0100 slider ticks - not only for M3 commit d04c0309248b72088d7099cbcd86140739b15885 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 17:59:37 2024 +0100 using constexpr commit d87c8e3d0b4b579aa0a67c173833c4a7ea28af0a Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 21 13:54:01 2024 +0100 API cleanup of the Bounded controls commit 109fc7d7f48420662b5ca9bed548444dce83e055 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 14:57:16 2024 +0100 QskBoxClipNode renamed to QskClipNode + more clip options added commit 1e383406e213fc3f129729760da3960b16d2e827 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 20 11:00:17 2024 +0100 M3 specific definitions moved to M3 classes commit 97e3ea6e1f10a804cb1b4c926ff9f3506f20df3b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:44:06 2024 +0100 Qt5 incompatibility fixed commit 00f2112817e1a07cb37ab3e4e421393716a37fc6 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Mon Nov 18 16:15:50 2024 +0100 QskMaterial3SliderSkinlet introduced commit 9fc7b1f677f2983d304dfedabd6499214f60fc31 Author: Peter Hartmann <peter@edelhirsch.io> Date: Mon Nov 18 12:18:30 2024 +0100 push buttons: Style checked state properly (#477) Resolves #367 commit b5c56f7f8043391d1236eefcf4510d54d9aee4a2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:52:08 2024 +0100 mismatch between allocated and used memory fixed commit d1c2751a8e40e32e1ed45663b3ea42e4621b3960 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 10:51:53 2024 +0100 nullptr check added commit 8dd5a7b249edfa269a048496d9b6577297933fc2 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 08:52:40 2024 +0100 dangling reference fixed commit baaccb2f414b28f647f50c05081418415c6fd295 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 14 07:43:34 2024 +0100 avoid enum bitfields commit 7f389ef6cca50800fadc19c35ae951213989418b Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Wed Nov 13 14:11:11 2024 +0100 don't subtract the slider margins twice commit d84ab6e387163cc2da6c4d3e6a2ab623a324e727 Author: Peter Hartmann <peter@edelhirsch.io> Date: Wed Nov 13 10:00:38 2024 +0100 Update instructions on how to build the website (#470) * Regenerate doxygen file ... and change some things * Add custom stylesheet from Skia * update instructions on how to build the website commit 525ca3bd0e66dc864b5d21e37d8dd7f95cb060f3 Author: Uwe Rathmann <Uwe.Rathmann@tigertal.de> Date: Thu Nov 7 17:31:14 2024 +0100 QskSlider: Adapt to new Material3 style ( ValueLabel a.k.a Tooltip is not done yet )
2024-12-10 13:41:17 +00:00
return QskTextColors( textColor,
skinnable->color( aspect | A::StyleColor ),
skinnable->color( aspect | A::LinkColor ) );
2023-11-28 12:36:47 +00:00
}
static inline QskAspect qskAxisAspect( QskPlot::Axis axis )
{
using Q = QskPlotView;
using A = QskAspect;
return Q::AxisScale | ( ( axis == QskPlot::XBottom ) ? A::Bottom : A::Left );
}
namespace
{
class Renderer : public QskGraduationRenderer
2023-11-28 12:36:47 +00:00
{
using Inherited = QskGraduationRenderer;
2023-11-28 12:36:47 +00:00
public:
Renderer( const QskPlotView* view, QskPlot::Axis axis )
2023-11-28 12:36:47 +00:00
: m_view( view )
, m_axis( axis )
{
using Q = QskPlotView;
using A = QskAspect;
setEdge( axis == QskPlot::XBottom ? Qt::BottomEdge : Qt::LeftEdge );
setBoundaries( view->boundaries( axis ) );
setTickmarks( view->tickmarks( axis ) );
const auto aspect = Q::AxisScale
| ( ( axis == QskPlot::XBottom ) ? A::Bottom : A::Left );
const auto flags = view->flagHint< QskGraduationRenderer::Flags >(
aspect | QskAspect::Style, QskGraduationRenderer::Backbone );
2023-11-28 12:36:47 +00:00
setFlags( flags );
setTickColor( view->color( aspect ) );
const auto graduation = view->effectiveSkinHint(
aspect | QskAspect::Metric | QskAspect::Graduation );
setTickMetrics( graduation.value< QskGraduationMetrics >() );
2023-11-28 12:36:47 +00:00
setSpacing( view->spacingHint( aspect ) );
2024-02-19 14:51:55 +00:00
setFont( view->effectiveFont( aspect ) );
2023-11-28 12:36:47 +00:00
setTextColors( qskTextColors( view, aspect ) );
}
qreal labelOffset() const
{
2023-11-28 13:35:28 +00:00
const auto length = tickMetrics().maxLength();
qreal off = length + spacing();
2023-11-28 12:36:47 +00:00
if ( flags() & CenteredTickmarks )
2023-11-28 13:35:28 +00:00
off -= 0.5 * length;
2023-11-28 12:36:47 +00:00
return off;
}
QVariant labelAt( qreal pos ) const override
{
return m_view->labelAt( m_axis, pos );
}
private:
const QskPlotView* m_view;
const QskPlot::Axis m_axis;
};
}
QskPlotViewSkinlet::QskPlotViewSkinlet( QskSkin* skin )
: Inherited( skin )
{
setNodeRoles( { PanelRole, CanvasRole, AxisRole } );
}
QskPlotViewSkinlet::~QskPlotViewSkinlet() = default;
QRectF QskPlotViewSkinlet::subControlRect( const QskSkinnable* skinnable,
const QRectF& contentsRect, QskAspect::Subcontrol subControl ) const
{
using Q = QskPlotView;
if ( subControl == Q::Panel )
return contentsRect;
if ( subControl == Q::Canvas )
{
const auto view = static_cast< const QskPlotView* >( skinnable );
const auto rectX = sampleRect(
skinnable, contentsRect, Q::AxisScale, QskPlot::XBottom );
const auto rectY = sampleRect(
skinnable, contentsRect, Q::AxisScale, QskPlot::YLeft );
auto rect = view->subControlContentsRect( Q::Panel );
rect.setBottom( rectX.top() );
rect.setLeft( rectY.right() );
return rect;
}
return Inherited::subControlRect( skinnable, contentsRect, subControl );
}
QSGNode* QskPlotViewSkinlet::updateSubNode(
const QskSkinnable* skinnable, quint8 nodeRole, QSGNode* node ) const
{
using Q = QskPlotView;
switch ( nodeRole )
{
case PanelRole:
return updateBoxNode( skinnable, node, Q::Panel );
case CanvasRole:
return updateBoxNode( skinnable, node, Q::Canvas );
case AxisRole:
return updateSeriesNode( skinnable, Q::AxisScale, node );
}
return Inherited::updateSubNode( skinnable, nodeRole, node );
}
int QskPlotViewSkinlet::sampleCount(
const QskSkinnable* skinnable, QskAspect::Subcontrol subControl ) const
{
using Q = QskPlotView;
if ( subControl == Q::AxisScale )
return 2; // for the moment only 2 axes
return Inherited::sampleCount( skinnable, subControl );
}
QRectF QskPlotViewSkinlet::sampleRect( const QskSkinnable* skinnable,
const QRectF& contentsRect, QskAspect::Subcontrol subControl, int index ) const
{
if ( subControl == QskPlotView::AxisScale )
{
const auto axis = static_cast< QskPlot::Axis >( index );
return axisRect( skinnable, axis );
}
return Inherited::sampleRect( skinnable, contentsRect, subControl, index );
}
QSGNode* QskPlotViewSkinlet::updateSampleNode( const QskSkinnable* skinnable,
QskAspect::Subcontrol subControl, int index, QSGNode* node ) const
{
using Q = QskPlotView;
if ( subControl == Q::AxisScale )
{
const auto axis = static_cast< QskPlot::Axis >( index );
return updateAxisNode( skinnable, axis, node );
}
return Inherited::updateSampleNode( skinnable, subControl, index, node );
}
QSizeF QskPlotViewSkinlet::sizeHint( const QskSkinnable* skinnable,
Qt::SizeHint which, const QSizeF& constraint ) const
{
return Inherited::sizeHint( skinnable, which, constraint );
}
QRectF QskPlotViewSkinlet::axisRect(
const QskSkinnable* skinnable, QskPlot::Axis axis ) const
{
using Q = QskPlotView;
using A = QskAspect;
const auto view = static_cast< const QskPlotView* >( skinnable );
auto rect = view->subControlContentsRect( Q::Panel );
const QskMargins paddingLeft = view->paddingHint( Q::AxisScale | A::Left );
const QskMargins paddingBottom = view->paddingHint( Q::AxisScale | A::Bottom );
qreal x0, y0;
{
const Renderer renderer( view, QskPlot::XBottom );
2023-11-28 12:36:47 +00:00
const auto sz = renderer.boundingLabelSize();
y0 = rect.bottom() - sz.height()
- renderer.labelOffset() - paddingBottom.height();
}
{
const Renderer renderer( view, QskPlot::YLeft );
2023-11-28 12:36:47 +00:00
const auto sz = renderer.boundingLabelSize();
x0 = rect.left() + sz.width()
+ renderer.labelOffset() + paddingLeft.width();
}
const auto canvasBorder = view->boxBorderMetricsHint( Q::Canvas );
if ( axis == QskPlot::XBottom )
{
rect.setTop( y0 );
rect.setLeft( x0 + canvasBorder.left() );
rect.setRight( rect.right() - canvasBorder.right() );
}
else
{
rect.setRight( x0 );
rect.setTop( rect.top() + canvasBorder.top() );
rect.setBottom( y0 - canvasBorder.bottom() );
}
return rect;
}
QSGNode* QskPlotViewSkinlet::updateAxisNode(
const QskSkinnable* skinnable, QskPlot::Axis axis, QSGNode* node ) const
{
using Q = QskPlotView;
const auto view = static_cast< const QskPlotView* >( skinnable );
const auto axisRect = sampleRect( view, view->contentsRect(), Q::AxisScale, axis );
const auto padding = view->paddingHint( qskAxisAspect( axis ) );
Renderer renderer( view, axis );
2023-11-28 12:36:47 +00:00
if ( axis == QskPlot::XBottom )
{
renderer.setPosition( axisRect.top() + padding.top() );
renderer.setRange( axisRect.left(), axisRect.right() );
}
else
{
renderer.setPosition( axisRect.right() - padding.right() );
renderer.setRange( axisRect.top(), axisRect.bottom() );
}
return renderer.updateNode( view, node );
}
#include "moc_QskPlotViewSkinlet.cpp"