diff --git a/Doxyfile b/Doxyfile index c0b79715b2..38043acaf8 100644 --- a/Doxyfile +++ b/Doxyfile @@ -261,7 +261,7 @@ TAB_SIZE = 2 # with the commands \{ and \} for these it is advised to use the version @{ and # @} or use a double escape (\\{ and \\}) -ALIASES = +ALIASES = "qFlagsNote{2}=\note The \1 type is a typedef for QFlags\< \ref \2 \>. It stores an OR (\c || ) combination of \ref \2 values." # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources # only. Doxygen will then generate output that is more tailored for C. For @@ -962,7 +962,11 @@ EXCLUDE = moc_*.* \ cmake \ .github \ doxygen \ - doxygen/bin + doxygen/bin \ + lib/jkqtmathtext/resources/firaMath \ + lib/jkqtmathtext/resources/firaMath \ + lib/jkqtmathtext/resources/firaMath \ + ./lib/jkqtmathtext/resources/firaMath # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded @@ -2273,7 +2277,7 @@ ENABLE_PREPROCESSING = YES # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -MACRO_EXPANSION = NO +MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then # the macro expansion is limited to the macros specified with the PREDEFINED and @@ -2281,7 +2285,7 @@ MACRO_EXPANSION = NO # The default value is: NO. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_ONLY_PREDEF = NO +EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES, the include files in the # INCLUDE_PATH will be searched if a #include is found. @@ -2313,7 +2317,11 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = DOXYGEN +PREDEFINED = DOXYGEN \ + "Q_DECLARE_FLAGS(flagsType,enumType)=typedef QFlags flagsType;" \ + Q_DECLARE_OPERATORS_FOR_FLAGS(f)= \ + Q_ENUM(e)= \ + Q_FLAG(e)= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The @@ -2322,7 +2330,12 @@ PREDEFINED = DOXYGEN # definition found in the source code. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = " +JKQTCOMMON_LIB_EXPORT" \ + JKQTPLOTTER_LIB_EXPORT \ + JKQTCOMMON_STATISTICS_AND_MATH_LIB_EXPORT \ + JKQTFASTPLOTTER_LIB_EXPORT \ + JKQTMATHTEXT_LIB_EXPORT # If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will # remove all references to function-like macros that are alone on a line, have @@ -2332,7 +2345,7 @@ EXPAND_AS_DEFINED = # The default value is: YES. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -SKIP_FUNCTION_MACROS = YES +SKIP_FUNCTION_MACROS = NO #--------------------------------------------------------------------------- # Configuration options related to external references diff --git a/doc/dox/jkqtcommon.dox b/doc/dox/jkqtcommon.dox index c8625ca383..6a3a9d4d4b 100644 --- a/doc/dox/jkqtcommon.dox +++ b/doc/dox/jkqtcommon.dox @@ -29,7 +29,7 @@ Offers diverse function to convert different datatypes (e.g. double, int, divers In many cases it makes sense to generate special QIcons to represent a certain property, enum entry, QBrush, QPen etc. This group assembles functions that do exactly that. -\defgroup jkqtptools_qtwidgets Additional Widgets for +\defgroup jkqtptools_qtwidgets Additional Qt Widgets \ingroup jkqtptools_jkqtcommon \defgroup jkqtptools_drawing Drawing & Graphics Tools diff --git a/doc/dox/jkqtmathtext.dox b/doc/dox/jkqtmathtext.dox index 8cee7a1063..a0c0e99a0d 100644 --- a/doc/dox/jkqtmathtext.dox +++ b/doc/dox/jkqtmathtext.dox @@ -19,7 +19,7 @@ \image html jkqtmathtext/jkqtmathtext_sqrt.png \image html jkqtmathtext/jkqtmathtext_OldEnglish.png - \defgroup jkqtmathtext_general General Information + \defgroup jkqtmathtext_general General Information on JKQTMathText \ingroup jkqtmathtext This group assembles general information around JKQTMathText. It explains the rendering model, lists the supported LaTeX-subset etc. diff --git a/doc/dox/jkqtmathtext_supportedlatex.dox b/doc/dox/jkqtmathtext_supportedlatex.dox index 371a4b225f..73cfb2eb32 100644 --- a/doc/dox/jkqtmathtext_supportedlatex.dox +++ b/doc/dox/jkqtmathtext_supportedlatex.dox @@ -135,7 +135,6 @@ Sometimes it is necessary to typeset text withou interpreting it as LaTeX markup. These instructions are implemented for that: - \\verb!...!: interpret enclosed text between \c ! as verbose. Instead of \ ! you can choose ANY character! \image html jkqtmathtext/jkqtmathtext_verb.png generated by \\verb!\\LaTeX{} is not pares inside \\verb~..~! outside {\\backslash}verb - \\begin{verbatim}...\\end{verbatim}: interpret enclosed multi-line text as verbatim. \image html jkqtmathtext/jkqtmathtext_verbatim.png - \endcode - \\begin{lstlisting}...\\end{lstlisting}: actually menat for highlighted code, for now this is the same as \c \\begin{verbatim}...\\end{verbatim}. \image html jkqtmathtext/jkqtmathtext_lstlisting.png - \\begin{verbatim*}...\\end{verbatim*}: interpret enclosed multi-line text as verbatim. Print with visible whitespace and tab characters \image html jkqtmathtext/jkqtmathtext_verbatimast.png . @@ -305,8 +304,8 @@ - \c \\left\\langle \c \\right\\rangle : "averaging" braces , \image html jkqtmathtext/jkqtmathtext_brace_tri.png - \c \\left\\lfloor \c \\right\\rfloor : floor braces , \image html jkqtmathtext/jkqtmathtext_brace_floor.png - \c \\left\\lceil \c \\right\\rceil : ceil braces , \image html jkqtmathtext/jkqtmathtext_brace_ceil.png - - \c \\left| \c \\right| : absolute value braces | |, \image html jkqtmathtext/jkqtmathtext_bracejkqtmathtext_brace_ucorner_oneline.png - - \c \\left\\| \c \\right\\| \endcode : norm braces || ||, \image html jkqtmathtext/jkqtmathtext_brace_dblline.png + - \c \\left| \c \\right| : absolute value braces | |, \image html jkqtmathtext/jkqtmathtext_brace_oneline.png + - \c \\left\\| \c \\right\\| : norm braces || ||, \image html jkqtmathtext/jkqtmathtext_brace_dblline.png - \c \\left\\llcorner \c \\right\\lrcorner : lower corner braces , \image html jkqtmathtext/jkqtmathtext_brace_lcorner.png - \c \\left\\ulcorner \c \\right\\urcorner : upper corner braces , \image html jkqtmathtext/jkqtmathtext_brace_ucorner.png - You can use \c \\left. or \c \\right. to have only right or only left brace , \image html jkqtmathtext/jkqtmathtext_brace_dot.png generated by {\\backslash}left.: $\\left. a\\cdot x^2\\right)$\\ \\ \\ \\ \\ {\\backslash}right.: $\\left( a\\cdot x^2\\right.$ @@ -362,15 +361,17 @@ - $\\begin{Vmatrix} a & b & ...\\\\ c & d & ...\\end{Vmatrix}$ \image html jkqtmathtext/jkqtmathtext_vvmatrix.png - $\\begin{array}{COLSPEC} a & b & ...\\\\ c & d & ...\\end{array}$ \image html jkqtmathtext/jkqtmathtext_array.png \c COLSPEC is a LaTeX column specifier, i.e. a sequence composed of these parts: - - \c l : left-aligned column - - \c c : centered column - - \c r : right-aligned column - - \c | : single line - - \c || : double line - - \c : : single dashed line - - \c :: : double dashed line - . + . + In all these environments, you can use the following instructions to draw lines above/below a row in the matrix: - \c \\hline or \c \\midrule: a single line - \c \\hline\\hline : a double line diff --git a/doc/dox/jkqtplotter.dox b/doc/dox/jkqtplotter.dox index c3fb63f88d..c4b3f80257 100644 --- a/doc/dox/jkqtplotter.dox +++ b/doc/dox/jkqtplotter.dox @@ -4,58 +4,12 @@ A Qt based plotter for 2D scientific graphs. Main Plotting widget is JKQTPlotter. - -\defgroup jkqtpdatastorage Data Storage Classes/System +\defgroup jkqtplotter_general General Information \ingroup jkqtplotter -The classes in this group implement a data storage system for use with the main plotter class. -Basically a table of data is generated as a set of logical columns that may be bound to different -data sources (internal or external memory arrays. Later on it is simply possible to plot graphs -using the column number and the not a link to the actual data array, as the link is stored in these -classes. - -\see \ref JKQTPlotterBasicJKQTPDatastore for a detailed description of how to use this class for data management! - -\defgroup jkqtpexternalinterfaces Interfaces To Other Libraries -\ingroup jkqtpdatastorage +This group assembles documentation of general principles and definitions behind the JKQTPlotter library. -\defgroup jkqtpinterfaceopencv OpenCV Interfaceing Tools -\ingroup jkqtpexternalinterfaces - -Classes and functions in this group allow JKQTPlotter to directly work with OpenCV data structures. - -Examples: - - \ref JKQTPlotterImagePlotOpenCV - - \ref JKQTPlotterImagePlotRGBOpenCV -. - -The OpenCV-binding itself is header-only, and NOT compiled into the JKQtPlotter libraries. Therefore you can simply include the header and use the facilities provided by it. - -The CMake-build system of JKQtPlotter (and its examples) is compatible with both OpenCV 3.4.x and 4.x and uses the standard `find_package(OpenCV)` facilities provided by OpenCV to compile and bind against that library. -If you want to build the OpenCV-based JKQtPlotter examples (see list above), you either have to ensure that CMake finds OpenCV by itself (i.e. somewhere in the default search paths), or you can set the CMake variable `OpenCV_DIR` so it points to the OpenCV directory before configuring JKQtPlotter. - - - -\defgroup jkqtpinterfacecimg CImg Interfaceing Tools -\ingroup jkqtpexternalinterfaces - -Classes and functions in this group allow JKQTPlotter to directly work with CImg data structures CImg<T>>. - -Examples: - - \ref JKQTPlotterImagePlotCImg - - \ref JKQTPlotterImagePlotRGBCImg -. - -The CImg-binding itself is header-only (as CImg is itself), and NOT compiled into the JKQtPlotter libraries. Therefore you can simply include the header and use the facilities provided by it. - -The CMake-build system of JKQtPlotter (and its examples) provides facilities to allow for `find_package(CImg)` to compile against that library. -If you want to build the CImg-based JKQtPlotter examples (see list above), you either have to ensure that CMake finds CImg by itself (i.e. somewhere in the default search paths, e.g. `CMAKE_INSTALL_PREFIX`), or you can set the CMake variable `CImg_DIR` so it points to the directory of the `CImg.h` file, or before configuring JKQtPlotter. - - - -\defgroup jkqtpplottersupprt Support Classes and Functions -\ingroup jkqtplotter \defgroup jkqtpplotterclasses Plotter Class & Plotter Widget \ingroup jkqtplotter @@ -69,588 +23,9 @@ There are two main classes: . -\defgroup jkqtplotter_elements Plot Elements +\defgroup jkqtpplottersupprt Support Classes and Functions \ingroup jkqtplotter -This group assembles all classes that represent different elements of a plot (managed by JKQTBasePlotter/JKQTPlotter). -There are these major subgroups: - - \ref jkqtpbaseplotter_elements contains all non-graph objects, i.e. things like coordinate axes and so on - - \ref jkqtplotter_graphsgroup contains the actual graph classes -. - -\defgroup jkqtpbaseplotter_elements Basic (non-graph) Plot Elements (coordinate axes, ...) -\ingroup jkqtplotter_elements - -This group contains some tool classes that implement basic elements of the plot (coordinate axes, key, ...). -These classes are used by JKQTPlotterBase to output the plot. - - -\defgroup jkqtplotter_graphsgroup Graph Classes -\ingroup jkqtplotter_elements - -This group contains all classes in the JKQTPlotter library that may be used to draw a graph (i.e. a curve) onto a plot. - -\tableofcontents - -\section jkqtplotter_graphsgroup_classstructure Graph Class Structure - -\subsection jkqtplotter_graphsgroup_classstructure_basics Graph Classes - -Each type of graph is represented by another class, which has to be derived from JKQTPPlotElement. This class provides a basic virtual interface -that allows JKQTPlotter to draw the graphs represented by them. This interface consists of these functions: - - JKQTPPlotElement::draw() draws the graph onto a given JKQTPEnhancedPainter (derived from QPainter) - - JKQTPPlotElement::drawKeyMarker() draws the small marker image in the plot legend - - JKQTPPlotElement::getKeyLabelColor() returns a color for the legend entry for the graph - - JKQTPPlotElement::getXMinMax() returns the extent of the graph in x-direction (e.g. for auto-zooming) - - JKQTPPlotElement::getYMinMax() returns the extent of the graph in Y-direction (e.g. for auto-zooming) -. -In addition to these basic functions, there are additional functions that can be used to draw something outside the actual plot rectangle. -These are used to e.g. add color-scales to the side of the graph: - - JKQTPPlotElement::getOutsideSize() returns the amount of space required outside the plot rectangle - - JKQTPPlotElement::drawOutside() draws the elements outside the plot rectangle -. - -Usually if writing a new graph, one would not directly -derive from JKQTPPlotElement, but from a cass in it's hirarchy of children. These children already provide certain facilities for certain types of graphs. - -\dot -digraph -{ - // LATEX_PDF_SIZE - bgcolor="transparent"; - edge [fontname="FreeSans",fontsize="12",labelfontname="FreeSans",labelfontsize="12"]; - node [fontname="FreeSans",fontsize="12"]; - rankdir="LR"; - - { - rank=same; - JKQTPPlotElement [URL="\link JKQTPPlotElement"]; - noteJKQTPPlotElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nelements drawn\nonto a plot"]; - JKQTPPlotElement -> noteJKQTPPlotElement [style=dashed,arrowhead=none]; - } - - { - rank=same; - JKQTPGraph [URL="\link JKQTPPlotElement"]; - noteJKQTPGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nactual graphs"]; - JKQTPGraph -> noteJKQTPGraph [style=dashed,arrowhead=none]; - - JKQTPGeometricPlotElement [URL="\link JKQTPGeometricPlotElement"]; - noteJKQTPGeometricPlotElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nnon-graph elements,\ne.g. geometric elements"]; - JKQTPGeometricPlotElement -> noteJKQTPGeometricPlotElement [style=dashed,arrowhead=none]; - - JKQTPPlotAnnotationElement [URL="\link JKQTPPlotAnnotationElement"]; - noteJKQTPPlotAnnotationElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraph annotation elements,\ne.g. text, symbols, ranges ..."]; - JKQTPPlotAnnotationElement -> noteJKQTPPlotAnnotationElement [style=dashed,arrowhead=none]; - } - - - { - rank=same; - - JKQTPXYGraph [URL="\link JKQTPXYGraph"] - noteJKQTPXYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x,y) data pairs"]; - JKQTPXYGraph -> noteJKQTPXYGraph [style=dashed,arrowhead=none]; - - JKQTPSingleColumnGraph [URL="\link JKQTPSingleColumnGraph"] - noteJKQTPSingleColumnGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on only\n a single column of data"]; - JKQTPSingleColumnGraph -> noteJKQTPSingleColumnGraph [style=dashed,arrowhead=none]; - - JKQTPImageBase [URL="\link JKQTPImageBase"] - noteJKQTPImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \n2D images/matrices"]; - JKQTPImageBase -> noteJKQTPImageBase [style=dashed,arrowhead=none]; - } - - { - rank=same; - - JKQTPXYYGraph [URL="\link JKQTPXYYGraph"] - noteJKQTPXYYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x, y1, y2) data tripels"]; - JKQTPXYYGraph -> noteJKQTPXYYGraph [style=dashed,arrowhead=none]; - - JKQTPXXYGraph [URL="\link JKQTPXXYGraph"] - noteJKQTPXXYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x1, x2, y) data tripels"]; - JKQTPXXYGraph -> noteJKQTPXXYGraph [style=dashed,arrowhead=none]; - - JKQTPXYBaselineGraph [URL="\link JKQTPXYBaselineGraph"] - noteJJKQTPXYBaselineGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x,y) data pairs and a baseline"]; - JKQTPXYBaselineGraph -> noteJJKQTPXYBaselineGraph [style=dashed,arrowhead=none]; - - JKQTPEvaluatedFunctionGraphBase [URL="\link JKQTPEvaluatedFunctionGraphBase"] - noteJKQTPEvaluatedFunctionGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \ndynamically evaluated functions"]; - JKQTPEvaluatedFunctionGraphBase -> noteJKQTPEvaluatedFunctionGraphBase [style=dashed,arrowhead=none]; - - JKQTPMathImageBase [URL="\link JKQTPMathImageBase"] - noteJKQTPMathImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ndata-based images"]; - JKQTPMathImageBase -> noteJKQTPMathImageBase [style=dashed,arrowhead=none]; - } - - { - rank=same; - - JKQTPBarGraphBase [URL="\link JKQTPBarGraphBase"] - noteJKQTPBarGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nbarcharts"]; - JKQTPBarGraphBase -> noteJKQTPBarGraphBase [style=dashed,arrowhead=none]; - - JKQTPFilledCurveGraphBase [URL="\link JKQTPFilledCurveGraphBase"] - noteJKQTPFilledCurveGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nfilled graphs"]; - JKQTPFilledCurveGraphBase -> noteJKQTPFilledCurveGraphBase [style=dashed,arrowhead=none]; - - JKQTPImpulsesGraphBase [URL="\link JKQTPImpulsesGraphBase"] - noteJKQTPImpulsesGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nimpulse graphs"]; - JKQTPImpulsesGraphBase -> noteJKQTPImpulsesGraphBase [style=dashed,arrowhead=none]; - - JKQTPSpecialLineGraphBase [URL="\link JKQTPSpecialLineGraphBase"] - noteJKQTPSpecialLineGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nspecial line graphs"]; - JKQTPSpecialLineGraphBase -> noteJKQTPSpecialLineGraphBase [style=dashed,arrowhead=none]; - - JKQTPBoxplotGraphBase [URL="\link JKQTPBoxplotGraphBase"] - noteJKQTPBoxplotGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na set of boxplots"]; - JKQTPBoxplotGraphBase -> noteJKQTPBoxplotGraphBase [style=dashed,arrowhead=none]; - - JKQTPRangeBase [URL="\link JKQTPRangeBase"]; - noteJKQTPRangeBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nrange annotations"]; - JKQTPRangeBase -> noteJKQTPRangeBase [style=dashed,arrowhead=none]; - - JKQTPBoxplotElementBase [URL="\link JKQTPBoxplotElementBase"] - noteJKQTPBoxplotElementBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na single boxplot"]; - JKQTPBoxplotElementBase -> noteJKQTPBoxplotElementBase [style=dashed,arrowhead=none]; - - JKQTPViolinplotElementBase [URL="\link JKQTPViolinplotElementBase"] - noteJKQTPViolinplotElementBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na single violin plot"]; - JKQTPViolinplotElementBase -> noteJKQTPViolinplotElementBase [style=dashed,arrowhead=none]; - } - - JKQTPPlotElement -> JKQTPGraph - JKQTPPlotElement -> JKQTPGeometricPlotElement - JKQTPPlotElement -> JKQTPPlotAnnotationElement - JKQTPPlotElement -> JKQTPRangeBase - JKQTPPlotElement -> JKQTPBoxplotElementBase - JKQTPPlotElement -> JKQTPViolinplotElementBase - - JKQTPGraph -> JKQTPXYGraph - JKQTPGraph -> JKQTPSingleColumnGraph - JKQTPGraph -> JKQTPImageBase -> JKQTPMathImageBase - JKQTPGraph -> JKQTPEvaluatedFunctionGraphBase - JKQTPGraph -> JKQTPBoxplotGraphBase - - JKQTPXYGraph -> JKQTPXYYGraph - JKQTPXYGraph -> JKQTPXXYGraph - JKQTPXYGraph -> JKQTPXYBaselineGraph - - JKQTPXYBaselineGraph -> JKQTPBarGraphBase - JKQTPXYBaselineGraph -> JKQTPFilledCurveGraphBase - JKQTPXYBaselineGraph -> JKQTPImpulsesGraphBase - JKQTPXYBaselineGraph -> JKQTPSpecialLineGraphBase - -} - -\enddot - -\subsection jkqtplotter_graphsgroup_classstructure_mixins Mix-In Classes for Graphs - -In addition there are mix-in classes that are used via multiple inheritance -that add additional features and properties to a graph. A prominent example are the classes for \ref jkqtplotter_basegraphserrors "error indicators". -With these there are usually two variants of one type of graph: One without error indicators and one with error indicators, e.g.: - - JKQTPXYLineGraph shows lines+symbols graphs made up from x/y-value pairs for each data point. - - JKQTPXYLineErrorGraph extends JKQTPXYLineGraph with error indicator drawing/properties provided by JKQTPXYGraphErrors -. -This approach allows to keep interfaces and appearance recognizeable over different graph classes and locates the source code -for a feature like error indicators in a single/in few class(es). - -Another example of such a class is JKQTPColorPaletteStyleAndToolsMixin, which provides functions that allow to use color palettes. It is -mainly used for the \ref jkqtplotter_imagelots "Image/Matrix graphs", but also by e.g. JKQTPXYParametrizedScatterGraph. - - - -\defgroup jkqtplotter_basegraphs Baseclasses for Graphs -\ingroup jkqtplotter_graphsgroup - -\defgroup jkqtplotter_basegraphserrors Mix-In Classes for Error Indicators -\ingroup jkqtplotter_basegraphs - -\defgroup jkqtplotter_basegraphs_stylemixins Mix-In Classes for Plot Styling -\ingroup jkqtplotter_basegraphs - -\defgroup jkqtplotter_linesymbolgraphs Line/Symbol Graphs -\ingroup jkqtplotter_graphsgroup - -This group assembles graphs that show their data with symbols and optionally with connecting lines in diferent styles: - - - - - - - -
Screenshot - Classes -
\image html beeswarmplot_small.png - JKQTPSingleColumnSymbolsGraph -
\image html JKQTPXYScatterGraph_small.png - JKQTPXYScatterGraph, JKQTPXYScatterErrorGraph -
\image html symbols_and_styles_small.png - JKQTPXYLineGraph, JKQTPXYLineErrorGraph -
\image html paramscatterplot_small.png - JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph -
\image html stepplots_small.png - JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph -
- -\defgroup jkqtplotter_linesymbolgraphs_simple Basic Line/Scatter Graphs -\ingroup jkqtplotter_linesymbolgraphs - - - - - - -
Screenshot - Classes -
\image html beeswarmplot_small.png - JKQTPSingleColumnSymbolsGraph -
\image html symbols_and_styles_small.png - JKQTPXYLineGraph, JKQTPXYLineErrorGraph -
\image html stepplots_small.png - JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph -
- - -\defgroup jkqtplotter_linesymbolgraphs_param Parametrized Line/Scatter Graphs -\ingroup jkqtplotter_linesymbolgraphs - - - - -
Screenshot - Classes -
\image html paramscatterplot_small.png - JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph -
- -\defgroup jkqtplotter_filledgraphs Filled Polygon/Area Graphs -\ingroup jkqtplotter_graphsgroup - - - - - - -
Screenshot - Classes -
\image html filledgraphs_small.png - JKQTPFilledCurveXGraph, JKQTPFilledCurveYGraph -
\image html JKQTPFilledCurveXErrorGraph_small.png - JKQTPFilledCurveXErrorGraph, JKQTPFilledCurveYErrorGraph -
\image html JKQTPfilledVerticalRangeGraph_WithLines_small.png - JKQTPFilledVerticalRangeGraph, JKQTPFilledHorizontalRangeGraph -
- -\defgroup jkqtplotter_functiongraphs Function Graphs -\ingroup jkqtplotter_linesymbolgraphs - - - - - -
Screenshot - Classes -
\image html functionplot_small.png - JKQTPXFunctionLineGraph, JKQTPYFunctionLineGraph -
\image html evalcurve_small.png - JKQTPXYFunctionLineGraph -
- -\defgroup jkqtplotter_parsedFgraphs Parsed Function Graphs -\ingroup jkqtplotter_linesymbolgraphs - - - - -
Screenshot - Classes -
\image html functionplot_small.png - JKQTPXParsedFunctionLineGraph, JKQTPYParsedFunctionLineGraph -
- -\defgroup jkqtplotter_barssticks Barcharts, Impulse-Charts, ... -\ingroup jkqtplotter_graphsgroup - - - - - - - - -
Screenshot - Classes -
\image html barchart_small.png - JKQTPBarVerticalGraph, JKQTPBarHorizontalGraph -
\image html barchart_error_small.png - JKQTPBarVerticalErrorGraph, JKQTPBarHorizontalErrorGraph -
\image html JKQTPbarVerticalGraphStacked_small.png - JKQTPBarVerticalStackableGraph, JKQTPBarHorizontalStackableGraph -
\image html impulsesplot_small.png - JKQTPImpulsesHorizontalGraph, JKQTPImpulsesVerticalGraph -
\image html impulses_errors_small.png - JKQTPImpulsesHorizontalErrorGraph, JKQTPImpulsesVerticalErrorGraph -
- -\defgroup jkqtplotter_statgraphs Statistical Graphs (e.g. Boxplots ...) -\ingroup jkqtplotter_graphsgroup - - - - - -
Screenshot - Classes -
\image html boxplot_small.png - JKQTPBoxplotVerticalGraph, JKQTPBoxplotHorizontalGraph -
\image html JKQTPViolinplotVerticalElement_small.png - JKQTPViolinplotVerticalElement, JKQTPViolinplotHorizontalElement -
- -\see \ref jkqtptools_math_statistics_adaptors for shortcuts to calculate statistical properties of data and then adding a plot with the results. - -\defgroup jkqtplotter_geoplots Geometric Elements (Lines, Rectangles, ...) -\ingroup jkqtplotter_graphsgroup - - - - - - - - - - - - - -
Screenshot - Classes -
\image html symbol_filled_diamond.png - JKQTPGeoSymbol -
\image html geo_text_small.png - JKQTPGeoText -
\image html geo_line_small.png - JKQTPGeoLine, JKQTPGeoInfiniteLine, JKQTPGeoPolyLines -
\image html geo_arrows_small.png - JKQTPGeoArrow -
\image html geo_rect_small.png - JKQTPGeoRectangle -
\image html geo_polygon_small.png - JKQTPGeoPolygon -
\image html geo_ellipse_small.png - JKQTPGeoEllipse -
\image html geo_arc_small.png - JKQTPGeoArc -
\image html geo_pie_small.png - JKQTPGeoPie -
\image html geo_chords_small.png - JKQTPGeoChord -
- -Examples: - - \ref JKQTPlotterGeometricGraphs -. - -\defgroup jkqtplotter_annotations Graph Annotations -\ingroup jkqtplotter_graphsgroup - - - - - - -
Screenshot - Classes -
\image html symbol_filled_diamond.png - JKQTPGeoSymbol -
\image html geo_text_small.png - JKQTPGeoText -
\image html JKQTPHorizontalRange_small.png - JKQTPHorizontalRange, JKQTPVerticalRange -
- -Examples: - - \ref JKQTPlotterGeometricGraphs -. - -\defgroup jkqtplotter_diverse Diverse Other Graphs (Ranges, ...) -\ingroup jkqtplotter_graphsgroup - - - - - - -
Screenshot - Classes -
\image html JKQTPPeakStreamGraphY_small.png - JKQTPPeakStreamGraph -
\image html geo_boxplot_small.png - JKQTPBoxplotVerticalElement, JKQTPBoxplotHorizontalElement -
\image html JKQTPViolinplotVerticalElement_small.png - JKQTPViolinplotVerticalElement, JKQTPViolinplotHorizontalElement -
- -\defgroup jkqtplotter_imagelots Matrix/Image Plotting -\ingroup jkqtplotter_graphsgroup - - - - - - - - - -
Screenshot - Classes -
\image html rgbimageplot_qt_small.png - JKQTPImage -
\image html JKQTPMathImageBaseModifyNone_small.png - JKQTPMathImage, JKQTPColumnMathImage -
\image html rgbimageplots_small.png - JKQTPRGBMathImage, JKQTPColumnRGBMathImage -
\image html overlayimage_small.png - JKQTPOverlayImage -
\image html overlayimageenhanced_small.png - JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced -
\image html JKQTPColumnContourPlot_small.png - JKQTPContourPlot, JKQTPColumnContourPlot -
- -\defgroup jkqtplotter_imagelots_elements Image Graphs -\ingroup jkqtplotter_imagelots - - - - - - - -
Screenshot - Classes -
\image html rgbimageplot_qt_small.png - JKQTPImage -
\image html JKQTPMathImageBaseModifyNone_small.png - JKQTPMathImage, JKQTPColumnMathImage -
\image html rgbimageplot_cimg_small.png - JKQTPRGBMathImage, JKQTPColumnRGBMathImage -
- -\defgroup jkqtplotter_imagelots_overlays Image/Matrix Overlay Graphs -\ingroup jkqtplotter_imagelots - - - - - -
Screenshot - Classes -
\image html overlayimage_small.png - JKQTPOverlayImage -
\image html overlayimageenhanced_small.png - JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced -
- -\defgroup jkqtplotter_imagelots_tools Tool Functions & Classes for Image Drawing -\ingroup jkqtplotter_imagelots - -\defgroup jkqtplotter_imagelots_tools_LUTS Tool Functions to Build Lookup-Tables for Palettes -\ingroup jkqtplotter_imagelots_tools - -\defgroup jkqtplotter_imagelots_contour Contour Graphs (based on Image Data) -\ingroup jkqtplotter_imagelots - - - - -
Screenshot - Classes -
\image html JKQTPColumnContourPlot_small.png - JKQTPContourPlot, JKQTPColumnContourPlot -
- - - -\defgroup jkqtpplotter_styling JKQTPlotter Styling System -\ingroup jkqtplotter - -\image html stylesbanner.png - -JKQTPlotter (and JKQTBasePlotter) offer a styling system, which allows to easily define and transfer plot styling from one object to another. -The system is based on a hirarchy of structs, which summarize properties, describing how a plot looks in general. The classes contained in this system are: - - JKQTPlotterStyle for JKQTPlotter: Defines e.g. basic user-interactions, the display options of the toolbar - - JKQTBasePlotterStyle for JKQTBasePlotter defines the appearance of the plot itself (colors, axis properties, key properties, default graph colors/styles, ...), contains JKQTPCoordinateAxisStyle instances to configrue the plot's coordinate axes - - JKQTPCoordinateAxisStyle for JKQTPCoordinateAxis defines the appearance of a coordinate axis (colors, axis properties, ...) - - JKQTPKeyStyle for the style of the key/legend in a JKQTBasePlotterStyle -. - -In addition there are static methods that allow to manage a system-wide (actually program-instance wide) style that is applied to any new instance of JKQTPlotter and JKQTBasePlotter on construction: - - JKQTPGetSystemDefaultStyle() / JKQTPSetSystemDefaultStyle() allows to access the central instace of JKQTPlotterStyle (mainly properties/style of the GUI-parts and user-action bindings) - - JKQTPGetSystemDefaultBaseStyle() / JKQTPSetSystemDefaultBaseStyle() accesses the central instance of JKQTBasePlotterStyle (styles the actual plot/graphs with colors, axes styles, ...) -. - -You can e.g. use these general methods to alter the styles for all JKQTPlotter instances, created in the future: -\code{.cpp} - // load the system-wide default settings from an INI-file: - QSettings plotSettings("JKQTPlotterSettings.ini", QSettings::IniFormat);; - JKQTPGetSystemDefaultStyle().loadSettings(plotSettings); - JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings); - - // alter a system-wide default setting by hand (here: set color of zooming rect to red) - JKQTPGetSystemDefaultStyle().userActionColor=QColor("red"); -\endcode - -Several pre-made styles are available in the JKQTPlotter repository (https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/). -These are also linked into the JKQTPlotter library as Qt ressource into the subdirectory \c :/JKQTPlotter/styles/ . You can use them as follows: - -\code{.cpp} - QSettings plotSettings(":/JKQTPlotter/styles/blackandwhite.ini", QSettings::IniFormat);; - JKQTPGetSystemDefaultStyle().loadSettings(plotSettings); - JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings); -\endcode - -Here is a table with all available ready-made styles: - - - - - - - - - - -
Style-file - Screenshot -
The Default Style - \image html default.ini.png -
\c :/JKQTPlotter/styles/blackandwhite.ini - \image html blackandwhite.ini.png -
\c :/JKQTPlotter/styles/blueprint.ini - \image html blueprint.ini.png -
\c :/JKQTPlotter/styles/dark.ini - \image html dark.ini.png -
\c :/JKQTPlotter/styles/seaborn.ini - \image html seaborn.ini.png -
\c :/JKQTPlotter/styles/simple_gridandticks.ini - \image html simple_gridandticks.ini.png -
\c :/JKQTPlotter/styles/simple_axesoffset.ini - \image html simple_axesoffset.ini.png -
\c :/JKQTPlotter/styles/simple_axesoffset_plotbox.ini - \image html simple_axesoffset_plotbox.ini.png -
- -\see For a detailed example, see \ref JKQTPlotterStyling - - - \defgroup jkqtpqtwidgetsttools Qt Widgets/Tools to work with JKQTPlotter \ingroup jkqtplotter diff --git a/doc/dox/jkqtplotter_01naming.dox b/doc/dox/jkqtplotter_01naming.dox new file mode 100644 index 0000000000..fd167e5642 --- /dev/null +++ b/doc/dox/jkqtplotter_01naming.dox @@ -0,0 +1,25 @@ +/*! + + \defgroup jkqtplotter_naming Conventions Naming Conventions in JKQTPlotter + \ingroup jkqtplotter_general + + + This page assembles the naming conventions behind the implementation and documentation of JKQTPlotter: + + + + +*/ \ No newline at end of file diff --git a/doc/dox/jkqtplotter_02principles.dox b/doc/dox/jkqtplotter_02principles.dox new file mode 100644 index 0000000000..7919fa101e --- /dev/null +++ b/doc/dox/jkqtplotter_02principles.dox @@ -0,0 +1,48 @@ +/*! + + \defgroup jkqtplotter_basicprinciples Basic Principles of JKQTPlotter + \ingroup jkqtplotter_general + + This page documents some basic principles behind the design of the JKQTPlotter library. + + \tableofcontents + + \section jkqtplotter_basicprinciples_datastorage Datastorage + Data is stored in an (internal) instance of JKQTPDatastore, which is accessible through JKQTPlotter::getDatastore() or JKQTBasePlotter::getDatastore(). + This datastore can either own its data (which is done here, as we copy the data into the store + e.g. by calling JKQTPDatastore::addCopiedColumn(), or it can merely reference to the data (then + data needs to be available as array of \c double values). + + In addition JKQTPDatastore provides different functions to add or edit the contained data. Amongst others it also provides a C++ StdLib-type iterator + interface to access the data. + + \see JKQTPDatastore, + \ref jkqtpdatastorage , + \ref jkqtp_extut_datamanagement + + \section jkqtplotter_basicprinciples_graphs_and_mixins Graphs & Mix-Ins + + Each graph is represented by a class derived from JKQTPPlotElement (e.g. JKQTPXYLineGraph, + which shows data as a scatter of symbols that may (or may not) be connected by a line). + + There is a complete hirarchy of graph base classes, from which different graphs (or more general plot elements) are derived, + see \ref jkqtplotter_graphsgroup_classstructure_basics . + + + Constructing a graph class does not yet add it to the plotter. To add it, call JKQTBasePlotter::addGraph() / JKQTPlotter::addGraph(). Only + after this step, the graph is displayed. You can modify the apperance of the graph (e.g. colors, name in the key ...) by setting + properties in the graph class instance. + + Most graph peroperties are inserted into the graph class via mix-in classes. + A Mixin allows to inject the same code into different classes, but does not require these classes to be in the same inheritance + tree. The style of mix-in programming used in the JKQTPlotter library is multiple-inheritance. So a graph class is derived from + JKQTPGraph but also has additional parent classes from \ref jkqtplotter_basegraphs_stylemixins like: + - JKQTPGraphLineStyleMixin which provides line-styling + - JKQTPGraphSymbolStyleMixin which provides styling for graph symbols + - JKQTPGraphFillStyleMixin which provides fill styles + - ... + . + + + +*/ \ No newline at end of file diff --git a/doc/dox/jkqtplotter_03datastorage.dox b/doc/dox/jkqtplotter_03datastorage.dox new file mode 100644 index 0000000000..aa3eb7e8cd --- /dev/null +++ b/doc/dox/jkqtplotter_03datastorage.dox @@ -0,0 +1,51 @@ +/*! + +\defgroup jkqtpdatastorage Data Storage Classes/System +\ingroup jkqtplotter + +The classes in this group implement a data storage system for use with the main plotter class. +Basically a table of data is generated as a set of logical columns that may be bound to different +data sources (internal or external memory arrays. Later on it is simply possible to plot graphs +using the column number and the not a link to the actual data array, as the link is stored in these +classes. + +\see \ref JKQTPlotterBasicJKQTPDatastore for a detailed description of how to use this class for data management! + +\defgroup jkqtpexternalinterfaces Interfaces To Other Libraries +\ingroup jkqtpdatastorage + + +\defgroup jkqtpinterfaceopencv OpenCV Interfaceing Tools +\ingroup jkqtpexternalinterfaces + +Classes and functions in this group allow JKQTPlotter to directly work with OpenCV data structures. + +Examples: + - \ref JKQTPlotterImagePlotOpenCV + - \ref JKQTPlotterImagePlotRGBOpenCV +. + +The OpenCV-binding itself is header-only, and NOT compiled into the JKQtPlotter libraries. Therefore you can simply include the header and use the facilities provided by it. + +The CMake-build system of JKQtPlotter (and its examples) is compatible with both OpenCV 3.4.x and 4.x and uses the standard `find_package(OpenCV)` facilities provided by OpenCV to compile and bind against that library. +If you want to build the OpenCV-based JKQtPlotter examples (see list above), you either have to ensure that CMake finds OpenCV by itself (i.e. somewhere in the default search paths), or you can set the CMake variable `OpenCV_DIR` so it points to the OpenCV directory before configuring JKQtPlotter. + + + +\defgroup jkqtpinterfacecimg CImg Interfaceing Tools +\ingroup jkqtpexternalinterfaces + +Classes and functions in this group allow JKQTPlotter to directly work with CImg data structures CImg<T>>. + +Examples: + - \ref JKQTPlotterImagePlotCImg + - \ref JKQTPlotterImagePlotRGBCImg +. + +The CImg-binding itself is header-only (as CImg is itself), and NOT compiled into the JKQtPlotter libraries. Therefore you can simply include the header and use the facilities provided by it. + +The CMake-build system of JKQtPlotter (and its examples) provides facilities to allow for `find_package(CImg)` to compile against that library. +If you want to build the CImg-based JKQtPlotter examples (see list above), you either have to ensure that CMake finds CImg by itself (i.e. somewhere in the default search paths, e.g. `CMAKE_INSTALL_PREFIX`), or you can set the CMake variable `CImg_DIR` so it points to the directory of the `CImg.h` file, or before configuring JKQtPlotter. + + +*/ \ No newline at end of file diff --git a/doc/dox/jkqtplotter_04plotelements.dox b/doc/dox/jkqtplotter_04plotelements.dox new file mode 100644 index 0000000000..955504fd1b --- /dev/null +++ b/doc/dox/jkqtplotter_04plotelements.dox @@ -0,0 +1,513 @@ +/*! + + +\defgroup jkqtplotter_elements Plot Elements +\ingroup jkqtplotter + +This group assembles all classes that represent different elements of a plot (managed by JKQTBasePlotter/JKQTPlotter). +There are these major subgroups: + - \ref jkqtpbaseplotter_elements contains all non-graph objects, i.e. things like coordinate axes and so on + - \ref jkqtplotter_graphsgroup contains the actual graph classes +. + +\defgroup jkqtpbaseplotter_elements Basic (non-graph) Plot Elements (coordinate axes, ...) +\ingroup jkqtplotter_elements + +This group contains some tool classes that implement basic elements of the plot (coordinate axes, key, ...). +These classes are used by JKQTPlotterBase to output the plot. + + +\defgroup jkqtplotter_graphsgroup Graph Classes +\ingroup jkqtplotter_elements + +This group contains all classes in the JKQTPlotter library that may be used to draw a graph (i.e. a curve) onto a plot. + +\tableofcontents + +\section jkqtplotter_graphsgroup_classstructure Graph Class Structure + +\subsection jkqtplotter_graphsgroup_classstructure_basics Graph Classes + +Each type of graph is represented by another class, which has to be derived from JKQTPPlotElement. This class provides a basic virtual interface +that allows JKQTPlotter to draw the graphs represented by them. This interface consists of these functions: + - JKQTPPlotElement::draw() draws the graph onto a given JKQTPEnhancedPainter (derived from QPainter) + - JKQTPPlotElement::drawKeyMarker() draws the small marker image in the plot legend + - JKQTPPlotElement::getKeyLabelColor() returns a color for the legend entry for the graph + - JKQTPPlotElement::getXMinMax() returns the extent of the graph in x-direction (e.g. for auto-zooming) + - JKQTPPlotElement::getYMinMax() returns the extent of the graph in Y-direction (e.g. for auto-zooming) +. +In addition to these basic functions, there are additional functions that can be used to draw something outside the actual plot rectangle. +These are used to e.g. add color-scales to the side of the graph: + - JKQTPPlotElement::getOutsideSize() returns the amount of space required outside the plot rectangle + - JKQTPPlotElement::drawOutside() draws the elements outside the plot rectangle +. + +Usually if writing a new graph, one would not directly +derive from JKQTPPlotElement, but from a cass in it's hirarchy of children. These children already provide certain facilities for certain types of graphs. + +\dot +digraph +{ + // LATEX_PDF_SIZE + bgcolor="transparent"; + edge [fontname="FreeSans",fontsize="12",labelfontname="FreeSans",labelfontsize="12"]; + node [fontname="FreeSans",fontsize="12"]; + rankdir="LR"; + + { + rank=same; + JKQTPPlotElement [URL="\link JKQTPPlotElement"]; + noteJKQTPPlotElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nelements drawn\nonto a plot"]; + JKQTPPlotElement -> noteJKQTPPlotElement [style=dashed,arrowhead=none]; + } + + { + rank=same; + JKQTPGraph [URL="\link JKQTPPlotElement"]; + noteJKQTPGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nactual graphs"]; + JKQTPGraph -> noteJKQTPGraph [style=dashed,arrowhead=none]; + + JKQTPGeometricPlotElement [URL="\link JKQTPGeometricPlotElement"]; + noteJKQTPGeometricPlotElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nnon-graph elements,\ne.g. geometric elements"]; + JKQTPGeometricPlotElement -> noteJKQTPGeometricPlotElement [style=dashed,arrowhead=none]; + + JKQTPPlotAnnotationElement [URL="\link JKQTPPlotAnnotationElement"]; + noteJKQTPPlotAnnotationElement [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraph annotation elements,\ne.g. text, symbols, ranges ..."]; + JKQTPPlotAnnotationElement -> noteJKQTPPlotAnnotationElement [style=dashed,arrowhead=none]; + } + + + { + rank=same; + + JKQTPXYGraph [URL="\link JKQTPXYGraph"] + noteJKQTPXYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x,y) data pairs"]; + JKQTPXYGraph -> noteJKQTPXYGraph [style=dashed,arrowhead=none]; + + JKQTPSingleColumnGraph [URL="\link JKQTPSingleColumnGraph"] + noteJKQTPSingleColumnGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on only\n a single column of data"]; + JKQTPSingleColumnGraph -> noteJKQTPSingleColumnGraph [style=dashed,arrowhead=none]; + + JKQTPImageBase [URL="\link JKQTPImageBase"] + noteJKQTPImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \n2D images/matrices"]; + JKQTPImageBase -> noteJKQTPImageBase [style=dashed,arrowhead=none]; + } + + { + rank=same; + + JKQTPXYYGraph [URL="\link JKQTPXYYGraph"] + noteJKQTPXYYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x, y1, y2) data tripels"]; + JKQTPXYYGraph -> noteJKQTPXYYGraph [style=dashed,arrowhead=none]; + + JKQTPXXYGraph [URL="\link JKQTPXXYGraph"] + noteJKQTPXXYGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x1, x2, y) data tripels"]; + JKQTPXXYGraph -> noteJKQTPXXYGraph [style=dashed,arrowhead=none]; + + JKQTPXYBaselineGraph [URL="\link JKQTPXYBaselineGraph"] + noteJJKQTPXYBaselineGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs based on\n (x,y) data pairs and a baseline"]; + JKQTPXYBaselineGraph -> noteJJKQTPXYBaselineGraph [style=dashed,arrowhead=none]; + + JKQTPEvaluatedFunctionGraphBase [URL="\link JKQTPEvaluatedFunctionGraphBase"] + noteJKQTPEvaluatedFunctionGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \ndynamically evaluated functions"]; + JKQTPEvaluatedFunctionGraphBase -> noteJKQTPEvaluatedFunctionGraphBase [style=dashed,arrowhead=none]; + + JKQTPMathImageBase [URL="\link JKQTPMathImageBase"] + noteJKQTPMathImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ndata-based images"]; + JKQTPMathImageBase -> noteJKQTPMathImageBase [style=dashed,arrowhead=none]; + } + + { + rank=same; + + JKQTPBarGraphBase [URL="\link JKQTPBarGraphBase"] + noteJKQTPBarGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nbarcharts"]; + JKQTPBarGraphBase -> noteJKQTPBarGraphBase [style=dashed,arrowhead=none]; + + JKQTPFilledCurveGraphBase [URL="\link JKQTPFilledCurveGraphBase"] + noteJKQTPFilledCurveGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nfilled graphs"]; + JKQTPFilledCurveGraphBase -> noteJKQTPFilledCurveGraphBase [style=dashed,arrowhead=none]; + + JKQTPImpulsesGraphBase [URL="\link JKQTPImpulsesGraphBase"] + noteJKQTPImpulsesGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nimpulse graphs"]; + JKQTPImpulsesGraphBase -> noteJKQTPImpulsesGraphBase [style=dashed,arrowhead=none]; + + JKQTPSpecialLineGraphBase [URL="\link JKQTPSpecialLineGraphBase"] + noteJKQTPSpecialLineGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nspecial line graphs"]; + JKQTPSpecialLineGraphBase -> noteJKQTPSpecialLineGraphBase [style=dashed,arrowhead=none]; + + JKQTPBoxplotGraphBase [URL="\link JKQTPBoxplotGraphBase"] + noteJKQTPBoxplotGraphBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na set of boxplots"]; + JKQTPBoxplotGraphBase -> noteJKQTPBoxplotGraphBase [style=dashed,arrowhead=none]; + + JKQTPRangeBase [URL="\link JKQTPRangeBase"]; + noteJKQTPRangeBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nrange annotations"]; + JKQTPRangeBase -> noteJKQTPRangeBase [style=dashed,arrowhead=none]; + + JKQTPBoxplotElementBase [URL="\link JKQTPBoxplotElementBase"] + noteJKQTPBoxplotElementBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na single boxplot"]; + JKQTPBoxplotElementBase -> noteJKQTPBoxplotElementBase [style=dashed,arrowhead=none]; + + JKQTPViolinplotElementBase [URL="\link JKQTPViolinplotElementBase"] + noteJKQTPViolinplotElementBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphs that represent \na single violin plot"]; + JKQTPViolinplotElementBase -> noteJKQTPViolinplotElementBase [style=dashed,arrowhead=none]; + } + + JKQTPPlotElement -> JKQTPGraph + JKQTPPlotElement -> JKQTPGeometricPlotElement + JKQTPPlotElement -> JKQTPPlotAnnotationElement + JKQTPPlotElement -> JKQTPRangeBase + JKQTPPlotElement -> JKQTPBoxplotElementBase + JKQTPPlotElement -> JKQTPViolinplotElementBase + + JKQTPGraph -> JKQTPXYGraph + JKQTPGraph -> JKQTPSingleColumnGraph + JKQTPGraph -> JKQTPImageBase -> JKQTPMathImageBase + JKQTPGraph -> JKQTPEvaluatedFunctionGraphBase + JKQTPGraph -> JKQTPBoxplotGraphBase + + JKQTPXYGraph -> JKQTPXYYGraph + JKQTPXYGraph -> JKQTPXXYGraph + JKQTPXYGraph -> JKQTPXYBaselineGraph + + JKQTPXYBaselineGraph -> JKQTPBarGraphBase + JKQTPXYBaselineGraph -> JKQTPFilledCurveGraphBase + JKQTPXYBaselineGraph -> JKQTPImpulsesGraphBase + JKQTPXYBaselineGraph -> JKQTPSpecialLineGraphBase + +} + +\enddot + +\subsection jkqtplotter_graphsgroup_classstructure_mixins Mix-In Classes for Graphs + +\see \ref jkqtplotter_basicprinciples_graphs_and_mixins + +In addition there are mix-in classes that are used via multiple inheritance +that add additional features and properties to a graph. A prominent example are the classes for \ref jkqtplotter_basegraphserrors "error indicators". +With these there are usually two variants of one type of graph: One without error indicators and one with error indicators, e.g.: + - JKQTPXYLineGraph shows lines+symbols graphs made up from x/y-value pairs for each data point. + - JKQTPXYLineErrorGraph extends JKQTPXYLineGraph with error indicator drawing/properties provided by JKQTPXYGraphErrors +. +This approach allows to keep interfaces and appearance recognizeable over different graph classes and locates the source code +for a feature like error indicators in a single/in few class(es). + +Another example of such a class is JKQTPColorPaletteStyleAndToolsMixin, which provides functions that allow to use color palettes. It is +mainly used for the \ref jkqtplotter_imagelots "Image/Matrix graphs", but also by e.g. JKQTPXYParametrizedScatterGraph. + +\defgroup jkqtplotter_basegraphs Baseclasses for Graphs +\ingroup jkqtplotter_graphsgroup + +\defgroup jkqtplotter_basegraphserrors Mix-In Classes for Error Indicators +\ingroup jkqtplotter_basegraphs + +\defgroup jkqtplotter_basegraphs_stylemixins Mix-In Classes for Plot Styling +\ingroup jkqtplotter_basegraphs + +\defgroup jkqtplotter_linesymbolgraphs Line/Symbol Graphs +\ingroup jkqtplotter_graphsgroup + +This group assembles graphs that show their data with symbols and optionally with connecting lines in diferent styles: + + + + + + + +
Screenshot + Classes +
\image html beeswarmplot_small.png + JKQTPSingleColumnSymbolsGraph +
\image html JKQTPXYScatterGraph_small.png + JKQTPXYScatterGraph, JKQTPXYScatterErrorGraph +
\image html symbols_and_styles_small.png + JKQTPXYLineGraph, JKQTPXYLineErrorGraph +
\image html paramscatterplot_small.png + JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph +
\image html stepplots_small.png + JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph +
+ +\defgroup jkqtplotter_linesymbolgraphs_simple Basic Line/Scatter Graphs +\ingroup jkqtplotter_linesymbolgraphs + + + + + + +
Screenshot + Classes +
\image html beeswarmplot_small.png + JKQTPSingleColumnSymbolsGraph +
\image html symbols_and_styles_small.png + JKQTPXYLineGraph, JKQTPXYLineErrorGraph +
\image html stepplots_small.png + JKQTPSpecialLineHorizontalGraph, JKQTPSpecialLineVerticalGraph +
+ + +\defgroup jkqtplotter_linesymbolgraphs_param Parametrized Line/Scatter Graphs +\ingroup jkqtplotter_linesymbolgraphs + + + + +
Screenshot + Classes +
\image html paramscatterplot_small.png + JKQTPXYParametrizedScatterGraph, JKQTPXYParametrizedErrorScatterGraph +
+ +\defgroup jkqtplotter_filledgraphs Filled Polygon/Area Graphs +\ingroup jkqtplotter_graphsgroup + + + + + + +
Screenshot + Classes +
\image html filledgraphs_small.png + JKQTPFilledCurveXGraph, JKQTPFilledCurveYGraph +
\image html JKQTPFilledCurveXErrorGraph_small.png + JKQTPFilledCurveXErrorGraph, JKQTPFilledCurveYErrorGraph +
\image html JKQTPfilledVerticalRangeGraph_WithLines_small.png + JKQTPFilledVerticalRangeGraph, JKQTPFilledHorizontalRangeGraph +
+ +\defgroup jkqtplotter_functiongraphs Function Graphs +\ingroup jkqtplotter_linesymbolgraphs + + + + + +
Screenshot + Classes +
\image html functionplot_small.png + JKQTPXFunctionLineGraph, JKQTPYFunctionLineGraph +
\image html evalcurve_small.png + JKQTPXYFunctionLineGraph +
+ +\defgroup jkqtplotter_parsedFgraphs Parsed Function Graphs +\ingroup jkqtplotter_linesymbolgraphs + + + + +
Screenshot + Classes +
\image html functionplot_small.png + JKQTPXParsedFunctionLineGraph, JKQTPYParsedFunctionLineGraph +
+ +\defgroup jkqtplotter_barssticks Barcharts, Impulse-Charts, ... +\ingroup jkqtplotter_graphsgroup + + + + + + + + +
Screenshot + Classes +
\image html barchart_small.png + JKQTPBarVerticalGraph, JKQTPBarHorizontalGraph +
\image html barchart_error_small.png + JKQTPBarVerticalErrorGraph, JKQTPBarHorizontalErrorGraph +
\image html JKQTPbarVerticalGraphStacked_small.png + JKQTPBarVerticalStackableGraph, JKQTPBarHorizontalStackableGraph +
\image html impulsesplot_small.png + JKQTPImpulsesHorizontalGraph, JKQTPImpulsesVerticalGraph +
\image html impulses_errors_small.png + JKQTPImpulsesHorizontalErrorGraph, JKQTPImpulsesVerticalErrorGraph +
+ +\defgroup jkqtplotter_statgraphs Statistical Graphs (e.g. Boxplots ...) +\ingroup jkqtplotter_graphsgroup + + + + + +
Screenshot + Classes +
\image html boxplot_small.png + JKQTPBoxplotVerticalGraph, JKQTPBoxplotHorizontalGraph +
\image html JKQTPViolinplotVerticalElement_small.png + JKQTPViolinplotVerticalElement, JKQTPViolinplotHorizontalElement +
+ +\see \ref jkqtptools_math_statistics_adaptors for shortcuts to calculate statistical properties of data and then adding a plot with the results. + +\defgroup jkqtplotter_geoplots Geometric Elements (Lines, Rectangles, ...) +\ingroup jkqtplotter_graphsgroup + + + + + + + + + + + + + +
Screenshot + Classes +
\image html symbol_filled_diamond.png + JKQTPGeoSymbol +
\image html geo_text_small.png + JKQTPGeoText +
\image html geo_line_small.png + JKQTPGeoLine, JKQTPGeoInfiniteLine, JKQTPGeoPolyLines +
\image html geo_arrows_small.png + JKQTPGeoArrow +
\image html geo_rect_small.png + JKQTPGeoRectangle +
\image html geo_polygon_small.png + JKQTPGeoPolygon +
\image html geo_ellipse_small.png + JKQTPGeoEllipse +
\image html geo_arc_small.png + JKQTPGeoArc +
\image html geo_pie_small.png + JKQTPGeoPie +
\image html geo_chords_small.png + JKQTPGeoChord +
+ +Examples: + - \ref JKQTPlotterGeometricGraphs +. + +\defgroup jkqtplotter_annotations Graph Annotations +\ingroup jkqtplotter_graphsgroup + + + + + + +
Screenshot + Classes +
\image html symbol_filled_diamond.png + JKQTPGeoSymbol +
\image html geo_text_small.png + JKQTPGeoText +
\image html JKQTPHorizontalRange_small.png + JKQTPHorizontalRange, JKQTPVerticalRange +
+ +Examples: + - \ref JKQTPlotterGeometricGraphs +. + +\defgroup jkqtplotter_diverse Diverse Other Graphs (Ranges, ...) +\ingroup jkqtplotter_graphsgroup + + + + + + +
Screenshot + Classes +
\image html JKQTPPeakStreamGraphY_small.png + JKQTPPeakStreamGraph +
\image html geo_boxplot_small.png + JKQTPBoxplotVerticalElement, JKQTPBoxplotHorizontalElement +
\image html JKQTPViolinplotVerticalElement_small.png + JKQTPViolinplotVerticalElement, JKQTPViolinplotHorizontalElement +
+ +\defgroup jkqtplotter_imagelots Matrix/Image Plotting +\ingroup jkqtplotter_graphsgroup + + + + + + + + + +
Screenshot + Classes +
\image html rgbimageplot_qt_small.png + JKQTPImage +
\image html JKQTPMathImageBaseModifyNone_small.png + JKQTPMathImage, JKQTPColumnMathImage +
\image html rgbimageplots_small.png + JKQTPRGBMathImage, JKQTPColumnRGBMathImage +
\image html overlayimage_small.png + JKQTPOverlayImage +
\image html overlayimageenhanced_small.png + JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced +
\image html JKQTPColumnContourPlot_small.png + JKQTPContourPlot, JKQTPColumnContourPlot +
+ +\defgroup jkqtplotter_imagelots_elements Image Graphs +\ingroup jkqtplotter_imagelots + + + + + + + +
Screenshot + Classes +
\image html rgbimageplot_qt_small.png + JKQTPImage +
\image html JKQTPMathImageBaseModifyNone_small.png + JKQTPMathImage, JKQTPColumnMathImage +
\image html rgbimageplot_cimg_small.png + JKQTPRGBMathImage, JKQTPColumnRGBMathImage +
+ +\defgroup jkqtplotter_imagelots_overlays Image/Matrix Overlay Graphs +\ingroup jkqtplotter_imagelots + + + + + +
Screenshot + Classes +
\image html overlayimage_small.png + JKQTPOverlayImage +
\image html overlayimageenhanced_small.png + JKQTPOverlayImageEnhanced, JKQTPColumnOverlayImageEnhanced +
+ +\defgroup jkqtplotter_imagelots_tools Tool Functions & Classes for Image Drawing +\ingroup jkqtplotter_imagelots + +\defgroup jkqtplotter_imagelots_tools_LUTS Tool Functions to Build Lookup-Tables for Palettes +\ingroup jkqtplotter_imagelots_tools + +\defgroup jkqtplotter_imagelots_contour Contour Graphs (based on Image Data) +\ingroup jkqtplotter_imagelots + + + + +
Screenshot + Classes +
\image html JKQTPColumnContourPlot_small.png + JKQTPContourPlot, JKQTPColumnContourPlot +
+ + + +*/ \ No newline at end of file diff --git a/doc/dox/jkqtplotter_05styling.dox b/doc/dox/jkqtplotter_05styling.dox new file mode 100644 index 0000000000..1aa79240b0 --- /dev/null +++ b/doc/dox/jkqtplotter_05styling.dox @@ -0,0 +1,77 @@ +/*! + + +\defgroup jkqtpplotter_styling Styling System +\ingroup jkqtplotter + +\image html stylesbanner.png + +JKQTPlotter (and JKQTBasePlotter) offer a styling system, which allows to easily define and transfer plot styling from one object to another. +The system is based on a hirarchy of structs, which summarize properties, describing how a plot looks in general. The classes contained in this system are: + - JKQTPlotterStyle for JKQTPlotter: Defines e.g. basic user-interactions, the display options of the toolbar + - JKQTBasePlotterStyle for JKQTBasePlotter defines the appearance of the plot itself (colors, axis properties, key properties, default graph colors/styles, ...), contains JKQTPCoordinateAxisStyle instances to configrue the plot's coordinate axes + - JKQTPCoordinateAxisStyle for JKQTPCoordinateAxis defines the appearance of a coordinate axis (colors, axis properties, ...) + - JKQTPKeyStyle for the style of the key/legend in a JKQTBasePlotterStyle +. + +In addition there are static methods that allow to manage a system-wide (actually program-instance wide) style that is applied to any new instance of JKQTPlotter and JKQTBasePlotter on construction: + - JKQTPGetSystemDefaultStyle() / JKQTPSetSystemDefaultStyle() allows to access the central instace of JKQTPlotterStyle (mainly properties/style of the GUI-parts and user-action bindings) + - JKQTPGetSystemDefaultBaseStyle() / JKQTPSetSystemDefaultBaseStyle() accesses the central instance of JKQTBasePlotterStyle (styles the actual plot/graphs with colors, axes styles, ...) +. + +You can e.g. use these general methods to alter the styles for all JKQTPlotter instances, created in the future: +\code{.cpp} + // load the system-wide default settings from an INI-file: + QSettings plotSettings("JKQTPlotterSettings.ini", QSettings::IniFormat);; + JKQTPGetSystemDefaultStyle().loadSettings(plotSettings); + JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings); + + // alter a system-wide default setting by hand (here: set color of zooming rect to red) + JKQTPGetSystemDefaultStyle().userActionColor=QColor("red"); +\endcode + +Several pre-made styles are available in the JKQTPlotter repository (https://github.com/jkriege2/JKQtPlotter/tree/master/lib/jkqtplotter/resources/styles/). +These are also linked into the JKQTPlotter library as Qt ressource into the subdirectory \c :/JKQTPlotter/styles/ . You can use them as follows: + +\code{.cpp} + QSettings plotSettings(":/JKQTPlotter/styles/blackandwhite.ini", QSettings::IniFormat);; + JKQTPGetSystemDefaultStyle().loadSettings(plotSettings); + JKQTPGetSystemDefaultBaseStyle().loadSettings(plotSettings); +\endcode + +Here is a table with all available ready-made styles: + + + + + + + + + + +
Style-file + Screenshot +
The Default Style + \image html default.ini.png +
\c :/JKQTPlotter/styles/blackandwhite.ini + \image html blackandwhite.ini.png +
\c :/JKQTPlotter/styles/blueprint.ini + \image html blueprint.ini.png +
\c :/JKQTPlotter/styles/dark.ini + \image html dark.ini.png +
\c :/JKQTPlotter/styles/seaborn.ini + \image html seaborn.ini.png +
\c :/JKQTPlotter/styles/simple_gridandticks.ini + \image html simple_gridandticks.ini.png +
\c :/JKQTPlotter/styles/simple_axesoffset.ini + \image html simple_axesoffset.ini.png +
\c :/JKQTPlotter/styles/simple_axesoffset_plotbox.ini + \image html simple_axesoffset_plotbox.ini.png +
+ +\see For a detailed example, see \ref JKQTPlotterStyling + + + +*/ \ No newline at end of file diff --git a/lib/jkqtcommon/jkqtpdrawingtools.h b/lib/jkqtcommon/jkqtpdrawingtools.h index 1af934bfab..5a95b63800 100644 --- a/lib/jkqtcommon/jkqtpdrawingtools.h +++ b/lib/jkqtcommon/jkqtpdrawingtools.h @@ -334,7 +334,7 @@ enum JKQTPLineDecoratorStyle { JKQTPDiamondDecorator, /*!< \brief an open diamond tip \image html linedecorators/diamond.png */ JKQTPDiamondDecoratorAndBar, /*!< \brief an open diamond tip \image html linedecorators/diamond_bar.png */ JKQTPFilledDiamondDecorator, /*!< \brief a filled diamond tip \image html linedecorators/filled_diamond.png */ - JKQTPFilledDiamondDecoratorAndBar, /*!< \brief a filled diamond tip \image html linedecorators/filled_dimanond_bar.png */ + JKQTPFilledDiamondDecoratorAndBar, /*!< \brief a filled diamond tip \image html linedecorators/filled_diamond_bar.png */ JKQTPHalfBarDecorator, /*!< \brief a half vertical bar \image html linedecorators/half_bar.png */ JKQTPHarpoonDecorator, /*!< \brief an harpoon arrow \image html linedecorators/harpoon.png */ JKQTPHarpoonDecoratorAndBar, /*!< \brief an harpoon arrow, with vertical bar \image html linedecorators/harpoon_bar.png */ diff --git a/lib/jkqtcommon/jkqtpenhancedpainter.h b/lib/jkqtcommon/jkqtpenhancedpainter.h index 28f3f230e5..7c536278ca 100644 --- a/lib/jkqtcommon/jkqtpenhancedpainter.h +++ b/lib/jkqtcommon/jkqtpenhancedpainter.h @@ -32,13 +32,20 @@ */ class JKQTCOMMON_LIB_EXPORT JKQTPEnhancedPainter : public QPainter { public: - + /** \brief flags that are used to configure a JKQTPEnhancedPainter */ enum PainterFlag { DefaultPaintMode = 0x00, /*!< \brief the default mode, the JKQTPEnhancedPainter draws on a pixel-device */ VectorPainting = 0x01, /*!< \brief if set, the JKQTPEnhancedPainter draws onto a vector-device, like a printer, PDF or SVG-output */ }; - Q_ENUMS(PainterFlag) - Q_FLAGS(PainterFlags) + Q_ENUM(PainterFlag) + /** \brief specifies the plot styles for the error information, e.g. error bars, boxes, lines ... + * \ingroup jkqtplotter_basegraphserrors + * + * \qFlagsNote{JKQTPErrorPlotstyle,JKQTPErrorPlotstyleElements} + * + * \see JKQTPErrorPlotstyleElements, JKQTPXGraphErrorData, JKQTPYGraphErrorData + */ Q_DECLARE_FLAGS(PainterFlags, PainterFlag) + Q_FLAG(PainterFlags) JKQTPEnhancedPainter(QPaintDevice* device); JKQTPEnhancedPainter(); diff --git a/lib/jkqtcommon/jkqtphighrestimer.h b/lib/jkqtcommon/jkqtphighrestimer.h index fbce76bf1f..7e51963078 100644 --- a/lib/jkqtcommon/jkqtphighrestimer.h +++ b/lib/jkqtcommon/jkqtphighrestimer.h @@ -74,9 +74,10 @@ * * \par win32 implementation issues: * To implement this timer on windows systems I use two API calls from the windows kernel. They are: - * - QueryPerformanceCounter() - * - QueryPerformanceFrequency() - * . + * * \n * The first one is used to read times: In the start() method we simply save the current counter value to a variable. * In getTime() we can then again use QueryPerformanceCounter() to get the current counter value and then calculate diff --git a/lib/jkqtmathtext/jkqtmathtext.cpp b/lib/jkqtmathtext/jkqtmathtext.cpp index e887904ccf..7acd7934a0 100644 --- a/lib/jkqtmathtext/jkqtmathtext.cpp +++ b/lib/jkqtmathtext/jkqtmathtext.cpp @@ -290,9 +290,9 @@ void JKQTMathText::saveSettings(QSettings& settings, const QString& group) const settings.setValue(group+ "matrix_yPadding_factor", matrix_yPadding_factor); } -bool JKQTMathText::parse(const QString &markup, DefaultParserTypes markuptType, ParseOptions options) +bool JKQTMathText::parse(const QString &markup, DefaultParserTypes markupType, ParseOptions options) { - if (markuptType==LatexParser) return parse(markup, options); + if (markupType==LatexParser) return parse(markup, options); return false; } diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h index 5de606af6a..5825f19166 100644 --- a/lib/jkqtmathtext/jkqtmathtext.h +++ b/lib/jkqtmathtext/jkqtmathtext.h @@ -209,7 +209,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject { LatexParser, /*!< \brief use the LaTeX parser from JKQTMathTextLatexParser */ DefaultParser=LatexParser }; - /** \brief parse the given math \a markup string with a parser derived from \a markuptType. + /** \brief parse the given math \a markup string with a parser derived from \a markupType. * * \param markup the string of math markup * \param markupType defines the language the \a markup is written in (and is used to derive the parser to use) @@ -217,7 +217,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathText : public QObject { * * \returns \c true on success. */ - bool parse(const QString &markup, DefaultParserTypes markuptType=DefaultParser, ParseOptions options=DefaultParseOptions); + bool parse(const QString &markup, DefaultParserTypes markupType=DefaultParser, ParseOptions options=DefaultParseOptions); /** \brief parse the given math \a markup string, using the given parser class \a TParser * * \tparam TParser the parser (deived from JKQTMathTextParser) to be used diff --git a/lib/jkqtmathtext/nodes/jkqtmathtextbracenode.h b/lib/jkqtmathtext/nodes/jkqtmathtextbracenode.h index 17d4126981..d71dbda191 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtextbracenode.h +++ b/lib/jkqtmathtext/nodes/jkqtmathtextbracenode.h @@ -85,9 +85,9 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextBraceNode: public JKQTMathTextSingleCh JKQTMathTextBraceType openbrace; /**\brief closing brace */ JKQTMathTextBraceType closebrace; - /** \brief calculate the width of the braces, fills NodeSize::openbracewidth/NodeSize::closebracewidth and NodeSize::braceheight/NodeSize::closeheight in \a out, based on \a childSize + /** \brief calculate the width of the braces, fills JKQTMathTextBraceNode::NodeSize::openBraceWidth/JKQTMathTextBraceNode::NodeSize::closeBraceWidth and JKQTMathTextBraceNode::NodeSize::openBraceHeight/JKQTMathTextBraceNode::NodeSize::closeBraceHeight in \a out, based on \a childSize * - * \param[out] out this function fills NodeSize::openbracewidth/NodeSize::closebracewidth and NodeSize::braceheight/NodeSize::closeheight in \a out + * \param[out] out this function fills JKQTMathTextBraceNode::NodeSize::openBraceWidth/JKQTMathTextBraceNode::NodeSize::closeBraceWidth and JKQTMathTextBraceNode::NodeSize::openBraceHeight/JKQTMathTextBraceNode::NodeSize::closeBraceHeight in \a out * \param painter a QPainter used for size-calculation/drawing * \param currentEv font environment * \param childSize size of the child node surrounded by the node diff --git a/lib/jkqtmathtext/nodes/jkqtmathtexttextnode.h b/lib/jkqtmathtext/nodes/jkqtmathtexttextnode.h index 6e55a5038d..c5903ba5a6 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtexttextnode.h +++ b/lib/jkqtmathtext/nodes/jkqtmathtexttextnode.h @@ -105,7 +105,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextTextNode: public JKQTMathTextTextBaseN * \param painter the QPainter to use for sizing/drawing * \param currentEv the environment that defines the formatting of the text * \param txt the text to split up - * \param[out] textpart the input \A txt split up into sections + * \param[out] textpart the input \a txt split up into sections * \param[out] fontMode formating of each section in \a textpart */ void splitTextForLayout(QPainter &painter, JKQTMathTextEnvironment currentEv, const QString& txt, QStringList& textpart, QList& fontMode) const; diff --git a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h index 071537e48c..83e6402a75 100644 --- a/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h +++ b/lib/jkqtmathtext/nodes/jkqtmathtextwhitespacenode.h @@ -167,7 +167,7 @@ class JKQTMATHTEXT_LIB_EXPORT JKQTMathTextPhantomNode: public JKQTMathTextInstru FMwidth, /*!< \brief implementes \c \\hphantom{CHILD} which is whitespace in the width of \c CHILD and height 0. */ FMheight /*!< \brief implementes \c \\vphantom{CHILD} which is whitespace in the height of \c CHILD and width 0. */ }; - /** \bbrief convert a Mode into a LaTeX instruction name */ + /** \brief convert a Mode into a LaTeX instruction name */ static QString Mode2Instruction(Mode mode); explicit JKQTMathTextPhantomNode(JKQTMathText* parent, const QString& mode, JKQTMathTextNode* child); explicit JKQTMathTextPhantomNode(JKQTMathText* parent, Mode mode, JKQTMathTextNode* child); diff --git a/lib/jkqtplotter/graphs/jkqtpfilledcurve.h b/lib/jkqtplotter/graphs/jkqtpfilledcurve.h index d2a1400541..8e6c231707 100644 --- a/lib/jkqtplotter/graphs/jkqtpfilledcurve.h +++ b/lib/jkqtplotter/graphs/jkqtpfilledcurve.h @@ -144,35 +144,35 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveXErrorGraph: public JKQTPFilledCurv virtual bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero) override; - /** \copydoc JKQTPFilledCurveXGraph::yErrorSymmetric */ + /** \copydoc JKQTPYGraphErrorData::yErrorSymmetric */ inline void setValueErrorSymmetric(bool __value) { setYErrorSymmetric(__value); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorSymmetric */ + /** \copydoc JKQTPYGraphErrorData::yErrorSymmetric */ inline bool getValueErrorSymmetric() const { return getYErrorSymmetric(); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorColumnLower */ + /** \copydoc JKQTPYGraphErrorData::yErrorColumnLower */ inline int getValueErrorColumnLower() const { return getYErrorColumnLower(); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorColumn */ + /** \copydoc JKQTPYGraphErrorData::yErrorColumn */ inline int getValueErrorColumn() const { return getYErrorColumn(); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorStyle */ + /** \copydoc JKQTPYGraphErrorData::yErrorStyle */ inline void setValueErrorStyle(JKQTPErrorPlotstyle __value) { setYErrorStyle(__value); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorStyle */ + /** \copydoc JKQTPYGraphErrorData::yErrorStyle */ inline JKQTPErrorPlotstyle getValueErrorStyle() const { return getYErrorStyle(); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorColumn */ + /** \copydoc JKQTPYGraphErrorData::yErrorColumn */ inline void setValueErrorColumn(int __value) { setYErrorColumn(__value); } - /** \copydoc JKQTPFilledCurveXGraph::yErrorColumnLower */ + /** \copydoc JKQTPYGraphErrorData::yErrorColumnLower */ inline void setValueErrorColumnLower(int __value) { setYErrorColumnLower(__value); } @@ -260,35 +260,35 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPFilledCurveYErrorGraph: public JKQTPFilledCurv virtual bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero) override; - /** \copydoc JKQTPFilledCurveXGraph::xErrorSymmetric */ + /** \copydoc JKQTPXGraphErrorData::xErrorSymmetric */ inline void setValueErrorSymmetric(bool __value) { setXErrorSymmetric(__value); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorSymmetric */ + /** \copydoc JKQTPXGraphErrorData::xErrorSymmetric */ inline bool getValueErrorSymmetric() const { return getXErrorSymmetric(); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorColumnLower */ + /** \copydoc JKQTPXGraphErrorData::xErrorColumnLower */ inline int getValueErrorColumnLower() const { return getXErrorColumnLower(); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorColumn */ + /** \copydoc JKQTPXGraphErrorData::xErrorColumn */ inline int getValueErrorColumn() const { return getXErrorColumn(); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorStyle */ + /** \copydoc JKQTPXGraphErrorData::xErrorStyle */ inline void setValueErrorStyle(JKQTPErrorPlotstyle __value) { setXErrorStyle(__value); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorStyle */ + /** \copydoc JKQTPXGraphErrorData::xErrorStyle */ inline JKQTPErrorPlotstyle getValueErrorStyle() const { return getXErrorStyle(); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorColumn */ + /** \copydoc JKQTPXGraphErrorData::xErrorColumn */ inline void setValueErrorColumn(int __value) { setXErrorColumn(__value); } - /** \copydoc JKQTPFilledCurveXGraph::xErrorColumnLower */ + /** \copydoc JKQTPXGraphErrorData::xErrorColumnLower */ inline void setValueErrorColumnLower(int __value) { setXErrorColumnLower(__value); } diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h index e76dbbebcd..38409e5dc8 100644 --- a/lib/jkqtplotter/jkqtpbaseplotter.h +++ b/lib/jkqtplotter/jkqtpbaseplotter.h @@ -131,7 +131,6 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPPaintDeviceAdapter { *. * * - * * \section jkqtplotter_base_systems_baseplotter Coordinate Systems and Transformations * These topics are discussed in the help for JKQTPCoordinateAxis. There is a set of coordinate transform * methods (x2p(), y2p(), p2x(), p2y() which only call the respective methods in xAxis and yAxis objects. @@ -253,7 +252,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPPaintDeviceAdapter { * \image html jkqtbaseplotter_synchronization_withgridprint.png "Printing with grid-printing-mode activated" * - when you zoom/pan in one of the plots (e.g. using the mouse), the other plots will not adapt their * axes to match the new area, but especially in cases as in the image above it would be beneficial, - * that tha x-axis of the plot at the bottom follows the x-axis of the plot above etc.
+ * that the x-axis of the plot at the bottom follows the x-axis of the plot above etc.
* \image html jkqtbaseplotter_synchronization_nonsyncedxrange.png * . * @@ -321,13 +320,60 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPPaintDeviceAdapter { * * \see See \ref JKQTPlotterMultiPlotLayout for an extensive example of the functionality. * - * * \section jkqtplotter_base_userprops User Properties * There is a subset of options that describe how the user interacted with the plotter (export/print scaling factors etc, save directories, * other export settings, ...). These are not stored/loaded using saveSettings() and loadSettings(), but using saveUserSettings() and loadUserSettings(). * These methods MAY (strictly optional and turned off by default) be called by saveSettings() and loadSettings(), if the property userSettigsFilename ( \copybrief userSettigsFilename )is * set (not-empty). In this case the suer settings are stored/loaded also everytime they are changed by the user or programmatically. + * + * \section jkqtplotter_usage_baseplotter JKQTBasePlotter Usage + * + * \subsection jkqtplotter_usage_baseplotter_in_widget JKQTBasePlotter as Basis for JKQTPlotter + * + * Most commonly this invisible plotter class is used as basis for the widget JKQTPlotter. + * \see JKQTPlotter + * + * \subsection jkqtplotter_usage_baseplotter_standalonw JKQTBasePlotter Standalone Usage + * + * But it is also possible to use it in a standalone fashion to generate plots without generating a window. + * Note that the baseplotter class still requires the \c widgets+gui modules of Qt, because it contains code to e.g. + * display pint or export preview dialogs! + * + * Here is an example of how to do this (it is taken from the command-line tool \ref JKQTPlotterDocImageRenderCmdLineTool): + * + * First we generate the JKQTBasePlotter object and add some data to the internal JKQTPDatastore + * \code + * JKQTBasePlotter plot(true); + * JKQTPDatastore* ds=plot.getDatastore(); + * size_t cx=ds->addCopiedColumn(QVector{-1.5,-0.5,0.5,1.5,2.5},"x"); + * size_t cy=ds->addCopiedColumn(QVector{-0.75,-0.3,-0.05,0.2,0.65},"y"); + * \endcode + * + * Now we set the range of x/y plot coordinates ... + * \code + * plot.setXY(-0.8,2.2,-0.5,0.7); + * \endcode + * and the size of the widget, i.e. the size of the plot in the windowing system. + * \code + * plot.setWidgetSize(150,50); + * \endcode + * Now we can add graphs to the plotter, e.g. + * \code + * JKQTPXYLineGraph* g=new JKQTPXYLineGraph(&plot); + * g->setXColumn(cx); + * g->setYColumn(cy); + * plot.addGraph(g); + * \endcode + * Finally we store an image of the plot as PNG-file: + * \code + * plot.saveAsPixelImage("output.png", false, "png"); + * \endcode + * Alternatively you can obtain a QImage of the plot using grabPixelImage() or copy the + * image to the clipboard using copyPixelImage(). ALso storages as PDF and SVG is available via + * saveAsPDF() and saveAsSVG(). + * + * With simlar code you can also integrate JKQTBasePlotter into your own widgets. */ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject { Q_OBJECT @@ -362,7 +408,7 @@ class JKQTPLOTTER_LIB_EXPORT JKQTBasePlotter: public QObject { /** \brief class constructor * * if \a datastore_internal is \c true then the constructor will create an internal datastore object. The datastore - * will be managed (freed) by this class. If \a datastore_internal is \c false the class will use tha datastore provided + * will be managed (freed) by this class. If \a datastore_internal is \c false the class will use the datastore provided * in \a datast as an external datastore. You can modify this later by using useInternalDatastore() and useExternalDatastore(). */ explicit JKQTBasePlotter(bool datastore_internal, QObject* parent=nullptr, JKQTPDatastore* datast=nullptr); diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h index cb4749daae..725abb7888 100644 --- a/lib/jkqtplotter/jkqtpdatastorage.h +++ b/lib/jkqtplotter/jkqtpdatastorage.h @@ -99,13 +99,13 @@ enum class JKQTPDatastoreItemFormat { * as a 2D image. In the latter case, the data is assumed to be ordered in row-major ordering (i.e. row for row). * * You can generate new columns e.g. by: - * - addColumn() which either generates internally managed (and extensible) columns, or accepts a simple \c double* pointer + *
    + *
  • addColumn() which either generates internally managed (and extensible) columns, or accepts a simple \c double* pointer * to external. In the latter case owner-ship may be transferred to the datastore, but can also retain externally. - * - addImageColumn() adds a column that should be interpreted as an image with given width and height (i.e. a row-major + *
  • addImageColumn() adds a column that should be interpreted as an image with given width and height (i.e. a row-major * matrix with \c width columns and \c height rows. - * - copyColumn() duplicates an existing column - * - addCopiedColumn() copies an external dataset into the datastore. e.g. with code like: - * + *
  • copyColumn() duplicates an existing column + *
  • addCopiedColumn() copies an external dataset into the datastore. e.g. with code like: * \code{.cpp} * QVector X, Y; * const int Ndata=100; @@ -119,17 +119,16 @@ enum class JKQTPDatastoreItemFormat { * linegraph->setXColumn(datastore->addCopiedColumn(X, "x")); * linegraph->setYColumn(datastore->addCopiedColumn(Y, "y")); * \endcode - * - * - addLinearColumn() adds a column with linearly increasing numbers (in a given range) - * - addLogColumn() and addDecadeLogColumn() add columns with logarithmically spaced values - * - addLinearGridColumns() adds two columns which represent x- and y- coordinates of points + *
  • addLinearColumn() adds a column with linearly increasing numbers (in a given range) + *
  • addLogColumn() and addDecadeLogColumn() add columns with logarithmically spaced values + *
  • addLinearGridColumns() adds two columns which represent x- and y- coordinates of points * on a rectangular grid (useful for calculating image data) - * - addCalculatedColumn() calculates a column, based on row numbers and a C++ functor - * - addColumnCalculatedFromColumn() calculates a column, based on another column data - * - addCopiedMap() copies data from a std::map/QMap into two columns - * - ... several more functions for specific cases exist. - * - Also note that there are even library extensions that allow to import data directly from OpenCV matrices: JKQTPCopyCvMatToColumn() - * . + *
  • addCalculatedColumn() calculates a column, based on row numbers and a C++ functor + *
  • addColumnCalculatedFromColumn() calculates a column, based on another column data + *
  • addCopiedMap() copies data from a std::map/QMap into two columns + *
  • ... several more functions for specific cases exist. + *
  • Also note that there are even library extensions that allow to import data directly from OpenCV matrices: JKQTPCopyCvMatToColumn() + *
* * Of course columns can also be deleted by calling: * - deleteColumn() diff --git a/lib/jkqtplotter/jkqtpgraphsbase.h b/lib/jkqtplotter/jkqtpgraphsbase.h index 6d3ceda11c..93eb6fc408 100644 --- a/lib/jkqtplotter/jkqtpgraphsbase.h +++ b/lib/jkqtplotter/jkqtpgraphsbase.h @@ -165,22 +165,23 @@ class JKQTPLOTTER_LIB_EXPORT JKQTPPlotElement: public QObject { You can use JKQTPIsOKFloat() to check whether a valid distance was returned! - Since tha graph base class does not have any knowledge about how to perform a hit test on you specific graph, there is only a + Since the graph base class does not have any knowledge about how to perform a hit test on you specific graph, there is only a very general implementation in this class, which does not actually search through the graph itself, but searches through extra data that hs to be written during draw() and is stored in m_hitTestData. The implentation this base-class only searches this list of points+metadata to implement a basic hit-test. If the list is empty, of no close-by points are found (default), then hitTest() will simply return \a NAN. When writing a new graph, you can therefore implement hitTest() in one of these ways: - # You simply fill m_hitTestData with appropriate data and rely on the implementation in JKQTPPlotElement to do the work for you: +
    +
  1. You simply fill m_hitTestData with appropriate data and rely on the implementation in JKQTPPlotElement to do the work for you: You then need to call clearHitTestData() at the start of your draw() function and whenever you draw a datapoint, you add its location and metadata to the internal storage with addHitTestData() - # You derive from a graph class that already has an implementation. JKQTPXYGraph is an example of this. That class searches +
  2. You derive from a graph class that already has an implementation. JKQTPXYGraph is an example of this. That class searches through all x-/y-coordinates in the internally known columns and even takes into account possible graph errors in the label, when the graph is also derived from JKQTPXGraphErrorData or JKQTPYGraphErrorData. This implementation therefore covers most graph types pre-packaged with JKQTPlotter - # You implement the function from scratch - . +
  3. You implement the function from scratch +
\see addHitTestData(), clearHitTestData(), m_hitTestData, HitTestLocation diff --git a/lib/jkqtplotter/jkqtplotter.h b/lib/jkqtplotter/jkqtplotter.h index eb8f6277d1..5827397956 100644 --- a/lib/jkqtplotter/jkqtplotter.h +++ b/lib/jkqtplotter/jkqtplotter.h @@ -106,33 +106,35 @@ JKQTPLOTTER_LIB_EXPORT void initJKQTPlotterResources(); * \image html simpletest.png * * Starting from this basic example, you can observe several important principles: - * # Data is stored in an (internal) instance of JKQTPDatastore, which is accessible through + *
    + *
  1. Data is stored in an (internal) instance of JKQTPDatastore, which is accessible through * JKQTPlotter::getDatastore(). * This datastore can either own its data (which is done here, as we copy the data into the store * by calling JKQTPDatastore::addCopiedColumn(), or it can merely reference to the data (then * data needs to be available as array of \c double values). - * # Naming conventions: - * - \b plot is the complete drawn image, including the axes, the graphs, the key and all other visual elements - * - plot element any sub element of the plot, e.g. a single coordinate axis, the key, but also any graph/curve - * - \b graph is a single curve/image/geometric element in the plot - * - geometric element is a special graph that does not represent a curve based on data from the JKQTPDatastore, - * but a single graphic element, like a rectangle/circle/line/..., some text, a single symbol - * - \b key is the legend of the plot - * - coordinate axis is each of the x- or y-axis (there might be addition axes, e.g. when showing a color-scale) - * . - * # Each graph is represented by a class derived from JKQTPPlotElement (in the example we instanciated a JKQTPXYLineGraph, + *
  2. Naming conventions (excerpt from \ref jkqtplotter_naming ): + *
      + *
    • \b plot is the complete drawn image, including the axes, the graphs, the key and all other visual elements + *
    • plot element any sub element of the plot, e.g. a single coordinate axis, the key, but also any graph/curve + *
    • \b graph is a single curve/image/geometric element in the plot + *
    • geometric element is a special graph that does not represent a curve based on data from the JKQTPDatastore, + * but a single graphic element, like a rectangle/circle/line/..., some text, a single symbol + *
    • \b key is the legend of the plot + *
    • coordinate axis is each of the x- or y-axis (there might be addition axes, e.g. when showing a color-scale) + *
    + *
  3. Each graph is represented by a class derived from JKQTPPlotElement (in the example we instanciated a JKQTPXYLineGraph, * which shows data as a scatter of symbols that may (or may not) be connected by a line). * Creating the graph class does not yet add it to the plotter. To add it, call JKQTPlotter::addGraph(). Only * after this sep, the graph is displayed. You can modify the apperance of the graph (e.g. colors, * name in the key ...) by setting properties in the graph class instance. - * # You can auto-zoom the axis ranges of the plot by calling JKQTPlotter::zoomToFit(), or set them + *
  4. You can auto-zoom the axis ranges of the plot by calling JKQTPlotter::zoomToFit(), or set them * exlicitly by calling JKQTPlotter::setXY(). The user can later zoom in/out by the mouse (and other means). * You can limit this zoom range by setting an absolute axis range, calling e.g. JKQTPlotter::setAbsoluteXY(). * The the user cannot zoom farther out than the given range(s). - * # If you want to style the plot itself, you need to set properties of the underlying JKQTBasePloter instance, which + *
  5. If you want to style the plot itself, you need to set properties of the underlying JKQTBasePloter instance, which * is accessible through JKQTPlotter::getPlotter(). If you want to style the coordinate axes, you can acces their * representing objects by caling JKQTPlotter::getXAxis() or JKQTPlotter::getYAxis(). - * . + *
* * \see \ref JKQTPlotterSimpleTest and \see JKQTPlotterQtCreator * diff --git a/lib/jkqtplotter/jkqtptools.h b/lib/jkqtplotter/jkqtptools.h index 4d39e21840..cfa4a3a064 100644 --- a/lib/jkqtplotter/jkqtptools.h +++ b/lib/jkqtplotter/jkqtptools.h @@ -573,8 +573,13 @@ struct JKQTPLOTTER_LIB_EXPORT JKQTPGridPrintingItem { -/** \brief plot styles for the error information +/** \brief specifies the plot styles for the error information, e.g. error bars, boxes, lines ... * \ingroup jkqtplotter_basegraphserrors + * + * \note This enum provides the elements for \ref JKQTPErrorPlotstyle, which is actually used + * throughout the code. + * + * \see JKQTPErrorPlotstyle, JKQTPXGraphErrorData, JKQTPYGraphErrorData */ enum JKQTPErrorPlotstyleElements { JKQTPNoError=0x00, /*!< \brief don't show error information \image html errorindicators/JKQTPNoError.png */ @@ -606,6 +611,13 @@ enum JKQTPErrorPlotstyleElements { JKQTPErrorBarsLines=JKQTPErrorBars|JKQTPErrorLines, /*!< \brief error bars and lines for each data point \image html errorindicators/JKQTPErrorBarsLines.png */ JKQTPErrorBarsPolygons=JKQTPErrorBars|JKQTPErrorPolygons, /*!< \brief error bars and polygons for each data point \image html errorindicators/JKQTPErrorBarsPolygons.png */ }; +/** \brief specifies the plot styles for the error information, e.g. error bars, boxes, lines ... + * \ingroup jkqtplotter_basegraphserrors + * + * \qFlagsNote{JKQTPErrorPlotstyle,JKQTPErrorPlotstyleElements} + * + * \see JKQTPErrorPlotstyleElements, JKQTPXGraphErrorData, JKQTPYGraphErrorData + */ Q_DECLARE_FLAGS(JKQTPErrorPlotstyle, JKQTPErrorPlotstyleElements) Q_DECLARE_OPERATORS_FOR_FLAGS(JKQTPErrorPlotstyle) diff --git a/tools/jkqtplotter_doc_imagegenerator/README.md b/tools/jkqtplotter_doc_imagegenerator/README.md index 131cc67c54..e39ab3bbe8 100644 --- a/tools/jkqtplotter_doc_imagegenerator/README.md +++ b/tools/jkqtplotter_doc_imagegenerator/README.md @@ -1,2 +1,33 @@ # Tool (JKQTMathText): Command-Line Utility jkqtplotter_doc_imagegenerator {#JKQTPlotterDocImageRenderCmdLineTool} This command-line tool is used to generate images for the documentation. + +For some of its options, it uses a JKQTBasePlotter to directly render an image without creating a visible window. The code then looks like this: + + +First we generate the JKQTBasePlotter object and add some data to the internal JKQTPDatastore +```.cpp + JKQTBasePlotter plot(true); + JKQTPDatastore* ds=plot.getDatastore(); + size_t cx=ds->addCopiedColumn(QVector{-1.5,-0.5,0.5,1.5,2.5},"x"); + size_t cy=ds->addCopiedColumn(QVector{-0.75,-0.3,-0.05,0.2,0.65},"y"); +``` + +Now we set the range of x/y plot coordinates ... +```.cpp + plot.setXY(-0.8,2.2,-0.5,0.7); +``` +and the size of the widget, i.e. the size of the plot in the windowing system. +```.cpp + plot.setWidgetSize(150,50); +``` +Now we can add graphs to the plotter, e.g. +```.cpp + JKQTPXYLineGraph* g=new JKQTPXYLineGraph(&plot); + g->setXColumn(cx); + g->setYColumn(cy); + plot.addGraph(g); +``` +Finally we store an image of the plot as PNG-file: +```.cpp + plot.saveAsPixelImage("output.png", false, "png"); +```