diff --git a/doc/Doxyfile b/doc/Doxyfile
index 02752f3ff1..703b688b15 100644
--- a/doc/Doxyfile
+++ b/doc/Doxyfile
@@ -695,7 +695,7 @@ SHOW_USED_FILES = YES
# (if specified).
# The default value is: YES.
-SHOW_FILES = YES
+SHOW_FILES = NO
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
# page. This will remove the Namespaces entry from the Quick Index and from the
@@ -813,8 +813,9 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.
-INPUT = ../lib/ \
+INPUT = . \
./dox/ \
+ ../lib \
../examples
# This tag can be used to specify the character encoding of the source files
@@ -866,10 +867,6 @@ FILE_PATTERNS = *.d \
*.f \
*.vhd \
*.vhdl \
- *.qrc \
- *.pro \
- *.ui \
- *.pri \
*.md
# The RECURSIVE tag can be used to specify whether or not subdirectories should
@@ -1028,7 +1025,7 @@ USE_MDFILE_AS_MAINPAGE =
# also VERBATIM_HEADERS is set to NO.
# The default value is: NO.
-SOURCE_BROWSER = YES
+SOURCE_BROWSER = NO
# Setting the INLINE_SOURCES tag to YES will include the body of functions,
# classes and enums directly into the documentation.
@@ -1235,7 +1232,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_STYLESHEET =
+HTML_EXTRA_STYLESHEET = jkqtplotter_stylesheet.css
# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@@ -1245,7 +1242,9 @@ HTML_EXTRA_STYLESHEET =
# files will be copied as-is; there are no commands or markers available.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_EXTRA_FILES =
+HTML_EXTRA_FILES = images/icon_code.png \
+ images/icon_note.png \
+ images/icon_see.png
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
@@ -1295,7 +1294,7 @@ HTML_TIMESTAMP = YES
# The default value is: YES.
# This tag requires that the tag GENERATE_HTML is set to YES.
-HTML_DYNAMIC_MENUS = YES
+HTML_DYNAMIC_MENUS = NO
# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
# documentation will contain sections that can be hidden and shown after the
@@ -1565,7 +1564,7 @@ EXT_LINKS_IN_WINDOW = NO
# Minimum value: 8, maximum value: 50, default value: 10.
# This tag requires that the tag GENERATE_HTML is set to YES.
-FORMULA_FONTSIZE = 12
+FORMULA_FONTSIZE = 13
# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
# generated for formulas are transparent PNGs. Transparent PNGs are not
diff --git a/doc/dot/jkqtplotter_graphhirarchy.dot b/doc/dot/jkqtplotter_graphhirarchy.dot
new file mode 100644
index 0000000000..d17c3febcd
--- /dev/null
+++ b/doc/dot/jkqtplotter_graphhirarchy.dot
@@ -0,0 +1,64 @@
+digraph
+{
+ // LATEX_PDF_SIZE
+ bgcolor="transparent";
+ edge [fontname="FreeSans",fontsize="12",labelfontname="FreeSans",labelfontsize="12"];
+ node [fontname="FreeSans",fontsize="12",shape=record];
+ rankdir="LR";
+
+ {
+ rank=same;
+ JKQTPPlotElement [URL="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="JKQTPPlotElement"];
+ noteJKQTPGraph [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nactual graphs"];
+ JKQTPGraph -> noteJKQTPGraph [style=dashed,arrowhead=none];
+ JKQTPPlotObject [URL="JKQTPPlotObject"];
+ noteJKQTPPlotObject [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\nnon-graph elements,\ne.g. geometric elements"];
+ JKQTPPlotObject -> noteJKQTPPlotObject [style=dashed,arrowhead=none];
+ }
+
+
+ {
+ rank=same;
+
+ JKQTPXYGraph [URL="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="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="JKQTPImageBase"]
+ noteJKQTPImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngraphsthat represent \n2D images/matrices"];
+ JKQTPImageBase -> noteJKQTPImageBase [style=dashed,arrowhead=none];
+ JKQTPGeoBaseLine [URL="JKQTPGeoBaseLine"];
+ noteJKQTPGeoBaseLine [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngeometric elements\nthat need line properties\n (color, width, ...)"];
+ JKQTPGeoBaseLine -> noteJKQTPGeoBaseLine [style=dashed,arrowhead=none];
+ }
+
+ {
+ rank=same;
+
+ JKQTPMathImageBase [URL="JKQTPMathImageBase"]
+ noteJKQTPMathImageBase [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngeometric elements\nthat need area fill properties\n (fillcolor, pattern, ...)"];
+ JKQTPMathImageBase -> noteJKQTPMathImageBase [style=dashed,arrowhead=none];
+
+ JKQTPGeoBaseFilled [URL="JKQTPGeoBaseFilled"];
+ noteJKQTPGeoBaseFilled [shape="note", color="lightyellow",style=filled,fontsize=8,label="base class for all\ngeometric elements\nthat need area fill properties\n (fillcolor, pattern, ...)"];
+ JKQTPGeoBaseFilled -> noteJKQTPGeoBaseFilled [style=dashed,arrowhead=none];
+}
+ JKQTPGraph -> JKQTPXYGraph
+ JKQTPGraph -> JKQTPSingleColumnGraph
+ JKQTPGraph -> JKQTPImageBase -> JKQTPMathImageBase
+
+
+ JKQTPPlotElement -> JKQTPGraph
+ JKQTPPlotElement -> JKQTPPlotObject
+ JKQTPPlotObject -> JKQTPGeoBaseLine -> JKQTPGeoBaseFilled
+
+}
diff --git a/doc/dox/jkqtplotter.dox b/doc/dox/jkqtplotter.dox
index 8be8bfda27..ab081d01cc 100644
--- a/doc/dox/jkqtplotter.dox
+++ b/doc/dox/jkqtplotter.dox
@@ -77,12 +77,56 @@ There are these major subgroups:
\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
+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.
+
+\dotfile jkqtplotter_graphhirarchy.dot
+
+\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 JKQTPColorPaletteTools, 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
@@ -93,6 +137,15 @@ These classes are used by JKQTPlotterBase to output the plot
\defgroup jkqtplotter_linesymbolgraphs Line/Symbol Graphs
\ingroup jkqtplotter_graphsgroup
+\defgroup jkqtplotter_linesymbolgraphs_simple Basic Line/Scatter Graphs
+\ingroup jkqtplotter_linesymbolgraphs
+
+\defgroup jkqtplotter_linesymbolgraphs_param Parametrized Line/Scatter Graphs
+\ingroup jkqtplotter_linesymbolgraphs
+
+\defgroup jkqtplotter_filledgraphs Filled Polygon/Area Graphs
+\ingroup jkqtplotter_graphsgroup
+
\defgroup jkqtplotter_functiongraphs Function Graphs
\ingroup jkqtplotter_linesymbolgraphs
diff --git a/doc/dox/mainpage.dox b/doc/dox/mainpage.dox
index 86d0fb82e4..c693f818a3 100644
--- a/doc/dox/mainpage.dox
+++ b/doc/dox/mainpage.dox
@@ -9,46 +9,46 @@ This software is licensed under the term of the GNU Lesser General Public Licens
\image html examplesbanner.png
\section jkqtp_main_features Main Features
-- Extensive Scientific 2D Plotting framework (JKQTPlotter/JKQTBasePlotter)
+- Extensive Scientific 2D Plotting framework (JKQTPlotter / JKQTBasePlotter)
- high-quality plotting
- no other dependencies than Qt >=4.7 (compatible with Qt 5.xx)
- highly customizable axes/grids (linear/log, date/time, custom ticks ...)
- integrated LaTeX parser/renderer JKQTMathText for axis labels, ticks, notes ...
- - extensive user-interactions pre-programmed (several zooming modes, selecting regions, custom context menus, switch graph visibility, ...)
- - full print and export (PDF,PNG,...) support with preview and parametrization out-the-box
+ - \ref JKQTPLOTTER_USERINTERACTION "extensive user-interactions pre-programmed (several zooming modes, selecting regions, custom context menus, switch graph visibility, ...)"
+ - \ref jkqtbaseplotter_dataexport_print "full print and export (PDF,PNG,...) support with preview and parametrization out-the-box "
- highly customizable look and feel
- - supports the Qt layout system for graphs and allows to symchronize several graphs with each other
-- centralized data management in an internal datastore:
- - data organized by columns, can also represent image data (ropw-major)
+ - \ref JKQTBASEPLOTTER_SYNCMULTIPLOT "supports the Qt layout system for graphs and allows to symchronize several graphs with each other "
+- \ref jkqtpdatastorage "centralized data management in an internal datastore)":
+ - data organized by columns, can also represent image data (row-major)
- allows to reuse a column in several graphs
- - access via Qt's model view framework
+ - \ref JKQTPDatastoreModel "access via Qt's model view framework"
- external or internal datasets
- complete with GUI (table view)
- built-in export capabilities for datatables (e.g. to CSV, SYLK, ...)
-- large variety of graphs that can be added to a plot, e.g.:
- - scatter-plots (also parametrized color/size/symbol by a third data-column)
- - line graphs, step graphs, impulses
- - filled curves
- - barcharts (also stacked)
+- \ref jkqtplotter_elements "large variety of graphs that can be added to a plot", e.g.:
+ - \ref jkqtplotter_linesymbolgraphs_simple "scatter-plots" (also \ref jkqtplotter_linesymbolgraphs_param "parametrized color/size/symbol by a third data-column")
+ - \ref jkqtplotter_linesymbolgraphs "line graphs, step graphs", \ref jkqtplotter_barssticks "impulses"
+ - \ref jkqtplotter_filledgraphs "filled curves"
+ - \ref jkqtplotter_barssticks "barcharts (also stacked)"
- extensive support for different styles of error indicators
- - integrated mathematical function parser for function plots (with intelligent rendering algorithm)
- - line/scatter graphs can also be based on C/C++ functions instead of data series (C++11 support!)
- - statistical plots (e.g. boxplots)
- - extensive library of image plots (inclusing different color-scale modes, RGBA-plots, overlays/masks)
- - contour plots
- - geometric forms/annotations, see: \ref jkqtplotter_geoplots
+ - \ref jkmp "integrated mathematical function parser for function plots (with intelligent rendering algorithm)"
+ - \ref jkqtplotter_functiongraphs "line/scatter graphs can also be based on C/C++ functions instead of data series (C++11 support!)"
+ - \ref jkqtplotter_statgraphs "statistical plots (e.g. boxplots)"
+ - \ref jkqtplotter_imagelots_elements "extensive library of image plots" (inclusing different color-scale modes, RGBA-plots, overlays/masks)
+ - \ref jkqtplotter_imagelots_contour "contour plots"
+ - \ref jkqtplotter_geoplots "geometric forms/annotations"
- can be easily extended by deriving a new graph from JKQTPPlotElement or JKQTPPlotObject
-- optional: OpenCV interface, see: \ref jkqtpopencvinterface
-- integrated LaTeX parser/renderer JKQTMathText:
+- \ref jkqtpopencvinterface "optional: OpenCV interface"
+- integrated LaTeX parser/renderer JKQTMathText :
- pure C++
- no dependencies in particular no installed LaTeX required
- can be used independently of JKQTPlotter
- - see: \ref jkqtmathtext
-- a second plotter widget JKQTFastPlotter:
+ - for more details, see: \ref jkqtmathtext
+- an additional, simplified but speed-optimized plotter widget JKQTFastPlotter :
- is optimized for fast plotting, but is not as feature-rich as JKQTPlotter
- may be used independently of JKQTPlotter
- - \see jkqtfastplotter
-- extensive set of Examples and Tutorials, see: \ref exampleTutorialProjects
+ - for more details, see: \ref jkqtfastplotter
+- \ref exampleTutorialProjects "extensive set of Examples and Tutorials"
- extensive doxygen-generated Online-Documentation (http://jkriege2.github.io/JKQTPlotter/index.html)
- source code hosted&developed on GitHub https://github.com/jkriege2/JKQTPlotter (including continuous integration builds: https://ci.appveyor.com/project/jkriege2/jkqtplotter/branch/master)
diff --git a/doc/images/Sicherungskopie_von_jkqtplotter_gridprint.cdt b/doc/images/Sicherungskopie_von_jkqtplotter_gridprint.cdt
new file mode 100644
index 0000000000..4fde82c845
Binary files /dev/null and b/doc/images/Sicherungskopie_von_jkqtplotter_gridprint.cdt differ
diff --git a/doc/images/graduation_cap.svg b/doc/images/graduation_cap.svg
new file mode 100644
index 0000000000..bb4c0d9b17
--- /dev/null
+++ b/doc/images/graduation_cap.svg
@@ -0,0 +1,12 @@
+
diff --git a/doc/images/high_priority.svg b/doc/images/high_priority.svg
new file mode 100644
index 0000000000..58ac7d5b5f
--- /dev/null
+++ b/doc/images/high_priority.svg
@@ -0,0 +1,4 @@
+
diff --git a/doc/images/icon_code.cdr b/doc/images/icon_code.cdr
new file mode 100644
index 0000000000..c2ba70e01b
Binary files /dev/null and b/doc/images/icon_code.cdr differ
diff --git a/doc/images/icon_code.png b/doc/images/icon_code.png
new file mode 100644
index 0000000000..0da4a9f7f3
Binary files /dev/null and b/doc/images/icon_code.png differ
diff --git a/doc/images/icon_note.cdr b/doc/images/icon_note.cdr
new file mode 100644
index 0000000000..316fd007d8
Binary files /dev/null and b/doc/images/icon_note.cdr differ
diff --git a/doc/images/icon_note.png b/doc/images/icon_note.png
new file mode 100644
index 0000000000..ff106434ec
Binary files /dev/null and b/doc/images/icon_note.png differ
diff --git a/doc/images/icon_note2.cdr b/doc/images/icon_note2.cdr
new file mode 100644
index 0000000000..7a948c85ca
Binary files /dev/null and b/doc/images/icon_note2.cdr differ
diff --git a/doc/images/icon_see.cdr b/doc/images/icon_see.cdr
new file mode 100644
index 0000000000..4cc1a2ecfd
Binary files /dev/null and b/doc/images/icon_see.cdr differ
diff --git a/doc/images/icon_see.png b/doc/images/icon_see.png
new file mode 100644
index 0000000000..aae2b0aa2a
Binary files /dev/null and b/doc/images/icon_see.png differ
diff --git a/doc/images/info.svg b/doc/images/info.svg
new file mode 100644
index 0000000000..0842a79c3e
--- /dev/null
+++ b/doc/images/info.svg
@@ -0,0 +1,5 @@
+
diff --git a/doc/images/jkqtbaseplotter_synchronization.png b/doc/images/jkqtbaseplotter_synchronization.png
new file mode 100644
index 0000000000..9e46347cff
Binary files /dev/null and b/doc/images/jkqtbaseplotter_synchronization.png differ
diff --git a/doc/images/jkqtbaseplotter_synchronization_nogridprint.png b/doc/images/jkqtbaseplotter_synchronization_nogridprint.png
new file mode 100644
index 0000000000..98ab765a96
Binary files /dev/null and b/doc/images/jkqtbaseplotter_synchronization_nogridprint.png differ
diff --git a/doc/images/jkqtbaseplotter_synchronization_nonsyncedxrange.png b/doc/images/jkqtbaseplotter_synchronization_nonsyncedxrange.png
new file mode 100644
index 0000000000..180c4a5ca5
Binary files /dev/null and b/doc/images/jkqtbaseplotter_synchronization_nonsyncedxrange.png differ
diff --git a/doc/images/jkqtbaseplotter_synchronization_unequalaxes.png b/doc/images/jkqtbaseplotter_synchronization_unequalaxes.png
new file mode 100644
index 0000000000..5118263dae
Binary files /dev/null and b/doc/images/jkqtbaseplotter_synchronization_unequalaxes.png differ
diff --git a/doc/images/jkqtbaseplotter_synchronization_withgridprint.png b/doc/images/jkqtbaseplotter_synchronization_withgridprint.png
new file mode 100644
index 0000000000..57da1e63a3
Binary files /dev/null and b/doc/images/jkqtbaseplotter_synchronization_withgridprint.png differ
diff --git a/doc/images/jkqtplotter_gridprint.cdr b/doc/images/jkqtplotter_gridprint.cdr
new file mode 100644
index 0000000000..42a0e3fe5c
Binary files /dev/null and b/doc/images/jkqtplotter_gridprint.cdr differ
diff --git a/doc/images/jkqtplotter_gridprint.png b/doc/images/jkqtplotter_gridprint.png
new file mode 100644
index 0000000000..c5128df0b3
Binary files /dev/null and b/doc/images/jkqtplotter_gridprint.png differ
diff --git a/doc/images/jkqtplotter_sortedx.png b/doc/images/jkqtplotter_sortedx.png
new file mode 100644
index 0000000000..9932c26060
Binary files /dev/null and b/doc/images/jkqtplotter_sortedx.png differ
diff --git a/doc/images/jkqtplotter_sortedy.png b/doc/images/jkqtplotter_sortedy.png
new file mode 100644
index 0000000000..d0eab6e54e
Binary files /dev/null and b/doc/images/jkqtplotter_sortedy.png differ
diff --git a/doc/images/jkqtplotter_unsorted.png b/doc/images/jkqtplotter_unsorted.png
new file mode 100644
index 0000000000..64ba5e41d2
Binary files /dev/null and b/doc/images/jkqtplotter_unsorted.png differ
diff --git a/doc/images/services.svg b/doc/images/services.svg
new file mode 100644
index 0000000000..c1e76ae046
--- /dev/null
+++ b/doc/images/services.svg
@@ -0,0 +1,4 @@
+
diff --git a/doc/images/survey.svg b/doc/images/survey.svg
new file mode 100644
index 0000000000..366eb2fd6f
--- /dev/null
+++ b/doc/images/survey.svg
@@ -0,0 +1,16 @@
+
diff --git a/doc/jkqtplotter_stylesheet.css b/doc/jkqtplotter_stylesheet.css
new file mode 100644
index 0000000000..5f39abc585
--- /dev/null
+++ b/doc/jkqtplotter_stylesheet.css
@@ -0,0 +1,134 @@
+/* Customized Stylesheet for JKQTPlotter */
+
+dl.section {
+ margin-left: 7px;
+}
+
+dl.note {
+ padding-left: 39px;
+ border-color: black;
+ border-width: 2px;
+ border-style: solid;
+ border-left-width: 4px;
+ border-left-color: #D0C000;
+ background-image: linear-gradient(135deg, #fdfcfb 0%, #e2d1c3 100%);
+ border-radius: 8px;
+ background-image: url(icon_note.png);
+ background-position: 3px 3px;
+ background-repeat: no-repeat;
+ min-height: 32px;
+}
+
+dl.see {
+ padding-left: 39px;
+ border-color: black;
+ border-width: 2px;
+ border-style: solid;
+ border-left-width: 4px;
+ border-left-color: #55AAD1;
+ background-image: linear-gradient(135deg, #fff1eb 0%, #ace0f9 100%);
+ border-radius: 8px;
+ background-image: url(icon_see.png);
+ background-position: 3px 3px;
+ background-repeat: no-repeat;
+ min-height: 32px;
+}
+
+div.fragment {
+ padding: 4px;
+ padding-left: 39px;
+ border-color: black;
+ border-width: 1px;
+ border-style: solid;
+ border-left-width: 8px;
+ border-left-color: #666699;
+ background-image: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
+ background-image: url(icon_code.png);
+ background-position: 3px 3px;
+ background-repeat: no-repeat;
+ min-height: 32px;
+}
+
+h2.memtitle {
+ padding: 8px;
+ border-top: 1px solid #A8B8D9;
+ border-left: 1px solid #A8B8D9;
+ border-right: 1px solid #A8B8D9;
+ border-bottom: 0px;
+ border-top-right-radius: 4px;
+ border-top-left-radius: 4px;
+ margin-bottom: -1px;
+ background-image: url('nav_f.png');
+ background-repeat: repeat-x;
+ background-color: #E2E8F2;
+ line-height: 1.25;
+ font-weight: 300;
+ float: left;
+ margin: 0px;
+ margin-right: 15px;
+ width: auto;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ margin-left: -5pt;
+ margin-bottom: 32px;
+ margin-right: 15px;
+ padding: 4px;
+ background: #eeeeee;
+ width: 75%;
+}
+
+h1 {
+ border-bottom: 2px solid black;
+ border-left: 2px solid black;
+ font-size: 22pt;
+}
+
+h2 {
+ border-bottom: 1.5px solid black;
+ border-left: 1.5px solid black;
+ font-size: 16pt;
+ font-weight: 150%;
+}
+
+h3 {
+ border-bottom: 1px solid black;
+ border-left: 1px solid black;
+ font-size: 14pt;
+ font-weight: 100%;
+}
+
+h2.groupheader {
+ border-left: 0px;
+ border-top: 0px;
+ border-bottom-width: 8pt;
+ background: #dbdbea;
+ font-size: 28pt;
+}
+
+div.title {
+ font-size: 28pt;
+}
+
+div.image {
+ padding: 4px;
+ text-align: left;
+ margin-left: 32pt;
+}
+
+div.caption {
+ margin-left: 64pt;
+ text-align: left;
+}
+
+table.params {
+ border: 1px solid black;
+ border-left-width: 8px;
+ border-left-color: #66001a;
+ width: 90%;
+ padding: 0px;
+}
+
+td.paramname {
+ margin: 0px;
+}
\ No newline at end of file
diff --git a/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h
index b434f1ce82..945b5df281 100644
--- a/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h
+++ b/examples/jkqtplot_test/EmfEngine/src/EmfEngine.h
@@ -39,12 +39,12 @@
#ifdef EMFENGINE_DLL
# ifdef EMFENGINE_DLL_BUILD
-# define EMFENGINELIB_EXPORT Q_DECL_EXPORT
+# define EMFENGINEJKQTP_LIB_EXPORT Q_DECL_EXPORT
# else
-# define EMFENGINELIB_EXPORT Q_DECL_IMPORT
+# define EMFENGINEJKQTP_LIB_EXPORT Q_DECL_IMPORT
# endif
#else
-# define EMFENGINELIB_EXPORT
+# define EMFENGINEJKQTP_LIB_EXPORT
#endif
#ifdef HAVE_GDIPLUS
@@ -120,7 +120,7 @@ private:
void resetClipping();
};
-class EMFENGINELIB_EXPORT EmfPaintDevice : public QPaintDevice
+class EMFENGINEJKQTP_LIB_EXPORT EmfPaintDevice : public QPaintDevice
{
public:
EmfPaintDevice(const QSize& s, const QString& fileName);
diff --git a/examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox b/examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox
index 4c8a79fd9f..dea1bb0078 100644
--- a/examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox
+++ b/examples/jkqtplot_test/QTeXEngine/doc/qtexengine.dox
@@ -2,8 +2,8 @@
\mainpage QTeXEngine - TeX support for Qt
QTeXEngine enables Qt based applications to easily export graphics created using the
-QPainter class to TeX.
-It is built on top of QPaintEngine
+QPainter class to TeX.
+It is built on top of QPaintEngine
and uses the TikZ/Pgf graphic systems for TeX.
\section license License
@@ -28,7 +28,7 @@ and uses the TikZ/Pgf graphic
Have a look at the QTeXEngine.pro project file. It is prepared for building
static libraries in Win32 and Unix/X11 environments.
If you don't know what to do with it, read the file \ref qtexengineinstall and/or
- Trolltechs qmake manual.
+ Trolltechs qmake manual.
\section support Support
If you are looking for technical support contact ion.vasilief@proindependent.com.
diff --git a/examples/jkqtplot_test/TestWidgetGraphs.cpp b/examples/jkqtplot_test/TestWidgetGraphs.cpp
index 18fa067c8e..380d6e0467 100644
--- a/examples/jkqtplot_test/TestWidgetGraphs.cpp
+++ b/examples/jkqtplot_test/TestWidgetGraphs.cpp
@@ -47,8 +47,7 @@ TestWidgetGraphs::TestWidgetGraphs(QWidget *parent) :
setLayout(layout);
resize(1000, 800);
- plotBot->synchronizeToMaster(plot, true, false);
- connect(plot, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTPlotter*)), plotBot, SLOT(synchronizeXAxis(double,double,double,double,JKQTPlotter*)));
+ plotBot->synchronizeToMaster(plot, JKQTBasePlotter::sdXAxis, true, true, true);
plot->getPlotter()->setGridPrinting(true);
plot->getPlotter()->addGridPrintingPlotter(0,1,plotBot->getPlotter());
plot->getPlotter()->addGridPrintingPlotter(0,2,plotBot2->getPlotter());
@@ -332,9 +331,9 @@ void TestWidgetGraphs::setESSymbol(int /*index*/)
void TestWidgetGraphs::setSortOrder2(int index)
{
- if (index==0) pltePlot2->setSortData(JKQTPXYGraph::Unsorted);
- if (index==1) pltePlot2->setSortData(JKQTPXYLineGraph::SortedX);
- if (index==2) pltePlot2->setSortData(JKQTPXYLineGraph::SortedY);
+ if (index==0) pltePlot2->setDataSortOrder(JKQTPXYGraph::Unsorted);
+ if (index==1) pltePlot2->setDataSortOrder(JKQTPXYLineGraph::SortedX);
+ if (index==2) pltePlot2->setDataSortOrder(JKQTPXYLineGraph::SortedY);
plotBot->redrawPlot();
}
diff --git a/examples/test_multiplot/README.md b/examples/test_multiplot/README.md
index 80cad94aea..0d67b01037 100644
--- a/examples/test_multiplot/README.md
+++ b/examples/test_multiplot/README.md
@@ -6,7 +6,7 @@ The source code of the main application can be found in [`test_multiplot.cpp`](
First three plots are generated and put into a [QGridLayout](http://doc.qt.io/qt-5/qgridlayout.html):
```.cpp
-// 1. create a widget
+ // 1. create a widget
QWidget mainWidget;
mainWidget.setWindowTitle("JKQTPlotter(s) in a QGridLayout");
@@ -37,11 +37,11 @@ First three plots are generated and put into a [QGridLayout](http://doc.qt.io/qt
With this simple setup, all three plots would be arranged by the QLayout, but they were all independent. This example could be part of a data fitting application, where the main plot shows data and a fit curve. A plot below that will display the residulas (errors) of the fit. Now if a user zooms one of the plots, he would expect that athe x-axes of the two plots are synchronized. The same for a third plot on the rhs of the residuals, which will show a residual histogram. This linking of the axes can be achieved by the following code:
```.cpp
- // 3.4 synchronize width/x-axis of plotResid to width/x-axis of plotMain
- plotResid->getPlotter()->synchronizeToMaster(plotMain->getPlotter(), true, false, true, true);
+ // 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain
+ plotResid->synchronizeToMaster(plotMain, JKQTBasePlotter::sdXAxis, true, true, true);
- // 3.5 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid
- plotResidHist->getPlotter()->synchronizeToMaster(plotResid->getPlotter(), false, true, true, true);
+ // 3.4 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid
+ plotResidHist->synchronizeToMaster(plotResid, JKQTBasePlotter::sdYAxis, true, true, true);
```
Finally: When printing or saving an image of the plots, the plotter will no know anything about the arrangement of the plots and the plots cannot be printed/drawn in the same arrangement as in the window. If you want to arrange the plots in the same layout in a printout, as in the window, you will have to tell the main plot, in which arrangement to print the plots:
@@ -98,7 +98,9 @@ You push the print button (![test_multiplot](https://raw.githubusercontent.com/j
![test_multiplot](../../screenshots/test_multiplot_printpreview.png)
-
+In addition this example also contains a Window that allows to control the plot layout and synchronization options:
+
+![test_multiplot](../../screenshots/test_multiplot_controlwindow.png)
diff --git a/examples/test_multiplot/plotsymbol.png b/examples/test_multiplot/plotsymbol.png
new file mode 100644
index 0000000000..bb937a3f0b
Binary files /dev/null and b/examples/test_multiplot/plotsymbol.png differ
diff --git a/examples/test_multiplot/test_multiplot.cpp b/examples/test_multiplot/test_multiplot.cpp
index ac84048e38..e1a4f1288b 100644
--- a/examples/test_multiplot/test_multiplot.cpp
+++ b/examples/test_multiplot/test_multiplot.cpp
@@ -11,6 +11,7 @@
#include "jkqtplotter/jkqtpgraphsbarchart.h"
#include
#include
+#include "test_multiplot_ui.h"
int main(int argc, char* argv[])
{
@@ -38,10 +39,10 @@ int main(int argc, char* argv[])
layout->addWidget(plotResidHist, 1,1);
// 3.3 synchronize width/x-axis of plotResid to width/x-axis of plotMain
- plotResid->getPlotter()->synchronizeToMaster(plotMain->getPlotter(), true, false, true, true);
+ plotResid->synchronizeToMaster(plotMain, JKQTBasePlotter::sdXAxis, true, true, true);
// 3.4 synchronize y-axis of width/plotResidHist to y-axis of width/plotResid
- plotResidHist->getPlotter()->synchronizeToMaster(plotResid->getPlotter(), false, true, true, true);
+ plotResidHist->synchronizeToMaster(plotResid, JKQTBasePlotter::sdYAxis, true, true, true);
// 3.5 ensure that the plot are printed/exported in whole, when printing in plotMain
plotMain->getPlotter()->setGridPrinting(true);
@@ -146,6 +147,7 @@ int main(int argc, char* argv[])
// 7. scale plots automatically to data
+ plotResidHist->setAbsoluteX(0, 20);
plotResid->zoomToFit();
plotResidHist->zoomToFit();
plotMain->zoomToFit();
@@ -155,5 +157,10 @@ int main(int argc, char* argv[])
mainWidget.move(32,32);
mainWidget.resize(800,600);
+ // 9. create a second window, which controls the synchronization and layout between the plots
+ TestMultiplotUI controlWindow(plotMain, plotResid, plotResidHist, layout);
+ controlWindow.move(850,32);
+ controlWindow.show();
+
return app.exec();
}
diff --git a/examples/test_multiplot/test_multiplot.pro b/examples/test_multiplot/test_multiplot.pro
index 1942bf90b2..cd2388c470 100644
--- a/examples/test_multiplot/test_multiplot.pro
+++ b/examples/test_multiplot/test_multiplot.pro
@@ -1,36 +1,46 @@
-# source code for this simple demo
-SOURCES = test_multiplot.cpp
-
-# configure Qt
-CONFIG += link_prl qt
-CONFIG += link_prl c++11
-QT += core gui xml svg
-greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
-
-# output executable name
-TARGET = test_multiplot
-
-
-# include JKQTPlotter source code
-DEPENDPATH += . ../../lib
-INCLUDEPATH += ../../lib
-CONFIG (debug, debug|release) {
- LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug
-} else {
- LIBS += -L../../staticlib/release -ljkqtplotterlib
-}
-message("LIBS = $$LIBS")
-
-win32-msvc* {
- QMAKE_CXXFLAGS += /EHsc /std:c++14
- # To enable M_PI, M_E,...
- DEFINES += _USE_MATH_DEFINES
- # To fix error: C2338: va_start argument must not
- # have reference type and must not be parenthesized
- DEFINES += _CRT_NO_VA_START_VALIDATION
-}
-
-
-# here you can activate some debug options
-#DEFINES += SHOW_JKQTPLOTTER_DEBUG
-#DEFINES += JKQTBP_AUTOTIMER
+# source code for this simple demo
+SOURCES = test_multiplot.cpp \
+ test_multiplot_ui.cpp
+
+# configure Qt
+CONFIG += link_prl qt
+CONFIG += link_prl c++11
+QT += core gui xml svg
+greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
+
+# output executable name
+TARGET = test_multiplot
+
+
+# include JKQTPlotter source code
+DEPENDPATH += . ../../lib
+INCLUDEPATH += ../../lib
+CONFIG (debug, debug|release) {
+ LIBS += -L../../staticlib/debug -ljkqtplotterlib_debug
+} else {
+ LIBS += -L../../staticlib/release -ljkqtplotterlib
+}
+message("LIBS = $$LIBS")
+
+win32-msvc* {
+ QMAKE_CXXFLAGS += /EHsc /std:c++14
+ # To enable M_PI, M_E,...
+ DEFINES += _USE_MATH_DEFINES
+ # To fix error: C2338: va_start argument must not
+ # have reference type and must not be parenthesized
+ DEFINES += _CRT_NO_VA_START_VALIDATION
+}
+
+
+# here you can activate some debug options
+#DEFINES += SHOW_JKQTPLOTTER_DEBUG
+#DEFINES += JKQTBP_AUTOTIMER
+
+FORMS += \
+ test_multiplot_ui.ui
+
+HEADERS += \
+ test_multiplot_ui.h
+
+RESOURCES += \
+ test_multiplot.qrc
diff --git a/examples/test_multiplot/test_multiplot.qrc b/examples/test_multiplot/test_multiplot.qrc
new file mode 100644
index 0000000000..e6e5ad2a17
--- /dev/null
+++ b/examples/test_multiplot/test_multiplot.qrc
@@ -0,0 +1,5 @@
+
+
+ plotsymbol.png
+
+
diff --git a/examples/test_multiplot/test_multiplot_ui.cpp b/examples/test_multiplot/test_multiplot_ui.cpp
new file mode 100644
index 0000000000..f19038025d
--- /dev/null
+++ b/examples/test_multiplot/test_multiplot_ui.cpp
@@ -0,0 +1,33 @@
+#include "test_multiplot_ui.h"
+#include "ui_test_multiplot_ui.h"
+
+TestMultiplotUI::TestMultiplotUI(JKQTPlotter *plotTop_, JKQTPlotter *plotBot_, JKQTPlotter *plotRight_, QGridLayout *plotLayout_, QWidget *parent) :
+ QDialog(parent),
+ plotTop(plotTop_),
+ plotBot(plotBot_),
+ plotRight(plotRight_),
+ plotLayout(plotLayout_),
+ ui(new Ui::TestMultiplotUI)
+{
+ ui->setupUi(this);
+}
+
+TestMultiplotUI::~TestMultiplotUI()
+{
+ delete ui;
+}
+
+void TestMultiplotUI::updatePlot()
+{
+ plotLayout->setRowStretch(0, ui->spinRow0Stretch->value());
+ plotLayout->setRowStretch(1, ui->spinRow1Stretch->value());
+ plotLayout->setColumnStretch(0, ui->spinCol0Stretch->value());
+ plotLayout->setColumnStretch(1, ui->spinCol1Stretch->value());
+ plotBot->getPlotter()->resetMasterSynchronization();
+ plotRight->getPlotter()->resetMasterSynchronization();
+ plotBot->synchronizeToMaster(plotTop, JKQTBasePlotter::sdXAxis, ui->chkSyncWidthTopBot->isChecked(), ui->chkSyncZoomTopBot->isChecked(), ui->chkSyncZoomTopBot->isChecked());
+ plotRight->synchronizeToMaster(plotBot, JKQTBasePlotter::sdYAxis, ui->chkSyncHeightLeftRight->isChecked(), ui->chkSyncZoomLeftRight->isChecked(), ui->chkSyncZoomLeftRight->isChecked());
+
+ plotTop->getPlotter()->setShowKey(false);
+ plotBot->getYAxis()->setAxisLabel("");
+}
diff --git a/examples/test_multiplot/test_multiplot_ui.h b/examples/test_multiplot/test_multiplot_ui.h
new file mode 100644
index 0000000000..217939662c
--- /dev/null
+++ b/examples/test_multiplot/test_multiplot_ui.h
@@ -0,0 +1,31 @@
+#ifndef TEST_MULTIPLOT_UI_H
+#define TEST_MULTIPLOT_UI_H
+
+#include
+#include "jkqtplotter/jkqtplotter.h"
+#include
+
+namespace Ui {
+ class TestMultiplotUI;
+}
+
+class TestMultiplotUI : public QDialog
+{
+ Q_OBJECT
+
+ public:
+ explicit TestMultiplotUI(JKQTPlotter* plotTop_, JKQTPlotter* plotBot_, JKQTPlotter* plotRight_, QGridLayout* plotLayout_, QWidget *parent = nullptr);
+ ~TestMultiplotUI();
+
+ protected slots:
+ void updatePlot();
+ private:
+ JKQTPlotter* plotTop;
+ JKQTPlotter* plotBot;
+ JKQTPlotter* plotRight;
+ QGridLayout* plotLayout;
+
+ Ui::TestMultiplotUI *ui;
+};
+
+#endif // TEST_MULTIPLOT_UI_H
diff --git a/examples/test_multiplot/test_multiplot_ui.ui b/examples/test_multiplot/test_multiplot_ui.ui
new file mode 100644
index 0000000000..dd6a9fa019
--- /dev/null
+++ b/examples/test_multiplot/test_multiplot_ui.ui
@@ -0,0 +1,389 @@
+
+
+ TestMultiplotUI
+
+
+
+ 0
+ 0
+ 536
+ 299
+
+
+
+ Set Multi-Plot Properties
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 145
+ 96
+
+
+
+
+
+
+ :/plotsymbol.png
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 145
+ 96
+
+
+
+
+
+
+ :/plotsymbol.png
+
+
+
+
+
+
+ row stretch:
+
+
+
+
+
+
+ 3
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 444
+ 20
+
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+ 1
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+
+ col stretch:
+
+
+
+
+
+
+
+ 0
+ 0
+
+
+
+
+ 145
+ 96
+
+
+
+
+
+
+ :/plotsymbol.png
+
+
+
+
+
+
+ Qt::Horizontal
+
+
+
+ 226
+ 20
+
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+ syncHeight
+
+
+ true
+
+
+
+
+
+
+ syncZoom
+
+
+ true
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+ syncWidth
+
+
+ true
+
+
+
+
+
+
+ syncZoom
+
+
+ true
+
+
+
+
+
+
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
+
+
+ chkSyncWidthTopBot
+ toggled(bool)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 101
+ 148
+
+
+ 269
+ 72
+
+
+
+
+ chkSyncZoomTopBot
+ toggled(bool)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 194
+ 145
+
+
+ 275
+ 109
+
+
+
+
+ spinCol0Stretch
+ valueChanged(int)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 145
+ 279
+
+
+ 292
+ 145
+
+
+
+
+ spinCol1Stretch
+ valueChanged(int)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 356
+ 276
+
+
+ 385
+ 101
+
+
+
+
+ spinRow0Stretch
+ valueChanged(int)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 481
+ 90
+
+
+ 388
+ 50
+
+
+
+
+ spinRow1Stretch
+ valueChanged(int)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 477
+ 204
+
+
+ 386
+ 129
+
+
+
+
+ chkSyncHeightLeftRight
+ toggled(bool)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 238
+ 199
+
+
+ 279
+ 43
+
+
+
+
+ chkSyncZoomLeftRight
+ toggled(bool)
+ TestMultiplotUI
+ updatePlot()
+
+
+ 272
+ 230
+
+
+ 409
+ 71
+
+
+
+
+
+ updatePlot()
+
+
diff --git a/lib/jkqtfastplotter/jkqtfastplotter.h b/lib/jkqtfastplotter/jkqtfastplotter.h
index 260b839a0c..33ab78f08d 100644
--- a/lib/jkqtfastplotter/jkqtfastplotter.h
+++ b/lib/jkqtfastplotter/jkqtfastplotter.h
@@ -25,9 +25,6 @@
*/
-/** \file jkqtfastplotter.h
- * \ingroup jkqtfastplotter
- */
#ifndef JKQTFASTPLOTTER_H
#define JKQTFASTPLOTTER_H
@@ -93,7 +90,7 @@ class JKQTFPPlot;
.
*/
-class LIB_EXPORT JKQTFastPlotter : public QGLWidget {
+class JKQTP_LIB_EXPORT JKQTFastPlotter : public QGLWidget {
Q_OBJECT
protected:
/** \brief indicates whether to do full repaint (system and data) at the next repaint (any of the repaint meothods) */
@@ -1158,7 +1155,7 @@ class LIB_EXPORT JKQTFastPlotter : public QGLWidget {
/*! \brief base class for all plots that may be plotted by JKQTFastPlotter
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPPlot: public QObject {
+class JKQTP_LIB_EXPORT JKQTFPPlot: public QObject {
Q_OBJECT
protected:
/** \brief parent class, i.e. the plotter to plot on */
@@ -1200,7 +1197,7 @@ class LIB_EXPORT JKQTFPPlot: public QObject {
This class plots data as (x,y) points connected by straight lines. If errors for the y values are
provided, also y+/-yerr errorlines are drawn.
*/
-class LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot {
public:
/** \brief used to store which datatype is used for the plot data */
enum DataType {
@@ -1466,7 +1463,7 @@ class LIB_EXPORT JKQTFPLinePlot: public JKQTFPPlot {
This class does not support y errors!
*/
-class LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot {
+class JKQTP_LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1525,7 +1522,7 @@ class LIB_EXPORT JKQTFPVCrossPlot: public JKQTFPLinePlot {
This class does not support y errors!
*/
-class LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot {
+class JKQTP_LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1560,7 +1557,7 @@ class LIB_EXPORT JKQTFPVBarPlot: public JKQTFPLinePlot {
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot {
Q_OBJECT
protected:
/** \brief start of x range */
@@ -1754,7 +1751,7 @@ class LIB_EXPORT JKQTFPXRangePlot: public JKQTFPPlot {
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot {
Q_OBJECT
protected:
/** \brief start of x range */
@@ -1947,7 +1944,7 @@ class LIB_EXPORT JKQTFPYRangePlot: public JKQTFPPlot {
/*! \brief a plot of a QImage
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPQImagePlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPQImagePlot: public JKQTFPPlot {
Q_OBJECT
protected:
/** \brief image to plot */
@@ -2631,17 +2628,17 @@ inline void JKQTFPimagePlot_array2image(T* dbl, int width, int height, QImage &i
\ingroup jkqtfastplotter
\see JKQTFPimagePlot_array2image()
*/
-LIB_EXPORT QStringList JKQTFPimagePlot_getPalettes();
+JKQTP_LIB_EXPORT QStringList JKQTFPimagePlot_getPalettes();
/*! \brief get QIcon representing the given palette
\ingroup jkqtfastplotter
\see JKQTFPimagePlot_array2image()
*/
-LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(int i);
+JKQTP_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(int i);
/*! \brief get QIcon representing the given palette
\ingroup jkqtfastplotter
\see JKQTFPimagePlot_array2image()
*/
-LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette);
+JKQTP_LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette);
/*! \brief plots a given grayscale image with a given color palette
@@ -2652,7 +2649,7 @@ LIB_EXPORT QIcon JKQTFPimagePlot_getPaletteIcon(JKQTFPColorPalette palette);
.
*/
-class LIB_EXPORT JKQTFPimagePlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPimagePlot: public JKQTFPPlot {
Q_OBJECT
protected:
/** \brief image to plot */
@@ -3067,7 +3064,7 @@ inline void JKQTFPRGBImageOverlayPlot_array2image(T* dbl, int width, int height,
.
*/
-class LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot {
Q_OBJECT
protected:
/** \brief image to plot */
@@ -3476,7 +3473,7 @@ class LIB_EXPORT JKQTFPRGBImageOverlayPlot: public JKQTFPPlot {
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot {
Q_OBJECT
public:
enum SymbolType {
@@ -3661,7 +3658,7 @@ class LIB_EXPORT JKQTFPimageOverlayPlot: public JKQTFPPlot {
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot {
Q_OBJECT
public:
enum Position {
@@ -3809,7 +3806,7 @@ class LIB_EXPORT JKQTFPQScaleBarXPlot: public JKQTFPPlot {
\ingroup jkqtfastplotter
*/
-class LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot {
+class JKQTP_LIB_EXPORT JKQTFPQOverlayLinearGridPlot: public JKQTFPPlot {
Q_OBJECT
protected:
diff --git a/lib/jkqtmathtext/jkqtmathtext.h b/lib/jkqtmathtext/jkqtmathtext.h
index 771930755b..81faad357b 100644
--- a/lib/jkqtmathtext/jkqtmathtext.h
+++ b/lib/jkqtmathtext/jkqtmathtext.h
@@ -26,10 +26,6 @@
*/
-/** \file jkqtmathtext.h
- * \ingroup jkqtmathtext
- */
-
#ifndef JKQTMATHTEXT_H
#define JKQTMATHTEXT_H
@@ -53,7 +49,7 @@
/** \brief initialized Qt-ressources necessary for JKQTMathText
* \ingroup jkqtmathtext
*/
-LIB_EXPORT void initJKQTMathTextResources();
+JKQTP_LIB_EXPORT void initJKQTMathTextResources();
/*! \brief this class parses a LaTeX string and can then draw the contained text/equation onto a QPainter
\ingroup jkqtmathtext
@@ -222,7 +218,7 @@ LIB_EXPORT void initJKQTMathTextResources();
*/
-class LIB_EXPORT JKQTMathText : public QObject {
+class JKQTP_LIB_EXPORT JKQTMathText : public QObject {
Q_OBJECT
public:
/** \brief class constructor */
@@ -1498,7 +1494,7 @@ inline uint qHash(const JKQTMathText::tbrDataH& data) {
\see JKQTMathText
*/
-class LIB_EXPORT JKQTMathTextLabel: public QLabel {
+class JKQTP_LIB_EXPORT JKQTMathTextLabel: public QLabel {
Q_OBJECT
public:
explicit JKQTMathTextLabel(QWidget* parent=nullptr);
diff --git a/lib/jkqtplotter/jkqtpbaseelements.h b/lib/jkqtplotter/jkqtpbaseelements.h
index 28eece6cde..820775521b 100644
--- a/lib/jkqtplotter/jkqtpbaseelements.h
+++ b/lib/jkqtplotter/jkqtpbaseelements.h
@@ -19,9 +19,6 @@
-/** \file jkqtpbaseelements.h
- * \ingroup jkqtpbaseplotter_elements
- */
#ifndef JKQTPBASEELEMENTS_H
#define JKQTPBASEELEMENTS_H
@@ -137,7 +134,7 @@ class JKQTBasePlotter;
nearest but \c ">=" to the given \c minTicks. The Algorithm is described in detail with the function
calcLinearTickSpacing(). To activate this automatic tick spacing you have to set autoAxisSpacing=true.
*/
-class LIB_EXPORT JKQTPCoordinateAxis: public QObject {
+class JKQTP_LIB_EXPORT JKQTPCoordinateAxis: public QObject {
Q_OBJECT
protected:
public:
@@ -915,7 +912,7 @@ class LIB_EXPORT JKQTPCoordinateAxis: public QObject {
\ingroup jkqtpbaseplotter_elements
*/
-class LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis {
+class JKQTP_LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis {
Q_OBJECT
protected:
public:
@@ -956,7 +953,7 @@ class LIB_EXPORT JKQTPVerticalAxis: public JKQTPCoordinateAxis {
This axis may be draw at a user-supplied position (used e.g. for color bar axes)
*/
-class LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis {
+class JKQTP_LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis {
Q_OBJECT
protected:
public:
@@ -996,7 +993,7 @@ class LIB_EXPORT JKQTPVerticalIndependentAxis: public JKQTPVerticalAxis {
\ingroup jkqtpbaseplotter_elements
*/
-class LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis {
+class JKQTP_LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis {
Q_OBJECT
protected:
public:
@@ -1038,7 +1035,7 @@ class LIB_EXPORT JKQTPHorizontalAxis: public JKQTPCoordinateAxis {
This axis may be draw at a user-supplied position (used e.g. for color bar axes)
*/
-class LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis {
+class JKQTP_LIB_EXPORT JKQTPHorizontalIndependentAxis: public JKQTPHorizontalAxis {
Q_OBJECT
protected:
public:
diff --git a/lib/jkqtplotter/jkqtpbaseplotter.cpp b/lib/jkqtplotter/jkqtpbaseplotter.cpp
index 4441c44967..da49d08fcb 100644
--- a/lib/jkqtplotter/jkqtpbaseplotter.cpp
+++ b/lib/jkqtplotter/jkqtpbaseplotter.cpp
@@ -18,10 +18,6 @@
*/
-
-/** \file jkqtpbaseplotter.cpp
- * \ingroup jkqtpplotterclasses
- */
#include
#if (QT_VERSION >= QT_VERSION_CHECK(5, 0, 0))
#include
@@ -177,7 +173,8 @@ JKQTBasePlotter::JKQTBasePlotter(bool datastore_internal, QObject* parent, JKQTP
printDoUpdate=true;
emitPlotSignals=true;
- masterPlotter=nullptr;
+ masterPlotterX=nullptr;
+ masterPlotterY=nullptr;
masterSynchronizeWidth=false;
masterSynchronizeHeight=false;
fontSizePrintMultiplier=1;
@@ -708,6 +705,7 @@ void JKQTBasePlotter::setXY(double xminn, double xmaxx, double yminn, double yma
double w=fabs(xmaxx-xminn)/axisAspectRatio;
yAxis->setRange(mid-w/2.0, mid+w/2.0);
}
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::setX(double xminn, double xmaxx){
@@ -717,6 +715,7 @@ void JKQTBasePlotter::setX(double xminn, double xmaxx){
double w=fabs(xmaxx-xminn)/axisAspectRatio;
yAxis->setRange(mid-w/2.0, mid+w/2.0);
}
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::setY(double yminn, double ymaxx){
@@ -726,19 +725,23 @@ void JKQTBasePlotter::setY(double yminn, double ymaxx){
double w=fabs(ymaxx-yminn)*axisAspectRatio;
xAxis->setRange(mid-w/2.0, mid+w/2.0);
}
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::setAbsoluteX(double xminn, double xmaxx) {
xAxis->setAbsoluteRange(xminn, xmaxx);
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::setAbsoluteY(double yminn, double ymaxx) {
yAxis->setAbsoluteRange(yminn, ymaxx);
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::setAbsoluteXY(double xminn, double xmaxx, double yminn, double ymaxx) {
xAxis->setAbsoluteRange(xminn, xmaxx);
yAxis->setAbsoluteRange(yminn, ymaxx);
+ if (emitSignals) emit zoomChangedLocally(xAxis->getMin(), xAxis->getMax(), yAxis->getMin(), yAxis->getMax(), this);
}
void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
@@ -746,6 +749,7 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
JKQTPAutoOutputTimer jkaat(QString("JKQTBasePlotter[%1]::calcPlotScaling()").arg(objectName()));
#endif
+ //qDebug()<<"this="< calcPlotScaling()";
if (emitSignals) emit beforePlotScalingRecalculate();
//qDebug()<<"start JKQTBasePlotter::calcPlotScaling";
@@ -840,7 +844,7 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
// read additional space required by graphs
for (int i=0; igetVisible()) {
+ if (graphs[i]->isVisible()) {
int leftSpace, rightSpace, topSpace, bottomSpace;
graphs[i]->getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace);
iplotBorderBottom+=bottomSpace;
@@ -854,14 +858,16 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
// synchronize to a master-plotter
- if (masterPlotter) {
+ if (masterPlotterX) {
if (masterSynchronizeWidth) {
- iplotBorderLeft=masterPlotter->iplotBorderLeft;
- iplotBorderRight=masterPlotter->iplotBorderRight;
+ iplotBorderLeft=masterPlotterX->iplotBorderLeft;
+ iplotBorderRight=masterPlotterX->iplotBorderRight;
}
+ }
+ if (masterPlotterY) {
if (masterSynchronizeHeight) {
- iplotBorderTop=masterPlotter->iplotBorderTop;
- iplotBorderBottom=masterPlotter->iplotBorderBottom;
+ iplotBorderTop=masterPlotterY->iplotBorderTop;
+ iplotBorderBottom=masterPlotterY->iplotBorderBottom;
}
}
@@ -943,7 +949,8 @@ void JKQTBasePlotter::calcPlotScaling(JKQTPEnhancedPainter& painter){
}
- if (emitPlotSignals) emit plotScalingRecalculated();
+ //if (emitPlotSignals) emit plotScalingRecalculated();
+ emit plotScalingRecalculated();
}
@@ -1144,7 +1151,7 @@ void JKQTBasePlotter::plotOverlays(JKQTPEnhancedPainter &painter) {
for (int j=0; jgetVisible()) g->draw(painter);
+ if (g->isVisible()) g->draw(painter);
}
if (useClipping) {
@@ -3194,76 +3201,93 @@ void JKQTBasePlotter::setBorder(int left, int right, int top, int bottom){
if (emitPlotSignals) emit plotUpdated();
}
-void JKQTBasePlotter::synchronizeToMaster(JKQTBasePlotter* master, bool synchronizeWidth, bool synchronizeHeight, bool synchronizeZoomingMasterToSlave, bool synchronizeZoomingSlaveToMaster) {
- if (!master) {
- resetMasterSynchronization();
- }
- masterPlotter=master;
- if (masterSynchronizeHeight!=synchronizeHeight && masterSynchronizeHeight) {
- disconnect(masterPlotter, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
+void JKQTBasePlotter::synchronizeToMaster(JKQTBasePlotter* master, SynchronizationDirection synchronizeDirection, bool synchronizeAxisLength, bool synchronizeZoomingMasterToSlave, bool synchronizeZoomingSlaveToMaster) {
+ // remove old connections
+ if (masterPlotterX && (synchronizeDirection==sdXAxis || synchronizeDirection==sdXYAxes)) {
+ disconnect(masterPlotterX, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ this, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
disconnect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- masterPlotter, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
+ masterPlotterX, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
}
- if (masterSynchronizeWidth!=synchronizeWidth && masterSynchronizeWidth) {
- disconnect(masterPlotter, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+ if (masterPlotterY && (synchronizeDirection==sdYAxis || synchronizeDirection==sdXYAxes)) {
+ disconnect(masterPlotterY, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ this, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
disconnect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- masterPlotter, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+ masterPlotterY, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
}
- masterSynchronizeHeight=synchronizeHeight;
- masterSynchronizeWidth=synchronizeWidth;
- if (masterSynchronizeWidth) {
- if (synchronizeZoomingMasterToSlave) {
- connect(master, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+ // store new connection settings
+ if (synchronizeDirection==sdXAxis || synchronizeDirection==sdXYAxes) {
+ masterPlotterX=master;
+ masterSynchronizeWidth=synchronizeAxisLength;
+ }
+ if (synchronizeDirection==sdYAxis || synchronizeDirection==sdXYAxes) {
+ masterPlotterY=master;
+ masterSynchronizeHeight=synchronizeAxisLength;
+ }
+
+ // connect widgets (if required)
+ if (master) {
+ if (synchronizeDirection==sdXAxis || synchronizeDirection==sdXYAxes) {
+ if (synchronizeZoomingMasterToSlave) {
+ connect(masterPlotterX, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ this, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+ }
+ if (synchronizeZoomingSlaveToMaster) {
+ connect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ masterPlotterX, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+
+ }
}
- if (synchronizeZoomingSlaveToMaster) {
- connect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- master, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
+ if (synchronizeDirection==sdYAxis || synchronizeDirection==sdXYAxes) {
+ if (synchronizeZoomingMasterToSlave) {
+ connect(masterPlotterY, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ this, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
+ }
+ if (synchronizeZoomingSlaveToMaster) {
+ connect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
+ masterPlotterY, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
+ }
}
}
- if (masterSynchronizeWidth) {
- if (synchronizeHeight) {
- connect(master, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
- }
- if (synchronizeZoomingSlaveToMaster) {
- connect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- master, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
- }
- }
}
-void JKQTBasePlotter::resetMasterSynchronization() {
- masterPlotter=nullptr;
- masterSynchronizeHeight=false;
- masterSynchronizeWidth=false;
+void JKQTBasePlotter::synchronizeXToMaster(JKQTBasePlotter *master, bool synchronizeAxisLength, bool synchronizeZoomingMasterToSlave, bool synchronizeZoomingSlaveToMaster)
+{
+ synchronizeToMaster(master, sdXAxis, synchronizeAxisLength, synchronizeZoomingMasterToSlave, synchronizeZoomingSlaveToMaster);
+}
- disconnect(masterPlotter, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
- disconnect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- masterPlotter, SLOT(synchronizeXAxis(double,double,double,double,JKQTBasePlotter*)));
- disconnect(masterPlotter, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- this, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
- disconnect(this, SIGNAL(zoomChangedLocally(double,double,double,double,JKQTBasePlotter*)),
- masterPlotter, SLOT(synchronizeYAxis(double,double,double,double,JKQTBasePlotter*)));
+void JKQTBasePlotter::synchronizeYToMaster(JKQTBasePlotter *master, bool synchronizeAxisLength, bool synchronizeZoomingMasterToSlave, bool synchronizeZoomingSlaveToMaster)
+{
+ synchronizeToMaster(master, sdYAxis, synchronizeAxisLength, synchronizeZoomingMasterToSlave, synchronizeZoomingSlaveToMaster);
+}
+
+void JKQTBasePlotter::resetMasterSynchronization(JKQTBasePlotter::SynchronizationDirection synchronizeDirection) {
+ synchronizeToMaster(nullptr, synchronizeDirection, false, false, false);
}
void JKQTBasePlotter::synchronizeXAxis(double newxmin, double newxmax, double /*newymin*/, double /*newymax*/, JKQTBasePlotter * /*sender*/) {
+ bool oldemitSignals=emitSignals;
+ emitSignals=false;
setX(newxmin, newxmax);
+ emitSignals=oldemitSignals;
}
void JKQTBasePlotter::synchronizeYAxis(double /*newxmin*/, double /*newxmax*/, double newymin, double newymax, JKQTBasePlotter * /*sender*/) {
+ bool oldemitSignals=emitSignals;
+ emitSignals=false;
setY(newymin, newymax);
+ emitSignals=oldemitSignals;
}
void JKQTBasePlotter::synchronizeXYAxis(double newxmin, double newxmax, double newymin, double newymax, JKQTBasePlotter * /*sender*/) {
+ bool oldemitSignals=emitSignals;
+ emitSignals=false;
setXY(newxmin, newxmax, newymin, newymax);
+ emitSignals=oldemitSignals;
}
size_t JKQTBasePlotter::addGraph(size_t xColumn, size_t yColumn, const QString& title, JKQTPGraphPlotstyle graphStyle) {
@@ -3579,7 +3603,7 @@ void JKQTBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){
//int leftSpace, rightSpace, topSpace, bottomSpace;
JKQTPPlotElement* g=graphs[j];
//qDebug()<<" drawing JKQTPPlotElement"<getTitle()<metaObject()->className();
- if (g->getVisible()) g->draw(painter);
+ if (g->isVisible()) g->draw(painter);
}
if (useClipping) {
@@ -3589,7 +3613,7 @@ void JKQTBasePlotter::plotGraphs(JKQTPEnhancedPainter& painter){
for (int j=0; jgetVisible()) {
+ if (g->isVisible()) {
g->getOutsideSize(painter, leftSpace, rightSpace, topSpace, bottomSpace);
ibTop+=topSpace;
ibLeft+=leftSpace;
@@ -3634,7 +3658,7 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d
#ifdef JKQTBP_AUTOTIMER
jkaaot.write(QString("one-col: graph %1: %2").arg(i).arg(g->getTitle()));
#endif
- if (!g->getTitle().isEmpty() && g->getVisible()) {
+ if (!g->getTitle().isEmpty() && g->isVisible()) {
QSizeF fs=getTextSizeSize(keyFont,keyFontSize*fontSizeMultiplier,g->getTitle(),painter);// mt.getSize(painter);
double itheight=qMax(key_item_height*kfm.width('X'), fs.height());
QRectF rect(x, y+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier);
@@ -3657,7 +3681,7 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d
#ifdef JKQTBP_AUTOTIMER
jkaaot.write(QString("one-row: graph %1: %2").arg(i).arg(g->getTitle()));
#endif
- if (!g->getTitle().isEmpty() && g->getVisible()) {
+ if (!g->getTitle().isEmpty() && g->isVisible()) {
QSizeF fs=getTextSizeSize(keyFont,keyFontSize*fontSizeMultiplier,g->getTitle(),painter);// mt.getSize(painter);
double itheight=qMax(key_item_height*kfm.width('X'), fs.height());
QRectF rect(x, y+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier);
@@ -3691,7 +3715,7 @@ void JKQTBasePlotter::plotKeyContents(JKQTPEnhancedPainter& painter, double x, d
#ifdef JKQTBP_AUTOTIMER
jkaaot.write(QString("multi-col: graph %1: %2").arg(i).arg(g->getTitle()));
#endif
- if (!g->getTitle().isEmpty() && g->getVisible()) {
+ if (!g->getTitle().isEmpty() && g->isVisible()) {
//QSizeF fs=getTextSizeSize(keyFont,keyFontSize*fontSizeMultiplier,g->getTitle(),painter);// mt.getSize(painter);
double itheight=qMax(key_item_height*kfm.width('X'), key_text_height);
QRectF rect(xx, yy+1.5*lineWidthMultiplier, key_line_length*kfm.width('X'), itheight-3.0*lineWidthMultiplier);
@@ -3755,7 +3779,7 @@ void JKQTBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width,
for (int i=0; igetTitle().isEmpty() || !graphs[i]->getVisible()) {
+ if (graphs[i]->getTitle().isEmpty() || !graphs[i]->isVisible()) {
keyHeight--;
} else {
//mt.parse(graphs[i]->getTitle());
@@ -3786,7 +3810,7 @@ void JKQTBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width,
for (int i=0; igetTitle().isEmpty() || !graphs[i]->getVisible()) {
+ if (graphs[i]->getTitle().isEmpty() || !graphs[i]->isVisible()) {
keyWidth--;
} else {
//mt.parse(graphs[i]->getTitle());
@@ -3822,7 +3846,7 @@ void JKQTBasePlotter::getKeyExtent(JKQTPEnhancedPainter& painter, double* width,
for (int i=0; igetTitle().isEmpty() || !graphs[i]->getVisible()) {
+ if (graphs[i]->getTitle().isEmpty() || !graphs[i]->isVisible()) {
keyHeight--;
} else {
//mt.parse(graphs[i]->getTitle());
@@ -3904,7 +3928,7 @@ void JKQTBasePlotter::getGraphsXMinMax(double& minx, double& maxx, double& small
maxx=0;
smallestGreaterZero=0;
for (int i=0; igetVisible()) {
+ if (graphs[i]->isVisible()) {
double gminx=0;
double gmaxx=0;
double gsmallestGreaterZero=0;
@@ -3931,7 +3955,7 @@ void JKQTBasePlotter::getGraphsYMinMax(double& miny, double& maxy, double& small
maxy=0;
smallestGreaterZero=0;
for (int i=0; igetVisible()) {
+ if (graphs[i]->isVisible()) {
double gminy=0;
double gmaxy=0;
double gsmallestGreaterZero=0;
@@ -4288,17 +4312,6 @@ bool JKQTBasePlotter::containsGraph(JKQTPPlotElement* gr) const {
return false;
};
-
-void JKQTBasePlotter::setGraphsDataRange(int datarange_start, int datarange_end) {
- for (int i=0; i(graphs[i]);
- if (g) {
- g->setDatarangeStart(datarange_start);
- g->setDatarange_end(datarange_end);
- }
- }
-}
-
void JKQTBasePlotter::setUserSettigsFilename(const QString &filename, const QString &prefix)
{
userSettigsFilename=filename;
diff --git a/lib/jkqtplotter/jkqtpbaseplotter.h b/lib/jkqtplotter/jkqtpbaseplotter.h
index 765d34520c..ec87ffeee4 100644
--- a/lib/jkqtplotter/jkqtpbaseplotter.h
+++ b/lib/jkqtplotter/jkqtpbaseplotter.h
@@ -17,12 +17,6 @@
along with this program. If not, see .
*/
-
-
-/** \file jkqtpbaseplotter.h
- * \ingroup jkqtpplotterclasses
- */
-
#include "jkqtplottertools/jkqtptools.h"
#include "jkqtplotter/jkqtpdatastorage.h"
#include "jkqtmathtext/jkqtmathtext.h"
@@ -63,11 +57,11 @@ class JKQTPPlotElement; // forward
/** \brief initialized Qt-ressources necessary for JKQTBasePlotter
* \ingroup jkqtpplotterclasses */
-LIB_EXPORT void initJKQTBasePlotterResources();
+JKQTP_LIB_EXPORT void initJKQTBasePlotterResources();
/** \brief virtual base-class for exporter classes that can be used to save data inot a file
* \ingroup jkqtpplotterclasses */
-class LIB_EXPORT JKQTPSaveDataAdapter {
+class JKQTP_LIB_EXPORT JKQTPSaveDataAdapter {
public:
virtual ~JKQTPSaveDataAdapter() ;
virtual QString getFilter() const=0;
@@ -77,7 +71,7 @@ class LIB_EXPORT JKQTPSaveDataAdapter {
/** \brief Service from this class to implement a special QPaintDevice as a plugin, that can be registered to JKQTBasePlotter/JKQTPlotter
* and then be used to export graphics, use registerPaintDeviceAdapter() to register such a plass
* \ingroup jkqtpplotterclasses*/
-class LIB_EXPORT JKQTPPaintDeviceAdapter {
+class JKQTP_LIB_EXPORT JKQTPPaintDeviceAdapter {
public:
virtual ~JKQTPPaintDeviceAdapter() {}
virtual QString getFilter() const=0;
@@ -111,7 +105,11 @@ class LIB_EXPORT JKQTPPaintDeviceAdapter {
* This class is NOT a widget, if you need a plotting widget, use JKQTPlotter. This class may be used to
* plot using a JKQTPEnhancedPainter.
*
- * \see JKQTPlotter
+ * \see JKQTPlotter a QWidget class that displays a JKQTBasePlotter plot on a Qt Window.
+ *
+ *
+ * \tableofcontents
+ *
*
* \section jkqtplotter_base_datastore Data Storage
* As already mentioned this class does not provide means to draw graphs, but it contains a basic mechanism to associate
@@ -214,16 +212,91 @@ class LIB_EXPORT JKQTPPaintDeviceAdapter {
* .
*
*
- * \subsection JKQTBASEPLOTTER_GRIDPRINTING Grid-Printing / Layouting Several Graphs
- * As one often want's to combine different graphs, there is a possibility to combine this graph with more other graphs.
- * To do so one can think of the graphs to be part of a grid where each graph is contained in one cell. By default this
- * mechanism is deactivated. You can activate it by calling setGridPrinting(true). Then you can set the position of the
- * current graph by calling setGridPrintingCurrentX() and setGridPrintingCurrentY(). Add additional graphs by calling
- * addGridPrintingPlotter(). The position of the current graph is 0,0 by default. Afterwards the save and print routines
- * will export/print all graphs, not just the current one. There will be no additional border between the graphs, as the
- * class expects the internal graph borders to be sufficient.
+ * \section JKQTBASEPLOTTER_SYNCMULTIPLOT Synchronizing Several Plots
+ *
+ * Often a single plot is not sufficient, but several plots need to be aligned with respect to each other:
+ *
+ * \image html test_multiplot.png
+ *
+ * This can be achieved by putting several JKQTPlotter instances into a
+ * Qt Layout. Then you can fill each plot differently and
+ * set the x-/y-range of each plot by hand. This method works for simple cases, but has several drawbacks:
+ * - Due to the independent and automatic layouting of each plot, the axes do not need to be aligned properly
+ * \image html jkqtbaseplotter_synchronization_unequalaxes.png
+ * - When you print the plot, the printing does not know about the layout and the other plots in it. Therefor
+ * it will only print the plot itself.
+ * \image html jkqtbaseplotter_synchronization_nogridprint.png "Printing with grid-printing-mode deactivated"
+ * \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.
+ * \image html jkqtbaseplotter_synchronization_nonsyncedxrange.png
+ * .
+ *
+ *
+ * To overcome these limitations, JKQTPlotter (and JKQTBasePlotter) offer an API with which you can declare relations between
+ * different plots (one of them is made the master) and you can synchronize the axes of two plots, when
+ * zooming (also when calling e.g. zoomToFit() or setXY() ). This API is:
+ * - \ref JKQTBASEPLOTTER_SYNCMULTIPLOT_SYNC
+ * - \ref JKQTBASEPLOTTER_SYNCMULTIPLOT_GRIDPRINT
+ * .
+ *
+ * \subsection JKQTBASEPLOTTER_SYNCMULTIPLOT_SYNC Synchronizing Axis Range & Plot Width
+ *
+ * You can synchronize the plot width and axis range between two JKQTPlotter instaces using:
+ * - synchronizeToMaster() / JKQTBasePlotter::synchronizeToMaster() synchronizes the parent JKQTPlotter with another JKQTPlotter. With two boolean-parameters
+ * you can specify the axes to be synchronized. E.g. in the case above, you would call:
+ * \code
+ * // synchronize width/x-axis of plotResid to width/x-axis of plotMain
+ * plotResid->synchronizeToMaster(plotMain, JKQTBasePlotter::sdXAxis, true, true, true);
+ *
+ * // synchronize y-axis of width/plotResidHist to y-axis of width/plotResid
+ * plotResidHist->synchronizeToMaster(plotResid, JKQTBasePlotter::sdYAxis, true, true, true);
+ * \endcode
+ * This will synchronize the x-axes of the top (\c plotMain ) and bottom-left plot (\c plotResid ),
+ * as well as the y-axes of the bottom-left (\c plotResid ) and bottom-right plot (\c plotResidHist ).
+ * After this call they will have the same size in screen pixels and always span the same range
+ * in plot coordinates.
+ * - synchronizeXToMaster() / JKQTBasePlotter::synchronizeXToMaster() like synchronizeToMaster() / JKQTBasePlotter::synchronizeToMaster(),
+ * but synchronizes only the x-axes
+ * - synchronizeYToMaster() / JKQTBasePlotter::synchronizeYToMaster() like synchronizeToMaster() / JKQTBasePlotter::synchronizeToMaster(),
+ * but synchronizes only the y-axes
+ * - resetMasterSynchronization() / JKQTBasePlotter::resetMasterSynchronization() deletes all synchronizations
+ * from the JKQTPlotter
+ * .
+ *
+ * \see See \ref JKQTPlotterMultiPlotLayout for an extensive example of the functionality.
+ *
+ *
+ * \subsection JKQTBASEPLOTTER_SYNCMULTIPLOT_GRIDPRINT Grid Printing/Desclaring Relations between Plots
+ *
+ * Usually each JKQTPlotter/JKQTBasePlotter prints or exports only itself. But in many cases you might want to
+ * add several plots that form a grid layout and also want to export them as one image/print them on one page.
+ * To do this, JKQTPlotter/JKQTBasePlotter offers the "grid printing" mode. In this mode, you can declare
+ * relations between different JKQTPlotters/JKQTBasePlotters by putting them in a rectangular grid (like in a
+ * QGridLayout). then any export/print action will draw all (explicitly)
+ * decalred graphs.
+ *
+ * \image html jkqtplotter_gridprint.png
+ *
+ * The grid printing API is composed of these functions:
+ * - setGridPrinting() enables grid printing for this JKQTPlotter. If set to \c true , and you print afterwards,
+ * the printout (or export) will not only contain the plot itself, but also additional plots that were
+ * declared using addGridPrintingPlotter() (see below).
+ * - addGridPrintingPlotter() add a new plotter \a plotterOther for grid printing mode, at location \a x / \a y
+ * E.g. in the example shown above, you could call:
+ * \code
+ * plotMain->setGridPrinting(true);
+ * plotMain->addGridPrintingPlotter(0,1,plotResid);
+ * plotMain->addGridPrintingPlotter(1,1,plotResidHist);
+ * \endcode
+ * - setGridPrintingCurrentX() / setGridPrintingCurrentY() / setGridPrintingCurrentPos()
+ * sets the location of the calling plot inside the grid. By default each plot assumes to be at (0,0).
+ * - clearGridPrintingPlotters() clear all additional plotters for grid printing mode
+ * .
+ *
+ * \see See \ref JKQTPlotterMultiPlotLayout for an extensive example of the functionality.
*
- * \see \ref JKQTPLOTTER_SYNCMULTIPLOT
*
*
* \section jkqtplotter_base_defaultvalues Default Properties
@@ -241,7 +314,7 @@ class LIB_EXPORT JKQTPPaintDeviceAdapter {
* 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.
*/
-class LIB_EXPORT JKQTBasePlotter: public QObject {
+class JKQTP_LIB_EXPORT JKQTBasePlotter: public QObject {
Q_OBJECT
public:
typedef QMap > > AdditionalActionsMap;
@@ -677,11 +750,13 @@ class LIB_EXPORT JKQTBasePlotter: public QObject {
QString currentDataFileFormat;
QString currentPrinter;
- /** \brief the master plotter, this plotter is connected to. */
- JKQTBasePlotter* masterPlotter;
- /** \brief synchronize plot width with masterPlotter */
+ /** \brief the master plotter for x-dimension, this plotter is connected to. */
+ JKQTBasePlotter *masterPlotterX;
+ /** \brief the master plotter for y-dimension, this plotter is connected to. */
+ JKQTBasePlotter *masterPlotterY;
+ /** \brief synchronize plot width with masterPlotterX */
bool masterSynchronizeWidth;
- /** \brief synchronize plot height with masterPlotter */
+ /** \brief synchronize plot height with masterPlotterY */
bool masterSynchronizeHeight;
@@ -891,9 +966,6 @@ class LIB_EXPORT JKQTBasePlotter: public QObject {
zoomIn(1.0/factor);
}
- /** \brief set the datarange of all current graphs to the given values */
- void setGraphsDataRange(int datarange_start, int datarange_end);
-
/** \brief en-/disables the maintaining of the data aspect ratio */
void setMaintainAspectRatio(bool value) {
maintainAspectRatio=value;
@@ -2158,27 +2230,58 @@ class LIB_EXPORT JKQTBasePlotter: public QObject {
void getGraphsYMinMax(double& miny, double& maxy, double& smallestGreaterZero);
+ enum SynchronizationDirection {
+ sdXAxis,
+ sdYAxis,
+ sdXYAxes
+ };
- /*! \brief synchronize the plot borders with a given plotter
+ /*! \brief synchronize the plot borders (and zooming) with a given plotter (master --> slave/this)
This function allows two plotters to draw a graph with exactly the same height or width
as in another graph. For example if you want to have two plotters which are positioned one
above the other (and have the same widget widths, which could be guaranteed by a QLayout)
you may want to make sure that their plotWidth s are always the same. In this case call
- \code plotter2->synchronizeToMaster(plotter1, true, false) \endcode of the lower plotter \c plotter2 .
+ \code plotter2->synchronizeToMaster(plotter1, sdXAxis, true) \endcode of the lower plotter \c plotter2 .
Now whenever the size of plotter1 changes, also plotter2 is redrawn with the changed
borders.
\param master the plotter widget to synchronize to
- \param synchronizeWidth do you want the plot width to be synchronized?
- \param synchronizeHeight do you want the plot height to be synchronized?
+ \param synchronizeDirection direction in which to synchronize
+ \param synchronizeAxisLength do you want the axis length to be synchronized?
\param synchronizeZoomingMasterToSlave if set, also zooming in the master leads to a modification of the linked axes in the slave
\param synchronizeZoomingSlaveToMaster if set, also zooming in the slave leads to a modification of the linked axes in the master
+
+ \see synchronizeXToMaster(), synchronizeYToMaster(), \ref JKQTBASEPLOTTER_SYNCMULTIPLOT
*/
- void synchronizeToMaster(JKQTBasePlotter* master, bool synchronizeWidth, bool synchronizeHeight, bool synchronizeZoomingMasterToSlave=false, bool synchronizeZoomingSlaveToMaster=false);
+ void synchronizeToMaster(JKQTBasePlotter* master, SynchronizationDirection synchronizeDirection, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true);
+
+ /*! \brief synchronize the plot x-axis width (and x-zooming) with a given master plotter (master --> slave/this)
+
+ \param master the plotter widget to synchronize to
+ \param synchronizeAxisLength do you want the axis length to be synchronized?
+ \param synchronizeZoomingMasterToSlave if set, also zooming in the master leads to a modification of the linked axes in the slave
+ \param synchronizeZoomingSlaveToMaster if set, also zooming in the slave leads to a modification of the linked axes in the master
+
+ \note This is a short-cut to synchronizeToMaster() with \c synchronizeDirection=csXAxis
+ \see synchronizeToMaster(), synchronizeYToMaster(), \ref JKQTBASEPLOTTER_SYNCMULTIPLOT
+ */
+ void synchronizeXToMaster(JKQTBasePlotter* master, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true);
+
+ /*! \brief synchronize the plot y-axis height (and y-zooming) with a given master plotter (master --> slave/this)
+
+ \param master the plotter widget to synchronize to
+ \param synchronizeAxisLength do you want the axis length to be synchronized?
+ \param synchronizeZoomingMasterToSlave if set, also zooming in the master leads to a modification of the linked axes in the slave
+ \param synchronizeZoomingSlaveToMaster if set, also zooming in the slave leads to a modification of the linked axes in the master
+
+ \note This is a short-cut to synchronizeToMaster() with \c synchronizeDirection=csXAxis
+ \see synchronizeToMaster(), synchronizeXToMaster(), \ref JKQTBASEPLOTTER_SYNCMULTIPLOT
+ */
+ void synchronizeYToMaster(JKQTBasePlotter* master, bool synchronizeAxisLength=true, bool synchronizeZoomingMasterToSlave=true, bool synchronizeZoomingSlaveToMaster=true);
/** \brief switches any synchronization off, that has been created by synchronizeToMaster() */
- void resetMasterSynchronization();
+ void resetMasterSynchronization(SynchronizationDirection synchronizeDirection=sdXYAxes);
@@ -2261,14 +2364,14 @@ class LIB_EXPORT JKQTBasePlotter: public QObject {
/** \brief internal tool class for text sizes
* \internal */
- struct LIB_EXPORT textSizeData {
+ struct JKQTP_LIB_EXPORT textSizeData {
explicit textSizeData();
double ascent, descent, width, strikeoutPos;
};
/** \brief internal tool class for text-sizess in a plot key
* \internal */
- struct LIB_EXPORT textSizeKey {
+ struct JKQTP_LIB_EXPORT textSizeKey {
explicit textSizeKey(const QFont& f, const QString& text, QPaintDevice *pd);
explicit textSizeKey(const QString& fontName, double fontSize, const QString& text, QPaintDevice *pd);
QString text;
diff --git a/lib/jkqtplotter/jkqtpdatastorage.cpp b/lib/jkqtplotter/jkqtpdatastorage.cpp
index 85e549bfdc..349b5fb528 100644
--- a/lib/jkqtplotter/jkqtpdatastorage.cpp
+++ b/lib/jkqtplotter/jkqtpdatastorage.cpp
@@ -19,11 +19,6 @@
-
-/** \file jkqtpdatastorage.cpp
- * \ingroup jkqtpdatastorage
- */
-
#include "jkqtplotter/jkqtpdatastorage.h"
#include
#include
diff --git a/lib/jkqtplotter/jkqtpdatastorage.h b/lib/jkqtplotter/jkqtpdatastorage.h
index f3b87e8503..f2b1afccd6 100644
--- a/lib/jkqtplotter/jkqtpdatastorage.h
+++ b/lib/jkqtplotter/jkqtpdatastorage.h
@@ -19,10 +19,6 @@
-/** \file jkqtpdatastorage.h
- * \ingroup jkqtpdatastorage
- */
-
#include "jkqtplottertools/jkqtp_imexport.h"
#include "jkqtplottertools/jkqtptools.h"
#include
@@ -128,7 +124,7 @@ enum JKQTPDatastoreItemFormat {
* notion of data columns. This class provides a set of interface methods for this list:
*
*/
-class LIB_EXPORT JKQTPDatastore{
+class JKQTP_LIB_EXPORT JKQTPDatastore{
private:
/** \brief a std::vector that contains all items managed by this datastore */
QMap items;
@@ -596,7 +592,7 @@ class LIB_EXPORT JKQTPDatastore{
*
* \see JKQTPDatastore
*/
-class LIB_EXPORT JKQTPColumn {
+class JKQTP_LIB_EXPORT JKQTPColumn {
private:
/** \brief index of the item in the datastore that contains the data for this column */
size_t datastoreItem;
@@ -743,7 +739,7 @@ class LIB_EXPORT JKQTPColumn {
*
* \see JKQTPDatastore
*/
-class LIB_EXPORT JKQTPDatastoreItem {
+class JKQTP_LIB_EXPORT JKQTPDatastoreItem {
private:
/** \brief a pointer to the actual data */
double* data;
@@ -842,7 +838,7 @@ class LIB_EXPORT JKQTPDatastoreItem {
*
* \see JKQTPDatastore
*/
-class LIB_EXPORT JKQTPDatastoreModel: public QAbstractTableModel {
+class JKQTP_LIB_EXPORT JKQTPDatastoreModel: public QAbstractTableModel {
Q_OBJECT
public:
JKQTPDatastoreModel(JKQTPDatastore* datastore, QObject* parent=nullptr);
diff --git a/lib/jkqtplotter/jkqtpelementsoverlay.h b/lib/jkqtplotter/jkqtpelementsoverlay.h
index 1ec07daac2..04978e2d57 100644
--- a/lib/jkqtplotter/jkqtpelementsoverlay.h
+++ b/lib/jkqtplotter/jkqtpelementsoverlay.h
@@ -18,10 +18,6 @@
*/
-/** \file jkqtpelementsoverlay.h
- * \ingroup jkqtplotter_overlays
- */
-
#include
#include
#include
@@ -41,7 +37,7 @@ class JKQTBasePlotter;
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
*/
-class LIB_EXPORT JKQTPOverlayElement : public QObject {
+class JKQTP_LIB_EXPORT JKQTPOverlayElement : public QObject {
Q_OBJECT
public:
explicit JKQTPOverlayElement(JKQTBasePlotter *parent = 0);
@@ -177,7 +173,7 @@ class LIB_EXPORT JKQTPOverlayElement : public QObject {
/*! \brief returns the property visible ( \copybrief visible ).
\details Description of the parameter visible is:
\copydoc visible
\see visible for more information */
- inline virtual bool getVisible() const
+ inline virtual bool isVisible() const
{
return this->visible;
}
@@ -238,7 +234,7 @@ class LIB_EXPORT JKQTPOverlayElement : public QObject {
/*! \brief baseclass for a two-position overlay
\ingroup jkqtplotter_overlays
*/
-class LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement {
+class JKQTP_LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement {
Q_OBJECT
public:
explicit JKQTPOverlayTwoPositionOverlay(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
@@ -311,7 +307,7 @@ class LIB_EXPORT JKQTPOverlayTwoPositionOverlay : public JKQTPOverlayElement {
/*! \brief baseclass for one-coordinate indicator overlays (horizontal/vertical lines
\ingroup jkqtplotter_overlays
*/
-class LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement {
+class JKQTP_LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement {
Q_OBJECT
public:
explicit JKQTPOverlayOneCoordOverlay(double pos, JKQTBasePlotter *parent = 0);
@@ -339,7 +335,7 @@ class LIB_EXPORT JKQTPOverlayOneCoordOverlay : public JKQTPOverlayElement {
/*! \brief baseclass for two-coordinate indicator overlays (horizontal/vertical lines
\ingroup jkqtplotter_overlays
*/
-class LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay {
+class JKQTP_LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverlay {
Q_OBJECT
public:
explicit JKQTPOverlayTwoCoordOverlay(double pos, double pos2, JKQTBasePlotter *parent = 0);
@@ -370,7 +366,7 @@ class LIB_EXPORT JKQTPOverlayTwoCoordOverlay : public JKQTPOverlayOneCoordOverla
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
*/
-class LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay {
+class JKQTP_LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay {
Q_OBJECT
public:
explicit JKQTPOverlayVerticalLine(double pos, JKQTBasePlotter *parent = 0);
@@ -387,7 +383,7 @@ class LIB_EXPORT JKQTPOverlayVerticalLine : public JKQTPOverlayOneCoordOverlay {
These simple primitive elements can be used to e.g. display fast changing indicators on the graph ...
*/
-class LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay {
+class JKQTP_LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay {
Q_OBJECT
public:
explicit JKQTPOverlayVerticalRange(double pos, double pos2, JKQTBasePlotter *parent = 0);
@@ -419,7 +415,7 @@ class LIB_EXPORT JKQTPOverlayVerticalRange : public JKQTPOverlayTwoCoordOverlay
\ingroup jkqtplotter_overlays
*/
-class LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay {
+class JKQTP_LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay {
Q_OBJECT
public:
explicit JKQTPOverlayLine(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
@@ -450,7 +446,7 @@ class LIB_EXPORT JKQTPOverlayLine : public JKQTPOverlayTwoPositionOverlay {
\ingroup jkqtplotter_overlays
*/
-class LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay {
+class JKQTP_LIB_EXPORT JKQTPOverlayRectangle : public JKQTPOverlayTwoPositionOverlay {
Q_OBJECT
public:
explicit JKQTPOverlayRectangle(double x1, double y1, double x2, double y2, JKQTBasePlotter *parent = 0);
diff --git a/lib/jkqtplotter/jkqtpgraphs.cpp b/lib/jkqtplotter/jkqtpgraphs.cpp
index 15102e58aa..07e7b0195a 100644
--- a/lib/jkqtplotter/jkqtpgraphs.cpp
+++ b/lib/jkqtplotter/jkqtpgraphs.cpp
@@ -123,13 +123,7 @@ void JKQTPXYLineGraph::draw(JKQTPEnhancedPainter& painter) {
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
+
if (imax
#include
#include
@@ -47,11 +43,11 @@ class JKQTPDatastore;
/*! \brief This implements xy line plots. This also alows to draw symbols at the data points.
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_simple
\image html plot_lineplots.png
*/
-class LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph {
+class JKQTP_LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -251,7 +247,7 @@ class LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph {
/*! \brief This implements xy scatter plots (like JKQTPXYLineGraph), but the color and size of the symbols may be taken from a column.
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_param
set the properties sizeColumn and/or colorColumn to change the size and/or color of the symbols according to the values in the column.
@@ -262,7 +258,7 @@ class LIB_EXPORT JKQTPXYLineGraph: public JKQTPXYGraph {
\see JKQTPXYParametrizedErrorScatterGraph, \ref JKQTPlotterParamScatter , \ref JKQTPlotterParamScatterImage
*/
-class LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, public JKQTPColorPaletteTools {
+class JKQTP_LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, public JKQTPColorPaletteTools {
Q_OBJECT
public:
/** \brief class constructor */
@@ -485,13 +481,13 @@ class LIB_EXPORT JKQTPXYParametrizedScatterGraph: public JKQTPXYLineGraph, publi
/*! \brief This implements xy line plots with x and y error indicators.
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_simple
\image html plot_errorbarlineplots.png
\image html plot_errorlinelineplots.png
\image html plot_errorpolygonlineplots.png
*/
-class LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYGraphErrors {
Q_OBJECT
public:
/** \brief class constructor */
@@ -520,7 +516,7 @@ class LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYG
/*! \brief This implements xy scatter plots (like JKQTPXYLineGraph), but the color and size of the symbols may be taken from a column. with errorbars
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_param
set the properties sizeColumn and/or colorColumn to change the size and/or color of the symbols according to the values in the column.
@@ -528,7 +524,7 @@ class LIB_EXPORT JKQTPXYLineErrorGraph: public JKQTPXYLineGraph, public JKQTPXYG
\see JKQTPXYParametrizedScatterGraph, \ref JKQTPlotterParamScatter
*/
-class LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph: public JKQTPXYParametrizedScatterGraph, public JKQTPXYGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph: public JKQTPXYParametrizedScatterGraph, public JKQTPXYGraphErrors {
Q_OBJECT
public:
JKQTPXYParametrizedErrorScatterGraph(JKQTBasePlotter* parent=nullptr);
@@ -562,13 +558,13 @@ class LIB_EXPORT JKQTPXYParametrizedErrorScatterGraph: public JKQTPXYParametrize
/*! \brief This implements a step plot with values \f$ \left(x, f(x) \right) \f$
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_simple
\image html jkqtplotter_simpletest_stepplots.png
\see JKQTPStepVerticalGraph, \ref JKQTPlotterStepPlot
*/
-class LIB_EXPORT JKQTPStepHorizontalGraph: public JKQTPXYGraph {
+class JKQTP_LIB_EXPORT JKQTPStepHorizontalGraph: public JKQTPXYGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -723,13 +719,13 @@ class LIB_EXPORT JKQTPStepHorizontalGraph: public JKQTPXYGraph {
/*! \brief This implements a step plot with values \f$ \left(f(y), y \right) \f$
- \ingroup jkqtplotter_linesymbolgraphs
+ \ingroup jkqtplotter_linesymbolgraphs_simple
\image html plot_stepverplot1.png
\see JKQTPStepHorizontalGraph, \ref JKQTPlotterStepPlot
*/
-class LIB_EXPORT JKQTPStepVerticalGraph: public JKQTPStepHorizontalGraph {
+class JKQTP_LIB_EXPORT JKQTPStepVerticalGraph: public JKQTPStepHorizontalGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -754,7 +750,7 @@ class LIB_EXPORT JKQTPStepVerticalGraph: public JKQTPStepHorizontalGraph {
\ingroup jkqtplotter_diverse
*/
-class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -1119,7 +1115,7 @@ class LIB_EXPORT JKQTPHorizontalRange: public JKQTPGraph {
\ingroup jkqtplotter_diverse
*/
-class LIB_EXPORT JKQTPVerticalRange: public JKQTPHorizontalRange {
+class JKQTP_LIB_EXPORT JKQTPVerticalRange: public JKQTPHorizontalRange {
Q_OBJECT
public:
/** \brief class constructor */
diff --git a/lib/jkqtplotter/jkqtpgraphsbarchart.cpp b/lib/jkqtplotter/jkqtpgraphsbarchart.cpp
index 66171ac5f6..a637f3950a 100644
--- a/lib/jkqtplotter/jkqtpgraphsbarchart.cpp
+++ b/lib/jkqtplotter/jkqtpgraphsbarchart.cpp
@@ -118,13 +118,7 @@ void JKQTPBarVerticalGraph::draw(JKQTPEnhancedPainter& painter) {
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end+1, static_cast(imax));
- }
+
if (imaxget(static_cast(xColumn),static_cast(i));
- int sr=datastore->getNextLowerIndex(xColumn, i, datarange_start, datarange_end);
- int lr=datastore->getNextHigherIndex(xColumn, i, datarange_start, datarange_end);
+ int sr=datastore->getNextLowerIndex(xColumn, i);
+ int lr=datastore->getNextHigherIndex(xColumn, i);
double yv=datastore->get(static_cast(yColumn),static_cast(i));
double yv0=y0;
if (!qFuzzyIsNull(baseline)) yv0=transformY(baseline);
@@ -204,13 +198,6 @@ bool JKQTPBarVerticalGraph::getXMinMax(double& minx, double& maxx, double& small
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxget(static_cast(xColumn),static_cast(i));
- int sr=datastore->getNextLowerIndex(xColumn, i, datarange_start, datarange_end);
- int lr=datastore->getNextHigherIndex(xColumn, i, datarange_start, datarange_end);
+ int sr=datastore->getNextLowerIndex(xColumn, i);
+ int lr=datastore->getNextHigherIndex(xColumn, i);
double delta, deltap, deltam;
if (sr<0 && lr<0) { // only one x-value
@@ -266,13 +253,6 @@ bool JKQTPBarVerticalGraph::getYMinMax(double& miny, double& maxy, double& small
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end+1, static_cast(imax));
- }
if (imaxget(static_cast(xColumn),static_cast(i));
double yv=datastore->get(static_cast(yColumn),static_cast(i));
- int sr=datastore->getNextLowerIndex(yColumn, i, datarange_start, datarange_end);
- int lr=datastore->getNextHigherIndex(yColumn, i, datarange_start, datarange_end);
+ int sr=datastore->getNextLowerIndex(yColumn, i);
+ int lr=datastore->getNextHigherIndex(yColumn, i);
double xv0=x0;
if (!qFuzzyIsNull(baseline)) xv0=transformX(baseline);
if (hasStackPar) {
@@ -477,13 +450,6 @@ bool JKQTPBarHorizontalGraph::getXMinMax(double& minx, double& maxx, double& sma
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(xColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxget(static_cast(yColumn),static_cast(i));
double delta, deltap, deltam;
- int sr=datastore->getNextLowerIndex(yColumn, i, datarange_start, datarange_end);
- int lr=datastore->getNextHigherIndex(yColumn, i, datarange_start, datarange_end);
+ int sr=datastore->getNextLowerIndex(yColumn, i);
+ int lr=datastore->getNextHigherIndex(yColumn, i);
if (sr<0 && lr<0) { // only one y-value
deltam=0.5;
@@ -662,13 +621,6 @@ bool JKQTPBarHorizontalErrorGraph::getXMinMax(double &minx, double &maxx, double
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax.
*/
-
-/** \file jkqtpgraphsbarchart.h
- * \ingroup jkqtplotter_barssticks
- */
-
#include
#include
#include
@@ -60,7 +55,7 @@
*/
-class LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph {
+class JKQTP_LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -283,7 +278,7 @@ class LIB_EXPORT JKQTPBarVerticalGraph: public JKQTPXYGraph {
* \image html JKQTPBarVerticalGraphStacked.png
*
*/
-class LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph {
+class JKQTP_LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -322,7 +317,7 @@ class LIB_EXPORT JKQTPBarVerticalStackableGraph: public JKQTPBarVerticalGraph {
* \image html plot_bargraphverploterr.png
*
*/
-class LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, public JKQTPYGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, public JKQTPYGraphErrors {
Q_OBJECT
public:
/** \brief class constructor */
@@ -353,7 +348,7 @@ class LIB_EXPORT JKQTPBarVerticalErrorGraph: public JKQTPBarVerticalGraph, publi
\image html plot_bargraphhorplot.png
*/
-class LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph {
+class JKQTP_LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -389,7 +384,7 @@ class LIB_EXPORT JKQTPBarHorizontalGraph: public JKQTPBarVerticalGraph {
* \image html JKQTPBarHorizontalGraphStacked.png
*
*/
-class LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGraph {
+class JKQTP_LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -428,7 +423,7 @@ class LIB_EXPORT JKQTPBarHorizontalStackableGraph: public JKQTPBarHorizontalGrap
* \image html plot_bargraphhorploterr.png
*
*/
-class LIB_EXPORT JKQTPBarHorizontalErrorGraph: public JKQTPBarHorizontalGraph, public JKQTPXGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPBarHorizontalErrorGraph: public JKQTPBarHorizontalGraph, public JKQTPXGraphErrors {
Q_OBJECT
public:
/** \brief class constructor */
diff --git a/lib/jkqtplotter/jkqtpgraphsbase.cpp b/lib/jkqtplotter/jkqtpgraphsbase.cpp
index a08d607f20..54dfeee532 100644
--- a/lib/jkqtplotter/jkqtpgraphsbase.cpp
+++ b/lib/jkqtplotter/jkqtpgraphsbase.cpp
@@ -47,23 +47,16 @@ JKQTPPlotElement::JKQTPPlotElement(JKQTPlotter *parent):
setParent(parent);
}
-JKQTPPlotElement::~JKQTPPlotElement()
-= default;
-
JKQTPGraph::JKQTPGraph(JKQTBasePlotter* parent):
JKQTPPlotElement(parent)
{
- datarange_start=datarange_end=-1;
}
JKQTPGraph::JKQTPGraph(JKQTPlotter *parent):
JKQTPPlotElement(parent)
{
- datarange_start=datarange_end=-1;
-}
-JKQTPGraph::~JKQTPGraph()
-= default;
+}
QImage JKQTPPlotElement::generateKeyMarker(QSize size)
{
@@ -81,6 +74,26 @@ QImage JKQTPPlotElement::generateKeyMarker(QSize size)
return img;
}
+void JKQTPPlotElement::setTitle(const QString &__value)
+{
+ this->title = __value;
+}
+
+QString JKQTPPlotElement::getTitle() const
+{
+ return this->title;
+}
+
+void JKQTPPlotElement::setVisible(bool __value)
+{
+ this->visible = __value;
+}
+
+bool JKQTPPlotElement::isVisible() const
+{
+ return this->visible;
+}
+
@@ -108,12 +121,7 @@ bool JKQTPGraph::getDataMinMax(int column, double &minx, double &maxx, double &s
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=datastore->getColumn(column).getRows();
- // interpret data ranges
- if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax0) sortData=Sorted;
}
@@ -459,13 +453,6 @@ void JKQTPSingleColumnGraph::intSortData()
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=datastore->getColumn(dataColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax* dataorder) {
+void JKQTPGraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int xErrorColumnLower, int yErrorColumnLower, bool xErrorSymmetric, bool yErrorSymmetric, double xrelshift, double yrelshift, const QVector* dataorder) {
//std::cout<<"JKQTPGraphErrors::intPlotXYErrorIndicators(p, "<getDatastore();
@@ -545,13 +532,6 @@ void JKQTPGraphErrors::intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, J
if (yColumn>=0) imaxy=datastore->getColumn(static_cast(yColumn)).getRows();
int imax=qMin(imaxx, imaxy);
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax* dataorder) {
- intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, -1, xErrorStyle, JKQTPNoError, datarange_start, datarange_end, xErrorColumnLower, -1, xErrorSymmetric, true, xrelshift, yrelshift, dataorder);
+void JKQTPXGraphErrors::plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph *parentGraph, int xColumn, int yColumn, double xrelshift, double yrelshift, const QVector* dataorder) {
+ intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, -1, xErrorStyle, JKQTPNoError, xErrorColumnLower, -1, xErrorSymmetric, true, xrelshift, yrelshift, dataorder);
}
double JKQTPXGraphErrors::getXErrorU(int i, JKQTPDatastore *ds) const
@@ -962,8 +942,8 @@ JKQTPYGraphErrors::JKQTPYGraphErrors(QColor graphColor):
yErrorColumnLower=-1;
}
-void JKQTPYGraphErrors::plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start, int datarange_end, double xrelshift, double yrelshift, const QVector* dataorder) {
- intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, -1, yErrorColumn, JKQTPNoError, yErrorStyle, datarange_start, datarange_end, -1, yErrorColumnLower, true, yErrorSymmetric, xrelshift, yrelshift, dataorder);
+void JKQTPYGraphErrors::plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift, double yrelshift, const QVector* dataorder) {
+ intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, -1, yErrorColumn, JKQTPNoError, yErrorStyle, -1, yErrorColumnLower, true, yErrorSymmetric, xrelshift, yrelshift, dataorder);
}
double JKQTPYGraphErrors::getYErrorU(int i, JKQTPDatastore *ds) const
@@ -1003,8 +983,8 @@ JKQTPXYGraphErrors::JKQTPXYGraphErrors(QColor graphColor):
}
-void JKQTPXYGraphErrors::plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start, int datarange_end, double xrelshift, double yrelshift, const QVector* dataorder) {
- this->intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, yErrorColumn, xErrorStyle, yErrorStyle, datarange_start, datarange_end, xErrorColumnLower, yErrorColumnLower, xErrorSymmetric, yErrorSymmetric, xrelshift, yrelshift, dataorder);
+void JKQTPXYGraphErrors::plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift, double yrelshift, const QVector* dataorder) {
+ this->intPlotXYErrorIndicators(painter, parent, parentGraph, xColumn, yColumn, xErrorColumn, yErrorColumn, xErrorStyle, yErrorStyle, xErrorColumnLower, yErrorColumnLower, xErrorSymmetric, yErrorSymmetric, xrelshift, yrelshift, dataorder);
}
double JKQTPXYGraphErrors::getXErrorU(int i, JKQTPDatastore *ds) const
@@ -1060,13 +1040,6 @@ void JKQTPXYGraph::intSortData()
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax
#include
#include
@@ -47,18 +43,22 @@ class JKQTPDatastore;
* - void draw(JKQTPEnhancedPainter& painter);
* - void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect);
* - bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero);
- * - void getGraphsYMinMax(double& miny, double& maxy);
+ * - bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero);
* - QColor getKeyLabelColor()=0;
- * - bool usesColumn(int column) const;
- * .
+ * .
*
* Optionally you may also overwrite these functions to draw elements outside the actual plot area (like e.g. colorbars):
* - void getOutsideSize(JKQTPEnhancedPainter& painter, int& leftSpace, int& rightSpace, int& topSpace, int& bottomSpace);
* - void drawOutside(JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace);
* .
*
+ * In addition this class provudes protected
+ * functions that do coordinate transforms based on the current coordinate system, of the paren
+ * JKQTPlotter (i.e. using the axes JKQTPLott:xAxis and JKQTPlotter::yAxis as basis for the plotting).
+ *
+ * \see \ref jkqtplotter_graphsgroup_classstructure
*/
-class LIB_EXPORT JKQTPPlotElement: public QObject {
+class JKQTP_LIB_EXPORT JKQTPPlotElement: public QObject {
Q_OBJECT
public:
/** \brief class constructor */
@@ -67,7 +67,7 @@ class LIB_EXPORT JKQTPPlotElement: public QObject {
explicit JKQTPPlotElement(JKQTPlotter* parent);
/** \brief default wirtual destructor */
- virtual ~JKQTPPlotElement() ;
+ virtual ~JKQTPPlotElement() = default;
/** \brief plots the graph to the plotter object specified as parent */
virtual void draw(JKQTPEnhancedPainter& painter)=0;
@@ -91,34 +91,16 @@ class LIB_EXPORT JKQTPPlotElement: public QObject {
/** \brief returns the color to be used for the key label */
virtual QColor getKeyLabelColor()=0;
- /*! \brief sets the property title ( \copybrief title ) to the specified \a __value.
- \details Description of the parameter title is:
\copydoc title
- \see title for more information */
- inline virtual void setTitle(const QString & __value)
- {
- this->title = __value;
- }
- /*! \brief returns the property title ( \copybrief title ).
- \details Description of the parameter title is:
\copydoc title
- \see title for more information */
- inline virtual QString getTitle() const
- {
- return this->title;
- }
- /*! \brief sets the property visible ( \copybrief visible ) to the specified \a __value.
- \details Description of the parameter visible is:
\copydoc visible
- \see visible for more information */
- inline virtual void setVisible(bool __value)
- {
- this->visible = __value;
- }
- /*! \brief returns the property visible ( \copybrief visible ).
- \details Description of the parameter visible is:
\copydoc visible
- \see visible for more information */
- inline virtual bool getVisible() const
- {
- return this->visible;
- }
+ /** \brief sets the title of the plot (for display in key!).
+ *
+ * \note If no title is supplied, no key entry is drawn. */
+ virtual void setTitle(const QString & __value);
+ /*! \brief returns the the title of the plot */
+ virtual QString getTitle() const;
+ /*! \brief sets whether the graph is visible in the plot */
+ void virtual setVisible(bool __value);
+ /*! \brief returns whether the graph is visible in the plot */
+ bool virtual isVisible() const;
/** \brief returns the parent painter class */
inline JKQTBasePlotter* getParent() { return parent; }
@@ -142,6 +124,53 @@ class LIB_EXPORT JKQTPPlotElement: public QObject {
virtual void drawOutside(JKQTPEnhancedPainter& painter, QRect leftSpace, QRect rightSpace, QRect topSpace, QRect bottomSpace);
protected:
+
+
+
+ /** \brief tool routine that transforms an x-coordinate (plot coordinate --> pixels) for this plot element */
+ virtual double transformX(double x) const;
+
+ /** \brief tool routine that transforms a y-coordinate (plot coordinate --> pixels) for this plot element */
+ virtual double transformY(double y) const;
+
+ /** \brief tool routine that backtransforms an x-coordinate (pixels --> plot coordinate) for this plot element */
+ virtual double backtransformX(double x) const;
+
+ /** \brief tool routine that backtransforms a y-coordinate (pixels --> plot coordinate) for this plot element */
+ virtual double backtransformY(double y) const;
+
+
+ /** \brief tool routine that transforms a QPointF according to the parent's transformation rules (plot coordinate --> pixels) */
+ inline QPointF transform(const QPointF& x) {
+ return QPointF(transformX(x.x()), transformY(x.y()));
+ }
+
+ /** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules (pixels --> plot coordinate) */
+ inline QPointF backTransform(const QPointF& x) {
+ return QPointF(backtransformX(x.x()), backtransformY(x.y()));
+ }
+
+ /** \brief tool routine that transforms a QPointF according to the parent's transformation rules (plot coordinate --> pixels) */
+ inline QPointF transform(double x, double y) {
+ return transform(QPointF(x,y));
+ }
+ /** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules (pixels --> plot coordinate) */
+ inline QPointF backTransform(double x, double y) {
+ return backTransform(QPointF(x,y));
+ }
+ /** \brief tool routine that transforms a QVector according to the parent's transformation rules (plot coordinate --> pixels) */
+ QVector transform(const QVector& x);
+
+ /** \brief tool routine that transforms a QVector according to the parent's transformation rules
+ * and returns a (non-closed) path consisting of lines (plot coordinate --> pixels) */
+ QPainterPath transformToLinePath(const QVector& x);
+
+ /** \brief tool routine that transforms a QVector according to the parent's transformation rules
+ * and returns a polygon (plot coordinate --> pixels) */
+ inline QPolygonF transformToPolygon(const QVector& x) {
+ return QPolygonF(transform(x));
+ }
+
/** \brief the plotter object this object belongs to */
JKQTBasePlotter* parent;
@@ -150,52 +179,6 @@ class LIB_EXPORT JKQTPPlotElement: public QObject {
/** \brief indicates whether the graph is visible in the plot */
bool visible;
-
-
-
- /** \brief tool routine that transforms an x-coordinate for this plot element */
- virtual double transformX(double x) const;
-
- /** \brief tool routine that transforms a y-coordinate for this plot element */
- virtual double transformY(double y) const;
-
- /** \brief tool routine that backtransforms an x-coordinate for this plot element */
- virtual double backtransformX(double x) const;
-
- /** \brief tool routine that backtransforms a y-coordinate for this plot element */
- virtual double backtransformY(double y) const;
-
-
- /** \brief tool routine that transforms a QPointF according to the parent's transformation rules */
- inline QPointF transform(const QPointF& x) {
- return QPointF(transformX(x.x()), transformY(x.y()));
- }
-
- /** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules */
- inline QPointF backTransform(const QPointF& x) {
- return QPointF(backtransformX(x.x()), backtransformY(x.y()));
- }
-
- /** \brief tool routine that transforms a QPointF according to the parent's transformation rules */
- inline QPointF transform(double x, double y) {
- return transform(QPointF(x,y));
- }
- /** \brief tool routine that back-transforms a QPointF according to the parent's transformation rules */
- inline QPointF backTransform(double x, double y) {
- return backTransform(QPointF(x,y));
- }
- /** \brief tool routine that transforms a QVector according to the parent's transformation rules */
- QVector transform(const QVector& x);
-
- /** \brief tool routine that transforms a QVector according to the parent's transformation rules
- * and returns a (non-closed) path consisting of lines */
- QPainterPath transformToLinePath(const QVector& x);
-
- /** \brief tool routine that transforms a QVector according to the parent's transformation rules
- * and returns a polygon */
- inline QPolygonF transformToPolygon(const QVector& x) {
- return QPolygonF(transform(x));
- }
};
/** \brief this virtual base class of the (data-column based) graphs,
@@ -204,16 +187,19 @@ class LIB_EXPORT JKQTPPlotElement: public QObject {
* as basis for the graphs
* \ingroup jkqtplotter_basegraphs
*
- * This class adds several features to work with data columns. In addition this class adds protected
- * functions that do coordinate transforms based on the current coordinate system, of the paren
- * JKQTPlotter (i.e. using the axes JKQTPLott:xAxis and JKQTPlotter::yAxis as basis for the plotting).
+ * This class adds features to work with data columns.
+ * - There are two properties datarange_start and datarange_end. By default they are -1 and therefore ignored.
+ * if they are != -1 the plotter only displays the datapoints with the indexes [datarange_start .. datarange_end]
+ * although there might be more data points available (range [0 .. maxDataPoints]). The datarange is cut at the
+ * full range, i.e. if datarange_end>maxDataPoints the plotter displays [datarange_start .. maxDataPoints].
+ * - Also there is a virtual function usesColumn() which checks whether a given column is used by this graph.
+ * Override this function in your derived graphs to indicate to JKQTPlotter / JKQTBasePlotter , which columns
+ * from the internal JKQTPDatastore are actually used. This information can be used e.g. for graph-specific data-export.
+ * .
*
- * There are two properties datarange_start and datarange_end. By default they are -1 and therefore ignored.
- * if they are != -1 the plotter only displays the datapoints with the indexes [datarange_start .. datarange_end]
- * although there might be more data points available (range [0 .. maxDataPoints]). The datarange is cut at the
- * full range, i.e. if datarange_end>maxDataPoints the plotter displays [datarange_start .. maxDataPoints].
+ * \see \ref jkqtplotter_graphsgroup_classstructure
*/
-class LIB_EXPORT JKQTPGraph: public JKQTPPlotElement {
+class JKQTP_LIB_EXPORT JKQTPGraph: public JKQTPPlotElement {
Q_OBJECT
public:
/** \brief class constructor */
@@ -222,39 +208,15 @@ class LIB_EXPORT JKQTPGraph: public JKQTPPlotElement {
explicit JKQTPGraph(JKQTPlotter* parent);
/** \brief default wirtual destructor */
- virtual ~JKQTPGraph() ;
+ virtual ~JKQTPGraph() = default ;
- /*! \brief sets the property datarange_start ( \copybrief datarange_start ) to the specified \a __value.
- \details Description of the parameter datarange_start is:
\copydoc datarange_start
- \see datarange_start for more information */
- inline virtual void setDatarangeStart(int __value)
- {
- this->datarange_start = __value;
- }
- /*! \brief returns the property datarange_start ( \copybrief datarange_start ).
- \details Description of the parameter datarange_start is:
\copydoc datarange_start
- \see datarange_start for more information */
- inline virtual int getDatarangeStart() const
- {
- return this->datarange_start;
- }
- /*! \brief sets the property datarange_end ( \copybrief datarange_end ) to the specified \a __value.
- \details Description of the parameter datarange_end is:
\copydoc datarange_end
- \see datarange_end for more information */
- inline virtual void setDatarange_end(int __value)
- {
- this->datarange_end = __value;
- }
- /*! \brief returns the property datarange_end ( \copybrief datarange_end ).
- \details Description of the parameter datarange_end is:
\copydoc datarange_end
- \see datarange_end for more information */
- inline virtual int getDatarange_end() const
- {
- return this->datarange_end;
- }
-
- /** \brief returns \c true if the given column is used by the graph */
+ /** \brief returns \c true if the given column is used by the graph
+ *
+ * This virtual function indicates whether a given column is used by this graph.
+ * Override this function in your derived graphs to indicate to JKQTPlotter / JKQTBasePlotter , which columns
+ * from the internal JKQTPDatastore are actually used. This information can be used e.g. for graph-specific data-export.
+ */
virtual bool usesColumn(int column) const;
protected:
@@ -271,21 +233,17 @@ class LIB_EXPORT JKQTPGraph: public JKQTPPlotElement {
*/
virtual void drawErrorsAfter(JKQTPEnhancedPainter& /*painter*/);
-
-
-
-
- /** \brief start of the range of plot data. -1 switches the lower data range border off. */
- int datarange_start;
- /** \brief end of the range of plot data. -1 switches the upper data range border off. */
- int datarange_end;
-
/** \brief get the maximum and minimum value of the given column
*
* The result is given in the two parameters which are call-by-reference parameters!
*/
bool getDataMinMax(int column, double& minx, double& maxx, double& smallestGreaterZero);
+
+
+ protected:
+
+
friend class JKQTPGraphErrors;
};
@@ -297,8 +255,10 @@ class LIB_EXPORT JKQTPGraph: public JKQTPPlotElement {
* coordinate systems
* \ingroup jkqtplotter_basegraphs
*
+ * \see \ref jkqtplotter_graphsgroup_classstructure
+ *
*/
-class LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement {
+class JKQTP_LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement {
Q_OBJECT
public:
/** \brief class constructor */
@@ -321,19 +281,32 @@ class LIB_EXPORT JKQTPPlotObject: public JKQTPPlotElement {
that specify x and y coordinates for the single plot points.
\ingroup jkqtplotter_basegraphs
- This class implements basic management facilities for the data columns and implements the function
- - bool getXMinMax(double& minx, double& maxx, double& smallestGreaterZero);
- - bool getYMinMax(double& miny, double& maxy, double& smallestGreaterZero);
+ This class implements basic management facilities for the data columns:
+ - setXColumn(), setYColumn() to set the columns to be used for the graph data
+ - setDataSortOrder() to specify whether and how the data should be sorted before drawing
+ \image html jkqtplotter_unsorted.png "Unsorted Data"
+ \image html jkqtplotter_sortedx.png "Data sorted along x-axis (DataSortOrder::SortedX)"
+ .
+ ... and overrides/implements the functions:
+ - getXMinMax()
+ - getYMinMax()
+ - usesColumn()
.
*/
-class LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
Q_OBJECT
public:
+ /** \brief specifies how to sort the data in a JKQTPXYGraph before drawing
+ *
+ * \image html jkqtplotter_unsorted.png "Unsorted Data"
+ *
+ * \image html jkqtplotter_sortedx.png "Data sorted along x-axis (DataSortOrder::SortedX)"
+ */
enum DataSortOrder {
- Unsorted=0,
- SortedX=1,
- SortedY=2
+ Unsorted=0, /*!< \brief the data for a JKQTPXYGraph is not sorted before drawing */
+ SortedX=1, /*!< \brief the data for a JKQTPXYGraph is sorted so the x-values appear in ascending before drawing */
+ SortedY=2 /*!< \brief the data for a JKQTPXYGraph is sorted so the y-values appear in ascending before drawing */
};
@@ -395,19 +368,19 @@ class LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value.
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual void setSortData(const DataSortOrder & __value)
+ inline virtual void setDataSortOrder(const DataSortOrder & __value)
{
this->sortData = __value;
}
/*! \brief returns the property sortData ( \copybrief sortData ).
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual DataSortOrder getSortData() const
+ inline virtual DataSortOrder getDataSortOrder() const
{
return this->sortData;
}
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- void setSortData(int __value);
+ void setDataSortOrder(int __value);
protected:
@@ -425,8 +398,10 @@ class LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
*
* This function can beu used to get the correct datapoint after sorting the datapoints,
* As sorting is done by sorting an index and not reordering the data in the columns themselves.
+ *
+ * \see setDataSortOrder(), getDataSortOrder()
* */
- inline int getDataIndex(int i) {
+ inline int getDataIndex(int i) {
if (sortData==Unsorted) return i;
return sortedIndices.value(i,i);
}
@@ -438,18 +413,27 @@ class LIB_EXPORT JKQTPXYGraph: public JKQTPGraph {
\ingroup jkqtplotter_basegraphs
+ \see \ref jkqtplotter_graphsgroup_classstructure
+
*/
-class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
Q_OBJECT
public:
+ /** \brief specifies how to sort the data for a JKQTPSingleColumnGraph before drawing
+ *
+ * \image html jkqtplotter_unsorted.png "Unsorted Data"
+ *
+ * \image html jkqtplotter_sortedx.png "Data sorted along x-axis (DataSortOrder::SortedX)"
+ */
enum DataSortOrder {
- Unsorted=0,
- Sorted=1
+ Unsorted=0, /*!< \brief the data for a JKQTPSingleColumnGraph is not sorted before drawing */
+ Sorted=1 /*!< \brief the data for a JKQTPSingleColumnGraph is sorted (in ascending order) before drawing */
};
+ /** \brief specifies whether the data for a JKQTPSingleColumnGraph represent x-axis or y-axis values */
enum class DataDirection {
- X,
- Y
+ X, /*!< \brief the data for a JKQTPSingleColumnGraph is data belonging to the x-axis of the plot */
+ Y /*!< \brief the data for a JKQTPSingleColumnGraph is data belonging to the y-axis of the plot */
};
/** \brief class constructor */
@@ -462,7 +446,7 @@ class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
JKQTPSingleColumnGraph(int dataColumn, QColor color, Qt::PenStyle style, JKQTPlotter* parent);
JKQTPSingleColumnGraph(int dataColumn, QColor color, JKQTPlotter* parent);
/** \brief returns the color to be used for the key label */
- virtual QColor getKeyLabelColor();
+ virtual QColor getKeyLabelColor() override ;
/*! \brief sets the property dataColumn ( \copybrief dataColumn ) to the specified \a __value.
\details Description of the parameter dataColumn is:
\copydoc dataColumn
@@ -527,19 +511,19 @@ class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value.
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual void setSortData(const DataSortOrder & __value)
+ inline virtual void setDataSortOrder(const DataSortOrder & __value)
{
this->sortData = __value;
}
/*! \brief returns the property sortData ( \copybrief sortData ).
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual DataSortOrder getSortData() const
+ inline virtual DataSortOrder getDataSortOrder() const
{
return this->sortData;
}
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- void setSortData(int __value);
+ void setDataSortOrder(int __value);
/** \copydoc JKQTPGraph::usesColumn() */
virtual bool usesColumn(int c) const override;
@@ -592,8 +576,13 @@ class LIB_EXPORT JKQTPSingleColumnGraph: public JKQTPGraph {
will add some public datamemebers and methods to your class that allow to specify the properties of the
error indicators (plot properties: color, width, ... and columns for the data).
+ \image html jkqtplotter_simpletest_errorbarstyles.png "line-graphs with different types of error indicators"
+
+
+ \see \ref jkqtplotter_graphsgroup_classstructure_mixins
+
*/
-class LIB_EXPORT JKQTPGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPGraphErrors {
public:
/** \brief class contructor */
JKQTPGraphErrors(QColor graphColor=QColor("black"));
@@ -705,11 +694,11 @@ class LIB_EXPORT JKQTPGraphErrors {
/** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
* given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. This method is called by
* the JKQTPGraph descendents */
- virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start=-1, int datarange_end=-1, double xrelshift=0, double yrelshift=0.0, const QVector* dataorder=nullptr)=0;
+ virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector* dataorder=nullptr)=0;
/** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
* given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. */
- void intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int datarange_start=-1, int datarange_end=-1, int xErrorColumnLower=-1, int yErrorColumnLower=-1, bool xErrorSymmetric=true, bool yErrorSymmetric=true, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr);
+ void intPlotXYErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int xErrorColumn, int yErrorColumn, JKQTPErrorPlotstyle xErrorStyle, JKQTPErrorPlotstyle yErrorStyle, int xErrorColumnLower=-1, int yErrorColumnLower=-1, bool xErrorSymmetric=true, bool yErrorSymmetric=true, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr);
/** \brief this function can be used to set the color of the error indicators automatically
*
@@ -729,9 +718,9 @@ class LIB_EXPORT JKQTPGraphErrors {
/*! \brief This class adds data fields for error indicators in x direction to a JKQTPGraph descendent.
\ingroup jkqtplotter_basegraphserrors
- \see JKQTPGraphErrors
+ \see JKQTPGraphErrors, \ref jkqtplotter_graphsgroup_classstructure_mixins
*/
-class LIB_EXPORT JKQTPXGraphErrors: public JKQTPGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPXGraphErrors: public JKQTPGraphErrors {
public:
/** \brief class contructor */
JKQTPXGraphErrors(QColor graphColor=QColor("black"));
@@ -788,7 +777,7 @@ class LIB_EXPORT JKQTPXGraphErrors: public JKQTPGraphErrors {
/** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
* given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. */
- virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start=-1, int datarange_end=-1, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
+ virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
virtual double getXErrorU(int i, JKQTPDatastore* ds) const override;
virtual double getXErrorL(int i, JKQTPDatastore* ds) const override;
@@ -798,10 +787,10 @@ class LIB_EXPORT JKQTPXGraphErrors: public JKQTPGraphErrors {
/*! \brief This class adds data fields for error indicators in y direction to a class.
\ingroup jkqtplotter_basegraphserrors
- \see JKQTPGraphErrors
+ \see JKQTPGraphErrors, \ref jkqtplotter_graphsgroup_classstructure_mixins
*/
-class LIB_EXPORT JKQTPYGraphErrors: public JKQTPGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPYGraphErrors: public JKQTPGraphErrors {
public:
/** \brief class contructor */
JKQTPYGraphErrors(QColor graphColor=QColor("black"));
@@ -857,7 +846,7 @@ class LIB_EXPORT JKQTPYGraphErrors: public JKQTPGraphErrors {
/** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
* given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. */
- virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start=-1, int datarange_end=-1, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
+ virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
virtual double getYErrorU(int i, JKQTPDatastore* ds) const override;
virtual double getYErrorL(int i, JKQTPDatastore* ds) const override;
@@ -866,10 +855,10 @@ class LIB_EXPORT JKQTPYGraphErrors: public JKQTPGraphErrors {
/*! \brief This class adds data fields for error indicators in x and y direction to a class.
\ingroup jkqtplotter_basegraphserrors
- \see JKQTPGraphErrors
+ \see JKQTPGraphErrors, \ref jkqtplotter_graphsgroup_classstructure_mixins
*/
-class LIB_EXPORT JKQTPXYGraphErrors: public JKQTPGraphErrors {
+class JKQTP_LIB_EXPORT JKQTPXYGraphErrors: public JKQTPGraphErrors {
public:
/** \brief class contructor */
JKQTPXYGraphErrors(QColor graphColor=QColor("black"));
@@ -977,7 +966,7 @@ class LIB_EXPORT JKQTPXYGraphErrors: public JKQTPGraphErrors {
/** \brief draw error indicators with the parameters defined in this class. The position of the datapoints is
* given by the \a xColumn and \a yColumn. It is also possible to specify a datarange. */
- virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, int datarange_start=-1, int datarange_end=-1, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
+ virtual void plotErrorIndicators(JKQTPEnhancedPainter& painter, JKQTBasePlotter* parent, JKQTPGraph* parentGraph, int xColumn, int yColumn, double xrelshift=0, double yrelshift=0.0, const QVector *dataorder=nullptr) override;
virtual double getXErrorU(int i, JKQTPDatastore* ds) const override;
virtual double getXErrorL(int i, JKQTPDatastore* ds) const override;
diff --git a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp
index 6d06af63cc..1a23d08b31 100644
--- a/lib/jkqtplotter/jkqtpgraphsboxplot.cpp
+++ b/lib/jkqtplotter/jkqtpgraphsboxplot.cpp
@@ -126,13 +126,6 @@ void JKQTPBoxplotVerticalGraph::draw(JKQTPEnhancedPainter& painter) {
int imax=datastore->getColumn(posColumn).getRows();
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=datastore->getColumn(posColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=datastore->getColumn(medianColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax0) sortData=Sorted;
}
@@ -467,13 +446,6 @@ bool JKQTPBoxplotHorizontalGraph::getXMinMax(double& miny, double& maxy, double&
JKQTPDatastore* datastore=parent->getDatastore();
int imin=0;
int imax=datastore->getColumn(medianColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=datastore->getColumn(posColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetColumn(posColumn).getRows();
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=datastore->getColumn(posColumn).getRows();
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax
#include
#include
@@ -89,7 +85,7 @@
\see \ref JKQTPlotterBoxplotsGraphs
*/
-class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph {
Q_OBJECT
public:
@@ -110,7 +106,7 @@ class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph {
/** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect);
/** \brief returns the color to be used for the key label */
- virtual QColor getKeyLabelColor();
+ virtual QColor getKeyLabelColor() override;
/** \brief get the maximum and minimum x-value of the graph
@@ -130,19 +126,19 @@ class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph {
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value.
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual void setSortData(const DataSortOrder & __value)
+ inline virtual void setDataSortOrder(const DataSortOrder & __value)
{
this->sortData = __value;
}
/*! \brief returns the property sortData ( \copybrief sortData ).
\details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- inline virtual DataSortOrder getSortData() const
+ inline virtual DataSortOrder getDataSortOrder() const
{
return this->sortData;
}
/*! \brief sets the property sortData ( \copybrief sortData ) to the specified \a __value. \details Description of the parameter sortData is:
\copydoc sortData
\see sortData for more information */
- void setSortData(int __value);
+ void setDataSortOrder(int __value);
/*! \brief sets the property posColumn ( \copybrief posColumn ) to the specified \a __value.
\details Description of the parameter posColumn is:
\copydoc posColumn
\see posColumn for more information */
@@ -463,7 +459,7 @@ class LIB_EXPORT JKQTPBoxplotVerticalGraph: public JKQTPGraph {
\see JKQTPBoxplotVerticalGraph \ref JKQTPlotterBoxplotsGraphs
*/
-class LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph {
+class JKQTP_LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -510,7 +506,7 @@ class LIB_EXPORT JKQTPBoxplotHorizontalGraph: public JKQTPBoxplotVerticalGraph {
\image html boxplots.png
*/
-class LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject {
+class JKQTP_LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject {
Q_OBJECT
public:
/** \brief class constructor */
@@ -866,7 +862,7 @@ class LIB_EXPORT JKQTPBoxplotVerticalElement: public JKQTPPlotObject {
\see JKQTPBoxplotVerticalElement
*/
-class LIB_EXPORT JKQTPBoxplotHorizontalElement: public JKQTPBoxplotVerticalElement {
+class JKQTP_LIB_EXPORT JKQTPBoxplotHorizontalElement: public JKQTPBoxplotVerticalElement {
Q_OBJECT
public:
/** \brief class constructor */
diff --git a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h
index 6611e62fa4..85e9695d6c 100644
--- a/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h
+++ b/lib/jkqtplotter/jkqtpgraphsevaluatedfunction.h
@@ -19,10 +19,6 @@
-/** \file jkqtpgraphsevaluatedfunction.h
- * \ingroup jkqtplotter_functiongraphs
- */
-
#include
#include
#include
@@ -69,7 +65,7 @@ typedef std::function jkqtpSimplePlotFunctionType;
the following image
\image html plot_functionplots.png
*/
-class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph {
Q_OBJECT
public:
@@ -624,7 +620,7 @@ class LIB_EXPORT JKQTPXFunctionLineGraph: public JKQTPGraph {
\ingroup jkqtplotter_functiongraphs
*/
-class LIB_EXPORT JKQTPYFunctionLineGraph: public JKQTPXFunctionLineGraph {
+class JKQTP_LIB_EXPORT JKQTPYFunctionLineGraph: public JKQTPXFunctionLineGraph {
Q_OBJECT
public:
/** \brief class constructor */
diff --git a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp
index 6711bd7f4f..b898b6e5ed 100644
--- a/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp
+++ b/lib/jkqtplotter/jkqtpgraphsfilledcurve.cpp
@@ -108,13 +108,6 @@ void JKQTPFilledCurveXGraph::draw(JKQTPEnhancedPainter& painter) {
int imax=static_cast(qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows()));
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax(qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows()));
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetDatastore();
int imin=0;
int imax=static_cast(qMin(qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows()), datastore->getColumn(static_cast(yColumn2)).getRows()));
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax(qMin(qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows()), datastore->getColumn(static_cast(yColumn2)).getRows()));
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax
#include
#include
@@ -40,7 +35,7 @@
\ingroup jkqtplotter_geoplots
*/
-class LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject {
+class JKQTP_LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject {
Q_OBJECT
public:
/*! \brief class contructor
@@ -128,7 +123,7 @@ class LIB_EXPORT JKQTPGeoBaseLine: public JKQTPPlotObject {
\ingroup jkqtplotter_geoplots
*/
-class LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine {
+class JKQTP_LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine {
Q_OBJECT
public:
/*! \brief class contructor
@@ -224,7 +219,7 @@ class LIB_EXPORT JKQTPGeoBaseFilled: public JKQTPGeoBaseLine {
\ingroup jkqtplotter_geoplots
*/
-class LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject {
+class JKQTP_LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject {
Q_OBJECT
public:
/*! \brief class contructor
@@ -360,7 +355,7 @@ class LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject {
/** \brief plots a key marker inside the specified rectangle \a rect */
virtual void drawKeyMarker(JKQTPEnhancedPainter& painter, QRectF& rect);
/** \brief returns the color to be used for the key label */
- virtual QColor getKeyLabelColor();
+ virtual QColor getKeyLabelColor() override;
protected:
double x,y;
@@ -384,7 +379,7 @@ class LIB_EXPORT JKQTPGeoSymbol: public JKQTPPlotObject {
\ingroup jkqtplotter_geoplots
*/
-class LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject {
+class JKQTP_LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject {
Q_OBJECT
public:
/*! \brief class contructor
@@ -512,7 +507,7 @@ class LIB_EXPORT JKQTPGeoText: public JKQTPPlotObject {
\image html plot_geoline.png
*/
-class LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine {
+class JKQTP_LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine {
Q_OBJECT
public:
/*! \brief class constructor
@@ -620,7 +615,7 @@ class LIB_EXPORT JKQTPGeoLine: public JKQTPGeoBaseLine {
\image html plot_geoinfiniteline.png
*/
-class LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine {
+class JKQTP_LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine {
Q_OBJECT
public:
/*! \brief class constructor
@@ -741,7 +736,7 @@ class LIB_EXPORT JKQTPGeoInfiniteLine: public JKQTPGeoBaseLine {
\image html plot_geolines.png
*/
-class LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine {
+class JKQTP_LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine {
Q_OBJECT
public:
/*! \brief class constructor
@@ -823,7 +818,7 @@ class LIB_EXPORT JKQTPGeoPolyLines: public JKQTPGeoBaseLine {
\image html plot_georectangle.png
*/
-class LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled {
+class JKQTP_LIB_EXPORT JKQTPGeoRectangle: public JKQTPGeoBaseFilled {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1008,7 +1003,7 @@ protected:
\image html plot_geopolygon.png
*/
-class LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled {
+class JKQTP_LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1103,7 +1098,7 @@ class LIB_EXPORT JKQTPGeoPolygon: public JKQTPGeoBaseFilled {
\see http://www.codeguru.com/cpp/g-m/gdi/article.php/c131 and
http://en.wikipedia.org/wiki/Ellipse#General_parametric_form
*/
-class LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle {
+class JKQTP_LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1219,7 +1214,7 @@ class LIB_EXPORT JKQTPGeoEllipse: public JKQTPGeoRectangle {
\image html plot_geoarc.png
*/
-class LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine {
+class JKQTP_LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1399,7 +1394,7 @@ class LIB_EXPORT JKQTPGeoArc: public JKQTPGeoBaseLine {
\image html plot_geopie.png
*/
-class LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse {
+class JKQTP_LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse {
Q_OBJECT
public:
/*! \brief class constructor
@@ -1484,7 +1479,7 @@ class LIB_EXPORT JKQTPGeoPie: public JKQTPGeoEllipse {
\image html plot_geochord.png
*/
-class LIB_EXPORT JKQTPGeoChord: public JKQTPGeoPie {
+class JKQTP_LIB_EXPORT JKQTPGeoChord: public JKQTPGeoPie {
Q_OBJECT
public:
/*! \brief class constructor
diff --git a/lib/jkqtplotter/jkqtpgraphsimage.h b/lib/jkqtplotter/jkqtpgraphsimage.h
index 37c84afb65..236d50e1a3 100644
--- a/lib/jkqtplotter/jkqtpgraphsimage.h
+++ b/lib/jkqtplotter/jkqtpgraphsimage.h
@@ -22,11 +22,6 @@
#define jkqtpgraphsimage_H
-
-/** \file jkqtpgraphsimage.h
- * \ingroup jkqtplotter_imagelots_elements
- */
-
#include
#include
#include
@@ -42,7 +37,7 @@
/*! \brief base class for plotting an image
\ingroup jkqtplotter_imagelots_elements
*/
-class LIB_EXPORT JKQTPImageBase: public JKQTPGraph {
+class JKQTP_LIB_EXPORT JKQTPImageBase: public JKQTPGraph {
Q_OBJECT
public:
/** \brief class constructor */
@@ -153,7 +148,7 @@ class LIB_EXPORT JKQTPImageBase: public JKQTPGraph {
\image html jkqtplotter_simpletest_imageplot.png
*/
-class LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
+class JKQTP_LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
Q_OBJECT
public:
/** \brief possible datatypes of the data array, plotted by this class. */
@@ -349,7 +344,7 @@ class LIB_EXPORT JKQTPMathImageBase: public JKQTPImageBase {
\image html jkqtplotter_simpletest_rgbimageplot_qt.png
*/
-class LIB_EXPORT JKQTPImage: public JKQTPImageBase {
+class JKQTP_LIB_EXPORT JKQTPImage: public JKQTPImageBase {
Q_OBJECT
public:
@@ -415,7 +410,7 @@ class LIB_EXPORT JKQTPImage: public JKQTPImageBase {
\image html jkqtplotter_simpletest_imageplot_modifier.png
\image html jkqtplotter_simpletest_imageplot__smallscaletransparent.png
*/
-class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
+class JKQTP_LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
Q_OBJECT
public:
@@ -903,7 +898,7 @@ class LIB_EXPORT JKQTPMathImage: public JKQTPMathImageBase {
\image html jkqtplotter_simpletest_rgbimageplot_opencv.png
*/
-class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
+class JKQTP_LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
Q_OBJECT
public:
using JKQTPMathImageBase::setData;
@@ -1421,7 +1416,7 @@ class LIB_EXPORT JKQTPRGBMathImage: public JKQTPMathImageBase {
\image html jkqtplotter_simpletest_imageplot__smallscaletransparent.png
*/
-class LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
+class JKQTP_LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
Q_OBJECT
public:
@@ -1485,7 +1480,7 @@ class LIB_EXPORT JKQTPColumnMathImage: public JKQTPMathImage {
\image html jkqtplotter_simpletest_rgbimageplot_opencv.png
*/
-class LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
+class JKQTP_LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
Q_OBJECT
public:
@@ -1579,7 +1574,7 @@ class LIB_EXPORT JKQTPColumnRGBMathImage: public JKQTPRGBMathImage {
\ingroup jkqtplotter_imagelots_elements
*/
-class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase {
+class JKQTP_LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase {
Q_OBJECT
public:
@@ -1711,7 +1706,7 @@ class LIB_EXPORT JKQTPOverlayImage: public JKQTPImageBase {
Also it is possible to draw other types of markers (cross, circles, ...)
*/
-class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage {
+class JKQTP_LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage {
Q_OBJECT
public:
/** \brief class constructor */
@@ -1824,7 +1819,7 @@ class LIB_EXPORT JKQTPOverlayImageEnhanced: public JKQTPOverlayImage {
Also it is possible to draw other types of markers (cross, circles, ...)
*/
-class LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanced {
+class JKQTP_LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanced {
Q_OBJECT
public:
JKQTPColumnOverlayImageEnhanced(JKQTBasePlotter* parent=nullptr);
@@ -1876,7 +1871,7 @@ class LIB_EXPORT JKQTPColumnOverlayImageEnhanced: public JKQTPOverlayImageEnhanc
*
* \image html JKQTPContour.png
*/
-class LIB_EXPORT JKQTPContour: public JKQTPMathImage {
+class JKQTP_LIB_EXPORT JKQTPContour: public JKQTPMathImage {
Q_OBJECT
public:
/** \brief class constructor */
diff --git a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp
index 7b009c362b..2938e920cf 100644
--- a/lib/jkqtplotter/jkqtpgraphsimpulses.cpp
+++ b/lib/jkqtplotter/jkqtpgraphsimpulses.cpp
@@ -81,13 +81,6 @@ void JKQTPImpulsesHorizontalGraph::draw(JKQTPEnhancedPainter& painter) {
int imax=qMin(datastore->getColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imaxgetColumn(static_cast(xColumn)).getRows(), datastore->getColumn(static_cast(yColumn)).getRows());
int imin=0;
- // interpret data ranges
- if (datarange_start>-1) {
- imin=qMin(datarange_start, static_cast(imax));
- }
- if (datarange_end>-1) {
- imax=qMin(datarange_end, static_cast(imax));
- }
if (imax(datastore->getColumn(static_cast