From eb7a068fb7baef2f4bb2f9fe9c2cf90b77c3acbe Mon Sep 17 00:00:00 2001 From: jkriege2 Date: Sun, 21 Jan 2024 22:12:15 +0100 Subject: [PATCH] NEW CSS-parser JKQTPCSSParser in order to parse e.g. \c linear-gradient() specifications in jkqtp_String2QBrushStyleExt() NEW generic RegularExpression functions (jkqtp_rxExactlyMatches(), jkqtp_rxIndexIn(), jkqtp_rxContains(), jkqtp_rxPartiallyMatchesAt() ) --- doc/dox/jkqtcommon.dox | 5 + doc/dox/todo.dox | 1 - doc/dox/whatsnew.dox | 4 +- lib/jkqtcommon.pri | 2 + lib/jkqtcommon/CMakeLists.txt | 2 + lib/jkqtcommon/jkqtpcsstools.cpp | 417 ++++++++++++++++++++++++++++ lib/jkqtcommon/jkqtpcsstools.h | 299 ++++++++++++++++++++ lib/jkqtcommon/jkqtpstringtools.cpp | 409 ++++++++++++++++----------- lib/jkqtcommon/jkqtpstringtools.h | 63 +++++ 9 files changed, 1032 insertions(+), 170 deletions(-) create mode 100644 lib/jkqtcommon/jkqtpcsstools.cpp create mode 100644 lib/jkqtcommon/jkqtpcsstools.h diff --git a/doc/dox/jkqtcommon.dox b/doc/dox/jkqtcommon.dox index d02f89931f..661ccdbf64 100644 --- a/doc/dox/jkqtcommon.dox +++ b/doc/dox/jkqtcommon.dox @@ -20,6 +20,11 @@ This group assembles a variety of mathematical tool functions that are used in d Offers diverse function to convert different datatypes (e.g. double, int, diverse enums) to and from strings and for string manipulation. +\defgroup jkqtptools_css CSS Parsing Tools +\ingroup jkqtptools_jkqtcommon + +Offers parser(s) for certain subsets of css, that are used e.g. in JKQTPlotter's styling INI files (e.g. for gradients) + \defgroup jkqtptools_qt Tools around Qt's clasess \ingroup jkqtptools_jkqtcommon diff --git a/doc/dox/todo.dox b/doc/dox/todo.dox index 76afc74618..fcb914dab6 100644 --- a/doc/dox/todo.dox +++ b/doc/dox/todo.dox @@ -30,7 +30,6 @@ This page lists several todos and wishes for future version of JKQTPlotter
  • plot: elongated grid to left of tick labels
  • plot: refactor print preview/export preview code
  • sryling: better styling/more styling options for data-tooltips
  • -
  • styling: color gradients as fill-styles in style-INIs
  • user interactions: dialog(s) to edit x/y-range
  • diff --git a/doc/dox/whatsnew.dox b/doc/dox/whatsnew.dox index 27c4bd1b43..0ca4319279 100644 --- a/doc/dox/whatsnew.dox +++ b/doc/dox/whatsnew.dox @@ -28,8 +28,8 @@ Changes, compared to \ref page_whatsnew_V4_0_0 "v4.0.0" include:
  • NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via BUILD_SHARED_LIBS, which retires JKQtPlotter_BUILD_STATIC_LIBS, JKQtPlotter_BUILD_SHARED_LIBS and removes the capability to build static and shared libraries in one location (fixes issue #104)
  • NEW: prepareed library for CMake's FetchContent-API
  • NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
  • -
  • NEW add JKQTPExpected datatype
  • -
  • NEW add jkqtp_roundToDigits()
  • +
  • NEW add JKQTPExpected datatype, jkqtp_roundToDigits(), generic RegularExpression functions (jkqtp_rxExactlyMatches(), jkqtp_rxIndexIn(), jkqtp_rxContains(), jkqtp_rxPartiallyMatchesAt() )
  • +
  • NEW CSS-parser JKQTPCSSParser in order to parse e.g. \c linear-gradient() specifications in jkqtp_String2QBrushStyleExt()
  • JKQTPlotter: